This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#git | |
alias git-stats="git log --shortstat --pretty="%cE" | sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}'" | |
#adb aliases | |
alias adbip="adb shell netcfg | grep wlan0 | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b'" | |
alias adbtext="adb shell input text" | |
alias adbproxy="adb sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset' | |
oops = commit --amend --no-edit | |
lgn = lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset' --name-only | |
chk = checkout | |
fame = python -m gitfame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
public class MainActivity extends Activity implements LoaderManager.LoaderCallbacks<Cursor>{ | |
public List<String> favoriteMovies; | |
public RecyclerView.Adapter myAdapter; | |
protected void onResume() { | |
//initialize your loader | |
getSupportLoaderManager().initLoader(LOADER_ID, null, this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint as r | |
import plotly.graph_objs as go | |
import time,math | |
import numpy as np | |
import plotly | |
def pigeon_hole(s): | |
a = [[], [], []] | |
sum_a = [0, 0, 0] | |
for x in s: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_file(filename): | |
content = [line.strip('\n') for line in open(filename)] | |
return content | |
input_cases = read_file(input('Enter input_cases file name : ',)) | |
expected_output = read_file(input('Expected output_cases file name : ',)) | |
user_output = read_file(input('Your output file name : ')) | |
wrong_results = [] | |
n = int(input_cases[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 19.09.2014 | |
* Gurupad M Mamadapur | |
* | |
*/ | |
///Next Fit allocation technique | |
#include<stdio.h> | |
#include<stdlib.h> | |
typedef struct block | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 19.09.2014 | |
* Gurupad M Mamadapur | |
*/ | |
///Next Fit allocation technique | |
#include<stdio.h> | |
#include<stdlib.h> | |
typedef struct block | |
{ | |
int size; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 18.09.2014 | |
* Gurupad M Mamadapur | |
*/ | |
///LEAST RECENTLY USED | |
#include<stdio.h> | |
typedef struct frame | |
{ | |
int pid; | |
int pr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JLT | |
LDA | |
STA | |
1 | |
TEST START 4096 | |
LOOP LDA #3 | |
- JLT LOOP | |
- STA RES | |
- STA LEN | |
LEN BYTE EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 11.11.2014 | |
* Gurupad M Mamadapur | |
*/ | |
#include<stdio.h> | |
#include<string.h> | |
#include<stdlib.h> | |
typedef struct input | |
{ |