Skip to content

Instantly share code, notes, and snippets.

View artpar's full-sized avatar
🏠
Working from home

Parth Mudgal artpar

🏠
Working from home
View GitHub Profile
@artpar
artpar / random_text_generator.js
Last active August 29, 2015 14:17
generate random text to be used for typing practice
// choose the characters based on the fingers you want to practice
var chars = "12qwaszx90opl;..c,dk'-=[]!@()_+{}\">?QWASZXOPL>".split("");
function rand(a) {
return a[Math.floor(Math.random() * a.length)]
}
var str = "";
for (var i=0; i<600;i++) {
str += rand(chars);
@artpar
artpar / Underscore.js LOC Stats.markdown
Created October 26, 2015 08:02
Underscore.js LOC Stats
@artpar
artpar / adb.txt
Created March 4, 2016 07:28
remove app from android using adb
DEVICE SHELL COMMAND: pm uninstall io.authme.alterapp
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/io.authme.alterapp"
@artpar
artpar / jetty.txt
Created March 10, 2016 07:38
jetty libraries list
jetty-http-9.0.3.v20130506.jar
jetty-io-9.0.3.v20130506.jar
jetty-security-9.0.3.v20130506.jar
jetty-server-9.0.3.v20130506.jar
jetty-servlet-9.0.3.v20130506.jar
jetty-util-9.0.3.v20130506.jar
@artpar
artpar / Util.java
Last active April 13, 2016 13:22
keyczar util class for keyczar.jar
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@artpar
artpar / fbprophet.md
Created November 9, 2017 12:09
Prophet parameters
  • Coupon day data improves the MSE
  • MSE for lower/upper uncertainity interval improves if we reduce the interval width (to 0.5 vs 0.8 default)
  • Need a lot more data for using 'logistic' growth (with current data, predictions are much higher)
  • The predictions MSE improves in general with more data
  • The lower/upper MSE are not deterministic (they keep changing slightly with every run, with no change in anything else)
  • lower/upper CAP doesnt affect any predictions yet (since we are using high limits)

TODO

  • Channel/stream API - End point which consumes the time series points -
@artpar
artpar / commands.md
Created May 3, 2018 08:21
bash commands collection
  • convert all m4a files in a directory to mp3
for foo in *.m4a; do ffmpeg -i "$foo" -acodec libmp3lame -aq 2 "${foo%.m4a}.mp3"; done
@artpar
artpar / GCP-DEPLOYMENT-README.md
Last active June 22, 2022 04:17
videobug-server-deployment-gcp

Service account HMAC key generation

  1. create a new service account
  2. with perission roles/storage.objectAdmin (access to google cloud storage)
  3. generate HMAC keys
gcloud iam service-accounts create videobug-service-account --display-name "videobug service account"
@artpar
artpar / kubernetes-videobug-deployment.md
Last active June 22, 2022 06:06
Videobug kubernetes deployment instructions

Mount emptyDir volume in deployment yaml

2 Changes in the deployment.yaml

  • Add the volumeMounts section as child of the (application) container key (sibling to image key)
  • Add the volumes section as a sibling of the container key
apiVersion: apps/v1
kind: Deployment
@artpar
artpar / testcandidate.md
Created October 1, 2022 07:07
Videobug

Test case generation

Process

Two step process

  1. Process log files to produce DB records (each file to be processed only once)
  2. Use DB to generate test cases