julia> get_hour("horizon zero dawn")44.0
julia> get_hour("Celeste")
8.0
julia> get_hour("Portal 2")
21.0
This file contains hidden or 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
using Plots, Statistics | |
using StatsPlots | |
using Distributions #this pkg actually is end game, but we're just using gaussian pdf | |
function custom_gaussian(n) | |
#b) | |
#parent distribution is Gaussian | |
μ = 10 | |
parent = Distributions.Normal(10) #μ = 10 | |
parent_pdf(x) = Distributions.pdf(parent, x) |
This file contains hidden or 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 REPL | |
import REPL.LineEdit | |
import JLFzf | |
const mykeys = Dict{Any,Any}( | |
# primary history search: most recent first | |
"^R" => function (mistate, o, c) | |
line = JLFzf.inter_fzf(JLFzf.read_repl_hist(), | |
"--read0", | |
"--tiebreak=index" | |
"--height=80%"); |
This file contains hidden or 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
[Security] | |
EAP-Method=TLS | |
EAP-Identity=<your harvard email> | |
EAP-TLS-CACert=/var/lib/iwd/usertrustrsacertificationauthority.cer | |
EAP-TLS-ClientCert=/var/lib/iwd/harvard_eduroam.p12 | |
EAP-TLS-ClientKey=/var/lib/iwd/harvard_eduroam.p12 | |
EAP-TLS-ClientKeyPassphrase=<your certificate password> | |
EAP-TLS-Phase2-Method=Tunneled-PAP | |
EAP-TLS-Phase2-Identity=<your harvard email> | |
EAP-TLS-Phase2-Password=<your harvard login password> |
This file contains hidden or 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
#= one can use these to test fastmath-like path in controlled way | |
@inline mul_fast(x::T, y::T) where {T<:Complex} = | |
T(complex(muladd(-imag(x), imag(y), real(x)*real(y)), | |
muladd( real(x), imag(y), imag(x)*real(y)))) | |
@inline abs2_fast(z::Complex) = muladd(real(z), real(z), imag(z)*imag(z)) | |
=# | |
function run_julia(height, width) | |
y = range(-1.0f0, 0.0f0; length = height) |
This file contains hidden or 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
using Cairo, LinearAlgebra | |
c = CairoRGBSurface(256,256); | |
cr = CairoContext(c); | |
save(cr); | |
set_source_rgb(cr,0.8,0.8,0.8); # light gray | |
rectangle(cr,0.0,0.0,256.0,256.0); # background | |
fill(cr); | |
restore(cr); |
I always gripe about Python not having useful (i.e. performant and with adoption) built-in array type and Numpy doesn't distinguish "vector of vector" from "matrix", but this still surprised me.
It seems that Numpy uses intersect
logic to check a in b
:
- UnROOT.jl -- ROOT I/O in pure Julia: https://github.com/JuliaHEP/UnROOT.jl
- UnROOT.jl JOSS paper: https://joss.theoj.org/papers/bab42b0c60f9dc7ef3b8d6460bc7229c
- HiggsCombine / HistFactory in pure Julia: https://github.com/JuliaHEP/LiteHF.jl
- Histogram + plotting in pure Julia: https://moelf.github.io/FHist.jl/dev/notebooks/makie_plotting/
- Benchmark: https://github.com/Moelf/UnROOT_RDataFrame_MiniBenchmark
more links:
- JuliaHEP organization: https://github.com/JuliaHEP/
- Julia official discourse HEP tag: https://discourse.julialang.org/tag/hep, also join us at
#hep
on official slack. - mailist: https://groups.google.com/g/julia-hep
This file contains hidden or 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> using ONNX, ONNX.Ghost | |
julia> dummy = rand(Float32, 78, 1); | |
julia> model = ONNX.load("./classifier_DF.onnx", dummy); | |
julia> x = range(0, Float32(0.5), length=78) | |
0.0f0:0.0064935065f0:0.5f0 | |
julia> result = Ghost.play!(model, x) |
This in principle allows one to read anything that uproot/awkward can read and represent (as long as to_arrow
worked):
We use the following packages to demonstrate our round trip
julia> using PythonCall
julia> const ak = pyimport("awkward")
julia> ak.__version__
Python str: '1.9.0rc10'
OlderNewer