Skip to content

Instantly share code, notes, and snippets.

Saurabh Rao saurabh-rao

Block or report user

Report or block saurabh-rao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View web_extract_nasa_sample.py
# note , if you want a less pythonic way of doing this , you can always mess around with the webpage text to get what you need .
# this just seemed better .
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pyautogui as pag
driver = webdriver.Chrome("C:\\Users\\raosa\\Desktop\\PROJECTS\\chromedriver.exe")
driver.get("https://power.larc.nasa.gov/cgi-bin/cgiwrap/solar/timeseries.cgi")
@saurabh-rao
saurabh-rao / wxpytest.py
Created Mar 14, 2018
Wxpython script to open up a GUI window , take inputs , and use them to run pysim read and write modules
View wxpytest.py
# how to install the wx package :
# open a terminal and type : sudo apt-get install python-wxgtk3.0
# if it asks for additional inbstructions in there , just say yes and let it run .
import os
import sys
from subprocess import Popen, PIPE
import pandas as pd
if sys.version_info[0] < 3:
@saurabh-rao
saurabh-rao / wxpytest.py
Created Mar 14, 2018
Wxpython script to open up a GUI window , take inputs , and use them to run pysim read and write modules
View wxpytest.py
# how to install the wx package :
# open a terminal and type : sudo apt-get install python-wxgtk3.0
# if it asks for additional inbstructions in there , just say yes and let it run .
import os
import sys
from subprocess import Popen, PIPE
import pandas as pd
if sys.version_info[0] < 3:
@saurabh-rao
saurabh-rao / reverse_geocode.py
Created Nov 7, 2017
reverse geocoding using google maps API in python
View reverse_geocode.py
# coding: utf-8
# In[107]:
url=[]
latlng=["56.2,-153.1","57.2,-158.1","57.2,-157.1","57.2,-156.1","57.2,-155.1","57.2,-154.1","57.2,-153.1","58.2,-158.1","58.2,-157.1","58.2,-156.1","58.2,-155.1","58.2,-154.1","58.2,-153.1","59.2,-161.1","59.2,-160.1","59.2,-159.1","59.2,-158.1","59.2,-157.1","59.2,-156.1","59.2,-155.1","59.2,-154.1","59.2,-153.1","60.2,-165.1","60.2,-164.1","60.2,-163.1","60.2,-162.1","60.2,-161.1","60.2,-160.1","60.2,-159.1","60.2,-158.1","60.2,-157.1","60.2,-156.1","60.2,-155.1","60.2,-154.1","60.2,-153.1","60.2,-152.1","60.2,-151.1","60.2,-150.1","60.2,-149.1","60.2,-148.1","60.2,-147.1","60.2,-146.1","60.2,-145.1","60.2,-144.1","60.2,-143.1","60.2,-142.1","60.2,-141.1","61.2,-165.1","61.2,-164.1","61.2,-163.1","61.2,-162.1","61.2,-161.1","61.2,-160.1","61.2,-159.1","61.2,-158.1","61.2,-157.1","61.2,-156.1","61.2,-155.1","61.2,-154.1","61.2,-153.1","61.2,-152.1","61.2,-151.1","61.2,-150.1","61.2,-149.1","61.2,-148.1","61.2,-147.1","61.2,-146.1","61.2,-145.1","61.2,-144.1","61.2,-143.1
View regression_sentdex_part1.py
# # make sure you have installed sklearn , pandas and quandl .
# # quandl is like a finance api thing .
# import pandas as pd
# import quandl
# import math
# import numpy as np
# from sklearn import preprocessing, cross_validation, svm
# from sklearn.linear_model import LinearRegression
# from numpy._distributor_init import NUMPY_MKL
View sodapytest.py
#!/usr/bin/env python
# make sure to install these packages before running:
# pip install pandas
# pip install sodapy
import pandas as pd
from sodapy import Socrata
# Unauthenticated client only works with public data sets. Note 'None'
@saurabh-rao
saurabh-rao / tanneru+web+scraping.ipynb
Created Sep 24, 2017
Web scraping to get the department course information from the ECE dept website and store it in the engineering dept website
View tanneru+web+scraping.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saurabh-rao
saurabh-rao / server.py
Created Sep 20, 2017
run a local API in python
View server.py
from flask import Flask, request
from flask_restful import Resource, Api
from sqlalchemy import create_engine
from json import dumps
from flask.ext.jsonpify import jsonify
db_connect = create_engine('sqlite:///chinook.db')
app = Flask(__name__)
api = Api(app)
@saurabh-rao
saurabh-rao / Untitled3 (1).ipynb
Last active Sep 25, 2017
Python script to get data for any cryptocurrency from www.coinmarketcap.com . ipnyb file
View Untitled3 (1).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gettordata.py
# have t figure out how to login to the site , and then hopefully extract the information I need .
import socks
import socket
import stem.process
import requests
from bs4 import BeautifulSoup
import win_inet_pton
SOCKS_PORT=7040# You can change the port number
You can’t perform that action at this time.