Skip to content

Instantly share code, notes, and snippets.

View arnabdas's full-sized avatar

Arnab Das arnabdas

View GitHub Profile
@arnabdas
arnabdas / riva_test_client.py
Last active July 4, 2022 05:38
Simple Python function to connect with Riva
import io
import os
import librosa
from time import time
import numpy as np
import grpc
import requests
# TTS proto
import riva_api.riva_tts_pb2 as rtts
@arnabdas
arnabdas / add_disk.sh
Created March 3, 2022 08:50
Ubuntu Add Disk
ls /dev/sd*
fdisk /dev/sdb # check the label from above
# p - show current partitions
# d - delete current partitions
# n - create new partition
# p - select for default partition
# 1 - for single partition
# w - write partitions
@arnabdas
arnabdas / app.js
Created August 17, 2021 08:03
Keycloak Authentication - Implicit Flow
(function () {
"use strict";
var t = setInterval(() => {
if(window.keycloak) {
clearInterval(t);
var msg = 'Successfully logged in...';
var msgEl = document.getElementsByClassName("login-message")[0];
msgEl.innerHTML = msg;
msgEl.textContent = msg;
@arnabdas
arnabdas / .bashrc
Created May 12, 2021 05:01
Create Python Virtual Env
#### Python Virtual Env Config ####
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
. $HOME/.local/bin/virtualenvwrapper.sh
export PATH=$HOME/.local/bin:$PATH
#### Python Virtual Env Config ####
@arnabdas
arnabdas / gcloud-bucket-cdn.sh
Created April 20, 2021 04:58
Create Google Cloud Bucket for CDN
# https://cloud.google.com/compute/docs/regions-zones
region='us-west1'
projectName='my-project-name'
bucketName='gs://package_name'
gsutil mb -b on -c standard -l $region -p $projectName $bucketName
gsutil iam ch allUsers:objectViewer $bucketName
@arnabdas
arnabdas / Active-Router-Links.md
Last active April 9, 2021 05:29
Angular Notes
@arnabdas
arnabdas / createCalendarObject.js
Created January 6, 2021 12:57
Simple calendar object creation utility
(function() {
'use strict';
var month = 1;
var year = 2021;
var sqlResponse = [
'2019-12-01',
'2019-12-03',
'2019-12-14',
@arnabdas
arnabdas / create_user_for_database.sql
Last active July 20, 2020 08:36
SQL Server - Create User And Assign To A Database
USE [master]
GO
/* create login */
CREATE LOGIN [dbuser] WITH PASSWORD=N'password',
DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
GO
USE [database_name]
@arnabdas
arnabdas / opencv_install.sh
Created July 17, 2020 07:51
Install OpenCV on Ubuntu 18.04
apt-get install python3-pip python3-dev -y
apt install libopencv-dev
pip3 install numpy # multi-dimensional arrays
pip3 install matplotlib # plotting points in graphs / histogram
pip3 install scipy # scietific calculations
pip3 install scikit-learn # machine learning, like clustering, vector quantization, classification models
pip3 install -U scikit-image # for image processing
pip3 install opencv-python # computer vision library
@arnabdas
arnabdas / cpp.json
Created June 22, 2020 05:54
Visual Stdudio Code Template For CPP
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",