Skip to content

Instantly share code, notes, and snippets.

View thomasmansencal's full-sized avatar
🔅
Bending Light

Thomas Mansencal thomasmansencal

🔅
Bending Light
View GitHub Profile
@thomasmansencal
thomasmansencal / cornell_box_to_sRGB.py
Last active October 23, 2021 14:19
Cornell Box to sRGB
import numpy as np
import colour
D = np.array([
[400, 0.343, 0.092, 0.040],
[404, 0.445, 0.096, 0.046],
[408, 0.551, 0.098, 0.048],
[412, 0.624, 0.097, 0.053],
[416, 0.665, 0.098, 0.049],
[420, 0.687, 0.095, 0.050],
@thomasmansencal
thomasmansencal / pyproject.toml
Created September 28, 2019 04:32
Colour - pyproject.toml
[tool.poetry]
name = "colour-science"
packages = [
{ include="colour", from="." },
]
version = "0.3.13"
description = "Colour Science for Python"
license = "BSD-3-Clause"
authors = [ "Colour Developers" ]
readme = 'README.rst'
@thomasmansencal
thomasmansencal / artifact.yml
Created September 18, 2019 10:24
A.R.T. - Artifact
name: A.R.T. - Artifact
on: [push]
jobs:
build:
runs-on: macOS-10.14
steps:
@thomasmansencal
thomasmansencal / .travis.yml
Created September 17, 2019 06:43
OpenImageIO - Artifacts
dist: bionic
sudo: true
language: python
matrix:
fast_finish: true
include:
- python: 3.6
env:
- PYTHON_VERSION="3.6"
# -*- coding: utf-8 -*-
"""
Mock for Colour
===============
Defines various objects for mocking to use with
`Colour <https://github.com/colour-science/colour>`_.
References
----------
@thomasmansencal
thomasmansencal / Dockerfile
Last active July 17, 2019 23:59
ociolutimage - Docker Wrapper
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y \
build-essential \
git \
freeglut3-dev \
libglew-dev \
libilmbase-dev \
@thomasmansencal
thomasmansencal / Pinboard.scpt
Created March 9, 2019 19:20 — forked from itst/Pinboard.scpt
Import and update your Pinboard bookmarks to DEVONthink
(* Import and update your Pinboard bookmarks to DEVONthink
Based on work done by Christian Grunenberg on Mon Jan 23 2006,
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished.
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items
Copyright (c) 2018. All rights reserved. *)
use framework "Foundation"
@thomasmansencal
thomasmansencal / barten.py
Created January 31, 2019 19:38
Contrast Sensitivity Function - Barten (1999)
# https://pure.tue.nl/ws/files/1613279/9901043.pdf
#http://car.france3.mars.free.fr/Formation%20INA%20HD/HDTV/HDTV%20%202007%20v35/SMPTE%20normes%20et%20confs/Contrastm.pdf
# %%
from __future__ import division
import matplotlib.pyplot as plt
import numpy as np
from colour.utilities import as_float_array
from colour.plotting import colour_style, plot_single_function
@thomasmansencal
thomasmansencal / add_labels.py
Created January 24, 2019 08:52
LaTeX - Add Labels
import codecs
import fnmatch
import os
import re
def _sanitize_filename(filename):
"""
Sanitizes given filename.
Parameters