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
| # Make.believe | |
| # A class that creates any class real just by believing. | |
| class Make | |
| class << self | |
| def believe(dream) | |
| classify(dream) | |
| realize(dream) | |
| end |
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
| pcm.dmix51 { | |
| type dmix | |
| ipc_key 1024 | |
| ipc_key_add_uid false | |
| ipc_perm 0666 | |
| slave { | |
| pcm "hw:1,0" | |
| channels 6 | |
| period_time 0 | |
| period_size 1024 |
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
| dmichael@ubuntu:~$ aplay -l | |
| **** List of PLAYBACK Hardware Devices **** | |
| card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC] | |
| Subdevices: 1/1 | |
| Subdevice #0: subdevice #0 | |
| card 0: AudioPCI [Ensoniq AudioPCI], device 1: ES1371/2 [ES1371 DAC1] | |
| Subdevices: 1/1 | |
| Subdevice #0: subdevice #0 | |
| card 1: Aureon51MkII [Aureon5.1MkII], device 0: USB Audio [USB Audio] |
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
| dmichael@ubuntu:~$ aplay -L | |
| pulse | |
| Playback/recording through the PulseAudio sound server | |
| front:CARD=AudioPCI,DEV=0 | |
| Ensoniq AudioPCI, ES1371 DAC2/ADC | |
| Front speakers | |
| rear:CARD=AudioPCI,DEV=0 | |
| Ensoniq AudioPCI, ES1371 DAC1 | |
| Rear speakers |
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
| # Add Scala and bin directory to your PATH | |
| SCALA_HOME=/Users/dmichael/bin/scala | |
| PATH=$SCALA_HOME/bin:$HOME/bin:$PATH |
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
| $ mkdir -p ~/bin && cd ~/bin | |
| $ cp ~/Downloads/scala-2.8.0.final ~/bin | |
| $ ln -s scala-2.8.0.final scala |
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
| module ROXML | |
| class XMLHashRef | |
| def update_hash(hash, instance) | |
| raise "not implemented" | |
| end | |
| end | |
| class XMLAttributeRef | |
| def update_hash(hash, instance) | |
| ap self.class |
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 ln -s /Applications/GnuPlot.app/Contents/Resources/bin/gnuplot /usr/bin/gnuplot |
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
| x = linspace(-pi, pi, 100); | |
| y = sin(x); | |
| plot(x, y); |
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
| function [J, grad] = costFunction(theta, X, y) | |
| % Logistic Regression cost function and partial derivative (gradient) | |
| m = length(y); % number of training examples | |
| cost = (y' * log(h)) + ((1-y')*log(1-h)); | |
| J = -1/m * cost; | |
| grad = 1/m * (X' * (h - y)); |