Skip to content

Instantly share code, notes, and snippets.

View Josverl's full-sized avatar

Jos Verlinde Josverl

View GitHub Profile
@ropg
ropg / axp192.py
Last active October 6, 2021 00:23
Pure python driver for AXP192 Power Management IC
# Python driver for the AXP192 Power Management IC.
#
# https://gist.github.com/ropg/7216ba90a9d7697114d4ba8aea7bee3c
#
# Written in 2021 by Rop Gonggrijp.
#
# Some functionality inspired by C driver written by Mika Tuupola
# (https://github.com/tuupola/axp192) and a fork of that maintained by
# Brian Starkey (https://github.com/usedbytes/axp192)
#
@Josverl
Josverl / ApprovalConformation-1.json
Last active May 12, 2021 08:57
Teams and Power Platform in a Day: Lab 02 - Adaptive Card - ApprovalConformation
{
"type": "AdaptiveCard",
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"padding": "none",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
@joyceerhl
joyceerhl / python_debugging.md
Created September 17, 2020 04:03
Debugging a Python-based Jupyter kernel with Visual Studio Code

This gist describes how you can debug a Juypter kernel written in Python with Visual Studio Code and the Python extension. Jupyter kernel code is indirectly invoked by the jupyter command line tool. Therefore, you cannot launch and debug a Jupyter kernel module directly from VS Code with a launch configuration. Instead, you need to make slight modifications to your Jupyter kernel code to allow a Python debugger to attach to it.

Prerequisites

  1. Clone the Jupyter PowerShell kernel to your local machine from https://github.com/vors/jupyter-powershell.
  2. Ensure that you have jupyter and debugpy installed:
python -m pip install jupyter debugpy

Configuring debugging

@ralexandr
ralexandr / alpine_install_nvm.md
Last active May 30, 2024 09:10
Installing nvm on Alpine Linux

Installing nvm on Alpine Linux

Alpine Linux, unlike mainstream/traditional Linux distributions, is based on BusyBox, a very compact (~5MB) Linux distribution. BusyBox (and thus Alpine Linux) uses a different C/C++ stack to most mainstream/traditional Linux distributions - musl. There currently is no musl based binary published in the nodejs official builds but they do publish a musl based binary in the nodejs unofficial builds which they use in the node:alpine docker image. The node:alpine docker image is a potential alternative to nvm for using node on alpine linux.

For now you can override the nvm_get_arch function to return x64-musl on x64 Alpine Distributions. Currently the Node project only has unofficial builds for x64-musl. Sorry no ARM-musl/x86-musl,etc builds for now. The N

at_spi_write('AT+CWMODE=1\r\n', 13, 500)
at_spi_read ('OK\r\n', 4, 500)
at_spi_write('AT+CWMODE?\r\n', 12, 500)
at_spi_read ('+CWMODE:1\r\nOK\r\n', 15, 500)
at_spi_write('AT+CWQAP\r\n', 10, 500)
at_spi_read ('OK\r\n', 4, 500)
at_spi_write('AT+CWMODE?\r\n', 12, 500)
at_spi_read ('+CWMODE:1\r\nOK\r\n', 15, 500)
at_spi_write('AT+CWQAP\r\n', 10, 500)
at_spi_read ('OK\r\n', 4, 500)
@nebelgrau77
nebelgrau77 / MicroPython on STM32F4xx.md
Last active June 13, 2024 15:44
how to install MicroPython on cheap STM32F4xx boards ("black pill", "black F407")

Installing MicroPython on inexpensive STM32F4xx boards

This tutorial will explain step by step how to build and deploy MicroPython on STM32F407xx and STM32F411CEU boards, using both DFU mode over USB, as well as SWD with ST-Link and OpenOCD in case you can't get the board into DFU mode (happened to me with the "black pill").

It should be applicable to other boards, such as the other "black pill" STM32F401, Nucleo boards etc., provided you can find an appropriate board definition to build.

1. clone the MicroPython repo:

@sulianov
sulianov / spotify-tracks-to-google-music-tracks.py
Last active December 5, 2021 14:34
Using Selenium+Python sign in to Spotify, grab liked tracks, sign in to Google Music, add Spotify tracks if missing.
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.implicitly_wait(10)
#open spotify
driver.get('https://open.spotify.com/collection/tracks')
# runs on MicroPython (and Python)
# get file and folder information and return this as JSON
# params : folder , traverse subdirectory , output format, gethash
# intended to allow simple processing of files
# jos_verlinde@hotmail.com
import uos as os, json
import uhashlib,ubinascii
import logging
logging.basicConfig(level=logging.DEBUG)
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@benjmin-r
benjmin-r / 01_README.md
Last active January 5, 2021 17:06
Sonic Pi Intro Workshop

This collection of files exists to serve you as starting point in exploring different sounds and how they're programmed in Sonic Pi.
Copy & Paste them into your Sonic Pi editor and start tweaking the values to change the sound.

Keyboard Shortcuts

The Sonic Pi integrated editor has a lot of keyboard shortcuts. A handy list of all shortcuts is integrated in the tutorial browser or online on github.

Attack, Decay, Sustain, Release

This image explains nicely, the four important parameters to controlling played sounds in Sonic Pi.