This file contains hidden or 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
"processors": { | |
"coffee": {"cmd": "coffee -c {input}", "nextExt": "js"}, | |
"js": {"cmd": "cat", "nextExt": "js1"}, | |
"js1": {"cmd": "cat", "nextExt": "js2"}, | |
"js2": {"cmd": "cat", "nextExt": "js3"}, | |
"js3": {"cmd": "cat", "nextExt": "js4"}, | |
"js4": {"cmd": "cat", "nextExt": "js5"}, | |
"js5": {"cmd": "java -Xmx200m -Xms50m -Xincgc -jar testdir/yuicompressor-2.4.7.jar {input} -o {output}", "outputType": "js"} | |
} |
This file contains hidden or 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 exec = require('child_process').exec | |
, fs = require('fs'); | |
var escapeShell = function(cmd) { | |
return '"'+cmd.replace(/(["\s'$`\\])/g,'\\$1')+'"'; | |
}; |
This file contains hidden or 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 _ = require('underscore'); | |
config = { | |
'compiled_cache_dir': '../css/tmp', | |
'processors': { | |
'js': 'java -jar YUICompressor.jar {input}', | |
'coffee': ['coffee -c {input} {output}', 'js'], | |
'less': ['lessc', 'css'] | |
}, |
This file contains hidden or 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
inverse = function (f, lower = -100, upper = 100) { | |
function (y) uniroot((function (x) f(x) - y), lower = lower, upper = upper)[1] | |
} | |
cdf = function (f) { | |
function (upper) integrate(f, 0.01, upper).value | |
} | |
f = 0.453 * exp(-1.036x) * sinh(sqrt(2.29x)) |
This file contains hidden or 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 python2.7 | |
import remote_webkit_debug | |
chrome = remote_webkit_debug.ChromeShell() | |
tab = chrome.pick_tab([ | |
tab for tab in chrome.get_tabs() | |
if 'webSocketDebuggerUrl' in tab][0]) | |
tab.send_command('Runtime.evaluate', | |
expression='window.location = window.location;', |
This file contains hidden or 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/srv.arc 2009-06-29 12:54:11.000000000 -0400 | |
+++ /b/srv.arc 2012-03-18 10:50:17.903238925 -0400 | |
@@ -134,11 +134,11 @@ | |
(if srv-noisy* (pr c)) | |
(-- n) | |
(push c line)) | |
- (if srv-noisy* (pr "\n\n")) | |
+ (if srv-noisy* (pr "\r\n\r\n")) | |
(respond o op (+ (parseargs (string (rev line))) args) cooks ip)))) | |
This file contains hidden or 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
# Michael Axiak <[email protected]> | |
import numpy as np | |
from milk.supervised.base import supervised_model | |
def _label_to_map(label, labelMap): | |
val = np.ndarray(len(labelMap)) | |
val[labelMap[label]] = 1 | |
return val | |
def _label_from_map(i, labelMap): |
This file contains hidden or 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
asdf |
This file contains hidden or 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
select distinct | |
<include refid="t_fact_columns_fragment" /> | |
from | |
t_fact fct, | |
t_location_fact locf, | |
t_user_location uloc, | |
t_location loc | |
where | |
fct.fact_pk = locf.fact_pk and | |
loc.location_id = locf.location_id and |
This file contains hidden or 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 decode_google_polyline(encoded): | |
""" | |
Decode a google polyline string into a list of coordinates. | |
See http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html | |
""" | |
raw_numbers = [ord(c) - 63 for c in encoded[::-1]] | |
current_number = 0 | |
sequence = [] |