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
| [default] | |
| signing_required=yes | |
| streams=yes | |
| soft=yes | |
| dir_cache_max_cnt=0 | |
| protocol_vers_map=6 | |
| mc_prefer_wired=yes |
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
| #!/usr/bin/env python3 | |
| import asyncio | |
| import socket | |
| import json | |
| import curses | |
| import argparse | |
| from collections import defaultdict, deque | |
| MAX_HISTORY = 200 # Max history samples to keep | |
| BRAILLE_4 = ["⣀", "⣄", "⣆", "⣇", "⣿"] # 0–4 levels |
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
| #!/usr/bin/env python3 | |
| """ | |
| norns_helper.py - MCP server for Norns development workflow automation | |
| This Model Context Protocol (MCP) server provides tools for deploying and debugging | |
| Norns audio scripts remotely over SSH. It was designed to eliminate manual SSH | |
| workflows and Makefile dependencies, enabling rapid iteration during development. | |
| Target System: | |
| Monome Norns (https://monome.org/docs/norns/) is a sound computer for exploring new |
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
| function initCentroids(pts, k) { | |
| var randPts = pts.slice(0); | |
| randPts.sort(() => Math.floor(Math.random() * pts.length)); | |
| return randPts.slice(0, k); | |
| } | |
| function dist(v1, v2) { | |
| var sum = 0; | |
| for (var i = 0; i < v1.length; i++) { | |
| if (i !== 0) sum += Math.pow(v2[i] - v1[i], 2); |
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
| #! /usr/bin/env python3 | |
| # Adapted from [email protected] | |
| # see https://github.com/grzegorz914/homebridge-enphase-envoy | |
| # <xbar.title>Enphase Solar (Averages)</bitbar.title> | |
| # <xbar.version>v1.2</xbar.version> | |
| # <xbar.author>Jason Snell</xbar.author> | |
| # <xbar.author.github>jasonsnell</xbar.author.github> | |
| # <xbar.desc>Display local Enphase solar stats.</xbar.desc> | |
| # <swiftbar.hideAbout>true</swiftbar.hideAbout> |
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
| # Use this with a slow cron - I had mine set to run every 24 bours and keep copies of the last 5 releases | |
| from os import environ, listdir, makedirs | |
| from os.path import join, exists, getmtime, isdir | |
| from shutil import rmtree | |
| from json import loads | |
| from asyncio import run, create_task, sleep, create_subprocess_shell | |
| from asyncio.subprocess import PIPE, STDOUT | |
| from aiohttp import ClientSession | |
| from logging import basicConfig, INFO, DEBUG, WARNING, getLogger |
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
| # synthy-balls.py -- use rotary encoder to launch balls that play notes when bouncing | |
| # 20 Aug 2024 - @todbot / Tod Kurt | |
| # video demo: https://youtu.be/cCTPtk6KQQk | |
| import time, random, math | |
| import board | |
| import busio, displayio, terminalio | |
| import rotaryio, keypad | |
| import audiobusio, audiocore, audiomixer, synthio | |
| import gc9a01 | |
| #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
| # Drop this into Automator using Python 3 as the shell | |
| from sys import stdin | |
| from json import dumps, loads | |
| from urllib.parse import urlencode | |
| from urllib.request import Request, urlopen | |
| AZURE_ENDPOINT="getyourowndeployment.openai.azure.com" | |
| OPENAI_API_KEY="getyourownkey" | |
| OPENAI_API_VERSION="2023-05-15" |
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
| #!/usr/bin/env python3 | |
| #exec tail -n +3 $0 | |
| # Be careful not to change | |
| # the 'exec tail' line above. | |
| # This script lives in /etc/grub.d/ | |
| # 2015,2022 Ralph Versteegen | |
| # The menuentry template was orginally generated by /etc/grub.d/10_linux |
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
| #!/bin/bash | |
| # Install Latest XRDP with XORGXRDP and GFX/Glamor server-side acceleration | |
| # Tested on Ubuntu 22.04 LTS | |
| BUILD_DIR=/tmp/xrdpbuild | |
| echo "-> preparing $BUILD_DIR" | |
| rm -f -r $BUILD_DIR | |
| mkdir -p $BUILD_DIR | |
NewerOlder