#Drone Specs
- Flat Area
- Great wifi
- Hopefully High ceilings without any crazy wires (eg. 120ft high ceilings in Berlin)
| #!/bin/bash | |
| APP_NAME="your-app-name-goes-here" | |
| APP_PATH=/home/deploy/${APP_NAME} | |
| # Production environment | |
| export RAILS_ENV="production" | |
| # This loads RVM into a shell session. Uncomment if you're using RVM system wide. | |
| # [[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" |
| #!/bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: APPLICATION | |
| # Required-Start: $all | |
| # Required-Stop: $network $local_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start the APPLICATION unicorns at boot | |
| # Description: Enable APPLICATION at boot time. | |
| ### END INIT INFO |
| require 'em-redis' | |
| require 'redis' | |
| require 'redis/distributed' | |
| require "fiber_pool" | |
| class Redis | |
| class Distributed | |
| def initialize(urls, options = {}) | |
| @tag = options.delete(:tag) || /^\{(.+?)\}/ |
| gonz@bamboo:~ > git clone git://github.com/maccman/juggernaut.git | |
| Cloning into juggernaut... | |
| remote: Counting objects: 558, done. | |
| remote: Compressing objects: 100% (258/258), done. | |
| remote: Total 558 (delta 309), reused 481 (delta 255) | |
| Receiving objects: 100% (558/558), 576.74 KiB | 135 KiB/s, done. | |
| Resolving deltas: 100% (309/309), done. | |
| gonz@bamboo:~ > cd juggernaut |
| module Mongoid | |
| class Criteria | |
| def each_by(by, &block) | |
| idx = 0 | |
| total = 0 | |
| set_limit = options[:limit] | |
| while ((results = ordered_clone.limit(by).skip(idx)) && results.any?) | |
| results.each do |result| | |
| return self if set_limit and set_limit >= total |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| username: vagrant | |
| password: vagrant | |
| sudo apt-get update | |
| sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
| sudo aptitude install mysql-server mysql-client | |
| sudo nano /etc/mysql/my.cnf |
| """Parallel grid search for sklearn's GradientBoosting. | |
| This script uses IPython.parallel to run cross-validated | |
| grid search on an IPython cluster. Each cell on the parameter grid | |
| will be evaluated ``K`` times - results are stored in MongoDB. | |
| The procedure tunes the number of trees ``n_estimators`` by averaging | |
| the staged scores of the GBRT model averaged over all K folds. | |
| You need an IPython ipcluster to connect to - for local use simply |
| <!DOCTYPE html> | |
| <html> | |
| <head><title>ChamberedTest</title></head> | |
| <script type="text/javascript" src="js/chambered.js"></script> | |
| <style type="text/css"> | |
| canvas, img { | |
| image-rendering: optimizeSpeed; | |
| image-rendering: -moz-crisp-edges; | |
| image-rendering: -webkit-optimize-contrast; |