content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule CUDA_compat_jll using Base using Base: UUID using LazyArtifacts import JLLWrappers JLLWrappers.@generate_main_file_header("CUDA_compat") JLLWrappers.@generate_main_file("CUDA_compat", UUID("340b3129-3577-50c6-bc43-5dfc29cb9805")) end # m...
[ 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412, 29369, 5631, 62, 5589, 265, 62, 73, 297, 198, 3500, 7308, 198, 3500, 7308, 25, 471, 27586, 198, 3500, 406, ...
2.552239
134
<gh_stars>1-10 module StrideArrays # Write your package code here. using VectorizationBase, ArrayInterface, SLEEFPirates, VectorizedRNG, LoopVectorization, LinearAlgebra, Random#, StackPointers#, # SpecialFunctions # Perhaps there is a better way to support erf? using VectorizationBase: align, AbstractStridedP...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 4285, 485, 3163, 20477, 198, 198, 2, 19430, 534, 5301, 2438, 994, 13, 198, 198, 3500, 20650, 1634, 14881, 11, 198, 220, 15690, 39317, 11, 311, 2538, 36, 5837, 343, 689, 11, 20650, 1...
2.905622
498
<gh_stars>0 using BlackBoxOptim function get_metric(this::DSB2018.Data.Image, res::Matrix{Float64}) adaptive_threshold = DSB2018.Model.skimage_filters.threshold_local(res, 11, offset=0.0) global_threshold = DSB2018.Model.skimage_filters.threshold_otsu(res) w_adaptve = 0.1 threshold = adaptive_thres...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 2619, 14253, 27871, 320, 198, 198, 8818, 651, 62, 4164, 1173, 7, 5661, 3712, 5258, 33, 7908, 13, 6601, 13, 5159, 11, 581, 3712, 46912, 90, 43879, 2414, 30072, 628, 220, 220, 220, 29605, 62, 4...
1.951893
1,268
<reponame>HanneDeprez1/codeRob using Distributions using EEG using DataFrames using DSP using Logging using Docile using Compat using Gadfly """ hotelling(::SSR; kwargs...) Hotelling test on SSR data Performs a hotelling test do determine the presenence and properties of a steady state response. Results are sto...
[ 27, 7856, 261, 480, 29, 39, 21952, 12156, 21107, 16, 14, 8189, 14350, 198, 3500, 46567, 507, 198, 3500, 48749, 198, 3500, 6060, 35439, 198, 3500, 360, 4303, 198, 3500, 5972, 2667, 198, 3500, 14432, 576, 198, 3500, 3082, 265, 198, 3500...
2.269941
2,708
new_SIG = "Hello SIG" println(new_SIG)
[ 3605, 62, 50, 3528, 796, 366, 15496, 33993, 1, 198, 35235, 7, 3605, 62, 50, 3528, 8, 198 ]
2.166667
18
<gh_stars>10-100 rand(rng::AbstractRNG, ::Random.SamplerType{E}) where {T<:AbstractFloat, E<:RealLog{T}} = exp(E, -randexp(rng, T)) rand(rng::AbstractRNG, ::Random.SamplerType{E}) where {E<:RealLog} = exp(E, -randexp(rng)) # todo: sample CLogarithmic # (note that rand(Complex) samples uniformly from the unit square)
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 25192, 7, 81, 782, 3712, 23839, 49, 10503, 11, 7904, 29531, 13, 16305, 20053, 6030, 90, 36, 30072, 810, 1391, 51, 27, 25, 23839, 43879, 11, 412, 27, 25, 15633, 11187, 90, 51, 11709, 796,...
2.48062
129
<gh_stars>0 struct Field name::String ranges::Vector{UnitRange{Int}} end function Field(s::AbstractString) mkrange = (r) -> ((a, b) = split(r, "-"); parse(Int, a):parse(Int, b)) name, rngs = split(s, ':') range1, range2 = split(rngs, " or ") Field(name, [mkrange(range1), mkrange(range2)]) end ...
[ 27, 456, 62, 30783, 29, 15, 198, 7249, 7663, 198, 220, 220, 220, 1438, 3712, 10100, 198, 220, 220, 220, 16069, 3712, 38469, 90, 26453, 17257, 90, 5317, 11709, 198, 437, 198, 8818, 7663, 7, 82, 3712, 23839, 10100, 8, 198, 220, 220, ...
1.985075
1,206
# dqn.jl # original: https://github.com/denizyuret/Knet.jl/blob/master/examples/reinforcement-learning/dqn/dqn_with_target.jl module DQN using Gym, Knet, JLD include("replay_buffer.jl") include("mlp.jl") include("piecewise_schedule.jl") function loss(w::WeightParamsR{T}, states::VecOrMat{T}, actions, targets; nh=1)...
[ 2, 288, 80, 77, 13, 20362, 198, 2, 2656, 25, 3740, 1378, 12567, 13, 785, 14, 6559, 528, 88, 495, 83, 14, 42, 3262, 13, 20362, 14, 2436, 672, 14, 9866, 14, 1069, 12629, 14, 260, 259, 13442, 12, 40684, 14, 49506, 77, 14, 49506, ...
1.977112
1,835
using SugarKelp, Test, Interpolations, DataFrames @info "These tests check if the code has been broken but does not thoroughly check if it produces correct results (for now at least). They are also so monalithic you can't actually tell which bit you've broken." const arr_lat = [1:3;] const arr_lon = [1:3;] const arr_...
[ 3500, 20874, 42, 417, 79, 11, 6208, 11, 4225, 16104, 602, 11, 6060, 35439, 198, 198, 31, 10951, 366, 4711, 5254, 2198, 611, 262, 2438, 468, 587, 5445, 475, 857, 407, 13770, 2198, 611, 340, 11073, 3376, 2482, 357, 1640, 783, 379, 155...
2.205381
2,936
function solve_s_nested_flexible(sj,inv_sigma,deltas,J,order,included,maxes,marketvars) # Solve for s as p moves if size(sj,1)>1 sj = sj'; end if marketvars!=nothing extra = size(marketvars,2); else extra = 0; end s = sj; bernO = convert.(Integer,order); BERN = [] # @show J for xj = 1:J if xj>1 ...
[ 8818, 8494, 62, 82, 62, 77, 7287, 62, 32880, 856, 7, 82, 73, 11, 16340, 62, 82, 13495, 11, 67, 2120, 292, 11, 41, 11, 2875, 11, 259, 10341, 11, 9806, 274, 11, 10728, 85, 945, 8, 198, 2, 4294, 303, 329, 264, 355, 279, 6100, 1...
1.957182
724
function testNHInertiaCart() close all % Physical parameters Param=PhysParameters(); % Grid nx=60; ny=2; Param.Lx=300*1.e3; Param.Ly=2*Param.Lx/nx; x0=0; y0=0; Param.H=10*1.e3; Param.OrdPoly=4; %Horizontal grid size dx=Param.Lx/nx/(Param.OrdPoly+1); dz=min(dx/2,Param.H/10); nz=ceil(Param.H/dz); nz=40; Boundary.WE='P...
[ 8818, 1332, 33863, 818, 861, 544, 43476, 3419, 198, 19836, 477, 198, 198, 4, 16331, 10007, 198, 22973, 28, 43215, 48944, 9783, 198, 198, 4, 24846, 198, 77, 87, 28, 1899, 26, 198, 3281, 28, 17, 26, 198, 22973, 13, 43, 87, 28, 6200,...
1.977434
1,551
using Dates using Base.Test include("types.jl") include("periods.jl") include("accessors.jl") include("query.jl") include("arithmetic.jl") include("conversions.jl") include("ranges.jl") include("adjusters.jl") include("io.jl") #TODO #Timezones.jl #NEED TESTS #IDEAS #research JSR-310, PHP? javascript? go? C#? fo...
[ 3500, 44712, 198, 3500, 7308, 13, 14402, 198, 198, 17256, 7203, 19199, 13, 20362, 4943, 198, 17256, 7203, 41007, 82, 13, 20362, 4943, 198, 17256, 7203, 15526, 669, 13, 20362, 4943, 198, 17256, 7203, 22766, 13, 20362, 4943, 198, 17256, 7...
2.576763
241
using DFControl, Test DFControl.removedefault_pseudos(:test) @test DFControl.getdefault_pseudo(:Si, :test) == nothing setdefault_server(prevdefault)
[ 3500, 36323, 15988, 11, 6208, 198, 198, 8068, 15988, 13, 2787, 2668, 891, 1721, 62, 7752, 42418, 7, 25, 9288, 8, 198, 198, 31, 9288, 36323, 15988, 13, 1136, 12286, 62, 7752, 12003, 7, 25, 42801, 11, 1058, 9288, 8, 6624, 2147, 198, ...
2.867925
53
"PDDL state description." mutable struct State types::Set{Term} # Object type declarations facts::Set{Term} # Boolean-valued fluents fluents::Dict{Symbol,Any} # All other fluents end "PDDL action description." struct Action name::Symbol # Name of action args::Vector{Var} # Action parameters typ...
[ 1, 5760, 19260, 1181, 6764, 526, 198, 76, 18187, 2878, 1812, 198, 220, 220, 220, 3858, 3712, 7248, 90, 40596, 92, 1303, 9515, 2099, 31713, 198, 220, 220, 220, 6419, 3712, 7248, 90, 40596, 92, 1303, 41146, 12, 39728, 6562, 658, 198, ...
2.711271
2,369
<filename>src/components/keywords.jl<gh_stars>0 """ parse_kw(ps::ParseState) Dispatch function for when the parser has reached a keyword. """ function parse_kw(ps::ParseState) k = kindof(ps.t) if k === Tokens.IF return @default ps @closer ps :block parse_if(ps) elseif k === Tokens.LET r...
[ 27, 34345, 29, 10677, 14, 5589, 3906, 14, 2539, 10879, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 21136, 62, 46265, 7, 862, 3712, 10044, 325, 9012, 8, 198, 198, 49354, 2163, 329, 618, 262, 30751, 468, 4...
2.128403
5,584
<gh_stars>100-1000 #= From <NAME>, <NAME>, <NAME>, <NAME> "Swift: Compiled Inference for Probabilistic Programming Languages" Page 3 Summary Statistics parameters mean std naive_se mcse ess rhat ess_per_sec Symbol Float64 Float64 Float64 Float64? Float6...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 28, 198, 220, 3574, 198, 220, 1279, 20608, 22330, 1279, 20608, 22330, 1279, 20608, 22330, 1279, 20608, 29, 198, 220, 366, 10462, 2135, 25, 3082, 3902, 554, 4288, 329, 30873, 14991, 2569...
1.851398
2,039
# This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: mediastore_data using AWS.Compat using AWS.UUIDs """ delete_object(path) delete_object(path, params::Dict{String,<:Any}) Deletes an object at the specified path. # Arguments - `path`: The path (including the file name) where the...
[ 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 16957, 459, 382, 62, 7890, 198, 3500, 30865, 13, 40073, 198, 3500, 30865, 13, 52, 27586, 82, ...
3.467266
2,337
<filename>benchmark/elixir_3d_euler_source_terms_tree.jl using OrdinaryDiffEq using Trixi ############################################################################### # semidiscretization of the compressible Euler equations equations = CompressibleEulerEquations3D(1.4) initial_condition = initial_condition_conve...
[ 27, 34345, 29, 26968, 4102, 14, 417, 32345, 62, 18, 67, 62, 68, 18173, 62, 10459, 62, 38707, 62, 21048, 13, 20362, 198, 198, 3500, 14230, 3219, 28813, 36, 80, 198, 3500, 7563, 29992, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2...
2.970894
481
<filename>test/problems/simple.jl simple = @stochastic_model begin @stage 1 begin @decision(model, x₁ >= 40) @decision(model, x₂ >= 20) objective = @expression(model, 100*x₁ + 150*x₂) @objective(model, Min, objective) @constraint(model, x₁ + x₂ <= 120) end @stage 2 be...
[ 27, 34345, 29, 9288, 14, 1676, 22143, 14, 36439, 13, 20362, 198, 36439, 796, 2488, 301, 5374, 3477, 62, 19849, 2221, 198, 220, 220, 220, 2488, 14247, 352, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 12501, 1166, 7, 19849, 11...
1.682243
535
<gh_stars>10-100 "Dummy function and forcing default." @inline zero_func(args...) = 0 """ Forcing(Fu, Fv, Fw, FF, FS) Forcing(; Fu=zero_func, Fv=zero_func, Fw=zero_func, FT=zero_func, FS=zero_func) Construct a `Forcing` to specify functions that force `u`, `v`, `w`, `T`, and `S`. Forcing functions default to...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 1, 35, 13513, 2163, 290, 10833, 4277, 526, 198, 31, 45145, 6632, 62, 20786, 7, 22046, 23029, 796, 657, 198, 198, 37811, 198, 220, 220, 220, 1114, 2259, 7, 41133, 11, 376, 85, 11, 376, ...
2.255717
481
module SeqUMAP using Distances using FASTX import MultivariateStats: fit, PCA, transform import UMAP: umap include("encoding.jl") include("embedding.jl") include("projection.jl") include("io.jl") #encoding.jl... export AA_DICT, NT_DICT, IUPACbool, resolve_base, resolve_seq, string2encoding, #embedding.jl... collec...
[ 21412, 1001, 80, 5883, 2969, 198, 198, 3500, 4307, 1817, 198, 3500, 376, 11262, 55, 198, 11748, 7854, 42524, 29668, 25, 4197, 11, 4217, 32, 11, 6121, 198, 11748, 471, 33767, 25, 334, 8899, 628, 198, 17256, 7203, 12685, 7656, 13, 20362...
2.385
200
<filename>test/test-unitaire-GenericStatemod.jl #unitary test GenericStatemod x0 = ones(6) state0 = GenericState(x0) @test isnan(state0.start_time) #Default value of start_time is 0 x1 = [1.0] update!(state0, x = x1) #Check the update of state0 @test state0.x == x1 @test isnan(state0.start_time) #start_time must be un...
[ 27, 34345, 29, 9288, 14, 9288, 12, 403, 26627, 12, 46189, 17126, 368, 375, 13, 20362, 198, 2, 403, 9331, 1332, 42044, 17126, 368, 375, 198, 87, 15, 796, 3392, 7, 21, 8, 198, 5219, 15, 796, 42044, 9012, 7, 87, 15, 8, 198, 198, ...
2.547619
168
<reponame>tjjarvinen/HKQM.jl<filename>src/integrations.jl using Distributed """ integrate(ϕ, grid::CubicElementGrid, ψ) integrate(grid::CubicElementGrid, ρ) integrate(ϕ::QuantumState, ψ::QuantumState) Low lever integration routines. (users should not use these, as they can change) """ function integrate(ϕ...
[ 27, 7856, 261, 480, 29, 83, 73, 9491, 7114, 268, 14, 38730, 48, 44, 13, 20362, 27, 34345, 29, 10677, 14, 18908, 9143, 13, 20362, 198, 3500, 4307, 6169, 198, 198, 37811, 198, 220, 220, 220, 19386, 7, 139, 243, 11, 10706, 3712, 4363...
1.985612
3,753
<reponame>ksteimel/DependencyTrees.jl<gh_stars>0 struct Deplol <: DT.Dependency end @testset "Tokens" begin @testset "Untyped Dependencies" begin r = root(UntypedDependency) @test isroot(r) sent = [ ("The", 2), ("cat", 3), ("slept", 0), (".",...
[ 27, 7856, 261, 480, 29, 74, 4169, 320, 417, 14, 35, 2690, 1387, 51, 6037, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 7249, 1024, 489, 349, 1279, 25, 24311, 13, 35, 2690, 1387, 886, 198, 198, 31, 9288, 2617, 366, 22906, 1, 2221,...
1.763986
1,144
<gh_stars>10-100 """ Double pendulum """ struct Impact end struct Nominal end struct DoublePendulum{T,X} <: Model{T} nq::Int nu::Int nw::Int nc::Int m1::T # mass link 1 J1::T # inertia link 1 l1::T # length link 1 lc1::T # length to COM link 1 m2::T # mass li...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 37811, 198, 220, 220, 220, 11198, 44017, 14452, 198, 37811, 198, 7249, 17677, 886, 220, 198, 7249, 21198, 1292, 886, 198, 198, 7249, 11198, 47, 437, 14452, 90, 51, 11, 55, 92, 1279, 25, ...
1.801628
2,334
<filename>src/suggestions.jl suggbase[:DEFAULTMSG] = "Helpme not helping? Report an issue at <https://github.com/snotskie/Helpme.jl/issues>." suggbase[:DICT_MERGE] = "Julia attempts to choose the proper type for Dicts when [...] "* "is used, and functions like merge(collection, others...) can be fussy when types don't...
[ 27, 34345, 29, 10677, 14, 47811, 507, 13, 20362, 198, 82, 6837, 8692, 58, 25, 7206, 38865, 5653, 38, 60, 796, 366, 22087, 1326, 407, 5742, 30, 6358, 281, 2071, 379, 1279, 5450, 1378, 12567, 13, 785, 14, 82, 1662, 8135, 494, 14, 22...
3.062741
2,072
__precompile__() module VortexModel using Reexport include("Vortex.jl") include("TimeMarching.jl") @reexport using .Vortex @reexport using .TimeMarching export Vortex end
[ 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 49790, 17633, 198, 3500, 797, 39344, 198, 198, 17256, 7203, 53, 26158, 13, 20362, 4943, 198, 17256, 7203, 7575, 16192, 278, 13, 20362, 4943, 198, 198, 31, 631, 87, 634, 1262, 764, 53, ...
2.885246
61
using Test, LinearAlgebra, MPStates, Random include("./tensor_operations_tests.jl") include("./mps_tests.jl") include("./mps_operations_tests.jl") include("./mpo_tests.jl") include("./mpo_operations_tests.jl") include("./dmrg_tests.jl")
[ 3500, 6208, 11, 44800, 2348, 29230, 11, 4904, 42237, 11, 14534, 198, 198, 17256, 7, 1911, 14, 83, 22854, 62, 3575, 602, 62, 41989, 13, 20362, 4943, 198, 17256, 7, 1911, 14, 76, 862, 62, 41989, 13, 20362, 4943, 198, 17256, 7, 1911, ...
2.531915
94
<filename>docs/make.jl using IPIL8 using Documenter makedocs(; modules=[IPIL8], authors="<NAME> <<EMAIL>> and contributors", repo="https://github.com/aborzunov/IPIL8.jl/blob/{commit}{path}#L{line}", sitename="IPIL8.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", ...
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 6101, 4146, 23, 198, 3500, 16854, 263, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 4061, 4146, 23, 4357, 198, 220, 220, 220, 7035, 2625, 27, 20608, 2...
2.109756
246
import Pkg.instantiate instantiate() import Aggregator.store_inferred store_inferred()
[ 11748, 350, 10025, 13, 8625, 415, 9386, 198, 8625, 415, 9386, 3419, 198, 198, 11748, 19015, 2301, 1352, 13, 8095, 62, 259, 18186, 198, 8095, 62, 259, 18186, 3419 ]
3
29
<gh_stars>1-10 _interpolate_helper = (x0, y0, x1, y1, x) -> ( y0 * (x1 - x) + y1 * (x - x0) ) / (x1 - x0) function interpolate(x0, y0, x1; left_copy::Bool=false, right_copy::Bool=false) # assuming x0, x1 are both monotonically increasing idx0 = 1 # old coordinate idx1 = 1 # new coordinate N0 ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 62, 3849, 16104, 378, 62, 2978, 525, 796, 357, 87, 15, 11, 331, 15, 11, 2124, 16, 11, 331, 16, 11, 2124, 8, 4613, 357, 331, 15, 1635, 357, 87, 16, 532, 2124, 8, 1343, 331, 16, ...
1.598746
638
export @require isprecompiling() = ccall(:jl_generating_output, Cint, ()) == 1 @init begin push!(Base.package_callbacks, loadmod) end loaded(mod::Symbol) = getthing(Main, mod) != nothing const modlisteners = Dict{Symbol, Vector{Function}}() listenmod(f, mod::Symbol) = loaded(mod) ? f() : modlisteners[mod] ...
[ 39344, 2488, 46115, 198, 198, 271, 3866, 5589, 4386, 3419, 796, 269, 13345, 7, 25, 20362, 62, 8612, 803, 62, 22915, 11, 327, 600, 11, 32865, 6624, 352, 198, 198, 31, 15003, 2221, 198, 220, 4574, 0, 7, 14881, 13, 26495, 62, 13345, ...
2.209402
702
# packing and unpacking of Graph related types using IncrementalInference using DistributedFactorGraphs using Manifolds using Test ## @testset "Serialization of SamplableBelief types" begin ## td = Uniform() ptd = convert(String, td) # TODO, PackedSamplableBelief utd = convert(SamplableBelief, td) @test td.a - u...
[ 2, 24157, 290, 8593, 5430, 286, 29681, 3519, 3858, 198, 198, 3500, 10791, 37098, 818, 4288, 198, 3500, 4307, 6169, 41384, 37065, 82, 198, 3500, 1869, 361, 10119, 198, 198, 3500, 6208, 198, 198, 2235, 198, 198, 31, 9288, 2617, 366, 326...
2.566988
933
using Test using Trapz using Unitful @info "Started Package Testing" vx=range(0,1,length=5) vy=range(0,2,length=10) vz=range(0,3,length=15) M=[x^2+y^2+z^2 for x=vx,y=vy,z=vz] res=28.157801083396322 @testset "Methods full integral,partial integral, 2axis, 1axis" begin @test trapz((vx,vy,vz), M) ≈ res I_xy=tra...
[ 3500, 6208, 198, 3500, 21914, 89, 198, 3500, 11801, 913, 198, 198, 31, 10951, 366, 10434, 276, 15717, 23983, 1, 198, 85, 87, 28, 9521, 7, 15, 11, 16, 11, 13664, 28, 20, 8, 198, 7670, 28, 9521, 7, 15, 11, 17, 11, 13664, 28, 940...
1.863393
1,120
<reponame>fredrikekre/BitTorrent.jl using Documenter, BitTorrent if haskey(ENV, "GITHUB_ACTIONS") ENV["JULIA_DEBUG"] = "Documenter" end makedocs( format = Documenter.HTML( prettyurls = haskey(ENV, "GITHUB_ACTIONS"), canonical = "https://fredrikekre.github.io/BitTorrent.jl/v1", ), modul...
[ 27, 7856, 261, 480, 29, 39193, 8760, 74, 260, 14, 13128, 39286, 13, 20362, 198, 3500, 16854, 263, 11, 4722, 39286, 198, 198, 361, 468, 2539, 7, 1677, 53, 11, 366, 38, 10554, 10526, 62, 10659, 11053, 4943, 198, 220, 220, 220, 12964, ...
2.203463
231
<gh_stars>0 @doc raw""" ABC equilibrium in (x,y,z) coordinates with covariant components of the vector potential given by ```math A (x,y,z) = \big( a \, \sin(z) + c \, \cos(y) , \, b \, \sin(x) + a \, \cos(z) , \, c \, \sin(y) + b \, \cos(x) \big)^T ``` resulting in the magnetic field ``B(x,y,z) = A(x,y,z)``. Paramete...
[ 27, 456, 62, 30783, 29, 15, 198, 31, 15390, 8246, 37811, 198, 24694, 29163, 287, 357, 87, 11, 88, 11, 89, 8, 22715, 351, 44829, 415, 6805, 286, 262, 15879, 198, 13059, 1843, 1813, 416, 198, 15506, 63, 11018, 198, 32, 357, 87, 11, ...
2.105263
836
@show filter(iseven, 1:10)
[ 31, 12860, 8106, 7, 786, 574, 11, 352, 25, 940, 8, 198 ]
2.25
12
using Base.Test function solve(chars, offset::Int) sum = 0 len = length(chars) for i in 1:len # 1-base indexing is a bit weird for this if chars[i] == chars[(i - 1 + offset)%len + 1] sum += parse(Int, chars[i]) end end sum end @test solve("1122", 1) == 3 @test solve("1234", 1) == 0 @test s...
[ 3500, 7308, 13, 14402, 198, 198, 8818, 8494, 7, 354, 945, 11, 11677, 3712, 5317, 8, 198, 220, 2160, 796, 657, 198, 220, 18896, 796, 4129, 7, 354, 945, 8, 198, 220, 329, 1312, 287, 352, 25, 11925, 198, 220, 220, 220, 1303, 352, 1...
2.419118
272
module Processing2D using Tk, Cairo, Colors, Tau, Graphics import Cairo: rotate, translate, scale, arc # include("constants.jl") export animate, coordSystem export Height, Width, displayHeight, displayWidth # export size export focused, cursor, noCursor # export frameCount, frameRate # export createShape, loadShape...
[ 21412, 28403, 17, 35, 198, 198, 3500, 309, 74, 11, 23732, 11, 29792, 11, 36849, 11, 19840, 198, 198, 11748, 23732, 25, 23064, 11, 15772, 11, 5046, 11, 10389, 198, 198, 2, 2291, 7203, 9979, 1187, 13, 20362, 4943, 198, 198, 39344, 438...
2.399083
8,066
<gh_stars>0 using RNG using Base.Test: @test
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 371, 10503, 198, 3500, 7308, 13, 14402, 25, 2488, 9288, 198 ]
2.368421
19
push!(LOAD_PATH,"../src/") using Documenter, NeuroAnalysis # makedocs( # # format = :html, # # sitename = "NeuroAnalysis.jl", # ) # deploydocs( # deps = Deps.pip("mkdocs", "python-markdown-math", "mkdocs-material"), # repo = "github.com/ZaneMuir/NeuroAnalysis.jl.git", # julia = "0.6" # ) m...
[ 14689, 0, 7, 35613, 62, 34219, 553, 40720, 10677, 14, 4943, 198, 3500, 16854, 263, 11, 13782, 32750, 198, 198, 2, 285, 4335, 420, 82, 7, 198, 2, 220, 220, 220, 220, 1303, 5794, 796, 1058, 6494, 11, 198, 2, 220, 220, 220, 220, 13...
1.979215
433
<filename>src/ui/body.jl export constructtriad export constructtorus export constructsphere export constructcylinder export constructbox export constructwhirl export constructframe export getplane export constructfiber export constructtwospinor export transformg """ constructtriad(q [; length]) Construct a triad...
[ 27, 34345, 29, 10677, 14, 9019, 14, 2618, 13, 20362, 198, 39344, 5678, 83, 21244, 198, 39344, 5678, 13165, 385, 198, 39344, 5678, 2777, 1456, 198, 39344, 5678, 38801, 5540, 198, 39344, 5678, 3524, 198, 39344, 5678, 1929, 1901, 198, 3934...
1.985609
5,976
<reponame>marinadietze/ScoreDrivenModels.jl<filename>src/distributions/non_native_dists.jl # Define TDistLocationScale as the location scale transformation of the Distributions.jl TDist export TDistLocationScale TDistLocationScale = LocationScale{Float64,TDist{Float64}} export BetaFourParameters BetaFourParameters = L...
[ 27, 7856, 261, 480, 29, 3876, 259, 324, 1155, 2736, 14, 26595, 20564, 574, 5841, 1424, 13, 20362, 27, 34345, 29, 10677, 14, 17080, 2455, 507, 14, 13159, 62, 30191, 62, 67, 1023, 13, 20362, 198, 2, 2896, 500, 13320, 396, 14749, 29990...
3.480392
102
<reponame>ChrisRackauckas/GeomDAE.jl "Special Additive Runge Kutta integrator." immutable IntegratorSARK{T} <: Integrator{T} equation::Equation tableau::TableauSARK end "Integrate DAE with Special Additive Runge Kutta integrator." function integrate!(int::IntegratorSARK, s::SolutionDAE) # TODO end
[ 27, 7856, 261, 480, 29, 15645, 49, 441, 559, 694, 292, 14, 10082, 296, 5631, 36, 13, 20362, 198, 198, 1, 13409, 3060, 1800, 5660, 469, 40323, 8326, 4132, 12392, 526, 198, 8608, 18187, 15995, 12392, 50, 14175, 90, 51, 92, 1279, 25, ...
2.706897
116
@unionise begin """ Radial{Tα<:Real, Tβ<:Real, Tγ<:RealVec} <: Invertible A Radial Flow as parameterised in [1]. [1] - <NAME>., & <NAME>. (2018). Conditional Density Estimation with Bayesian Normalising Flows. """ struct Radial{Tα<:Real, Tβ<:Real, Tγ<:RealVec} <: Invertible α::Tα β::Tβ γ::Tγ ...
[ 31, 24592, 786, 2221, 198, 198, 37811, 198, 220, 220, 220, 5325, 498, 90, 51, 17394, 27, 25, 15633, 11, 309, 26638, 27, 25, 15633, 11, 309, 42063, 27, 25, 15633, 53, 721, 92, 1279, 25, 554, 1851, 856, 198, 198, 32, 5325, 498, 27...
1.96977
827
<gh_stars>0 using StochasticDiffEq, DiffEqDevTools, DiffEqBase, Test using DiffEqProblemLibrary.SDEProblemLibrary: importsdeproblems; importsdeproblems() import DiffEqProblemLibrary.SDEProblemLibrary: prob_sde_linear Random.seed!(100) prob = prob_sde_linear integrator = init(prob,EM(),dt=1//2^(4),tstops = [0.33]) for...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 520, 5374, 3477, 28813, 36, 80, 11, 10631, 36, 80, 13603, 33637, 11, 10631, 36, 80, 14881, 11, 6208, 198, 3500, 10631, 36, 80, 40781, 23377, 13, 50, 7206, 40781, 23377, 25, 17944, 10378, 305, ...
2.158672
271
using Yao using Yao.Intrinsics using Compat ######################### CONTINUOUS ################################ uniform_state(num_bit) = register(ones(Complex128, 1<<num_bit)/sqrt(1<<num_bit)) ######################### PEAKS ################################ """ GHZ wave function. """ function ghz(num_bit::Int; x::I...
[ 3500, 37826, 198, 3500, 37826, 13, 5317, 81, 1040, 873, 198, 3500, 3082, 265, 198, 198, 14468, 7804, 2, 43659, 52, 20958, 1303, 14468, 7804, 4242, 21017, 198, 403, 6933, 62, 5219, 7, 22510, 62, 2545, 8, 796, 7881, 7, 1952, 7, 5377, ...
2.408163
245
<filename>benchmarks/school8-stan.run.jl using CmdStan, Turing, ContinuousBenchmarks # Model taken from https://github.com/goedman/Stan.jl/blob/master/Examples/Mamba/EightSchools/schools8.jl include(joinpath(ContinuousBenchmarks.STAN_DATA_DIR, "school8-stan.data.jl")) include(joinpath(ContinuousBenchmarks.STAN_MODELS...
[ 27, 34345, 29, 26968, 14306, 14, 14347, 23, 12, 14192, 13, 5143, 13, 20362, 198, 3500, 327, 9132, 32140, 11, 39141, 11, 45012, 44199, 14306, 198, 198, 2, 9104, 2077, 422, 3740, 1378, 12567, 13, 785, 14, 2188, 276, 805, 14, 32140, 13...
2.437768
466
<filename>test/runtests.jl using Test using HTensors using BenchmarkTools include("make.jl") u1 = rand(10,4) u2 = rand(9,6) u3 = rand(8,3) u4 = rand(11,4) u12 = rand(4,6,7) u34 = rand(3,4,5) u1234 = rand(7,5,1) t1234 = make4(u1,u2,u3,u4,u12,u34,u1234) @test nmode(t1234) == 4 @test shape(t1234) == [10,9,8,11] a1234 ...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 6208, 198, 3500, 7154, 641, 669, 198, 3500, 25187, 4102, 33637, 198, 198, 17256, 7203, 15883, 13, 20362, 4943, 198, 198, 84, 16, 796, 43720, 7, 940, 11, 19, 8, 198, 84...
1.858124
437
using SimilaritySearch function main(n, m, dim) db = MatrixDatabase(rand(Float32, dim, n)) queries = MatrixDatabase(rand(Float32, dim, m)) seq = ExhaustiveSearch(; db) k = 10 @time searchbatch(seq, queries, k; parallel=Threads.nthreads() > 1) end @info "warming" main(100, 10, 3) @info "large bench...
[ 3500, 11014, 414, 18243, 198, 198, 8818, 1388, 7, 77, 11, 285, 11, 5391, 8, 198, 220, 220, 220, 20613, 796, 24936, 38105, 7, 25192, 7, 43879, 2624, 11, 5391, 11, 299, 4008, 198, 220, 220, 220, 20743, 796, 24936, 38105, 7, 25192, 7...
2.503356
149
module ISP include(joinpath(dirname(@__FILE__), "globSettings.jl")) # Include common types include(joinpath(dirname(@__FILE__), "ISPPDEtypes.jl")) # Include functionals we have defined so far. include(joinpath(dirname(@__FILE__), "Functionals.jl")) end
[ 21412, 33086, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, 366, 4743, 672, 26232, 13, 20362, 48774, 198, 198, 2, 40348, 2219, 3858, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828,...
2.909091
88
function import_bibtex(file::AbstractString) return BibParser.BibTeX.parse_file(file)[1] end function int_to_spaces(n::Int) str = "" for i in 1:n str *= " " end return str end # Dictionnary to handle spaces while exporting BibTeX const spaces = Dict{AbstractString,AbstractString}(map( ...
[ 8818, 1330, 62, 65, 571, 16886, 7, 7753, 3712, 23839, 10100, 8, 198, 220, 220, 220, 1441, 43278, 46677, 13, 33, 571, 49568, 13, 29572, 62, 7753, 7, 7753, 38381, 16, 60, 198, 437, 198, 198, 8818, 493, 62, 1462, 62, 2777, 2114, 7, ...
2.303863
4,660
#!/usr/bin/env julia # Raytracer.jl # Raytracing for the generation of photorealistic images in Julia # Copyright (c) 2021 <NAME>, <NAME> # CLI tool for to manage through Raytracer.jl package the generation # and rendering of photorealistic images using Pkg Pkg.activate(normpath(@__DIR__)) using Raytracer using A...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 2, 7760, 2213, 11736, 13, 20362, 198, 2, 7760, 2213, 4092, 329, 262, 5270, 286, 2825, 39396, 2569, 4263, 287, 22300, 198, 2, 15069, 357, 66, 8, 33448, 1279, 20608, 22330, 1...
2.225616
7,464
include("basic.jl") include("tracer_provider.jl")
[ 17256, 7203, 35487, 13, 20362, 4943, 198, 17256, 7203, 2213, 11736, 62, 15234, 1304, 13, 20362, 4943, 198 ]
2.777778
18
<filename>deps/build.jl<gh_stars>1-10 begin if haskey(ENV, "MANUAL") include("build2.jl") @goto writedeps end push!(LOAD_PATH, "@stdlib") using Pkg using Conda PYTHON = joinpath(Conda.BINDIR, "python") !haskey(Pkg.installed(), "PyCall") && Pkg.add("PyCall") ENV["PYTHON"]=PYTHON Pkg.build("PyCall") using PyC...
[ 27, 34345, 29, 10378, 82, 14, 11249, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 27471, 220, 198, 361, 468, 2539, 7, 1677, 53, 11, 366, 10725, 25620, 4943, 198, 220, 220, 220, 2291, 7203, 11249, 17, 13, 20362, 4943, 198, ...
2.167991
2,768
<gh_stars>1-10 # This code generates the 2l+1 dimensional matrix Fourier coefficients # for a function defined over the rotation and rotation/reflection groups # # The routines in this file are based upon: # # FFTs on the Rotation Group # <NAME> and <NAME> # J. Fourier. Anal. Appl., Vol. 14, Issue. 2, p. 145-179,...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2438, 18616, 262, 362, 75, 10, 16, 38517, 17593, 34296, 5277, 44036, 198, 2, 329, 257, 2163, 5447, 625, 262, 13179, 290, 13179, 14, 5420, 1564, 2628, 198, 2, 198, 2, 383, 31878, ...
1.682764
1,201
<reponame>vvanirudh/TOMS.jl # RETURN FUNCTIONS function mountaincar_return_based_model_search_main(num_episodes_offline::Int64) rng = MersenneTwister(0) model_search_steps = [] model = MountainCar(0.0) horizon = 500 for rock_c in range_of_values mountaincar = MountainCar(rock_c) data...
[ 27, 7856, 261, 480, 29, 85, 10438, 343, 463, 71, 14, 51, 2662, 50, 13, 20362, 198, 2, 30826, 27064, 29397, 4177, 11053, 198, 8818, 8598, 7718, 62, 7783, 62, 3106, 62, 19849, 62, 12947, 62, 12417, 7, 22510, 62, 538, 8052, 62, 2364,...
2.390585
3,930
############################################################################################ ### Types and Constructor ############################################################################################ """ Connects to `Optim.jl` as the optimization backend. # Constructor SemOptimizerOptim(; algo...
[ 29113, 29113, 14468, 7804, 4242, 198, 21017, 24897, 290, 28407, 273, 198, 29113, 29113, 14468, 7804, 4242, 198, 37811, 198, 13313, 82, 284, 4600, 27871, 320, 13, 20362, 63, 355, 262, 23989, 30203, 13, 198, 198, 2, 28407, 273, 628, 220, ...
3.567474
578
using Random, LinearAlgebra # Standardised tests for the eigen decomposition of a square kronecker product function eigen_tests(rng, C::AbstractKroneckerProduct) # Check approximate correctness of decomposition λ, Γ = eigen(C) @test Γ * Diagonal(λ) * Γ' ≈ C # Check approximate correctness of shifted ...
[ 3500, 14534, 11, 44800, 2348, 29230, 198, 198, 2, 8997, 1417, 5254, 329, 262, 304, 9324, 26969, 9150, 286, 257, 6616, 479, 33171, 15280, 1720, 198, 8818, 304, 9324, 62, 41989, 7, 81, 782, 11, 327, 3712, 23839, 42, 33171, 15280, 15667,...
2.032909
942
<filename>test/stats.jl<gh_stars>0 module TestStats using Bootstrap using FactCheck x = collect(100:-1:0) ## avoid sorting ## reference values, computed with boot:::norm_inter (R) qr = ( (1.0, Inf), (0.0, -Inf), (0.5, 50.0), (0.4713, 47.07265), (0.1, 9.205641), ...
[ 27, 34345, 29, 9288, 14, 34242, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 6208, 29668, 198, 198, 3500, 18892, 26418, 198, 3500, 19020, 9787, 198, 198, 87, 796, 2824, 7, 3064, 21912, 16, 25, 15, 8, 22492, 3368, 29407, 198, ...
1.978151
595
<gh_stars>1-10 module PlasmoTest #保留五位小数的函数 digit5(x) = round(x*100000)/100000 export digit5 end # module
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 1345, 292, 5908, 14402, 198, 2, 46479, 251, 45911, 247, 49390, 19526, 235, 22887, 237, 46763, 108, 21410, 49035, 121, 46763, 108, 198, 27003, 20, 7, 87, 8, 796, 2835, 7, 87, 9, 3064...
1.844828
58
<reponame>UnofficialJuliaMirror/CodecBase.jl-6c391c72-fb7b-5838-ba82-7cfb1bcfecbf # CodeTable64 # =========== const CodeTable64 = CodeTable{64} const BASE64_CODEPAD = 0x40 # PADding const BASE64_CODEIGN = 0x41 # IGNore const BASE64_CODEEND = 0x42 # END const BASE64_CODEERR = 0xff # ERRor ignorecode(::Type{CodeTa...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 43806, 721, 14881, 13, 20362, 12, 21, 66, 37710, 66, 4761, 12, 21855, 22, 65, 12, 3365, 2548, 12, 7012, 6469, 12, 22, 12993, 65, 16, 65, 12993, 721, 19881, 198, 2, ...
2.24
750
<filename>test/similar_tests.jl @testset "similar" begin #= @testset "similar_type" begin @test similar_type(SimpleAxis(10), UnitRange{Int}) <: SimpleAxis{Int,UnitRange{Int}} @test similar_type(typeof(SimpleAxis(10)), UnitRange{Int}) <: SimpleAxis{Int,UnitRange{Int}} @test similar_type(Axis(1:10), UnitRan...
[ 27, 34345, 29, 9288, 14, 38610, 62, 41989, 13, 20362, 198, 198, 31, 9288, 2617, 366, 38610, 1, 2221, 198, 198, 2, 28, 198, 31, 9288, 2617, 366, 38610, 62, 4906, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2092, 62, 4906, 7, 26437, ...
2.227021
903
<reponame>yihong-zhang/YaoBlocks.jl using YaoBlocks, YaoArrayRegister, BenchmarkTools, StaticArrays r = rand_state(20) U = @SMatrix rand(ComplexF64, 2, 2) t1 = @benchmark instruct!($(statevec(r)), $U, 1) t2 = @benchmark instruct!($(statevec(r)), $(Matrix(U)), 1) (minimum(t1).time - minimum(t2).time) / minimum(t1).tim...
[ 27, 7856, 261, 480, 29, 88, 4449, 506, 12, 23548, 648, 14, 56, 5488, 45356, 13, 20362, 198, 3500, 37826, 45356, 11, 37826, 19182, 38804, 11, 25187, 4102, 33637, 11, 36125, 3163, 20477, 198, 198, 81, 796, 43720, 62, 5219, 7, 1238, 8,...
2.153043
575
################################################# FILE DESCRIPTION ######################################################### # The Graph datatype is the core datastructure used in Graft.jl. The Graph datatype has the following fields: # 1. nv : The number of vertices in the graph. # 2. ne : The number of edges...
[ 29113, 14468, 2, 45811, 22196, 40165, 1303, 29113, 14468, 7804, 198, 198, 2, 383, 29681, 4818, 265, 2981, 318, 262, 4755, 4818, 459, 5620, 973, 287, 402, 1617, 13, 20362, 13, 383, 29681, 4818, 265, 2981, 468, 262, 1708, 7032, 25, 198,...
3.430689
1,349
<reponame>robert-s-lee/grid-julia<filename>requirements.jl<gh_stars>0 using Pkg Pkg.add("ArgParse")
[ 27, 7856, 261, 480, 29, 305, 4835, 12, 82, 12, 7197, 14, 25928, 12, 73, 43640, 27, 34345, 29, 8897, 18883, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 350, 10025, 198, 47, 10025, 13, 2860, 7203, 28100, 10044, 325, 4943 ]
2.302326
43
module TestSpectralMixture using CovarianceFunctions using CovarianceFunctions: parameters, nparameters, isstationary using Test # IDEA: test on real data # dataset: # https://cdiac.ess-dive.lbl.gov/ftp/trends/co2/maunaloa.co2 @testset "spectral mixture kernel" begin n = 32 x = sort!(randn(n)) w = 1. μ ...
[ 21412, 6208, 49738, 1373, 44, 9602, 198, 3500, 39751, 2743, 590, 24629, 2733, 198, 3500, 39751, 2743, 590, 24629, 2733, 25, 10007, 11, 299, 17143, 7307, 11, 318, 17529, 560, 198, 3500, 6208, 198, 2, 4522, 16412, 25, 1332, 319, 1103, 1...
2.268683
562
struct StopCriterion min_time::Float64 max_time::Float64 min_fevals::Int64 max_fevals::Int64 end function StopCriterion( ; min_time=Inf , max_time=4. , min_fevals=1000_000_000_000 , max_fevals=1000_000_000_000_000 ) StopCriterion( min_time , max_time , min_fevals , max_fevals ) end
[ 198, 7249, 13707, 18559, 28019, 198, 220, 220, 220, 949, 62, 2435, 3712, 43879, 2414, 198, 220, 220, 220, 3509, 62, 2435, 3712, 43879, 2414, 628, 220, 220, 220, 949, 62, 69, 1990, 874, 3712, 5317, 2414, 198, 220, 220, 220, 3509, 62,...
2.291045
134
<reponame>Yoshinobu-Ishizaki/StatsWithJuliaBook<gh_stars>100-1000 using Flux, Flux.Data.MNIST, LinearAlgebra using Flux: onehotbatch imgs = Flux.Data.MNIST.images() labels = Flux.Data.MNIST.labels() nTrain = length(imgs) trainData = vcat([hcat(float.(imgs[i])...) for i in 1:nTrain]...) trainLabels = labels[1:nTrain]...
[ 27, 7856, 261, 480, 29, 56, 3768, 259, 672, 84, 12, 40, 1477, 528, 8182, 14, 29668, 3152, 16980, 544, 10482, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 1610, 2821, 11, 1610, 2821, 13, 6601, 13, 39764, 8808, 11, 44800, 234...
2.32574
439
# QuEST.jl/deps/build.jl # # Authors: # - <NAME>, Uni Tartu # - <NAME>, Uni Tartu # - <NAME>, Ketita Labs & Uni Tartu # # MIT License # # (c) Ketita Labs, Uni Tartu, and the authors. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files...
[ 2, 2264, 6465, 13, 20362, 14, 10378, 82, 14, 11249, 13, 20362, 198, 2, 198, 2, 46665, 25, 198, 2, 220, 532, 1279, 20608, 22330, 43376, 37109, 84, 198, 2, 220, 532, 1279, 20608, 22330, 43376, 37109, 84, 198, 2, 220, 532, 1279, 2060...
2.617679
1,844
abstract Layer{A<:AbstractArray, B<:AbstractArray} # Pointwise layers always use the same dimensionality for input and output abstract Pointwise{A<:AbstractArray} <: Layer{A, A} abstract Container{A<:AbstractArray, B<:AbstractArray} <: Layer{A, B} # By default, accGradParameters! does nothing function accGradParamet...
[ 397, 8709, 34398, 90, 32, 27, 25, 23839, 19182, 11, 347, 27, 25, 23839, 19182, 92, 198, 198, 2, 6252, 3083, 11685, 1464, 779, 262, 976, 15793, 1483, 329, 5128, 290, 5072, 198, 397, 8709, 6252, 3083, 90, 32, 27, 25, 23839, 19182, 9...
2.492958
1,988
<reponame>prl-julia/julia-sub module JuliaSub #-------------------------------------------------- # Imports #-------------------------------------------------- using MacroTools using Multisets #-------------------------------------------------- # Files #-------------------------------------------------- include("ut...
[ 27, 7856, 261, 480, 29, 1050, 75, 12, 73, 43640, 14, 73, 43640, 12, 7266, 198, 21412, 22300, 7004, 198, 198, 2, 47232, 438, 198, 2, 1846, 3742, 198, 2, 47232, 438, 198, 198, 3500, 42755, 33637, 198, 3500, 7854, 271, 1039, 198, 198...
5.169118
136
<reponame>jbreue16/Trixi.jl using OrdinaryDiffEq using Trixi ########## EINSTELLUNGEN ######### initial_condition = initial_condition_weak_blast_wave CFL = 0.8 tspan = (0.0, 10) N = 4 cells_per_dimension = (32, 32) # CHandrashekar DGSEM Entropy STability and conservation depending on surface flux # surface F...
[ 27, 7856, 261, 480, 29, 73, 4679, 518, 1433, 14, 51, 8609, 72, 13, 20362, 198, 198, 3500, 14230, 3219, 28813, 36, 80, 198, 3500, 7563, 29992, 628, 198, 198, 7804, 2235, 220, 412, 38604, 23304, 4944, 35353, 220, 220, 220, 220, 1303, ...
2.415554
1,273
<filename>example.jl using PyPlot plt.style.use("seaborn-paper") PyPlot.rc("font", family="serif") PyPlot.rc("text", usetex=true) PyPlot.matplotlib.rcParams["axes.titlesize"] = 10 PyPlot.matplotlib.rcParams["axes.labelsize"] = 10 PyPlot.matplotlib.rcParams["xtick.labelsize"] = 9 PyPlot.matplotlib.rcParams["ytick.labe...
[ 27, 34345, 29, 20688, 13, 20362, 198, 3500, 9485, 43328, 198, 198, 489, 83, 13, 7635, 13, 1904, 7203, 325, 397, 1211, 12, 20189, 4943, 198, 198, 20519, 43328, 13, 6015, 7203, 10331, 1600, 1641, 2625, 2655, 361, 4943, 198, 20519, 43328...
2.160772
311
<filename>example/simparams/_loadparams.jl using SparseArrays using Serialization include("constants.jl") include("data.jl") include("agent_profile.jl") include("additional_activity.jl")
[ 27, 34345, 29, 20688, 14, 14323, 37266, 47835, 2220, 37266, 13, 20362, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 23283, 1634, 198, 17256, 7203, 9979, 1187, 13, 20362, 4943, 198, 17256, 7203, 7890, 13, 20362, 4943, 198, 17256, 7203, ...
3.280702
57
import Theta: ellipsoid_pointwise, ellipsoid_uniform @testset "Ellipsoid" begin T = [1 0; 0 1]; shift = [0; 0]; @test Set(ellipsoid_pointwise(T, 2, shift)) == Set([[0,-1], [-1,0], [1,0], [0,1], [0,0]]) @test issubset(ellipsoid_pointwise(T, 2, shift), ellipsoid_uniform(T, 2)) end
[ 11748, 383, 8326, 25, 30004, 541, 568, 312, 62, 4122, 3083, 11, 30004, 541, 568, 312, 62, 403, 6933, 198, 198, 31, 9288, 2617, 366, 30639, 541, 568, 312, 1, 2221, 198, 220, 220, 220, 309, 796, 685, 16, 657, 26, 657, 352, 11208, ...
2.048276
145
<filename>Solutions/p67.jl #= By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total from top to bottom in triangle.txt (right click and 'Save Link/Target As...')...
[ 27, 34345, 29, 50, 14191, 14, 79, 3134, 13, 20362, 198, 2, 28, 198, 3886, 3599, 379, 262, 1353, 286, 262, 22950, 2174, 290, 3867, 284, 15909, 3146, 319, 262, 5752, 2174, 11, 262, 5415, 2472, 422, 1353, 284, 4220, 318, 2242, 13, 19...
3
425
<filename>test/electron.jl using Test using NeXLCore @testset "Electron" begin @test isapprox(λₑ(1.0), 1.227e-7, atol = 0.001e-7) @test isapprox(λₑ(100.0), 1.227e-8, atol = 0.001e-8) @test isapprox(λₑ(1.0e4), 1.227e-9, atol = 0.001e-9) @test isapprox(λₑ(5.0e3), 0.0173 * 1.0e-7, atol = 0.0001 * 1.0e-7...
[ 27, 34345, 29, 9288, 14, 9509, 1313, 13, 20362, 198, 3500, 6208, 198, 3500, 3169, 55, 5639, 382, 628, 198, 31, 9288, 2617, 366, 19453, 1313, 1, 2221, 628, 220, 220, 220, 2488, 9288, 318, 1324, 13907, 7, 39377, 158, 224, 239, 7, 16...
1.53607
804
using Test import NNlib import KissConv to_whcn(arr) = reshape(arr, (size(arr)..., 1, 1)) @testset "Against NNlib" begin for item in [ (arr1=randn(10), arr2=randn(2)), (arr1=randn(Float32, 10), arr2=randn(Float32, 2)), (arr1=randn(Float32, 2,3), arr2=randn(Float32, 2,1)), ...
[ 3500, 6208, 198, 11748, 399, 45, 8019, 198, 11748, 20350, 3103, 85, 198, 198, 1462, 62, 1929, 31522, 7, 3258, 8, 796, 27179, 1758, 7, 3258, 11, 357, 7857, 7, 3258, 26513, 11, 352, 11, 352, 4008, 198, 198, 31, 9288, 2617, 366, 3927...
1.765854
410
<filename>src/types/decisions/expressions/mutable_arithmetics.jl # MIT License # # Copyright (c) 2018 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including w...
[ 27, 34345, 29, 10677, 14, 19199, 14, 12501, 3279, 14, 42712, 507, 14, 76, 18187, 62, 283, 342, 27757, 13, 20362, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 1279, 20608, 29, 198, 2, 198, 2, 2448, 3411, 318, 29...
2.410732
4,044
### A Pluto.jl notebook ### # v0.12.20 using Markdown using InteractiveUtils # ╔═╡ b9c84fff-8579-46fc-94cf-8bf6651ed0c0 begin using Pkg Pkg.activate(mktempdir()) Pkg.Registry.update() Pkg.add("Yao") Pkg.add("YaoPlots") end # ╔═╡ 2d4047c2-3ea3-11eb-1076-3dff1cef4ec9 using Yao, YaoPlots # ╔═╡ 6184d07e-3dd2-11eb-...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 1238, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 275, 24, 66, 5705, 20972, 12, 23, 41734, 12, ...
2.058592
4,830
<gh_stars>0 unsafe_mulby_1000(x) = (x<<10) - (x << 5) + (x << 3) safe_mulby_1000(x::Int64) = x <= 9_223_372_036_854_775 ? mulby_100(x) : ArgumentError("$(x) is too large") safe_mulby_1000(x::Int32) = x <= 2_147_483 ? mulby_100(x) : ArgumentError("$(x) is too la...
[ 27, 456, 62, 30783, 29, 15, 198, 13271, 8635, 62, 76, 377, 1525, 62, 12825, 7, 87, 8, 796, 357, 87, 16791, 940, 8, 532, 357, 87, 9959, 642, 8, 1343, 357, 87, 9959, 513, 8, 198, 198, 21230, 62, 76, 377, 1525, 62, 12825, 7, 87...
1.770799
3,630
<gh_stars>0 using Test, PolyChaos import LinearAlgebra: norm, dot ########################################################## # MEASURE ########################################################## @testset "Error handling for Measure" begin @test_throws AssertionError Measure("jacobi",Dict(:shape_a=>-1.,:shape_b=>2....
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 6208, 11, 12280, 1925, 7495, 198, 11748, 44800, 2348, 29230, 25, 2593, 11, 16605, 628, 198, 29113, 14468, 7804, 2235, 198, 2, 11948, 1921, 11335, 198, 29113, 14468, 7804, 2235, 198, 31, 9288, 261...
2.370978
1,523
@testset "minimal_pos_test" begin @test +(interval(1.0,2.0)) === Interval(1.0,2.0) @test +(emptyinterval()) === emptyinterval() @test +(entireinterval()) === entireinterval() @test +(interval(1.0,Inf)) === Interval(1.0,Inf) @test +(interval(-Inf,-1.0)) === Interval(-Inf,-1.0) @test +(inter...
[ 31, 9288, 2617, 366, 1084, 4402, 62, 1930, 62, 9288, 1, 2221, 628, 220, 220, 220, 2488, 9288, 1343, 7, 3849, 2100, 7, 16, 13, 15, 11, 17, 13, 15, 4008, 24844, 4225, 2100, 7, 16, 13, 15, 11, 17, 13, 15, 8, 628, 220, 220, 220,...
2.062105
169,923
<gh_stars>1-10 using LikelihoodProfiler include("./cases_func.jl") #include("../src/params_intervals.jl") # using ParametersIdentification res1 = params_intervals( [3., 4, 1.1, 10.], 3, 9., f_3p_1im, logscale_all = true, method = :ONE_PASS ) res2 = params_intervals( [3., 4, 1.1, 10.], ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 4525, 11935, 15404, 5329, 198, 198, 17256, 7, 1911, 14, 33964, 62, 20786, 13, 20362, 4943, 198, 198, 2, 17256, 7203, 40720, 10677, 14, 37266, 62, 3849, 12786, 13, 20362, 4943, 198, 2, ...
2.02551
196
<filename>src/memalloc.jl import CoverageTools const MallocInfo = CoverageTools.MallocInfo const analyze_malloc = CoverageTools.analyze_malloc const analyze_malloc_files = CoverageTools.analyze_malloc_files const find_malloc_files = CoverageTools.find_malloc_files const sortbybytes = CoverageTools.sortbybytes # Suppo...
[ 27, 34345, 29, 10677, 14, 11883, 32332, 13, 20362, 198, 11748, 33998, 33637, 198, 198, 9979, 16618, 420, 12360, 796, 33998, 33637, 13, 44, 32332, 12360, 198, 9979, 16602, 62, 76, 32332, 796, 33998, 33637, 13, 38200, 2736, 62, 76, 32332,...
2.988701
177
<reponame>GathererA/TrajectoryOptimization.jl # The purpose of this script is to validate first order hold derivation (including minimum time) using ForwardDiff using LinearAlgebra using Test model, obj = TrajectoryOptimization.Dynamics.dubinscar n = model.n m = model.m dt = 1.0 h = sqrt(dt) solver = Solver(model,obj,i...
[ 27, 7856, 261, 480, 29, 38, 265, 48386, 32, 14, 15721, 752, 652, 27871, 320, 1634, 13, 20362, 198, 2, 383, 4007, 286, 428, 4226, 318, 284, 26571, 717, 1502, 1745, 16124, 341, 357, 8201, 5288, 640, 8, 198, 3500, 19530, 28813, 198, ...
1.4737
13,308
@testset "Optimizer" begin @testset "Global" begin f(x) = (x[2] - 5.1 / (4 * π^2) * x[1]^2 + 5 / π * x[1] - 6)^2 + 10 * (1 - 1 / (8π)) * cos(x[1]) + 10 + 5 * x[1] optix = [-3.689285272296118, 13.629987729088747] optif = -16.64402157084319 ...
[ 31, 9288, 2617, 366, 27871, 320, 7509, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 22289, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 277, 7, 87, 8, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.643695
682
<gh_stars>1-10 push!(LOAD_PATH, string(pwd(),"/src")) import AnalyticDomains using ModifiedStokesSolver using Base.Test @testset "Discretization" begin numpanels = 100 panelorder = 16 curve = AnalyticDomains.starfish(n_arms = 5, amplitude=0.3); dcurve = discretize(curve, numpanels, panelorder); # ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4731, 7, 79, 16993, 3419, 553, 14, 10677, 48774, 198, 198, 11748, 16213, 13370, 24510, 1299, 198, 3500, 40499, 1273, 3369, 50, 14375, 198, 3500, 7308, 13, ...
2.365482
197
<reponame>rejuvyesh/MuJoCo.jl ## clean up pm = mj.loadXML(modelfile, C_NULL) pd = mj.makeData(pm) m, d = mj.mapmujoco(pm, pd) qpos0 = copy(d.qpos) nstep = 500 for i=1:nstep mj.step(m, d) end ndata = Threads.nthreads() @info "Testing Derivatives for $(ndata), threads." datas = Array{jlData}(undef, ndata) for i=1:nd...
[ 27, 7856, 261, 480, 29, 260, 14396, 7670, 5069, 14, 33239, 9908, 7222, 13, 20362, 198, 198, 2235, 3424, 510, 198, 4426, 796, 285, 73, 13, 2220, 55, 5805, 7, 4666, 7046, 576, 11, 327, 62, 33991, 8, 198, 30094, 796, 285, 73, 13, 1...
1.802001
1,399
@generated function apodization!(p::NFFTPlan{D,0,T}, f::AbstractArray{U,D}, g::StridedArray{Complex{T},D}) where {D,T,U} quote @nexprs $D d -> offset_d = round(Int, p.n[d] - p.N[d]/2) - 1 @nloops $D l f d->(gidx_d = rem(l_d+offset_d, p.n[d]) + 1) begin v = @nref $D f l @nexp...
[ 31, 27568, 2163, 2471, 375, 1634, 0, 7, 79, 3712, 45, 5777, 51, 20854, 90, 35, 11, 15, 11, 51, 5512, 277, 3712, 23839, 19182, 90, 52, 11, 35, 5512, 308, 3712, 13290, 1384, 19182, 90, 5377, 11141, 90, 51, 5512, 35, 30072, 810, 13...
1.730316
2,121
<reponame>wherrera10/julia-EDF using EDFPlus using Test edfh = loadfile("EDFPlusTestFile.edf") @test edfh.gender == "Female" @test edfh.annotationchannel == 30 @test edfh.filetype == FileStatus(1) fs = samplerate(edfh,1) f1 = EDFPlus.recordslice(edfh, 21, 22)[1,:] f2 = highpassfilter(reshape(f1, length(f1)), fs) f3...
[ 27, 7856, 261, 480, 29, 86, 372, 24420, 940, 14, 73, 43640, 12, 1961, 37, 198, 3500, 412, 8068, 17860, 198, 3500, 6208, 628, 198, 276, 69, 71, 796, 3440, 7753, 7203, 1961, 37, 17860, 14402, 8979, 13, 276, 69, 4943, 198, 198, 31, ...
2.182471
696
<filename>src/problems/105.construct-binary-tree-from-preorder-and-inorder-traversal.jl # --- # title: 105. Construct Binary Tree from Preorder and Inorder Traversal # id: problem105 # author: zhwang # date: 2022-03-02 # difficulty: Medium # categories: Array, Tree, Depth-first Search # link: <https://leetcode.com/prob...
[ 27, 34345, 29, 10677, 14, 1676, 22143, 14, 13348, 13, 41571, 12, 39491, 12, 21048, 12, 6738, 12, 3866, 2875, 12, 392, 12, 259, 2875, 12, 9535, 690, 282, 13, 20362, 198, 2, 11420, 198, 2, 3670, 25, 13343, 13, 28407, 45755, 12200, 4...
2.342152
567
include("SWAP.jl") include("SCAL.jl") include("SSCAL.jl") include("COPY.jl") include("AXPY.jl") include("DOT.jl") include("ROTG.jl") include("ROTMG.jl") include("ROT.jl") include("ROTM.jl") include("NRM2.jl") include("iAMAX.jl") include("ASUM.jl")
[ 17256, 7203, 17887, 2969, 13, 20362, 4943, 198, 17256, 7203, 6173, 1847, 13, 20362, 4943, 198, 17256, 7203, 5432, 34, 1847, 13, 20362, 4943, 198, 17256, 7203, 34, 3185, 56, 13, 20362, 4943, 198, 17256, 7203, 25922, 47, 56, 13, 20362, ...
2.223214
112
<reponame>Non-Contradiction/NextGeneration<gh_stars>1-10 function distribute(f) function fs(dict :: Dict, xs...) for i in values(dict) fs(i, xs...) end end function fs(arr :: Array, xs...) for i in arr fs(i, xs...) end end function fs(xs...) ...
[ 27, 7856, 261, 480, 29, 15419, 12, 4264, 6335, 2867, 14, 10019, 8645, 341, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 14983, 7, 69, 8, 198, 220, 220, 220, 2163, 43458, 7, 11600, 7904, 360, 713, 11, 2124, 82, 23029, 198, 220...
2.053097
565
<filename>src/TF.jl<gh_stars>0 """ TF(r, Z) Approximate solution of the [Thomas-Fermi equation](https://en.wikipedia.org/wiki/Thomas-Fermi_model) for neutral atom with nuclear charge `Z`. Returns density at the distance `r`. See <NAME>. (1947). Theorie der streuung schneller geladener teilchen i. einzelstreuung ...
[ 27, 34345, 29, 10677, 14, 10234, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 24958, 7, 81, 11, 1168, 8, 198, 198, 4677, 13907, 1920, 4610, 286, 262, 685, 22405, 12, 37, 7780, 72, 16022, 16151, 5450, 1378...
1.911153
529
# General constructors for defining the Optimization Goal # Further refinements and needed constructors can be found # in the according folders `./Delay preselection statistics/` # and `./Cost functions`. abstract type AbstractMCDTSOptimGoal end abstract type AbstractDelayPreselection end abstract type AbstractLoss...
[ 2, 3611, 5678, 669, 329, 16215, 262, 30011, 1634, 25376, 198, 2, 7735, 50170, 3196, 290, 2622, 5678, 669, 460, 307, 1043, 198, 2, 287, 262, 1864, 24512, 4600, 19571, 13856, 323, 662, 49283, 7869, 14, 63, 198, 2, 290, 4600, 19571, 13...
2.910596
604
### Turing interface import .Turing using .Turing: TypedVarInfo, tonamedtuple, decondition, logprior, logjoint, VarName using .Turing.DynamicPPL: evaluate!! export TuringMuseProblem struct TuringMuseProblem{A<:AD.AbstractBackend, M<:Turing.Model} <: AbstractMuseProblem autodiff :: A model :: M mod...
[ 198, 21017, 39141, 7071, 198, 198, 11748, 764, 51, 870, 198, 3500, 764, 51, 870, 25, 17134, 276, 19852, 12360, 11, 5680, 2434, 83, 29291, 11, 875, 623, 653, 11, 2604, 3448, 273, 11, 2604, 73, 1563, 11, 12372, 5376, 198, 3500, 764, ...
2.501887
1,590
function getTableauSPARKGLRK(s) g = getCoefficientsGLRK(s) δ = zeros(0, s) return TableauSPARK(Symbol("sparkglrk", s), g.o, g.a, g.a, g.a, g.a, g.a, g.a, g.a, g.a, g.b, g.b, g.b, g.b, g.c, g.c, g.c, g.c, ...
[ 198, 8818, 651, 10962, 559, 4303, 14175, 8763, 49, 42, 7, 82, 8, 198, 220, 220, 220, 308, 796, 651, 34, 2577, 2108, 2334, 8763, 49, 42, 7, 82, 8, 198, 220, 220, 220, 7377, 112, 796, 1976, 27498, 7, 15, 11, 264, 8, 628, 220, ...
1.349265
272
<filename>platforms/microarchitectures.jl<gh_stars>0 module MicroArchitectures const augment = """ using Base.BinaryPlatforms: arch, arch_march_isa_mapping, CPUID, HostPlatform, Platform function augment_microarchitecture!(platform::Platform) haskey(platform, "march") && return platform host_...
[ 27, 34345, 29, 24254, 82, 14, 24055, 998, 5712, 942, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 4527, 19895, 5712, 942, 198, 198, 9979, 35016, 796, 37227, 198, 220, 220, 220, 1262, 7308, 13, 33, 3219, 37148, 82, 25, 3934, ...
2.524229
227