Skip to content

Instantly share code, notes, and snippets.

View atkinson's full-sized avatar

Rich Atkinson atkinson

View GitHub Profile
@atkinson
atkinson / gist:9948586
Created April 3, 2014 05:09
pgmagick install on Ununtu
sudo apt-get install libgraphicsmagick++1-dev libboost-python-dev
pip install pgmagick -U
@atkinson
atkinson / read_zorro_history.py
Last active August 6, 2025 09:51
Sample code to read Zorro t1, t6, t8 files using Python
from ctypes import *
import os
import json
"""
The following c structure came from the Zorro manual.
See here for the structure of other files: https://manual.zorro-project.com/history.htm
"""
ZORRO_T6_FILE_TO_READ = os.path.join('.', 'AUDJPY_2009.t6')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1. Ask HN: What books changed the way you think about almost everything? - https://news.ycombinator.com/item?id=19087418
2. Ask HN: What are the best MOOCs you've taken? - https://news.ycombinator.com/item?id=16745042
3. Ask HN: How to self-learn electronics? - https://news.ycombinator.com/item?id=16775744
4. Ask HN: Successful one-person online businesses? - https://news.ycombinator.com/item?id=21332072
5. Ask HN: What's the most valuable thing you can learn in an hour? - https://news.ycombinator.com/item?id=21581361
@atkinson
atkinson / client_credentials.py
Created October 24, 2023 22:15
Client Credentials OAUTH for Spotify
import os
import requests
### This flow does not include user authorization,
### so only endpoints that do not request user information
### (e.g. user profile data) can be accessed.
### https://developer.spotify.com/documentation/web-api/concepts/authorization
SPOTIFY_CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID")
SPOTIFY_CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET")