Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Thomas Mansencal KelSolaar

Block or report user

Report or block KelSolaar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mock_for_colour.py
# -*- coding: utf-8 -*-
"""
Mock for Colour
===============
Defines various objects for mocking to use with
`Colour <https://github.com/colour-science/colour>`_.
References
----------
@KelSolaar
KelSolaar / Dockerfile
Last active Mar 28, 2019
ociolutimage - Docker Wrapper
View Dockerfile
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y \
build-essential \
git \
freeglut3-dev \
libglew-dev \
libilmbase-dev \
View cheatsheet.rst
@KelSolaar
KelSolaar / Pinboard.scpt
Created Mar 9, 2019 — forked from itst/Pinboard.scpt
Import and update your Pinboard bookmarks to DEVONthink
View Pinboard.scpt
(* 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"
@KelSolaar
KelSolaar / barten.py
Created Jan 31, 2019
Contrast Sensitivity Function - Barten (1999)
View barten.py
# 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
@KelSolaar
KelSolaar / add_labels.py
Created Jan 24, 2019
LaTeX - Add Labels
View add_labels.py
import codecs
import fnmatch
import os
import re
def _sanitize_filename(filename):
"""
Sanitizes given filename.
Parameters
@KelSolaar
KelSolaar / inkscape.py
Last active Jan 18, 2019
Inkscape - macOs - Absolute Path Wrapper
View inkscape.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Inkscape - macOs - Absolute Path Wrapper
========================================
On *macOs*, *Inkscape* requires absolute paths to work::
https://answers.launchpad.net/inkscape/+question/280575
@KelSolaar
KelSolaar / colour-0.3.14-current-changes.md
Last active May 18, 2019
Colour 0.3.14 - Current Changes
View colour-0.3.14-current-changes.md

Colour 0.3.14 - Alpha Milestone

Coverage was raised to 100% which is about 25K lines covered, it obviously does not mean that all the possible code paths are covered but it certainly strengthen the API.

Imageio is now a requirement for reading and writing images.

Various colour component transfer functions objects have been either renamed or their signature changed, most notably the sRGB transfer functions and the colour.oetf definition.

Features

@KelSolaar
KelSolaar / colour_examples_and_unit_tests_recommended_values.py
Last active Nov 4, 2018
Recommended Values for Use in Colour Examples and Unit Tests
View colour_examples_and_unit_tests_recommended_values.py
@KelSolaar
KelSolaar / mitsuba_export_spds.py
Last active Oct 12, 2018
Mitsuba - Shader Balls
View mitsuba_export_spds.py
for name, spd in SPDS.items():
prefix = ''.join([token.title() for token in spd.name.split()])
prefix = prefix.replace('.', '_')
prefix = prefix.replace('(', '_')
prefix = prefix.replace(')', '_')
filename = '/Users/kelsolaar/Google Drive/Cinematic Color Update/Supporting Documents/Spectral/ShaderBalls/ColorChecker N Ohta/{0}.spd'.format(prefix)
colour.write_spds_to_csv_file({spd.name: spd}, filename, delimiter=' ')
with open(filename, 'r') as csv_file:
You can’t perform that action at this time.