I hereby claim:
- I am foresmac on github.
- I am foresmac (https://keybase.io/foresmac) on keybase.
- I have a public key whose fingerprint is 1A8A 378F 3DC9 20D1 4A1C 726B 8D4A B9B4 5F15 B873
To claim this, I am signing this object:
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
| } | |
| PS1="\[\e[32m\]\$(parse_git_branch)\[\e[34m\]\h:\W \$ \[\e[m\]" | |
| export PS1 |
| # This theme attempts to map Solarized Dark colors to bpython similar to | |
| # SublimeText 2. Requires Solarized Dark.ML.settings for Terminal.app. | |
| # Copy to ~/.bpython/solarized.theme and | |
| # set "color_scheme = solarized" in ~/bpython/config | |
| [syntax] | |
| keyword = g | |
| name = d | |
| comment = G |
| #! /usr/bin/python | |
| ## get_instagram_tag | |
| ## by Chris Foresman | |
| ## @foresmac | |
| ## | |
| ## Instagram API: http://instagram.com/developer/ | |
| ## Requires the requests Python library | |
| ## (sudo) pip install requests |
I hereby claim:
To claim this, I am signing this object:
| class MockObject(object): | |
| '''Just pass a dict to create test attributes''' | |
| def __init__(self, params): | |
| for key, value in params.items(): | |
| setattr(self, key, value) |
| """ | |
| Pseudo-random django secret key generator. | |
| - Does print SECRET key to terminal which can be seen as unsafe. | |
| """ | |
| import string | |
| import random | |
| # Just use letters and digits to simplfy setting values from user_data.txt | |
| chars = ''.join([string.ascii_letters, string.digits]) |
| UUID_REGEX = r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' |
| import random | |
| number_list = [i + 1 for i in range(100)] | |
| pick = random.choice(number_list) | |
| print 'I am thinking of a number from 1 to 100' | |
| turn = 1 | |
| while turn < 6: | |
| guess = raw_input('Type your guess: ') |
| import json | |
| import urllib.request | |
| hashtag = '' # Choose any hashtag | |
| ACCESS_TOKEN = '' # Get a token from https://instagram.com/developer | |
| start_url_string = 'https://api.instagram.com/v1/tags/{0}/media/recent?access_token={1}' | |
| start_url = start_url_string.format(hashtag, ACCESS_TOKEN) | |
| response = urllib.request.urlopen(start_url) | |
| raw_data = response.read() |
| from sense_hat import SenseHat | |
| import random | |
| import time | |
| hat = SenseHat() | |
| o = (200, 128, 0) | |
| r = (255, 0, 0) | |
| y = (255, 255, 0) |