Skip to content

Instantly share code, notes, and snippets.

@keturn
keturn / jupyter_oiio.py
Created March 27, 2025 05:19
openimageio helpers for jupyter notebook
import os
import tempfile
from contextlib import contextmanager
from dataclasses import dataclass
import OpenImageIO as oiio
import einops
DTYPE_TO_OIIO = {
@JeanChristopheMorinPerso
JeanChristopheMorinPerso / README.md
Last active June 20, 2025 15:58
Debugging missing symbol error when importing a python extension on Windows

I stumbled on a case where a user of https://pypi.org/project/OpenImageIO/'s wheels on Windows was reporting that they could not import the library in Nuke 14.1.

To debug the issue, I created an EC2 instance with a GPU using the NVidia WinServer 2022 AMI, installed Nuke and tried to import OpenImageIO. I was able to reproduce immediately.

Let's install OpenImageIO using Nuke's python interpreter:

& 'C:/Program Files/Nuke14.1v6/python.exe' -m pip install OpenImageIO==3.0.3.1 --prefix C:/Users/Administrator/asd

Inside Nuke's script editor:

@nebukadhezer
nebukadhezer / convert_to_multipart.py
Created January 31, 2024 15:43
Oiio Multilayer to Multipart with bit depth conversion
import OpenImageIO as oiio
from OpenImageIO import ImageInput, ImageOutput
from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo
from collections import OrderedDict
import fnmatch
import re
import os
path = "in.exr"
@Nastaliss
Nastaliss / generate_github_access_token.sh
Last active June 17, 2025 12:36
Login with a github app and get an access token for ci purpose. This is useful for cloning repository outside of the default scope of the ci github account (e.g. for recursing submodules).
#!/usr/bin/env bash
# Inspired by implementation by Will Haley at:
# http://willhaley.com/blog/generate-jwt-with-bash/
# Stolen from
# https://stackoverflow.com/questions/46657001/how-do-you-create-an-rs256-jwt-assertion-with-bash-shell-scripting
# and simplified to suit our needs
set -euo pipefail
@mmozeiko
mmozeiko / !README.md
Last active July 31, 2025 16:15
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@tobi08151405
tobi08151405 / MyColorpicker.py
Last active January 14, 2025 18:16
Colorpicker for PyQt5
# (c) Teigigutesiegel, 2021
# used code from https://gist.github.com/sjdv1982/75899d10e6983b878f63083e3c47b39b, copyright (c) 2017 Sjoerd de Vries
"""
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@kstkn
kstkn / 00-intro.md
Created March 2, 2021 00:53 — forked from mdo/00-intro.md
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@KelSolaar
KelSolaar / hsv_pseudo_rrt.tcl
Last active February 23, 2021 06:08
HSV - Pseudo RRT
set cut_paste_input [stack 0]
version 12.1 v1
push $cut_paste_input
Colorspace {
illuminant_in ACES
primary_in ACES
bradford_matrix true
name ACES_to_sRGB_Colorspace
selected true
xpos -193
@KelSolaar
KelSolaar / drt_cubes.tcl
Created February 22, 2021 06:04
DRT Cubes
set cut_paste_input [stack 0]
version 12.1 v1
push $cut_paste_input
Camera2 {
translate {2 1.5 2}
rotate {-30 45 0}
focal 30
name Camera
selected true
xpos -186
@francois-durand
francois-durand / Fastcore_presentation.ipynb
Created February 8, 2021 20:12
Fastcore_presentation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.