Skip to content

Instantly share code, notes, and snippets.

@BananaHemic
BananaHemic / receive_video.py
Created August 4, 2025 20:35
Per Participant Live Video Python Sample
import asyncio
import httpx
from websockets.asyncio.server import serve
from fastapi import FastAPI, WebSocket, Request, WebSocketDisconnect
from fastapi.responses import HTMLResponse
import uvicorn
import argparse
import av
import json
import time
@BananaHemic
BananaHemic / remove_fusion_construction.py
Created January 16, 2025 05:12
Remove construction lines from dxf files exported from Fusion360
import ezdxf
import sys
import os
# Removes all construction lines from a dxf file exported from Fusion360
# You may need to run:
# pip install ezdxf
# Usage is:
@BananaHemic
BananaHemic / HX711.c
Last active August 5, 2024 17:19
NRF52 HX711
// For more information, please refer to https://devzone.nordicsemi.com/f/nordic-q-a/34112/best-approach-to-interface-hx711-with-nordic-nrf52832
// Feel free to comment any questions or suggestions for improvements
//TODO you will have to define the following:
// HX711_TIMER (the index of the timer, 2 for me)
// HX711_TIMER_INTERRUPT (the IRG for the timer, TIMER2_IRQn for me)
// Loadcell_Dout_Pin (the pin number for the HX711 data line)
// Loadcell_Sck_Pin (the pin number for the HX711 clock line)
#include "HX711.h"
#include "nrf_drv_gpiote.h"
// I don't dance now, I make muscle moves...
// Configurable Params
MaxMoveF = 4000
MaxHoldF = 1.334 * MaxMoveF
MaxTorque = 500
MaxHoldTorque = 1.334 * MaxTorque
MaxMoveSpeed = 4.5 // m/s
HillParamA = 0.25 // Coefficient of shortening heat in Hill's muscle model
SetAngularDrag(0)
To add as a Submodule in your git project
Open powershell in the "Assets" directory of your Unity project
Run git submodule add https://github.com/....
cd to the folder you cloned
Run git config core.sparseCheckout true
Open the file "..\..\.git\modules\...\info\sparse-checkout", perferably in vim
Add "Unity/Assets" to the file (or whatever you want to KEEP)
Make sure the file endings are Unix (in vim, you can run set ff=unix)
Save/close your text editor and run git checkout master