Skip to content

Instantly share code, notes, and snippets.

@alyoshenka
alyoshenka / main.py
Created November 28, 2023 00:48
Spectrum Analyzer
from math import sqrt
import numpy as np
import pygame
import pyaudio
pygame.init()
# CD quality typically 44.1kHz
RATE = 44100
# Update screen 60fps
@alyoshenka
alyoshenka / .gitignore
Last active August 31, 2023 00:27
Stock Ticker v2
__pycache__/*
logs/*
@alyoshenka
alyoshenka / .gitignore
Last active September 3, 2023 20:21
MQTT Playground for Interfacing with Home Assistant and Neopolitan
const.py
__pycache__/*
logs/*
stocks/*
@alyoshenka
alyoshenka / DeleteScheduledOperation.py
Last active June 1, 2023 12:27
Project Neo AWS Resources
import json
import boto3
response_topic = 'cmd/neo/schedule/del/res'
client = boto3.client('iot-data', region_name=region)
step_function = boto3.client('stepfunctions', region_name=region)
dynamodb = boto3.client('dynamodb', region_name=region)
lambda_ = boto3.client('lambda', region_name=region)
@alyoshenka
alyoshenka / data_sources.ipynb
Last active April 24, 2023 14:32
Avalanche Danger Report
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alyoshenka
alyoshenka / boardsim.py
Created April 3, 2023 21:05
Python Events Example
import time
def main(q):
while True:
if q.not_empty:
event = q.get()
print('event:', event)
if event == 'exit':
return
else:
@alyoshenka
alyoshenka / ReadMe.md
Created January 25, 2023 03:29
Percentage Range to GPA - Python

Percentage Range to GPA - Python

How to use this program:

  1. Run with Python: python[3] main.py
  2. Input a grade percentage (0 to 100, inclusive, no symbols, decimals accepted)
  3. The program will return the GPA for that percentage
Command Description
git mv {old_name} {new_name} rename
git commit -- ammend edit most recent commit (do before pushing to remote)
git reset HEAD {file_name} unstage
git restore --staged {file_name} unstage
git checkout -- {file_name} replace with last committed version (dangerous: discards all local changes)
git restore {file_name} replace with last committed version (dangerous: discards all local changes)
git remote add {shortname} {url} add new remote repo as a shortname
git fetch pulls data down, does not merge
@alyoshenka
alyoshenka / .gitignore
Last active October 21, 2021 23:19
Stock Ticker
*.pyc
robin_stocks/
__pycache__/
@alyoshenka
alyoshenka / TerminalNotes.md
Last active January 24, 2021 04:54
Useful commands

Useful terminal commands

  • ps aux | grep "name": find process by name
  • sudo dkpg -i "package.deb": install package
  • source ~/.bashrc: reload .bashrc