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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:8e904721f90a0b0c0c0dd648eb9f9f2473c22dc731e07b4f14c14c1cf2c3df9c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:8e904721f90a0b0c0c0dd648eb9f9f2473c22dc731e07b4f14c14c1cf2c3df9c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
cat cat.js | |
#!/usr/bin/env node | |
var fs = require('fs'); | |
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false |
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
$cat parse-json.js | |
#!/usr/bin/env node | |
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:ad9def6cd2562187051a60bccf190018c12b68225779c07fe4622ad0800536cb" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
namespace :export_import do | |
desc 'link ~/Export_Import to ~/mdm/current/script/export_import' | |
task :link, :roles => :control do | |
exp_imp_link = "#{home}/Export_Import" | |
run <<"END_OF_RUN" | |
if [ ! -L #{exp_imp_link} ]; then | |
if [ -e #{exp_imp_link} ]; then | |
rm -rf #{exp_imp_link}.backup | |
mv #{exp_imp_link} #{exp_imp_link}.backup | |
fi |
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
require 'fog_factor' | |
require 'test/unit' | |
class FogFactorTest < Test::Unit::TestCase | |
EPSILON = 0.01 | |
def test_syllable_count | |
words = { | |
'tame' => 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
class FogFactor | |
class << self | |
def syllable_count(raw_word) | |
word = raw_word.gsub(/[^a-zA-Z]/,'') | |
syllables = word.scan(/[^aeiouy]+y|[^aeiouy]*(ai|au|ea|ee|ei|ie|io|oa|oi|oo|ou|[aeiou])|([^aeiouy]+|y)(ai|au|ea|ee|ei|ie|io|oa|oi|oo|ou|[aeiou])/i) | |
if syllables.size > 1 and word.match(/(e|es)$/) | |
syllables.size - 1 | |
else | |
syllables.size |
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
Macintosh-3:Clojure clark$ ls | |
clojure clojure.jar jline-0.9.91 jline-0.9.91.jar jline-0.9.91.zip | |
Macintosh-3:Clojure clark$ java -cp clojure.jar clojure.lang.Repl | |
Clojure 1.0.0- | |
user=> (+ 1 1) | |
2 | |
user=> ^D | |
Macintosh-3:Clojure clark$ java -cp jline-0.9.91.jar:clojure.jar jline.ConsoleRunner clojure.lang.Repl | |
Exception in thread "main" java.lang.ClassNotFoundException: clojure.lang.Repl | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) |
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
1019c1019 | |
< inhibit_window_system = 0; | |
--- | |
> inhibit_window_system = 1; | |
1057a1058,1063 | |
> /* x-windows now disabled by default, but this will re-enable */ | |
> if (argmatch (argv, argc, "-x", "--x-windows", 7, NULL, &skip_args) | |
> || argmatch (argv, argc, "-x", "--x-windows", 7, NULL, &skip_args)) | |
> inhibit_window_system = 0; | |
> |
OlderNewer