This file contains hidden or 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 board | |
import time | |
ADDRESS = 0x54 | |
FILE_NAME = "eeprom_edit.bin" | |
#################################################################### | |
# read the file | |
#################################################################### |
This file contains hidden or 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 keyboard_layout import KeyboardLayout | |
class KeyboardLayoutWinLang(KeyboardLayout): | |
ASCII_TO_KEYCODE = ( | |
b'\x00' # | |
b'\x00' # | |
b'\x00' # | |
b'\x00' # | |
b'\x00' # | |
b'\x00' # | |
b'\x00' # |
This file contains hidden or 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
To format code on discord, using syntax highlighting, use 3 backticks (`) | |
- Start with 3 backticks followed by the language without spaces on the first line: ```python | |
Language name or language extensions are admissible, try and see (py, C, C++, etc.) | |
- Type your code in the following lines. | |
Note that the return key will not send the message until the code block is closed. | |
- End with 3 backticks alone on the closing line: ``` | |
Example: | |
Hello, I get an error in this code in line 4, can someone help me ? |
This file contains hidden or 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 board | |
import time | |
import socketpool | |
import ssl | |
import wifi | |
import adafruit_requests | |
try: | |
from secrets import secrets | |
except ImportError: |
This file contains hidden or 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 board | |
import rtc | |
import struct | |
import time | |
import wifi | |
import socketpool | |
import displayio | |
import terminalio | |
from adafruit_display_text import bitmap_label as label |
This file contains hidden or 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 board | |
import displayio | |
from digitalio import DigitalInOut, Pull | |
import gc | |
import microcontroller | |
import terminalio | |
import time | |
from adafruit_display_text.bitmap_label import Label | |
from adafruit_debouncer import Debouncer |
This file contains hidden or 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
""" | |
Slightly over-engineered script to filter the versions on circuitpython.org | |
Prints out information to stderr while the resulting json file is printed to stdout | |
Run with: | |
python3 filter_cpyorg_version.py path/circuitpython-org.git/_data/files.json > new-files.json | |
Then replace the file and compare with: | |
git diff --diff-algorithm=histogram | |
""" |
This file contains hidden or 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
Manual commit to main | |
MOCK COMPILE,push,,refs/heads/main | |
MOCK UPLOAD,push,,refs/heads/main | |
Manual commit to not-main | |
MOCK COMPILE,push,,refs/heads/not-main | |
PR via a patch branch | |
MOCK COMPILE,push,,refs/heads/Neradoc-patch-1 | |
MOCK COMPILE,pull_request,opened,refs/pull/4/merge |
This file contains hidden or 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
""" | |
Generates a SystemConfiguration preferences file without the Circuitpython boards | |
Removes everything that has an interface in "usbmodem" | |
Creates a "output_preferences.plist" to replace the original with: | |
sudo cp output_preferences.plist /Library/Preferences/SystemConfiguration/preferences.plist | |
Might not work on Big Sur's heightened security. | |
Not tested with a reboot. | |
There might a better way to do that using the defaults command, once the python script has found all the service_id to remove. |