`:g/^./ .,/^$/-1 join`
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
BEGIN{n=0;} | |
{ | |
/* Grab six bytes */ | |
while(n != 6) { | |
/* The first byte is always A8, so wait for that */ | |
while(n == 0 && $2 != "A8") | |
getline; | |
/* Only take data from the UART */ | |
if(/^uart-1:/) { | |
/* Save it to an array */ |
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
db module: | |
class CocktailDB: | |
def __init__(dbfile): | |
pass | |
# void | |
def set_ingredient_position(position, ingredient_id, amount = 0): | |
pass | |
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
Cocktail: | |
- id | |
- name | |
- picture | |
Ingredient: | |
- id | |
- name | |
- ABV |
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 serial | |
import struct | |
import time | |
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=19200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS) | |
def cmd(s): | |
ser.write(s) | |
ser.write(b"\r\n") | |
time.sleep(0.1) # *shrug* |
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
IQ DCR alpha: 1.04166e-05 | |
Using audio backend: auto | |
New filter offset: 0 Hz | |
low: 144452000 | |
high: 144548000 | |
divswanted: 11 | |
adjlow: 144460000 | |
step: 10000 | |
divs: 9 | |
low: -115 |