Installation
Remove all traces of uwsgi on the system, if previously installed
apt remove uwsgi uwsgi-core
rm /usr/bin/uwsgi
rm /usr/local/bin/uwsgi
rm -rf /usr/lib/uwsgi
rm -rf /usr/local/lib/uwsgi
Any config files in /etc
can stay.
{ | |
"home_assistant": { | |
"installation_type": "Unknown", | |
"version": "2022.12.3", | |
"dev": false, | |
"hassio": false, | |
"virtualenv": false, | |
"python_version": "3.10.8", | |
"docker": false, | |
"arch": "x86_64", |
[uwsgi] | |
plugins-dir = /usr/lib/uwsgi/plugins | |
emperor = /etc/uwsgi/vassals/*.ini | |
show-config = 1 | |
uid = http | |
gid = http | |
emperor-stats = /run/uwsgi/emperor-stats.sock | |
umask = 002 | |
logto = /var/log/uwsgi/emperor.log |
[uwsgi] | |
module = hive.wsgi | |
workers = 6 | |
plugins = python3 | |
base = /srv/hive | |
virtualenv = /srv/hive | |
logto = /srv/hive/log/uwsgi.hive.log | |
socket = /run/uwsgi/hive.sock | |
touch-reload = /srv/hive/reload | |
buffer-size = 32768 |
<!doctype html> | |
<html> | |
<head> | |
<script src="load-pages.js"></script> | |
<script>window.PagedConfig = {auto: false};</script> | |
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script> | |
<style> | |
@media screen { | |
.pagedjs_sheet { | |
box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.15); |
<!doctype html> | |
<html> | |
<head> | |
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script> | |
<style> | |
@media screen { | |
.pagedjs_sheet { | |
box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.15); | |
margin: 20px auto; | |
} |
#!/bin/bash | |
usage() { | |
echo "Usage: $(basename $0) in.pdf dest"; | |
} | |
[[ -z "$1" ]] && usage && exit 1; | |
[[ -z "$2" ]] && usage && exit 1; | |
TMPDIR="$(mktemp -d)"; | |
DIR=$2; |
apt remove uwsgi uwsgi-core
rm /usr/bin/uwsgi
rm /usr/local/bin/uwsgi
rm -rf /usr/lib/uwsgi
rm -rf /usr/local/lib/uwsgi
Any config files in /etc
can stay.
import ml4k | |
import random | |
import tkinter as tk | |
from copy import copy | |
from tkinter import messagebox | |
API_KEY = "PASTE-API-KEY-HERE" | |
AI_MODE = "random" | |
TRAINING = False |
import tkinter as tk | |
from tkinter import messagebox | |
# We can make a "virtual" game board as a list of lists. The list contains 3 other lists (rows). | |
# Each row list contains 3 string values representing spaces. The spaces will be populated with | |
# either "X" or "O", but we start with empty strings to denote an empty space. | |
# | |
# We can access a space on the board using row and column indexes. For example, the top-left space | |
# is `board[0][0]`, the center space is `board[1][1]`, and the bottom-right space is `board[2][2]`. |