Skip to content

Instantly share code, notes, and snippets.

@pqcfox
pqcfox / sat.py
Last active April 20, 2021 14:57
A tiny DPLL SAT solver in pure Python 🔬
"""sat.py: a simple DPLL SAT solver in pure python.
The API is designed to be as simple as possible:
>>> x = Var('x')
>>> y = Var('y')
>>> z = Var('z')
>>> DPLL([(x, y, z),
... (x, y, ~z),
... (x, ~y, z),
@dvlden
dvlden / ffmpeg.md
Last active July 7, 2024 17:09
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@walkoncross
walkoncross / numpy-image-bgr-to-rgb.md
Last active March 20, 2023 16:49
Numpy / OpenCV image BGR to RGB

(from https://www.scivision.co/numpy-image-bgr-to-rgb/)

Numpy / OpenCV image BGR to RGB

Conversion between any/all of BGR, RGB, and GBR may be necessary when working with Matplotlib expects M x N x 3 image, where last dimension is RGB.

OpenCV expects M x N x 3 image, where last dimension is BGR.

Scientific Cameras, some of which output an M X N x 3 image, where last dimension is GBR