This script subscribes to the live HTTP feed of public activity on my Mastodon instance and writes the results into SQLite database tables.
It needs sqlite-utils
and httpx
:
pip install sqlite-utils httpx
Then run:
import torch | |
from diffusers import StableDiffusionPipeline | |
from torch import autocast | |
import random | |
import matplotlib.pyplot as plt | |
import os | |
prompts = [ | |
"1965 Porsche 911", |
# Docs: | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference | |
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | |
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53 | |
# Download ISO Installer: | |
wget https://ubuntu.volia.net/ubuntu-releases/20.04.3/ubuntu-20.04.3-live-server-amd64.iso | |
# Create ISO distribution dirrectory: |
Collection of useful links (primarily UIK focused) for publicly available GIS datasets.
Contains links, including API details for:
Out of the box, the MicroK8s distribution of ingress-nginx installed as the MicroK8s addon ingress binds to ports 80+443 on the node's IP address using a hostPort, as we can see here:
microk8s kubectl -n ingress describe daemonset.apps/nginx-ingress-microk8s-controller
Name: nginx-ingress-microk8s-controller
Selector: name=nginx-ingress-microk8s
""" | |
WARNING: dont use loguru, use structlog | |
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f | |
Configure handlers and formats for application loggers. | |
""" | |
import logging | |
import sys | |
from pprint import pformat |
unqualified-search-registries = ['docker.io'] | |
[[registry]] | |
prefix = "docker.io" | |
location = "docker.io" | |
[[registry.mirror]] | |
prefix = "docker.io" | |
# This will set the docker registry mirror of a chinese university. | |
# DON'T use it unless you have a network connection issue and you trust the mirror provider. |
#!/bin/bash | |
# needs to be run with sudo permissions | |
mkdir -p /opt/bin | |
LATEST_URL=`curl -Ls -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest` | |
COMPOSE_VERSION=${LATEST_URL##*/} | |
DOWNLOAD_URL=https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` | |
curl -L ${DOWNLOAD_URL} -o /opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose |
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |