Skip to content

Instantly share code, notes, and snippets.

View zachlewis's full-sized avatar

zachlewis

  • Method Studios
View GitHub Profile
@zachlewis
zachlewis / NumericLookup.py
Last active May 23, 2022 22:31
NumericLookup
import numpy as np
class NumericLookup(dict):
"""
Extends *dict* type to provide a lookup by value(s), including numpy arrays.
Methods
-------
keys_from_value
first_key_from_value
@zachlewis
zachlewis / aces_ot_candidates_ocio_config.ipynb
Last active September 22, 2023 12:19
ACES_OT_Candidates_ocio_config.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zachlewis
zachlewis / set_ocio_transform_metadata.py
Created November 29, 2021 16:31
PyOpenColorIO format metadata method
import PyOpenColorIO as ocio
from typing import Union, List
def set_transform_metadata(
transform: ocio.Transform,
name: str = "",
id: str = "",
description: Union[str, List[str]] = "",
input_descriptor: str = "",
output_descriptor: str = "",
@zachlewis
zachlewis / SessionState.py
Created January 22, 2021 01:57 — forked from tvst/SessionState.py
A possible design for doing per-session persistent state in Streamlit
"""Hack to add per-session state to Streamlit.
Usage
-----
>>> import SessionState
>>>
>>> session_state = SessionState.get(user_name='', favorite_color='black')
>>> session_state.user_name
''
@zachlewis
zachlewis / package.py
Last active January 24, 2021 06:27
cmake rez package
# -*- coding: utf-8 -*-
name = 'cmake'
version = '3.17.2'
description = 'Cross-platform make system'
tools = [
'ccmake',
@zachlewis
zachlewis / package.py
Last active January 25, 2021 01:16
zlib rez package
name = 'zlib'
version = '1.2.11'
description = \
'''
zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library.
'''
authors = ['www.zlib.net']
@zachlewis
zachlewis / package.py
Last active February 14, 2022 03:25
alternate python rez package
name = "python"
version = "3.8.6"
authors = [
"Guido van Rossum"
]
description = \
"""
@zachlewis
zachlewis / package.py
Created December 7, 2020 23:43
protobuf_cpp rez package
# -*- coding: utf-8 -*-
name = 'protobuf_cpp'
version = '3.5.1'
description = 'protocol buffers'
authors = ['google']
@zachlewis
zachlewis / package.py
Created December 7, 2020 23:41
nuke_ml_client rez package
# -*- coding: utf-8 -*-
name = 'nuke_ml_client'
version = '0.0.8.dev20081200'
description = ''
authors = ['Foundry']
@zachlewis
zachlewis / package.py
Created December 7, 2020 23:23
mmdetection rez package
name = 'mmdetection'
version = '2.3.0.z0'
description = \
'''
MMDetection is an open source object detection toolbox based on PyTorch.
It is a part of the OpenMMLab project developed by Multimedia Laboratory, CUHK.
'''