Skip to content

Instantly share code, notes, and snippets.

View mharris717's full-sized avatar

Mike Harris mharris717

View GitHub Profile
@mharris717
mharris717 / messages.md
Last active August 23, 2017 18:26
A Conversation About OOP vs. FP Turns Constructive

Just tried to put this in a more readable format: https://github.com/svanderbleek/haskellandchill.com/blob/master/a-conversation-about-oop-vs-fp-turns-constructive.md

Person Time Message
sagar 10:47 why is that, why is OOP trash
katychuang 10:48 excellent question
katychuang 10:49 I've been told FP and OOP are different paradigms
katychuang 10:52 I'm going to butcher a quote from a talk by Evie so I'm going to paraphrase… She said something like when you work with OOP you create lots of objects and rules on how they should interact and yet somehow end up having to touch each other a lot and inappropriately
katychuang 10:53 On the other hand FP (especially Haskell) is like working with shapes, like that baby shape fitting toy where you focus more on fitting the type parameters correctly
katychuang 10:56 I think of programming as building a piping system. FP (especia
mharris717
sorry, this isn't gonna be dlr's game i think
APG
nice trashtalking dick eyes
APG
museum is so good against dlr...
APG
@mharris717
mharris717 / README.md
Last active March 28, 2016 14:38
Dynamo Helper

Helper to interact with Dynamo table

Setup

const fields = ['color','price'];
const tableName = "" + projectName + '-widgets-' + stage;
Widget = makeDynamoFuncs(tableName,fields);
@mharris717
mharris717 / stats.md
Last active January 28, 2016 15:35
Card Crawl Stats

Stats

@mharris717
mharris717 / body.md
Last active January 6, 2016 16:14
Simultaneous Kelly - Sims
@thickSLICING @PlusEVAnalytics 1/2 kelly, sim bets with win% = vig free odds, 
get end roll in 5th ptile, use that for simul kelly. thoughts?

ME TALK GOODER

  • I have projections for the fights on a UFC card.
  • I want to make bets on the fights where I have an edge, and I want to make them all at once before any fights start.
  • Using half kelly.
@mharris717
mharris717 / current.csv
Last active February 2, 2016 04:33
abc
name1 name2 pred1 pred2 pinny1 pinny2
Robbie Lawler Carlos Condit 0.6361 0.3639 -115 -115
Stipe Miocic Andrei Arlovski 0.4823 0.5177 -225 175
Lorenz Larkin Albert Tumenov 0.4472 0.5528 210 -270
Brian Ortega Diego Brandao 0.5817 0.4183 -200 160
Tony Sims Abel Trujillo 0.5087 0.4913 -160 130
Drew Dober Scott Holtzman 0.3578 0.6422 150 -190
Masanori Kanehara Michael McDonald 0.2823 0.7177 400 -600
Sheldon Westcott Edgar Garcia 0.3467 0.6533 -160 130
Joe Soto Michinori Tanaka 0.2914 0.7086 105 -135
@mharris717
mharris717 / ufc.rb
Created October 28, 2015 00:24
UFC
require 'open-uri'
require 'mharris_ext'
require 'nokogiri'
doc = Nokogiri::HTML(open("fightnight.html"))
def fighter_name(node)
node.text.gsub("WIN","").gsub("**","").strip
end
@mharris717
mharris717 / home_chance.rb
Last active August 29, 2015 14:25
Home Chance
# the home team's win chance for a normal team not at a neutral field
def home_chance_normal(sim_context,away_team_arg,home_team_arg)
# away team dvoa, minus 5% if it's the divisional round
away = sim_context.dvoa(away_team_arg) - home_extra_bonus.to_f
# home team dvoa, capped at 40%
home = [0.40,sim_context.dvoa(home_team_arg)].min
# min_max(-0.35..0.35) restricts the value to between -35% and 35%
# abs_exp(2) squares it and returns the absolute value
1153 Sure Gamble (Core Set)
1086 Hedge Fund (Core Set)
963 Jackson Howard (Opening Moves)
625 Corroder (Core Set)
593 Same Old Thing (Creation and Control)
586 Clone Chip (Creation and Control)
560 R&D Interface (Future Proof)
533 Diesel (Core Set)
529 Plascrete Carapace (What Lies Ahead)
526 NAPD Contract (Double Time)
@mharris717
mharris717 / players.rb
Last active August 29, 2015 14:14
players.rb
require 'nokogiri'
require 'open-uri'
def players
list_of_players = []
f = File.open("PGpage.htm")
doc = Nokogiri::HTML(f)
rows = doc.css("tr.ranking_row a text(), tr.ranking_alt_row")