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
default['maven']['settings']['mirrors']['0']['id'] = 'nexus' | |
default['maven']['settings']['mirrors']['0']['mirrorOf'] = '*' | |
default['maven']['settings']['mirrors']['0']['url'] = nil | |
default['maven']['settings']['profiles']['0']['id'] = 'nexus' | |
default['maven']['settings']['profiles']['0']['repositories']['0']['id'] = nil | |
default['maven']['settings']['profiles']['0']['repositories']['0']['url'] = nil | |
default['maven']['settings']['profiles']['0']['repositories']['0']['releases']['0']['enabled'] = true |
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
# Y combinator with no unbound variables | |
hash = proc { |generator| | |
proc { |x| | |
proc { |*args| | |
generator.call(x.call(x)).call(*args) | |
} | |
}.call(proc { |x| | |
proc { |*args| | |
generator.call(x.call(x)).call(*args) | |
} |
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 f(a,l,x) | |
(a/2*l)*Math::E**(-x.abs/l) | |
end | |
A = 1.32 | |
l = 1 | |
1000.times do | |
# generate normally distributed random number | |
x = rand |
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
nsamp <- 10000 | |
x <- vector ( length = nsamp ) | |
y <- vector ( length = nsamp ) | |
z <- vector ( length = nsamp ) | |
lambda = 1 | |
A = 1.32 | |
npass =0 | |
# sample x from f(x)/A by using inverse function method | |
for(i in 1: nsamp ) | |
{ |
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
rapier:Projects jkiehl$ gem install gecoder | |
Building native extensions. This could take a while... | |
ERROR: Error installing gecoder: | |
ERROR: Failed to build gem native extension. | |
/Users/jkiehl/.rbenv/versions/1.9.3-p125/bin/ruby extconf.rb | |
checking for main() in -lgecodesupport... yes | |
checking for main() in -lgecodekernel... yes | |
checking for main() in -lgecodeint... yes | |
checking for main() in -lgecodeset... yes |
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
sudo /usr/libexec/locate.updatedb |
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
jkiehl@JKIEHL-3 ~/Desktop/dep-selector (master) | |
$ gem i dep_selector -- --with-gecode-lib="$GECODEDIR" | |
Temporarily enhancing PATH to include DevKit... | |
Building native extensions. This could take a while... | |
ERROR: Error installing dep_selector: | |
ERROR: Failed to build gem native extension. | |
c:/Ruby193/bin/ruby.exe extconf.rb --with-gecode-lib=C:\Program Files\Gecode\ | |
checking for main() in -lgecodesearch... no | |
========================================================================================= |
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
require 'pp' | |
module A | |
def self.a | |
['hi'] | |
end | |
def self.included mod | |
pp "Included in #{mod}" |
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
(define (cons x y) | |
(define (dispatch m) | |
(cond ((= m 0) x) | |
((= m 1) y) | |
(else (error "Argument not 0 or 1 -- CONS" m)))) | |
dispatch) | |
(define (car z) (z 0)) | |
(define (cdr z) (z 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
# A sample Gemfile | |
source "http://rubygems.org" | |
platforms :ruby do | |
gem "knife_cookbook_dependencies" | |
end | |
platforms :mswin, :mingw do | |
gem "knife_cookbook_dependencies_over_http" | |
end |