Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Griffith cdgriffith

View GitHub Profile
@cdgriffith
cdgriffith / FSR.glsl
Created Feb 24, 2022 — forked from agyild/FSR.glsl
AMD FidelityFX Super Resolution v1.0.2 for mpv
View FSR.glsl
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
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
cdgriffith / download_movie_posters.py
Last active Mar 14, 2021
Download Movie Posters from imdb
View download_movie_posters.py
#!/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 download_movie_posters.py "C:\My Movies"
"""
@cdgriffith
cdgriffith / rosetta_stone.py
Created Jan 25, 2021
Use the standard library as Egyptian Hieroglyphs!
View rosetta_stone.py
# 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
cdgriffith / compare_vmaf_ssim.py
Created Jul 2, 2020
Compare a movie via VMAF to a lot of different encoding settings
View compare_vmaf_ssim.py
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
cdgriffith / x265_passthrough.py
Created Oct 25, 2019
HDR color primaries and luminance passthrough options
View x265_passthrough.py
#!/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):
View keybase.md

Keybase proof

I hereby claim:

  • I am cdgriffith on github.
  • I am cdgriffith (https://keybase.io/cdgriffith) on keybase.
  • I have a public key ASBaFmoTGd3xUm-9c-oMYpdLjv4qGdCDApkAQaQLgGuHJQo

To claim this, I am signing this object:

@cdgriffith
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
View eafp_vs_lbyl_file_operations.py
import reusables
import os
# to be fair, start out at same state for both tests
os.makedirs("folder", exist_ok=True)
@reusables.time_it()
def test_lbyl(remove_folder=False):
@cdgriffith
cdgriffith / eafp_vs_lbyl.py
Created Jun 22, 2017
Python EAFP vs LBYL speeds
View eafp_vs_lbyl.py
import reusables
@reusables.time_it()
def test_lbyl(messages):
out = []
for _ in range(10000):
if messages and messages[0] and len(messages[0]) >= 3:
out.append(messages[0][2])
return out