UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
| 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 |
| " Use Vim settings, rather then Vi settings (much better!). | |
| " This must be first, because it changes other options as a side effect. | |
| set nocompatible | |
| " ================ General Config ==================== | |
| set number "Line numbers are good | |
| set backspace=indent,eol,start "Allow backspace in insert mode | |
| set history=1000 "Store lots of :cmdline history | |
| set showcmd "Show incomplete cmds down the bottom |
| #!/bin/bash | |
| brew install wine-stable winetricks | |
| WINEARCH=win32 WINEPREFIX=~/.wine winecfg | |
| mkdir ~/.cache/winetricks/ | |
| winetricks -q dotnet45 corefonts |
| #!/usr/bin/env ruby | |
| # A sneaky wrapper around Rubocop that allows you to run it only against | |
| # the recent changes, as opposed to the whole project. It lets you | |
| # enforce the style guide for new/modified code only, as opposed to | |
| # having to restyle everything or adding cops incrementally. It relies | |
| # on git to figure out which files to check. | |
| # | |
| # Here are some options you can pass in addition to the ones in rubocop: | |
| # |
Picking the right architecture = Picking the right battles + Managing trade-offs
| # Working example for my blog post at: | |
| # http://danijar.com/variable-sequence-lengths-in-tensorflow/ | |
| import functools | |
| import sets | |
| import tensorflow as tf | |
| from tensorflow.models.rnn import rnn_cell | |
| from tensorflow.models.rnn import rnn | |
| def lazy_property(function): |