This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (intercalate, transpose) | |
import Data.Maybe (fromJust) | |
import GHC.Exts (sortWith) | |
data Square = Empty | Mine | Click | |
newtype Minefield = Minefield [[Square]] | |
instance Show Square where | |
show Empty = "." | |
show Mine = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
resp = requests.get('http://worldcup.sfg.io/matches') | |
for jogo in (j for j in requests.get('http://worldcup.sfg.io/matches').json() if j['status'] == 'completed'): | |
print jogo['home_team']['country'], jogo['home_team']['goals'], 'x', jogo['away_team']['country'], jogo['away_team']['goals'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Easymotion { | |
let g:EasyMotion_leader_key = '<Space>' | |
let g:StupidEasyMotion_leader_key = 'f' | |
let g:EasyMotion_use_upper = 1 | |
let g:EasyMotion_keys = 'ASDFWIERUOGHJKL' | |
" } | |
" Vim Over { | |
let g:over_enable_auto_nohlsearch = 1 | |
let g:over_enable_cmd_window = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stack> | |
#include <cstdlib> | |
typedef unsigned long long ull; | |
ull ack(ull m, ull n) | |
{ | |
std::stack<ull> st; | |
st.push(m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def sieve(limit): | |
a = [True] * limit | |
a[0] = a[1] = False | |
for i, isprime in enumerate(a): | |
if isprime: | |
yield i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
########################################################### | |
#-PRIVATE-SHIT--PRIVATE-SHIT--PRIVATE-SHIT--PRIVATE-SHIT--# | |
########################################################### | |
# Legend Bot [2011] DO NOT FUCKIN SHARE! # | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # | |
# Commands: # | |
# !legend @system # | |
# !legend @rootable # | |
# !legend @cleanlogs # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w=0 x=1 y=8 z=9 | |
w=0 x=5 y=33 z=3 | |
w=0 x=8 y=8 z=8 | |
w=0 x=12 y=33 z=2 | |
w=0 x=15 y=8 z=7 | |
w=0 x=19 y=33 z=1 | |
w=0 x=22 y=8 z=6 | |
w=0 x=26 y=33 z=0 | |
w=0 x=29 y=8 z=5 | |
w=0 x=36 y=8 z=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total = 1904 | |
wc = 3 | |
xc = 25 | |
yc = 38 | |
zc = 175 | |
# roots = [] | |
for w in xrange(0, total/wc + 1): | |
for x in xrange(0, (total - wc*w)/xc + 1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
from itertools import product | |
def random_monty(choices): | |
return random.choice(choices) | |
def deterministic_monty(choices): | |
return random.choice([c for c in choices if c != 0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Snute (83) | |
2. Bly (80) | |
3. Tefel (68) | |
4. Scarlett (60) | |
5. Nerchio (58) | |
6. VortiX (52) | |
7. Jim (52) | |
8. MaNa (41) | |
9. Happy (38) | |
10. TLO (38) |
OlderNewer