Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Julia 0.6

julia> collect(let x
           (x for y in 1:6
            if try
                x = y
                @assert x % 2 == 0
                true
            catch err
define void @julia_f_62604(%Dual* noalias nocapture sret, %Dual* nocapture readonly dereferenceable(32), %Dual* nocapture readonly dereferenceable(32), i64, i64) #0 !dbg !5 {
top:
%5 = getelementptr inbounds %Dual, %Dual* %1, i64 0, i32 0
%6 = load double, double* %5, align 8
%7 = sitofp i64 %3 to double
%8 = call double @llvm.pow.f64(double %6, double %7)
%9 = fadd double %7, %6
%notlhs = fcmp ord double %8, 0.000000e+00
%notrhs = fcmp uno double %9, 0.000000e+00
REPORTS = \
bench_exp_taylor_judge.md \
bench_log1mx_taylor_judge.md
DIFF_CODE_NATIVE = \
bench_exp_taylor_native.diff \
bench_log1mx_taylor_native.diff
DIFF_CODE_LLVM = \
bench_exp_taylor_llvm.diff \
module RNNODE
using DiffEqBase: ODEProblem
using DiffEqCallbacks: PositiveDomain
using Parameters: @unpack, @with_kw
R(x) = erfc(-x / sqrt(2)) / 2
@with_kw struct RNN
W
@tkf
tkf / viewing.jl
Last active February 12, 2018 04:40
using IterTools: shortest, longest
struct IterView{I, S}
iter::I
indices::S
end
const viewing = IterView
mutable struct ViewState{IV, SV}
index::Int
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Dump unicode character-name pairs.
See:
- https://docs.python.org/2/library/functions.html#unichr
- https://docs.python.org/2/library/unicodedata.html
"""
from __future__ import print_function