Skip to content

Instantly share code, notes, and snippets.

from pynput.mouse import Listener as MouseListener
from pynput.keyboard import Listener as KeyboardListener
def event_listener_start():
global mouse_listener, keyboard_listener
mouse_listener = MouseListener(on_move=event_listener_mouse_on_move)
keyboard_listener = KeyboardListener(on_press=event_listener_keyboard_on_press)
mouse_listener.start()
mouse_listener.wait()

Keybase proof

I hereby claim:

  • I am fukuchi on github.
  • I am fukuchi (https://keybase.io/fukuchi) on keybase.
  • I have a public key whose fingerprint is 9BEF 853F 6A6C 5BF1 AD3B CACB D37D B00C 13A4 E9F4

To claim this, I am signing this object:

@fukuchi
fukuchi / gist:b1f80fca3b61949a8661
Created January 26, 2015 08:41
pseudo translation
import processing.video.*;
Capture cam;
int[] noise;
int ticks = 0;
void setup() {
size(640, 480);
cam = new Capture(this, width, height, 30);
@fukuchi
fukuchi / gist:874ab4b9d294136477e7
Created January 26, 2015 08:29
Noise ^ grey scaled image
import processing.video.*;
Capture cam;
int[] noise;
int ticks = 0;
void setup() {
size(640, 480);
cam = new Capture(this, width, height, 30);
@fukuchi
fukuchi / gist:932e14a819cc51daf0b8
Created September 18, 2014 05:25
A simple interactive animation of simple shapes that makes people see stories
float ox, tx, tvx, ttx;
float TTX = 230;
boolean twalk = false;
void setup() {
size(1024, 768);
ox = tx = 50;
ttx = TTX;
}
@fukuchi
fukuchi / gist:5618340
Created May 21, 2013 08:31
How to wait until the user has finished the selection with selectInput/Output/Folder() in Processing-2.0.
import java.util.LinkedList;
class MessageQueue
{
private LinkedList queue;
public MessageQueue()
{
queue = new LinkedList();
}