Skip to content

Instantly share code, notes, and snippets.

@nbonfire
nbonfire / mysubaru.py
Created May 20, 2019 15:49
MySubaru python samples
import requests, json
from subarucreds import username,password,pin # just a "subarucreds.py" that has some variables i didn't want to share
import datetime
#login
s=requests.Session()
loginr=s.post('https://www.mysubaru.com/login', data = {'username':username,'password':password})
#should return a response 200
#Where's my subaru?
{
"nodes":
[
{"name":"Client 1","group":1},
{"name":"Loadbalancer 1","group":2},
{"name":"Webserver 1","group":3},
{"name":"Webserver 2","group":3},
{"name":"Database 1","group":4},
{"name":"Database 2","group":4}
@nbonfire
nbonfire / hubot-scripts.json
Last active August 29, 2015 14:16
hubot scripts for hitz bot
["redis-brain.coffee", "shipit.coffee","tasks.coffee", "tell.coffee", "responders.coffee", "achievement_unlocked.coffee", "gif-me.coffee", "urban.coffee"]
@nbonfire
nbonfire / kivytest.py
Last active August 29, 2015 14:12
How can I get the video to hide itself when it's done? Right now the on_stop callback never gets called
videos= glob(join(dirname('.'), '*.mp4'))
keys=['a','s','d','f','g','h','j','k','l']
videodict=dict(zip(keys,videos))
class VideoLayout(FloatLayout):
def __init__(self, **kwargs):
super(VideoLayout, self).__init__(**kwargs)
self._keyboard = Window.request_keyboard(self._keyboard_closed, self)
@nbonfire
nbonfire / pyglettest.py
Created December 5, 2014 06:20
pyglet example showing increasing delay loading a video to restart
import pyglet
from pyglet.window import key
vidPath="dog.mp4"
MediaLoad = pyglet.media.load(vidPath)
#window = pyglet.window.Window((MediaLoad.video_format.width,MediaLoad.video_format.height))
window = pyglet.window.Window(resizable=True)
player = pyglet.media.Player()
@nbonfire
nbonfire / hitzsave.py
Last active August 29, 2015 14:06
NHL Hitz 2002 save file data extractor
#
# hitzSaveRead.py
#
# extract data from a PS2 NHL Hitz 20-02 save file (unknown if it works for xbox or GC saves)
#
import binascii
import pprint
FILENAME = 'hitzsave'