Skip to content

Instantly share code, notes, and snippets.

@indranil32
indranil32 / android-sdk-setup.txt
Last active February 9, 2023 10:50
Setup Android SDK, Emulator without Android Studio
Download Android CMD line tools - https://dl.google.com/android/repository/commandlinetools-win-9477386_latest.zip
Download JDK 11 - https://download.oracle.com/otn/java/jdk/11.0.17+10/8bd089539add49a9b99e2f27eb0c4329/jdk-11.0.17_windows-x64_bin.exe?AuthParam=1675921344_920d2b45805d354d84c369792e3a3bbf
Install JDK 11
1. Create folder C:\android-sdk
2. Create folder cmdline-tools\latest
3. Unzip commandlinetools-win-9477386_latest.zip under -
C:\android-sdk\cmdline-tools\latest
bin
lib
@indranil32
indranil32 / Jenkinsfile
Last active July 1, 2021 14:53
Jenkins file stage and steps showing the terraform aws integration
stage('AWS-Terraform') {
//parameters {
//password (name: 'AWS_ACCESS_KEY_ID')
//password (name: 'AWS_SECRET_ACCESS_KEY')
//}
environment {
TF_WORKSPACE = 'development' //Sets the Terraform Workspace
TF_IN_AUTOMATION = 'true'
//AWS_ACCESS_KEY_ID = "${params.AWS_ACCESS_KEY_ID}"
//AWS_SECRET_ACCESS_KEY = "${params.AWS_SECRET_ACCESS_KEY}"
@indranil32
indranil32 / main.tf
Created July 1, 2021 14:26
Terraform Script for provisioning private S3 bucket static web hosting with Cloudfront distribution
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
}
required_version = ">= 0.12.31"
}
@indranil32
indranil32 / fullCleanupPostTestNetworkDown.sh
Created June 24, 2021 10:47
Local clean up post test network down
#!/bin/bash
# MAKE SURE TO RUN THIS POST ./network.sh down
echo -e "Full clean...."
# remove exitied containers
docker rm -f $(docker ps -aq)
# remove pre-built chaincodes
@indranil32
indranil32 / local.profiles.env
Created June 24, 2021 10:40
Fabric Test Network CLI env vars
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/
export CORE_PEER_TLS_ENABLED=true
if [[ $# -lt 1 ]] || [[ $1 == "1" ]] ; then
# Environment variables for Org1(default)
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=localhost:7051
@indranil32
indranil32 / tensorflowjshandpose.logs
Created April 7, 2021 18:09
Sample logs from hand pose detection
LOG imageAsTensors: {"kept":false,"isDisposedInternal":false,"shape":[200,152,3],"dtype":"int32","size":91200,"strides":[456,3],"dataId":{"id":80188},"id":53720,"rankType":"3"}
LOG Calling estimateHands...
LOG prediction: [{"handInViewConfidence":0.9581741690635681,"boundingBox":{"topLeft":[-16.90067355055654,-16.494075022048044],"bottomRight":[137.18174674736986,137.5883452758784]},"landmarks":[[33.729566155019455,105.94868737432625,-0.0004012957215309143],[33.561984441982524,82.89056246291857,-10.734733581542969],[44.06515968257281,63.312674810617395,-13.661907196044922],[51.035811058314415,44.22963840695522,-16.28701400756836],[51.637919403054056,23.193821115296643,-20.039825439453125],[69.87716631754131,77.70289484327728,0.7628560066223145],[85.87868398406854,76.67250162202878,-10.202250480651855],[72.91400702619906,79.90179010203502,-19.073787689208984],[64.2947124148271,82.80427208175323,-19.66538429260254],[72.69562350659704,91.3940419591296,4.0848259925842285],[86.7190887548308,91.638189681384
@indranil32
indranil32 / tensorflowjshandpose-app.js
Created April 7, 2021 17:30
tensorflow js handpose app js
import React, { useState, useEffect, useRef } from 'react';
import { Text, View, StyleSheet, Platform, Image, Button } from 'react-native';
import * as Permissions from 'expo-permissions';
import { Camera, Constants } from 'expo-camera';
import * as tf from '@tensorflow/tfjs';
import * as handpose from '@tensorflow-models/handpose';
import * as fp from 'fingerpose';
import { cameraWithTensors } from '@tensorflow/tfjs-react-native';
//import '@tensorflow/tfjs-backend-cpu';
import '@tensorflow/tfjs-react-native';
@indranil32
indranil32 / tensorflowjshandpose-package.json
Created April 7, 2021 17:24
tensorflow js handpose react native package json
{
"name": "tensorflowjshandpose",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
@indranil32
indranil32 / SimpleDeadLock.groovy
Last active April 1, 2021 08:18
Showcashing Deadlock in Java/Groovy
class RunnableThread implements Runnable {
def obj1Private
def obj2Private
public RunnableThread(paramObj1, paramObj2) {
obj1Private = paramObj1
obj2Private = paramObj2
}
@Override
public void run(){
@indranil32
indranil32 / main.c
Created January 23, 2021 19:36
RIOT-LORAWAN-TTN-TAGOIO-EXAMPLE
#include <string.h>
#include "xtimer.h"
#include "net/loramac.h"
#include "semtech_loramac.h"
#include "hts221.h"
#include "hts221_params.h"
#include "board.h"
/* Declare globally the loramac descriptor */
static semtech_loramac_t loramac;