Skip to content

Instantly share code, notes, and snippets.

View KelSolaar's full-sized avatar
🔅
Bending Light

Thomas Mansencal KelSolaar

🔅
Bending Light
View GitHub Profile
@KelSolaar
KelSolaar / three_js_helpers.py
Created July 19, 2018 09:58
Three.js - Helpers
def face_mask(
quad=False,
material=False,
face_uvs=False,
face_vertex_uvs=False,
face_normals=False,
face_vertex_normals=False,
face_colours=False,
face_vertex_colours=False,
@KelSolaar
KelSolaar / colour_blender.py
Created July 9, 2018 10:23
Colour - Blender
import bpy
from colour.models import RGB_COLOURSPACES, RGB_to_XYZ, \
XYZ_to_colourspace_model
def RGB_identity_cube(subdivisions=32):
bpy.ops.mesh.primitive_cube_add(location=(0.5, 0.5, 0.5))
bpy.ops.transform.resize(value=(0.5, 0.5, 0.5))
bpy.ops.object.transform_apply(location=True, scale=True)
wavelength HeNe Laser
301.2475431 121.7295551
303.5565712 123.2564968
305.8655993 120.5549846
308.1746274 122.0819263
310.4836555 120.9073557
312.7926836 120.7898987
315.1017117 120.3200705
317.4107398 121.377184
319.719768 121.8470122
@KelSolaar
KelSolaar / invoke.sh
Last active July 9, 2018 04:53
Docker - Bash Shell Helpers
#!/usr/bin/env bash
# Container Information
CONTAINER_IMAGE="nginx:latest"
CONTAINER_NAME="nginx"
# Container Run Command
run-container() {
docker run \
-d \
--restart always \
@KelSolaar
KelSolaar / nginx.conf
Created June 16, 2018 07:57 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@KelSolaar
KelSolaar / V35_IDT.nkp
Created May 28, 2018 07:42
Panasonic Varicam V35 IDT
set cut_paste_input [stack 0]
version 10.5 v2
push $cut_paste_input
Expression {
temp_name0 cutInv
temp_expr0 0.181
temp_name1 b_
temp_expr1 0.00873
temp_name2 c
temp_expr2 0.241514
@KelSolaar
KelSolaar / multi_spectral_to_XYZ_integration.py
Created March 21, 2018 06:12
Multi-Spectral to XYZ - Integration
#%%
import glob
import numpy as np
import colour
from colour import (DEFAULT_SPECTRAL_SHAPE, STANDARD_OBSERVERS_CMFS, ones_spd,
read_image)
from colour.utilities import tsplit, tstack, warning
from colour.plotting import image_plot
@KelSolaar
KelSolaar / matplotlib-imshow-clip-path-limits.ipynb
Created February 19, 2018 08:45
Matplotlib - imshow, Clip Path and Limits
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / image_sequence_to_chromaticity_diagram.py
Created January 12, 2018 23:10
Image Sequence to Chromaticity Diagram
import glob
import os
import colour
from colour.plotting import RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1931
def image_sequence_to_chromaticity_diagram(images,
output_directory,
input_colourspace='sRGB',
@KelSolaar
KelSolaar / cie_lab_to_munsell_colour.py
Created December 4, 2017 20:45
CIE L*a*b* to Munsell Colour
import colour
import numpy as np
# CIE L*a*b* input data
Lab = np.array([79.57, -1.61, 13.05])
# Assumed illuminant used for CIE L*a*b* measurements, could be D65.
illuminant_t = colour.ILLUMINANTS[
'CIE 1931 2 Degree Standard Observer']['D50']
# Munsell Renotation System illuminant.