This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import scipy, scipy.signal | |
def savitzky_golay( y, window_size, order, deriv = 0 ): | |
r"""Smooth (and optionally differentiate) data with a Savitzky-Golay filter. | |
The Savitzky-Golay filter removes high frequency noise from data. | |
It has the advantage of preserving the original shape and | |
features of the signal better than other types of filtering | |
approaches, such as moving averages techhniques. | |
Parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform | |
import usb.core | |
import usb.backend.libusb1 | |
from ctypes import c_void_p | |
from pyftdi.ftdi import Ftdi | |
backend = usb.backend.libusb1.get_backend() | |
if backend and platform.system() == "Windows": | |
backend.lib.libusb_set_usbdk.argtypes = [c_void_p] | |
backend.lib.libusb_set_usbdk(backend.ctx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(RCurl) | |
require(rjson) | |
require(stringr) | |
require(rgexf) | |
getRiotKey <- function() { | |
key <- getOption("riot.key") | |
if (is.null(key)) | |
stop("getOption(\"riot.key\") returned NULL.") | |
key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
pgoapi - Pokemon Go API | |
Copyright (c) 2016 tjado <https://github.com/tejado> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class Tab1(wx.Panel): | |
def __init__(self, parent): | |
wx.Panel.__init__(self, parent) | |
self.l = wx.StaticText(self, label="Text") | |
self.sizer = wx.GridBagSizer(0,0) | |
self.sizer.Add(self.l, pos=(0,0)) | |
self.SetSizer(self.sizer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Parse a SF logfile and BDF file and generate EEGLAB compat event file | |
""" | |
from __future__ import print_function, division | |
import sys, os | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MSYS2 Theano Windows 10 64bit Setup Notes | |
========================================== | |
Update MSYS2, run until no updates | |
------------------------------------- | |
``` | |
pacman -Syuu | |
``` | |
Install GCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-07-27 11:15:35,214 [ pgoapi] [ INFO] Create new request... | |
2016-07-27 11:15:35,216 [ pgoapi] [ INFO] Adding 'ENCOUNTER' to RPC request including arguments | |
2016-07-27 11:15:35,216 [ pgoapi] [DEBUG] Arguments of 'ENCOUNTER': | |
{'player_longitude': -79.99990432564914, 'spawn_point_id': u'8834f156fb7', 'encounter_id': 5752263169355807389L, 'player_latitude': 40.4409188}2016-07-27 11:15:35,217 [ pgoapi] [ INFO] Execution of RPC | |
2016-07-27 11:15:35,217 [ rpc_api] [DEBUG] Generating main RPC request... | |
2016-07-27 11:15:35,219 [ rpc_api] [DEBUG] Generating sub RPC requests... | |
2016-07-27 11:15:35,219 [ rpc_api] [DEBUG] Subrequest class: POGOProtos.Networking.Requests.Messages_pb2.EncounterMessage | |
2016-07-27 11:15:35,220 [ rpc_api] [DEBUG] Generated protobuf request: | |
status_code: 2 | |
request_id: 8145806132888207460 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.web.iweb import IBodyProducer | |
from twisted.internet import defer | |
from twisted.web.client import Agent | |
from twisted.web.http_headers import Headers | |
import urllib | |
class StringProducer(object): | |
implements(IBodyProducer) | |
def __init__(self, body): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
move_1 move_2 name pokemon_id individual_stamina power_quotient individual_defense stamina individual_attack cp nickname | |
------------- --------------- ---------- ------------ -------------------- ---------------- -------------------- --------- ------------------- ---- ---------- | |
Ember Heat Wave Flareon 136 15 91 11 77 15 1195 | |
Zen Headbutt Psybeam Psyduck 54 11 89 14 55 15 434 | |
Pound Psyshock Drowzee 96 13 89 12 61 15 362 | |
Poison Sting Horn Attack Nidorino 33 13 89 14 76 13 689 | |
Confusion Psychic Hypno 97 |
NewerOlder