- Generate TLS certificates for
localhost:
pip install trustme-cli
trustme-cli- Run
wrkon each endpoint, eg:
localhost:pip install trustme-cli
trustme-cliwrk on each endpoint, eg:| drop function if exists MurmurHash64B; | |
| delimiter $$ | |
| create function MurmurHash64B(s longblob, seed int unsigned) | |
| returns bigint unsigned | |
| deterministic no sql | |
| begin | |
| declare m int unsigned default 0x5bd1e995; | |
| declare r int default 24; | |
| declare len int default length(s); |
| user www-data; | |
| worker_processes 4; | |
| pid /run/nginx.pid; | |
| http { | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| return 301 https://$host$request_uri; |
| import datetime | |
| import time | |
| from _thread import RLock | |
| from functools import update_wrapper, _make_key, _CacheInfo | |
| # Check the example at the end of this script. | |
| class Node: | |
| """node of the circular doubly linked list""" |
| Code from PyCon India 2019 Keynote Talk | |
| David Beazley (https://www.dabeaz.com) | |
| ====================================== | |
| This code is presented "as is" and represents what was live-coded | |
| during my closing keynote presentation at PyCon India, Chennai, | |
| October 13, 2009. I have made no changes to the files. | |
| Requires: Python 3.6+, numpy, pygame |
| with recursive thread as ( | |
| select id, in_reply_to_status_id, 0 as depth | |
| from tweets | |
| where in_reply_to_status_id is null | |
| union | |
| select tweets.id, tweets.in_reply_to_status_id, 1 + thread.depth as depth | |
| from thread join tweets on tweets.in_reply_to_status_id = thread.id) | |
| select * from thread order by depth desc |
| create table tweet ( | |
| id serial, | |
| in_reply_to integer references tweet(id) | |
| ); | |
| insert into tweet (id, in_reply_to) | |
| values (1, NULL), | |
| (2, NULL), | |
| (3, 2), | |
| (4, 3), |
| """ | |
| Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you | |
| run simple training experiments for NER and text classification. | |
| Requires the Prodigy annotation tool to be installed: https://prodi.gy | |
| See here for details on Streamlit: https://streamlit.io. | |
| """ | |
| import streamlit as st | |
| from prodigy.components.db import connect | |
| from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size |
List of Jupyter Lab extensions and my personal (subjective) assesment of their readiness
| Name | Functionality | Readiness | Link |
|---|---|---|---|
| JupyterLab git | GUI for git | Ready to use | https://github.com/jupyterlab/jupyterlab-git |
| SoS | Polyglot notebooks with interop | Ready to use | https://github.com/vatlab/jupyterlab-sos |
| JupyterLab Commenting | Commenting on Notebook cells and lines in files |
| """ "Writing SQL is just as fast as using an ORM" proof of concept | |
| Below is a simple Python object model, where we represent a database that | |
| stores the names of employees at a company, some of whom are "engineers", | |
| and a list of the jobs they do and the programming languages they use. | |
| We'd like to persist the state represented by this Python object model | |
| in a relational database, using our Python objects as a start. Then we'd | |
| like to write SQL queries for rows in this database, and we get back instances | |
| of Python objects exactly as they were created. |