Skip to content

Instantly share code, notes, and snippets.

View guineawheek's full-sized avatar

Guinea Wheek guineawheek

  • Berkeley, CA
View GitHub Profile
@guineawheek
guineawheek / update.py
Created March 19, 2019 23:13
pull teams from first
#!/usr/bin/env python3
import json
import pickle
import gzip
import requests
import os
from pprint import pprint as p
# we need to know what CURRENT_YEAR is so we can make jokes
CURRENT_YEAR = 2018
import sys
import subprocess
stream, name, poll_first, poll_rest = sys.argv[1:]
first = True
poll = poll_first
count = 0
print(stream, name.format(count), poll_first, poll_rest)
#input()
@guineawheek
guineawheek / midiplayer.py
Created November 7, 2018 05:39
whack square wave midi player
import mido
import numpy as np
import scipy.signal
import scipy.io.wavfile
import simpleaudio as sa
import sys
import io
A = 440 # hertz
SAMPLE_RATE = 48000
wave_function = [np.sin, scipy.signal.square, scipy.signal.sawtooth][1]
import discord
import json
import os
import sys
from discord.ext.commands import command, has_permissions, bot_has_permissions, Bot, NotOwner
from asyncio import sleep
CONFIG_PATH = "config.json"
default_config = {
"token": "[ add bot token here ]",
package org.firstinspires.ftc.robotcontroller.internal;
import java.lang.Thread.UncaughtExceptionHandler;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
@guineawheek
guineawheek / interject.py
Last active April 25, 2016 00:21
interject.py
#!/usr/bin/env python3
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@guineawheek
guineawheek / messagebox.py
Created June 25, 2015 20:30
Using native Windows message boxes in pure python
from __future__ import print_function
import ctypes
MB_ABORTRETRYIGNORE = 2
MB_CANCELTRYCONTINUE = 6
MB_HELP = 0x4000
MB_OK = 0
MB_OKCANCEL = 1
MB_RETRYCANCEL = 5
MB_YESNO = 4
MB_YESNOCANCEL = 3