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 / governments_on_github.md
Last active April 26, 2016 20:22
Is GitHub right for your government agency?

Government on GitHub

What is GitHub? Is GitHub right for your government agency?

What is Git?

Git is a command-line tool that helps people who write software in several key ways:

  1. Git is a place to store all your code.
  2. Git tracks all your changes.
@john-science
john-science / deep_learning_on_aws.md
Last active October 4, 2018 20:04
CUDA-based Deep Learning on an AWS EC2

CUDA-based Deep Learning on an AWS EC2

If you're intersted in software you've probably heard about deep learning and even done some reading or played around with it. But unless you have a desktop for high-end gaming you've probably found that running all these new CUDA-based parallel-GPU computing tools is just painfully slow.

That's what happened to me. So, it's time to spin up an EC2 on AWS and use someone else's hardware. This is just a basic introduction into how I did that, from creating an AWS dev account to installing some fun Python deep learning projects on GitHub. If you follow along, you'll be in a good position to install whatever other tools you want (Caffe, for instance) and get deep.

Set up AWS Account

If you haven't already, you need to set up your Amazon AWS profile:

@john-science
john-science / gzip_files_in_python.md
Last active May 27, 2021 16:47
Reading & Writing GZIP Files Faster in Python

Reading & Writing GZIP Files in Python

I have been testing various ways to read and write text files with GZIP in Python. There were a lot of uninteresting results, but there were two I thought were worth sharing.

Writing GZIP files

If you have a big list of strings to write to a file, you might be tempted to do:

f = gzip.open(out_path, 'wb')

for line in lines:

@john-science
john-science / happiness.md
Last active April 26, 2016 22:31
What makes a person happy?

What makes a person happy?

I'm mortal and want to enjoy the little time I have in existence. A young waitress once asked the Dalai Lama what the meaning of life is, and he replied "happiness". I'm not sure how she felt about that answer, but it feels right to me. Though it turns out he wasn't advocating complete hedonism (see Existentialism vs Nihilism).

I want to spend a little time once in a while cultivating a collection of discusssions on what makes people happy.

Do I think I will find the answer? No.

I just think it is worth a little time every now-and-again considering my own happiness, fullfillment, or peace-of-mind.

@john-science
john-science / vimrc
Last active October 22, 2021 00:54
Customizing your VI/VIM experience.
" NERDTree for file viewing:
" https://github.com/preservim/nerdtree
" Taglist for Python-awareness
" https://github.com/yegappan/taglist
" https://sourceforge.net/projects/vim-taglist/
" apt-get install ctags
set linebreak
set textwidth=200
set showmatch
set hlsearch
@john-science
john-science / reading_list_software.md
Last active November 8, 2016 22:53
Topics of interest. Things I've been readnig lately. Software.

Software Reading List

This is just a place for me to keep links that I've found interesting on various topics I've been interested in lately.

Blogs

  • MEWO2 - Machine Learning, Twitter Bots, & Game Dev
  • Climate Change - Only a little software talk, but looks interesting.

A BS in CS

Poker, the Ultimate Data Science Test

If you could solve poker with data science, you could make a lot of money any time you want.

Modeling a Deal

If we want to model poker, the first step is to model a single deal of the cards. Now, casinos might deal from more than one deck. But let's start by modeling a single deal from a single 52-card deck:

def sample (n, m):

s = []

@john-science
john-science / machine_learning.md
Last active June 14, 2018 16:11
Where to start?
@john-science
john-science / portrait_artists.md
Created March 1, 2017 16:18
Facial Recognition takes up so much of our minds.
@john-science
john-science / why_text_based_games_rock.py
Last active April 5, 2017 15:58
Why Text-Based Games Rock
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.style.use('ggplot')
def main():
# make plot objects
#fig, ax = plt.subplots(figsize=(8, 9), facecolor='white') # 800px-wide version