Skip to content

Instantly share code, notes, and snippets.

View aking1012's full-sized avatar

Andrew King aking1012

View GitHub Profile
#The stackoverflow link is because the existing answer is no longer accurate.
import gzip
import io
import urllib3
class EDDBMultiDataFetcher():
def __init__(self):
self.files_dict = {
'Populated Systems':'https://eddb.io/archive/v5/systems_populated.jsonl',
@aking1012
aking1012 / output
Created April 1, 2017 13:46
pandas-datareader$ flake8 pandas-datareader/ | grep -v edgar
pandas-datareader/setup.py:26:1: E305 expected 2 blank lines after class or function definition, found 1
pandas-datareader/pandas_datareader/data.py:93:80: E501 line too long (83 > 79 characters)
pandas-datareader/pandas_datareader/fred.py:40:80: E501 line too long (80 > 79 characters)
pandas-datareader/pandas_datareader/oanda.py:11:80: E501 line too long (123 > 79 characters)
pandas-datareader/pandas_datareader/oanda.py:42:80: E501 line too long (138 > 79 characters)
pandas-datareader/pandas_datareader/famafrench.py:118:80: E501 line too long (94 > 79 characters)
pandas-datareader/pandas_datareader/famafrench.py:121:80: E501 line too long (84 > 79 characters)
pandas-datareader/pandas_datareader/famafrench.py:142:80: E501 line too long (83 > 79 characters)
pandas-datareader/pandas_datareader/famafrench.py:143:80: E501 line too long (90 > 79 characters)
pandas-datareader/pandas_datareader/base.py:130:80: E501 line too long (92 > 79 characters)
@aking1012
aking1012 / googleplus.js
Created March 18, 2017 19:18
Driving selenium with nightwatch.js - preliminary
/*
User stories in this set of tests
Test assumtions:
The user has logged in to all these services before, so no "getting started"
page expectations.
The user hasn't logged in to 8 gmail accounts, so no choose an existing account page.
Starts from a prompt for username.
The user needs to log in with the correct credentials
@aking1012
aking1012 / w3af-lxc
Created September 1, 2014 10:16
Got it running, and I think this is approximately what I did... Starting clean to test it.
echo 'Ensure you have uids, guids, veth, vbr in your ~/.local/share/lxc/w3af-unpriv/config for lxc'
echo 'That could be automated, but I will just assume if you are using unpriv containers this'
echo 'is not the only one, and I do not want to walk on your config...'
#using i386 for a smaller memory footprint
lxc-create -t download -n w3af-unpriv -f ~/.config/lxc/w3af-unpriv.config -- -d ubuntu -r trusty -a i386
#Modify configuration file - here's an example:
'''
# Template used to create this container: /usr/share/lxc/templates/lxc-download
@aking1012
aking1012 / gist:6ea2ab332a5785c26253
Created July 26, 2014 19:51
Simple mime-types dict generated from Magdir
'''
Generate fileMimes as:
cd libmagic/magic/Magicdir
grep -R mime . > fileMimes
Then run this script to generate file_types.py
It's a simple dictionary of all mime-types and what Magicdir file
detects them.
'''