Skip to content

Instantly share code, notes, and snippets.

View abought's full-sized avatar

Andy Boughton abought

View GitHub Profile
@abought
abought / example.txt
Last active March 5, 2019 17:07
Generate a simple byte range index for flat text files
Trait1 Trait2 rg SE Z P-value Method
008.5 038 -0.5524 1.5359 -0.3597 0.7191 ldsc
008.5 041.4 0.5652 0.5601 1.0091 0.3129 ldsc
038 559 0.7181 2.1768 0.3299 0.7415 ldsc
038 562.1 0.5957 0.9638 0.6181 0.5365 ldsc
038 562 0.5882 0.9517 0.6181 0.5365 ldsc
@abought
abought / README.md
Last active March 3, 2018 19:51
Otter Graphics- A Revolution in Otters

Otter Programming Language (OPL)

Turtle graphics- with otters!

How to use this

OPL has been tested with Python 3.6. Although it may work with older versions, they are not officially supported.

OPL a thin wrapper around Python's turtle graphics library, and many excellent tutorials and exercise ideas are available. (just replace all references to "turtle" with the word "otter" where appropriate).

hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgzn4WSitDlLHvWt40bdm5P/okx6XlKwcsiwAEpxMk2ZMKp3BheWxvYWTFAup7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTIwY2U3ZTE2NGEyYjQzOTRiMWVmNWFkZTM0NmRkOWI5M2ZmYTI0YzdhNWU1MmIwNzJjOGIwMDA0YTcxMzI0ZDk5MzBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwY2U3ZTE2NGEyYjQzOTRiMWVmNWFkZTM0NmRkOWI5M2ZmYTI0YzdhNWU1MmIwNzJjOGIwMDA0YTcxMzI0ZDk5MzBhIiwidWlkIjoiYzdiZDVhMjI3MDQzODJlZWI0MzczMWUyMjFlNWZkMTkiLCJ1c2VybmFtZSI6ImFib3VnaHQifSwic2VydmljZSI6eyJuYW1lIjoiZ2l0aHViIiwidXNlcm5hbWUiOiJhYm91Z2h0In0sInR5cGUiOiJ3ZWJfc2VydmljZV9iaW5kaW5nIiwidmVyc2lvbiI6MX0sImNsaWVudCI6eyJuYW1lIjoia2V5YmFzZS5pbyBnbyBjbGllbnQiLCJ2ZXJzaW9uIjoiMS4wLjE4In0sImN0aW1lIjoxNDg3NzMwODQ4LCJleHBpcmVfaW4iOjUwNDU3NjAwMCwibWVya2xlX3Jvb3QiOnsiY3RpbWUiOjE0ODc3MzA4NDEsImhhc2giOiJmYTAwZTY5MmZjMDg2YmJhYjVhM2EwYjMxMjM1ODI0NDFjMGU3MTg4NTNkYjE4ODc5MmQxNzQ0NzQ4M2VmNTkyZDI2MDNmMjhiZTM1MmJiNmFjYjI5NDY4ZmE5NGMwNzQ3MTg2ZjVlY2U2ZDc4ZDUzNjUxYTQ1ODNlNDU0YjFiNiIsInNlcW5vIjo5MTI2MDh9LCJwcmV2IjoiZWZkNzdjZmQzYWE2MzZhNjRmYjNhYThkYjBkZDE5NDgwNWVk
"""
A script to demonstrate how a particular function behaves with different inputs and outputs
"""
from website.util import api_v2_url
SCENARIOS = [
('http://localhost:8000/', ''),
('http://localhost:8000/', 'v2/'),
('https://staging.osf.io/', 'api/v2'),
('https://staging2.osf.io/', 'v2'),
@abought
abought / gist:15a1e08705b121c1b7bd
Last active January 31, 2023 15:22
Extract all email addresses in from/to/cc fields of every msg in one Gmail folder
"""Create a connection to Gmail and do something with the results
References:
http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
and
https://yuji.wordpress.com/2011/06/22/python-imaplib-imap-example-with-gmail/
"""
__author__ = 'abought'
import email