Requirements
- Debian 9
- OpenJDK-8-jre 8u252
- MongoDB 4.4
Get the net-install image from Debian.org for your particular Hardware (usually AMD64)
import shutil | |
import subprocess | |
import time | |
COMMANDS = [shutil.which("lsmod")] | |
MOD_NAME = b"uvcvideo" | |
def get_uvc_user_count() -> int: | |
""" |
# Python Prime Sieve | |
# | |
# MyFirstPython Program (tm) Dave Plummer 8/9/2018 | |
# | |
# This is the main prime_sieve class. Call it with the number you wish as an upper limit, then | |
# call the runSieve method to do the calculation. printResults will dump the count to check validity. | |
# | |
# Updated 3/22/2021 for Dave's Garage episode comparing C++, C#, and Python | |
from sys import stdout # So I can print without an automatic python newline |
#! /usr/bin/env python3 | |
""" | |
Script for syncing static websites to S3. Requires Python 3.6+ | |
- Uses ETags to determine if a file has changed. | |
- Cleans up remote files. | |
- Sets public ACLs | |
- Supplies the correct content-type | |
- Uses GZip encoding for appropriate file types. |
I hereby claim:
To claim this, I am signing this object:
# While this code still works, I would recommend using Fast API for websockets in modern applications. | |
# See: https://fastapi.tiangolo.com/advanced/websockets/ | |
# Note this is targeted at python 3 | |
import tornado.web | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.websocket | |
import tornado.options |
from jinja2 import Template, Environment | |
# The environment is used to configure the template engine | |
# See: http://jinja.pocoo.org/docs/dev/api/#jinja2.Environment | |
env = Environment(autoescape=False, optimized=False) | |
# Open your template and compile into a template object. | |
with open("template.txt", "r") as f: | |
template = env.from_string(f.read()) |
default_app_config = 'myapp.auth.apps.MyAuthAppConfig' |