Skip to content

Instantly share code, notes, and snippets.

View arnabanimesh's full-sized avatar

Arnab Animesh Das arnabanimesh

View GitHub Profile
@arnabanimesh
arnabanimesh / tsp_ortools.ipynb
Last active March 4, 2024 10:31
tsp implementations in or_tools (single core only, ORTools v9.9.3903, Ubuntu 22.04 LTS WSL2)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arnabanimesh
arnabanimesh / rustlings.cmd
Created January 2, 2021 16:03
Rustlings Windows Runner using VSCode and Windows Terminal
@REM RUSTLINGS Environment variable should point to the Rustlings folder containing the exercises
@echo off
setlocal enableDelayedExpansion
if %RUSTLINGS%==%RUSTLINGS% (
cd %RUSTLINGS%
wt -d . rustlings watch
start "" "%LOCALAPPDATA%\Programs\Microsoft VS Code\Code" .
exit
)
@arnabanimesh
arnabanimesh / read_data.c
Last active January 10, 2023 20:59
read a file with three tab separated columns. Ignore the first column, the second column is a string, the third column is a number.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LINE_LENGTH 1024
typedef struct
{
char *SKU;
long *count;

Since we're dealing with simpler AV1 encoding, that does mean we'll be eskewing aomenc-av1, since it requires 2-pass encoding to be able to take advantage of it, and I use it externally since I have access to a special build.

Now, let's get on with the simple guide.

You'll first need to be reasonably competent with command line builds or use a recent up to date ffmpeg GUI with support for SVT-AV1.

As such, I would recommend getting a master git ffmpeg build for the operating system of your choice right here:

https://github.com/BtbN/FFmpeg-Builds

@arnabanimesh
arnabanimesh / bench.md
Last active April 28, 2022 20:08
FISR speed test mentioned in the video: https://www.youtube.com/watch?v=Fm0vygzVXeE

Benchmark sqrt.rs (Command: rustc -O sqrt.rs)

Sanity checks:
============================================
Sqrt = 1000
isqrt = 1000
fisqrt = 998
intrsqrt = 1000
============================================
@arnabanimesh
arnabanimesh / wikipedia31.txt
Created February 23, 2022 02:06
Princeton Percolation Assignment Custom Inputs
31
1 1
2 1
3 1
4 1
5 1
5 2
5 3
5 4
5 5
@arnabanimesh
arnabanimesh / knownlines.rs
Last active December 17, 2020 15:09
Multiline rust input with known and unknown number of lines
//https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9cb93f0342793c225be94aa46897c25a
use std::io::{Cursor, BufReader};
// for console input replace the above line with this
// use std::io::stdin;
fn main() {
// simulate stdin in rust playground
let f = Cursor::new("3\n40 3\n30 4\n20 5".to_string());
let input = BufReader::new(f);
let mut vec = input.lines();
@arnabanimesh
arnabanimesh / Cargo.toml
Created December 6, 2020 11:07
Example cairo project
[package]
name = "draw"
version = "0.1.0"
authors = ["author <author@email.com>"]
edition = "2018"
[dependencies]
cairo-rs = { version = "0.9.1", features = ["png"] }
png = "0.16.7"
@arnabanimesh
arnabanimesh / player.bat
Created November 22, 2020 20:20
Side by side audioless video player
@ECHO OFF
where /q ffplay
IF ERRORLEVEL 1 (
ECHO ffplay.exe not found.
ECHO Download ffmpeg from https://ffmpeg.org and add the ffplay executable to the PATH
PAUSE
) ELSE (
ECHO Side by side audioless video player
ECHO.
ECHO Enter the names with extension. e.g.: sample video.mp4
@arnabanimesh
arnabanimesh / settings.json
Last active November 20, 2020 17:45
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",