Skip to content

Instantly share code, notes, and snippets.

// WebSocket Globals
#include <WiFi.h>
#include <WebSocketsClient.h>
WebSocketsClient webSocket;
//-----------------------------------------------
// FastLED Gloabals
#include <FastLED.h>
#define WIDTH 14
#define HEIGHT 46

Sessions

tmux list-sessions

tmux attach {session}

Shortcuts

c-B $ rename session
def list_to_tree(input, none_and_holes=True, source=[0]):
"""Transforms nestings of lists or tuples to a Grasshopper DataTree"""
from Grasshopper import DataTree as Tree
from Grasshopper.Kernel.Data import GH_Path as Path
from System import Array
def proc(input,tree,track):
path = Path(Array[int](track))
if len(input) == 0 and none_and_holes: tree.EnsurePath(path); return
for i,item in enumerate(input):
if hasattr(item, '__iter__'): #if list or tuple