Skip to content

Instantly share code, notes, and snippets.

💭
hustlin'

Stephan Fitzpatrick knowsuchagency

💭
hustlin'
  • San Francisco
Block or report user

Report or block knowsuchagency

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
@knowsuchagency
knowsuchagency / hello_lambda.py
Last active Nov 18, 2019
boto3 lambda hello world
View hello_lambda.py
import tempfile
import zipfile
from pathlib import Path
from pprint import pprint
import boto3
def hello_lambda(
role,
@knowsuchagency
knowsuchagency / bootstrap.sh
Last active Oct 21, 2019
bootstrapping a new Mac
View bootstrap.sh
#!/bin/bash
set -o verbose
set -o xtrace
echo install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$PATH="/usr/local/bin:$PATH"
@knowsuchagency
knowsuchagency / Dockerfile
Created Jul 16, 2018
Makefile Docker Git GitHub multi-stage build ssh private key recipe
View Dockerfile
FROM python:3 as build-system
RUN pip install -U pip
COPY requirements.txt requirements.txt
### create temporary image used to download and vendor packages using private key ###
FROM build-system as intermediate
# add credentials on build
@knowsuchagency
knowsuchagency / bootstrap.sh
Last active Oct 4, 2019
bootstrap debian vm on gcp with up-to-date python
View bootstrap.sh
set -x
sudo apt update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
curl https://pyenv.run | bash
@knowsuchagency
knowsuchagency / typecheck.py
Last active Sep 21, 2019
A cell magic to enable the use of mypy within jupyter notebooks
View typecheck.py
"""
Add mypy type-checking cell magic to jupyter/ipython.
Save this script to your ipython profile's startup directory.
IPython's directories can be found via `ipython locate [profile]` to find the current ipython directory and ipython profile directory, respectively.
For example, this file could exist on a path like this on mac:
/Users/yourusername/.ipython/profile_default/startup/typecheck.py
@knowsuchagency
knowsuchagency / docker-compose.yaml
Created Jan 19, 2019
shared volumes on docker-compose
View docker-compose.yaml
volumes:
shared:
driver: local
driver_opts:
type: none
o: bind
device: "${PWD}/shared"
services:
api:
build: ./packages/api
@knowsuchagency
knowsuchagency / readme.md
Last active Oct 19, 2018
TruSTAR questionnaire answers
View readme.md

Achievement

One of the things I'm most proud of is the long-term impact I had while working at the NSA -- organizationally, culturally, and pedagogically. When I arrived there and began working as an analyst, the civilian software engineers would build tools for analysts, and those active-duty analysts would use those tools to do their work. Because of cultural differences between federal civilians and military personnel and the way the engineering and analytics are treated as orthogonal to one-another organizationally, there was very little communication between the two teams.

Once I started working as part of the engineering team, I helped bridge that gap in communication between engineering and analysts. In fact, that collaboration was so successful, NSA Hawaii made it a point to create a new role within engineering specifically for a military analyst to work as a software developer and began creating a training pipeline for the role as I was leaving.

Recent book and why one should read it

*Code:

View dedupe.py
"""
deduping stuff
"""
import itertools as it
from operator import itemgetter
# using a dict
input_ = [
{'id': 1, 'data': 'hello, world'},
View email.py
#!/usr/bin/env python3
import subprocess as sp
import io
import os
def paste_emails_to_clipboard(string, report=None):
"""
search the string for emails and copy them to clipboard to be pasted into gmail
@knowsuchagency
knowsuchagency / pyproject.toml
Created Aug 5, 2018
example pyproject.toml
View pyproject.toml
[tool.poetry]
name = "blogify"
version = "0.1.0"
description = ""
authors = ["Stephan Fitzpatrick <knowsuchagency@gmail.com>"]
[tool.poetry.dependencies]
python = "*"
shell_utils = "^0.6.0"
jupyterlab = "^0.33.6"
You can’t perform that action at this time.