Skip to content

Instantly share code, notes, and snippets.

Kier Davis kierdavis

Block or report user

Report or block kierdavis

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 boxpacker.py
#!/usr/bin/env python3.7
import sys
import tty
import termios
import subprocess
import re
from pathlib import Path, PurePath
def getch():
View test_power_board.log
Testing SR v4 PowerBoard.
Waiting for start button...
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.led:set_led_state(identifier=0, state=True)
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
DEBUG:j5.components.button:get_button_state(identifier=0) -> False
View pip-install-opencv-contrib-python-headless.log
[kier@saelli:~]$ nix-shell -p python3Packages.pip
[nix-shell:~]$ pip install --verbose --target=/tmp/throwaway-installation-dir opencv-contrib-python-headless==4.1.0.25
Created temporary directory: /run/user/1001/pip-target-9x91gkx3
Created temporary directory: /run/user/1001/pip-ephem-wheel-cache-jscyy6fc
Created temporary directory: /run/user/1001/pip-req-tracker-w3sswxqk
Created requirements tracker '/run/user/1001/pip-req-tracker-w3sswxqk'
Created temporary directory: /run/user/1001/pip-install-16kd9m0l
Collecting opencv-contrib-python-headless==4.1.0.25
1 location(s) to search for versions of opencv-contrib-python-headless:
View quovadis-root-ca-2-g3.txt
-----BEGIN CERTIFICATE-----
MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL
BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc
BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00
MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG
SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf
qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW
n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym
c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+
View j5pbtest.py
if __name__ == "__main__":
board = cast(PowerBoard, SRV4PowerBoardHardwareBackend.discover()[0])
b = cast(SRV4PowerBoardHardwareBackend, board._backend)
try:
b.get_button_state(board, 1)
except Exception as e:
print(str(e))
while True:
print(f"Serial number: {board.serial}")
print(f"Firmware version: {b.firmware_version}")
View j5proposal.py
from abc import ABCMeta, abstractmethod
class Component(metaclass=ABCMeta):
"""
Represents a single element of the robot hardware that may be operated by the user logic.
Examples include:
- a motor
View flow_control_poc.cpp
// Buffers for incoming and outgoing bytes respectively.
static RingBuffer recv_buffer;
static RingBuffer send_buffer;
// True when we've sent an XOFF and the peer has (hopefully) stopped sending data.
static bool recv_paused = false;
// True when the peer has sent an XOFF and we should stop sending data.
static bool send_paused = false;
View ooo.csv
Application Architecture IPC (in-order) IPC (out-of-order)
crc32 arm .37207400845431505980 .97955199956153432229
crc32 x86 .24456957484502649185 1.87414399799978104145
sha arm .39627907995376373499 2.85625675899401813169
sha x86 .34798035968094520557 1.72880407237775979080
View gist:11a3ae0a04e2485874a47d1199cad701
Application,Architecture,IPC (1 layer),IPC (2 layers),IPC (3 layers)
crc32,arm,.37207400845431505980,.37207247218849673917,.37207004599251855888
crc32,x86,.24456957484502649185,.24456786206401686474,.24456478131541620667
sha,arm,.39627907995376373499,.39624501614677063739,.39616326285681414028
sha,x86,.34798035968094520557,.34795167265421835192,.34790049190617000551
View l1i.csv
Application Architecture L1D [kB] IPC (L1I=8kB) IPC (L1I=16kB) IPC (L1I=32kB)
crc32 arm 8 .36748536783619406404 .36752832267653294602 .36752858879498823430
crc32 arm 16 .37162961571734866440 .37165599709076517445 .37165617332080490819
crc32 arm 32 .37162972425097425049 .37165614412931438484 .37165638717564200091
crc32 arm 64 .37204743335887199712 .37207379195140604508 .37207400845431505980
crc32 x86 8 .24149315098947192748 .24149356681634364117 .24148247813550427214
crc32 x86 16 .24278819871540530945 .24278844217554801587 .24278893805242551291
crc32 x86 32 .24456884459475138251 .24456920477644927437 .24456954648571111852
crc32 x86 64 .24456893606302772620 .24456918700200181530 .24456957484502649185
sha arm 8 .38729880861074794571 .38737412129392143235 .38737921423219464804
You can’t perform that action at this time.