Skip to content

Instantly share code, notes, and snippets.

View swenson's full-sized avatar
🍰
cupcake

Christopher Swenson swenson

🍰
cupcake
View GitHub Profile
@swenson
swenson / rlwe-integers.ipynb
Created December 24, 2016 07:57
This notebook performs computations from "Fully Homomorphic Encryption over the Integers" by van Dijk, Gentry, Halevi, and Vaikuntanathanm, which can be found at https://eprint.iacr.org/2009/616.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swenson
swenson / segfault.py
Created July 13, 2016 04:23
Segfault Python 2.7.11 (mac) by adding numbers
This file has been truncated, but you can view the full file.
def f():
a0 = 0
a1 = 1
a2 = 2
a3 = 3
a4 = 4
a5 = 5
a6 = 6
a7 = 7
a8 = 8
@swenson
swenson / repro.chpl
Created March 28, 2016 21:44
Tuple destructor: formal count does not match argument count
proc f() : (int, int) {
return f();
}
proc main() {
f();
}
proc f() : (int, int) {
return f();
}
proc main() {
f();
}
@swenson
swenson / Makefile.conf
Created January 5, 2014 21:39
OpenBLAS errors on GCE
OSNAME=Linux
ARCH=x86_64
C_COMPILER=GCC
BINARY32=
BINARY64=1
CEXTRALIB=-L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lc
F_COMPILER=GFORTRAN
FC=gfortran
BU=_
FEXTRALIB=-L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lgfortran -lm -lquadmath -lm -lc
@swenson
swenson / Make.user
Created January 3, 2014 20:38
GCE Make.user for building Julia
USE_SYSTEM_LLVM=0
USE_SYSTEM_ARPACK=1
USE_ATLAS=1
USE_BLAS64=0
USE_SYSTEM_BLAS=1
USE_SYSTEM_LAPACK=1
ATLAS_LIBDIR=/usr/lib
LIBBLAS=-L$(ATLAS_LIBDIR) -latlas
LIBLAPACK=$(LIBBLAS)
LIBBLASNAME = libatlas
In [35]: def a():
a = yield 4
print a
....:
In [36]: b = a()
In [37]: b.next()
Out[37]: 4
@swenson
swenson / gist:5241278
Created March 25, 2013 22:12
givaro-3.7.1 error log
Using local scripts to install givaro-3.7.1
Found local sources at upstream/givaro-3.7.1.tar.bz2
givaro-3.7.1
====================================================
Setting up build directory for givaro-3.7.1
Finished set up
****************************************************
Host system:
Linux sagedev 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
@swenson
swenson / debug.asm
Created April 25, 2015 19:37
A 6502 disassembler and debugger (written as part of a NES emulator)
do_a_trap
mov esi, [trap]
test esi, 0x10000
jnz normal_trap
test esi, 0x20000
jnz register_trap
jmp near return_no_cigar
normal_trap
cmp si, [_PC]
jnz near return_no_cigar
@swenson
swenson / Swenson & Poppies.tmTheme
Created April 12, 2015 22:42
Swenson & Poppies Sublime Text theme, based on Slush & Poppies.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>William D. Neumann</string>