Skip to content

Instantly share code, notes, and snippets.

# 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")
@projectyotta
projectyotta / wxpytest.py
Created March 14, 2018 22:27
Wxpython script to open up a GUI window , take inputs , and use them to run pysim read and write modules
# 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:
@projectyotta
projectyotta / wxpytest.py
Created March 14, 2018 22:27
Wxpython script to open up a GUI window , take inputs , and use them to run pysim read and write modules
# 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:
@projectyotta
projectyotta / reverse_geocode.py
Created November 7, 2017 07:19
reverse geocoding using google maps API in python
# 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
# # 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
#!/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'
@projectyotta
projectyotta / tanneru+web+scraping.ipynb
Created September 24, 2017 03:28
Web scraping to get the department course information from the ECE dept website and store it in the engineering dept website
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@projectyotta
projectyotta / server.py
Created September 20, 2017 05:29
run a local API in python
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)
@projectyotta
projectyotta / get_crypto_data_hist.ipynb
Last active August 19, 2020 21:34
Python script to get data for any cryptocurrency from www.coinmarketcap.com . ipnyb file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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