Skip to content

Instantly share code, notes, and snippets.

View mjamesruggiero's full-sized avatar

Michael Ruggiero mjamesruggiero

View GitHub Profile
@mjamesruggiero
mjamesruggiero / rails_best_practices_notes.md
Created June 22, 2012 05:26
rails best practices notes

Rails Best Practices from CodeSchool

I took the course Rails Best Practices from CodeSchool and wanted to share my impressions.

Overall

  • 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
@mjamesruggiero
mjamesruggiero / calculate_cpm.rb
Created July 11, 2012 05:49
tiered CPM calcs
#!/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"):
@mjamesruggiero
mjamesruggiero / mlconf_google_deep_learning.md
Created November 19, 2013 21:39
MLConf 2013 notes (1)

large scale deep learning

Quoc V.Le - Google

parallel neural networks at Google scale

  • machine learning requires domain knowledge from human experts
  • we want to move beyond hiring domain experts; it would be good to have machines create features rather than human experts

deep learning:

@mjamesruggiero
mjamesruggiero / mlconf_pandora.md
Last active December 28, 2015 19:49
MLConf 2013 notes(2)

Pandora talk re:recommendation systems

Eric Bieschke, Chief Scientist @pandora

  • Expresses great love for A/B testing
  • "the big advantage about having a lot of data is that you can do experiments with real data, real users"

The importance of metrics

  • how you judge experiments shapes where you are headed
  • choose the wrong measuring stick and you wind up in the wrong place
@mjamesruggiero
mjamesruggiero / mlconf_graphlab.md
Created November 19, 2013 23:40
MLConf 2013 notes (3)

Joseph Gonzalez, Co-Founder at GraphLab

Graphs encode the relationship between entities and are essential to data mining and machine learning.

Example: predicting user behavior

  • as a base technique that does a classification re: political bias
  • you can estimate the political bias and take that idea and apply it to a large user base
  • the vast majority of the users may not post frequently, but you have the follower structure, the graph, so you can use a conditional random field

"triangle counting"

@mjamesruggiero
mjamesruggiero / mlconf_twitter.md
Created November 19, 2013 23:53
MLConf 2013 notes (4)

Personalization and Recommenders with Content-Based Approaches

Jake Mannix, Applied Machine Learning Engineer, Twitter

  • Does collaborative filtering == RecSys?
  • cautions that recommenders are not just user->products
  • you might actually recommend groups to a user, user to a groups, candidates to a posting (example: Linkedin)

math techniques:

package com.mjamesruggiero
import scalaz.State
object StateMonad {
type StateCache[+A] = State[Cache, A]
trait ConfigService {
def value(k: String): StateCache[ConfigValue]
}

1:1 questions

Always end with an assignment

What can I hold you accountable for next time we talk?

What can I be accountable to you for the next time we talk?

Short term

How is [project] going? What could we do to make it better?

Is there anything blocking you from getting your work done?

Are there any projects you’d really like to work on if you were given the opportunity?

;; 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