This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script started on Mon 05 Dec 2016 02:54:46 PM PST | |
[sfitzpa1@hills pair]$ ls | |
example.script users_client.py users_service.py | |
[sfitzpa1@hills pair]$ echo "Run server in background by appending & to command" && ./users_service.py & | |
[1] 7158 | |
[sfitzpa1@hills pair]$ Run server in background by appending & to command | |
running server: | |
echo "Communicate with server using client script" && ./users_client.py fitz boyd | |
Communicate with server using client script | |
127.0.0.1 - - [05/Dec/2016 14:55:41] "GET /?strings=fitz,boyd HTTP/1.1" 200 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vcard generation utility | |
# first argument is the file to be written to. It will be appended to with each new write. | |
# ex: $./vcard card | |
printWrite() { | |
# Take printf formatted string, append newline, and write to stdout and stderr | |
printf "$1\n" | tee /dev/fd/2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// VotesTableViewController.swift | |
// Voting | |
// | |
// Created by Stephan Fitzpatrick on 12/16/16. | |
// Copyright © 2016 Stephan Fitzpatrick. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import contextmanager | |
from functools import singledispatch, partial | |
from pathlib import Path | |
import pkg_resources | |
# development config uri for base distribution | |
DEVELOPMENT_CONFIG_URI = pkg_resources. \ | |
get_distribution('distribution_package_name').get_resource_filename( |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.