Skip to content

Instantly share code, notes, and snippets.

View satwickdash's full-sized avatar

Satwick Dash satwickdash

  • Faridabad, India
View GitHub Profile
@satwickdash
satwickdash / ex_handler.cpp
Created June 20, 2021 20:56
Basic example for a signal handler
// Shamelessly copied from https://github.com/microsoft/WSL/issues/3657#issuecomment-437684189
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/ucontext.h>
#include <signal.h>
#include <fenv.h>
#include <errno.h>
@satwickdash
satwickdash / PageRipoff.go
Created August 6, 2020 20:38
Copy files from an FTP index to local folder
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"path"
"strings"
@satwickdash
satwickdash / SimplisticUnintimidatingQuestions.json
Last active July 28, 2019 19:59
DS and Algorithms revision
{
"urls": [
"https://www.reddit.com/r/cscareerquestions/comments/1wkwg5/what_do_employers_expect_an_entry_level_developer/",
"https://www.reddit.com/r/cscareerquestions/comments/apu3ni/a_list_of_questions_i_was_asked_at_top_tech/",
"https://docs.google.com/document/d/1t0mEmfmZHO3iG8UBYMwNskvqAX-bUrl_7c-cmAOAub4/edit#"
]
}
@satwickdash
satwickdash / face.ply
Created October 29, 2018 06:23
gist for reference to issue on Open3D
ply
format ascii 1.0
comment VCGLIB generated
element vertex 5635
property float x
property float y
property float z
element face 10586
property list uchar int vertex_indices
end_header
@satwickdash
satwickdash / voicerecognizer_mfcc.csv
Last active October 9, 2018 09:58
gist for reference to stackoverflow
-2.5103444192337996 -0.3096888755853681 0.526193345403089 -0.25827194638764117 -1.30716079505194 2.2195062012717135 -3.9257672930536964 2.335835231452124 -1.8597536612873713 2.375444656645525 -2.283656710693214 0.5890862890071983 0.664488201744981 0.4509780503913681 0.06686198631835641 0.4363887311172125 0.8126182931569115 -0.6637228358610616
-9.839546660012505 -1.259152661866222 -2.8549022281014462 -1.9423535522707325 -1.5330548873007104 -1.9962757387540873 -1.1559720112393308 0.024971211641424226 1.865010005578441 0.6345867524092516 0.6415235631101261 0.9447180168155196 -0.10394480605663659 0.16877415976473392 1.3218829880433844 -0.18314980464516117 0.3360142474228567 2.314732138980734
-5.941613839600187 0.5976989762270188 -1.9898146804699357 0.4381427744763807 0.4851251848670788 0.8229484352312898 -0.9967600628321518 0.2913133938719 -0.23657800371371787 1.104321535718264 0.4813998493175361 1.0145775724719874 -0.9264991457632795 0.41780769704019705 0.1563614844053296 -0.4183210741397966 0.22861329400414637
@satwickdash
satwickdash / GaussianComponent.java
Last active September 25, 2018 11:01
A java class that creates GaussianMixture model. Created for reference from stackoverflow.
package com.example.javagmm;
import java.util.Random;
/**
* <b>Gaussian Component</b>
*
* <p>Description: </p>
* A <code>GaussianMixture</code> consists of several gaussian components, which
@satwickdash
satwickdash / automate.py
Last active September 4, 2017 16:57
ffmpeg-automate
import os
import subprocess
import time
def invoke_ffmpeg(npath):
filename = os.listdir(npath)[0]
filepath = npath + filename
print("-i " + filepath)
result = subprocess.call(['ffmpeg', '-i', filepath, '-c:v', 'libx265', '-c:a', 'copy', '-c:s', 'copy',