Skip to content

Instantly share code, notes, and snippets.

View andrewhummus's full-sized avatar
😏

Andrew N andrewhummus

😏
View GitHub Profile
import requests
from datetime import datetime, timedelta
import pandas as pd
API_KEY="23D47252-3223-46EA-8F48-161416F44F57"
SYMBOL_IDS = ['BITSTAMP_SPOT_BTC_USD']
end_date = pd.Timestamp(datetime.now())
start_date = pd.Timestamp(end_date - timedelta(days=90))
const int dischargePin = 10; // Digital output pin for controlling transistor
const int voltagePin = A0; // Analog input pin for measuring battery voltage
float dischargeCurrent = 0.80; // Specify the discharge current in amperes
int pulseDuration = 900000; // Specify the pulse duration in milliseconds
bool dischargeComplete = false; // Flag variable to track pulse discharge completion
void setup() {
pinMode(dischargePin, OUTPUT);
pinMode(voltagePin, INPUT);
@andrewhummus
andrewhummus / app.tsx
Last active April 26, 2022 22:24
code
e
@andrewhummus
andrewhummus / Brewfile
Created March 14, 2022 02:32
andrews latest brewfile
tap "artginzburg/tap"
tap "clangen/musikcube"
tap "cmacrae/formulae"
tap "derailed/k9s"
tap "discoteq/discoteq"
tap "elastic/tap"
tap "ethereum/ethereum"
tap "felixkratz/formulae"
tap "filosottile/musl-cross"
tap "gleich/tap"
@andrewhummus
andrewhummus / Brewfile
Created January 5, 2022 21:02
brew dump
tap "artginzburg/tap"
tap "cmacrae/formulae"
tap "discoteq/discoteq"
tap "elastic/tap"
tap "ethereum/ethereum"
tap "felixkratz/formulae"
tap "gleich/tap"
tap "hackclub/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
@andrewhummus
andrewhummus / pooling.txt
Created January 2, 2022 23:44
Simple db pooling explained in small graph
+---------+
| |
| Clients |
+---------+ |
| |-+ (1) +------+ (3) +----------+
| Clients | ===#===> | Open | =======> | RealOpen |
| | | +------+ +----------+
+---------+ | ^
| | (2)
| /------\
@andrewhummus
andrewhummus / hideiconsondesktop
Created November 22, 2021 17:16
hide file icons on desktop in macos.
defaults write com.apple.finder CreateDesktop -bool false
killall Finder
"https://cache.nixos.org"
"https://cache.dhall-lang.org"
"https://static-haskell-nix.cachix.org"
"https://nix-tools.cachix.org"
"https://amarrella.cachix.org"
"https://orther.cachix.org"
@andrewhummus
andrewhummus / read.md
Created October 18, 2021 22:39
float 64 vs float 32

float32 is a 32 bit number - float64 uses 64 bits.

That means that float64’s take up twice as much memory - and doing operations on them may be a lot slower in some machine architectures.

However, float64’s can represent numbers much more accurately than 32 bit floats.

They also allow much larger numbers to be stored.

For your Python-Numpy project I'm sure you know the input variables and their nature.

@andrewhummus
andrewhummus / .vimrc
Created September 9, 2021 23:30
Simple monochrome vimrc for working with rust/python
syntax on
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set nu
set nowrap
set smartcase