Skip to content

Instantly share code, notes, and snippets.

View vade's full-sized avatar

Anton Marini vade

View GitHub Profile
Hi Toyos. Thanks for taking the time to read this.
Basically, I have a SCNNode 'Agent' which contain child nodes (maybe a hundred or so) which are simple textured planes which respond to a physics field (or 4).
Every frame, I want to draw a connection between the nodes.
My thought was to :
In the "Agent" node - parent to all the child nodes - override the custom rendering. I would:
@bkaradzic
bkaradzic / orthodoxc++.md
Last active September 20, 2025 12:45
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@jhorikawa
jhorikawa / getPinterestBoardPins.py
Last active March 9, 2023 21:32
Download Pinterest images from specific board using Python.
import pprint
import requests
import os
from urllib.request import urlopen
accessToken = "xxxxxxxxxx"
boardId = "0000000000"
folderPath = "./images"
response = requests.get(
@steven2358
steven2358 / ffmpeg.md
Last active September 21, 2025 14:11
FFmpeg cheat sheet
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active September 20, 2025 20:31
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@kylemcdonald
kylemcdonald / dtw_mse.py
Last active April 28, 2021 16:28
DTW MSE numba function for use with UMAP.
# based on https://github.com/kylerbrown/ezdtw
# with modifications to be fully njit-able
import numpy as np
from numba import njit
@njit
def sqeuclidean(a, b):
return np.sum((a - b)**2)
@madelinegannon
madelinegannon / jetson-nano_openFrameworks_setup_tutorial.md
Last active December 20, 2024 01:56
How to Set Up the NVIDIA Jetson Nano for openFrameworks
@Martini024
Martini024 / VideoHelper.swift
Last active July 23, 2025 08:22
SwiftUI: Rewrite iOS Photos Video Scrubber
import AVKit
import Foundation
class VideoHelper {
static func getThumbnail(from player: AVPlayer, at time: CMTime, maximumSize: CGSize? = nil) -> CGImage? {
guard let currentItem = player.currentItem else { return nil }
return getThumbnail(from: currentItem.asset, at: time, maximumSize: maximumSize)
}
@RobertRiachi
RobertRiachi / Whisper_ANE_export.py
Last active February 3, 2024 01:42
Export an optimized version of Whisper for ANE using coreml
import torch
import torch.nn.functional as F
import coremltools as ct
from torch import Tensor
from torch import nn
from typing import Dict
from typing import Optional
from ane_transformers.reference.layer_norm import LayerNormANE as LayerNormANEBase
from coremltools.models.neural_network.quantization_utils import quantize_weights