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
Date,USDEUR | |
2010-07-02,1.2548 | |
2010-07-01,1.2328 | |
2010-06-30,1.2271 | |
2010-06-29,1.2198 | |
2010-06-28,1.2339 | |
2010-06-25,1.2294 | |
2010-06-24,1.2262 | |
2010-06-23,1.2271 | |
2010-06-22,1.2258 |
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
cd 'C:\Program Files (x86)\Git\doc\git\html'; ls *.html | ?{$_.Name -match '\w+-\w+\.*'} | %{mv $_ $($_.Name.Replace('-', ''))} |
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
;; I came up with this after reading http://stackoverflow.com/questions/1009037/processing-pairs-of-values-from-two-sequences-in-clojure | |
(defn nseq-map | |
"Given keys and sequences of values, produces a sequence of | |
maps of the keys to each slice of values from the sequences. | |
Example: | |
user> (nseq-map [:a :b :c] [1 2 3] [\"ba\" \"bb\" \"bc\"] [\"cx\" \"cy\" \"cz\"]) | |
({:c \"cx\", :b \"ba\", :a 1} {:c \"cy\", :b \"bb\", :a 2} {:c \"cz\", :b \"bc\", :a 3})" | |
[keys & value-seqs] |
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
(defun set-psake-compile-command () | |
(interactive) | |
(let ((psake-file-dir (locate-dominating-file (buffer-file-name) "default.ps1"))) | |
(if psake-file-dir | |
(let (( psake-command (concat "Set-Location " psake-file-dir "; & c:\\Dropbox\\bin\\psake.ps1"))) | |
(progn | |
(make-local-variable 'compile-command) | |
(setq compile-command | |
(concat "powershell -NoProfile -ExecutionPolicy unrestricted -Command \"" psake-command "\""))))))) |
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
task Start-Coffee-Watcher -Description "when a coffee file changes recompile - for testing" { | |
Start-Job -Name "CoffeeWatcher" -ArgumentList "$srcDir\WebRole\scripts" -ScriptBlock { | |
param($scriptsFolder) | |
Write-Host "Watching $scriptsFolder" | |
$recompile = { | |
# TODO: Figure out how to recompile coffee scripts from command line with SassAndCoffee |
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 global:New-CurryAlias($name, $value) { | |
$wrapperFunctionName = "Invoke-Curried-$name" | |
$wrapperFunctionPath = "function:global:$wrapperFunctionName" | |
Set-Item -Force -Path $wrapperFunctionPath ` | |
-Value "Invoke-Expression -Command '$value $args'" | |
New-Alias -Force -Name $name -Value $wrapperFunctionName | |
} |
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
(ns model-trainer.test.helpers | |
(:use [model-trainer.math :only [msum mabs msubtract rvec matrix]] | |
[clojure.test]) | |
(:import [cern.colt.matrix DoubleMatrix2D DoubleMatrix1D])) | |
;; usage | |
#_(deftest computing-activations | |
;; this tests computing activation for a layer in a multi-layer perceptron, | |
;; basically: multiply rvec by matrix and apply the sigmoid activation function to | |
;; constrain the values to the 0 to 1 range. The result should be the first vector. |
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
using MyApp.Models, MyApp.Util, MyApp.Widgets, (ctx) => | |
class MyApp.Reports | |
@request: (...) => | |
# given MyApp.Util has an `ajaxRequest` method, for example | |
ctx.ajaxRequest ... |
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 sh | |
echo "Use current directory as default search scope in Finder" | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
echo "Show Path bar in Finder" | |
defaults write com.apple.finder ShowPathbar -bool true | |
echo "Disable the Ping sidebar in iTunes" | |
defaults write com.apple.iTunes disablePingSidebar -bool true |