Skip to content

Instantly share code, notes, and snippets.

View chicago-joe's full-sized avatar

Joseph Loss chicago-joe

View GitHub Profile
@chicago-joe
chicago-joe / System Design.md
Created April 24, 2024 17:22 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@chicago-joe
chicago-joe / nested_for_loop.py
Last active June 30, 2021 16:19
nested for loop - map of maps exercise
strategies = ['strategy_1', 'strategy_2', 'strategy_3', 'strategy_4']
aggregation_types =
[
['account', 'ticker'],
['account', 'strategy', 'ticker'],
['account', 'strategy', 'strategyLevel', 'ticker']
]
@chicago-joe
chicago-joe / docker-compose.yml
Created April 29, 2021 17:18
prefect docker agent & client initial setup
version: "3.7"
services:
agent:
build: .
command: bash -c "prefect agent local start -t %AGENT-SERVICE-TOKEN% --label pwcm"
volumes:
- /srv/docker/prefect/flows:/root/.prefect/flows
- type: bind

Firework Overlay Demo

This is a fork of my firework simulator that shows how it could be used as an overlay above custom content. Keep in mind I built this as a standalone project, not as a plugin/library. There are a bunch of issues you may possibly run into using this code.

Some features from the full version have been disabled, including sound effects and the menu system. Getting these to work well on a custom site involves even more work.

If you like this and use it yourself, I would appreciate if you credit me (Caleb Miller) at cmiller.tech.

A Pen by Caleb Miller on CodePen.

@chicago-joe
chicago-joe / lutzy.py
Created March 17, 2020 14:34
searching through strings using pandas dataframes
import pandas as pd
df = pd.DataFrame(
{
'ticker':
[
'AAPL',
'SPY',
'A',
C:\Users\jloss\venv\ITCH50parser\Scripts\python.exe C:\Users\jloss\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\193.5233.109\plugins\python\helpers\pydev\pydevconsole.py --mode=client --port=1700
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\src', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\data', 'C:/Users/jloss/PyCharmProjects/NASDAQ-ITCH-5.0-VWAP-PARSER'])
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.9.0 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 7.9.0
This file has been truncated, but you can view the full file.
C:\Users\jloss\venv\ITCH50parser\Scripts\python.exe C:\Users\jloss\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\192.7142.56\helpers\pydev\pydevconsole.py --mode=client --port=11042
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\src', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\data', 'C:/Users/jloss/PyCharmProjects/NASDAQ-ITCH-5.0-VWAP-PARSER'])
PyDev console: starting.
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
>>> ###########################################################################
... # Parsing NASDAQ ITCH-5.0 Trade Data
C:\Users\jloss\venv\ITCH50parser\Scripts\python.exe C:\Users\jloss\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\192.7142.56\helpers\pydev\pydevconsole.py --mode=client --port=10634
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\src', 'C:\\Users\\jloss\\PyCharmProjects\\NASDAQ-ITCH-5.0-VWAP-PARSER\\data', 'C:/Users/jloss/PyCharmProjects/NASDAQ-ITCH-5.0-VWAP-PARSER'])
PyDev console: starting.
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
>>> #!/usr/bin/env python
... # coding: utf-8
This file has been truncated, but you can view the full file.
C:\Users\jloss\venv\hulltradingenv\Scripts\python.exe C:\Users\jloss\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\192.6817.19\helpers\pydev\pydevconsole.py --mode=client --port=52049
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\data', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\data\\2015', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\data\\2016', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\data\\2017', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\week 1', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\week 2', 'C:\\Users\\jloss\\PyCharmProjects\\SMA-HullTrading-Practicum\\Source Code\\week 3', 'C:
C:\Users\jloss\venv\ccxtenv\Scripts\python.exe C:/Users/jloss/PyCharmProjects/cryptotrader/main.py
-------------------------------------------------------------------------
CRYPTOCURRENCY TRADING ALGORITHM: INITALIZE
EXCHANGE ID: bitFlyer
STATUS: {'status': 'ok', 'updated': None, 'eta': None, 'url': None}
DEFAULT RATE LIMIT: 1000