Skip to content

Instantly share code, notes, and snippets.

View Varad2305's full-sized avatar
🏠
Working from home

Varad Kshirsagar Varad2305

🏠
Working from home
  • Oracle
  • Pune
View GitHub Profile
import pandas as pd
import numpy as np
from datetime import date,time,timedelta
from nsepy import get_history
import copy
import requests
import datetime
#@st.cache()
def fetchInsiderData(lookback_period):
import subprocess
import os
subprocess.Popen('curl "https://www.nseindia.com/api/quote-derivative?symbol=BANKNIFTY" -H "authority: beta.nseindia.com" -H "cache-control: max-age=0" -H "dnt: 1" -H "upgrade-insecure-requests: 1" -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" -H "sec-fetch-user: ?1" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-site: none" -H "sec-fetch-mode: navigate" -H "accept-encoding: gzip, deflate, br" -H "accept-language: en-US,en;q=0.9,hi;q=0.8" --compressed -o maxpain.txt', shell=True)
f=open("maxpain.txt","r")
var=f.read()
print(var)
function updateClock(){
var currentTime = new Date();
var currentHours = currentTime.getHours();
var currentMins = currentTime.getMinutes();
var currentSecs = currentTime.getSeconds();
currentMins = ( currentMins < 10 ? "0" : "" ) + currentMins;
currentSecs = ( currentSecs < 10 ? "0" : "" ) + currentSecs;
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
currentHours = ( currentHours == 0 ) ? 12 : currentHours;
<span id="clock">&nbsp;</span>
<body onload="updateClock();setInterval('updateClock()', 1000 )">
print("im here")
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score
from sklearn.preprocessing import StandardScaler
from src.algorithms import DAGMM,LSTMAD
#include <bits/stdc++.h>
using namespace std;
void DFS(long long v,map<long long, vector<long long>> &adj,vector<long long> &ans){
ans.push_back(v);
auto itr = adj.find(v);
if(itr != adj.end()){
vector<long long> aux = itr->second;