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
target extended-remote /dev/ttyACM0 | |
monitor version | |
monitor swdp_scan | |
attach 1 | |
set mem inaccessible-by-default off |
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] | |
DefaultDependencies=no | |
After=local-fs.target | |
Conflicts=getty@tty1.service | |
[Service] | |
StandardInput=tty | |
StandardOutput=tty | |
ExecStart=/usr/bin/fbi -d /dev/fb0 --once --noverbose --autozoom /opt/splash.png |
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 datetime as dt | |
import tkinter as tk | |
import tkinter.font as tkFont | |
import matplotlib.figure as figure | |
import matplotlib.animation as animation | |
import matplotlib.dates as mdates | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg | |
import tmp102 | |
import apds9301 |
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 sys | |
sys.path.append('/opt/cocoapi/PythonAPI') | |
from pycocotools.coco import COCO | |
import nltk | |
nltk.download('punkt') | |
from data_loader import get_loader | |
from torchvision import transforms | |
import torch | |
from collections import Counter | |
import numpy as np |
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
public class FileLoggingTree extends Timber.DebugTree { | |
private static final String LOG_TAG = FileLoggingTree.class.getSimpleName(); | |
@Override | |
protected void log(int priority, String tag, String message, Throwable t) { | |
try { | |
String path = "Log"; | |
String fileNameTimeStamp = new SimpleDateFormat("dd-MM-yyyy", | |
Locale.getDefault()).format(new Date()); |
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 Pin, Signal, I2C, ADC, Timer | |
import ssd1306 | |
import time | |
adc = ADC(0) | |
i2c = I2C(-1, Pin(5), Pin(4)) | |
display = ssd1306.SSD1306_I2C(128, 32, i2c) | |
MAX_HISTORY = 250 |
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
[color] | |
ui = true | |
[alias] | |
gl = log --oneline -n 10 | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
co = checkout | |
upstream-merge = !"git fetch origin -v && git fetch upstream -v && git merge upstream/master && git push" | |
[core] | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
[color "diff-highlight"] |
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 necessary packages | |
import sensor | |
import time | |
import image | |
# import the lcd optionally | |
# to use the LCD, uncomment Lines 9, 24, 33, and 100 | |
# and comment Lines 19 and 20 | |
#import lcd |
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
kernel=u-boot-dtok.bin | |
framebuffer_depth=16 | |
# Prevent the firmware from loading HAT overlays now that we handle pin muxing. | |
# ourselves. See: | |
# https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.4 | |
dtoverlay= | |
dtparam=i2c_arm=on,i2c_arm_baudrate=400000 | |
dtparam=spi=on |
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
@Singleton | |
public class FirebaseAdapter { | |
private FirebaseAuth.AuthStateListener mAuthListener; | |
private FirebaseAuth mAuth; | |
@Inject | |
public FirebaseAdapter() { | |
mAuth = FirebaseAuth.getInstance(); | |
initialiseAuth(); |