Skip to content

Instantly share code, notes, and snippets.

nickv2002 /
Created Jan 19, 2020
Transcode Found Video Files to HEVC (H.265) and optimally remove the older versions
#!/usr/bin/env python3
import os
import sys
import glob
import subprocess
import shlex
import shutil
import pathlib
import itertools
#!/usr/bin/env python
# coding=utf-8
import json, os, sys, io, re
from pprint import pprint
with'/Users/nick/Documents/dominiontabs/card_db/en_us/cards.json') as data_file:
cardDict = json.load(data_file)
with'/Users/nick/Documents/dominiontabs/card_db/en_us/card_groups.json') as data_file:
groupDict = json.load(data_file)
nickv2002 / YouTubePlayerViaTVJS.swift
Last active Oct 21, 2021
Swift code to play YouTube videos on AppleTV tvOS via a TVJS call using XCDYouTubeKit
View YouTubePlayerViaTVJS.swift
// Created by Nick Vance on 12/4/15.
// Copyright © 2015 ToWatchList. All rights reserved.
import AVKit
import XCDYouTubeKit
import TVMLKit
class YTPlayerViewController: AVPlayerViewController, AVPlayerViewControllerDelegate {
nickv2002 /
Last active Jul 28, 2021 — forked from bhawkins/
1-Dimentional Mean and Median Filters
#!/usr/bin/env python
def medfilt (x, k):
"""Apply a length-k median filter to a 1D array x.
Boundaries are extended by repeating endpoints.
import numpy as np
assert k % 2 == 1, "Median filter length must be odd."
assert x.ndim == 1, "Input must be one-dimensional."