Skip to content

Instantly share code, notes, and snippets.

View christopherphan's full-sized avatar

Christopher Phan christopherphan

View GitHub Profile
@christopherphan
christopherphan / graphpaper.tex
Created October 14, 2016 15:18
TikZ graph paper
\documentclass[letterpaper]{article}
\usepackage[top=1cm , bottom=1cm, left=1cm, right=1cm]{geometry}
\usepackage{tikz}
\newcommand{\graphpaper}{\thispagestyle{empty}
\noindent \begin{tikzpicture}
\draw[gray] (0, 0) grid[step=0.5] (20, 25);
\end{tikzpicture}
\eject}
@christopherphan
christopherphan / proportion_test_simulation_study.ipynb
Created September 26, 2017 15:41
Interactive Python notebook for proportion test simulation study
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%% 10PRINT.tex
%% Copyright 2018 Christopher L. Phan, Ph.D.
%% cphan@chrisphan.com
%%
%% Creates a random maze, inspired by
%% 10 PRINT CHR$(205.5+RND(1)); : GOTO 10,
%% by Nick Montfort, et. al., (MIT Press, 2013)
%%
%% See also:
%% https://blog.chrisphan.com/2018/05/28/10-print-in-tikz/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherphan
christopherphan / isoweekdate.py
Created July 18, 2018 15:37
Prints the current date in ISO week date format
#!/usr/bin/env python3
# isoweekdate.py
# Prints the current date in ISO week date format
#
# (C) 2018 Christopher L. Phan, Ph.D., cphan@chrisphan.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@christopherphan
christopherphan / ISD_861_school_board_districts_map.ipynb
Last active July 24, 2018 20:52
Create a map of the districts of members of the ISD 861 (Winona Area Public Schools) school board from MN Geospatial Commons shapefiles
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am christopherphan on github.
  • I am christopherphan (https://keybase.io/christopherphan) on keybase.
  • I have a public key ASBX9sPz1e1QSSvW93F6712vQ6wi1GJ5JSjmf3htX-RfSAo

To claim this, I am signing this object:

#!/usr/bin/env python3
# leg_sizes.py
# Christopher Phan
# cphan@chrisphan.com
# https://chrisphan.com/
#
# Takes data from the Wikipedia article "List of legislatures by number of
# members", and peforms a linear regression on n = kP^alpha
# where n is the number of members of the lower house of a nation's legislature
@christopherphan
christopherphan / Senate_representation_by_party.md
Last active March 18, 2021 04:25
A breakdown of how many people are represented by each party in the U.S. Senate

Population represented in the U.S. Senate by party

As of March 2021, there are 100 U.S. Senators (as there has been since the admission of Hawaii in 1959), 50 of whom are Democrats (or independents who caucus with the Democrats), and 50 of whom are Republicans. (Democratic Vice-president Kamala Harris can cast a tie-breaking vote, which gives control of the chamber to the Democrats.) However, the states represented by Democrats are altogether larger in population than those represented by Republicans. This graphic illustrates how.

Population figures are from 2019.

Copyright and license info