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 random | |
import argparse | |
_argp = argparse.ArgumentParser() | |
_argp.add_argument("-n", "--number", help = "1...{n}") | |
_argp.add_argument("-t", "--loop", help = "Loop n") | |
args = vars(_argp.parse_args()) | |
_max = args["number"] | |
_loop = args["loop"] | |
num={i+1:0 for i in range(0,int(_max))} | |
for _ in range(int(_loop)): |
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 goprocam import GoProCamera, constants | |
gopro = GoProCamera.GoPro(constants.gpcontrol) | |
import os.path | |
import time | |
while True: | |
if gopro.IsRecording() == 0: | |
last_media_item = gopro.getMediaInfo("folder") + "-" + gopro.getMediaInfo("file") | |
if os.path.isfile(last_media_item): | |
time.sleep(1) | |
else: |
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
#include "stdio.h" | |
#include <iostream> | |
#include <cstdlib> | |
#include <cmath> | |
#include <vector> | |
#include <numeric> | |
using namespace std; | |
int random1 = 1000; | |
int psize = 1000000; |
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 socket | |
import struct | |
mac_address="AA:BB:CC:DD:EE:FF" | |
mac_address = str(mac_address) | |
if len(mac_address) == 12: | |
pass | |
elif len(mac_address) == 17: | |
sep = mac_address[2] | |
mac_address = mac_address.replace(sep, '') |
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
echo "downloading papers" | |
cr=$'\r' | |
for num in {1..3} | |
do | |
echo $num | |
num="${num%$cr}" | |
curl "http://papers.xtremepapers.com/CIE/Cambridge%20International%20A%20and%20AS%20Level/Computer%20Science%20(9608)/9608_s15_qp_1${num}.pdf" -o 9608_s15_qp_1${num}.pdf | |
done | |
for num in {1..3} | |
do |
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
{ | |
"B" : [ | |
{ | |
"F" : [ | |
"bFit", | |
"BFace" | |
] | |
}, | |
{ | |
"A" : [ |
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
--- Pebble API Documentation --- | |
NOTE: api2.getpebble.com and appstore-api.getpebble.com both appear to point to the same API | |
App Banners, Categories & Collections: https://api2.getpebble.com/v2/home/apps | |
Watchface Banners, Categories & Collections: https://api2.getpebble.com/v2/home/faces | |
All apps: https://api2.getpebble.com/v2/apps/collection/all/watchapps-and-companions |
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
{"info": { | |
"model_number": 16, | |
"model_name": "HERO4 Session", | |
"firmware_version": "HX1.01.02.00", | |
"serial_number": "C3141324517011", | |
"board_type": "0x07", | |
"ap_mac": "F4DD9E08B9DC", | |
"ap_ssid": "GoProH4Session", | |
"ap_has_default_credentials": "0", | |
"git_sha1": "1f8812f42c9dfefd38360a02308f2992fb55fe77" |
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
{"status":{ | |
"1":1,"2":2,"3":0,"4":0,"6":0,"8":0,"9":0,"10":0,"11":0,"13":0,"14":0,"15":0,"16":0,"17":1,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"26":0,"27":0,"28":2,"29":"","30":"GoProHERO4Black","31":0,"32":0,"33":0,"34":750,"35":664,"36":11,"37":9,"38":1100,"39":9,"40":"%10%04%12%0D%0A%0B","41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"54":2806912,"55":1,"56":4,"57":105870,"58":0,"59":0,"60":500,"61":2,"62":0,"63":0,"64":0}, | |
"settings":{"1":0,"2":9,"3":8,"4":1,"5":0,"6":1,"7":1,"8":1,"9":0,"10":0,"11":0,"12":0,"13":4,"14":0,"15":4,"16":0,"17":1,"18":2,"19":5,"20":0,"21":1,"22":2,"23":0,"24":1,"25":0,"26":4,"27":0,"28":1,"29":6,"30":2,"31":5,"32":0,"33":0,"34":1,"35":2,"36":0,"37":0,"38":0,"39":5,"40":0,"41":13,"42":8,"43":0,"44":8,"45":8,"46":0,"47":0,"48":0,"49":0,"50":1,"51":3,"52":0,"53":0,"54":1,"55":0,"56":2,"57":0,"58":1,"59":1,"60":8,"61":1,"62":700000,"63":1,"64":1,"65":0,"66":0,"67":0,"68":0,"69":0,"70":1,"71":0,"72":1}} |
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
## GoPro Streaming script from Sonof8Bits for HERO4 Session running 2.00 Firmware | |
import sys | |
import socket | |
import urllib.request | |
import subprocess | |
from time import sleep | |
def get_command_msg(id): | |
return "_GPHD_:%u:%u:%d:%1lf\n" % (0, 0, 2, 0) |