Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / OCR Scan
Created February 22, 2010 21:42
#!/bin/sh
SOURCE=""
if [ $# -gt 1 ]
then
SOURCE="--source ADF -l 3"
outname=$2
pbreak=$1
@albertsun
albertsun / calculate_pareto_median.py
Created September 27, 2011 18:18
Pareto Interpolation
# http://en.wikipedia.org/wiki/Pareto_interpolation
# Example Pareto interpolation to calculate household median income.
# Assumes that incomedata is a list of 17 elements containing table B19001 from the United States ACS 5-year summary file
from math import log
def calculate_median(incomedata):
bucket_tops = [10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, 75000, 100000, 125000, 150000, 200000]
total = incomedata[0]
for i in range(2,18):
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@onyxfish
onyxfish / README.md
Created March 30, 2017 14:06
Import the entire Bureau of Labor Statistics (BLS) Quarterly Census of Wages (QCEW) dataset into a PostgreSQL database

QCEW Data Loader

These scripts import the entire Bureau of Labor Statistics Quarterly Census of Employement and Wages (from 1990 to latest) into one giant PostgreSQL database.

The database created by this process will use about 100GB of disk space. Make sure you have enough space available before you start!

Configuration

Database name, table name, and more can be configured via config.sh.

[req]
default_bits = 2048
default_md = sha256
string_mask = utf8only
prompt = no
encrypt_key = no
distinguished_name = @req_dn
x509_extensions = @req_ext
[req_dn]
@steven2358
steven2358 / ffmpeg.md
Last active July 22, 2024 08:40
FFmpeg cheat sheet
@fedme
fedme / Ionic Android Development on WSL.md
Last active May 7, 2023 16:21
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active July 22, 2024 11:13
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active July 22, 2024 15:30
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@ksopyla
ksopyla / install_cuda_11_ubuntu_2004.md
Last active July 15, 2024 02:23
How to install CUDA toolkit 11 at ubuntu 20.04

Step by step instruction how to install CUDA 11 Ubuntu 20.04

NVidia Ubuntu 20.04 repository for CUDA 11

If you need CUDA Tolkit 11 with nvcc, other tools and libraries you can install it from NVIDIA Ubunutu 20.04 repository.

Add Ubuntu 20.04 repository