I hereby claim:
- I am jlstro on github.
- I am jstrozyk (https://keybase.io/jstrozyk) on keybase.
- I have a public key whose fingerprint is 25F1 6246 0F8D FB31 3D86 9024 DA5D B5B4 5634 ACA4
To claim this, I am signing this object:
| import requests | |
| from bs4 import BeautifulSoup | |
| r = requests.get("https://en.wikipedia.org/wiki/Middle_Rhine", headers={'User-Agent': 'tinyscraper'}) | |
| soup = BeautifulSoup(r.text, "html.parser") | |
| for li in soup.find_all("table")[1].find_all("li"): | |
| text = li.get_text(strip=True) | |
| link_tag = li.find("a", href=True) | |
| href = link_tag['href'] if link_tag else None | |
| print(f"Text: {text} | Link: {href}") |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Debug", | |
| "type": "cppdbg", | |
| "request": "launch", | |
| "program": "/path/to/executable", | |
| "args": ["1", "2", "3", "4"], | |
| "stopAtEntry": false, |
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "label": "build", | |
| "type": "shell", | |
| "command": "make -C /project/path/", | |
| "group": { | |
| "kind": "build", | |
| "isDefault": true |
I hereby claim:
To claim this, I am signing this object:
| def convert(arcmin): | |
| regex = r'(\d+)° (\d+)\' (\d+.\d+)\" (\w)' | |
| match = re.findall(regex, arcmin) | |
| degree = int(match[0][0])+(float(match[0][1])/60)+(float(match[0][2])/3600) | |
| if match[0][-1] in ['S', 'W']: | |
| degree = -degree | |
| return(degree) | |
| def convert_df(row): | |
| lat = convert(row['Latitude']) |
| NL | HK | MU | AD | BM | BS | VG | KY | IE | LR | LI | MH | MC | NR | SG | VU |
|---|
| def convert_state(state_input): | |
| if len(state_input)==2: | |
| for state in states: | |
| if state_input==state[0]: | |
| return state[1] | |
| else: | |
| for state in states: | |
| if state_input == state[1]: | |
| return state[0] | |
| import pandas as pd | |
| import sqlite3 | |
| #read csvs | |
| first_df = pd.read_csv('file1.csv') | |
| second_df = pd.read_csv('file2.csv') | |
| #create connection | |
| conn = sqlite3.connect('DATABASE_NAME.db') |
| from flask import Flask | |
| from flask_sqlalchemy import SQLAlchemy | |
| from flask import request | |
| from flask import render_template | |
| app = Flask(__name__) | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///schools.db' | |
| db = SQLAlchemy(app) | |
| class School(db.Model): | |
| __tablename__ = 'schools' |
| from flask_frozen import Freezer | |
| from app import app, DATABASE | |
| app.config['FREEZER_RELATIVE_URLS'] = True | |
| app.config['FREEZER_DESTINATION'] = 'docs' | |
| freezer = Freezer(app) | |
| @freezer.register_generator | |
| def VARIABLE(): |