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
--- encrypt 2021-03-26 11:18:21.981072579 +1300 | |
+++ encrypt.no-workqueue 2021-03-26 11:18:21.981072579 +1300 | |
@@ -62,6 +62,12 @@ | |
allow-discards) | |
cryptargs="${cryptargs} --allow-discards" | |
;; | |
+ no-read-workqueue) | |
+ cryptargs="${cryptargs} --perf-no_read_workqueue" | |
+ ;; | |
+ no-write-workqueue) |
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
class LinearMap: | |
def __init__(self, matrix): | |
self.domain_dimension = len(matrix[0]) | |
self.range_dimension = len(matrix) | |
self.matrix = matrix | |
# def shifted(self, c): | |
# return LinearMap(tuple(tuple(r - c if i == j else r | |
# for j, r in enumerate(row)) | |
# for i, row in enumerate(self.matrix))) |
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
#include <stdint.h> | |
#include <stdio.h> | |
uint64_t | |
strtoword(char *s) | |
{ | |
uint64_t word = 0; | |
word |= ((uint64_t) *(s++) & 0x1f) << 55; | |
word |= ((uint64_t) *(s++) & 0x1f) << 50; | |
word |= ((uint64_t) *(s++) & 0x1f) << 45; |
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
.PHONY: test | |
test: grid6.svg grid7.svg grid8.svg grid9.svg grid6.png grid7.png grid8.png grid9.png | |
grid%.svg: grid.py | |
python3 $^ $* > $@ | |
%.png: %.svg | |
convert $^ $@ | |
.PHONY: clean |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
.PHONY: test test2 | |
test: aprog.rma assembler | |
./assembler < $< | |
test2: register prog.rm | |
echo 'Hello, world!' | ./register | |
aprog.rm: aprog.rma assembler | |
./assembler < $< > $@ |
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
n = 24 | |
$(n).mp4: stringart.py | |
$(MAKE) -j 4 $$(for i in $$(seq -w 1 $n); do echo -n "$n-$$i.png "; done) | |
ffmpeg -r 2 -f image2 -s 800x800 -i $(n)-%02d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p $@ | |
%.png: %.svg | |
convert $^ $@ | |
$(n)-%.svg: stringart.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
.PHONY: all | |
all: tutorial.pdf tutorial-solns.pdf | |
%.pdf: %.tex | |
pdflatex $^ | |
%-solns.pdf: %.tex | |
pdflatex -jobname $(basename $@) '\def\SOLUTIONS{} \input{$^}' | |
.PHONY: clean |
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
\documentclass[a5paper]{article} | |
\usepackage[a5paper,margin=1cm]{geometry} | |
\usepackage{array} | |
\usepackage{multirow} | |
\usepackage{graphicx} | |
\pagenumbering{gobble} | |
\begin{document} | |
\begin{center} | |
\section*{Freezer inventory} |
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
#!/bin/sh | |
# Generate all .m4 file outputs - being lazy and just re-running the script | |
# with an argument. To be safe AND lazy, add a useless argument just to make | |
# sure this doesn't fork bomb me some day if I change how this is done. | |
if [ -z "$1" ]; then | |
exec find $(dirname -- "$0") -name '*.m4' -exec "./$0" '{}' 'safety' \; | |
fi | |
# Generate $1 from its .m4 file. |