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
JSCLASS_PATH = 'build/min'; | |
require('./' + JSCLASS_PATH + '/loader'); | |
JS.require('JS.Deferrable'); | |
Promise = new JS.Class({ | |
include: JS.Deferrable, | |
initialize: function(value) { | |
if (value !== undefined) this.succeed(value); |
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
chez --script c.scm > c.s | |
nasm -f macho c.s | |
ld c.o | |
./a.out | |
echo $? |
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
function urlObject(options) { | |
"use strict"; | |
/*global window, document*/ | |
var url_search_arr, | |
option_key, | |
i, | |
urlObj, | |
get_param, | |
key, |
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 | |
""" | |
Command line tool for google-diff-match-patch | |
""" | |
from diff_match_patch import diff_match_patch | |
HTMLTEMP = '''\ | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
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
command | count | num_people_using | |
---|---|---|---|
cd | 347893.0 | 803.0 | |
ls | 326227.0 | 783.0 | |
rm | 80394.0 | 744.0 | |
git | 426701.0 | 696.0 | |
sudo | 109042.0 | 690.0 | |
mkdir | 22987.0 | 655.0 | |
cat | 54491.0 | 642.0 | |
mv | 39297.0 | 640.0 | |
ssh | 83035.0 | 623.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
#!/usr/bin/env python | |
import os | |
import sys | |
import argparse | |
try: | |
from boto.ec2.connection import EC2Connection | |
except ImportError: | |
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n') | |
sys.exit(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
# A class-based template for jQuery plugins in Coffeescript | |
# | |
# $('.target').myPlugin({ paramA: 'not-foo' }); | |
# $('.target').myPlugin('myMethod', 'Hello, world'); | |
# | |
# Check out Alan Hogan's original jQuery plugin template: | |
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
# | |
(($, window) -> |
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
(define emit printf) | |
(define (compile exp) | |
(cond | |
[(fixnum? exp) (emit "push ~a~%" exp)] | |
[(eq? '+ (car exp)) (begin | |
(compile (cadr exp)) | |
(compile (caddr exp)) | |
(emit "pop eax~%") | |
(emit "pop ebx~%") |
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 | |
use strict; | |
use warnings FATAL => 'all'; | |
use English qw(-no_match_vars); | |
use Lingua::EN::Fathom; | |
use TeX::Hyphen; | |
use List::Util qw(min); |
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
def numerical(): | |
from scipy.integrate import odeint | |
from numpy import array | |
# [position, mass, velocity, mass flow] | |
def acceleration(y, t, v_exhaust=1.0): | |
return array([y[2], y[3], v_exhaust * y[3]/y[1], 0.0]) | |
initial_state = array([0.0, 2.0, 0.0, -1.0]) |
OlderNewer