Skip to content

Instantly share code, notes, and snippets.

@adeguet1
adeguet1 / firmware-updater.py
Created May 25, 2023 13:38
Python script to detect any new SD card and copy some files on it. Used to flash firmware for dVRK controllers.
#
# Script used to monitor new block device (SD card) and copy new dVRK
# firmware files automatically
#
# Anton Deguet
#
import pyudev
import subprocess
import time
@Willy-JL
Willy-JL / pyimgui_imagehelper.py
Last active July 5, 2023 10:08
Image helper class for pyimgui
from PIL import Image, ImageSequence, UnidentifiedImageError
import OpenGL.GL as gl
import pathlib
import imgui
_dummy_texture_id = None
def dummy_texture_id():
global _dummy_texture_id
@zephray
zephray / el-pio-demo.c
Last active March 18, 2022 03:11
Driving EL display with Raspberry Pi Pico's PIO
// Copyright 2021 Wenting Zhang <zephray@outlook.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@Lauszus
Lauszus / main.py
Created October 1, 2020 13:50
Siglent SDS2000X plus hack
import hashlib
SCOPEID = '0000000000000000'
Model = 'SDS2000X+'
# Note that 'AWG' should be used for the 'FG' option
# If you have the 100 MHz model, then first upgrade it to 200 MHz, then 350 MHz and finally 500 MHz
bwopt = ('25M', '40M', '50M', '60M', '70M', '100M', '150M', '200M', '250M', '300M', '350M', '500M', '750M', '1000M', 'MAX', 'AWG', 'WIFI', 'MSO', 'FLX', 'CFD', 'I2S', '1553', 'PWA')
hashkey = '5zao9lyua01pp7hjzm3orcq90mds63z6zi5kv7vmv3ih981vlwn06txnjdtas3u2wa8msx61i12ueh14t7kqwsfskg032nhyuy1d9vv2wm925rd18kih9xhkyilobbgy'
@Sap333
Sap333 / KillAllChildProcessesOnExit.py
Last active May 19, 2024 15:20 — forked from anonymous/KillAllChildProcessesOnExit.py
Kill all child processes on program exit. Also catches (sets up a hande) the SIGTERM signal to process it gracefully. Python. Linux/Posix only.
#!/usr/bin/python3
# It is for Python3 but may work for modern 2.x versions as well.
import os, signal, atexit
# Signletone which is made as a class with static methods.
# The "init()" method must be called before any child process are created.
# "killAllChildrenOnce" or "killAllChildren" methods could be called
# any time to kill all child processes.
# Creates a new process group during initialization and uses it to send
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@samueljohn
samueljohn / README.md
Last active March 4, 2017 21:41
Hacking a FIFOPlayer into Pyo. Yay. Pumping numpy arrays to the soundcard (or do some post-processing or mixing first)! Pyo is a fantastic sound processing library. To test this, copy these files into a freshly checked out pyo repository into pyo/externals. Then build pyo from source. In the long(er) run, I'd love to provide this to upstream. Cr…

We (Samuel John and Thomas Hermann) added a FIFOPlayer to Pyo, allowing you to directly (and almost copy-free) play numpy Arrays. See help(pyo.FIFOPlayer)! Output should be scaled [-1.0,1.0] (roughly).

See fifo_demo.py how to use a thread to generate audio and fill the queue.