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 math | |
BIKE_WEIGHT = 17 # lbs | |
FRONTAL_AREA = 5.4788 # sq ft | |
DRIVETRAIN_LOSS = 2 # percent | |
DRAG = 0.63 | |
ROLLING_RESISTANCE = 0.005 | |
AIR_DENSITY = 1.22601 # kg/m^3 | |
GRAVITY = 9.8067 # m/s^2 |
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 print_function | |
import nintaco | |
import math | |
import bike | |
nintaco.initRemoteAPI("localhost", 9999) | |
api = nintaco.getAPI() | |
# RX | |
SPEED = 1 |
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
wiiTranslate = { WiimoteButtons.DPadDown: Key.DownArrow, | |
WiimoteButtons.DPadUp: Key.UpArrow, | |
WiimoteButtons.DPadLeft: Key.LeftArrow, | |
WiimoteButtons.DPadRight: Key.RightArrow, | |
WiimoteButtons.B: Key.LeftControl, | |
WiimoteButtons.A: Key.LeftAlt | |
} | |
nunchuckTranslate = { NunchuckButtons.C: Key.LeftAlt, NunchuckButtons.Z: Key.LeftControl } |
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 asyncio | |
import struct | |
import logging | |
import math | |
from pynput.keyboard import Controller,Key | |
keyboard = Controller() # Create the controller | |
from bleak import BleakClient,BleakScanner | |
import bleak.backends.winrt.client |
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
newCfgFile = '<?xml version="1.0"?><mameconfig version="10"><system name="blstroid"><input><remap origcode="KEYCODE_UP" newcode="KEYCODE_UP"/><port type="P1_DIAL" sensitivity="27" reverse="no"><newseq type="standard">MOUSECODE_YAXIS</newseq></port></input></system></mameconfig>' | |
newCfgFile2 = '<MAMEconfig version="10"><system name="blstroid"><input><port tag=":DIAL0" type="P1_DIAL" mask="255" defvalue="0" sensitivity="24" /></input></system></MAMEconfig>' | |
orig_BrowserFS_initialize=BrowserFS.initialize; | |
BrowserFS.initialize=function(z){ | |
var r=window.orig_BrowserFS_initialize(z); | |
window.orig_FS_mkdir=FS.mkdir; | |
FS.mkdir=function(d){ | |
var r=window.orig_FS_mkdir(d); | |
if (d=="/artwork") { |
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 logging | |
import asyncio | |
import threading | |
from bleak import BleakScanner | |
#from typing import Any | |
def uuid16(n): | |
return "0000%04X-0000-1000-8000-00805F9B34FB" % n |
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
baseforce 0.8 # mechanical friction in kilograms of force | |
FPS 59.97 # video frame rate | |
radius 0.145 # distance from crank center to pedal | |
level 8 | |
start 0:25:38 (bottom) | |
3.105 | |
2.89 | |
3.895 | |
2.2 | |
3.985 |
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 math | |
FPS = 59.97 | |
r = 0.145 # crank radius in meters | |
baseForce = 0 # basic force | |
currentSet = None | |
def parseTime(d): | |
parts = d.split(":") | |
frames = int(parts[-1]) |
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 math | |
"""nPerSet = 10 | |
nSets = 7 | |
setTime = 8*60 | |
restTime = 42 | |
adjustRestSets = 4""" | |
laps = 67 |
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 cv2 | |
import numpy as np | |
import math | |
fontScale = 10 | |
margin = .2 | |
fontThickness = 3 | |
backColor = (0,0,0) | |
textColor = (255,255,255) | |
FPS = 59.94 |