git checkout master # setup Dockerfile
docker-compose build # uses cache (expected)
git checkout HEAD^1 # removes some line from Dockerfile
docker-compose build # uses cache (expected)
git checkout master # adds back same line to Dockerfile
docker-compose build --no-cache # does not use input from the cache (expected)
git checkout HEAD^1 # removes same line from Dockerfile
docker-compose build # has unexpected cache miss
This file contains 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
#!/bin/bash | |
# | |
# Used for processing the mbox files found in: | |
# https://diyhpl.us/~bryan/irc/bitcoin/bitcoin-dev/bitcoin-dev-ml-archive.2024-02-09-004.tar.gz | |
# | |
# Why? | |
# | |
# Linux Foundation has deprecated lists.linuxfoundation.org, and now we need a url rewriting map | |
# for the pipermail archive to numbered email files. | |
# |
This file contains 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
""" | |
A small Flask web application to demonstrate a shopping cart with simple checkout. | |
This file was written mostly by Github Co-pilot! | |
Only the webcash API endpoint was specialized knowledge. | |
""" | |
import secrets | |
import datetime | |
import json |
This file contains 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/python | |
#author: Bryan Bishop <[email protected]> | |
#date: 2010-03-16 | |
#updated: 2020-02-10 | |
from datetime import datetime | |
strptime = datetime.strptime | |
logs = open("irclogs.txt", "r").read().split("\n") | |
LOG_OPENED = "--- Log opened " |
This file contains 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
""" | |
Timestamps! | |
This file creates opentimestamps timestamps for daily IRC logs. It works when | |
running on a daily basis (called from a cronjob) or when called manually with | |
multiple days since the last run. | |
The script will identify all new log files and create timestamps for those new | |
logfiles. |
This file contains 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
#include <iostream> | |
#include "bls.h" | |
int main() { | |
std::cout << "Signature aggregation toy attempt\n"; | |
// create instance of Bls class | |
bls::Bls my_bls = bls::Bls(); |
This file contains 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
""" | |
Toy demo for finding the most recent common block between a database and a | |
bitcoind instance. The goal is to correctly handle reorgs and long periods of | |
downtime if any. The previous implementation used getblockhashes and the _batch | |
RPC call to get 300,000 blockhashes at a time. Unfortunately bitcoind is not | |
really made to handle requests of that size. Instead, here is a more optimized | |
implementation that should take less time and a minimal number of RPC requests. | |
The output of this is fed into a planner which generates a plan for processing | |
the blocks between a current blockhash and the last most recent common block. | |
""" |
This file contains 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
""" | |
Render an image of the "text mass" per minute per day of logs. Horizontal | |
minutes against vertical days. The color of each pixel represents the relative | |
text mass for that time slice (that minute). | |
http://gnusha.org/logs/graphs/300-days-anycolor-heatmap-cropped-sorted.png | |
1440 minutes/day | |
2555 days | |
1440 * 2555 |
This file contains 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
# start bitcoind in regtest mode | |
# ... set the following parameters: | |
# -rpcthreads=1 -rpctimeout=5 | |
# The behavior can be seen more readily with rpcthreads=1. | |
bitcoind -regtest -rcpthreads=1 -rpctimeout=5 -debug=1 -logtimestamps=1 -printtoconsole=1 -server=1 -listen=1 -maxconnections=500 -txindex=1 | |
# NOTE: Also, alertnotify and blocknotify scripts are being executed, although | |
# they don't seem to be necessary to trigger this behavior? | |
# using python-bitcoinlib in python3.4, although python-bitcoinrpc or even bitcoin-cli might work for this |
(The following is from an email that was received on the [email protected] mailing list...)
Well, I finally managed to sit down and code the entire prototype. This has been refined a couple times and tested via the Church play-space (https://probmods.org/play-space.html). The parameters and set-up can probably use some tweaking to make the cooperation more robust (ie: more probable/numerous as a fraction of the histogram used for testing), but oh well.
The paper follows the Goodman & Tenenbaum approach of "commonsense reasoning as conditional simulation (in probabilistic generative models)". Each agent simulates:
- The other agent simulating it,
- Simulating the other agent playing naively.
So the recursion levels are:
NewerOlder