Skip to content

Instantly share code, notes, and snippets.

View balvinder294's full-sized avatar
😎
Working Remotey

Balvinder Singh balvinder294

😎
Working Remotey
View GitHub Profile
#!/usr/bin/env python
import sys
import json
import datetime
# Feed me with output of:
# ffprobe -f lavfi -i movie=INPUT.mov,ocr -show_entries frame=pkt_dts_time:frame_tags=lavfi.ocr.text -of json
input= sys.argv[1]
id = 0
old_time = '00:00:00,000'
@alexcasalboni
alexcasalboni / amazon-rekognition.md
Last active September 6, 2023 15:20
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search

install nodejs & npm

sudo apt-get install nodejs
sudo apt-get install npm

fix naming issue of node to ubuntu

ln -s /usr/bin/nodejs /usr/bin/node
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
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:

@madhums
madhums / base64-image-upload.js
Created September 14, 2014 17:37
save base64 encoded image
/*
* Taken from http://stackoverflow.com/questions/5867534/how-to-save-canvas-data-to-file/5971674#5971674
*/
var fs = require('fs');
// string generated by canvas.toDataURL()
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0"
+ "NAAAAKElEQVQ4jWNgYGD4Twzu6FhFFGYYNXDUwGFpIAk2E4dHDRw1cDgaCAASFOffhEIO"
+ "3gAAAABJRU5ErkJggg==";
// strip off the data: url prefix to get just the base64-encoded bytes