Skip to content

Instantly share code, notes, and snippets.

@alg0trader
alg0trader / main.c
Last active December 14, 2015 03:39
/*******************************************************************************
*
* Author: Austin Schaller
* Module: uart.c
* Description: Library functions that permit utilization of LPC17xx
* UART0 peripheral.
* Documentation: "UART - TLD"
*
*******************************************************************************/
@alg0trader
alg0trader / chaos_func.py
Created March 3, 2013 01:35
Implementation of simple chaotic function.
# chaotic_func.py
# A simple program that illustrates chaotic behavior.
import numpy as np
import matplotlib.pyplot as plt
def chaos(x):
@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);
}
"""
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
//
// 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
# 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):
# 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)
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()
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"
@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