I hereby claim:
- I am sundhaug92 on github.
- I am sundhaug92 (https://keybase.io/sundhaug92) on keybase.
- I have a public key whose fingerprint is E00D C8AF 7986 05DB F73E 4C05 FDF0 3A6F 7279 B9AA
To claim this, I am signing this object:
from hashlib import sha512 | |
def count_noughts(s): | |
n=0 | |
for c in s: | |
if c == '0':n+=1 | |
else: | |
return n | |
return 0 |
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:e00dc8af798605dbf73e4c05fdf03a6f7279b9aa] |
''' | |
Proof that, for any set, it's either true that all elements are equal or that atleast one element has a higher value than the average | |
''' | |
def avg(a): | |
''' | |
Calculate average over a set, list, array or similar | |
''' | |
return sum(a)/len(a) | |
def f(a): |
import random,gdb | |
g=gdb.gdb() | |
def f(i): | |
if i==0: | |
for c in range(32,127): | |
yield chr(c) | |
else: | |
yield from f(i-1) |
I hereby claim:
To claim this, I am signing this object:
import time | |
import sys | |
consolewidth=80 | |
def delay_print(s): | |
for c in s: | |
sys.stdout.write( '%s' % c ) | |
sys.stdout.flush() | |
time.sleep(float(1)/float(60)) |