- Works for Firefox
- press C or click button on player to copy screenshot to clipboard
- modoified based on https://github.com/chrissix666/Jellyfin-VideoOSD-Screenshot-Button
| obs = [2.0, 4.0] | |
| bincenters = [1.5, 2.5] | |
| p1 = 2.0 | |
| pdf(x) = x | |
| pdf_int = 0.5 * (3^2 - 1^2) | |
| per_bin_term = -sum(@. obs * log(pdf(bincenters) / pdf_int)) | |
| extend_term = -(sum(obs)*log(p1) - p1) | |
| println(per_bin_term + extend_term) |
julia> includet("./tmp.jl")
julia> @time user_code(LRU_getindex);
6.539568 seconds (840.07 k allocations: 69.739 MiB, 0.18% gc time, 1.18% compilation time: 33% of which was recompilation)
julia> @time user_code(illegal_getindex);
3.374077 seconds (252.80 k allocations: 53.082 MiB, 2.87% compilation time: 25% of which was recompilation)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'| 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) |
more links:
#hep on official slack.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:
| 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); |