Skip to content

Instantly share code, notes, and snippets.

from copy import deepcopy as copy
LOWERLIMIT = 1
UPPERLIMIT = 10 ** 12
NUMDIGITS = 1
def recur(i):
queue = [[int(j) for j in str(i)]]
z = 0
while z < len(queue):
for j in xrange(len(queue[z]) - 1):
@jeek
jeek / shufflemult.py
Last active January 17, 2016 21:10 — forked from anonymous/shufflemult.py
shufflemult.py
from itertools import permutations
seen = dict()
seenline = set()
i = 0
while True:
current = sorted(set([int("".join(j)) for j in list(permutations(str(i)))]))
if current[-1] not in seen:
@jeek
jeek / deck.py
Created June 10, 2012 08:15 — forked from anonymous/deck.py
Deck
from random import choice
from copy import deepcopy
import string
def do_save(current_cards, save_file="mydeck.txt"):
filehandle = file(save_file, "w")
for card in current_cards:
filehandle.writelines(card)
filehandle.close()
print "Current card list saved."