Skip to content

Instantly share code, notes, and snippets.

Christopher Porter canadianveggie

Block or report user

Report or block canadianveggie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hs_legendary.py
import random
n_runs = 100000
stars_needed_from_25_to_legendary = 10+15+20+25+25
stars_above_which_no_bonus_is_awarded = stars_needed_from_25_to_legendary-25
max_games = 20000
def stars_to_rank(stars):
ranks_gained = 0
@canadianveggie
canadianveggie / airplane_seats.py
Last active Feb 21, 2016
Monte Carlo simulation of FiveThirtyEight's Riddler problem for February 19, 2016
View airplane_seats.py
# http://fivethirtyeight.com/features/will-someone-be-sitting-in-your-seat-on-the-plane/
import random
from collections import defaultdict
n_seats = 100
results_correct_seats=defaultdict(int)
results_by_boarding_order=defaultdict(int)
iterations = 1000000
You can’t perform that action at this time.