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
<!DOCTYPE html> | |
<!-- Generated by Cython 0.20.1 on Sun May 31 14:47:14 2015 --> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css"> | |
body { font-family: courier; font-size: 12; } |
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
<!DOCTYPE html> | |
<!-- Generated by Cython 0.20.1 on Sat May 30 04:30:00 2015 --> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css"> | |
body { font-family: courier; font-size: 12; } |
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 | |
from cymem.cymem cimport Pool | |
from libc.math cimport sqrt | |
cimport cython | |
ctypedef double[2] double_pair | |
cdef class World: |
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
/** @jsx React.DOM */ | |
import React from './react-es6'; | |
import classSet from './react-es6/lib/cx'; | |
import BootstrapMixin from './BootstrapMixin'; | |
var Form = React.createClass({ | |
mixins: [BootstrapMixin], |
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
"""A simple implementation of a greedy transition-based parser. Released under BSD license.""" | |
from os import path | |
import os | |
import sys | |
from collections import defaultdict | |
import random | |
import time | |
import pickle | |
SHIFT = 0; RIGHT = 1; LEFT = 2; |
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
/** @jsx React.DOM */ | |
'use strict'; | |
// Components wrapping Twitter Bootstrap stuff | |
// | |
var BSNames = { | |
// This isn't exhaustive. Need to think through what should go here. Should | |
// be exclusive. | |
bsClass: {'column': 'col', 'button': 'btn', 'btn-group': 'btn-group', 'label': 'label', |
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
var placement = (steps[i].options && steps[i].options.placement) ? steps[i].options.placement : options.placement; | |
var css = {}; | |
if (placement === 'right') { | |
css.top = top + (height / 3) + "px"; | |
css.left = left + element.outerWidth() + margin; | |
} else if (placement === 'left') { | |
css.top = top + (height / 3) + "px"; | |
css.left = (left - element.outerWidth()) - margin; | |
} else if (placement === 'bottom') { | |
css.top = (height + top + margin + 10) + "px"; |
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
_safe_quoters = {} | |
always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
'abcdefghijklmnopqrstuvwxyz' | |
'0123456789' '_.-') | |
_safe_map = {} | |
for i, c in zip(xrange(256), str(bytearray(xrange(256)))): | |
_safe_map[c] = c if (i < 128 and c in always_safe) else '%{:02X}'.format(i) | |
def quote(s, safe='/'): | |
"""quote('abc def') -> 'abc%20def' |
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/env python | |
from BaseHTTPServer import HTTPServer, test | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
SimpleHTTPRequestHandler.extensions_map['.less'] = 'text/css' | |
SimpleHTTPRequestHandler.extensions_map['.ks'] = 'text/javascript' | |
test(SimpleHTTPRequestHandler, HTTPServer) |