Skip to content

Instantly share code, notes, and snippets.

View visual-ntt.py
import cairo
import math
import sys
class State:
def __init__(self, name, groupSize=1024):
self.surface = cairo.SVGSurface (name+".svg", 1040, 1040)
self.name = name
self.ctx = cairo.Context (self.surface)
We couldn’t find that file to show.
View eddilithium3.go
package main
import (
"bytes"
"circl/sign"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
View main.go
package main
var data uint32 = 1234
func test(p *uint32)
func main() {
test(&data)
}
@bwesterb
bwesterb / patch
Created Dec 25, 2019
prover9 make -j patch
View patch
diff --git a/apps.src/Makefile b/apps.src/Makefile
index 35558ca..b69c41f 100644
--- a/apps.src/Makefile
+++ b/apps.src/Makefile
@@ -24,7 +24,7 @@ clean:
realclean:
/bin/rm -f *.o $(PROGRAMS)
-install:
+install: apps
View gist:cf27a31333d8c303455613359c82ff2a
test_symbol_namespace.py::test_symbol_namespaces[avx2 implementation of dilithium4] FAILED [ 95%]
============================================================ FAILURES ============================================================
___________________________________ test_symbol_namespaces[avx2 implementation of dilithium4] ____________________________________
implementation = <Implementation(dilithium4, avx2)>
impl_path = '/Users/bas/src/pqclean/testcases/test_symbol_ns_zzd3cdk6/crypto_bla/scheme/impl'
test_dir = '/Users/bas/src/pqclean/testcases/test_symbol_ns_zzd3cdk6'
init = <function isolate_test_files.<locals>.initializer at 0x10d1a93b0>
destr = <function isolate_test_files.<locals>.destructor at 0x10d1a9440>
View pqclean macOS
cc -O3 -Wall -Wextra -Wpedantic -Wvla -Werror -Wmissing-prototypes -Wredundant-decls -std=c99 -Wcast-align -mavx2 -mbmi -mpopcnt -I../../../common -c -o rejsample.o rejsample.c
rejsample.c:284:44: error: expected expression
d = _mm256_loadu_si256((__m256i_u *)vec);
^
rejsample.c:284:33: error: use of undeclared identifier '__m256i_u'
d = _mm256_loadu_si256((__m256i_u *)vec);
^
rejsample.c:288:51: error: expected expression
__m128i rid = _mm_loadl_epi64((__m128i_u *)&idx[good]);
View bla.py
import csv
import json
from unidecode import unidecode
anum = set('abcdefghijklmnopqrstuvwxyz0123456789')
sfxs = {}
print("Computing suffices...")
for i, x in enumerate(json.load(open('all_songs.json'))):
def add(a, t, i):
View gist:bc75f0071ef01d370081bb260aeed9e7
$ fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=randread --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting
TEST: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
TEST: Laying out IO file (1 file / 500MiB)
Jobs: 1 (f=1): [r(1)][13.1%][r=928KiB/s][r=232 IOPS][eta 00m:53s]
Jobs: 1 (f=1): [r(1)][23.0%][r=928KiB/s][r=232 IOPS][eta 00m:47s]
Jobs: 1 (f=1): [r(1)][32.8%][r=900KiB/s][r=225 IOPS][eta 00m:41s]
Jobs: 1 (f=1): [r(1)][42.6%][r=852KiB/s][r=213 IOPS][eta 00m:35s]
Jobs: 1 (f=1): [r(1)][52.5%][r=864KiB/s][r=216 IOPS][eta 00m:29s]
View gist:ca9c328197ba43ff879ae38f2bb41936
$ fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=randread --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting
TEST: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.12
Starting 1 process
TEST: Laying out IO file (1 file / 500MiB)
Jobs: 1 (f=1): [r(1)][13.1%][r=41.1MiB/s][r=10.5k IOPS][eta 00m:53s]
Jobs: 1 (f=1): [r(1)][23.0%][r=43.7MiB/s][r=11.2k IOPS][eta 00m:47s]
Jobs: 1 (f=1): [r(1)][32.8%][r=39.8MiB/s][r=10.2k IOPS][eta 00m:41s]
Jobs: 1 (f=1): [r(1)][42.6%][r=44.6MiB/s][r=11.4k IOPS][eta 00m:35s]
Jobs: 1 (f=1): [r(1)][52.5%][r=43.2MiB/s][r=11.1k IOPS][eta 00m:29s]
You can’t perform that action at this time.