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 os | |
import subprocess | |
import sys | |
import requests | |
from urllib.parse import urlparse | |
def get_latest_release_or_tag(repo_url): | |
"""Return (tag_name, commit_sha) from the latest release or fallback to latest tag.""" | |
parsed = urlparse(repo_url) | |
owner, repo = parsed.path.strip('/').replace('.git', '').split('/') |
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 os | |
from pydub import AudioSegment | |
# Get the directory containing the script (and the .wav files) | |
wav_dir = os.path.dirname(os.path.abspath(__file__)) | |
# Create the 'OGG' directory if it doesn't exist | |
ogg_dir = os.path.join(wav_dir, 'OGG') | |
os.makedirs(ogg_dir, exist_ok=True) |
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
#include <Arduino.h> | |
#include <Wire.h> | |
#include <U8g2lib.h> | |
// Setup | |
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 14, 12, U8X8_PIN_NONE); | |
u8g2_uint_t offset; | |
u8g2_uint_t width; | |
const char* text = "Hello friend, "; |