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 digitalio | |
import time | |
class M62429(object): | |
"""docstring for MS62429""" | |
def __init__(self, pin_data, pin_clock, speed=0.001): | |
super(M62429, self).__init__() | |
self.pin_data = digitalio.DigitalInOut(pin_data) | |
self.pin_data.direction = digitalio.Direction.OUTPUT | |
self.pin_clock = digitalio.DigitalInOut(pin_clock) |
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 digitalio | |
def enum(**enums): | |
return type('Enum', (), enums) | |
Port = enum(P0=0b00, P1=0b01) | |
Resolution = enum(BIT_7=127, BIT_8=255) | |
Wiper = enum(Rheostat=0, Potentiometer=1) | |
ADDRESS_MASK = 0B11110000 |
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
# Load Modules | |
module(load="imudp") | |
module(load="imuxsock") | |
# rsyslog Templates | |
template(name="FilePathHostnameFormat" type="string" string="/var/log/net/%hostname%/syslog.log") | |
template(name="FilePathIpFormat" type="string" string="/var/log/net/%fromhost-ip%/syslog.log") | |
template(name="RemoteFormat" type="list") { | |
property(name="timegenerated" dateformat="day") |
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
HOST, PORT = "0.0.0.0", 5514 | |
import logging,coloredlogs,socketserver | |
coloredlogs.install(level=logging.DEBUG, fmt='%(message)s', datefmt='') | |
#Remove theses values from the log | |
filter_proto = ["dns_udp", "dns_tcp", "ssdp", "bootps", "ntp"] | |
filter_dstname = []#["firefox", "github", "google", "msedge", "imgur", "cdn."] | |
filter_srcname = [] |
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
diff settings/optionspage_transfer.cpp settings/optionspage_transfer.cpp | |
52,53c52,54 | |
< impl_->transfers_->SetRange(1, 10); | |
< impl_->transfers_->SetMaxLength(2); | |
--- | |
> #warning Here | |
> impl_->transfers_->SetRange(1, 500); | |
> impl_->transfers_->SetMaxLength(3); | |
55c56 | |
< inner->Add(new wxStaticText(box, nullID, _("(1-10)")), lay.valign); |
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
input_buffer = msg.payload | |
msg.payload = { | |
fourcc: input_buffer.slice(0, 4).toString(), | |
sample_rate: VBAN_SR_LIST[input_buffer[4] & VBAN_SR_MASK], | |
sub_protocol: VBAN_PROTOOLS[input_buffer[4] & VBAN_PROTOCOL_MASK], | |
samples: input_buffer[5], | |
channels: input_buffer[6], | |
format: VBAN_BIT_FMTS[input_buffer[7] & VBAN_BIT_RESOLUTION_MASK], |
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 | |
import config | |
import pickle | |
import os.path | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request | |
# If modifying these scopes, delete the file token.pickle. | |
SCOPES = ['https://www.googleapis.com/auth/calendar'] |
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
diff settings/optionspage_transfer.cpp settings/optionspage_transfer.cpp | |
52,53c52,54 | |
< impl_->transfers_->SetRange(1, 10); | |
< impl_->transfers_->SetMaxLength(2); | |
--- | |
> #warning Here | |
> impl_->transfers_->SetRange(1, 500); | |
> impl_->transfers_->SetMaxLength(3); | |
55c56 | |
< inner->Add(new wxStaticText(box, nullID, _("(1-10)")), lay.valign); |
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
//Call at least every 10ms | |
void oled_spinner() { | |
int x = 64, y = 35, r = 15; | |
static uint32_t millis = board_millis(); | |
static float angle = 0; | |
if (board_millis() - millis < 10) return; | |
millis += 10; |
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
@echo off | |
set cursor-icon=AAACAAEAICAAAAkAAACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
OlderNewer