Skip to content

Instantly share code, notes, and snippets.

View kgullion's full-sized avatar

Kyle Gullion kgullion

View GitHub Profile
@kgullion
kgullion / example.csv
Last active April 17, 2018 15:31
Large example set (made with these parameters floored_range(0.314, 511.7, .011) ) for problem at https://codegolf.stackexchange.com/questions/162556/recovering-range-parameters
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
0
0
0
0
0
0
0
0
0
0
@kgullion
kgullion / checker.py
Created April 7, 2017 01:54
Code checker for Answer-Chaining Fibonacci at http://codegolf.stackexchange.com/q/115591/32604
def checker(code, restricted):
r = set(restricted)
c = set(code)
chars = {*'\t\n', *map(chr, range(32, 127))}
if c == chars - r:
print('Good to go!')
else:
if r & c:
print('Illegal characters: {}'.format(''.join(r & c)))
if chars - r - c:
a
b
c
d
e
f
g
h
i
j
def neely_v4(limit):
for x in range(1, limit):
xx = x*x
y = x + 1
z = y + 1
while z <= limit:
zz = xx + y*y
while z*z < zz:
z += 1
if z*z == zz and z <= limit: