if you are using linux, unix, os x:
pip install -U setuptools
pip install -U pip
pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
| import AVFoundation | |
| import QuartzCore | |
| public class Recording : NSObject, AVAudioRecorderDelegate { | |
| @objc public enum State: Int { | |
| case None, Record, Play | |
| } | |
| static var directory: String { |
if you are using linux, unix, os x:
pip install -U setuptools
pip install -U pip
pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
| 'use strict' | |
| // callback for sensor data. At sample rate of 50hz, | |
| // this function will be called 50 times per second. | |
| // i.e. every 20ms | |
| var onData = function(data){ | |
| /* | |
| Structure of data : | |
| data = { | |
| // Accelerometer x, y, z |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
| (function() { | |
| try { | |
| var $_console$$ = console; | |
| Object.defineProperty(window, "console", { | |
| get: function() { | |
| if ($_console$$._commandLineAPI) | |
| throw "Sorry, for security reasons, the script console is deactivated on netflix.com"; | |
| return $_console$$ | |
| }, | |
| set: function($val$$) { |
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } |
| #!/bin/bash | |
| if [ $# -eq 0 ]; then | |
| echo "Usage <PID> <email address>" | |
| fi | |
| if kill -0 $1; then | |
| echo "Process $1 doesn't exist." | |
| exit 1 | |
| fi |
| /* Flatten das boostrap */ | |
| .well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
| -moz-box-shadow: none !important; | |
| -webkit-box-shadow: none !important; | |
| box-shadow: none !important; | |
| -webkit-border-radius: 0px !important; | |
| -moz-border-radius: 0px !important; | |
| border-radius: 0px !important; | |
| border-collapse: collapse !important; | |
| background-image: none !important; |
| #!/bin/bash | |
| # | |
| # Install Postgres 9.2 on a clean Ubuntu 12.04 | |
| """ | |
| LC_ALL issue | |
| comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
| sudo apt-get install language-pack-en-base | |
| sudo dpkg-reconfigure locales | |
| comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |