Skip to content

Instantly share code, notes, and snippets.

@folz
folz / SketchSystems.spec
Created December 28, 2018 19:58
New User Journey
New User Journey
Registrae
What Identifier?
email -> New Email Ask
phone -> New Phone Ask
New Email Ask
Email Input Screen
submit -> New Email Valid?
@folz
folz / SketchSystems.spec
Last active December 13, 2018 21:44
Registrae
Registrae
Splash Screen*
pressSignup -> Name Gender Screen
pressLogin -> Login Screen
Name Gender Screen
Invite Code Screen
Find Neighborhood Screen
@folz
folz / xml1
Created February 29, 2012 17:05
<presence from='{Jane}@public.talk.google.com/android{UNIQUE_ID}'
to='{me}@gmail.com'>
<status/>
<show>available</show>
<!-- metadata truncated for brevity -->
</presence>
<presence from='{John}@gmail.com/gmail{UNIQUE_ID}' to='{me}@gmail.com'>
<status/>
<show>available</show>
@folz
folz / grade.sh
Created December 7, 2011 23:08
Bash one-liner to find your CS grade
glookup | grep -v '\-\-\-' | tail -n +2 | head -n -2 | sed 's/ */\ /g' | cut -d' ' -f 3 | awk '{ split($0,a,"/"); num += a[1]; den += a[2] } END { print num/den }'
@folz
folz / unique.py
Created March 30, 2011 03:02
takes a string and returns that string with all duplicate letters stripped out
def unique(s):
'''
@param s:
a string
takes a string and returns that string with all duplicate
letters stripped out
'''
i=0
y={}
@folz
folz / pe3.py
Created March 3, 2011 07:19
Project Euler problem #3
'''
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
'''
import math
from time import time
calcs = {}
@folz
folz / pe2.py
Created March 3, 2011 06:21
Project Euler problem #2
'''
Each new term in the Fibonacci sequence is generated by
adding the previous two terms. By starting with 1 and 2,
the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose
values do not exceed four million, find the sum of the
even-valued terms.
@folz
folz / pe1.py
Created March 3, 2011 05:56
Project Euler problem #1
'''
If we list all the natural numbers below 10 that are multiples
of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
'''
from time import time
def pe1():
@folz
folz / gist:808924
Created February 3, 2011 02:26
Minecraft through a proxy
java -DsocksProxyHost=localhost -DsocksProxyPort=1080 -jar Minecraft.exe
>>> ================================ RESTART ================================
>>>
>>> rf = getrankf(buildset())
>>> evolve(2, 500, rf, mutrate=0.2, breedrate=0.1, pexp = 0.7, pnew=0.1)
20962
17300
17300
12360
12360
9742