Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on new projects!

Caleb Trevatt in03

💭
Working on new projects!
View GitHub Profile
@in03
in03 / cross_platform_path_mapping.py
Created April 29, 2022 21:53
Convert network-share mount points between platforms using path-mapping
View cross_platform_path_mapping.py
import platform
import os
def resolve_path_map(rpath, path_map_list, strict=True):
target_os = platform.system().lower()
rpath = os.path.normpath(rpath)
for path_maps in path_map_list:
@in03
in03 / resolve_network_path.py
Last active April 27, 2022 23:53
Resolve cross-platform network paths from local mapped mounts
View resolve_network_path.py
import logging
import os
import pathlib
import socket
def resolve_network_path(local_path, strict=True):
"""
Resolve cross-platform network paths from local mapped mounts
Args:
- local_path (str): local path to resolve
@in03
in03 / AHK_Resolve_Master.ahk
Last active July 26, 2022 19:50
DaVinci Resolve AutoHotkey scripts - not exhaustive! Examples for others.
View AHK_Resolve_Master.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn, All
#Warn, Unreachable, Off ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%\ResolveHelper ; Ensures a consistent starting directory.
SetDefaultMouseSpeed 1
#SingleInstance, Force
@in03
in03 / Currently-Opened-Folders.md
Created September 25, 2021 01:02 — forked from akaleeroy/Currently-Opened-Folders.md
Easy Access to Currently Opened Folders
View Currently-Opened-Folders.md

Easy Access to Currently Opened Folders

Windows Enhancement Productivity

Enhance Open... or Save As... dialogs with a quick way to navigate to currently opened folders.

Easy Access to Currently Opened Folders - Demo

This is an AutoHotkey script that gives common file selection dialogs an extra feature: middle-clicking invokes a menu of currently opened folders. Say you want to save or upload something to/from a folder you've got open in Windows Explorer. The dialog box pops up with the last folder (from another project) or My Documents, and now you have to manually navigate to the folder you want, or copy-paste its path from the open Explorer window. I wanted to get to the active locations quicker. Recent Items wasn't exactly helping, so I made this by forking FavoriteFolders.ahk by Savage. Tested

@in03
in03 / multithreaded-socket-server.py
Created March 11, 2021 12:28
socket server using multithreading to catch keyboard interrupts
View multithreaded-socket-server.py
# Thanks GratefulGuest from SO:
# https://stackoverflow.com/questions/34871191/cant-close-socket-on-keyboardinterrupt
from multiprocessing import Pipe, Process
from socket import socket, AF_INET, SOCK_STREAM
from threading import Thread
import time
def detect_interrupt(conn):
try:
@in03
in03 / encode_resolve_proxies.py
Last active February 26, 2023 13:55
Encode proxies for DaVinci Resolve using FFMpeg
View encode_resolve_proxies.py
# Windows: Create a shortcut to a .bat file in 'shell:sendto' to call this script with files passed as arguments
# Use with 'save_proxy_clip_list.py' gist to quickly pull used timeline clips into FFMPEG.
# Use 'link_proxies.py' gist to relink proxies correctly.
# Bug in current Resolve release links clips wrongly to one or two proxies only.
# This assumes FFMPEG is on path.
import os, sys, shutil
import subprocess
import argparse
import pathlib
@in03
in03 / black-edge-check.py
Last active October 27, 2020 03:37
Video Blanking Detection
View black-edge-check.py
import sys
import os
import cv2
import numpy as np
import time
from tqdm import tqdm
from plyer import notification