Skip to content

Instantly share code, notes, and snippets.

@axwax
axwax / nml_parser.py
Created August 6, 2023 19:19
NML to CSV (artist, title, filename)
# slightly modified version of
# https://github.com/iond2v/NML-parser
import os
import re
import html #for converting string codes
import sys
def process_folder(folder_name):
@axwax
axwax / radio-free-fedi-metadata-display.py
Created February 22, 2023 22:07
MicroPython script to grab @radiofreefedi@botsin.space's now playing metadata and display it on a Pimoroni Pico GFX Pack
# MicroPython script to grab @radiofreefedi@botsin.space's now playing metadata and display it on a Pimoroni Pico GFX Pack
# requires WIFI_CONFIG.py and network_manager.py as outlined at https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/gfx_pack
# see https://fosstodon.org/@axwax/109910396644259122 for details
import WIFI_CONFIG
import time
from gfx_pack import GfxPack
from network_manager import NetworkManager
import urequests
import uasyncio
@axwax
axwax / mastodon-import-list.py
Last active November 16, 2022 13:14
Add (already followed) users to a Mastodon list using Mastodon.py
#!/usr/bin/env python3
# Very quickly thrown together script to add (already followed) Mastodon users to a list.
# YMMV - it probably needs some tweaking to work for you
# relies on Mastodon.py and needs a "credentials.py" file with the variables access_token and api_base_url
# I created my access token following the docs at https://docs.joinmastodon.org/client/token/ and https://docs.joinmastodon.org/client/authorized/
# but you might be able to get the access token by going to Settings|Development|New Application (I haven't tried though).
# As there is a rate limit for usage of the API I wouldn't try to import lots of users at once - I imported 132 users and it worked though...
# @axwax@fosstodon.org
@axwax
axwax / MastoMakersHandles.txt
Last active December 16, 2022 19:35
Makers / Electronics people on the Fediverse
@3DPrintingDad@fosstodon.org
@aallan@mastodon.social
@adamsdesk@fosstodon.org
@alexglow@chaos.social
@AlieGG@mastodon.social
@alpenglow@mstdn.social
@amcewen@mastodon.me.uk
@ancientjames@mastodon.social
@andypiper@mastodon.social
@arturo182@mastodon.social
@axwax
axwax / code.py
Last active September 23, 2022 21:00 — forked from dglaude/code.py
MLX90640 Thermal Camera on Raspberry Pi Pico
# mlx90640_pygamer learn guide:
# * https://learn.adafruit.com/adafruit-mlx90640-ir-thermal-camera/circuitpython-thermal-camera#
#
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
#
# Adapted by David Glaude for 240x240 screen.
# SPI and I2C pins changed by AxWax for Pimoroni Pico Breakout Garden, MLX90640 Breakout and 1.3" LCD Breakout combo.
#
# 1) RedRobotics Pico to Zero Adaptor v0.2:
# A second CV out for the Raspberry Pi Pico MIDI to CV converter by @AxWax
#
# Demo: https://www.youtube.com/watch?v=aGfQHL1jU4I
#
# This is heavily based on and requires
# the SimpleMIDIDecoder library by @diyelectromusic, which can be found at
# https://diyelectromusic.wordpress.com/2021/06/13/raspberry-pi-pico-midi-channel-router/
#
# The NeoPixel code requires the pi_pico_neopixel library by Blaž Rolih
# which can be found at https://github.com/blaz-r/pi_pico_neopixel
@axwax
axwax / PicoMIDItoCV.py
Last active March 18, 2024 08:37
Raspberry Pi Pico based MIDI to CV converter using an MCP4725 12-bit DAC.
# MIDI to CV converter for Raspberry Pi Pico and MCP4725 DAC by @AxWax
#
# Demo: https://www.youtube.com/watch?v=aGfQHL1jU4I
#
# This is heavily based on and requires
# the SimpleMIDIDecoder library by @diyelectromusic, which can be found at
# https://diyelectromusic.wordpress.com/2021/06/13/raspberry-pi-pico-midi-channel-router/
#
#
# Wiring:
@axwax
axwax / PicoTM1638MIDIVisualiser.py
Created January 10, 2022 22:56
MIDI note visualiser for Raspberry Pi Pico and TM1638 LED&KEY module by @axwax
# MIDI note visualiser for Raspberry Pi Pico and TM1638 LED&KEY module by @AxWax
#
# Demo: https://twitter.com/AxWax/status/1480659594342899713
#
# This is heavily based on and requires
# the SimpleMIDIDecoder library by @diyelectromusic, which can be found at
# https://diyelectromusic.wordpress.com/2021/06/13/raspberry-pi-pico-midi-channel-router/
# as well as the MicroPython TM1638 LED Driver library by mcauser from
# https://github.com/mcauser/micropython-tm1638
#
{
"basics": {
"name": "Axel Minet",
"label": "Web Developer",
"summary":
"Axel is a web developer based in Cambridge (UK), specialising in PHP, MySQL, WordPress and Javascript. He has an Audio Engineering background and is an avid maker, with a strong interest in machine learning, electronics and IoT systems.",
"website": "https://axwax.uk",
"email": "contact@axwax.eu",
"location": {
"city": "Berching",
@axwax
axwax / addToGoogleCalendar.php
Created December 5, 2012 14:43
add event to google calendar
<?php
// add event to google calendar
echo '<a href="' . addToGoogleCalendar("Let's test this", "next wednesday 2pm", "next wednesday 4pm", "right here, right now", "bla blah rhubarb http://axwax.de") . '">next weds 2pm</a><br/>';
echo '<a href="' . addToGoogleCalendar("Breakfast at Tiffany's", "tomorrow 8am") . '">Breakfast at Tiffany\'s</a>';
function addToGoogleCalendar($title='', $startdate='', $enddate='', $location='', $details='')
{
$startdate = ($startdate ? $startdate : time());
$startdate = (is_numeric($startdate) ? $startdate : strtotime($startdate));