Skip to content

Instantly share code, notes, and snippets.

@alg0trader
alg0trader / dark_wolf_bloodline.pine
Last active February 4, 2023 03:04
Dark Blood Wolfline
//@version=4
// New Version > Xadiamant
// === /SETTINGS FOR CRYPTO ===
study(title="Dark Wolf Bloodline", overlay=true)
// === /Source ===
@alg0trader
alg0trader / alpaca_downloader.py
Created October 31, 2021 02:23
alpaca stock downloader
###############################################################################
# module: stock_downloader.py
# description: This script will download a given stock from the Alpaca
# API.
# author: Austin Schaller
###############################################################################
import pytz
import os, time
@alg0trader
alg0trader / stonks_logo.py
Last active January 16, 2021 03:59
Stonks Discord Logo
import numpy as np
import pandas as pd
import yfinance as yf
import statsmodels.api as sm
import matplotlib.pyplot as plt
from matplotlib import patheffects
from datetime import datetime
import os, logging
import alpaca_trade_api as tradeapi
import threading
import time
import datetime
API_KEY = os.getenv('ALPCA_PAPER_KEY_ID')
API_SECRET = os.getenv('ALPCA_PAPER_KEY_SECRET')
APCA_API_BASE_URL = "https://paper-api.alpaca.markets"
import os
import alpaca_trade_api as tradeapi
base_url = 'https://paper-api.alpaca.markets'
key_id = os.getenv("ALPCA_PAPER_KEY_ID")
secret_key = os.getenv("ALPCA_PAPER_KEY_SECRET")
api = tradeapi.REST(key_id, secret_key, base_url, api_version='v2')
account = api.get_account()
# bloop targets
ifneq ($(PLATFORM),bloop)
$(error "Platform should be bloop when using this file!?")
endif
# Settings
DEFAULT_TARGET = bloop_dev_ecp5
COMM_PORT ?= /dev/ttyUSB0
TARGET ?= $(DEFAULT_TARGET)
# This python script wizard creates a mitered bend for microwave applications
from __future__ import division
from pcbnew import *
import pcbnew
import math
class UWMiterFootprintWizard(pcbnew.FootprintWizardPlugin):
//
// CreatingSound1.C - "God Save The Queen" song.
//
#include <p18f1320.h>
#include <delays.h>
#include <stdlib.h>
#pragma config OSC=INTIO2, WDT=OFF, LVP=OFF, DEBUG=ON
#define PAUSE Delay1KTCYx(50);
#define WHOLE 300
"""
Animation of Fourier series square-wave.
author: Austin Schaller
email: schaller.austin@gmail.com
license: None
"""
import numpy as np
import matplotlib.pyplot as plt
@alg0trader
alg0trader / interface.c
Last active December 15, 2015 01:59
Mimic of Object-Oriented Class in C language.
#include <stdio.h>
#include "interface.h"
static void print_hi(char *name)
{
printf("Hi %s\r\n", name);
}