Re:Source code for Dutch DigiD app released under Dutch Open...
by seydor on Wednesday January 18, 2023 @09:24AM
(#34426905)
LLMs can do better
[ Parent
| on HN ]
Re:Source code for Dutch DigiD app released under Dutch Open...
by eugenekolo on Wednesday January 18, 2023 @09:31AM
(#34426992)
This one's pretty fancy from the big GPT.
``` Here is an example of Python code that can print a loading bar at different completion percentages:
def print_loading_bar(percent): bar_length = 20 hashes = '#' * int(percent * bar_length / 100) spaces = ' ' * (bar_length - len(hashes)) print(f'\rLoading... [{hashes}{spaces}] {percent}%', end='')
for i in range(101): print_loading_bar(i) time.sleep(0.1) ```