Skip to content

Instantly share code, notes, and snippets.

View CaptainAshis's full-sized avatar
☺️
Developing intuition of Algorithms by coding it !!!

Ashis Kumar Panda CaptainAshis

☺️
Developing intuition of Algorithms by coding it !!!
View GitHub Profile
package com.example.android.justjava;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.TextView;
/**
* This app displays an order form to order coffee.
*/
package com.example.android.justjava;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.TextView;
import java.text.NumberFormat;
/**
@CaptainAshis
CaptainAshis / Option A
Created October 2, 2015 09:54 — forked from anonymous/Option A
3 options for the layout of an activity for a quiz question
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
/**
* This method displays the given text on the screen.
*/
private void displayMessage(String message) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(message);
}
@CaptainAshis
CaptainAshis / Option A
Created October 6, 2015 10:22 — forked from udacityandroid/Option A
Android Development for Beginners : Calculate the Price Method
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculate price(int quantity {
int price = quantity * 5;
return price;
}
@CaptainAshis
CaptainAshis / Method 1
Created October 6, 2015 15:09 — forked from udacityandroid/Method 1
Android Development for Beginners : Define a Method
/**
* Get the email account name.
*
* @return the name of the account.
*/
private String getAccountName() {
return "android@gmail.com";
return "droid@gmail.com";
}
@CaptainAshis
CaptainAshis / TextView.java
Created October 7, 2015 11:25 — forked from udacityandroid/TextView.java
Android for Beginners : Simplified TextView class
/**
* Displays text to the user.
*/
public class TextView extends View {
// String value
private String mText;
// Text color of the text
private int mTextColor;
@CaptainAshis
CaptainAshis / check_cuda.py
Last active August 25, 2018 04:56
cuda fastai
torch.cuda.is_available()
#True
torch.backends.cudnn.enabled
#True
@CaptainAshis
CaptainAshis / unzip.py
Last active August 25, 2018 05:04
unzip fastai
! unzip labels.csv.zip
! unzip sample_submission.csv.zip
! unzip test.zip
! unzip train.zip
@CaptainAshis
CaptainAshis / pck.py
Last active August 25, 2018 05:14
All the important packages to be imported in fastai
# Put these at the top of every notebook, to get automatic reloading and inline plotting
%reload_ext autoreload
%autoreload 2
%matplotlib inline
import pandas as pd
import glob
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np