Skip to content

Instantly share code, notes, and snippets.

Elliott Slaughter elliottslaughter

Block or report user

Report or block elliottslaughter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@elliottslaughter
elliottslaughter / test.md
Created Feb 19, 2012
Pandoc 1.9.1.1 Page Numbering Bug
View test.md

% Test TOC

Section A

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies laoreet risus et semper. Vestibulum sed turpis augue. Integer dictum aliquam nulla quis varius. Morbi vitae enim est. Nulla ut tellus magna, et ultrices libero. Proin consectetur posuere neque, nec consequat magna dignissim eget. Aenean gravida sapien eget purus consectetur non cursus arcu pellentesque. Fusce pretium ipsum vel massa suscipit mollis. Morbi porttitor tincidunt semper. Proin auctor ultrices varius. Nam scelerisque dictum egestas. Sed lectus sem, pulvinar gravida commodo venenatis, congue vitae tellus. In sem ante, accumsan nec porta sed, convallis et risus. Sed rhoncus vehicula diam, quis cursus nisl laoreet vel. Fusce interdum neque sed odio tempus id lacinia mi feugiat. Nulla egestas nulla eget diam dapibus eleifend.

Nulla quis cursus sapien. Nunc non nisl libero. Aenean risus nisi, dignissim quis ultrices vitae, porttitor vel nibh. Pellentesque sit amet nulla et est rutrum tincidunt. Donec et s

View deindent.hs
import Data.List
import Text.Pandoc.Definition
import Text.Pandoc.JSON
import Text.Pandoc.Walk
-- This pass implements <div class="noindent"> by adding \noindent to
-- the start of every paragraph.
deindentParas :: Block -> Block
deindentParas (Para lines) =
Para (RawInline (Format "tex") "\\noindent " : lines)
View keybase.md

Keybase proof

I hereby claim:

  • I am elliottslaughter on github.
  • I am slaughter (https://keybase.io/slaughter) on keybase.
  • I have a public key ASBoWr0wGnhfXhgdVpqIzvpCYvZp6kn87ZRMOnmgRduwCAo

To claim this, I am signing this object:

@elliottslaughter
elliottslaughter / test_cores.py
Last active Nov 27, 2019
Reproducer for TensorFlow CPU usage
View test_cores.py
from __future__ import print_function
import argparse
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.client import timeline
parser = argparse.ArgumentParser()
View terra_method_missing.t
struct st {}
local iseven = terralib.overloadedfunction("iseven")
local isodd = terralib.overloadedfunction("isodd")
terra iseven_int :: {st, int} -> bool
terra isodd_int :: {st, int} -> bool
iseven:adddefinition(iseven_int)
isodd:adddefinition(isodd_int)
terra iseven_int(self : st, x : int)
View AddLLVM.cmake
include(LLVMProcessSources)
include(LLVM-Config)
include(DetermineGCCCompatible)
function(llvm_update_compile_flags name)
get_property(sources TARGET ${name} PROPERTY SOURCES)
if("${sources}" MATCHES "\\.c(;|$)")
set(update_src_props ON)
endif()
View gist:878bd01be7aaf3fc8a1c3f59ed6ad3fe
$ rg --no-filename --only-matching 'lua[A-Za-z0-9_]+[(]' src/ | sort -u
luaK_exp2nextreg(
luaK_exp2val(
luaL_checkint(
luaL_checknumber(
luaL_checkstack(
luaL_checkstring(
luaL_error(
luaL_loadbuffer(
luaL_loadfile(
View micro_bench.py
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import sys
import time
import dask
import numpy as np
View hbb-libstdc++.txt
$ docker run -v `pwd`:/io terra/build-box:latest bash -c "cd /io && /hbb/bin/setuser builder ./hbb-builder.sh"
Holy build box activated
Prefix: /hbb_shlib
CFLAGS/CXXFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include
LDFLAGS: -L/hbb_shlib/lib -static-libstdc++
STATICLIB_CFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include -fPIC
SHLIB_CFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include
SHLIB_LDFLAGS: -L/hbb_shlib/lib -static-libstdc++
+ mkdir -p /io/build
View hbb-no-libc++.txt
$ docker run -v `pwd`:/io terra/build-box:no-libcxx bash -c "cd /io && /hbb/bin/setuser builder ./hbb-builder.sh"
Holy build box activated
Prefix: /hbb_shlib
CFLAGS/CXXFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include
LDFLAGS: -L/hbb_shlib/lib -static-libstdc++
STATICLIB_CFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include -fPIC
SHLIB_CFLAGS: -g -O2 -fvisibility=hidden -I/hbb_shlib/include
SHLIB_LDFLAGS: -L/hbb_shlib/lib -static-libstdc++
+ mkdir -p /io/build
You can’t perform that action at this time.