Notes for an interactive class or video
- Intro to private relay if video
- Starting with tag v3.5.14
- Python 3.9 - I'm using 3.9.11
- Django 3.2.13 - LTS version, extended support until April 2024.
# ruff: noqa: S101 | |
import os | |
from collections.abc import Callable | |
from typing import NamedTuple | |
from django.conf import settings | |
def load_terms(filename: str) -> list[str]: | |
"""Load a list of terms from a file.""" |
Notes for an interactive class or video
docker run --rm -it --entrypoint /bin/sh mozilla/fxprivaterelay:v3.2.6 -c "find staticfiles" |
FROM python:3.10.1-slim | |
RUN apt-get update && \ | |
apt-get -y install git libgeos-dev build-essential | |
RUN pip install \ | |
numpy==1.21.4 \ | |
cython==0.29.26 | |
RUN pip install --verbose --no-binary=shapely \ | |
"git+https://github.com/shapely/[email protected]#egg=shapely" | |
RUN python -c "import sys; from shapely import speedups; sys.exit(not speedups.available)" |
FROM python:3.10.1-slim | |
RUN apt-get update && \ | |
apt-get -y install git libgeos-dev build-essential | |
RUN pip install \ | |
numpy==1.21.4 \ | |
cython==0.29.26 | |
RUN pip install --verbose --no-binary=shapely \ | |
"git+https://github.com/shapely/shapely@907c7ee19219b74c45e032f085d3dd3020e0544d#egg=shapely" | |
RUN python -c "import sys; from shapely import speedups; sys.exit(not speedups.available)" |
FROM python:3.10.1-slim | |
RUN apt-get update && \ | |
apt-get -y install libgeos-dev | |
RUN pip install numpy cython | |
RUN pip install --no-binary=shapely shapely==1.8.0 | |
RUN python -c "import sys; from shapely import speedups; sys.exit(not speedups.available)" |
Last login: Tue Dec 14 10:43:03 on ttys003 | |
Welcome to fish, the friendly interactive shell | |
Type help for instructions on how to use fish | |
[I] john@johnwhitlock-4zq05n ~/s/ichnaea (main)> vf activate ichnaea | |
[I] john@johnwhitlock-4zq05n ~/s/ichnaea (main)> git co main | |
Already on 'main' | |
Your branch is up to date with 'origin/main'. | |
[I] john@johnwhitlock-4zq05n ~/s/ichnaea (main)> git pull | |
Already up to date. | |
[I] john@johnwhitlock-4zq05n ~/s/ichnaea (main)> git co -b dep-updates-dec-2021-part1 |
#! /usr/bin/env python3 | |
""" | |
Get data from FxA firestore. | |
Runs from within the Google Application environment using baked in credentials. | |
""" | |
from __future__ import annotations | |
import argparse | |
import json |
taskQueueId: proj-taskcluster/gw-ci-ubuntu-18-04 | |
schedulerId: taskcluster-ui | |
created: '2021-08-20T16:06:31.635Z' | |
deadline: '2021-08-20T19:06:31.635Z' | |
payload: | |
command: | |
- - /bin/bash | |
- -c | |
- which python3 && python -V && which curl && curl --version | |
- - /bin/bash |
Timing set_in_loop... 1.063s | |
Timing list_in_loop... 1.835s | |
Timing set_out_loop... 1.093s | |
Timing list_out_loop... 1.998s | |
function time factor | |
set_in_loop 1.063s (1.0x) | |
set_out_loop 1.093s (1.0x) | |
list_in_loop 1.835s (1.7x) |