$ time python loop_with_delay.py
index = 0
index = 1
index = 2
real 0m6.202s
user 0m0.111s
sys 0m0.039s
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<thisdocument> | |
<process userobjective="turn on the computer"> | |
<!-- https://www.quora.com/How-does-a-power-button-work-in-a-computer --> | |
<!-- https://wiki.osdev.org/System_Initialization_(x86) --> | |
<!-- https://wiki.osdev.org/System_Initialization_(x86) --> | |
<task entity="user" action="push power button"> | |
<task entity="power button" action="electrical current running through wire is interrupted"></task> | |
<task entity="electrical wire" action="current goes to zero for short duration"></task> | |
<task entity="mother board" action="?"></task> |
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
# thanks to https://dreampuf.github.io/GraphvizOnline | |
digraph G { | |
label="how to browse the internet" | |
labelloc = "t"; // place the label at the top (b seems to be default) | |
#concentrate=true; # edge overlap # https://stackoverflow.com/a/4671508/1164295 | |
#overlap=false; # no effect | |
compound=true; # as per https://stackoverflow.com/a/2012106/1164295 | |
# ovals are intended to be tangible activites; |
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
#!/usr/bin/env python3 | |
""" | |
runs via crontab on a DigitalOcean VPS | |
the sendgrid API key is in a ".env" file | |
""" | |
# how to run this script: | |
# python3 hacker_news_rss_email_alerts.py |
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
#!/usr/bin/env python3 | |
""" | |
The arXiv RSS (https://arxiv.org/help/rss) is separate from | |
the arXiv API (https://arxiv.org/help/api/index) | |
The API supports /query | |
The RSS provides XML for a given topic | |
https://arxiv.org/help/robots |
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
#!/usr/bin/env python | |
from datetime import datetime | |
import os | |
""" | |
Much of the typical professional communication follows a script. | |
Therefore, we can use a script to generate the content. | |
This script implements a decision tree that gets presented | |
to the user as a sequence of prompts. The output of the |
Criterion for inclusion: human readable. (which excludes ProtoBuf)
a key / value format where keys can (optionally) be grouped into sections.
cite
; last modified 1 April 2001 by John Doe
[owner]
For a great comparison, see https://tin6150.github.io/psg/blogger_container_hpc.html
privileged user running support daemon
Docker images are comprised of multiple layers managed by the Docker system
The docker daemon making calls to containerd, which in turn calls runc.
- containerd is the new high-level daemon for image management
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
FROM centos:7 | |
RUN yum install -y \ | |
python3-devel | |
RUN pip3 install setuptools_rust && \ | |
pip3 install cryptography==3.2 && \ | |
pip3 install msoffcrypto-tool | |
RUN pip3 install pathos |
Following command edits the bare repo (rather than a clone of the repo)
cd bare_git_repo
git filter-branch --prune-empty -d /Users/username/software/git_test/git_backup --index-filter "git rm --cached -f --ignore-unmatch a_large_binary" --tag-name-filter cat -- --all
Then run the following on the bare repo
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git gc --prune=now