Instantly share code, notes, and snippets.

Created July 26, 2020 19:10
This file contains 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
 import Base.Math: rem_pio2_kernel, sin_kernel, cos_kernel function nansin(x::T) where T<:Union{Float64} absx = abs(x) if absx < T(pi)/4 #|x| ~<= pi/4, no need for reduction if absx < sqrt(eps(T)) return x end return sin_kernel(x) elseif isnan(x)
Created July 26, 2020 19:09
This file contains 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
 import Base.Math: rem_pio2_kernel, sin_kernel, cos_kernel function nansin(x::T) where T<:Union{Float64} absx = abs(x) if absx < T(pi)/4 #|x| ~<= pi/4, no need for reduction if absx < sqrt(eps(T)) return x end return sin_kernel(x) elseif isnan(x)
Created July 22, 2020 18:25
This file contains 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
 import Base.Math: significand_bits,exponent_bias @inline exp_kernel(x::Float64) = evalpoly(x, (1.0, 1.0, .5, .1666666666666666666)) const J_TABLE = Float64[2^((j-1)/1024) for j in 1:1024] function myexp(x::T) where T<:Float64 # Negation so NaN gets caught if !(abs(x) < 708.3964185322641) x <= -708.3964185322641 && return 0.0
Last active July 4, 2020 03:46 — forked from nickbudi/README.md
Cygwin git compatibility with VS Code (or other Windows programs) using cygpath

# Cygwin Git + VS Code compatibility

Thanks and credit to mattn and ferreus on GitHub.

Check out `wslpath` if you're using the Windows Subsystem for Linux.

Created March 20, 2020 06:57
This file contains 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
 // the following disables italic comments! "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": ["comment"], "settings": { "fontStyle": "" } }
Created July 3, 2019 14:35
This file contains 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
 In file included from H5PLint.c:32:0: H5PLint.c: In function ‘H5PL__open’: H5PLpkg.h:97:30: warning: implicit declaration of function ‘dlopen’; did you mean ‘fdopen’? [-Wimplicit-function-declaration] # define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY) ^ H5PLint.c:326:27: note: in expansion of macro ‘H5PL_OPEN_DLIB’ if (NULL == (handle = H5PL_OPEN_DLIB(path))) { ^~~~~~~~~~~~~~ H5PLpkg.h:97:40: error: ‘RTLD_LAZY’ undeclared (first use in this function) # define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY)
Last active August 16, 2017 02:22
This file contains 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
 julia> versioninfo() Julia Version 0.7.0-DEV.1208 Commit 952dc93489* (2017-08-02 23:54 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: libopenblas64_ LIBM: libopenlibm
Created July 31, 2017 19:45
This file contains 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
Created July 14, 2017 05:48
This file contains 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
MD5: `59bab8f71f8c096cd3f72cd73851515d`
Rename it to: `Sublime Text`
Make it executable with: `chmod u+x Sublime\ Text`