Instantly share code, notes, and snippets.

View hw3_purchase.txt
reviewerID-itemID,prediction
U938994110-I529819131,1
U181459539-I863471064,0
U941668816-I684585522,0
U768449391-I782253949,0
U640450168-I232683472,1
U087574132-I014281144,1
U885457860-I600866492,0
U319023404-I050733439,0
U535965656-I929867818,1
View output_log.txt
Log uploaded on Tuesday, November 13, 2018, 6:15:36 PM
Loaded mods:
Core: (no assemblies)
Animal Tab: 0Harmony(1.2.0.1), AnimalTab(av:3.0.0.0,fv:3.4.123)
Blueprints: Blueprints(av:2.0.0.0,fv:2.2.39)
ED-Embrasures: 0Harmony(1.2.0.1), ED-Embrasures(1.0.0.0)
Expanded Prosthetics and Organ Engineering: (no assemblies)
Extended Turrets: 0Harmony(1.1.0.0), LaserBeam(1.0.0.0)
Hospitality: $HugsLibChecker(0.5.0.0)
HugsLib[ov:6.1.1]: 0Harmony(1.2.0.1), HugsLib(av:1.0.0.0,fv:6.1.1)
View hello_world.py
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
View new_option.json
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "The total number of votes each candidate got in the 2016 presidential primary.",
"width": 600,
"height": 600,
"padding": 5,
"autosize": "none",
"data": {
"values": [
{"color": "red", "Candidate": "Ben Carson", "Total Votes": 564553},
View functions.php
// Callback function to insert 'styleselect' into the $buttons array
function my_mce_buttons_2( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
// Register our callback to the appropriate filter
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' );
View Todo.js
class Todo {
constructor() {
let self = this;
this.list = document.querySelector('.list-items');
this.render();
document.querySelector('.btn-add-item').addEventListener('click', this.create.bind(this));
document.querySelector('.btn-update').addEventListener('click', this.update.bind(this));
View DNA13_percent.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:59a0324972798b6fa39b31fa010d2917
#Here we draw a 10000 sample from the poisson distributions for home and away
#teams using the lambdas calculated earlier for regulation goals scored
home_reg_goals = np.random.poisson(home_lambda, 10000)
away_reg_goals = np.random.poisson(away_lambda, 10000)
#now I looop through both results and compare them. If the home team goals are
#larger than the away then then I append a one else a zero. If they are tied
#then it goes to an OT and if needed Shootout scenario that are binomial
#distributions decided by home OT and Shootout probability determined by a
#Bradley-Terry Model
View hello_world.py
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()