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
[Unit] | |
Description=COVID-19 Tracker Service | |
After=multi-user.target | |
[Service] | |
User=pi | |
Type=simple | |
WorkingDirectory=/home/pi/CovidTracker | |
ExecStart=/usr/bin/python3 /home/pi/CovidTracker/main.py --update 3600 | |
Restart=on-failure |
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
alias update='sudo apt update && sudo apt dist-upgrade -y --auto-remove' | |
alias adb_camera='adb shell am start -a android.media.action.IMAGE_CAPTURE' | |
alias adb_launch='adb shell am start -a android.intent.action.MAIN ' | |
alias adb_brightness='adb shell am broadcast -a com.enhancedworld.devicemanager.SET_BRIGHTNESS --ei com.enhancedworld.devicemanager.extra.LEVEL ' | |
alias adb_flash_boot='adb remount; adb sync; adb reboot bootloader; fastboot flash boot $OUT/boot.img; fastboot reboot' | |
alias adb_peripherals='adb shell dumpsys com.google.android.things.pio.IPeripheralManager' | |
alias cat='bat --theme zenburn' | |
alias ping='prettyping --nolegend' | |
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules" | |
alias grep="grep -n -I --color" |
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
-- | |
-- Simple object avoider robot using the ESP8266/Nodemcu ESP-12 | |
-- Using a L9110s h-bridge and an hc-sr04 with a 1k resistor | |
-- on the ECHO pin. | |
-- | |
-- The current ESP only allows for 3 active pwms at any one time. | |
-- We get around this by the fact we only need 2 at any time. Each | |
-- direction change resets them pins used as pwm. | |
-- | |
-- Written by Scott Beasley 2015 |
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
[Unit] | |
Description=Jupyter Notebook Service | |
[Service] | |
Type=simple | |
User=user | |
ExecStart=/bin/sh -c "jupyter lab --ip=0.0.0.0 --no-browser" | |
WorkingDirectory=/home/user | |
Restart=always |
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
#!/usr/bin/env python3 | |
"""Take screen captures from DS1000Z-series oscilloscopes | |
This program captures either the waveform or the whole screen of a Rigol | |
DS1000Z series oscilloscope, then saves it on the computer as a CSV, PNG | |
or BMP file. | |
The program uses the LXI protocol, so the computer must have a LAN | |
connection with the oscilloscope. | |
""" |
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
#!/bin/sh | |
if [ -z "$SCOPE_IP" ]; then | |
echo "Need to set SCOPE_IP" | |
exit 1 | |
fi | |
if [ -z "$1" ]; then | |
echo "Need to pass filename (without extension) as argument" | |
exit 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
#!/usr/bin/env bash | |
# 2019 Michael de Gans | |
set -e | |
# change default constants here: | |
readonly PREFIX=/usr/local # install prefix, (can be ~/.local for a user install) | |
readonly DEFAULT_VERSION=4.1.0 # controls the default version (gets reset by the first argument) | |
readonly JOBS=1 # controls the number of jobs | |
# (recommend leaving JOBS to 1 since each `cc1plus` process towards the end of |
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
""" | |
A CircuitPython 'multimedia' dial demo | |
Uses a ItsyBitsy M0 + Rotary Encoder -> HID keyboard out with neopixel ring | |
""" | |
import time | |
import board | |
from digitalio import DigitalInOut, Direction, Pull | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keycode import Keycode |
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
""" | |
Loads and displays a video. | |
""" | |
# Importing OpenCV | |
import cv2 | |
import numpy as np | |
# Create a VideoCapture object and read from input file | |
# If the input is the camera, pass 0 instead of the video file name |
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 machine import I2C, Pin | |
import ssd1306 | |
import mpu6050 | |
from simulation import Simulation | |
i2c = I2C(scl=Pin(5), sda=Pin(4)) | |
display = ssd1306.SSD1306_I2C(128, 64, i2c) | |
accel = mpu6050.accel(i2c) | |
s = Simulation(accel, display) |