Skip to content

Instantly share code, notes, and snippets.

David Vo auscompgeek

Block or report user

Report or block auscompgeek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View netcomm-timing.console
roboRIO-5893-FRC:~$ # on a 2017 roboRIO image
roboRIO-5893-FRC:~$ cat test.py
import hal
import sys
import time
import timeit
import threading
def timer(): return timeit.timeit(hal.observeUserProgramTest)
@auscompgeek
auscompgeek / robot.py
Created Feb 19, 2019
SPARK MAX Python Smart Motion example
View robot.py
#!/usr/bin/env python3
import rev
import wpilib
class Robot(wpilib.TimedRobot):
def robotInit(self):
self.motor = rev.CANSparkMax(1, rev.MotorType.kBrushless)
@auscompgeek
auscompgeek / talon_config.json
Created Nov 20, 2018
CTRE Talon SRX default config
View talon_config.json
{
"_base": {
"custom_param": [
0,
0
],
"open_loop_ramp": 0,
"closed_loop_ramp": 0,
"peak_output_forward": 1,
"peak_output_reverse": -1,
View opaldecode.py
#!/usr/bin/env python3
import binascii
import enum
import typing
class Mode(enum.IntEnum):
RAIL = 0
FERRY = 1
@auscompgeek
auscompgeek / keybase.md
Created Jul 23, 2018
new Keybase proof (because stricter checks)
View keybase.md

Keybase proof

I hereby claim:

  • I am auscompgeek on github.
  • I am auscompgeek (https://keybase.io/auscompgeek) on keybase.
  • I have a public key ASAl9lrYfmjshIR18YSkAOi3xRAdZR43EU4as9IsAvDZmwo

To claim this, I am signing this object:

@auscompgeek
auscompgeek / explode-ce.py
Created Feb 5, 2018
Extract ap51-flash combined ext image
View explode-ce.py
#!/usr/bin/env python3
import hashlib
import sys
f = open(sys.argv[1], 'rb')
ce_version = f.read(4)
assert ce_version == b'CE01'
View frc-openmesh-config.py
#!/usr/bin/env python3
"""
Utility to change settings on the OpenMesh OM5P-AN and OM5P-AC running FRC OpenWrt.
One can flash the radio firmware using ap51-flash <https://github.com/ap51-flash/ap51-flash>.
This is also what the official utility uses to flash the radio firmware.
You'll need to download the official utility to grab a copy of the firmware.
"""
View .SRCINFO
pkgbase = indicator-kdeconnect
pkgdesc = Integrate KDEConnect on desktop environments that use AppIndicators (e.g. Unity)
pkgver = 0.9.1
pkgrel = 1
epoch = 1
url = https://github.com/bajoja/indicator-kdeconnect
arch = any
license = GPL
makedepends = cmake
depends = libappindicator-gtk3
@auscompgeek
auscompgeek / cysca-2017-ast.md
Created May 24, 2017
CySCA 2017: Python: Abstract Syntax Treat writeup
View cysca-2017-ast.md

Python: Abstract Syntax Treat

Writeup by @auscompgeek.

Disclaimer: I did not participate in CySCA 2017. I simply saw this challenge (and a number of people struggling over it) and found it interesting. As such, I do not have the full description of the challenge.

Competitors were provided with a file tree.py. I have attached it for prosperity.

Before attempting to solve this challenge, it should be noted (from the shebang line) that this is a Python 2 program.

View tidy-numbers.py
#!/usr/bin/env python3
digits = '0123456789'
decrement_map = dict(zip(digits[1:], digits))
def solve(N: str):
m = N[0]
for i, x in enumerate(N):
if m <= x:
You can’t perform that action at this time.