Skip to content

Instantly share code, notes, and snippets.

View mileslauridsen's full-sized avatar

mileslauridsen

View GitHub Profile
@jprjr
jprjr / Dockerfile
Created November 26, 2013 23:09
Setting up pyenv in docker
FROM tianon/centos-null:5.9
RUN rpm -i http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RUN yum -y update
RUN yum -y install gcc git curl make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl openssl-devel
RUN useradd -m python_user
RUN ln -s /proc/self/fd /dev/fd
@petrklus
petrklus / rgb_to_kelvin.py
Last active April 10, 2024 11:20
Kelvin to RGB in python
"""
Based on: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
Comments resceived: https://gist.github.com/petrklus/b1f427accdf7438606a6
Original pseudo code:
Set Temperature = Temperature \ 100
Calculate Red:
If Temperature <= 66 Then
@ivogrig
ivogrig / aimRotation.py
Last active March 27, 2022 04:15
Example method for turning a direction vector into an euler rotation (TD SDK)
# python
#
# Example method for turning a direction vector into an euler rotation
#
# There is a similar example using the API for this by Lukasz Pazera: https://gist.github.com/lukpazera/5994547
# This function really does the same, using the mathutils of the TD SDK
import modo
import math
# --------------------------------------------------------------
# defaultBackdrop.py
# Version: 1.1.0
# Last Updated: January 11th, 2018
# --------------------------------------------------------------
# --------------------------------------------------------------
# USAGE:
#
# --------------------------------------------------------------
# autoContactSheet.py + csTextShortcuts()
# Version: 0.2.0
# Last Updated: August 23rd, 2018
# --------------------------------------------------------------
# --------------------------------------------------------------
# USAGE:
#
@jedypod
jedypod / CalibrateMacbeth.nk
Last active March 20, 2024 14:52
Calibrate Macbeth: a Nuke tool to calibrate an image containing a Macbeth ColorChecker chart by calculating a ColorMatrix node that conforms it to a specified colorspace gamut.
set cut_paste_input [stack 0]
version 14.0 v2
push $cut_paste_input
Group {
name CalibrateMacbeth
tile_color 0x87aee7ff
selected true
xpos 197
ypos -199
addUserKnob {20 CalibrateMacbeth}
@jedypod
jedypod / Transform.cpp
Last active October 23, 2023 09:21
Nuke blinkscript implementation of a simple image Transform operator. This blinkscript demonstrates pixel filter interpolation algorithms.
/*
Nuke blinkscript implementation of a simple image Transform operator.
Demonstrates pixel filter interpolation algorithms.
The following pixel filters are implemented:
0 - Blackman-Harris : Similar to cubic, but better performance in high frequencies
1 - Lanczos4 : 2x2 lanczos windowed sinc function
2 - Lanczos6 : 3x3 lanczos windowed sinc function
3 - Cubic : (Bicubic interpolation) - a=0.0, b=0.0
4 - Mitchell : (Bicubic interpolation) - a=1/3, b=1/3