Skip to content

Instantly share code, notes, and snippets.

@benspargo89
benspargo89 / boat.py
Created August 30, 2020 13:17
AR Boat License Automation
##I Tested to see if this stil works. The CSS had changed a bit. I updated the xpaths for the login steps, but I don't have any more
##videos to watch so I couldn't check the page continue or the timer find stuff. Pretty easy to help trouble shoot if it doesn't work
##when you try it.
##You'll need Chromedriver in the same path as the python script
##https://chromedriver.storage.googleapis.com/index.html?path=84.0.4147.30/
from bs4 import BeautifulSoup as soup
from selenium import webdriver
import time
from gpiozero import Motor, InputDevice
from time import sleep, time
SAMPLETIME = 1
r = Motor(forward=5, backward=6)
state = False
b = InputDevice(4)
r.forward()
import pandas as pd
from selenium import webdriver
from bs4 import BeautifulSoup as soup
import time
import os
url = 'http://finra-markets.morningstar.com/BondCenter/Results.jsp'
driver = webdriver.Chrome()
driver.get(url)
time.sleep(5)
import pandas as pd
import matplotlib.pylab as plt
import datetime
import seaborn as sns
all_data = pd.DataFrame(columns=['Rating', 'Status', 'all', 'Company'])
dates = pd.read_excel('nowaitdates.xlsx')
companies = dates['Company'].tolist()
data = pd.read_excel('new.xlsx')
import os
import pandas as pd
import datetime
def waiting(text):
if ' wait ' in text.lower() or ' waiting' in text.lower():
return 1
else:
return 0
import requests
from bs4 import BeautifulSoup as soup
import pandas as pd
import time
import json
import time
import urllib.request
def GetReviews(URL):
start = time.time()
@benspargo89
benspargo89 / gist:0bd3783437f99ff650ec2424a6287ec7
Created April 2, 2018 17:23
Plotly_Nashvile_Scattermapbox
import pandas as pd
import plotly.plotly as py
from plotly.graph_objs import *
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import matplotlib.pyplot as plt
mapbox_access_token = ###
df = pd.read_csv('https://data.nashville.gov/api/views/j7b8-4fv6/rows.csv?accessType=DOWNLOAD')
df['total_students'] = df.iloc[:, 6:21].sum(axis=1)
df['Percent Disabled'] = df['Disability'] / df['total_students']