Skip to content

Instantly share code, notes, and snippets.


Chris Griffith cdgriffith

View GitHub Profile
View gist:069b4728d6c35871076ffb17d779be4e
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
CPU Family: 0x6
cdgriffith /
Last active Mar 14, 2021
Download Movie Posters from imdb
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
Requires python3 and requests library (pip install requests)
Provide the folder containing all the other folders of movies as the only arguement.
python3 "C:\My Movies"
cdgriffith /
Created Jan 25, 2021
Use the standard library as Egyptian Hieroglyphs!
# Usage: from rosetta_stone import *
import abc as 𓀀
import aifc as 𓀁
import argparse as 𓀃
import ast as 𓀄
import asynchat as 𓀅
import asyncio as 𓀆
import asyncore as 𓀇
import base64 as 𓀈
cdgriffith /
Created Jul 2, 2020
Compare a movie via VMAF to a lot of different encoding settings
from subprocess import run, PIPE, STDOUT
from pathlib import Path
from datetime import datetime
import os
movie_file = "video_compare/glass.mp4"
file_name = "glass"
output_directory = "video_compare/ffmpeg"
cdgriffith /
Created Oct 25, 2019
HDR color primaries and luminance passthrough options
#!/usr/bin/env python
from subprocess import run, PIPE
import re
import sys
import json
su = re.compile(r'",\s*}')
def run_ffprobe(video_file):

Keybase proof

I hereby claim:

  • I am cdgriffith on github.
  • I am cdgriffith ( on keybase.
  • I have a public key ASBaFmoTGd3xUm-9c-oMYpdLjv4qGdCDApkAQaQLgGuHJQo

To claim this, I am signing this object:

cdgriffith / transactionParser.js
Last active Jan 19, 2018
NiceHash Transaction Parser
View transactionParser.js
Takes a NiceHash mining transaction CSV file and converts it to a monthly average. Ignores non-mining lines.
Requires `csv`
$ npm install csv
Example usage:
$ node transactionParser.js
import reusables
import os
# to be fair, start out at same state for both tests
os.makedirs("folder", exist_ok=True)
def test_lbyl(remove_folder=False):
cdgriffith /
Created Jun 22, 2017
Python EAFP vs LBYL speeds
import reusables
def test_lbyl(messages):
out = []
for _ in range(10000):
if messages and messages[0] and len(messages[0]) >= 3:
return out
cdgriffith /
Last active Nov 21, 2020
Python RC file
# In .bashrc and .profile
# pip install python-box reusables pdir2
from __future__ import print_function, with_statement, absolute_import
from box import Box, BoxList
except ImportError:
print("Box not available")