I took the course Rails Best Practices from CodeSchool and wanted to share my impressions.
- The tutorial assumes basic Rails knowledge
- Lessons are videos with examples
- Exercises are completed on Code School's site in a faux editor; the sit
I took the course Rails Best Practices from CodeSchool and wanted to share my impressions.
| #!/usr/bin/env ruby | |
| # mjamesuggiero | |
| # Tue Jul 10 22:14:59 PDT 2012 | |
| # so embarrassed about this! | |
| require 'test/unit' | |
| class Cpm | |
| def initialize(rate_in_cents, discounted_rate_in_cents, threshold) | |
| @rate = rate_in_cents | |
| @discounted_rate = discounted_rate_in_cents |
| # Fri Mar 15 21:31:59 PDT 2013 | |
| # want a histogram of queries | |
| import re | |
| import logging | |
| import csv | |
| def clean(line): | |
| return remove_newlines(remove_times(sub_digits(line))) | |
| def sub_digits(old_string, subst="x"): |
Eric Bieschke, Chief Scientist @pandora
Graphs encode the relationship between entities and are essential to data mining and machine learning.
Example: predicting user behavior
"triangle counting"
Jake Mannix, Applied Machine Learning Engineer, Twitter
math techniques:
| package com.mjamesruggiero | |
| import scalaz.State | |
| object StateMonad { | |
| type StateCache[+A] = State[Cache, A] | |
| trait ConfigService { | |
| def value(k: String): StateCache[ConfigValue] | |
| } |
| ;; note that project loads this in :dependencies | |
| ;; [org.xerial/sqlite-jdbc "3.7.2"]] | |
| (ns piney.pagerduty | |
| (:require [piney.utils :refer :all] | |
| [clojure.java.jdbc :refer :all] | |
| [clojure.java.io :as io] | |
| [clojure.edn :as edn])) | |
| (defn load-config |