It's hard to correctly accept a callback function and keep a weakref to it. Problem First, what works: import inspect , weakref class C : def m ( self ): pass c = C () w1 = weakref . ref ( c , print ) del c < weakref at 0x7f41575dcc20 ; dead > # good If the caller sends you a bound method, however, that code is wrong: c = C () w2 = weakref . ref ( c . m , print ) < weakref at 0x7f4158da6250 ; dead…
As you'd expect, the pomerium ingest-controller (IC) for k8s has some local code, some pomerium interface code, and depends on pomerium . If you want to try something with the pomerium library code, you need to arrange for a local version of it to end up in your IC container image. Checkouts % git clone https://git@github.com/pomerium/ingress-controller.git ingress-controller % grep "pomerium v"…
http://mcumix.blogspot.com/2016/07/reverse-engineering-24ghz-rf-chip-xn297.html Recently, new chip appeared in many models - XN297. Although this chip seems to be a clone of nRF24L01+ - it has the same pinout, uses the same 16MHz crystal, the datasheet, partially translated to Chinese, looks very similar to the original, the register set is the same - it is not compatible by radio format.…
(remains of a wiki site) Pixel project Features: individually-addressable red/green/blue leds with 8-bit PWM brightness control each pixel is under $5 pixels can be spaced apart and require only 2 wires chaining them together (or maybe 3) possible compatibility with 1wire, allowing other devices to share the bus Challenges: Sending data with lots of power, possibly continuous power. Reflecting…
Program to summarize groups of lines of text. Lines can be in paragraphs like this: one two three four Or tagged with single-char keys like this: a red b green b blue a UV Outputs look like this: Table 1 **: 2 people (one, two) Table 2 **: 2 people (three, four) Table a **: 2 people (red, UV) Table b **: 2 people (green, blue) python source
Click images for larger versions AUTHOR Drew Perttula BRIEF DESCRIPTION This project demonstrates a series of manipulations on Klein bottles and Mobius strips through the use of computer animation. USAGE The product animation may be useful as a teaching tool for students of topology or computer graphics (of course). PLATFORM I did my work on 3 machines running Linux and one Macintosh (for the…
The images on this page are broken because the photo module for zope drifts around over the years. It's really hard to rescue old pics when they break, because they're locked up in ZODB. Use archive.org if you want to see them. -drewp 2007-02-27 20329 This is an electric gate latch. When you open the gate all the way, the gate presses the switch that turns on an electromagnet that holds the gate…
by Drew Perttula and David McClosky skim is an alternative text file viewer with a graphical interface and advanced searching and browsing features. It requires Python 2.2 or later with Tkinter, and it can make use of Wordnet with pywn. The important features of skim are: the birdseye view, where you can see a representation of your whole file (or a zoomed piece) at the same time that you browse…
Driving times from San Mateo County Forensic Lab to the rest of the bay area. Numbers are in minutes. Bright splotches are multiples of 10 minutes. Speed limits for each road class are from the TMRS project and might be experimental. There's a suspicious road classification on Willow Road at the east end of the Dumbarton Bridge that might be throwing off all the Fremont times. Code is in CVS at…
Sometimes we grep for something in a bunch of files, and then we want to make edits to the lines that were returned from the grep. It's a hassle in most editors to open all the files and find all the lines. grepedit puts the match lines in a temp file for easy editing all at once. The cmdline arguments to grepedit are the same as those to grep. Do not use arguments that alter the output line…