Skip to content

Instantly share code, notes, and snippets.

View BenStigsen's full-sized avatar

Benjamin Stigsen BenStigsen

View GitHub Profile
@BenStigsen
BenStigsen / vtuber.py
Last active January 14, 2021 17:55
Small Python script to animate character depending on voice volume (used with OBS virtual cam in school calls)
from PIL import Image
import aubio
import pygame
import pyaudio
import numpy as np
import glob
PATH = "happyboy1"
METHOD = "default"
PERIOD_SIZE_IN_FRAME = 2048 // 2
@BenStigsen
BenStigsen / binance.py
Last active April 26, 2023 03:44
Small Python script to keep track of the Binance stocks and alert on low / high price (Windows)
'''
binance.py
To add crypto values add them to the <watchlist> dictionary:
"ZECBNB": {
"a": "ZEC",
"b": "BNB",
# Price coin
"pc": [2, 4]
@BenStigsen
BenStigsen / PomodoroWin.py
Created January 5, 2020 20:10
Pomodoro Windows timer (includes audio feedback)
import time, winsound, os
def clear():
os.system("cls||clear")
def playTone(frequency, duration, repeat):
for _ in range(repeat):
winsound.Beep(frequency, duration)
def work(duration = 1200, text = "-"):
@BenStigsen
BenStigsen / PNGtoJPG.py
Created October 29, 2019 21:47
Convert all PNG images in a folder (including subdirectories), to JPG.
import os
from PIL import Image
Image.MAX_IMAGE_PIXELS = None
def convert(folder_path, delete_old = True):
for root, dirs, files in os.walk(folder_path):
print(root)
for filename in files:
if ".png" in filename:
@BenStigsen
BenStigsen / MPA-QR.py
Created March 18, 2019 21:13
Python script to generate a QR for MobilePay
import PySimpleGUI as sg
import qrcode
text = sg.PopupGetText("Telefonnummer / BoxID", "12345678 / box12345")
amount = sg.PopupGetText("Automatisk Beløb", "0")
text = text.lower()
text = text.replace(" ", "")
text = text.replace("box", "")
text = text.strip()
@BenStigsen
BenStigsen / TwitchBot.rb
Last active September 6, 2019 10:06
Twitch chat bot written in Ruby
# bot.rb
require 'socket'
require 'logger'
# Create logger
log = Logger.new("log.txt")
# Required Info
PASS = "oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # "oauth:YourOauthToken" https://twitchapps.com/tmi/ <--- REQUIRED <--- REQUIRED
NICK = "botname" # Name of bot <--- REQUIRED <--- REQUIRED
@BenStigsen
BenStigsen / Overhaul.bat
Last active July 22, 2017 06:10
Was made to fix computer problems.
REM ( ------------ ))
REM (( Created By PhantomScripts ))
REM ( ------------ ))
:Configuration
@echo off
color 0A
mode 1000
REM // If folder "Files" exists say nothing ELSE create folder "Files"
@BenStigsen
BenStigsen / WebDownloader.py
Last active July 19, 2017 02:57
Download GitHub projects and YouTube videos/audio
# Made by Tearzz / PhantomScripts
import pafy, pip, time
print(" WebDownloader ")
print("----------------------")
print(" By PhantomScripts ")
print("\n")
# Variables
option = 1
@BenStigsen
BenStigsen / ScriptMaker.bat
Last active December 7, 2018 17:53
Create .bat scripts easily.
REM ( ------------ ))
REM (( Created By PhantomScripts ))
REM ( ------------ ))
:Configuration
@echo off
color 0A
mode 1000
REM // Main Menu <--------- START