Skip to content

Instantly share code, notes, and snippets.

@tomelm
tomelm / config.yaml
Created October 17, 2014 22:08
request bucketer blog post
foo_shiny_feature:
type: *FEATURE_RELEASE # as opposed to, for instance, *EXPERIMENT
buckets:
disabled:
percentage: 90
whitelist:
user_ids:
- *JRHEARD_USER_ID # jrheard is a curmudgeon, doesn't want the new version until it's done
dark_launch:
percentage: 0
// some resource
{
a: 1,
b: 2,
links: {
"show": "asdf",
"delete: "asdf2"
}
}
class Node
attr_accessor :value, :left, :right
end
def subtree(root, min, max)
if root.value >= min
if root.left <= min
if root.left.right >= min
root.left = root.left.right
else

POTENTIAL BATMAN!

Dependencies

There are several dependencies needed in order to get the app running:

  1. Ruby (2.0.0 or higher)
  2. Qt5 (for tests)

Setup

@tomelm
tomelm / gist:6542467
Created September 12, 2013 19:14
getting android command line generating
Notes to get Android generating from command line:
Download and install the appropriate SDK tools for your OS from here: http://developer.android.com/sdk/index.html. Make sure to download what's under SDK tools only.
After this is downloaded:
1. unzip it into a place where it never moves
2. update your path to include it
3. cd into that directory and run ``android update sdk -u --filter platform-tools,android-18,extra-android-support``
4.
1) Minimum App React.js should load on the main page and render 'Hello World'
Failure/Error: visit root_path
Capybara::Poltergeist::JavascriptError:
One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).
TypeError: 'undefined' is not a function (evaluating 'RegExp.prototype.test.bind(
/^(data|aria)-[a-z_][a-z\d_.\-]*$/
)')
TypeError: 'undefined' is not a function (evaluating 'RegExp.prototype.test.bind(
@tomelm
tomelm / 1_plans.md
Last active December 20, 2015 16:29
bigdata student org

Topics to cover

  • Full text search
  • Map Reduce
  • Graph searching and traversal
  • Machine Learning/statistics
  • NLP? (for text)

Possible analysis

  • word counts
  • basic statistics
class Appointment < ActiveRecord::Base
has_many :steps
has_many :roles, through: :steps
has_many :events, through: :roles
end
text_razor|master⚡ ⇒ rspec spec/text_razor.rb
FF
Failures:
1) TextRazor sets and creates entities
Failure/Error: @textrazor = TextRazor.new(api_key: 'abc123', text: 'This is a test sentence', extractors: 'entities')
ArgumentError:
wrong number of arguments(1 for 0)
# ./spec/text_razor.rb:5:in `initialize'
public class RandomizedOptimization {
public static void main(String args[]) {
NNWithRandomHillClimbing rhc = new NNWithRandomHillClimbing();
NNWithSimulatedAnnealing sa = new NNWithSimulatedAnnealing();
NNWithGeneticAlgorithm ga = new NNWithGeneticAlgorithm();
Long start;
// Run neural network with different random hill climbing iterations
try {