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
#!/bin/bash | |
# | |
# Run klick metronome and tap tempo with enter/return key | |
# | |
TEMPO="${1:-120}" | |
cleanup() { | |
stty echo | |
oscsend localhost 9001 /klick/metro/stop |
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
#!/bin/bash | |
# | |
# open-in-firefox.sh - open URL from Termux command line in Firefox Android browser | |
# | |
# Works with file:// URLs too, unlike with termux-open{-url}. | |
# | |
exec am start --user 0 -a android.intent.action.VIEW -n org.mozilla.firefox/.App -d "$1" >/dev/null |
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
# coding: utf-8 | |
from __future__ import print_function | |
import socket | |
import struct | |
import ui | |
import paho.mqtt.client as mqtt |
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
$ micropython uget.py key1=value1 key2=value2 key2=value3 | |
{'url': 'http://httpbin.org/get?key2=value3&key1=value1', 'headers': {'Host': 'httpbin.org', 'Connection': 'close'}, 'args': {'key2': 'value3', 'key1': 'value1'}, 'origin': 'XXX.XXX.XXX.XXX'} | |
$ micropython upost.py foo=bar spamm=42 | |
{'files': {}, 'headers': {'Host': 'httpbin.org', 'Content-Length': '16', 'Content-Type': 'application/x-www-form-urlencoded', 'Connection': 'close'}, 'args': {}, 'form': {'spamm': '42', 'foo': 'bar'}, 'origin': 'XXX.XXX.XXX.XXX', 'data': '', 'json': None, 'url': 'http://httpbin.org/post'} |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Encrypt/decrypt files with symmetric AES cipher-block chaining (CBC) mode. | |
Usage: | |
File Encryption: | |
aescrypt.py [-f] infile [outfile] |
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
# Markdown to PDF Conversion | |
# | |
# This script converts Markdown markup to PDF directly on your iOS device. | |
# | |
# Please see the "Requirements" section in the docstring below for required | |
# dependencies and the "Installation" section for instructions on how to | |
# install them. | |
# | |
# Run this script directly or put it into the Pythonista editor action menu | |
# with one of the following options as the first and sole argument: |
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
#!/usr/bin/env python3 | |
import sys | |
from rtmidi.midiutil import open_midioutput | |
if sys.argv[1:]: | |
midiout, _ = open_midioutput() | |
midiout.send_message(bytearray.fromhex(" ".join(sys.argv[1:]))) |
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
#!/usr/bin/env python | |
"""Examine an RSS feed retrieved from given URL.""" | |
import sys | |
from xml.dom.minidom import parseString as parse_xml | |
import feedparser | |
import requests | |
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
#!/usr/bin/env python | |
"""Display waveform of an audio file.""" | |
import argparse | |
import logging | |
import sys | |
from statistics import fmean | |
from PyQt6 import QtCore, QtGui, QtWidgets | |
from PyQt6.QtCore import Qt |
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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
# | |
# wagenheber.py | |
# | |
"""Simple PyPI package installation client for Pythonista. | |
Currently only supports installing pure Python packages for which a | |
distribution archive in bdist_wheel format is available on PyPI. |