Skip to content

Instantly share code, notes, and snippets.

View cansik's full-sized avatar
🌿

Florian Bruggisser cansik

🌿
View GitHub Profile
@supachailllpay
supachailllpay / UnityObjectLoader
Last active November 1, 2023 11:54
Load .obj and .mtl in Unity at runtime
Load .obj and .mtl in Unity at runtime
public class Client : MonoBehaviour
{
private SubscriberSocket m_subscriber;
private NetMQContext m_context;
// Use this for initialization
void Start()
{
ForceDotNet.Force();
@brio1009
brio1009 / BlenderRenderSequenceV1.py
Last active May 3, 2024 07:30
Script to render a sequence of ply files with Blender.
# Script to render a sequence of ply files with Blender. First, setup your scene
# and material for the imported meshes. Scene must be in "OBJECT"-mode.
# Fill in variables in options.
# References.
# See: http://blender.stackexchange.com/questions/24133/modify-obj-after-import-using-python
# and: http://blenderartists.org/forum/showthread.php?320309-How-to-import-ply-files-from-script
import bpy
# Options.
meshFolder = "" # Folder without ending "\\".
@ridencww
ridencww / SerialPrintf.txt
Last active June 12, 2023 19:12
Basic printf functionality for the Arduino serial ports
/*
* Simple printf for writing to an Arduino serial port. Allows specifying Serial..Serial3.
*
* const HardwareSerial&, the serial port to use (Serial..Serial3)
* const char* fmt, the formatting string followed by the data to be formatted
*
* int d = 65;
* float f = 123.4567;
* char* str = "Hello";
* serial_printf(Serial, "<fmt>", d);
@vsubhashini
vsubhashini / poolmean.prototxt
Last active February 22, 2021 03:30
Translating Videos to Natural Language Using Deep Recurrent Neural Networks
# The network is used for the video description experiments in [1].
# Please consider citing [1] if you use this example in your work.
#
# [1] S. Venugopalan, H. Xu, J. Donahue, M. Rohrbach, R. Mooney, K.Saenko.
# "Translating Videos to Natural Language using Deep Recurrrent Neural
# Networks." NAACL-HLT 2015.
name: "mean_fc7_to_lstm"
layer {
name: "data"
@scazon
scazon / music.c
Created July 14, 2015 15:53
GBDK music player
/* Here's a look at how I created a quick music player for use with GBDK.
It basically defines how to play a note, and then stores an array of notes
to be played as a timer interates through the beats */
//Define note names
typedef enum {
C3, Cd3, D3, Dd3, E3, F3, Fd3, G3, Gd3, A3, Ad3, B3,
C4, Cd4, D4, Dd4, E4, F4, Fd4, G4, Gd4, A4, Ad4, B4,
C5, Cd5, D5, Dd5, E5, F5, Fd5, G5, Gd5, A5, Ad5, B5,
C6, Cd6, D6, Dd6, E6, F6, Fd6, G6, Gd6, A6, Ad6, B6,
@adrien-f
adrien-f / CMakeLists.txt
Last active May 22, 2022 13:33
CLion and Arduino via Platform.io
cmake_minimum_required(VERSION 3.2)
project(YourProject)
add_subdirectory(src)
add_subdirectory(lib)
@DavidYKay
DavidYKay / simple_cb.py
Last active June 26, 2023 00:52
Simple color balance algorithm using Python 2.7.8 and OpenCV 2.4.10. Ported from: http://www.morethantechnical.com/2015/01/14/simplest-color-balance-with-opencv-wcode/
import cv2
import math
import numpy as np
import sys
def apply_mask(matrix, mask, fill_value):
masked = np.ma.array(matrix, mask=mask, fill_value=fill_value)
return masked.filled()
def apply_threshold(matrix, low_value, high_value):
#ifndef NOISE_SIMPLEX_FUNC
#define NOISE_SIMPLEX_FUNC
/*
Description:
Array- and textureless CgFx/HLSL 2D, 3D and 4D simplex noise functions.
a.k.a. simplified and optimized Perlin noise.
The functions have very good performance
and no dependencies on external data.
@postspectacular
postspectacular / hsv2rgb.ino
Last active February 22, 2024 12:53
Super compact HSV/RGB conversions for Arduino/C
int redPin = 6;
int greenPin = 5;
int bluePin = 9;
float col[3];
float hue = 0.0;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);