Skip to content

Instantly share code, notes, and snippets.

@NHDaly
NHDaly / .gitattributes
Last active April 15, 2019 02:23 — forked from bycpx/config
Enable textual diff of iWork '09 Pages documents. (Forked and updated from a gist that works for older Pages documents)
*.pages diff=iworkpages
@NHDaly
NHDaly / openai-vnc-logs-deluge-example.ipynb
Last active May 4, 2017 06:07
OpenAi VNCDriver environments cause too much output; makes iPython unusable.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NHDaly
NHDaly / Problem report for python
Created May 6, 2017 00:45
Python segfault when adding `env.render()` to openai/universe-starter-bot.
Process: python3.5 [49546]
Path: /Users/USER/*/python
Identifier: python3.5
Version: ???
Code Type: X86-64 (Native)
Parent Process: bash [49305]
Responsible: python3.5 [49546]
User ID: 501
Date/Time: 2017-05-05 19:40:18.857 -0500
@NHDaly
NHDaly / GPUArray choose OpenCL Device example benchmark.ipynb
Created July 22, 2017 19:17
Example of choosing which OpenCL device to use in GPUArray.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NHDaly
NHDaly / keybase.md
Created October 1, 2017 01:56
My GitHub verification for Keybase. lul "hereby".

Keybase proof

I hereby claim:

  • I am nhdaly on github.
  • I am nhdaly (https://keybase.io/nhdaly) on keybase.
  • I have a public key ASBewO2D_hY2GfDqEOQRSO7gSDuEu2KCczAXo0tfBMirdQo

To claim this, I am signing this object:

@NHDaly
NHDaly / julia-emscripten-docker-amellnik.out.txt
Created November 12, 2017 04:30
Julia emscripten Docker amellnik build output (failed)
This file has been truncated, but you can view the full file.
generic/zgemm3m_tcopy_4.c:68:25: warning: variable 'a5' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
generic/zgemm3m_tcopy_4.c:68:17: warning: variable 'a3' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
generic/zgemm3m_tcopy_4.c:68:9: warning: variable 'a1' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
[ 46%] Building CXX object lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCompares.cpp.o
@NHDaly
NHDaly / julia-emscripten-docker-amellnik.out.txt
Created November 12, 2017 04:30
Julia emscripten Docker amellnik build output (failed)
This file has been truncated, but you can view the full file.
generic/zgemm3m_tcopy_4.c:68:25: warning: variable 'a5' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
generic/zgemm3m_tcopy_4.c:68:17: warning: variable 'a3' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
generic/zgemm3m_tcopy_4.c:68:9: warning: variable 'a1' set but not used [-Wunused-but-set-variable]
FLOAT a1, a2, a3, a4, a5, a6, a7, a8;
^
[ 46%] Building CXX object lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCompares.cpp.o
@NHDaly
NHDaly / julia-regex-replace-function-call-with-macro.jl
Created October 24, 2018 22:08
Regex: remove parens to turn a julia function call into a macro call
julia> m = "call( a( x()-1 ), 2+2 )"
>> "call( a( x()-1 ), 2+2 )"
julia> replace(m, r"a(\(((?>[^()]|(?1))*)\))" => s"@b \2")
>> "call( @b x()-1 , 2+2 )"
julia> # You can see the two capture groups here: the first around the parens (used for recursion), and the second inside the parens (for substitution).
julia> match(r"a(\(((?>[^()]|(?1))*)\))", m)
>> RegexMatch("a( x()-1 )", 1="( x()-1 )", 2=" x()-1 ")
@NHDaly
NHDaly / decimal-representation-comparisons.jl
Created November 5, 2018 15:53
Benchmark Comparisons of representing numbers as Ints, Floats, and FixedDecimals of various bit sizes.
# Representation Comparisons
#
# This benchmark compares the performance of several numeric representations, over various
# numeric operations (+,-,*,/,÷...) on large arrays of numbers, in order to guide
# decision-making about how to represent fixed-decimal numbers.
#
# It compares fixed-decimal types against the builtin Int and Float types of various sizes.
# The output is written to a .csv file in the same directory as this file.
module DecimalBenchmarkComparisons
@NHDaly
NHDaly / decimal-representation-comparisons.jl
Created December 6, 2018 16:10
Benchmark for the performance of FixedPointDecimals relative to other types
# Decimal Representation Comparisons
#
# This benchmark compares the performance of several numeric representations, over various
# numeric operations (+,-,*,/,÷...) on large arrays of numbers, in order to guide
# decision-making about how to represent fixed-decimal numbers.
#
# It compares fixed-decimal types against the builtin Int and Float types of various sizes.
# The output is written to a .csv file in the same directory as this file.
module DecimalRepresentationComparisons