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 Apr 29, 2022
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 Apr 27, 2022
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 Jul 26, 2022
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 Sep 25, 2021 — 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 Mar 11, 2021
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 Oct 17, 2022
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 Oct 27, 2020
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