Skip to content

Instantly share code, notes, and snippets.

View ji-podhead's full-sized avatar

Ji ji-podhead

View GitHub Profile
@ji-podhead
ji-podhead / trackers.md
Last active October 8, 2025 14:05
Types of Object Detection Trackers
MOTA Score (Benchmark)
Tracker Technical Basis Performance Accuracy Special Features Application
@ji-podhead
ji-podhead / blender_visualize_point_cloud.py
Created October 7, 2025 14:19
blender visualize point cloud
import bpy
import json
import numpy as np # Wird nicht direkt benötigt, da json.load verwendet wird
from mathutils import Vector
from time import time
def visualize_particles_as_instances(json_filepath, particle_scale=1, instance_radius=0.05, collection_name="VoxelParticleInstances"):
"""
Visualisiert Partikelpositionen aus einer JSON-Datei in Blender,
indem es Low-Poly Icosphären auf den Vertices eines Punktwolken-Meshes instanziiert.
@ji-podhead
ji-podhead / threejs_voxelize.js
Created October 7, 2025 13:38
Voxelize a mesh with threejs and sample the texture
import * as THREE from 'three';
import { MeshSurfaceSampler } from 'three/examples/jsm/math/MeshSurfaceSampler.js';
/**
* Extrahiert Textureddaten in ein format, das einfach zu sampeln ist.
* @param {THREE.Texture} texture - Die zu verarbeitende Texture.
* @returns {ImageData} Die Bilddaten der Texture.
*/
function getTextureImageData(texture) {
const image = texture.image;
@ji-podhead
ji-podhead / voxelize_blender.py
Created October 7, 2025 13:35
Voxelize A Mesh in Blender and sample the color from the texture
import bpy
import bmesh
import numpy as np
import json
from mathutils import Vector
from collections import defaultdict
def texture_surface_voxelizer(obj, particle_count, output_filepath="voxel_data.json"):
"""
Voxelizes the surface of a Blender object, extracts texture colors,
@ji-podhead
ji-podhead / node24+python3.11+npx.compose.yml
Created May 14, 2025 15:05
an example compose file for creating the requirements for using mcp servers
version: "3.9"
services:
gmail:
image: python:3.11
ports:
- "8000:3000"
command: bash -c "apt-get update && apt install --assume-yes npm && npm i -g npx && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && \. $HOME/.nvm/nvm.sh && nvm install 24"
privileged: true
# restart: always
tty: true
@ji-podhead
ji-podhead / fastapi_auth.py
Created April 27, 2025 23:43
fastapi_auth
from fastapi import FastAPI, Depends, HTTPException, status
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
app = FastAPI()
security = HTTPBearer()
def validate_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
if credentials.credentials != "secret-token": # Replace with actual token validation logic
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
@ji-podhead
ji-podhead / check_TTL.md
Last active April 13, 2025 01:59
check your TTL (Time to leave) value while using USB tethering vs WIFI tethering
@ji-podhead
ji-podhead / tailscale&VaultOnOpenWrt .md
Last active April 9, 2025 14:15
Deploy tailscale and Vault via docker compose on openwrt router

Deploy tailscale and Vault via docker compose on openwrt router

you can find the full project here pamji - onpremcontrol those are the minimum requirements to deploy a basis infra via IaC. This is the controller for the pamji onprem infra. It servers as a low spec router, failover vpn access point and secrets manager.

requirements

  • predeployed openwrt router

creates

  • a tailscale- and a vault docker container
@ji-podhead
ji-podhead / fetch-api-examples.md
Created April 5, 2025 13:18 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@ji-podhead
ji-podhead / gist:34a08a31bf83667ec86e2bb9c22a0d96
Last active December 9, 2024 12:14
Matrix Screensaver using HTML and JS only