This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| import pandas as pd | |
| #Website that we're going to scrape | |
| url = "http://gts.co.jefferson.co.us/index.aspx" | |
| # create a new Firefox session | |
| driver = webdriver.Firefox(executable_path='C:/Users/kirst/Downloads/geckodriver-v0.32.0-win64/geckodriver.exe') | |
| driver.implicitly_wait(30) | |
| driver.get(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Accept terms | |
| accept_button = driver.find_element_by_id("ctl00_ContentPlaceHolder1_btnAcceptTerms") | |
| accept_button.click() #Wait 10 seconds for the load | |
| driver.implicitly_wait(10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Select the 'Show All' option | |
| accept_button = driver.find_element_by_id("ctl00_ContentPlaceHolder1_btnShowAll") | |
| accept_button.click() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df = pd.DataFrame(columns = ["FC #", "Owner Name", "Street", "Zip", "Subdivision", "Balance Due", "Status"], | |
| dtype=object) | |
| #Flip through the records and save them | |
| for n in range(2, 15): | |
| for i in range(3): | |
| try: | |
| mytable = driver.find_element_by_css_selector("table[id='ctl00_ContentPlaceHolder1_gvSearchResults']") | |
| #Read in all of the data into the dataframe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df['timestamp'].dt.strftime("%Y-%m-%dT%H:%M:%S.000Z") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| conda create -name label-studio | |
| conda activate label-studio | |
| pip install label-studio | |
| label-studio start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <View> | |
| <Header value="Time Series classification" style="font-weight: normal"/> | |
| <TimeSeriesLabels name="label" toName="ts"> | |
| <Label value="0″/> | |
| <Label value="1″/> | |
| </TimeSeriesLabels> | |
| <TimeSeries name="ts" value="$csv" valueType="url"> | |
| <Channel column="first_column"/> | |
| </TimeSeries> | |
| </View> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| r= requests.post(url = "https://auth.accela.com/oauth2/token", | |
| headers={"Content-Type": "application/x-www-form-urlencoded", | |
| "x-accela-appid": str(client_id)}, | |
| data = {"grant_type" :"password", | |
| "client_id": str(client_id), | |
| "client_secret": str(client_secret), | |
| "redirect_uri": "http://localhost/myapp/", | |
| "username": username, |
OlderNewer