Skip to content

Instantly share code, notes, and snippets.

View psobot's full-sized avatar

Peter Sobot psobot

View GitHub Profile
@psobot
psobot / kos_file_dumper.py
Last active June 13, 2023 16:27
Kurzweil KOS File Packer/Unpacker
"""
Kurzweil K2500/K2600 KOS operating system update file packer/repacker
by Peter Sobot, Nov 6, 2021
@psobot / github@petersobot.com
Requirements: none! Pure Python. Just use Python 3.2+.
"""
import os
import math
@olilarkin
olilarkin / notes.md
Last active March 13, 2024 08:33
Plugin Dev Notes
@albertz
albertz / tf_get_switch_op_cond_ctx.py
Created December 14, 2018 13:37
get_switch_op_cond_ctx, get control_flow_ops.CondContext from a switch tf.Operation (if possible)
def get_switch_op_cond_ctx(op):
"""
See control_flow_util.IsCondSwitch.
:param tf.Operation op: switch op
:rtype: tensorflow.python.ops.control_flow_ops.CondContext|None
"""
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import control_flow_util
assert op.type in {"Switch", "RefSwitch"} # control_flow_util.IsSwitch
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct
"""
typedef struct boot_dat_hdr
{
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;
@passiomatic
passiomatic / bitfont.py
Created August 6, 2017 15:28
Convert a Bitfontmaker JSON into PNG
# -*- coding: utf-8 -*-
# Convert a Bitfontmaker JSON into PNG (requires Pillow library)
#
# See gallery:
# http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/
#
# Usage:
# python bitfont.py font.json font.png
@show0k
show0k / install_circuit_maker_osx.sh
Created July 5, 2017 13:25
Run CircuitMaker on OSX thanks to wine and winetricks
# If Homebrew is not installed uncomment the next line
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Wine and WineTricks
brew install wine && brew install winetricks
# Download CircuitMaker
curl https://s3.amazonaws.com/altium-install/CircuitMaker/CircuitMakerSetup.exe -o ~/Downloads/CircuitMakerSetup.exe
anonymous
anonymous / sphere.pde
Created May 15, 2017 23:58
sphere worms
// by davey aka bees & bombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@josephernest
josephernest / wavfile.py
Last active March 17, 2024 02:54
wavfile.py (enhanced)
# wavfile.py (Enhanced)
# Date: 20190213_2328 Joseph Ernest
#
# URL: https://gist.github.com/josephernest/3f22c5ed5dabf1815f16efa8fa53d476
# Source: scipy/io/wavfile.py
#
# Added:
# * read: also returns bitrate, cue markers + cue marker labels (sorted), loops, pitch
# See https://web.archive.org/web/20141226210234/http://www.sonicspot.com/guide/wavefiles.html#labl
# * read: 24 bit & 32 bit IEEE files support (inspired from wavio_weckesser.py from Warren Weckesser)

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Update: download the new Pokemon Go app - it fixes all of this. Download it, and reauth, and you should be set. The grant scopes and prompt are correct and visible now too! Now if only I could actually find a pikachu...

Pokemon tokens are requested with these understandable scopes: