Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
import random | |
opmv = {'O': 'X', 'X': 'O'} | |
def print_grid(grid): | |
print '\n' + '\n'.join(' '.join(line) for line in zip(*[iter(grid)]*3)) | |
def possible(grid): | |
return [i for i in xrange(9) if grid[i] == '_'] |
import pygame | |
import random | |
from Queue import Queue, deque | |
from pygame.color import Color | |
d = 20 | |
WIDTH = 15 | |
HEIGHT = 10 | |
LEFT, RIGHT, UP, DOWN = -1, 1, -WIDTH, WIDTH |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
from __future__ import division | |
try: | |
from numpypy import * | |
except ImportError: | |
from numpy import * | |
class Tableau: | |
def __init__(self, obj): | |
self.obj, self.rows, self.cons = obj, [], [] |
import eyed3 | |
import re | |
import glob | |
def get_lyric(lrc): | |
text = open(lrc).read() | |
text = re.sub(r'(?:\[.*\])+', '', text).strip() | |
text = map(lambda l: l.strip(), text.split('\n')) | |
ans = [] | |
for l in text: |
plain = r'foo' | |
anchor = r'k$' | |
ranges = r'^[a-f]*$' | |
backrefs = r'(...).*\1' | |
abba = (r'^(?!' # don't ( | |
r'.*(.)(.)\2\1.*' # parttern like abba | |
r'$)') # ) select | |
plan = r'^(.)(.).*\2\1$' |
import cv2 | |
import numpy as np | |
canny = rho = threshold = minLen = maxGap = None | |
def draw(): | |
lines = cv2.HoughLinesP(canny, rho, np.pi / 180, | |
threshold, None, minLen, maxGap) | |
dst = cv2.cvtColor(canny, cv2.COLOR_GRAY2BGR) |