Skip to content

Instantly share code, notes, and snippets.

View snapo's full-sized avatar

snapo

View GitHub Profile

CadQuery Shape primitives


3d shapes

Box

Workplane.box

result = cq.Workplane("XY" ).box(3, 3, 3)

07

@snapo
snapo / capture.py
Created January 23, 2020 11:57 — forked from jefftriplett/capture.py
Using Python 3, selenium, and headless chrome ala chromedriver to capture website screenshots
"""
To install:
# python requirements
$ pip install click selenium
# for headless chrome
$ brew install chromedriver
To use:
$ python capture.py https://revsys.com revsys.png
@snapo
snapo / btc_max_dd.py
Created January 22, 2020 13:25 — forked from mostlyinteresting/btc_max_dd.py
Rolling n Year Max DD for BTC
import os
import pandas as pd
import datetime as dt
import seaborn as sns
import matplotlib.pyplot as plt
import ccxt
from dateutil import relativedelta
import numpy as np
sns.set(style = 'ticks', context = 'talk')
@snapo
snapo / btc_gold_correlation.py
Created January 22, 2020 13:25 — forked from mostlyinteresting/btc_gold_correlation.py
Rolling 30 day correlation of BTC with gold
import os
import pandas as pd
import datetime as dt
import seaborn as sns
import matplotlib.pyplot as plt
import ccxt
sns.set(style = 'ticks', context = 'talk')
plt.style.use("dark_background")
@snapo
snapo / curve_example.py
Last active January 22, 2020 12:58 — forked from nlitsme/curve_example.py
example of bitcoin curve calculations in python
"""
Example of how calculations on the secp256k1 curve work.
secp256k1 is the name of the elliptic curve used by bitcoin
see http://bitcoin.stackexchange.com/questions/25382
"""
p = 2**256 - 2**32 - 977

Intermediate Python for Finance Training

This is the Gist for Day 1 of the Intermediate Python for Finance Training in London, 28. November 2017

Agenda

Module 1 — Python

Executive Program in Algorithmic Trading (QuantInsti)

Python Sessions by Dr. Yves J. Hilpisch | The Python Quants GmbH

Online, 27. & 28. January 2018

FXCM Webinar

Algo Trading: REST API & Python Wrapper

Tick Data, Historical Data, Real-Time Data, Backtesting, Orders

Dr. Yves J. Hilpisch | The Python Quants GmbH

Online, 04. April 2018

Intermediate Python for Finance Training

This is the Gist for Day 2 of the Intermediate Python for Finance Training in London, 29. November 2017

Agenda

Module 3 — pandas

@snapo
snapo / Example_App.exe.manifest
Created March 21, 2018 10:18 — forked from leeramsay/PSADT-Cheatsheet.ps1
PSADT snippits/cheatsheet
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="Example_App.exe"
type="win32"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>