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
(add-to-list 'exec-path "C:\\Program Files (x86)\\Aspell\\bin") | |
(setq ispell-program-name "aspell.exe") | |
(setq ispell-aspell-data-dir "C:\\Program Files (x86)\\Aspell\\data") | |
(setq ispell-aspell-dict-dir "C:\\Program Files (x86)\\Aspell\\dict") | |
(add-to-list 'ispell-local-dictionary-alist '("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil | |
("-B") | |
nil iso-8859-1)) | |
(setq ispell-personal-dictionary "C:/Users/bilsonc/.ispell") | |
(require 'ispell) |
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
(defvar *nrepl-last-eval-form* nil) | |
(defadvice nrepl-interactive-eval (after nrepl-remember-last-expression-eval (&optional form)) | |
"Save the last expression evaluated so we can run it again later if we want." | |
(setq *nrepl-last-eval-form* form)) | |
(ad-activate 'nrepl-interactive-eval) | |
(defun nrepl-repeat-interactive-eval () |
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
public static class MyExperiment | |
{ | |
public static void RegularMethod() | |
{ | |
DoSomethingAsync(); | |
Console.WriteLine("after starting async stuff"); | |
Thread.Sleep(15000); | |
} | |
public async static void DoSomethingAsync() |
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 Is-BOM-File ($filename) { | |
$bytes = Get-Content -Encoding byte -TotalCount 4 $filename | |
$encoding = [Text.Encoding]::GetEncodings() ` | |
| ForEach { $_.GetEncoding() } ` | |
| Where-Object { -not $_.IsSingleByte } ` | |
| Where-Object { | |
$preamble = $_.GetPreamble() | |
For ($i = 0; $i -lt $preamble.Length; $i++) { | |
if ($bytes[$i] -ne $preamble[$i]) { | |
return $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
(ns RecycledNumbers.core) | |
;; This is the version I _wish_ I had submitted. It took about 1 minute to | |
;; add a single high level pmap (see comment below) and I would have completed | |
;; the problem in time. | |
;; Luckily, I qualified anyway, so maybe this lesson will come in handy in tonight's | |
;; competition. | |
(defn cycles [n] |
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 |
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
(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
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
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 |