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 apispec import APISpec | |
from chalice import Chalice, BadRequestError, Response | |
from chalice_spec import PydanticPlugin, ChalicePlugin, Docs, Operation | |
from pydantic import BaseModel, ValidationError | |
APP_NAME = "chalice-spec example" | |
app = Chalice(app_name=APP_NAME) | |
spec = APISpec( |
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
""" | |
Add mypy type-checking cell magic to jupyter/ipython. | |
Save this script to your ipython profile's startup directory. | |
IPython's directories can be found via `ipython locate [profile]` to find the current ipython directory and ipython profile directory, respectively. | |
For example, this file could exist on a path like this on mac: | |
/Users/yourusername/.ipython/profile_default/startup/typecheck.py |
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 nicegui import ui | |
@ui.refreshable | |
def app(): | |
username, set_username = ui.state("") | |
with ui.header(): | |
with ui.tabs().classes("w-full") as tabs: |
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 python:3 as build-system | |
RUN pip install -U pip | |
COPY requirements.txt requirements.txt | |
### create temporary image used to download and vendor packages using private key ### | |
FROM build-system as intermediate | |
# add credentials on build |
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 functools import partial | |
from collections import namedtuple, MutableMapping, Counter, deque | |
from operator import itemgetter, attrgetter | |
import sys | |
import random | |
# Auto-generated code below aims at helping you parse | |
# the standard input according to the problem statement. |
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
provider "aws" { | |
region = "us-east-1" | |
} | |
data "aws_s3_bucket" "dev" { | |
bucket = "..." | |
} | |
# Create a data source for each file in dags folder | |
data "local_file" "dags" { |
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 streamlit as st | |
def login_form(): | |
if not ("username" in st.session_state and "password" in st.session_state): | |
st.write("## Login") | |
with st.form("Login"): |
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 json | |
import shlex | |
import subprocess as sp | |
from pprint import pprint | |
registry = "foo" | |
schema_name = "bar" | |
cmd = f"aws schemas describe-schema --registry-name={registry} --schema-name={schema_name}" |
I hereby claim:
- I am knowsuchagency on github.
- I am knowsuchagency (https://keybase.io/knowsuchagency) on keybase.
- I have a public key ASAKuhfVCmbp9CQYo_XqUJbZimqKmucZbnvt8kVnW2iSggo
To claim this, I am signing this object:
NewerOlder