I hereby claim:
- I am xtream1101 on github.
- I am xtream1101 (https://keybase.io/xtream1101) on keybase.
- I have a public key whose fingerprint is 061A BAAC 9D1B E6EB 89F5 26AF 1498 1397 2F25 7A6D
To claim this, I am signing this object:
import re | |
from pprint import pprint | |
""" | |
TODO: | |
Support PORT numbers in the url | |
Support IP's as domains. If IP, it cannot have a subdomain or a tld | |
""" | |
""" |
import sys | |
import csv | |
from pprint import pprint | |
row_list = [] | |
with open(sys.argv[1], 'r', encoding='ISO-8859-1') as f: | |
reader = csv.DictReader(f) | |
for row in reader: | |
# Make all keys lower case since we do not know the case used | |
row = dict((k.lower(), v) for k, v in row.items()) |
# Add this to your .bashrc or .bash_profile file to use | |
# | |
# This gives you access to create and switch between different python envs | |
# To create a venv called 'foo' just type: | |
# `pyve foo` | |
# This will create a python 3 venv and activate it as well | |
# If you are in a different venv and want to switch to foo, enter the same thing | |
pyve(){ | |
env_name=$1 | |
activate_file=~/Virtualenvs/py3/$env_name/bin/activate |
I hereby claim:
To claim this, I am signing this object:
# I know dict's have `.get()`, this example was made to break if the key is not | |
# there to show the use of multiple try/except's | |
# Yes I know that having the except and else on 1 line each does not fit with PEP8 standards. | |
# But when you have many of them it helps reduce the size of the file and is no harder to read | |
data = {'some_key': 'key value'} | |
key_data = None | |
for _ in range(1): | |
try: | |
key_data = data['someKey'] |
// ==UserScript== | |
// @name Periscope Auto refresh all | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Refresh all table on an interval | |
// @author xtream1101 | |
// @match https://www.periscopedata.com/app/* | |
// @grant none | |
// @downloadURL https://gist.githubusercontent.com/xtream1101/211332c4cb2062a77010f623796a6431/raw/periscope_auto_refresh.js | |
// @updateURL https://gist.githubusercontent.com/xtream1101/211332c4cb2062a77010f623796a6431/raw/periscope_auto_refresh.js |
# Put this code in your .bashrc or .bash_profile | |
# Get Virtual Env | |
Color_Off="\033[0m" # Text Reset | |
Purple="\033[0;35m" # Purple | |
virtualenv_prompt() { | |
if [[ $VIRTUAL_ENV != "" ]]; then | |
venv=${VIRTUAL_ENV##*/} | |
# Strip out the path and just leave the env name |
#1 | |
DROP FUNCTION qa_fields(character varying,character varying); | |
CREATE OR REPLACE FUNCTION qa_fields(schema_name VARCHAR, tbl_name VARCHAR) | |
-- The table def needs to be known before the function runs, but the number of fields returned is dynamic :( | |
-- Also need to correct names for the fields, the types will alwyas be FLOAT | |
RETURNS TABLE(a FLOAT, b FLOAT, c FLOAT, d FLOAT, e FLOAT, f FLOAT, g FLOAT, h FLOAT, i FLOAT, j FLOAT, k FLOAT, l FLOAT, m FLOAT, n FLOAT, o FLOAT, p FLOAT, q FLOAT, r FLOAT, s FLOAT, t FLOAT, u FLOAT, v FLOAT, w FLOAT, x FLOAT, ts DATE) AS | |
$func$ | |
DECLARE field_name VARCHAR; |
git status -s | cut -c4- | xargs -L1 sublime |