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
| !CELL:262:ALL!LRxF4Tr1vENjsJSJsBJJtcCjeitsCCIfXjXoXjG4tjlzh5yBPklhiHWRNrsJ8i8yPjZmkbhEz7gdXV8Y2pDbkT7Z(cRlpftBzl1ll7ULgAX1nqyHYftA702TTetGwGwyXBlS0p3Z9ENrF44MMS7ZZ7)S5jJ1m3po3Z5CpNZ987md3DUA9(LZjRlPEN1oSHs(d1tE18I6zKslhTGPI2YvYMwor(8QMz1mIKR18dMuYuCYbLZviwEJSMzZNBmZ8A9LmVPz(b1wQK6HKgYOxT0sMYblKjJHYOeQgts3CirTlKqTGQzp8HL0thxkB6UKYj1VSUys18PgqoTO2YkNaHKtsjXWM6s5muZAkw5ceOGUKHYmY5KsQwKjfNoJU0GYX0ZMxpR5q(9fSlPS5e9nApA5nvZ2VIPIVj)WfYMAaHaggznaHCPLZwmwLQliCOO2Ylyi3QQCHDjlPAQWwzDfTAMRSiQvJPnp4OA23ybJMir0U6mCBj0djNrQGQPEIOXipZT6zsvWauAjKVfZc6YgEN4aeUIXuENoLk8qRsgMzZ1VXJprOWbsSRD3DK23vIrMAj(9f3Cin5MsAkb7FMSNAg2j6VFvzYMJ)rjT0iWXXJBOjRQw9SBzwMUlbDkav3Zulz40znikV0jtLFWbZNdx)JTeC9piC9R2h5YVp8QXc(WRbVw)41HRdOcEd(Pp7BcdLSzmBKUYyb)WajD)GlzEMZOeviDbeFS5RFTLAmiO2JlBuqxxofr1nDU86dkPEzPOwC6xFG4XJen(iFcFLMnE975tGR)tJRhVbC9FkC9Pbw(txE)BOdkxT9VlBXMGQsOC9nWADJyHpv5tObX07R8N9HRpzp7kqxb6EK01uoFxgPIJR7oUnGvsxdUEt46oQHXqH2h5(ke2Tqh6gUlkxH4AeyV1GR70xL)KuYTDqx825TFOf4HvhY(HTbtmO99ntM6MFa7Nabb55)7MygaBdV2q7BEwXgenNpgXxsMooyxbAp8ihPsn7rysXT |
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
| #include "ext.h" | |
| #include "ext_obex.h" | |
| #include "ext_time.h" | |
| typedef struct _note_state t_note_state; | |
| typedef struct _note_debounce { | |
| t_object x_obj; | |
| double threshold; | |
| void *out_midi; |
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
| autowatch = 1 | |
| mgraphics.init() | |
| mgraphics.relative_coords = 0 | |
| mgraphics.autofill = 0 | |
| // we want to draw this many bars | |
| var bars = [] | |
| for (var i=0; i < 8; i++) { | |
| bars.push(Math.random()) | |
| } |
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
| from concurrent.futures import ThreadPoolExecutor | |
| def do_work(work_list): | |
| with ThreadPoolExecutor() as pool: | |
| def work(inp): | |
| return f'{inp}----COMPLETE' | |
| futures = [pool.submit(work, work_item) for work_item in work_list] | |
| for future in futures: | |
| print( future.result() ) |
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
| local math = require('hs.math') | |
| local hyper = {"cmd"} | |
| local function getWindows() | |
| local win = hs.window.focusedWindow() | |
| local screen = win:screen() | |
| return win, screen | |
| end | |
| local function getFrames(win, screen) |
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 json | |
| from pathlib import Path | |
| help_files = [Path(x) for x in Path("help").glob("*.maxhelp")] | |
| def ezdac_search(patch, patch_name): | |
| if patch.get("maxclass") == "ezdac~" and not patch.get("local"): | |
| print(patch_name, patch) | |
| for k, v in patch.items(): | |
| if isinstance(v, dict): |
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 sys | |
| import json | |
| from pathlib import Path | |
| help_file_input = Path(sys.argv[1]) | |
| s = '' | |
| with open(help_file_input, 'r') as f: | |
| s = f.read() | |
| s = s.replace('"default_fontsize" : 12.0', '"default_fontsize" : 13.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
| desc: Mapping for PHONOS system | |
| author: James Bradbury | |
| slider1:0<-60,0,0.1>1+2 | |
| slider2:0<-60,0,0.1>3+4 | |
| slider3:0<-60,0,0.1>5+6 | |
| slider4:0<-60,0,0.1>7+8 | |
| slider5:0<-60,0,0.1>9 | |
| slider6:0<-60,0,0.1>10+11 | |
| slider7:0<-60,0,0.1>12+13 |
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
| from colour import Color | |
| import random | |
| massive_fucking_string = '' | |
| for x in range(200): | |
| hue = random.uniform(0, 1) | |
| saturation = random.uniform(0.5, 1.0) | |
| value = random.uniform(0.3, 0.7) | |
| c = Color(hsl=(hue, saturation, value)) | |
| massive_fucking_string += (str(c)[1:]) |
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 numpy as np | |
| NUM_CHUNKS = 4 # or this could be a ratio of original data | |
| raw_audio = np.array([1, 2, 3, 4, 5, 6, 7, 8]) | |
| chunks = np.split(raw_audio, NUM_CHUNKS) | |
| downsampled = [max(chunk) for chunk in chunks] | |
| print(downsampled) | |