Skip to content

Instantly share code, notes, and snippets.

View khannasarthak's full-sized avatar

Sarthak Khanna khannasarthak

View GitHub Profile
@khannasarthak
khannasarthak / test
Created September 29, 2018 20:32
here
print ("Hello World")
@khannasarthak
khannasarthak / marketDialScriptModular.py
Last active December 18, 2018 19:10
scripts for market dial
import pandas as pd
pd.options.display.float_format = '{:.2f}'.format # Setting float precision
# Reading CSV's and parsing dates
sales = pd.read_csv('take_home_sales.csv', sep='|',index_col=False,parse_dates=['timestamp'])
storeStatus = pd.read_csv('take_home_store_status.csv', sep='|',index_col=False)
stores = pd.read_csv('take_home_stores.csv', sep='|',index_col=False)
def cleanCSV():
@khannasarthak
khannasarthak / InterviewRoadmap.md
Last active June 5, 2024 03:44
My Interview Study roadmap

Coding Interview University

I originally created this as a short to-do list of study topics for becoming a software engineer, but it grew to the large list you see today. After going through this study plan, I got hired as a Software Development Engineer at Amazon! You probably won't have to study as much as I did. Anyway, everything you need is here.

The items listed here will prepare you well for in an interview at just about any software company, including the giants: Amazon, Facebook, Google or Microsoft. >

@khannasarthak
khannasarthak / MainActivity.java
Created August 31, 2017 01:53
MC 18.53 run and stop working
package com.healthmonitor.khann.healthmonitor;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.content.Intent;
import android.widget.EditText;
import com.jjoe64.graphview.GraphView;
import com.jjoe64.graphview.series.DataPoint;
import com.jjoe64.graphview.series.LineGraphSeries;
#!/usr/bin/python3
import requests
import json
from urllib.request import urlopen
from gi.repository import Notify
import time
rbtc = requests.get(url='https://blockchain.info/ticker')
objbtc = rbtc.json()
def dist(a,b):
return ((a[0]-b[0])**2 + (a[1] -b[1])**2)
t = int(input())
while (t!=0):
t -= 1
a = list(map(int,(input().split())))
# do not use split(' '), Gives rise to EOF or literal errors
k = [a[i:i+2] for i in range(0, len(a), 2)]
p1 = k[0]
def dist(a,b):
return ((a[0]-b[0])**2 + (a[1] -b[1])**2)
t = int(input())
while (t!=0):
a = list(map(int,(input().split(' '))))
k = [a[i:i+2] for i in range(0, len(a), 2)]
p1 = k[0]
p2 = k[1]
p3 = k[2]