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 / 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:

@knowsuchagency
knowsuchagency / integrate logging.ipynb
Last active Mar 26, 2018
integrate logging.ipynb
View integrate logging.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View exposing.py
async def configure_graphql(app):
"""
Since our resolvers depend on the app's db connection, this
co-routine must execute after that part of the application
is configured
"""
connection = app['connection']
class Query(g.ObjectType):
View schema.py
import graphene as g
from graphql.execution.executors.asyncio import AsyncioExecutor
class Author(g.ObjectType):
"""This is a human being."""
id = g.Int(description='The primary key in the database')
first_name = g.String()
last_name = g.String()
View query
{
authors(limit: 3) {
id
first_name
last_name
age
}
}
View data.json
[
{
"age": 26,
"first_name": "Willene",
"id": 1,
"last_name": "Whitaker"
},
{
"age": 52,
"first_name": "Cedric",
View other_rest_view.py
async def authors(request):
"""Return json response of authors based on query params."""
connection = request.app['connection']
with log_request(request):
# parse values from query params
first_name = request.query.get('first_name')
last_name = request.query.get('last_name')
View rest_view.py
async def author(request):
"""Return a single author for a given id."""
connection = request.app['connection']
with log_request(request):
try:
# when using co-routines, it's important that each co-routine be non-blocking
# meaning no individual action will take a long amount of time, preventing
View stuff.json
[
{
"first_name": "Amy",
"last_name: "Jones",
"age": 34,
} ...
]
View data.json
[
{
"first_name": "Amy",
"last_name: "Jones",
"age": 34,
"books": [{...}]
} ...
]
You can’t perform that action at this time.