Skip to content

Instantly share code, notes, and snippets.

View nathanmargaglio's full-sized avatar

Nathan Margaglio nathanmargaglio

View GitHub Profile
@nathanmargaglio
nathanmargaglio / transformer_demo.ipynb
Created June 14, 2024 14:45
Simple Transformer Demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nathanmargaglio
nathanmargaglio / bot.py
Created June 19, 2023 19:57
Discord Bot + OpenAI + TickTick
import os
import json
import datetime
from dotenv import load_dotenv
load_dotenv()
DISCORD_BOT_TOKEN = os.getenv("DISCORD_BOT_TOKEN")
TICKTICK_CLIENT_ID = os.getenv("TICKTICK_CLIENT_ID")
TICKTICK_CLIENT_SECRET = os.getenv("TICKTICK_CLIENT_SECRET")
@nathanmargaglio
nathanmargaglio / upload_directory.py
Last active January 18, 2023 18:11
LogQS Directory Upload
#!/usr/bin/env python3
"""Upload Directory
This script relies on the LogQS Client library:
pip install --upgrade lqs-client
The lqs.utils.upload method uses threading to speed up the upload. This means
that we need to consider both the number of threads (max_workers) and the part_size

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@nathanmargaglio
nathanmargaglio / bsm_model.py
Created January 8, 2022 17:35
Black-Scholes-Merton (BSM) model
from math import log, sqrt, exp
import scipy.stats as stats
import numpy as np
# from https://www.quantconnect.com/tutorials/introduction-to-options/options-pricing-black-scholes-merton-model
class BsmModel:
def __init__(self, option_type, price, strike, interest_rate, expiry, volatility=None, target_price=None, dividend_yield=0):
self.s = price # Underlying asset price
@nathanmargaglio
nathanmargaglio / merge.py
Last active August 13, 2021 16:03 — forked from mfehr/mergebag.py
Merge ROS Bags
#!/usr/bin/env python
# From https://gist.github.com/mfehr/305c1d07f6ca6a6e70afe1f155843d17
import rosbag
import argparse
import os
import logging
logging.basicConfig()
@nathanmargaglio
nathanmargaglio / keybase.md
Created October 19, 2020 20:56
keybase.md

Keybase proof

I hereby claim:

  • I am nathanmargaglio on github.
  • I am nathanmargaglio (https://keybase.io/nathanmargaglio) on keybase.
  • I have a public key whose fingerprint is AF9F 8C1D 1DF4 B7BA 8E10 177B 3C42 9815 E65F 6573

To claim this, I am signing this object:

@nathanmargaglio
nathanmargaglio / DQN.ipynb
Created October 9, 2020 12:36
DQN Tutorial
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.