content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
@testset "Test QFT module" begin @testset "Test forward QFT" begin num_qubits = 5 num_gates = num_qubits*(num_qubits+1)/2 cct1 = QXZoo.Circuit.Circ(num_qubits) cct2 = QXZoo.Circuit.Circ(num_qubits) QXZoo.QFT.apply_qft!(cct1, collect(1:num_qubits)) cct2 << DefaultGat...
[ 198, 31, 9288, 2617, 366, 14402, 1195, 9792, 8265, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 14402, 2651, 1195, 9792, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 421, 9895, 796, 642, 198, 220, 220, 220, 220...
1.691937
1,662
### Error functions. function error_function_selector(error::ASCIIString) if error == "absolute_error" return "absolute_error", absolute_error!, absolute_error_prime! elseif error == "cross_entropy" return "cross_entropy", cross_entropy!, cross_entropy_prime! else return "squared_error", squared_error!, squar...
[ 21017, 13047, 5499, 13, 198, 198, 8818, 4049, 62, 8818, 62, 19738, 273, 7, 18224, 3712, 42643, 3978, 10100, 8, 198, 197, 361, 4049, 6624, 366, 48546, 62, 18224, 1, 198, 197, 197, 7783, 366, 48546, 62, 18224, 1600, 4112, 62, 18224, 2...
2.119104
848
<reponame>musm/AbstractPlotting.jl<gh_stars>0 const PlotTypes{Typ, Arg} = Union{Atomic{Typ, Arg}, Combined{Typ, Arg}} argtypes(x::PlotTypes{T, A}) where {T, A} = A argtypes(x) = Any function data_limits(x) error("No datalimits for $(typeof(x)) and $(argtypes(x))") end """ Data limits calculate a minimal boundingb...
[ 27, 7856, 261, 480, 29, 14664, 76, 14, 23839, 43328, 889, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 9979, 28114, 31431, 90, 31467, 11, 20559, 92, 796, 4479, 90, 2953, 10179, 90, 31467, 11, 20559, 5512, 32028, 90, 31467, 11, 20559,...
2.249683
1,578
<gh_stars>1-10 # These constants were manually copied from the file mpi.h in the Microsoft # MPI SDK v7 const MPI_BYTE = Int32(0x4c00010d) const MPI_WCHAR = Int32(0x4c00020e) const MPI_INT8_T = Int32(0x4c000133) const MPI_UINT8_T = Int32(0x4c000137) const MPI_INT16_T = Int32(0x4c000234) const MPI_UINT16_T = Int32(0x4c...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 2312, 38491, 547, 14500, 18984, 422, 262, 2393, 285, 14415, 13, 71, 287, 262, 5413, 198, 2, 4904, 40, 26144, 410, 22, 198, 198, 9979, 4904, 40, 62, 17513, 9328, 796, 2558, 2624, 7, 15...
1.981704
1,913
<reponame>JuliaPackageMirrors/Discretizers.jl @test array_matches(binedges(DiscretizeUniformWidth(2), [1.0,2.0,3.0,4.0,5.0,6.0]), [1.0, 3.5, 6.0], 1e-8) @test array_matches(binedges(DiscretizeUniformWidth(2), [6.0,2.0,30.0,4.0,1.0,1.0]), [1, 15.5, 30], 1e-8) @test array_matches(binedges(DiscretizeUniformWidth(3), [1.0...
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 15642, 1186, 11341, 13, 20362, 198, 198, 31, 9288, 7177, 62, 6759, 2052, 7, 65, 1389, 3212, 7, 15642, 1186, 1096, 3118, 6933, 30916, 7, 17, 828, 685, 16, 13, 15, 11, 17, ...
1.893048
374
""" nipals(;input::AbstractArray=[], outdir::Union{Nothing,AbstractString}=nothing, scale::AbstractArray=[], pseudocount::AbstractArray=[], colmeanlist::AbstractArray="", colvarlist::Union{Nothing, AbstractString,AbstractArray}="", dim::Number=3, numepoch::Number=3, lower::Number=0, upper::Number=1.0f+38, offsetSto...
[ 37811, 198, 220, 220, 220, 299, 541, 874, 7, 26, 15414, 3712, 23839, 19182, 41888, 4357, 503, 15908, 3712, 38176, 90, 18465, 11, 23839, 10100, 92, 28, 22366, 11, 5046, 3712, 23839, 19182, 41888, 4357, 25038, 420, 608, 3712, 23839, 19182...
1.888659
5,326
# spectra normalization functions, copied from an old version of RvSpectML.EchelleInstruments to here due to the most up-to-date version giving errors # TODO: push changes to EchelleInstruments to fix these errors, and update RvLineList to use the official version of EchelleInstruments """ Normalize spectrum based on...
[ 198, 2, 5444, 430, 3487, 1634, 5499, 11, 18984, 422, 281, 1468, 2196, 286, 371, 85, 49738, 5805, 13, 36, 29232, 293, 818, 2536, 2886, 284, 994, 2233, 284, 262, 749, 510, 12, 1462, 12, 4475, 2196, 3501, 8563, 198, 2, 16926, 46, 25,...
3.025896
502
<gh_stars>0 """ ReTest.hijack(source, [modname]; parentmodule::Module=Main, lazy=false, revise::Bool=false) Given test files defined in `source` using the `Test` package, try to load them by replacing `Test` with `ReTest`, wrapping them in a module `modname` defined within `parentmodule`. If succ...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 797, 14402, 13, 71, 2926, 441, 7, 10459, 11, 685, 4666, 3672, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2560, 214...
2.398251
5,489
include("smearing_functions.jl") abstract type Smear end function get_smear_type(potential::Symbol) if potential == :ttm3 return Smear_TTM3() elseif potential == :ttm21 return Smear_TTM21() elseif potential == :ttm22 return Smear_TTM22() elseif potential == :ttm4 return ...
[ 17256, 7203, 5796, 6648, 62, 12543, 2733, 13, 20362, 4943, 198, 397, 8709, 2099, 2439, 451, 886, 198, 198, 8818, 651, 62, 5796, 451, 62, 4906, 7, 13059, 1843, 3712, 13940, 23650, 8, 198, 220, 220, 220, 611, 2785, 6624, 1058, 926, 76...
2.115282
746
<gh_stars>1-10 "Holds the tableau of a Runge-Kutta method." abstract type AbstractTableauRK{T <: Real} <: AbstractTableau{T} end "Holds the tableau of an explicit Runge-Kutta method." abstract type AbstractTableauERK{T} <: AbstractTableauRK{T} end "Holds the tableau of an implicit Runge-Kutta method." abstract type ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 1, 39, 10119, 262, 3084, 559, 286, 257, 5660, 469, 12, 42, 315, 8326, 2446, 526, 198, 397, 8709, 2099, 27741, 10962, 559, 49, 42, 90, 51, 1279, 25, 6416, 92, 1279, 25, 27741, 10962,...
2.18837
1,221
<filename>src/Parametron.jl module Parametron # types export Variable, LinearTerm, QuadraticTerm, AffineFunction, QuadraticFunction, Model, Parameter # enum values export Minimize, Maximize # functions export setobjective!, add_nonnegative_constraint!, add_nonpositive_...
[ 27, 34345, 29, 10677, 14, 22973, 316, 1313, 13, 20362, 198, 21412, 25139, 316, 1313, 198, 198, 2, 3858, 198, 39344, 198, 220, 220, 220, 35748, 11, 198, 220, 220, 220, 44800, 40596, 11, 198, 220, 220, 220, 20648, 81, 1512, 40596, 11,...
2.774869
382
using LinearAlgebra ninc = 5 neq = 2 a = [-1.0 1.0 -4.0 1.0 0.0; 2.0 -1.0 2.0 0.0 1.0] b = [30.0 10.0] c = [-1.0 -2.0 1.0 0.0 0.0] f = 0.0 pivo = 0.0 contador = 1 centra = 0.0 while(true) global contador += 1 isai = 1 jentra = 1 razao = 0 @show a @show b @show c @show f @show pi...
[ 3500, 44800, 2348, 29230, 198, 198, 77, 1939, 796, 642, 198, 710, 80, 796, 362, 198, 198, 64, 796, 25915, 16, 13, 15, 352, 13, 15, 532, 19, 13, 15, 352, 13, 15, 657, 13, 15, 26, 362, 13, 15, 532, 16, 13, 15, 362, 13, 15, 6...
1.635561
793
<gh_stars>0 ## -*-Julia-*- ## Test suite for Julia's WAV module reload("WAV.jl") # These float array comparison functions are from dists.jl function absdiff{T<:Real}(current::AbstractArray{T}, target::AbstractArray{T}) @assert all(size(current) == size(target)) maximum(abs(current - target)) end function reld...
[ 27, 456, 62, 30783, 29, 15, 198, 2235, 532, 9, 12, 16980, 544, 12, 9, 12, 198, 2235, 6208, 18389, 329, 22300, 338, 370, 10116, 8265, 198, 260, 2220, 7203, 54, 10116, 13, 20362, 4943, 198, 198, 2, 2312, 12178, 7177, 7208, 5499, 389...
2.238468
5,116
<reponame>mortenpi/AtomicLevels.jl const spectroscopic = "spdfghiklmnoqrtuv" spectroscopic_label(ℓ) = ℓ + 1 ≤ length(spectroscopic) ? spectroscopic[ℓ+1] : "[$(ℓ)]" # Nicer string representation for rationals rs(r::Number) = "$(r)" rs(r::Rational) = denominator(r) == 1 ? "$(numerator(r))" : "$(numerator(r))/$(denom...
[ 27, 7856, 261, 480, 29, 30171, 268, 14415, 14, 2953, 10179, 4971, 82, 13, 20362, 198, 9979, 5444, 45943, 16603, 796, 366, 2777, 7568, 456, 1134, 75, 76, 3919, 80, 17034, 14795, 1, 198, 4443, 45943, 16603, 62, 18242, 7, 158, 226, 241...
2.243243
148
# test cube @testset "Primitives" begin c1 = Cuboid([1,1,1]) c2 = Cuboid([1,1,1]) c3 = Cuboid([0,1,1]) #@test isequal(c1, c2) #@test !isequal(c1,c3) end
[ 198, 2, 1332, 23441, 198, 31, 9288, 2617, 366, 23828, 20288, 1, 2221, 198, 220, 220, 220, 269, 16, 796, 7070, 1868, 26933, 16, 11, 16, 11, 16, 12962, 198, 220, 220, 220, 269, 17, 796, 7070, 1868, 26933, 16, 11, 16, 11, 16, 12962...
1.793814
97
<reponame>tkf/FLoops.jl """ @reduce() do (acc₁ [= init₁]; x₁), ..., (accₙ [= initₙ]; xₙ) ... end @reduce(acc₁ ⊗₁= x₁, ..., accₙ ⊗ₙ= xₙ) @reduce(acc₁ .⊗₁= x₁, ..., accₙ .⊗ₙ= xₙ) @reduce(acc₁ = ⊗₁(init₁, x₁), ..., accₙ = ⊗ₙ(initₙ, xₙ)) @reduce(acc₁ .= (⊗₁).(init₁, x₁), ..., accₙ = (⊗ₙ).(in...
[ 27, 7856, 261, 480, 29, 30488, 69, 14, 3697, 44860, 13, 20362, 198, 37811, 198, 220, 220, 220, 2488, 445, 7234, 3419, 466, 357, 4134, 158, 224, 223, 685, 28, 2315, 158, 224, 223, 11208, 2124, 158, 224, 223, 828, 2644, 11, 357, 413...
2.015628
14,589
import .Plots.gui import .Plots.plot import .Plots.plot! import .Plots.annotate! function plot(env::CartPoleEnv; kwargs...) a, d = env.action, env.done x, xdot, theta, thetadot = env.state l = 2 * env.params.halflength xthreshold = env.params.xthreshold # set the frame plot( xlims=(-xth...
[ 11748, 764, 3646, 1747, 13, 48317, 198, 11748, 764, 3646, 1747, 13, 29487, 198, 11748, 764, 3646, 1747, 13, 29487, 0, 198, 11748, 764, 3646, 1747, 13, 34574, 378, 0, 198, 198, 8818, 7110, 7, 24330, 3712, 43476, 47, 2305, 4834, 85, 2...
1.889088
2,227
<reponame>mortenpi/Angular.jl<filename>src/vectorspaces.jl """ abstract type BasisSet An abstract type that represents a set of orthonormal states that can be used to generate a vector space. The basis sets are assumed to be indexed with indices in `1:length(b)`. # Interface Child types must implement `Base.len...
[ 27, 7856, 261, 480, 29, 30171, 268, 14415, 14, 13450, 934, 13, 20362, 27, 34345, 29, 10677, 14, 303, 5217, 43076, 13, 20362, 198, 37811, 198, 220, 220, 220, 12531, 2099, 6455, 271, 7248, 198, 198, 2025, 12531, 2099, 326, 6870, 257, ...
2.758065
992
<filename>test/integration-tests.jl @testset "integration tests" begin julia_repo = "bcbi-test/julia" global_kwargs = Dict( :auth => BumpStdlibs.get_input_from_environment(:auth, "BUMPSTDLIBS_TOKEN_FOR_TESTS"), :close_old_pull_requests => true, :close_old_pull_requests_older_than => Dat...
[ 27, 34345, 29, 9288, 14, 18908, 1358, 12, 41989, 13, 20362, 198, 31, 9288, 2617, 366, 18908, 1358, 5254, 1, 2221, 198, 220, 220, 220, 474, 43640, 62, 260, 7501, 796, 366, 15630, 8482, 12, 9288, 14, 73, 43640, 1, 628, 220, 220, 220...
2.046917
746
using GeometricBase.Config using GeometricBase.Utils using GeometricIntegrators.Integrators using GeometricIntegrators.Tableaus using GeometricProblems.HarmonicOscillator using SimpleSolvers using Test SimpleSolvers.set_config(:nls_stol_break, 1E3) using GeometricProblems.HarmonicOscillator: Δt, nt, refx sode = har...
[ 198, 3500, 2269, 16996, 14881, 13, 16934, 198, 3500, 2269, 16996, 14881, 13, 18274, 4487, 198, 3500, 2269, 16996, 34500, 18942, 13, 34500, 18942, 198, 3500, 2269, 16996, 34500, 18942, 13, 10962, 8717, 198, 3500, 2269, 16996, 2964, 22143, ...
2.323026
1,520
<filename>src/embedding/transforms.jl # Transformations on dictionaries of xy-coordinates using LinearAlgebra, Statistics export transform, scale, rotate, translate, recenter """ `_transform(xy,A,b)` appliex the affine transformation `v |--> Av+b` to all entries in `xy`. """ function _transform(xy::Dict, A::Array{...
[ 27, 34345, 29, 10677, 14, 20521, 12083, 14, 7645, 23914, 13, 20362, 198, 2, 26981, 602, 319, 48589, 3166, 286, 2124, 88, 12, 37652, 17540, 198, 198, 3500, 44800, 2348, 29230, 11, 14370, 198, 39344, 6121, 11, 5046, 11, 23064, 11, 15772...
2.27525
901
<gh_stars>0 # cyclic package test_error = nothing try include("../packages/CyclicPackage/src/CyclicPackage.jl") catch cur_error test_error = cur_error end @test isa(test_error, LoadError) test_error = test_error.error @test isa(test_error, LoadError) test_error = test_error.error @test isa(test_error, UndefVar...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 11700, 291, 5301, 198, 198, 9288, 62, 18224, 796, 2147, 198, 198, 28311, 198, 220, 2291, 7203, 40720, 43789, 14, 20418, 565, 291, 27813, 14, 10677, 14, 20418, 565, 291, 27813, 13, 20362, 4943, 198...
2.639706
136
using OmegaGrav using MatterPower using Dierckx using Plots, LaTeXStrings using OrdinaryDiffEq # %% Compute the matter power spectrum using CLASS include("compute_pk_class.jl") # %% Compute the analytical linear theory result for K/W # Reference: Equation (12) of Davis, Miller, White, ApJ, 490, 63 (1997). zini = 9 a = ...
[ 3500, 19839, 38, 4108, 198, 3500, 16900, 13434, 198, 3500, 360, 959, 694, 87, 198, 3500, 1345, 1747, 11, 4689, 49568, 13290, 654, 198, 3500, 14230, 3219, 28813, 36, 80, 198, 2, 43313, 3082, 1133, 262, 2300, 1176, 10958, 1262, 42715, 1...
2.105986
1,821
<reponame>aliddell/JuDO.jl droplets = getalldroplets!(client) @testset "List all Droplets" begin @test length(droplets) == 1 @test droplets[1].locked == false @test isempty(droplets[1].snapshotids) @test droplets[1].created_at == DateTime("2014-11-14T16:29:21") @test droplets[1].memory == 1024 @...
[ 27, 7856, 261, 480, 29, 282, 1638, 695, 14, 33018, 18227, 13, 20362, 198, 22285, 46916, 796, 651, 282, 335, 305, 46916, 0, 7, 16366, 8, 198, 31, 9288, 2617, 366, 8053, 477, 21045, 46916, 1, 2221, 198, 220, 220, 220, 2488, 9288, 41...
2.388138
2,664
module Codim2 using LinearAlgebra using Statistics: mean using ..ArrayUtils: cast_container using ..Continuations: AbstractContinuationProblem, AbstractProblemCache import ..Continuations: get_prob_cache, get_u0, residual!, residual_jacobian!, residual, isindomain # TimeKind trait: using ..BifurcationsBase: tim...
[ 21412, 18720, 320, 17, 198, 198, 3500, 44800, 2348, 29230, 198, 3500, 14370, 25, 1612, 198, 198, 3500, 11485, 19182, 18274, 4487, 25, 3350, 62, 34924, 198, 198, 3500, 11485, 17875, 6055, 25, 27741, 17875, 2288, 40781, 11, 27741, 40781, ...
3.081921
354
__precompile__(false) module PDESolver # defs.jl export AssembleElementData, AbstractShockSensor # from registration.jl export register_physics, retrieve_physics, registerIC, registerBC # from interface.jl export evalResidual, evalJacobian, evalHomotopy, evalHomotopyJacobian, evalJacobianStrong, createFunctio...
[ 834, 3866, 5589, 576, 834, 7, 9562, 8, 198, 21412, 14340, 1546, 14375, 198, 198, 2, 825, 82, 13, 20362, 198, 39344, 1081, 15140, 20180, 6601, 11, 27741, 31646, 47864, 198, 198, 2, 422, 9352, 13, 20362, 198, 39344, 7881, 62, 746, 231...
2.789873
1,185
using Stochy # This is useful for testing inference over models where the number of # ERP varies across executions. @pp function f(n) factor(n > 3 ? -1 : 0) if n < 0 list() else flip(0.7) ? 0 .. f(n-1) : list() end end @pp function g() f(5) end dist = @pp enum() do local x = ...
[ 3500, 520, 5374, 88, 198, 198, 2, 770, 318, 4465, 329, 4856, 32278, 625, 4981, 810, 262, 1271, 286, 198, 2, 13793, 47, 17806, 1973, 30632, 13, 198, 198, 31, 381, 2163, 277, 7, 77, 8, 198, 220, 220, 220, 5766, 7, 77, 1875, 513, ...
2.174757
206
ix = 1.0 z = "My String" # http://docs.julialang.org/en/release-0.2/manual/integers-and-floating-point-numbers/ for T = {Int8,Int16,Int32,Int64,Int128,Uint8,Uint16,Uint32,Uint64,Uint128} println("$(lpad(T,6)): [$(typemin(T)),$(typemax(T))]") end println(bits(10)) println(bits(10.0)) onepointtwo = 1.1 + 0.1 onepo...
[ 844, 796, 352, 13, 15, 198, 198, 89, 796, 366, 3666, 10903, 1, 198, 198, 2, 2638, 1378, 31628, 13, 73, 377, 498, 648, 13, 2398, 14, 268, 14, 20979, 12, 15, 13, 17, 14, 805, 723, 14, 18908, 364, 12, 392, 12, 48679, 803, 12, 4...
2.262411
1,974
using MD5 hex(s) = string(s, base=16) """ Downloads a dataset located at a given url to a path. The function is taken from Flux.jl/Data.jl ``https://github.com/FluxML/Flux.jl/blob/ea26f45a1f4e93d91b1e8942c807f8bf229d5775/src/data/Data.jl#L26`` """ function download_dataset(url, path, hash=nothing) println("Downloadi...
[ 3500, 10670, 20, 198, 198, 33095, 7, 82, 8, 796, 4731, 7, 82, 11, 2779, 28, 1433, 8, 198, 37811, 198, 10002, 82, 257, 27039, 5140, 379, 257, 1813, 19016, 284, 257, 3108, 13, 383, 2163, 318, 2077, 198, 6738, 1610, 2821, 13, 20362, ...
2.588336
583
let tot = 0 prev = Dict() foundIt = false loopCount = 0 while !foundIt loopCount += 1 println(loopCount) open("data.txt") do file for line in eachline(file) operator = line[1] operand = pa...
[ 1616, 198, 220, 220, 220, 220, 220, 220, 220, 2006, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 8654, 796, 360, 713, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1043, 1026, 796, 3991, 198, 220, 220, 220, 220, 220, 220, 2...
1.485207
507
<reponame>xijiang/RD2 #= # Function list: - compare(yt, wt, yv, Gi, Ai) # using weighted MME - compare(yt, yv, Gi, Ai) # not weighed MME - cv_n() - cv_d() - cv_g() - function CV_ebv(training, brding_v, cv_setup, G, A, ID) =# function cv_n(nts, ncs, nbv, ID, G, A) ###################################################...
[ 27, 7856, 261, 480, 29, 87, 2926, 15483, 14, 35257, 17, 198, 2, 28, 198, 2, 15553, 1351, 25, 198, 12, 8996, 7, 20760, 11, 266, 83, 11, 331, 85, 11, 8118, 11, 38230, 8, 1303, 1262, 26356, 337, 11682, 198, 12, 8996, 7, 20760, 11...
1.928058
4,170
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct NetworkAccessPolicy <: SwaggerModel function NetworkAccessPolicy(;) o = new() o end end # type NetworkAccessPolicy const _property_map_Ne...
[ 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20855, 2427, 13, 628, 198, 76, 18187, 2878, 7311, 15457, 36727, 1279, 25, 2451, 7928, 17633...
3.382143
280
<gh_stars>0 """ BaseStats Every stats common to any configuration. """ mutable struct BaseStats <: Statistics # federated learning stats num_comm_rounds::Int num_clients_per_round::Int num_total_clients::Int # machine learning stats num_weights::Int losses::Vector{Float32} accuraci...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 7308, 29668, 198, 198, 6109, 9756, 2219, 284, 597, 8398, 13, 198, 37811, 198, 76, 18187, 2878, 7308, 29668, 1279, 25, 14370, 198, 220, 220, 220, 1303, 28062, 515, 4673, 975...
2.247582
517
<gh_stars>0 # Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder name = "SDPA_GMP-QD-DD_Builder" version = v"7.1.2" # Collection of sources required to build SDPABuilder sources = [ "https://github.com/ericphanso...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 5740, 326, 428, 4226, 460, 2453, 617, 3614, 3141, 12, 1370, 7159, 11, 1057, 198, 2, 4600, 73, 43640, 1382, 62, 18870, 21591, 13, 20362, 1377, 16794, 63, 284, 766, 257, 8748, 3275, 13, 198, 3500,...
2.439139
1,487
<filename>train_FFN_FIIa_trajectory.jl # include - include("Include.jl") # This script requires Flux.jl (we manually include here, its takes a while to load) using Flux using Flux: @epochs # how many training data sets do we have? number_of_synthetic_patients = 500 trajectory_range = range(1,stop=2001,step=100) |> c...
[ 27, 34345, 29, 27432, 62, 5777, 45, 62, 37, 3978, 64, 62, 9535, 752, 652, 13, 20362, 198, 2, 2291, 532, 198, 17256, 7203, 818, 9152, 13, 20362, 4943, 198, 198, 2, 770, 4226, 4433, 1610, 2821, 13, 20362, 357, 732, 14500, 2291, 994,...
2.548446
547
<filename>JL-17.jl #= P17 (*) Split a list into two parts; the length of the first part is given. Do not use any predefined predicates. Example: * (split '(a b c d e f g h i k) 3) ( (A B C) (D E F G H I K)) =# function my_split(coll, index) vcat(Vector{}[coll[1:index]], Vector{}[coll[index + 1:end]]) end splitte...
[ 27, 34345, 29, 41, 43, 12, 1558, 13, 20362, 198, 2, 28, 198, 47, 1558, 20789, 8, 27758, 257, 1351, 656, 734, 3354, 26, 262, 4129, 286, 262, 717, 636, 318, 1813, 13, 198, 5211, 407, 779, 597, 2747, 18156, 2747, 16856, 13, 198, 19...
2.141026
234
module potentials export Potential, BoxPotential type Potential A::Function B::Function E::Function basis_function::Function end fcos(s, n::Int, i::Int, j::Int) = cospi((i+j)/2)*sinc((i+j+2*n*s)/2) fsin(s, n::Int, i::Int, j::Int) = sinpi((i+j+n)/2)*sinc((i+j+n*s)/2) function A(s, n::Int, i::Int, j::...
[ 21412, 2785, 82, 198, 198, 39344, 32480, 11, 8315, 25396, 1843, 198, 198, 4906, 32480, 198, 220, 220, 220, 317, 3712, 22203, 198, 220, 220, 220, 347, 3712, 22203, 198, 220, 220, 220, 412, 3712, 22203, 198, 220, 220, 220, 4308, 62, 8...
1.854922
579
module Variance require("Corpora.jl") require("CommonTools.jl") require("CVMAbstract.jl") require("DataTypes.jl") ## Imports using DataTypes using Base.LinAlg.BLAS.axpy! using Corpora.Token using Corpora.text using CommonTools: tanh, square!, l2sq, l2sq_distance, mult_by_0! using CommonTools: add!, subtract_vec_matri...
[ 21412, 15965, 590, 198, 198, 46115, 7203, 10606, 38851, 13, 20362, 4943, 198, 46115, 7203, 17227, 33637, 13, 20362, 4943, 198, 46115, 7203, 34, 15996, 23839, 13, 20362, 4943, 198, 46115, 7203, 6601, 31431, 13, 20362, 4943, 198, 198, 2235,...
1.973412
2,031
using FileIO using SubmodularMaximization using JLD2 using Printf experiment_name = "weights_by_number_of_robots" cache_folder = string("./data/", experiment_name, "/") file_pattern = r".*jld2" for file in readdir(cache_folder) if occursin(file_pattern, file) print("Reendocding: ", file, "...") file_path ...
[ 3500, 9220, 9399, 198, 3500, 3834, 4666, 934, 11518, 320, 1634, 198, 3500, 449, 11163, 17, 198, 3500, 12578, 69, 198, 198, 23100, 3681, 62, 3672, 796, 366, 43775, 62, 1525, 62, 17618, 62, 1659, 62, 22609, 1747, 1, 198, 23870, 62, 43...
2.73822
191
@doc raw""" AcousticPerturbationEquations2D(v_mean, c_mean, rho_mean) !!! warning "Experimental code" This system of equations is experimental and may change in any future release. Acoustic perturbation equations in two space dimensions with constant mean flow. `v_mean` is a tuple of size two holding the mean...
[ 31, 15390, 8246, 37811, 198, 220, 220, 220, 4013, 21618, 47, 861, 5945, 341, 23588, 602, 17, 35, 7, 85, 62, 32604, 11, 269, 62, 32604, 11, 374, 8873, 62, 32604, 8, 198, 198, 10185, 6509, 366, 20468, 9134, 2438, 1, 198, 220, 220, ...
2.580544
1,912
using Documenter, Gadfly load_dir(x) = map(file -> joinpath("lib", x, file), readdir(joinpath(Base.source_dir(), "src", "lib", x))) makedocs( modules = [Gadfly], clean = false, format = Documenter.Formats.HTML, sitename = "Gadfly.jl", pages = Any[ "Home" => "index.md", "Tutorial" =...
[ 3500, 16854, 263, 11, 20925, 12254, 198, 198, 2220, 62, 15908, 7, 87, 8, 796, 3975, 7, 7753, 4613, 4654, 6978, 7203, 8019, 1600, 2124, 11, 2393, 828, 1100, 15908, 7, 22179, 6978, 7, 14881, 13, 10459, 62, 15908, 22784, 366, 10677, 16...
1.904401
659
struct ForwardLocal <: MainPathAlgorithm end struct ForwardLocalResult{T<:Integer, U<:Real} <: MainPathResult edges::Vector{Edge{T}} weights::Vector{U} end function forward_local( g::AbstractGraph{T}, s::Vector{R}, weights::AbstractMatrix{U} ) where {T,R <: Integer} where U <: Real sink = ifelse.(outd...
[ 198, 7249, 19530, 14565, 1279, 25, 8774, 15235, 2348, 42289, 886, 198, 198, 7249, 19530, 14565, 23004, 90, 51, 27, 25, 46541, 11, 471, 27, 25, 15633, 92, 1279, 25, 8774, 15235, 23004, 198, 220, 13015, 3712, 38469, 90, 37021, 90, 51, ...
2.472952
647
<reponame>JuliaCutCell/CartesianCutCell.jl """ """ forwarddiff function forwarddiff(bc, n) opn = _forwarddiff.(bc, n) eye = Eye{Bool}.(n) _forwarddiff(opn, eye) end _forwarddiff(::Dirichlet, n::Int) = Bidiagonal(-ones(n), ones(n-1), :U) _forwarddiff(::Periodic, n::Int) = spdiagm(1-n => ones(1), ...
[ 27, 7856, 261, 480, 29, 16980, 544, 26254, 28780, 14, 43476, 35610, 26254, 28780, 13, 20362, 198, 37811, 198, 37811, 198, 11813, 26069, 198, 198, 8818, 2651, 26069, 7, 15630, 11, 299, 8, 198, 220, 220, 220, 1034, 77, 796, 4808, 11813,...
2.00545
734
using Minesweeper # play in REPL # enter coordinates as: row_index column_index play() # pass custom game to play game = Game(dims=(20,10), n_mines=35) play(game)
[ 3500, 33466, 732, 5723, 198, 198, 2, 711, 287, 45285, 198, 2, 3802, 22715, 355, 25, 5752, 62, 9630, 5721, 62, 9630, 198, 1759, 3419, 198, 198, 2, 1208, 2183, 983, 284, 711, 198, 6057, 796, 3776, 7, 67, 12078, 16193, 1238, 11, 940,...
2.844828
58
<filename>src/EventUtils/download_data.jl # Taken from https://github.com/cmcaine/advent2020/blob/main/scripts/get-data.jl aoc_cookie = try read(joinpath(@__DIR__, "cookie"), String) catch println("No cookie provided for the AoC website. Save your cookie in a file called 'cookie' in the /src/EventUtils folder")...
[ 27, 34345, 29, 10677, 14, 9237, 18274, 4487, 14, 15002, 62, 7890, 13, 20362, 198, 2, 30222, 422, 3740, 1378, 12567, 13, 785, 14, 11215, 66, 5718, 14, 324, 1151, 42334, 14, 2436, 672, 14, 12417, 14, 46521, 14, 1136, 12, 7890, 13, 2...
2.715328
274
<filename>test/devtest.jl using Revise using FRGRealTime using FRGRealTime.MathFuns using FRGRealTime.ThresholdFunctions ThresholdFunctions.ImFb2(1.0,1.0,1.0,1.0,0.1) Eb(1.0,1.0) ThresholdFunction
[ 27, 34345, 29, 9288, 14, 7959, 9288, 13, 20362, 198, 3500, 5416, 786, 201, 198, 3500, 8782, 10761, 2287, 7575, 201, 198, 3500, 8782, 10761, 2287, 7575, 13, 37372, 37, 13271, 201, 198, 3500, 8782, 10761, 2287, 7575, 13, 817, 10126, 246...
2.147368
95
module TestReaderWriter using TSML using TSMLextra using Test function test_csv() gcdims = (8761,2) ssum = 97564.0 resdf=DataFrame() datapath=joinpath(dirname(pathof(TSMLextra)),"../data") outputfname = joinpath(tempdir(),"testdateval.csv") basefilename = "testdateval" fname = joinpath(dat...
[ 21412, 6208, 33634, 34379, 198, 198, 3500, 26136, 5805, 198, 3500, 26136, 5805, 26086, 198, 3500, 6208, 198, 198, 8818, 1332, 62, 40664, 3419, 198, 220, 220, 220, 308, 10210, 12078, 796, 357, 23, 4304, 16, 11, 17, 8, 198, 220, 220, ...
2.246548
1,521
# Return flat index into arrray of (n, m) pairs. # Assumes array is ordered as # [ # (n, m) # for n in 0:n_max # for m in -n:n # ] @inline nm_index(n, m) = m + n * (n + 1) + 1 """ H_recursion_coefficients(ℓₘₐₓ, T) Pre-compute constants used in Wigner H recursion. """ function H_recursion_coefficie...
[ 2, 8229, 6228, 6376, 656, 5240, 2433, 286, 357, 77, 11, 285, 8, 14729, 13, 198, 2, 2195, 8139, 7177, 318, 6149, 355, 198, 2, 220, 220, 685, 198, 2, 220, 220, 220, 220, 357, 77, 11, 285, 8, 198, 2, 220, 220, 220, 220, 329, 29...
1.312728
8,493
<reponame>exanauts/JuliaCon2020 module Precondition using CUDA using CUDA.CUSPARSE using KernelAbstractions using LightGraphs using LinearAlgebra using Metis using SparseArrays using TimerOutputs cuzeros = CUDA.zeros abstract type AbstractPreconditioner end struct NoPreconditioner <: AbstractPreconditioner end mut...
[ 27, 7856, 261, 480, 29, 1069, 2271, 5500, 14, 16980, 544, 3103, 42334, 198, 21412, 3771, 31448, 198, 198, 3500, 29369, 5631, 198, 3500, 29369, 5631, 13, 34, 2937, 27082, 5188, 198, 3500, 32169, 23839, 507, 198, 3500, 4401, 37065, 82, ...
1.832477
3,307
<filename>src/ForwardDiff.jl module ForwardDiff using DiffRules, DiffResults using DiffResults: DiffResult, MutableDiffResult, ImmutableDiffResult using StaticArrays if VERSION >= v"1.6" using Preferences end using Random using LinearAlgebra import SIMD: Vec import Printf import NaNMath import SpecialFunctions im...
[ 27, 34345, 29, 10677, 14, 39746, 28813, 13, 20362, 198, 21412, 19530, 28813, 198, 198, 3500, 10631, 37766, 11, 10631, 25468, 198, 3500, 10631, 25468, 25, 10631, 23004, 11, 13859, 540, 28813, 23004, 11, 9543, 18187, 28813, 23004, 198, 3500...
2.584337
332
<filename>src/Memoize.jl macro memoize(cache_var) filename = String(cache_var) * ".jld2" quote if !isfile( $filename ) @save $filename $cache_var else @load $filename $cache_var end end end macro memoize(cache_var, fn) filename = String(cache_var) * ".jl...
[ 27, 34345, 29, 10677, 14, 13579, 78, 1096, 13, 20362, 198, 20285, 305, 16155, 1096, 7, 23870, 62, 7785, 8, 198, 220, 220, 220, 29472, 796, 10903, 7, 23870, 62, 7785, 8, 1635, 27071, 73, 335, 17, 1, 198, 220, 220, 220, 9577, 198, ...
1.923077
260
import Base.push! #---------------------------------------------------------------------------------------------------- """ monomial_compress(io_equation, ode) Compresses an input-output equation for the rank computation Input: - `io_equation` - input-output equation - `ode` - the corresponding ODE model Outpu...
[ 11748, 7308, 13, 14689, 0, 198, 198, 2, 10097, 3880, 650, 198, 198, 37811, 198, 220, 220, 220, 937, 49070, 62, 5589, 601, 7, 952, 62, 4853, 341, 11, 267, 2934, 8, 198, 198, 7293, 16746, 281, 5128, 12, 22915, 16022, 329, 262, 4279,...
2.284442
3,368
module BondGraphs import Graphs as g import Base: RefValue, eltype, show, in, iterate, ==, getproperty import ModelingToolkit: parameters, states, equations # Importing means names can be reused, but may be confusing using StaticArrays using ModelingToolkit using DifferentialEquations using SymbolicUtils, SymbolicUti...
[ 21412, 12812, 37065, 82, 198, 198, 11748, 29681, 82, 355, 308, 198, 11748, 7308, 25, 6524, 11395, 11, 1288, 4906, 11, 905, 11, 287, 11, 11629, 378, 11, 6624, 11, 651, 26745, 198, 11748, 9104, 278, 25391, 15813, 25, 10007, 11, 2585, ...
3.355556
405
<filename>src/Decapodes.jl module Decapodes using Requires include("Diagrams.jl") include("OpenDiagrams.jl") include("Schedules.jl") include("Simulations.jl") include("Examples.jl") function __init__() @require CairoMakie="13f3f980-e62b-5c42-98c6-ff1f3baf88f0" include("Debug.jl") @require AlgebraicPetri="4f99eeb...
[ 27, 34345, 29, 10677, 14, 10707, 499, 4147, 13, 20362, 198, 21412, 4280, 499, 4147, 198, 198, 3500, 26848, 198, 198, 17256, 7203, 18683, 6713, 82, 13, 20362, 4943, 198, 17256, 7203, 11505, 18683, 6713, 82, 13, 20362, 4943, 198, 17256, ...
2.321212
165
module StatsDiscretizations using Reexport using Dictionaries using Discretizers @reexport using Distributions import Distributions: pdf, logpdf, cdf, ccdf using Infinity using Infinity.Utils @reexport using IntervalSets using Requires @reexport using StatsBase include("intervals.jl") include("distributions_inte...
[ 21412, 20595, 15642, 1186, 4582, 198, 198, 3500, 797, 39344, 198, 198, 3500, 360, 2867, 3166, 198, 3500, 8444, 1186, 11341, 198, 198, 31, 631, 87, 634, 1262, 46567, 507, 198, 11748, 46567, 507, 25, 37124, 11, 2604, 12315, 11, 269, 756...
2.893617
235
<gh_stars>1-10 using CyclicArrays using Plots using Statistics using LaTeXStrings # 1d array example faces=zeros(1,1,2,4); faces[1,1,1,:]=[1,1,2,0]; faces[1,1,2,:]=[1,1,1,0]; grid=CyclicArray(faces); x=[-3:0.1:3;]; rho0=exp.(-(x).^2) rho0=10*rho0/sum(rho0); DT=0.5; DX=1; NT=400; rho1=zeros(length(rho0)); crho0=Cy...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 28007, 291, 3163, 20477, 198, 3500, 1345, 1747, 198, 3500, 14370, 198, 3500, 4689, 49568, 13290, 654, 628, 198, 198, 2, 352, 67, 7177, 1672, 198, 198, 32186, 28, 9107, 418, 7, 16, 11...
1.697761
536
module KernelsTests using CellwiseValues using TensorValues k = NumberKernelFromFunction(-) test_number_kernel(k,1,4,3) test_number_kernel(k,-1.0,1.0) k = NumberKernelFromFunction(sum) test_number_kernel(k,7,[1,2,4]) k = ArrayKernelFromBroadcastedFunction(*) test_array_kernel(k,[3,4,3],[1,2,3],[3,2,1]) test_ar...
[ 21412, 509, 44930, 51, 3558, 198, 198, 3500, 12440, 3083, 40161, 198, 3500, 309, 22854, 40161, 198, 198, 74, 796, 7913, 42, 7948, 4863, 22203, 7, 25106, 198, 198, 9288, 62, 17618, 62, 33885, 7, 74, 11, 16, 11, 19, 11, 18, 8, 198, ...
1.964736
397
struct TransmissionRates <: AbstractTN external::Vector{Float64} internal::Array{Float64, 2} function TransmissionRates(individuals::Integer) return new(fill(0., individuals), fill(0., (individuals, individuals))) end function TransmissionRates(e::Vector{Float64}, ...
[ 7249, 41653, 49, 689, 1279, 25, 27741, 46559, 198, 220, 7097, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 5387, 3712, 19182, 90, 43879, 2414, 11, 362, 92, 628, 220, 2163, 41653, 49, 689, 7, 43129, 82, 3712, 46541, 8, 198, 220, 220, ...
2.497462
197
<gh_stars>10-100 # Defines streaming types and operators abstract WallStreaming <: Streaming abstract IOLetStreaming <: Streaming immutable FluidStreaming <: Streaming; end immutable NullStreaming <: Streaming; end immutable HalfWayBounceBack <: Streaming; end const NULLSTREAMER = NullStreaming() # Do nothing when str...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 2896, 1127, 11305, 3858, 290, 12879, 198, 397, 8709, 5007, 12124, 278, 1279, 25, 43124, 198, 397, 8709, 314, 3535, 316, 12124, 278, 1279, 25, 43124, 198, 8608, 18187, 1610, 27112, 12124, ...
3.248619
543
struct LockandKeyLookup{ A <: Function, B <: Function, C <: Function, K, T } key::K tumbler::T key_lookup_fn::A pin_lookup_fn::B emission_fn::C key_length::Int tumblers::Vector{ Int } end #Sizes of the return collection cannot be known at run time! Base.SizeUnknown() is the secret sauce to ...
[ 7249, 13656, 392, 9218, 8567, 929, 90, 317, 1279, 25, 15553, 11, 347, 1279, 25, 15553, 11, 327, 1279, 25, 15553, 11, 509, 11, 309, 1782, 198, 220, 220, 220, 1994, 3712, 42, 198, 220, 220, 220, 256, 2178, 1754, 3712, 51, 198, 220, ...
2.276302
2,899
<reponame>ChrisRackauckas/RNG.jl<gh_stars>0 __precompile__(true) """ The module for [Xorshift Family](@ref). Provide 11 RNG types: - [`Xorshift64`](@ref) - [`Xorshift64Star`](@ref) - [`Xorshift128`](@ref) - [`Xorshift128Star`](@ref) - [`Xorshift128Plus`](@ref) - [`Xorshift1024`](@ref) - [`Xorshift1024Star`](@ref) - ...
[ 27, 7856, 261, 480, 29, 15645, 49, 441, 559, 694, 292, 14, 49, 10503, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 834, 3866, 5589, 576, 834, 7, 7942, 8, 198, 198, 37811, 198, 464, 8265, 329, 685, 55, 669, 29323, 7884, 16151, 31,...
2.27907
344
module GeneSets # Write your package code here. include("gset_struct.jl") export GeneSet, AbstractGeneSet, get_msigdb end
[ 21412, 13005, 50, 1039, 198, 198, 2, 19430, 534, 5301, 2438, 994, 13, 198, 17256, 7203, 70, 2617, 62, 7249, 13, 20362, 4943, 198, 39344, 13005, 7248, 11, 27741, 39358, 7248, 11, 651, 62, 907, 328, 9945, 198, 198, 437, 198 ]
3.02439
41
<filename>src/interaction/events.jl<gh_stars>10-100 function disconnect!(window::AbstractScreen, signal) disconnect!(to_native(window), signal) end window_area(scene, native_window) = not_implemented_for(native_window) window_open(scene, native_window) = not_implemented_for(native_window) mouse_buttons(scene, nativ...
[ 27, 34345, 29, 10677, 14, 3849, 2673, 14, 31534, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 8818, 22837, 0, 7, 17497, 3712, 23839, 23901, 11, 6737, 8, 198, 220, 220, 220, 22837, 0, 7, 1462, 62, 30191, 7, 17497, 828, ...
2.915122
1,025
module DeprecatedTest using Test using MathOptInterface using ConstraintProgrammingExtensions const MOI = MathOptInterface const MOIU = MOI.Utilities const MOIT = MOI.DeprecatedTest const CP = ConstraintProgrammingExtensions # Test sets. include("alldifferent.jl") include("antidomain.jl") include("binpacking.jl") in...
[ 21412, 2129, 31023, 14402, 198, 198, 3500, 6208, 198, 3500, 16320, 27871, 39317, 198, 3500, 1482, 2536, 2913, 15167, 2229, 11627, 5736, 198, 198, 9979, 13070, 40, 796, 16320, 27871, 39317, 198, 9979, 13070, 44958, 796, 13070, 40, 13, 1827...
3.130081
246
<filename>src/unpack/unpack_simd_512.jl # AVX-512 (64 bytes) const shuffle_48_bytes_to_64 = ( shuffle_24_bytes_to_32..., shuffle_24_bytes_to_32 .+ 24... ) const shuffle_48_bytes_to_64_val = Val{shuffle_48_bytes_to_64}() const shuffle_48_bytes_to_64_m8_val = Val{shuffle_48_bytes_to_64 .+ 8}() const shuffle_48_bytes_to_6...
[ 27, 34345, 29, 10677, 14, 403, 8002, 14, 403, 8002, 62, 14323, 67, 62, 25836, 13, 20362, 198, 2, 14661, 55, 12, 25836, 357, 2414, 9881, 8, 198, 9979, 36273, 62, 2780, 62, 33661, 62, 1462, 62, 2414, 796, 357, 36273, 62, 1731, 62, ...
2.268222
1,029
using Documenter, PAPA makedocs(; modules=[PAPA], format=Documenter.HTML(), pages=[ "Home" => "index.md", ], repo="https://qiplab.bbn.com/matthewware/PAPA.jl/blob/{commit}{path}#L{line}", sitename="PAPA.jl", authors="<NAME>", assets=String[], )
[ 3500, 16854, 263, 11, 350, 2969, 32, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 47, 2969, 32, 4357, 198, 220, 220, 220, 5794, 28, 24941, 263, 13, 28656, 22784, 198, 220, 220, 220, 5468, 41888, 198, 220, ...
2.014085
142
UI = UncertainValueDataset(example_uidxs) UV = UncertainValueDataset(example_uvals) UIV = UncertainIndexValueDataset(UI, UV) n = 3 @test resample(UIV) isa Tuple{Vector} @test resample(UIV, n) isa Vector{Tuple{Vector}}
[ 10080, 796, 28304, 1425, 11395, 27354, 292, 316, 7, 20688, 62, 27112, 34223, 8, 198, 31667, 796, 28304, 1425, 11395, 27354, 292, 316, 7, 20688, 62, 84, 12786, 8, 198, 52, 3824, 796, 28304, 1425, 15732, 11395, 27354, 292, 316, 7, 10080...
2.534884
86
<filename>src/web/model_ObjsResources.jl<gh_stars>1-10 # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. @doc raw""" ObjsResources(; excluded_ids=nothing, ids=nothing, wildcard=nothing, ) - e...
[ 27, 34345, 29, 10677, 14, 12384, 14, 19849, 62, 5944, 8457, 33236, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, ...
2.789116
735
<filename>test/test_monotonic_risk_region.jl using TailRiskScenGen: MonotonicRiskRegion, SurvivorApproximator, prob_nonrisk using Distributions using DataStructures using LinearAlgebra: I using StatsFuns d = 2 N = 10000 α = 0.99 β = 0.95 dist = MvNormal(Array{Float64}(I, d, d)) sample = rand(dist, N) surv = SurvivorAp...
[ 27, 34345, 29, 9288, 14, 9288, 62, 2144, 313, 9229, 62, 19121, 62, 36996, 13, 20362, 198, 3500, 21759, 49, 1984, 3351, 268, 13746, 25, 2892, 313, 9229, 49, 1984, 47371, 11, 23740, 4677, 13907, 320, 1352, 11, 1861, 62, 13159, 19121, ...
2.367698
291
<filename>test/operationstest.jl te = [-0.112639 0.124715 0.124715 0.268717 0.124715 0.268717 0.268717 0.046154] st = SymmetricTensor(reshape(te, (2,2,2))) Random.seed!(43) c = cumulants(randn(1000, 20), 4) @testset "axiliary functions" begin @test rep((1,2,3)) == 6 @test rep((1,2,2)) == 3 @test rep((1,1,1...
[ 27, 34345, 29, 9288, 14, 27184, 301, 395, 13, 20362, 198, 660, 796, 25915, 15, 13, 14686, 21, 2670, 657, 13, 1065, 2857, 1314, 657, 13, 1065, 2857, 1314, 657, 13, 2075, 5774, 1558, 657, 13, 1065, 2857, 1314, 657, 13, 2075, 5774, 1...
1.915033
306
# ] activate "I:\My Documents\00 AFIT\Research\Julia Projects\StrategyGames" using Pkg; Pkg.activate(pwd()) ############################ # # Scratch work for results collection # ########################### ## Robust collection # # build nominal fixed attacker strategy (NE) # pdbr = vcat(fill(0.95, gs....
[ 2, 2361, 15155, 366, 40, 7479, 3666, 33267, 59, 405, 12341, 2043, 59, 25104, 59, 16980, 544, 29898, 59, 13290, 4338, 24474, 1, 201, 198, 3500, 350, 10025, 26, 350, 10025, 13, 39022, 7, 79, 16993, 28955, 201, 198, 201, 198, 201, 198,...
1.971298
8,536
struct KeyFrame id::Int64 left_pyramid::Union{Nothing, LKPyramid{Vector{Matrix{Gray{Float64}}}, LKCache}} right_image::Union{Nothing, Matrix{Gray{Float64}}} end mutable struct Mapper params::Params map_manager::MapManager estimator::Estimator current_frame::Frame keyframe_queue::Vector...
[ 7249, 7383, 19778, 198, 220, 220, 220, 4686, 3712, 5317, 2414, 198, 220, 220, 220, 1364, 62, 9078, 20255, 3712, 38176, 90, 18465, 11, 406, 42, 20519, 20255, 90, 38469, 90, 46912, 90, 46130, 90, 43879, 2414, 11709, 5512, 406, 42, 30562...
2.112372
8,196
# ============================================================ # Mathematical Methods # ============================================================ export linspace, heaviside, fortsign, mat_split export finite_difference export central_diff, central_diff!, central_diff2, central_diff2! export upwind_diff, upwind_diff...
[ 2, 46111, 4770, 2559, 18604, 198, 2, 30535, 605, 25458, 198, 2, 46111, 4770, 2559, 18604, 198, 198, 39344, 300, 1040, 10223, 11, 6002, 271, 485, 11, 329, 912, 570, 11, 2603, 62, 35312, 198, 39344, 27454, 62, 26069, 1945, 198, 39344, ...
3.413333
225
using FactCheck include("returns.jl") include("methods.jl") include("const.jl") include("helpers.jl") exitstatus()
[ 3500, 19020, 9787, 198, 198, 17256, 7203, 7783, 82, 13, 20362, 4943, 198, 17256, 7203, 24396, 82, 13, 20362, 4943, 198, 17256, 7203, 9979, 13, 20362, 4943, 198, 17256, 7203, 16794, 364, 13, 20362, 4943, 198, 198, 37023, 13376, 3419, 198...
2.853659
41
<gh_stars>0 # Submodule for imaging functions ####################################### # Function to resize an array representation # of an image to a certain number of pixeles function resize_image(f, N) if size(f, 1) > size(f, 2) f = reshape(f, size(f, 2), size(f, 1), size(f, 3)); end P = size(f, 1); # ad...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 3834, 21412, 329, 19560, 5499, 198, 198, 29113, 4242, 21017, 198, 2, 15553, 284, 47558, 281, 7177, 10552, 198, 2, 286, 281, 2939, 284, 257, 1728, 1271, 286, 17465, 274, 198, 8818, 47558, 62, 9060,...
2.215409
636
<reponame>brianyjtai1994/Serebyi.jl module Serebyi export @unit_convert! include("units.jl") end # module
[ 27, 7856, 261, 480, 29, 65, 380, 1092, 73, 83, 1872, 22666, 14, 50, 567, 1525, 72, 13, 20362, 198, 21412, 30175, 1525, 72, 198, 198, 39344, 2488, 20850, 62, 1102, 1851, 0, 198, 198, 17256, 7203, 41667, 13, 20362, 4943, 198, 198, 4...
2.319149
47
<gh_stars>10-100 #Using the convention that generator satisfies ϕ(0) = 1 (this is opposite to e.g. https://en.wikipedia.org/wiki/Copula_(probability_theory)) # We should follow closely # https://www.uni-ulm.de/fileadmin/website_uni_ulm/mawi.inst.zawa/forschung/preprintmariushofert.pdf # for the implementation of...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 12814, 262, 9831, 326, 17301, 45104, 18074, 243, 7, 15, 8, 796, 352, 357, 5661, 318, 6697, 284, 304, 13, 70, 13, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 13379, 4712, 41...
2.043683
1,488
module BinaryRecordReader using MacroTools export @construct_reader, construct_reader_deep, construct_reader_shallow global const def_reads = Set{DataType}() macro construct_reader(Struct, dims) array_specs = eval(dims) s = eval(:($__module__.$Struct)) esc(construct_reader_exp(s, array_specs)) end """...
[ 21412, 45755, 23739, 33634, 198, 198, 3500, 42755, 33637, 198, 198, 39344, 2488, 41571, 62, 46862, 11, 5678, 62, 46862, 62, 22089, 11, 5678, 62, 46862, 62, 1477, 12154, 198, 198, 20541, 1500, 825, 62, 40779, 796, 5345, 90, 6601, 6030, ...
2.344585
2,133
using NavAbilitySDK using Documenter DocMeta.setdocmeta!(NavAbilitySDK, :DocTestSetup, :(using NavAbilitySDK); recursive=true) makedocs(; modules=[NavAbilitySDK], authors="NavAbility", repo="https://github.com/NavAbility/NavAbilitySDK.jl/blob/{commit}{path}#{line}", sitename="NavAbilitySDK.jl", fo...
[ 3500, 13244, 22453, 10305, 42, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 30575, 22453, 10305, 42, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 13244, 22453, 10305, 42, 1776, 45115, 28, 7942, 8, 198,...
2.355556
270
<reponame>aviks/Datetime.jl using Datetime y = year(1) m = months(1) w = weeks(1) d = days(1) h = hour(1) mi = minute(1) s = second(1) #Period arithmetic Base.Test.@test typeof(y+m) == Month{ISOCalendar} Base.Test.@test typeof(m+y) == Month{ISOCalendar} Base.Test.@test typeof(y+w) == Week{ISOCalendar} Base.Test.@t...
[ 27, 7856, 261, 480, 29, 15820, 591, 14, 27354, 8079, 13, 20362, 198, 3500, 16092, 8079, 198, 198, 88, 796, 614, 7, 16, 8, 198, 76, 796, 1933, 7, 16, 8, 198, 86, 796, 2745, 7, 16, 8, 198, 67, 796, 1528, 7, 16, 8, 198, 71, 7...
2.177401
8,027
<reponame>JuliaTagBot/ModelSelection.jl const ALLSUBSETREGRESSION_EXTRAKEY = :allsubsetregression const FIXEDVARIABLES_DEFAULT = nothing const INSAMPLE_MIN = 20 const OUTSAMPLE_DEFAULT = 20 const CRITERIA_DEFAULT = [] const MODELAVG_DEFAULT = false const TTEST_DEFAULT = false const RESIDUALTEST_DEFAULT = false const OR...
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 17633, 4653, 1564, 13, 20362, 198, 9979, 11096, 12564, 4462, 2767, 2200, 10761, 47621, 62, 13918, 3861, 20373, 796, 1058, 5691, 549, 2617, 2301, 2234, 198, 9979, 44855, 1961, 53, 150...
2.008917
785
# <NAME>. and <NAME>. (1999), Motivational control of caching # behaviour in the scrub jay (Aphelocoma coerulescens), Animal Behaviour, # 2:435-444 function _summarize(::Experiment{:Clayton99C_exp1}, results) combine(groupby(results, [:group, :foodtype, :action, :stage]), df -> DataFrame(μ = mean(df.counts)...
[ 2, 1279, 20608, 28401, 290, 1279, 20608, 28401, 357, 18946, 828, 6543, 452, 864, 1630, 286, 40918, 198, 2, 9172, 287, 262, 27268, 474, 323, 357, 25189, 2978, 420, 6086, 31255, 377, 3798, 641, 828, 13792, 10407, 37716, 11, 198, 2, 362,...
1.651942
8,240
<gh_stars>0 # using XFields # using Test using LinearAlgebra #%% #%% ========================================= Σₒ, Γₒ, Cₒ, rFT, rFTplan, gr, fk_sim = let # 1-d vector of length N N = 12 # set up the FFT matrices rFT = rFFT(nᵢ=(N,),pᵢ=(1.0,)) gr = Grid(rFT) 𝒲 = [exp(-im * 2π * (k-1)*(...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 2, 1262, 1395, 15878, 82, 198, 2, 1262, 6208, 198, 3500, 44800, 2348, 29230, 628, 198, 2, 16626, 198, 2, 16626, 46111, 2559, 198, 198, 138, 96, 158, 224, 240, 11, 7377, 241, 158, 224, 240, 1...
1.667154
2,052
<reponame>comonicon/ComoniconTargetExpr.jl module TestLeafOptions using ComoniconTypes using ComoniconTargetExpr using ComoniconTargetExpr: emit_expr, emit_body, emit_norm_body, emit_dash_body using Test const test_args = Ref{Vector{Any}}() const test_kwargs = Ref{Vector{Any}}() function foo(;kwargs...) test_kwa...
[ 27, 7856, 261, 480, 29, 785, 261, 4749, 14, 5377, 261, 4749, 21745, 3109, 1050, 13, 20362, 198, 21412, 6208, 3123, 1878, 29046, 198, 198, 3500, 955, 261, 4749, 31431, 198, 3500, 955, 261, 4749, 21745, 3109, 1050, 198, 3500, 955, 261, ...
2.093315
718
module GodRays using ..Ahorn, Maple placements = Maple.GodRays function Ahorn.canFgBg(effect::Maple.GodRays) return true, true end end
[ 21412, 1793, 49, 592, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 489, 28613, 796, 21249, 13, 13482, 49, 592, 198, 198, 8818, 7900, 1211, 13, 5171, 37, 70, 33, 70, 7, 10760, 3712, 13912, 293, 13, 13482, 49, 592, 8, 19...
2.535714
56
module TestScikitLearn # using Revise using MLJBase using Test using LinearAlgebra import MLJModels import ScikitLearn using MLJModels.ScikitLearn_ using CategoricalArrays ## CLASSIFIERS @test_logs (:warn,"kernel parameter is not valid, setting to default=\"rbf\" \n") SVMClassifier(kernel="wrong") @test_logs (:warn...
[ 21412, 6208, 50, 979, 15813, 20238, 198, 198, 2, 1262, 5416, 786, 198, 3500, 10373, 41, 14881, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 198, 11748, 10373, 41, 5841, 1424, 198, 11748, 10286, 15813, 20238, 198, 3500, 10373, 41...
2.258242
1,638
<filename>src/Numerics/DGMethods/DGFVModel.jl include("DGFVModel_kernels.jl") struct DGFVModel{BL, G, FVR, NFND, NFD, GNF, AS, DS, HDS, D, DD, MD, GF, TF} <: SpaceDiscretization balance_law::BL grid::G fv_reconstruction::FVR numerical_flux_first_order::NFND numerical_flux_second_order::NFD ...
[ 27, 34345, 29, 10677, 14, 45, 6975, 873, 14, 35, 38, 46202, 14, 35, 21713, 53, 17633, 13, 20362, 198, 17256, 7203, 35, 21713, 53, 17633, 62, 74, 44930, 13, 20362, 4943, 198, 7249, 360, 21713, 53, 17633, 90, 9148, 11, 402, 11, 376,...
2.006727
5,203
### A Pluto.jl notebook ### # v0.15.1 using Markdown using InteractiveUtils # ╔═╡ 9f0add20-11db-11ec-31c8-1933ca9b19c4 begin using MortalityTables using DataFrames using IterTools using BenchmarkTools end # ╔═╡ 1ed5e587-d0eb-4dc2-bedc-00d13f258ecd begin using PlutoUI TableOfContents() end # ╔═╡ d8fa5c6d-4fd3-...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1314, 13, 16, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 860, 69, 15, 2860, 1238, 12, 1157, 9945, 12, ...
1.987936
9,781
<filename>src/record_video.jl const vfname = "puppersim.mp4" # Video file name ##################################################### functions function finish_recording(s::mjSim) # Primarily see avio.jl reference in render function below. Also of potential interest: # https://github.com/JuliaIO/VideoIO.jl...
[ 27, 34345, 29, 10677, 14, 22105, 62, 15588, 13, 20362, 198, 9979, 410, 69, 3672, 796, 366, 79, 7211, 364, 320, 13, 3149, 19, 1, 220, 220, 220, 220, 220, 1303, 7623, 2393, 1438, 198, 198, 29113, 14468, 4242, 2, 5499, 198, 8818, 546...
2.232586
1,651
using AstroImages, FITSIO, Images using Test import AstroImages: _float, render @testset "Conversion to float and fixed-point" begin @testset "Float" begin for T in (Float16, Float32, Float64) @test _float(T(-9.8)) === T(-9.8) @test _float(T(12.3)) === T(12.3) end end ...
[ 3500, 35167, 29398, 11, 376, 29722, 9399, 11, 5382, 198, 3500, 6208, 198, 198, 11748, 35167, 29398, 25, 4808, 22468, 11, 8543, 198, 198, 31, 9288, 2617, 366, 3103, 9641, 284, 12178, 290, 5969, 12, 4122, 1, 2221, 198, 220, 220, 220, ...
1.864706
850
<gh_stars>10-100 BaseTopicModel = Union{AbstractLDA, AbstractfLDA, AbstractCTM, AbstractfCTM}
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 14881, 33221, 17633, 796, 4479, 90, 23839, 43, 5631, 11, 27741, 69, 43, 5631, 11, 27741, 4177, 44, 11, 27741, 69, 4177, 44, 92 ]
2.818182
33
import Term: Theme @testset "\e[34mtheme" begin show(devnull, Theme()) # coverage @test true end # TODO: write more tests
[ 11748, 35118, 25, 26729, 198, 198, 31, 9288, 2617, 37082, 68, 58, 2682, 76, 43810, 1, 2221, 198, 220, 220, 220, 905, 7, 7959, 8423, 11, 26729, 28955, 220, 1303, 5197, 198, 220, 220, 220, 2488, 9288, 2081, 198, 437, 198, 198, 2, 16...
2.66
50
#using Gtk, Test @testset "tree" begin window = GtkWindow("GtkTree", 300, 100) #errors out #<---- boxtop = GtkBox(:v) # vertical box, basic structure wscroll = GtkScrolledWindow() function itemlist(types, rownames) @assert length(types) == length(rownames) list = GtkTreeStore(types...) #treeStore : list...
[ 2, 3500, 402, 30488, 11, 6208, 198, 198, 31, 9288, 2617, 366, 21048, 1, 2221, 198, 198, 17497, 796, 402, 30488, 27703, 7203, 38, 30488, 27660, 1600, 5867, 11, 1802, 8, 1303, 48277, 503, 1303, 27, 650, 198, 2127, 742, 404, 796, 402, ...
2.437562
1,001
<reponame>jmurga/ABC-MK.jl<filename>scripts/features.jl using QuadGK using SpecialFunctions using Roots using RCall function Gammadist(gamma) return ((adap.be^adap.al)/SpecialFunctions.gamma(adap.al))*(gamma^(adap.al-1))*exp(-adap.be*gamma) end function pip0(gamma) U = 4*adap.theta_f*adap.Lf/(2.0*adap.NN) R = 2*ad...
[ 27, 7856, 261, 480, 29, 73, 76, 45098, 14, 24694, 12, 33907, 13, 20362, 27, 34345, 29, 46521, 14, 40890, 13, 20362, 198, 3500, 20648, 38, 42, 198, 3500, 6093, 24629, 2733, 198, 3500, 34341, 198, 3500, 13987, 439, 198, 198, 8818, 402...
1.960784
2,193
# # BoundarForces.jl # CollagenPolymer # # Created by <NAME> on 04/08/2020. # # module BoundaryForces # Import Julia packages using LinearAlgebra using StaticArrays # Import local program modules @views function boundaryForces!(boundaryList,pos,F,ϵ,nGrid,boxSize,dxMatrix,rₘ) # Boundary forces for (particle,d...
[ 2, 198, 2, 220, 30149, 283, 1890, 728, 13, 20362, 198, 2, 220, 7778, 11286, 34220, 647, 198, 2, 198, 2, 220, 15622, 416, 1279, 20608, 29, 319, 8702, 14, 2919, 14, 42334, 13, 198, 2, 198, 2, 198, 198, 21412, 30149, 560, 1890, 728...
2.075061
413
module ESNICE_examples using Statistics using FinEtools using FinEtools.MeshImportModule using FinEtools.MeshExportModule using LinearAlgebra: dot using Arpack using LinearAlgebra using SparseArrays using PGFPlotsX using Test using StatsBase function ESNICE_energies() E = 1e6*phun("PA"); nu = 0.0; L = 2*ph...
[ 21412, 13380, 45, 8476, 62, 1069, 12629, 198, 3500, 14370, 198, 3500, 4463, 36, 31391, 198, 3500, 4463, 36, 31391, 13, 37031, 20939, 26796, 198, 3500, 4463, 36, 31391, 13, 37031, 43834, 26796, 198, 3500, 44800, 2348, 29230, 25, 16605, 1...
1.972658
2,487
<filename>symbolic/sym3/src/core/utils.jl # Return x, or default value if it's nothing defaultTo(x, default) = x ≠ nothing ? x : default # Clear collection (seems to be pretty efficient) clear(collection) = filter(_ -> false, collection) clear!(collection) = filter!(_ -> false, collection) # To string + add brackets ...
[ 27, 34345, 29, 1837, 2022, 4160, 14, 37047, 18, 14, 10677, 14, 7295, 14, 26791, 13, 20362, 198, 2, 8229, 2124, 11, 393, 4277, 1988, 611, 340, 338, 2147, 198, 12286, 2514, 7, 87, 11, 4277, 8, 796, 2124, 15139, 254, 2147, 5633, 2124...
2.414938
482
module FrankieMae import Pandas import Dates # ReadFiles fmopen(parentpath,startrange,endrange) = begin ## for daterange, create an array where 1:4 is repeated endrange-(startrange+1) and with startrange quarter:4 appended to front and 1:endrange quarter is appended to the end daterange = [Pandas.read_csv( join(...
[ 21412, 48535, 44, 3609, 198, 198, 11748, 16492, 292, 198, 11748, 44712, 628, 198, 198, 2, 4149, 25876, 198, 38353, 9654, 7, 8000, 6978, 11, 9688, 9521, 11, 437, 9521, 8, 796, 2221, 198, 2235, 329, 288, 729, 858, 11, 2251, 281, 7177,...
3.090226
133
function PascalDistribution(arg0::jint, arg1::jdouble) return PascalDistribution((jint, jdouble), arg0, arg1) end function cumulative_probability(obj::PascalDistribution, arg0::jint) return jcall(obj, "cumulativeProbability", jdouble, (jint,), arg0) end function get_number_of_successes(obj::PascalDistribution...
[ 8818, 35163, 20344, 3890, 7, 853, 15, 3712, 73, 600, 11, 1822, 16, 3712, 73, 23352, 8, 198, 220, 220, 220, 1441, 35163, 20344, 3890, 19510, 73, 600, 11, 474, 23352, 828, 1822, 15, 11, 1822, 16, 8, 198, 437, 198, 198, 8818, 23818, ...
2.819127
481
function save_features_instance!(db::SQLite.DB, name, scenario, source_type, source_path) println("Saving instance features: ($name, $scenario)") network = PowerFlowNetwork(source_path, source_type) merge_duplicate_branch!(network) features = get_features_instance(network) query = "UPDATE instances ...
[ 8818, 3613, 62, 40890, 62, 39098, 0, 7, 9945, 3712, 17861, 578, 13, 11012, 11, 1438, 11, 8883, 11, 2723, 62, 4906, 11, 2723, 62, 6978, 8, 198, 220, 220, 220, 44872, 7203, 50, 2703, 4554, 3033, 25, 7198, 3672, 11, 720, 1416, 39055,...
2.522628
685