content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<gh_stars>10-100 function layouttable(io::IO, printer::Function, table::Table, tchars::Dict, indent=0) celltext = map(r -> if r isa TableRow [join(sprint.(printer, c.contents)) for c in r.cells] else r end, table.rows) colwidths = map(r -> if !isa(r, TableHrule) ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 8818, 12461, 11487, 7, 952, 3712, 9399, 11, 20632, 3712, 22203, 11, 3084, 3712, 10962, 11, 256, 354, 945, 3712, 35, 713, 11, 33793, 28, 15, 8, 198, 220, 220, 220, 2685, 5239, 796, 3975, ...
1.917132
2,148
function euclideanDistance(point1::Array, point2::Array) nVar = length(point1) acc = 0 for i=1:nVar acc += (point1[i]-point2[i])^2 end return sqrt(acc) end function pairwiseDistance(array1::Array, array2::Array, metric::Function) len = size(array1)[1] matrix = zeros(len, len) ...
[ 8818, 304, 36616, 485, 272, 45767, 7, 4122, 16, 3712, 19182, 11, 966, 17, 3712, 19182, 8, 628, 220, 220, 220, 299, 19852, 796, 4129, 7, 4122, 16, 8, 198, 220, 220, 220, 697, 796, 657, 198, 220, 220, 220, 329, 1312, 28, 16, 25, ...
1.936398
1,305
<filename>src/models/market_models/products/multistep/multiproduct_multistep.jl type MultiProductMultiStepCommon rateTimes::Vector{Float64} evolution::EvolutionDescription end function MultiProductMultiStepCommon(rateTimes::Vector{Float64}) n = length(rateTimes) - 1 evolutionTimes = zeros(n) relevanceRates =...
[ 27, 34345, 29, 10677, 14, 27530, 14, 10728, 62, 27530, 14, 29498, 14, 16680, 396, 538, 14, 16680, 541, 2076, 310, 62, 16680, 396, 538, 13, 20362, 198, 4906, 15237, 15667, 29800, 8600, 17227, 198, 220, 2494, 28595, 3712, 38469, 90, 438...
2.639635
1,862
<reponame>eschnett/STL.jl<gh_stars>1-10 # Defs # Free a C++ object function free end export free # Describe how wrapped objects are handled by containers function convert_arg end export convert_arg function convert_result end export convert_result #TODO const value_types = Set([Bool, Int8, Int16, Int32, Int64, UInt...
[ 27, 7856, 261, 480, 29, 274, 1349, 3087, 14, 2257, 43, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 2896, 82, 198, 198, 2, 3232, 257, 327, 4880, 2134, 198, 8818, 1479, 886, 198, 39344, 1479, 198, 198, 2, 39373, 4892, ...
2.14825
1,086
<gh_stars>0 using Pkg, RData cd("C:\\Users\\UOS\\Desktop\\portfolio\\dataset") df_kospi = load("kospi_1018.RData") typeof(df_kospi) keys(df_kospi) ### Dict type의 data에 key를 확인 kospi_mat = df_kospi["df_kospi_1018"][2:end,] group_inx = df_kospi["group_index"] ### Data type 변환 DF -> Matrix kospi_mat = convert(Matri...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 3500, 350, 10025, 11, 371, 6601, 198, 198, 10210, 7203, 34, 25, 6852, 14490, 6852, 52, 2640, 6852, 36881, 6852, 634, 13652, 6852, 19608, 292, 316, 4943, 198, 198, 7568, 62, 74, 2117, 72, 796, ...
1.604679
1,667
<gh_stars>10-100 using Dates Faker.language("es-MX") Faker.seed(80) @test typeof( Faker.random_digit() ) == String @test typeof( Faker.random_digit_not_null() ) == String @test typeof( Faker.random_digit_or_empty() ) ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 44712, 198, 37, 3110, 13, 16129, 7203, 274, 12, 43243, 4943, 198, 37, 3110, 13, 28826, 7, 1795, 8, 198, 31, 9288, 2099, 1659, 7, 220, 376, 3110, 13, 25120, 62, 27003, 3419, 1267, ...
1.664746
7,982
<reponame>scuervo91/WellLogs.jl<gh_stars>1-10 """ PropDist(args...)--> UnivariateDistribution Fit the given data to a specific statistical distribution Distributions.jl package is used to fit The next table show the list of variables allowed: |PropertyName|Args|Default|Input|Description |---|---|---|---|---...
[ 27, 7856, 261, 480, 29, 1416, 84, 712, 78, 6420, 14, 5779, 11187, 82, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 201, 198, 24331, 20344, 7, 22046, 23029, 46904, 791, 42524, 20344, 3890, 201, 198, 201, 198, 31805, ...
2.275801
562
<gh_stars>10-100 # --- # title: 1287. Element Appearing More Than 25% In Sorted Array # id: problem1287 # author: <NAME> # date: 2020-10-31 # difficulty: Easy # categories: Array # link: <https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/description/> # hidden: true # --- # # Given an intege...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 11420, 198, 2, 3670, 25, 1105, 5774, 13, 11703, 2034, 6648, 3125, 17924, 1679, 4, 554, 311, 9741, 15690, 198, 2, 4686, 25, 1917, 1065, 5774, 198, 2, 1772, 25, 1279, 20608, 29, 198, ...
2.329193
322
<reponame>staticfloat/TuringTutorials<gh_stars>100-1000 using Test using TuringTutorials @testset "TuringTutorials" begin include("build.jl") end
[ 27, 7856, 261, 480, 29, 12708, 22468, 14, 51, 870, 51, 44917, 82, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 6208, 198, 3500, 39141, 51, 44917, 82, 198, 198, 31, 9288, 2617, 366, 51, 870, 51, 44917, 82, 1, 2221, 198, 22...
2.696429
56
function FiniteDifferences.to_vec(x::RegularSpacing) function from_vec_RegularSpacing(x_vec) return RegularSpacing(x_vec[1], x_vec[2], x.N) end return [x.t0, x.Δt], from_vec_RegularSpacing end @testset "regular_data" begin t0 = randn() Δt = randn() N = 5 x = RegularSpacing(t0, Δt, N...
[ 8818, 4463, 578, 28813, 4972, 13, 1462, 62, 35138, 7, 87, 3712, 40164, 4561, 4092, 8, 198, 220, 220, 220, 2163, 422, 62, 35138, 62, 40164, 4561, 4092, 7, 87, 62, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 23603, 4561,...
1.979118
431
# utility/z-list.jl include("downsample.jl") include("eql_root.jl") include("interp1.jl") include("jinc.jl") include("map_many.jl") include("mask.jl") include("max_percent_diff.jl") include("ndgrid.jl") include("rect.jl") include("reverser.jl") include("rmsd100.jl")
[ 2, 10361, 14, 89, 12, 4868, 13, 20362, 198, 198, 17256, 7203, 30371, 1403, 13, 20362, 4943, 198, 17256, 7203, 68, 13976, 62, 15763, 13, 20362, 4943, 198, 17256, 7203, 3849, 79, 16, 13, 20362, 4943, 198, 17256, 7203, 73, 1939, 13, 20...
2.528302
106
module GithubMarkdown export rendergfm const libpath = normpath(joinpath(@__DIR__, "..", "deps", "usr", "lib")) const binary_path = normpath(joinpath(@__DIR__, "..", "deps", "usr", "bin", "cmark-gfm")) @static if Sys.iswindows() const execenv = ("PATH" => string(libpath, ";", Sys.BINDIR)) elseif Sys.isapple() ...
[ 21412, 38994, 9704, 2902, 198, 198, 39344, 8543, 70, 38353, 198, 198, 9979, 9195, 6978, 796, 2593, 6978, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 10378, 82, 1600, 366, 14629, 1600, 366, 8019, 48774, 198, 9979, ...
2.69588
1,529
using Jive @useinside module test_stdlib_distributed_sshmanager using Test using Distributed using .Distributed: SSHManager const test_exeflags = Base.julia_cmd() const test_exename = popfirst!(test_exeflags.exec) function addprocs_with_testenv(manager; kwargs...) tunnel = false sshflags = `` max_paralle...
[ 3500, 449, 425, 198, 31, 1904, 48787, 8265, 1332, 62, 19282, 8019, 62, 17080, 6169, 62, 45824, 37153, 198, 198, 3500, 6208, 198, 3500, 4307, 6169, 198, 3500, 764, 20344, 6169, 25, 33825, 13511, 198, 198, 9979, 1332, 62, 1069, 891, 75,...
2.515385
520
module TestEnumerationArray using FactCheck using DataCubes import DataCubes: wrap_array facts("EnumerationArray tests") do @fact EnumerationArray(@nalift(["a" NA "b" "b";NA "b" "a" "c"])).elems --> Int[1 0 2 2;0 2 1 3] @fact EnumerationArray(@nalift(["a" NA "b" "b";NA "b" "a" "c"]), ["c","a","b"]).elems --> Int[...
[ 21412, 6208, 4834, 6975, 341, 19182, 198, 198, 3500, 19020, 9787, 198, 3500, 6060, 34, 29080, 198, 11748, 6060, 34, 29080, 25, 14441, 62, 18747, 198, 198, 37473, 7203, 4834, 6975, 341, 19182, 5254, 4943, 466, 198, 220, 2488, 22584, 2039...
1.837005
7,172
<reponame>jeff-regier/Latte.jl @defstruct ReplicationLayer Layer ( name :: AbstractString = "power", (num_copies :: Int = 1, num_copies > 0), (tops :: Vector{Symbol} = Symbol[], length(tops) == 1), (bottoms :: Vector{Symbol} = Symbol[], length(bottoms) == length(tops)), ) @characterize_layer(Replication...
[ 27, 7856, 261, 480, 29, 73, 14822, 12, 2301, 959, 14, 24220, 660, 13, 20362, 198, 31, 4299, 7249, 18407, 3299, 49925, 34398, 357, 198, 220, 220, 220, 1438, 7904, 27741, 10100, 796, 366, 6477, 1600, 198, 220, 220, 220, 357, 22510, 62...
2.282185
769
using DifferentialEquations using DelayDiffEq using DiffEqCallbacks using Tables using DataFrames using StatsPlots using BenchmarkTools function sir_dde!(du,u,h,p,t) (S,I,R) = u (β,c,τ) = p N = S+I+R infection = β*c*I/N*S (Sd,Id,Rd) = h(p, t-τ) # Time delayed variables Nd = Sd+Id+Rd recov...
[ 198, 3500, 20615, 498, 23588, 602, 198, 3500, 42698, 28813, 36, 80, 198, 3500, 10631, 36, 80, 14134, 10146, 198, 3500, 33220, 198, 3500, 6060, 35439, 198, 3500, 20595, 3646, 1747, 198, 3500, 25187, 4102, 33637, 628, 198, 8818, 15967, 62...
1.844203
1,104
<gh_stars>0 # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct UsageSample <: SwaggerModel subscriptionId::Any # spec type: Union{ Nothing, String } # spec name: subscriptionId meterId::Any # spec type: Un...
[ 27, 456, 62, 30783, 29, 15, 198, 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, 198, 76, 18187, 2878, 29566, ...
3.187457
1,451
#------------------------------------------------------------------------------# Mean """ Mean of a single series. ```julia y = randn(100) o = Mean() fit!(o, y) o = Mean(y) ``` """ type Mean{W <: Weight} <: OnlineStat{ScalarInput} value::Float64 weight::W end Mean(wt::Weight = EqualWeight()) = Mean(0.0, wt) ...
[ 2, 10097, 26171, 2, 22728, 198, 37811, 198, 5308, 272, 286, 257, 2060, 2168, 13, 198, 198, 15506, 63, 73, 43640, 198, 88, 796, 43720, 77, 7, 3064, 8, 198, 198, 78, 796, 22728, 3419, 198, 11147, 0, 7, 78, 11, 331, 8, 198, 198, ...
2.069386
7,134
using PackageCompiler builddir = ARGS[1] mkpath(builddir) build_shared_lib( joinpath(@__DIR__, "staticrbd.jl"), "libstaticrbdjl", snoopfile = joinpath(@__DIR__, "snoopfile.jl"), startup_file = "no", builddir = builddir, Release = true, check_bounds = "no", optimize = 3 )
[ 3500, 15717, 7293, 5329, 198, 198, 11249, 15908, 796, 5923, 14313, 58, 16, 60, 198, 28015, 6978, 7, 11249, 15908, 8, 198, 198, 11249, 62, 28710, 62, 8019, 7, 198, 220, 220, 220, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 12708, ...
2.323077
130
<gh_stars>0 # ============================================================================ # # DictSet # ============================================================================ # # TODO: use IntSet? - benchmark! """ Basic dict-like thing that holds multiple values for each key in a set. """ struct DictSet{K} d...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 38093, 2559, 18604, 1303, 198, 2, 360, 713, 7248, 198, 2, 38093, 2559, 18604, 1303, 198, 2, 16926, 46, 25, 779, 2558, 7248, 30, 532, 18335, 0, 198, 37811, 198, 26416, 8633, 12, 2339, 1517, 326, ...
2.201408
2,557
# Checks PELT runs println("Running PELT tests...") n = 1000; # Number of samples λ = 100; # Frequencey of changes ######################## # Normal mean segments # ######################## μ, σ = Normal(0.0, 10.0), 1.0 sample, cps = @changepoint_sampler n λ Normal(μ, σ) seg_costs = NormalMeanSegment(...
[ 2, 47719, 350, 3698, 51, 4539, 198, 198, 35235, 7203, 28768, 350, 3698, 51, 5254, 9313, 8, 198, 198, 77, 796, 8576, 26, 220, 220, 220, 220, 220, 220, 220, 1303, 7913, 286, 8405, 198, 39377, 796, 1802, 26, 220, 220, 220, 220, 220, ...
2.640097
414
# Automatically generated using Clang.jl wrap_c, version 0.0.0 using Compat #const WINUSERAPI = DECLSPEC_IMPORT #const WINABLEAPI = DECLSPEC_IMPORT const WINVER = 0x0500 # Skipping MacroDefinition: IS_INTRESOURCE ( _r ) ( ( ( ( ULONG_PTR ) ( _r ) ) >> 16 ) == 0 ) # Skipping MacroDefinition: MAKEINTRESOURCEA ( i ) ( ...
[ 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 11, 2196, 657, 13, 15, 13, 15, 198, 198, 3500, 3082, 265, 198, 198, 2, 9979, 25779, 29904, 17614, 796, 27196, 43, 48451, 62, 3955, 15490, 198, 2, 9979, 25779, 17534, ...
2.275564
58,041
<reponame>jayren3996/ExactDiagonalization.jl<gh_stars>1-10 #----------------------------------------------------------------------------------------------------- # More construction method for Operation #----------------------------------------------------------------------------------------------------- export onsite_...
[ 27, 7856, 261, 480, 29, 33708, 918, 28771, 21, 14, 3109, 529, 18683, 27923, 1634, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 10097, 3880, 30934, 198, 2, 3125, 5103, 2446, 329, 14680, 198, 2, 10097, 3880, 30934, 198, 3...
3.389776
626
<reponame>jakobnissen/SmallBitSet.jl<filename>test/stackvector.jl random_stackvector(L) = StackVector(rand(UInt) & (1 << (L&63) - 1), L) @testset "Construction" begin @test_throws DomainError StackVector(zero(UInt), 65) @test StackVector([1, 0, 1, 1, 0, 1]) !== false @test StackVector([0, 1, 1, 0]) isa ...
[ 27, 7856, 261, 480, 29, 73, 461, 672, 77, 747, 268, 14, 18712, 13128, 7248, 13, 20362, 27, 34345, 29, 9288, 14, 25558, 31364, 13, 20362, 198, 25120, 62, 25558, 31364, 7, 43, 8, 796, 220, 23881, 38469, 7, 25192, 7, 52, 5317, 8, 1...
2.004695
1,704
### A Pluto.jl notebook ### # v0.12.21 using Markdown using InteractiveUtils # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). macro bind(def, element) quote lo...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 2481, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 770, 32217, 20922, 3544, 2488, 21653, 329, 9427, 3458, 13, 1649, 2491, 428, 20922...
1.835233
2,106
<reponame>eschnett/JuliaFormatter.jl # Copyright 2017, <NAME>, <NAME>, <NAME>, and contributors # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Returns the block ...
[ 27, 7856, 261, 480, 29, 274, 1349, 3087, 14, 16980, 544, 8479, 1436, 13, 20362, 198, 2, 220, 15069, 2177, 11, 1279, 20608, 22330, 1279, 20608, 22330, 1279, 20608, 22330, 290, 20420, 198, 2, 220, 770, 8090, 6127, 5178, 318, 2426, 284, ...
1.974865
7,201
<gh_stars>0 using LinearAlgebra using Test using Random using ProximalOperators using ProximalAlgorithms @testset "Lasso small (strongly convex, $T)" for T in [Float32, Float64] Random.seed!(777) dim = 5 μf = T(1) Lf = T(10) x_star = convert(Vector{T}, 1.5 * rand(T, dim) .- 0.5) lam = (μf +...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 44800, 2348, 29230, 198, 3500, 6208, 198, 3500, 14534, 198, 198, 3500, 1041, 87, 4402, 18843, 2024, 198, 3500, 1041, 87, 4402, 2348, 7727, 907, 198, 198, 31, 9288, 2617, 366, 43, 28372, 1402, 3...
1.857955
528
<reponame>agricolab/Metis.jl<gh_stars>0 type Kronos data::Array{Number} labels::Array{String} Markers SamplingRate::Number Provenance::Dict end
[ 27, 7856, 261, 480, 29, 363, 1173, 349, 397, 14, 9171, 271, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 4906, 44732, 418, 198, 220, 220, 220, 1366, 3712, 19182, 90, 15057, 92, 198, 220, 220, 220, 14722, 3712, 19182, 90, 10100, 92,...
2.277778
72
using CUDA using ExaPF using KernelAbstractions using Test import ExaPF: PowerSystem import ExaPF: LinearSolvers const LS = LinearSolvers @testset "Powerflow solver" begin datafile = joinpath(INSTANCES_DIR, "case14.raw") pf = PowerSystem.PowerNetwork(datafile) # Parameters npartitions = 8 toleranc...
[ 3500, 29369, 5631, 198, 3500, 1475, 64, 42668, 198, 3500, 32169, 23839, 507, 198, 3500, 6208, 198, 198, 11748, 1475, 64, 42668, 25, 4333, 11964, 198, 11748, 1475, 64, 42668, 25, 44800, 36949, 690, 198, 9979, 30948, 796, 44800, 36949, 69...
2.188648
599
using Base.Test using RPOMDPModels, RPOMDPToolbox using RobustValueIteration const RPBVI = RobustValueIteration TOL = 1e-6 @testset "Robust point-based value iteration" begin # value function max difference rp = BabyRPOMDP() alphavecs = [RPBVI.AlphaVec([2.0, 4.0], true), RPBVI.AlphaVec(...
[ 3500, 7308, 13, 14402, 198, 3500, 25812, 2662, 6322, 5841, 1424, 11, 25812, 2662, 6322, 25391, 3524, 198, 3500, 3851, 436, 11395, 29993, 341, 198, 9979, 25812, 33, 12861, 796, 3851, 436, 11395, 29993, 341, 198, 51, 3535, 796, 352, 68, ...
1.884726
2,429
# test to check if preGen helps reduce the solution time using Distributed; addprocs(20); @everywhere include("loadMod.jl"); @everywhere const GUROBI_ENV = Gurobi.Env(); N = 5; dataList = Dict(); caseList = [13,33,123]; T = 96; τ = Int64(1/6*T); Δt = 0.25; iterMax = 20; pathTrain = load("pathHist_600.jld"); for ci i...
[ 2, 1332, 284, 2198, 611, 662, 13746, 5419, 4646, 262, 4610, 640, 198, 3500, 4307, 6169, 26, 198, 2860, 1676, 6359, 7, 1238, 1776, 198, 31, 16833, 3003, 2291, 7203, 2220, 5841, 13, 20362, 15341, 198, 31, 16833, 3003, 1500, 402, 4261, ...
2.225926
540
using BinDeps @BinDeps.setup #deps = [ rsvg = library_dependency("xcb", aliases = ["libxcb"]) #] @BinDeps.install [:xcb => :_jl_libxcb ]
[ 3500, 20828, 12156, 82, 198, 198, 31, 33, 259, 12156, 82, 13, 40406, 198, 198, 2, 10378, 82, 796, 685, 198, 197, 3808, 45119, 796, 5888, 62, 45841, 1387, 7203, 87, 21101, 1600, 47217, 796, 14631, 8019, 87, 21101, 8973, 8, 198, 2, ...
2.119403
67
<filename>src/domains.jl export IntervalDomain, ProductDomain, ⊗, CircleDomain abstract type AbstractDomain{T,N} end struct VarDomainPairing variables domain::AbstractDomain end Base.:∈(variable::ModelingToolkit.Operation,domain::AbstractDomain) = VarDomainPairing(variable,domain) Base.:∈(variables::NTup...
[ 27, 34345, 29, 10677, 14, 3438, 1299, 13, 20362, 198, 39344, 4225, 2100, 43961, 11, 8721, 43961, 11, 2343, 232, 245, 11, 16291, 43961, 201, 198, 201, 198, 397, 8709, 2099, 27741, 43961, 90, 51, 11, 45, 92, 886, 201, 198, 201, 198, ...
2.744027
293
<gh_stars>0 using LinearAlgebra using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, HermOrSym import LinearAlgebra: lmul!, mul! export rankUpdate! # Rank one update ## General ### BLAS rankUpdate!(A::StridedMatrix{T}, x::StridedVector{T}, y::StridedVector{T}, α::T) where {T<:BlasReal} = BLAS.ger!(α, x, y, A) ##...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 44800, 2348, 29230, 198, 3500, 44800, 2348, 29230, 25, 1086, 292, 5377, 11141, 11, 1086, 292, 43879, 11, 1086, 292, 15633, 11, 18113, 5574, 43094, 198, 198, 11748, 44800, 2348, 29230, 25, 300, 76...
1.790703
4,668
<reponame>hammerfunctor/QuantumAlgebra.jl abstract type IndexFunction end (f::IndexFunction)(A::BaseOperator) = BaseOperator(A.t,A.name,f.(A.inds)) (f::IndexFunction)(d::δ) = δ(f(d.iA),f(d.iB)) (f::IndexFunction)(par::Param) = Param(par.name,par.state,f.(par.inds)) (f::IndexFunction)(ops::BaseOpProduct) = BaseOpProduc...
[ 27, 7856, 261, 480, 29, 17980, 12543, 2715, 14, 24915, 388, 2348, 29230, 13, 20362, 198, 397, 8709, 2099, 12901, 22203, 886, 198, 198, 7, 69, 3712, 15732, 22203, 5769, 32, 3712, 14881, 18843, 1352, 8, 796, 7308, 18843, 1352, 7, 32, ...
2.220683
2,021
<reponame>dominikkiese/PFFRGSolver.jl """ init_model_heisenberg!( J :: Vector{Vector{Float64}}, l :: Lattice ) :: Nothing Init Heisenberg model on a given lattice by overwriting the respective bonds. Here, J[n] is the coupling to the n-th nearest neighbor (Euclidean norm). If there are m sy...
[ 27, 7856, 261, 480, 29, 3438, 259, 36073, 444, 68, 14, 47, 5777, 49, 14313, 14375, 13, 20362, 198, 37811, 198, 220, 220, 220, 2315, 62, 19849, 62, 258, 13254, 3900, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 449, 7904, 20650, ...
2.006157
1,137
include("activate.jl") using LinearAlgebra using Random using SparseArrays n = 1000 k = 10000 s = rand(1:100) @info "Seed $s" # this seed produces numerical issues with Float64 with the k-sparse 100 lmo / for testing s = 41 Random.seed!(s) matrix = rand(n, n) hessian = transpose(matrix) * matrix linear = rand(n) ...
[ 17256, 7203, 39022, 13, 20362, 4943, 198, 198, 3500, 44800, 2348, 29230, 198, 3500, 14534, 198, 3500, 1338, 17208, 3163, 20477, 198, 198, 77, 796, 8576, 198, 74, 796, 33028, 198, 198, 82, 796, 43720, 7, 16, 25, 3064, 8, 198, 31, 109...
2.244875
1,756
function legendre_pos_m(lmax, x, Plm) """ Associated Legendre polynomials only with positive M. """ a = (1. - x^2) b = sqrt(a) Plm[1] = 1. if lmax > 0 Plm[2] = x Plm[3] = - b if lmax > 1 Plm[4] = 0.5 * (3. * x^2 - 1.) Plm[5] = -3. * x * b ...
[ 8818, 8177, 260, 62, 1930, 62, 76, 7, 75, 9806, 11, 2124, 11, 1345, 76, 8, 198, 220, 220, 220, 37227, 10575, 9883, 260, 745, 6213, 296, 8231, 691, 351, 3967, 337, 13, 37227, 628, 220, 220, 220, 257, 796, 357, 16, 13, 532, 2124, ...
1.624044
3,269
<reponame>xijiang/GEAS.jl """ function bp_summary(prd, snp, qtl) --- Summarize simulation results of the `b`reeding `p`rogram. The figures and tables will be saved with an initial 'bps-'. """ function bp_summary(prd, snp, qtl) # construct pedigree n₀ = length( unique( Matrix( ...
[ 27, 7856, 261, 480, 29, 87, 2926, 15483, 14, 8264, 1921, 13, 20362, 198, 37811, 198, 220, 220, 220, 2163, 275, 79, 62, 49736, 7, 1050, 67, 11, 3013, 79, 11, 10662, 28781, 8, 198, 6329, 198, 13065, 3876, 1096, 18640, 2482, 286, 262...
1.835895
2,212
<gh_stars>1-10 #! format: off should_precompile = true # Don't edit the following! Instead change the script for `snoop_bot`. ismultios = false ismultiversion = true # precompile_enclosure @static if !should_precompile # nothing elseif !ismultios && !ismultiversion @static if isfile(joinpath(@__DIR__, "../dep...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 0, 5794, 25, 572, 198, 21754, 62, 3866, 5589, 576, 796, 2081, 628, 198, 2, 2094, 470, 4370, 262, 1708, 0, 5455, 1487, 262, 4226, 329, 4600, 82, 3919, 404, 62, 13645, 44646, 198, 1042,...
2.120792
505
### press-rybicki.jl --- Plan the Lomb–Scargle periodogram # # Copyright (C) 2017 <NAME>. # # Maintainer: <NAME> <mose AT gnu DOT org> # Keywords: periodogram, lomb scargle # # This file is a part of LombScargle.jl. # # License is BSD 3-clause "New" or "Revised". # ### Code: # Switches to select the appropriate algor...
[ 21017, 1803, 12, 563, 65, 624, 72, 13, 20362, 11420, 220, 5224, 262, 28503, 1906, 3351, 853, 293, 2278, 21857, 198, 2, 198, 2, 15069, 357, 34, 8, 2177, 1279, 20608, 28401, 198, 2, 198, 2, 337, 2913, 10613, 25, 1279, 20608, 29, 127...
2.283089
4,571
module Meta export quot, is_expr, is_fdef, split_fdef, subs_ex, @expect, @get! macro expect(pred) quote $(esc(pred)) ? nothing : error( $(string("expected: ", sprint(Base.show_unquoted, pred)", == true"))) end end # ---- Metaprogramming -----------------------------------------------------...
[ 198, 21412, 30277, 198, 39344, 23611, 11, 318, 62, 31937, 11, 318, 62, 69, 4299, 11, 6626, 62, 69, 4299, 11, 6352, 62, 1069, 11, 2488, 1069, 806, 11, 2488, 1136, 0, 628, 198, 20285, 305, 1607, 7, 28764, 8, 198, 220, 220, 220, 95...
2.358008
743
@testset "NelsonSiegelSvensson" begin # Per this technical note, the target/source rates should be interpreted as continuous rates: # https://www.ecb.europa.eu/stats/financial_markets_and_interest_rates/euro_area_yield_curves/html/technical_notes.pdf # EURAAA_20191111 at https://www.ecb.europa.eu/sta...
[ 31, 9288, 2617, 366, 45, 10151, 50, 28210, 50, 574, 16528, 1, 2221, 628, 220, 220, 220, 1303, 2448, 428, 6276, 3465, 11, 262, 2496, 14, 10459, 3965, 815, 307, 16173, 355, 12948, 3965, 25, 220, 198, 220, 220, 220, 1303, 3740, 1378, ...
1.860993
2,597
<gh_stars>0 using Test: @test, @testset import Pastebin @testset "pastebin" begin @test Pastebin.content(Pastebin.getraw("Lt9PtFc4")) == "Hola mundo" @test Pastebin.content(Pastebin.getraw("gdQAnG2f")) == "Batido de mamey" @test Pastebin.success(Pastebin.getraw("gdQAnG2f")) @test Pastebin.parsekey("htt...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 6208, 25, 2488, 9288, 11, 2488, 9288, 2617, 198, 11748, 29582, 198, 198, 31, 9288, 2617, 366, 30119, 23497, 1, 2221, 198, 220, 220, 220, 2488, 9288, 29582, 13, 11299, 7, 34533, 23497, 13, 1136,...
2.51417
247
<reponame>bilekviktor/GenerativeAD.jl # run this on the RCI cluster in the `data/experiment_count` dir using DrWatson @quickactivate using PrettyTables using Statistics using FileIO, BSON, DataFrames using GenerativeAD using CSV # just count models, score files and training time # number of models data_folders = [data...
[ 27, 7856, 261, 480, 29, 65, 576, 74, 28930, 13165, 14, 8645, 876, 2885, 13, 20362, 198, 2, 1057, 428, 319, 262, 13987, 40, 13946, 287, 262, 4600, 7890, 14, 23100, 3681, 62, 9127, 63, 26672, 198, 3500, 1583, 54, 13506, 198, 31, 242...
2.304074
6,186
########################################################################## # Copyright 2017 <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
[ 29113, 29113, 7804, 2235, 198, 2, 15069, 2177, 1279, 20608, 28401, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 26...
2.752525
1,188
<reponame>WaveProp/WavePropBase using Test using WavePropBase using WavePropBase.Geometry using WavePropBase.Interpolation using StaticArrays @testset "ReferenceLine" begin d = ReferenceLine() k = 3 sp = Pk(d,k) @test dimension(sp) == k+1 b = monomial_basis(sp) @test length(b) == dimension(sp) ...
[ 27, 7856, 261, 480, 29, 39709, 24331, 14, 39709, 24331, 14881, 198, 3500, 6208, 198, 3500, 17084, 24331, 14881, 198, 3500, 17084, 24331, 14881, 13, 10082, 15748, 198, 3500, 17084, 24331, 14881, 13, 9492, 16104, 341, 198, 3500, 36125, 3163...
1.937642
882
using DrWatson using DataFrames using CSV using BSON using ValueHistories # because of vae using GenerativeAD using GenerativeAD.Models using ConditionalDists using GenerativeModels import GenerativeModels: VAE using Distributions using DistributionsAD """ helper functions for two stage models """ function string2di...
[ 3500, 1583, 54, 13506, 198, 3500, 6060, 35439, 198, 3500, 44189, 198, 3500, 347, 11782, 198, 3500, 11052, 13749, 1749, 198, 2, 780, 286, 410, 3609, 198, 3500, 2980, 876, 2885, 198, 3500, 2980, 876, 2885, 13, 5841, 1424, 198, 3500, 972...
2.518201
1,401
# collection functionality for BZ integration. # For now this simply defined the Monkorst-Pack grid (uniform grid in # BZ, due to periodicity, this yields spectral accuracy) # TODO: # * loading of BZ-grid files # * better exploit BZ symmetries? # * high-accuracy adaptive integration? # ================ stora...
[ 198, 2, 4947, 11244, 329, 347, 57, 11812, 13, 198, 2, 1114, 783, 428, 2391, 5447, 262, 28854, 29422, 12, 11869, 10706, 357, 403, 6933, 10706, 287, 198, 2, 347, 57, 11, 2233, 284, 2278, 8467, 11, 428, 19299, 37410, 9922, 8, 198, 2,...
2.339047
2,392
include("density_test.jl") include("height_test.jl") include("expansion_test.jl")
[ 17256, 7203, 43337, 62, 9288, 13, 20362, 4943, 198, 17256, 7203, 17015, 62, 9288, 13, 20362, 4943, 198, 17256, 7203, 11201, 5487, 62, 9288, 13, 20362, 4943 ]
3
27
__precompile__() module PlotRecipes using Reexport @reexport using Plots @reexport using StatPlots include("graphs.jl") include("finance.jl") include("misc.jl") end # module
[ 198, 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 28114, 6690, 18636, 198, 198, 3500, 797, 39344, 198, 31, 631, 87, 634, 1262, 1345, 1747, 198, 31, 631, 87, 634, 1262, 5133, 3646, 1747, 198, 198, 17256, 7203, 34960, 82, 13, 203...
2.753846
65
function nextslice(ind::Tuple{Int64, Int64, Int64}) fromobs, toobs, slicelength = ind sliceend = min(toobs, fromobs + slicelength - 1) if fromobs <= sliceend ((fromobs, sliceend)::Union{Tuple{Int64, Int64}, Nothing}), (sliceend + 1, toobs, slicelength) else nothing, ind end end func...
[ 8818, 1306, 48369, 7, 521, 3712, 51, 29291, 90, 5317, 2414, 11, 2558, 2414, 11, 2558, 2414, 30072, 198, 220, 220, 220, 422, 8158, 11, 284, 8158, 11, 14369, 417, 3286, 796, 773, 198, 220, 220, 220, 16416, 437, 796, 949, 7, 1462, 81...
2.134728
5,448
<filename>src/processing/solution_read.jl<gh_stars>0 """ Liste des paramètres : - sol: l'objet Solution préconstruit et à mettre jour par cette méthode, - filename: chemin du fichier solution à charger Lit un fichier solution au format alp, et effectue les opérations suivantes : - extrait tous les paramètres possibl...
[ 27, 34345, 29, 10677, 14, 36948, 14, 82, 2122, 62, 961, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 8053, 68, 748, 5772, 14064, 83, 411, 1058, 198, 198, 12, 1540, 25, 300, 6, 26801, 316, 28186, 778, 2634, 9979, 4872, ...
2.192148
5,782
using LinkedLists using Test ll = LinkedList(["apple", "pear", "banana"]) state = start(ll) insert!(ll, state, "kiwi") @test first(ll) == "kiwi"
[ 3500, 7502, 276, 43, 1023, 198, 3500, 6208, 198, 198, 297, 796, 7502, 276, 8053, 7, 14692, 18040, 1600, 366, 431, 283, 1600, 366, 3820, 2271, 8973, 8, 198, 5219, 796, 923, 7, 297, 8, 198, 28463, 0, 7, 297, 11, 1181, 11, 366, 410...
2.409836
61
function choleskydec(g::AbstractGraph; kwargs...) matrix, permutation, nb_added_edge = choleskyfact(g) data = Dict("matrix" => matrix, "permutation" => permutation, "nb_added_edge" => nb_added_edge) return SimpleGraph(matrix), data end function sparsity_pattern(g::AbstractGr...
[ 8818, 442, 4316, 2584, 12501, 7, 70, 3712, 23839, 37065, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 17593, 11, 9943, 7094, 11, 299, 65, 62, 29373, 62, 14907, 796, 442, 4316, 2584, 22584, 7, 70, 8, 198, 220, 220, 220, 1366, 796...
2.210762
446
# println("2) Test example for One_Particle_Scaler operator.") configs = [Configuration("1s^2 2s"), Configuration("1s^2 2p")] # Generate a list of relativistic configurations and determine an ordered list of subshells for these configurations relconfList = ConfigurationR[] for conf in configs wa = Basics...
[ 198, 2, 198, 35235, 7203, 17, 8, 6208, 1672, 329, 1881, 62, 7841, 1548, 62, 3351, 36213, 10088, 19570, 198, 198, 11250, 82, 796, 685, 38149, 7203, 16, 82, 61, 17, 362, 82, 12340, 28373, 7203, 16, 82, 61, 17, 362, 79, 4943, 60, 1...
3.03871
465
""" It holds macos and functions usefull for reductions of 3 dimensional data """ module ReductionUtils using ..CUDAGpuUtils, CUDA export @redWitAct, @addAtomic,@addNonAtomic, @redOnlyStepOne,@redOnlyStepThree, @getFromLane """ adapted from https://discourse.julialang.org/t/macro-magic-looping-over-varargs-printing-v...
[ 37811, 198, 1026, 6622, 8352, 418, 290, 5499, 779, 12853, 329, 20691, 286, 513, 38517, 1366, 220, 198, 198, 37811, 198, 21412, 33396, 18274, 4487, 198, 3500, 11485, 34, 8322, 4760, 19944, 18274, 4487, 11, 29369, 5631, 198, 39344, 2488, ...
2.890084
3,439
# Initialize environment in current directory @info("Ensuring example environment instantiated...") import Pkg Pkg.activate(@__DIR__) Pkg.instantiate() @info("Loading Zygote...") using Zygote function f(x) for i = 1:5 x = sin(cos(x)) end return x end function loop(x, n) r = x/x for i = 1:n r *= f(x...
[ 2, 20768, 1096, 2858, 287, 1459, 8619, 198, 31, 10951, 7203, 4834, 82, 870, 1672, 2858, 9113, 12931, 9313, 8, 198, 11748, 350, 10025, 198, 47, 10025, 13, 39022, 7, 31, 834, 34720, 834, 8, 198, 47, 10025, 13, 8625, 415, 9386, 3419, ...
2.338583
254
@testset "Properties" begin atoms = readPDB("./structure.pdb", "protein") @test mass(atoms) ≈ 11079.704440000156 f = formula(select(atoms, "residue < 5")) @test f.formula == [("H", 25), ("C", 19), ("N", 4), ("O", 7), ("S", 1)] @test element.(select(atoms, "residue = 1")) == ["N", "H", "...
[ 31, 9288, 2617, 366, 2964, 18200, 1, 2221, 628, 220, 220, 220, 23235, 796, 1100, 5760, 33, 7, 1911, 14, 301, 5620, 13, 79, 9945, 1600, 366, 48693, 4943, 628, 220, 220, 220, 2488, 9288, 2347, 7, 265, 3150, 8, 15139, 230, 9796, 3720...
1.847771
2,378
<gh_stars>100-1000 @doc raw""" obv(ohlcv; price = :Close, v = :Volume) On Balance Volume # Formula ```math \begin{align*} \text{OBV}_t = \text{OBV_{t - 1} + \begin{cases} \text{volume} & \text{if} P^\text{Close}_t > P^\text{Close}_{t-1} \\ 0 & \text{if} P^\text{Close}_t = P^\text{Close}_{...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 31, 15390, 8246, 37811, 198, 220, 220, 220, 909, 85, 7, 48988, 33967, 26, 2756, 796, 1058, 26125, 11, 410, 796, 1058, 31715, 8, 198, 198, 2202, 22924, 14701, 198, 198, 2, 19639, 198, 1...
2.306102
2,032
<gh_stars>10-100 @testset "SGLD" begin #----------------------- # testing inplace addition #----------------------- function sample_reference!(s::SGLDState,grad::Function) # increment iteration s.t += 1 # improve readability t = s.t x = s.x stepsize = s.s...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 31, 9288, 2617, 366, 50, 8763, 35, 1, 2221, 198, 220, 220, 220, 1303, 19351, 6329, 198, 220, 220, 220, 1303, 4856, 287, 5372, 3090, 198, 220, 220, 220, 1303, 19351, 6329, 198, 220, 220, ...
1.924731
558
using Plots, Test const PLOTS_DEFAULTS = Dict(:theme => :wong2) Plots.__init__() @testset "Loading theme" begin @test plot(1:5)[1][1][:seriescolor] == RGBA(colorant"black") end empty!(PLOTS_DEFAULTS) Plots.__init__()
[ 3500, 1345, 1747, 11, 6208, 198, 198, 9979, 9297, 33472, 62, 7206, 7708, 35342, 796, 360, 713, 7, 25, 43810, 5218, 1058, 86, 506, 17, 8, 198, 3646, 1747, 13, 834, 15003, 834, 3419, 198, 198, 31, 9288, 2617, 366, 19031, 7505, 1, 22...
2.333333
96
<gh_stars>0 @testset "Test utility functions" begin concrete_types = IS.get_all_concrete_subtypes(IS.InfrastructureSystemsType) @test length([x for x in concrete_types if isconcretetype(x)]) == length(concrete_types) end @testset "Test strip_module_name" begin @test IS.strip_module_name("PowerSystems.Hydr...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 31, 9288, 2617, 366, 14402, 10361, 5499, 1, 2221, 198, 220, 220, 220, 10017, 62, 19199, 796, 3180, 13, 1136, 62, 439, 62, 1102, 38669, 62, 7266, 19199, 7, 1797, 13, 18943, 6410, 11964, 82, 603...
2.731818
220
<filename>Projects/Project_01_1D_Interpolation/For_Instructors/julia/lagrange_basis.jl #---------------------------------------------------------------------# #This code computes the Legendre cardinal functions at the Quadrature #points #Written by <NAME> on 4/2000 # Department of Applied Mathematics # ...
[ 27, 34345, 29, 16775, 82, 14, 16775, 62, 486, 62, 16, 35, 62, 9492, 16104, 341, 14, 1890, 62, 43993, 669, 14, 73, 43640, 14, 30909, 9521, 62, 12093, 271, 13, 20362, 198, 2, 10097, 30934, 2, 198, 2, 1212, 2438, 552, 1769, 262, 98...
1.669502
823
<gh_stars>0 # build.jl using ApplicationBuilder build_app_bundle("main.jl", appname="ebit_ode_server");
[ 27, 456, 62, 30783, 29, 15, 198, 2, 1382, 13, 20362, 198, 3500, 15678, 32875, 198, 11249, 62, 1324, 62, 65, 31249, 7203, 12417, 13, 20362, 1600, 598, 3672, 2625, 1765, 270, 62, 1098, 62, 15388, 15341, 198 ]
2.736842
38
<reponame>davidanthoff/Lora.jl ######### multiple distributions ########### using Distributions VECTOR_SIZE = 1000 v = ones(VECTOR_SIZE) function bench(ex::Expr) # ex = :(Weibull(1, 1)) # to get valid intial values, use the mean of the distribution exactMean = eval( :(mean($ex)) ) # some distribs ...
[ 27, 7856, 261, 480, 29, 67, 8490, 29313, 2364, 14, 43, 5799, 13, 20362, 198, 7804, 2, 3294, 24570, 220, 1303, 7804, 2235, 198, 3500, 46567, 507, 198, 198, 53, 9782, 1581, 62, 33489, 796, 8576, 198, 85, 796, 3392, 7, 53, 9782, 1581...
1.964722
737
## Algebraic identities function mult_zeros(a, b::AbstractMatrix) size(a, 2) ≠ size(b, 1) && throw(DimensionMismatch("Incompatible matrix multiplication dimensions")) return Zeros{promote_type(eltype(a), eltype(b))}(size(a, 1), size(b, 2)) end function mult_zeros(a, b::AbstractVector) size(a, 2) ≠ ...
[ 2235, 978, 29230, 291, 18413, 198, 198, 8818, 1963, 62, 9107, 418, 7, 64, 11, 275, 3712, 23839, 46912, 8, 198, 220, 220, 220, 2546, 7, 64, 11, 362, 8, 15139, 254, 2546, 7, 65, 11, 352, 8, 11405, 198, 220, 220, 220, 220, 220, 2...
2.316138
1,512
# Packages used in this chapter # To check for installed packages in V1.0 we now need to use the PKG API using Pkg ipks = Pkg.installed() pkgs = ["BenchmarkTools","MacroTools", "Lazy"] for p in pkgs !haskey(ipks,p) && Pkg.add(p) end # We can define these here or as required using BenchmarkTools, MacroTools, Lazy...
[ 198, 2, 6400, 1095, 973, 287, 428, 6843, 198, 2, 1675, 2198, 329, 6589, 10392, 287, 569, 16, 13, 15, 356, 783, 761, 284, 779, 262, 29673, 38, 7824, 198, 198, 3500, 350, 10025, 198, 541, 591, 796, 350, 10025, 13, 37050, 3419, 198, ...
2.2775
5,791
<reponame>jona125/REALMSupport.jl using Images, StaticArrays, LinearAlgebra, Statistics using FileIO, ProgressMeter, Printf, ImageSegmentation #using Plots, ImageView include("psf_fun.jl") include("s_save_image.jl") include("filter.jl") include("psf_analyze.jl") include("beadstest.jl") THRESHOLD = 7 print("Disk labe...
[ 27, 7856, 261, 480, 29, 73, 4450, 11623, 14, 2200, 1847, 44, 15514, 13, 20362, 198, 3500, 5382, 11, 36125, 3163, 20477, 11, 44800, 2348, 29230, 11, 14370, 198, 3500, 9220, 9399, 11, 18387, 44, 2357, 11, 12578, 69, 11, 7412, 41030, 1...
2.401487
807
include("unit_tests/unit_tests.jl")
[ 17256, 7203, 20850, 62, 41989, 14, 20850, 62, 41989, 13, 20362, 4943, 198 ]
2.769231
13
# Model include_model("hopper") # Dimensions nq = 4 # configuration dimension nu = 2 # control dimension nc = 1 # number of contact points nf = 2 # number of faces for friction cone nb = nc * nf ns = nq # Parameters g = 9.81 # gravity μ = 1.0 # coefficient of friction mb = 10.0 # body mass ml = 1.0 # leg mass Jb = ...
[ 2, 9104, 198, 17256, 62, 19849, 7203, 8873, 2848, 4943, 198, 198, 2, 41265, 198, 77, 80, 796, 604, 1303, 8398, 15793, 198, 28803, 796, 362, 1303, 1630, 15793, 198, 10782, 796, 352, 1303, 1271, 286, 2800, 2173, 198, 77, 69, 796, 362,...
1.889404
3,879
############################################################################# # Joulia # A Large-Scale Spatial Power System Model for Julia # See https://github.com/JuliaEnergy/Joulia.jl ############################################################################# # This file contains functions and structs for renewabl...
[ 29113, 29113, 7804, 4242, 2, 198, 2, 449, 2852, 544, 198, 2, 317, 13601, 12, 29990, 1338, 34961, 4333, 4482, 9104, 329, 22300, 198, 2, 4091, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 28925, 14, 41, 2852, 544, 13, 20362, 198, 29113...
2.546379
787
<reponame>UnofficialJuliaMirrorSnapshots/TensorToolbox.jl-9c690861-8ade-587a-897e-15364bc6f718<filename>src/TTtensor.jl #using TensorToolbox export TTtensor, randTTtensor, innerprod, ewprod, full, minus, mtimes, mtimes!, ndims, plus export reorth, reorth!, size, TTrank, TTsvd, TTtv, norm mutable struct TTtensor cor...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 51, 22854, 25391, 3524, 13, 20362, 12, 24, 66, 3388, 2919, 5333, 12, 23, 671, 12, 44617, 64, 12, 4531, 22, 68, 12, 21395, 2414, 15630, 21, 69, 45720, ...
1.738033
9,150
export CircularArrayBuffer, capacity, isfull, consecutive_view, select_frame mutable struct CircularArrayBuffer{T,N} <: AbstractArray{T,N} buffer::Array{T,N} first::Int length::Int step_size::Int function CircularArrayBuffer{T}(d::Integer...) where {T} N = length(d) N > 0 || throw(...
[ 39344, 7672, 934, 19182, 28632, 11, 5339, 11, 318, 12853, 11, 12785, 62, 1177, 11, 2922, 62, 14535, 198, 198, 76, 18187, 2878, 7672, 934, 19182, 28632, 90, 51, 11, 45, 92, 1279, 25, 27741, 19182, 90, 51, 11, 45, 92, 198, 220, 220,...
2.363595
2,203
<filename>test/runtests.jl using BLG_Fraunhofers using Test @testset "BLG_Fraunhofers.jl" begin # Write your tests here. end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 9878, 38, 62, 49562, 403, 39891, 364, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 9148, 38, 62, 49562, 403, 39891, 364, 13, 20362, 1, 2221, 198, 220, 220, 220, 130...
2.5
52
<reponame>domluna/Butterfly.jl type CharLoader filepath::AbstractString cur_id::Int data::AbstractString chars::Set{Char} id2char::Dict{Int,Char} char2id::Dict{Char, Int} end function CharLoader(filepath) data = readstring(filepath) chars = Set(data) id2char = Dict(i=>c for (i,c) in...
[ 27, 7856, 261, 480, 29, 3438, 75, 9613, 14, 1537, 353, 12254, 13, 20362, 198, 4906, 3178, 17401, 198, 220, 220, 220, 2393, 6978, 3712, 23839, 10100, 198, 220, 220, 220, 1090, 62, 312, 3712, 5317, 198, 220, 220, 220, 1366, 3712, 2383...
2.20983
529
<reponame>gottacatchenall/SimpleSDMLayers.jl module SSLTestGBIF using SimpleSDMLayers using GBIF using Test temperature = worldclim(1) kingfisher = GBIF.taxon("Megaceryle alcyon", strict=true) o = GBIF.occurrences(kingfisher, "hasCoordinate" => "true") # Extract from a single record for oc in o @test typeof(tem...
[ 27, 7856, 261, 480, 29, 70, 1252, 330, 265, 6607, 439, 14, 26437, 10305, 5805, 6962, 13, 20362, 198, 21412, 25952, 14402, 38, 3483, 37, 198, 3500, 17427, 10305, 5805, 6962, 198, 3500, 402, 3483, 37, 198, 3500, 6208, 198, 198, 11498, ...
2.556522
230
<reponame>UnofficialJuliaMirrorSnapshots/NeRCA.jl-89b7c20c-a96a-11e9-35df-35fba0891eb2 using NeRCA using Plots using LinearAlgebra using Optim using JuMP using GLPK using Ipopt const n = 1.35 const c = 2.99792458e8 / 1e9 struct SingleDUTrack distance t_closest z_closest dir_z t₀ end function sing...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 8199, 7397, 32, 13, 20362, 12, 4531, 65, 22, 66, 1238, 66, 12, 64, 4846, 64, 12, 1157, 68, 24, 12, 2327, 7568, 12, 2327, 69, 7012, 2919, 6420, 1765, ...
2.045879
1,177
<gh_stars>1-10 using SafeTestsets @safetestset "Likelihood" begin cd(@__DIR__) using Pkg Pkg.activate("../") using Test, ACTRModels, Distributions, FFTDists include("../models/Semantic_FFT/Semantic_FFT_Model.jl") include("../models/Semantic_FFT/model_functions.jl") Random.seed!(44154) #...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 19978, 51, 3558, 1039, 198, 198, 31, 49585, 316, 395, 2617, 366, 7594, 11935, 1, 2221, 198, 220, 220, 220, 22927, 7, 31, 834, 34720, 834, 8, 198, 220, 220, 220, 1262, 350, 10025, 1...
2.376697
2,652
include("cpu.jl") c = CPU([1,0,0,0,0,0]) p = read_program("inputs/19.txt") ips = [] function part_2()::CPU c = CPU([1,0,0,0,0,0]) while true #push!(ips, c.registers[p.ip+1]) try ins = p.lines[c.registers[p.ip+1]] @fastmath run_instruction(c, ins) @fastmath ...
[ 17256, 7203, 36166, 13, 20362, 4943, 198, 198, 66, 796, 9135, 26933, 16, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 12962, 198, 198, 79, 796, 1100, 62, 23065, 7203, 15414, 82, 14, 1129, 13, 14116, 4943, 198, 198, 2419, 796, 17635, ...
1.802251
622
# Removing outliers using a StatisticalOutlierRemoval filter # http://www.pointclouds.org/documentation/tutorials/statistical_outlier.php using PCLCommon using PCLIO using PCLFilters using PCLVisualization pcd_file = Pkg.dir("PCLIO", "test", "data", "table_scene_lms400.pcd") cloud = PointCloud{PointXYZ}(pcd_file) clo...
[ 2, 3982, 5165, 41528, 3183, 1262, 257, 34931, 7975, 2505, 8413, 8325, 8106, 198, 2, 2638, 1378, 2503, 13, 4122, 17721, 82, 13, 2398, 14, 22897, 341, 14, 83, 44917, 82, 14, 14269, 19929, 62, 448, 2505, 13, 10121, 198, 198, 3500, 4217...
2.802703
370
<reponame>disberd/SatelliteToolbox.jl<gh_stars>100-1000 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Description # ============================================================================== # # Miscellaneous functions for the functions of IAU-2006 theory. # # # # # # # # # #...
[ 27, 7856, 261, 480, 29, 6381, 527, 67, 14, 50, 26493, 25391, 3524, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 130...
1.89991
1,109
<filename>src/data/regression/insurance-company-benchmark.jl<gh_stars>10-100 using DataDeps register(DataDep( "insurance-company-benchmark", "https://archive.ics.uci.edu/ml/datasets/Insurance+Company+Benchmark+%28COIL+2000%29", "https://archive.ics.uci.edu/ml/machine-learning-databases/tic-mld/ticdata2000.txt", ...
[ 27, 34345, 29, 10677, 14, 7890, 14, 2301, 2234, 14, 1040, 3874, 12, 39722, 12, 26968, 4102, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6060, 12156, 82, 198, 198, 30238, 7, 6601, 12156, 7, 198, 220, 366, 1040, 387...
2.221774
248
push!(LOAD_PATH,joinpath(@__DIR__, "../src")) using Documenter, InstrumentOperator, Literate, Plots using DocumenterTools: Themes using Pkg Pkg.add(url="https://github.com/RadiativeTransfer/RadiativeTransfer.jl") push!(LOAD_PATH,"./src/") ENV["GKSwstype"] = "nul" function build() tutorials = ["CrossSection_conv...
[ 14689, 0, 7, 35613, 62, 34219, 11, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 40720, 10677, 48774, 198, 198, 3500, 16854, 263, 11, 42410, 18843, 1352, 11, 17667, 378, 11, 1345, 1747, 198, 3500, 16854, 263, 33637, 25, 383, 6880, 1...
2.320965
1,078
using Test using SWIP using Distributions function testintervention() # Normally distributed random variable with id 1 x = 1 ~ ω -> Normal(ω, 0, 1) # Normally distributed random variable with id 2 and x as mean y = 2 ~ (ω -> Normal(ω, x(ω), 1)) <| (x,) x_ = 0.1 y_ = 0.3 # An omega object -- like a tr...
[ 3500, 6208, 198, 3500, 12672, 4061, 198, 3500, 46567, 507, 198, 198, 8818, 1332, 3849, 4018, 3419, 198, 220, 1303, 29282, 9387, 4738, 7885, 351, 4686, 352, 198, 220, 2124, 796, 352, 5299, 18074, 231, 4613, 14435, 7, 49535, 11, 657, 11...
2.358974
390
using Documenter, ABC makedocs( format = :html, sitename = "ABC.jl", modules = [ABC], # doctest = true, # clean = false, pages = [ "index.md", "page1.md", ], html_prettyurls = !("local" in ARGS) ) deploydocs( repo = "github.com/eford/ABC.jl.git", julia = "0.6", ...
[ 3500, 16854, 263, 11, 9738, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 5794, 796, 1058, 6494, 11, 198, 220, 220, 220, 1650, 12453, 796, 366, 24694, 13, 20362, 1600, 198, 220, 220, 220, 13103, 796, 685, 24694, 4357, 198, 2...
2.047872
188
# Global enable of performance counters # # See: Section 18.2 (Architectural Performance Monitoring) of Volume 3 of the Software Developer's Guide, as well as in Chapter 35 const IA32_PERF_GLOBAL_CTRL_MSR = IndexZero(0x38f) const IA32_FIXED_CTR_CTRL_MSR = IndexZero(0x38D) # MSR for programming programable performance ...
[ 2, 8060, 7139, 286, 2854, 21154, 198, 2, 198, 2, 4091, 25, 7275, 1248, 13, 17, 357, 19895, 5712, 1523, 15193, 37484, 8, 286, 14701, 513, 286, 262, 10442, 23836, 338, 10005, 11, 355, 880, 355, 287, 7006, 3439, 198, 9979, 35229, 2624,...
2.669872
624
<gh_stars>1-10 """ Simple container representing a task in a taskgraph. """ struct TaskgraphNode "The name of this task." name::String metadata::Dict{String,Any} # Constructor TaskgraphNode(name; metadata = emptymeta()) = new(name, metadata) end """ Simple container representing an edge in a taskg...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 26437, 9290, 10200, 257, 4876, 287, 257, 4876, 34960, 13, 198, 37811, 198, 7249, 15941, 34960, 19667, 198, 220, 220, 220, 366, 464, 1438, 286, 428, 4876, 526, 198, 220, 220, 220,...
2.639768
3,098
using MagneticResonanceSignals using AxisArrays using Test using Unitful # UUGH. See the improvements at https://github.com/JuliaArrays/AxisArrays.jl/pull/152 getaxis(samples, name) = AxisArrays.axes(samples, Axis{name}).val @testset "MagneticResonanceSignals" begin include("core.jl") include("mr_load.jl") include("...
[ 3500, 44629, 4965, 261, 590, 11712, 874, 198, 3500, 38349, 3163, 20477, 198, 3500, 6208, 198, 3500, 11801, 913, 198, 198, 2, 471, 44004, 13, 4091, 262, 8561, 379, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 3163, 20477, 14, 31554, 271...
2.717514
177
<gh_stars>0 using Base.Test using DataFrames let #test_group("Confirm that we can read various file types.") filenames = ["test/data/blanklines/blanklines.csv", "test/data/compressed/movies.csv.gz", "test/data/newlines/os9.csv", "test/data/newlines/osx.csv", ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 7308, 13, 14402, 198, 3500, 6060, 35439, 198, 198, 1616, 198, 220, 220, 220, 1303, 9288, 62, 8094, 7203, 18546, 2533, 326, 356, 460, 1100, 2972, 2393, 3858, 19570, 628, 220, 220, 220, 1226, 268...
2.129032
1,488
#!/usr/bin/env julia using Distributed using MIToS.Utils.Scripts using MIToS Args = parse_commandline( ["--format", "-f"], Dict( :help => "Format of the MSA: Stockholm, Raw or FASTA", :arg_type => String, :default => "Stockholm" ), ["--exact", "-e"], Dict( :help => "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 3500, 4307, 6169, 198, 3500, 17168, 34049, 13, 18274, 4487, 13, 7391, 82, 198, 3500, 17168, 34049, 198, 198, 42035, 796, 21136, 62, 21812, 1370, 7, 198, 220, 220, 220, 14631, 438,...
2.340058
1,735
<reponame>UnofficialJuliaMirror/MultivariateMoments.jl-f4abf1af-0426-5881-a0da-e2f168889b5e @testset "SymMatrix" begin Q = SymMatrix([1, 2, 3], 2) symmetric_setindex!(Q, 4, 1, 1) @test Q.Q == [4, 2, 3] symmetric_setindex!(Q, 5, 1, 2) @test Q.Q == [4, 5, 3] symmetric_setindex!(Q, 6, 2, 2) @te...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 15205, 42524, 29252, 658, 13, 20362, 12, 69, 19, 397, 69, 16, 1878, 12, 3023, 2075, 12, 3365, 6659, 12, 64, 15, 6814, 12, 68, 17, 69, 1433, 3459, 4531, 65, 20, 68...
1.91923
3,739
<filename>src/h_file.jl #= Converts requests for files in certain folders and subfolders into responses. May pick the right folder based on request extension. Generates index.html on request. =# # defines MIMETYPES include("mimetypes.jl") "Root of LOCFLDRS" const FOLDERHOME = replace(joinpath(@__DIR__, "..", "assets") ...
[ 27, 34345, 29, 10677, 14, 71, 62, 7753, 13, 20362, 198, 2, 28, 198, 3103, 24040, 7007, 329, 3696, 287, 1728, 24512, 290, 850, 11379, 364, 656, 9109, 13, 198, 6747, 2298, 262, 826, 9483, 1912, 319, 2581, 7552, 13, 198, 8645, 689, 6...
2.128929
4,390
<filename>src/negbinfit.jl function mle_for_θ(y::AbstractVector, μ::AbstractVector, wts::AbstractVector; maxiter=30, tol=1.e-6) function first_derivative(θ::Real) tmp(yi, μi) = (yi+θ)/(μi+θ) + log(μi+θ) - 1 - log(θ) - digamma(θ+yi) + digamma(θ) unit_weights ? sum(tmp(yi, μi) for (...
[ 27, 34345, 29, 10677, 14, 12480, 8800, 11147, 13, 20362, 198, 8818, 285, 293, 62, 1640, 62, 138, 116, 7, 88, 3712, 23839, 38469, 11, 18919, 3712, 23839, 38469, 11, 266, 912, 3712, 23839, 38469, 26, 198, 220, 220, 220, 220, 220, 220,...
1.974249
2,563
<filename>test/runtests.jl using Test using RenderJay this_fn = @__FILE__ this_folder, _ = splitdir(this_fn) scene_fn = joinpath(this_folder, "testplot_little_cornellboxes.xml") println("Reading data...") assets, geometries, palettes, geometry_bvhs, scene_bvh, skymap, camera = read_scene(scene_fn) coords = create_c...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 198, 3500, 6208, 198, 198, 3500, 46722, 30568, 198, 198, 5661, 62, 22184, 796, 2488, 834, 25664, 834, 198, 5661, 62, 43551, 11, 4808, 796, 6626, 15908, 7, 5661, 62, 22184, 8, ...
2.736842
190
<reponame>mfkiwl/Ferrite.jl # # Incompressible Elasticity # #md # !!! tip #md # This example is also available as a Jupyter notebook: #md # [`incompressible_elasticity.ipynb`](@__NBVIEWER_ROOT_URL__/examples/incompressible_elasticity.ipynb) # ## Introduction # # Mixed elements can be used to overcome locking w...
[ 27, 7856, 261, 480, 29, 76, 69, 4106, 40989, 14, 43362, 6525, 13, 20362, 198, 2, 1303, 554, 5589, 601, 856, 48567, 414, 198, 2, 198, 2, 9132, 1303, 220, 10185, 8171, 198, 2, 9132, 1303, 220, 220, 220, 220, 770, 1672, 318, 635, 1...
2.350313
3,671
<filename>test/misc/partition_functions.jl # This file is part of Kpax3. License is MIT. # TODO: test normalizepartition, modifypartition, modifymerge, modifysplit, # modifyscramble function test_partition_functions_initializepartition() ifile = "data/read_proper_aa.fasta" ofile = "../build/test" setting...
[ 27, 34345, 29, 9288, 14, 44374, 14, 3911, 653, 62, 12543, 2733, 13, 20362, 198, 2, 770, 2393, 318, 636, 286, 509, 79, 897, 18, 13, 13789, 318, 17168, 13, 198, 198, 2, 16926, 46, 25, 1332, 3487, 528, 538, 433, 653, 11, 13096, 391...
2.260985
751
struct AirType <: AbstractGlass end Base.show(io::IO, ::AirType) = print(io, "Air") glassid(::AirType) = GlassID(AIR, 0) glassname(::AirType) = "GlassCat.Air" isair(::AirType) = true isair(::AbstractGlass) = false isair(a::GlassID) = a.type === AIR function info(io::IO, ::AirType) println(io, "GlassCat.Air") ...
[ 7249, 3701, 6030, 1279, 25, 27741, 47698, 886, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 7904, 16170, 6030, 8, 796, 3601, 7, 952, 11, 366, 16170, 4943, 198, 20721, 312, 7, 3712, 16170, 6030, 8, 796, 12158, 2389, 7, 42149, 11, ...
3.104478
201
<gh_stars>0 # ~~ Type to set\get data along a band struct Band i::Int end show(io::IO, r::Band) = print(io, "Band(", r.i, ")") """ band(i) Represents the `i`-th band of a banded matrix. ```jldoctest julia> using BandedMatrices julia> A = BandedMatrix(Ones(5,5),(1,1)) 5×5 BandedMatrix{Float64,Array{Float64,...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 220, 4907, 5994, 284, 900, 59, 1136, 1366, 1863, 257, 4097, 198, 7249, 10243, 198, 220, 220, 220, 1312, 3712, 5317, 198, 437, 198, 198, 12860, 7, 952, 3712, 9399, 11, 374, 3712, 31407, 8, 796, ...
2.09098
2,561
@testset "display_obj.jl" begin label = DS.Label("我是字串", [3, 5]) DS.render(label) @test T.read_stream(T.out_stream) == "\e[32m\e[3;5H我是字串\e[0m" label = DS.Label("我是字串", [3, 5], style=Crayon(foreground=:blue, bold=true)) DS.render(label) @test T.read_stream(T.out_stream) == "\e[34;1m\e[3;5H我是字串\...
[ 31, 9288, 2617, 366, 13812, 62, 26801, 13, 20362, 1, 2221, 198, 220, 220, 220, 6167, 796, 17400, 13, 33986, 7203, 22755, 239, 42468, 27764, 245, 10310, 110, 1600, 685, 18, 11, 642, 12962, 198, 220, 220, 220, 17400, 13, 13287, 7, 182...
1.485785
809