This file contains 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 datetime import datetime | |
def get_poem_line_for_day(): | |
"""Returns the line of the poem based on the current day of the week.""" | |
day_of_week = datetime.today().strftime('%A') | |
POEM = { | |
"Monday": "Monday's child is fair of face", | |
"Tuesday": "Tuesday's child is full of grace", | |
"Wednesday": "Wednesday's child is full of woe", | |
"Thursday": "Thursday's child has far to go", |
This file contains 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
name: API workflow | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: macos-latest | |
name: Test python API | |
steps: | |
- name: Checkout |
This file contains 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 warnings | |
import requests | |
import toml | |
from pyprojroot import here | |
CONFIG = toml.load(here("secrets.toml")) | |
AGENT = CONFIG["USER"]["AGENT"] | |
USERS = CONFIG["GITHUB"]["USERNAMES"] | |
PAT = CONFIG["GITHUB"]["PAT"] |
This file contains 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 | |
import geopandas as gpd | |
import pandas as pd | |
ENDPOINT = "https://services1.arcgis.com/ESMARspQHYMw9BZ9/arcgis/rest/services/" | |
"Lower_layer_Super_Output_Areas_2021_EW_BFC_V8/FeatureServer/0/query" | |
params = { | |
"where": "1=1", # SQL clauses can go here | |
"outSR": 4326, # CRS that you want |
This file contains 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
#' Render Table of Contents | |
#' | |
#' A simple function to extract headers from an RMarkdown or Markdown document | |
#' and build a table of contents. Returns a markdown list with links to the | |
#' headers using | |
#' [pandoc header identifiers](http://pandoc.org/MANUAL.html#header-identifiers). | |
#' | |
#' WARNING: This function only works with hash-tag headers. | |
#' | |
#' Because this function returns only the markdown list, the header for the |