http://ruby-china.org/topics/16256
get https://github.com/mvj3/hangman/blob/master/data/words.txt
and compile the decision tree.json
ruby compile.rb
; 1.2 | |
; http://en.wikipedia.org/wiki/Ackermann_function | |
; TODO 了解 | |
(define (A x y) | |
(cond ((= y 0) 0) | |
((= x 0) (* 2 y)) | |
((= y 1) 2) | |
(else (A (- x 1) | |
(A x (- y 1)))))) |
*.log | |
*.lock |
height <- c(58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72) weight <- c(115, 117, 120, 123, 126, 129, 132, 135, 139, 142, 146, 150, 154, | |
159, 164) print(mean(height)) | |
print(sd(weight)) print(cor(weight, height)) plot(weight, height) |
console.log num for num in [10..1] |
# encoding: UTF-8 | |
# learn.eoe.cn Rails项目及其开源项目源码行数统计 | |
require 'active_support/all' | |
@total_ruby_lines_count = 0 | |
@total_javascript_lines_count = 0 | |
@total_haml_lines_count = 0 | |
def count_lines_by_file_type pattern, exclude = nil | |
exclude_str = " | grep -v #{exclude} " if exclude |
mongoid_models = Object.constants.map {|i| i.to_s.constantize rescue nil }.compact.select {|i| i.is_a?(Class) && i.included_modules.include?(Mongoid::Document) } |
#!/bin/sh | |
# | |
# https://gist.github.com/mvj3/6973600 | |
# | |
# unicorn - init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# chkconfig: - 85 15 | |
# description: Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, | |
# high-bandwidth connections and take advantage of features in Unix/Unix-like kernels | |
# processname: unicorn | |
# config: /etc/unicorn/*.conf |
adb shell pm clear com.ssl.support.install | |
adb shell pm clear com.ssl.support.daemon | |
adb install -r ~/sunshine/bhsf-install-adb/SunDaemon-release.apk | |
adb push ~/sunshine/bhsf-install-adb/SunInstall-release.apk /system/app | |
sudo umount /Volumes/MID |
cat - README.markdown << EOF | sendmail -t | |
to:[email protected] | |
from:[email protected] | |
subject:debian-jk | |
EOF |
http://ruby-china.org/topics/16256
get https://github.com/mvj3/hangman/blob/master/data/words.txt
and compile the decision tree.json
ruby compile.rb