Skip to content

Instantly share code, notes, and snippets.

View MaxGhenis's full-sized avatar

Max Ghenis MaxGhenis

View GitHub Profile
@MaxGhenis
MaxGhenis / brier_score_plot.R
Created December 21, 2013 00:31
analyze stuff blog post on visualizing binary prediction accuracy
mydata <- read.csv("http://www.ats.ucla.edu/stat/data/binary.csv")
x <- 1 + 1
data.frame(x)
@MaxGhenis
MaxGhenis / white_elephant.R
Created December 23, 2013 04:01
White Elephant
# White elephant gift exchange
#
# Rules:
# 1) N players each bring one gift
# 2) Each round, a player
# 3) Gifts can not be stolen more than three times each
@MaxGhenis
MaxGhenis / gist:2a9959a351d00b8bb31895c3eaca0afd
Created April 15, 2018 23:32
jupyter_nbextensions_configurator installation
(xenial)mghenis@localhost:~$ conda install -c conda-forge jupyter_nbextensions_configurator
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.4.10
latest version: 4.5.1
Please update conda by running
@MaxGhenis
MaxGhenis / gist:b5dbe934b4aa3c1534c8d1c0c3ca1b28
Created July 31, 2018 19:22
sudo find / -name "libtinfo.so*" -ls
24256543 0 lrwxrwxrwx 1 root root 17 Jul 18 17:43 /lib64/libtinfo.so.6 -> libncurses.so.5.7
29363777 0 lrwxrwxrwx 1 maxghenis maxghenis 15 Jul 18 11:10 /home/maxghenis/miniconda3/pkgs/ncurses-5.9-10/lib/libtinfo.so -> libtinfo.so.5.9
29363778 0 lrwxrwxrwx 1 maxghenis maxghenis 15 Jul 18 11:10 /home/maxghenis/miniconda3/pkgs/ncurses-5.9-10/lib/libtinfo.so.5 -> libtinfo.so.5.9
29363780 244 -rwxrwxr-x 1 maxghenis maxghenis 249585 Nov 30 2016 /home/maxghenis/miniconda3/pkgs/ncurses-5.9-10/lib/libtinfo.so.5.9
25314662 0 lrwxrwxrwx 1 maxghenis maxghenis 16 May 9 05:10 /home/maxghenis/miniconda3/pkgs/ncurses-6.1-hf484d3e_0/lib/libtinfo.so -> libtinfow.so.6.1
27133047 0 lrwxrwxrwx 1 maxghenis maxghenis 16 Jul 18 12:39 /home/maxghenis/miniconda3/envs/tidycensus/lib/libtinfo.so -> libtinfow.so.6.1
25314739 0 lrwxrwxrwx 1 maxghenis maxghenis 16 Jul 17 17:05 /home/maxghenis/miniconda3/lib/libtinfo.so -> libtinfow.so.6.1
@MaxGhenis
MaxGhenis / gist:fe60699c66069a4b90faf6ddde6745af
Created July 31, 2018 19:27
sudo find / -name "emacs" -ls
24262156 0 lrwxrwxrwx 1 root root 23 Jul 31 12:25 /usr/bin/emacs -> /etc/alternatives/emacs
25046783 4 drwxrwsr-x 4 root staff 4096 Jul 31 12:25 /usr/local/share/emacs
24386666 4 drwxr-xr-x 3 root root 4096 Jul 31 12:25 /usr/lib/emacs
24387326 4 drwxr-xr-x 2 root root 4096 Jul 31 12:25 /usr/share/doc/emacs
25166082 4 drwxr-xr-x 5 root root 4096 Jul 31 12:25 /usr/share/emacs
27660443 4 drwxrwxr-x 3 maxghenis maxghenis 4096 Jul 18 17:52 /home/maxghenis/miniconda3/pkgs/libidn11-1.33-0/share/emacs
27530630 0 lrwxrwxrwx 1 maxghenis maxghenis 10 Jul 18 17:52 /home/maxghenis/miniconda3/pkgs/emacs-26.1-h3a2ea38_1/bin/emacs -> emacs-26.1
27403278 4 drwxrwxr-x 3 maxghenis maxghenis 4096 Jul 18 17:52 /home/maxghenis/miniconda3/pkgs/emacs-26.1-h3a2ea38_1/libexec/emacs
26609466 4 drwxrwxr-x 4 maxghenis maxghenis 4096 Jul 18 17:52 /home/maxghenis/miniconda3/pkgs/emacs-26.1-h
@MaxGhenis
MaxGhenis / gist:cee3f0b1fdba0ddd7aacc160a785ce08
Created August 1, 2018 03:46
R Jupyter notebook kernel dies
(xenial)maxghenis@localhost:~$ jupyter notebook
[I 20:45:31.645 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0
[I 20:45:31.646 NotebookApp] Serving notebooks from local directory: /home/maxghenis
[I 20:45:31.646 NotebookApp] The Jupyter Notebook is running at:
[I 20:45:31.646 NotebookApp] http://localhost:8888/?token=6402cdfdfbb0b3d422780a31b07bba61b7221d3879735ece
[I 20:45:31.646 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:45:31.647 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
@MaxGhenis
MaxGhenis / gist:d7846976254f2e1b63dda9769ac36606
Created August 1, 2018 03:59
Get tmux running after uninstalling conda version and installing apt-get version
(xenial)maxghenis@localhost:~$ which tmux
/usr/bin/tmux
(xenial)maxghenis@localhost:~$ /usr/bin/tmux # This works to open tmux.
[exited]
(xenial)maxghenis@localhost:~$ tmux
-su: /home/maxghenis/miniconda3/bin/tmux: No such file or directory
(xenial)maxghenis@localhost:~$ echo $PATH
/home/maxghenis/bin:/home/maxghenis/.local/bin:/home/maxghenis/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
(xenial)maxghenis@localhost:~$ PATH=/usr/bin:$PATH
(xenial)maxghenis@localhost:~$ tmux # This now works.
@MaxGhenis
MaxGhenis / gist:b32a42812d7de9e6942873d981745db1
Created August 3, 2018 19:37
Default conda environment 2018-08-03
name: root
channels:
- ospc
- gerrymandr
- anaconda
- conda-forge
- r
- defaults
dependencies:
- font-ttf-dejavu-sans-mono=2.37=h6964260_0
@MaxGhenis
MaxGhenis / gist:2a4e600da6085ee8ae9af999087a95bd
Created October 2, 2018 21:12
install_github debugging (conda info, conda list, etc.)
# https://github.com/conda-forge/r-devtools-feedstock/issues/4#issuecomment-426390936
(xenial)maxghenis@localhost:~$ conda info
active environment : None
user config file : /home/maxghenis/.condarc
populated config files :
conda version : 4.5.11
conda-build version : not installed
python version : 3.6.6.final.0
base environment : /home/maxghenis/miniconda3 (writable)