Skip to content

Instantly share code, notes, and snippets.

/**
* Performs a greedy algorithm on the chunk vmaf data to produce a list of cq values that maximizes the average vmaf of
* the entire encode without going over the [SIZE_LIMIT].
*
* This is a variation of the 0-1 knapsack problem. Due to the extra constraint of needing one of each chunk, the
* pseudo-polynomial algorithm cannot be applied. Instead, we make the following assumptions to reach a good local
* maximum.
*
* For any chunk c and cq value q,
* - vmaf(c, q - 1) > vmaf(c, q) and
@RomaniukVadim
RomaniukVadim / bspwm.txt
Created April 6, 2018 22:02
Bspwm install arch linux
Binary Space Partitioning Window Manager = bspwm
Youtube Video: https://youtu.be/ZbXQUOwcH08
bspwm install
pacman packages:
bspwm
sxhkd
@ssokolow
ssokolow / Cargo.toml
Last active April 14, 2021 21:43
Simple example of getting the rust-cpython and setuptools-rust examples working together
[package]
name = "unimportant_if_subsumed_by_setuptools"
version = "0.1.0"
authors = ["Your Name Here <your@email.com>"]
[lib]
name = "unimportant_if_subsumed_by_setuptools"
crate-type = ["cdylib"]
[dependencies.cpython]
@sirodoht
sirodoht / migrate-django.md
Last active June 12, 2024 17:22
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@alemonmk
alemonmk / make_comparision.py
Last active February 21, 2021 15:48
Use VapourSynth to extract video frames for comparision
import vapoursynth as vs
import random
from os import mkdir
from os.path import exists, basename, dirname, splitext
import numpy as np
import cv2 as cv
import mvsfunc as mvs
core = vs.get_core()
encodeddir = r''
@protrolium
protrolium / ffmpeg.md
Last active June 15, 2024 01:28
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: