View basic_pokmon_card_crawler.py
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
import os | |
import requests # pip install requests | |
# Getting a POKEMONTCG_IO_API_KEY is optional. | |
# Read more about the API's use of keys here: https://docs.pokemontcg.io/getting-started/authentication | |
# https://able.bio/rhett/how-to-set-and-get-environment-variables-in-python--274rgt5 | |
POKEMONTCG_IO_API_KEY = os.environ.get('POKEMONTCG_IO_API_KEY') | |
POKEMONIO_API_URL = 'https://api.pokemontcg.io' |
View mock.py
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 python3 | |
import argparse | |
import sys | |
def digest(infile): | |
for line in infile.readlines(): | |
mock(line) |
View simple_tcgplayer.py
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
import os | |
import requests # pip install requests | |
TCGPLAYER_API_URL = 'https://api.tcgplayer.com' | |
TCGPLAYER_API_VERSION = 'v1.39.0' | |
# https://able.bio/rhett/how-to-set-and-get-environment-variables-in-python--274rgt5 | |
TCGPLAYER_PUBLIC_KEY = os.environ.get('TCGPLAYER_PUBLIC_KEY') | |
TCGPLAYER_PRIVATE_KEY = os.environ.get('TCGPLAYER_PRIVATE_KEY') |
View timeboat.py
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
import datetime | |
import pytest | |
from freezegun import freeze_time | |
@pytest.fixture() | |
def timeboat(): | |
"""Grab the helm of the timeboat, we're going on an adventure! | |
Allows the test writer to freeze time so that time.time() returns a controlled value | |
https://stackoverflow.com/a/28073449/4717806""" |
View rainbow.sh
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
PERIOD=300 | |
AMPLITUDE=6000 | |
O1=$((PERIOD/3)) | |
O2=$((O1*2)) | |
UUID=$(osascript -e "tell application \"iTerm2\" | |
get current session of current window | |
end tell" | cut -d' ' -f3 -f6 -f10) | |
set-background() { |
View mock.py
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 python3 | |
import argparse | |
import sys | |
def digest(infile): | |
for line in infile.readlines(): | |
mock(line) |
View gist:e90bde75fcf29bda97a925db0e23eb19
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 python3 | |
import argparse | |
import sys | |
def digest(infile): | |
for line in infile.readlines(): | |
makeRegionalChars(line) |
View something_fishy.py
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 python | |
import random | |
import argparse | |
fish = [ | |
'Angle', | |
'Bait', | |
'Bob', |
View reg.py
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 python3 | |
import argparse | |
import sys | |
def digest(infile): | |
for line in infile.readlines(): | |
makeRegionalChars(line) |
View Wait... isn't tree wrap called bark?
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
function wrap_tree() | |
{ | |
if [[ -f /tmp/tree ]]; then | |
$(which tree) $* | |
else | |
touch /tmp/tree | |
cat <<EOF | |
* * | |
* * * |
NewerOlder