Skip to content

Instantly share code, notes, and snippets.

Working from home

Asutosh Panda Asutosh11

Working from home
View GitHub Profile
Asutosh11 / ml.txt
Last active May 23, 2019
Machine Learning concepts
View ml.txt
1. Learning Rate -
2. Perceptron - The model of neural network that we have having neurons connected to each other with input and output
3. Why do we need bias in deep learning -
Bias is like the intercept added in a linear equation. It is an additional parameter in the Neural Network which is used to adjust the output along with the weighted sum of the inputs to the neuron. Therefore Bias is a constant which helps the model in a way that it can fit best for the given data.
y = wx + b
Asutosh11 /
Created May 29, 2018
Algorithms in Java
public class BinarySearch {
int number_to_find;
public BinarySearch(Integer[] arr, int number_to_find){
this.number_to_find = number_to_find;
int start_pos = 0;
int last_pos = arr.length-1;
BinarySearch(arr, start_pos, last_pos);
Asutosh11 /
Last active May 30, 2018 — forked from 9re/
For photos taken from camera - fix flipped / rotated image by getting EXIF orientation for Bitmaps.
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.os.Build;
Asutosh11 / DummyViewModel.kt & MainActivity.kt
Last active May 28, 2018
Simplest ViewModel & LiveData usage on Android
View DummyViewModel.kt & MainActivity.kt
class DummyViewModel : ViewModel() {
var data : MutableLiveData<String> = MutableLiveData()
internal fun setData(some_value : String){
data.value = some_value
Asutosh11 / KotlinNotes.kt
Last active Jun 19, 2018
Kotlin notes: new things in kotlin and common Android codes in Kotlin
View KotlinNotes.kt
1. Coroutines in Kotlin -
/* Coroutines in Kotlin is the simplest way to do asynchronous tasks which we do in asynctask or using multiple threads
in RxJava.
2(a). Calling a method of Activity inside Fragment -
// i. define mContext like this -
Asutosh11 / FbLoginWithCustomButtonOnAndroid.txt
Last active Sep 6, 2017
Android Facebook login with custom Login button
View FbLoginWithCustomButtonOnAndroid.txt
build.gradle (Module: app)
// 1.
buildscript {
repositories {
Asutosh11 / & SplashActivity.kt
Last active Dec 18, 2019
Android Runtime permissions helper class
View & SplashActivity.kt
The Runtime permissions helper class
public class RuntimePermissions {
private Context mContext;
private String[] permissions;
public RuntimePermissions(String[] permissions, Context context){
Asutosh11 /
Last active Nov 30, 2016
OkHttp Class for making REST API calls
OkHttp class for making REST calls.
Here the method is POST, you can change it to GET in 'request' below
public class ResponseOKhttp
OkHttpClient client = new OkHttpClient();
Asutosh11 /
Last active Nov 29, 2016
Android Java Class to take a snapshot of a View on screen and save as Image
This class converts any Layout or View to image and saves in Phone.
In one of my projects, I had a requirement of saving whatever is being displayed on the Screen as an image.
I created a class for it so that in future it becomes easy to reuse.
Usage Example
FrameLayout mLin_FramePreview1 = (FrameLayout)findViewById(;
ViewToImage v = new ViewToImage(mLin_FramePreview1);
You can’t perform that action at this time.