A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
| // 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
| // You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
| (() => { | |
| const SHOW_SIDES = false; // color sides of DOM nodes? | |
| const COLOR_SURFACE = true; // color tops of DOM nodes? | |
| const COLOR_RANDOM = false; // randomise color? | |
| const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
| const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
| const THICKNESS = 20; // thickness of layers | |
| const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
| // % clang++ $(llvm-config --cxxflags --ldflags --system-libs --libs core) -o hello_world_llvm hello_world_llvm.cpp | |
| // % ./hello_world_llvm | |
| // hello world | |
| #include <llvm/ExecutionEngine/ExecutionEngine.h> | |
| #include <llvm/ExecutionEngine/GenericValue.h> | |
| #include <llvm/IR/IRBuilder.h> | |
| #include <stdio.h> | |
| using namespace llvm; |
| int[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { | |
| if (p < 0.5) | |
| return 0.5 * pow(2*p, g); |
A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
| import signal | |
| import functools | |
| async def looping_task(loop, task_num): | |
| try: | |
| while True: | |
| print('{0}:in looping_task'.format(task_num)) | |
| await asyncio.sleep(5.0, loop=loop) | |
| except asyncio.CancelledError: | |
| return "{0}: I was cancelled!".format(task_num) |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
Product: Sagitta Brutalis 1080 (PN S3480-GTX-1080-2697-128)
Software: Hashcat v3.00-beta-145-g069634a, Nvidia driver 367.18
Accelerator: 8x Nvidia GTX 1080 Founders Edition
| use_debug false | |
| use_bpm 130 | |
| # Our mixer! | |
| master = (ramp *range(0, 1, 0.01)) | |
| kick_volume = 1 | |
| bass_volume = 1 | |
| revbass_volume = 1 | |
| snare_volume = 0.5 | |
| hats_volume = 0.5 |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| import java.io.FileDescriptor; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| public class HelloWorld{ | |
| private static HelloWorld instance; | |
| public static void main(String[] args){ | |
| instantiateHelloWorldMainClassAndRun(); |