Skip to content

Instantly share code, notes, and snippets.

View john-science's full-sized avatar

John Stilley john-science

View GitHub Profile
@john-science
john-science / monty_hall.py
Created April 3, 2024 23:05
Let's solve the Monty Hall problem using Monte Carlo!
"""
Modeling the Monty Hall Problem
https://en.wikipedia.org/wiki/Monty_Hall_problem
Suppose you're on a game show, and you're
given the choice of three doors: Behind one
door is a car; behind the others, goats. You
pick a door, say No. 1, and the host, who
knows what's behind the doors, opens another
@john-science
john-science / chess_games.md
Last active May 1, 2023 22:03
Interesting Chess Games

Just various chess games I found interesting. Ideally, I find a PGN and paste it into the lichess analysis board.

YEAR_MM_DD Light Player Dark Player Result Link Thoughts
1834 McDonnell De La Bourdonnais 0-1 W YT An amazing push of three pawns all the way to the 8th rank.
1847 Paul Morphy Alonzo Morphy 1-0 YT L An 8-year-old Paul Morphy beats his father in a very solid game.
1850-05 Paul Morphy Johann Lowenthal 1-0 YT Morphy, 13, wins his first game against a master.
1850-05 Paul Morphy Johann Lowenthal 1-0
@john-science
john-science / where_to_buy_coins.md
Last active July 1, 2021 02:18
Trustworthy Coin Websites

Trustworthy Websites to Buy Coins

  • US Mint - Only modern US coins and proofs and such. But absolutely trustworthy.
  • VCoins - meta seller. Lots of old coins, lots of price ranges.
  • ma-shops - auction site, but "certified sellers"
  • Great Collections - Small, but all certified from trusted sellers
  • APMEX - good for silver Peace and Morgans
  • USA Coin Book - great for US coins
  • NumisBids - coin auction site. Lots of variety. Hard do search. Good for filling in a hole in a set (you can set an alert).
  • Heritage Auctions
@john-science
john-science / nuclear_systems_notes.md
Last active May 5, 2021 01:25
Notes on "Nuclear Systems" by Todreas and Kazimi

Notes on "Nuclear Systems"

These are just my notes on the textbook "Nuclear Systems" Volume 1, by Todreas and Kazimi. The textbook seems to be a classic on "Thermal Hydraulic Fundamentals" of nuclear power reactors.

Chapter 1: Principal Characteristic of Power Reactors

This chapter attempts to give a friendly, high-level comparison of the different kinds of nuclear power reactors out there. It gives some reference as to their similarities and differences, and general performance and safety characteristics.

Neutron Energy Range Energy Range Name
@john-science
john-science / physics.md
Last active May 14, 2021 14:24
Step Right Up! Who wants to learn Physics?
@john-science
john-science / nuclear_engineering_reading.md
Last active June 1, 2021 11:01
A Reading List for Nuclear Engineering

A Nuclear Engineering Reading List

Good Places to Start

The MIT Nuclear Engineering Ciriculum

@john-science
john-science / latency.txt
Created January 13, 2021 16:11 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@john-science
john-science / vode_cython.md
Created January 13, 2021 12:18
Trying to Convert SciPy.integrate.ode.vode to Cython

Convert SciPy.integrate.ode.vode to Cython

This is a research task. The SciPy Vode ODE solver is 1600 lines of Fortran with 250 goto statements, so a direct translation is actually quite tedious. It would be much easier without the goto statements, or if the code was in C, C++, etcetera.

Links Roundup

@john-science
john-science / chess_training.md
Last active December 7, 2023 09:11
Training for Chess

Chess Training

My current goals:

  1. Go through my checklist before EVERY move.
  2. Stop playing hope chess: if you can find a single weakness in an idea, abandon it and find a new idea.

The Checklist