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
| # /etc/udev/rules.d/99-pico.rules | |
| # Make an RP2040 in BOOTSEL mode writable by all users, so you can `picotool` | |
| # without `sudo`. | |
| SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666" | |
| # Symlink an RP2040 running MicroPython from /dev/pico. | |
| # | |
| # Then you can `mpr connect $(realpath /dev/pico)`. | |
| SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0005", SYMLINK+="pico" |
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
| """Usage: python matchcolors.py good.jpg bad.jpg save-corrected-as.jpg""" | |
| from scipy.misc import imread, imsave | |
| from scipy import mean, interp, ravel, array | |
| from itertools import izip | |
| import sys | |
| def mkcurve(chan1,chan2): | |
| "Calculate channel curve by averaging target values." | |
| fst = lambda p: p[0] |
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
| import matplotlib,numpy | |
| import pylab | |
| # A random colormap for matplotlib | |
| cmap = matplotlib.colors.ListedColormap ( numpy.random.rand ( 256,3)) | |
| pylab.imshow ( Z, cmap = cmap) | |
| pylab.show() |