Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or 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 | |
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>" | |
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf" | |
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/" | |
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/" | |
import leveldb | |
import sys | |
import re |
This file contains hidden or 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 random | |
def play(bankroll, wager_perc, prob_win, payout_perc, num_turns, seed): | |
""" Plays a coin flipping game and returns the final balance | |
Inputs: | |
start (number): starting bankroll | |
wager_perc (number): percent of bankroll you want to wager at each turn | |
prob_win (number): probability of a win (e.g. 0.5 is 50% win probability) | |
payout_perc (number): the payout multiple in case of win (payout = payout_perc * wager) | |
num_turns (number): the number of turns in the game |
This file contains hidden or 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
# coding: utf-8 | |
# py2 origin author lrdcq | |
# usage python3 unwxapkg.py filename | |
__author__ = 'Integ: https://github.com./integ' | |
import sys, os | |
import struct | |
class WxapkgFile(object): |
This file contains hidden or 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 python2 | |
# lrdcq | |
# usage python2 unwxapkg.py filename | |
import sys, os | |
import struct | |
class WxapkgFile(object): | |
nameLen = 0 |
This file contains hidden or 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/perl | |
#-------------------------------------------------- | |
# Usage: | |
# ./speak.pl en input.txt output.mp3 | |
# | |
# Prerequisites: | |
# sudo apt-get install libwww-perl libhtml-tree-perl sox libsox-fmt-mp3 | |
# | |
# Compiling sox: |
This file contains hidden or 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
# naivebayes.txt | |
# | |
# sex height weight footsize | |
# male 6 180 12 | |
# male 5.92 190 11 | |
# male 5.58 170 12 | |
# male 5.92 165 10 | |
# female 5 100 6 | |
# female 5.5 150 8 | |
# female 5.42 130 7 |
This file contains hidden or 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 __future__ import division, print_function, absolute_import | |
from keras.models import Sequential, model_from_json | |
from keras.layers import Dense, Dropout, Flatten, Conv3D, MaxPool3D, BatchNormalization, Input | |
from keras.optimizers import RMSprop | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.utils.np_utils import to_categorical | |
from keras.callbacks import ReduceLROnPlateau, TensorBoard | |
import h5py |
TODO
- Create a CLI-Interface with the following options:
- Unicast or Multicast? Default: Unicast
- Locally Administered or Globally Unique? Default: Locally Administered
- Prescribe specific OUI (overwrites the above two)
- Number of MACs to generate (they should not collide and be piped out separated by newlines)
This file contains hidden or 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
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |
NewerOlder