acme-db> SELECT
pid,
usename,
application_name,
state,
Showing how datetime.date.today() in Python is sensitive to local timezone:
$ uv run how_today.py; echo '=='; date
TZ=
today() -> 2026-04-02
impl -> 2026-04-02
full -> 2026-04-02T13:17:19
==
Thu Apr 2 13:17:19 CDT 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import signal | |
| import sys | |
| import time | |
| import types | |
| class _Global: | |
| SHUTDOWN_REQUESTED = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3.12.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3.14.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime | |
| import os | |
| import google.auth | |
| import google.auth.compute_engine | |
| import google.auth.credentials | |
| import google.auth.impersonated_credentials | |
| import google.auth.transport.requests | |
| import google.cloud.storage | |
| import google.oauth2.credentials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT | |
| r.ev_class::regclass AS materialized_view, | |
| n.nspname AS schema_name, | |
| c.relname AS object_name, | |
| CASE c.relkind | |
| WHEN 'r' THEN 'Table' | |
| WHEN 'v' THEN 'View' | |
| WHEN 'm' THEN 'Materialized View' | |
| WHEN 'f' THEN 'Foreign Table' | |
| WHEN 'p' THEN 'Partitioned Table' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import subprocess | |
| import click | |
| import requests | |
| ### https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions/get | |
| ### https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions/patch | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------------------------------------------------- | |
| ------------------ Add role(s) ------------------- | |
| -------------------------------------------------- | |
| CREATE ROLE acme_admin | |
| WITH ENCRYPTED PASSWORD 'devpassword_admin' | |
| VALID UNTIL 'infinity' | |
| CONNECTION LIMIT -1 | |
| NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # See: https://www.youtube.com/watch?v=EONem7cdmSM | |
| import fractions | |
| import numpy as np | |
| def even_sum(m, n): | |
| for i in range(n): | |
| s = sum(m[i, :]) |
NewerOlder