content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>lucifer1004/Pluto.jl ### A Pluto.jl notebook ### # v0.16.4 using Markdown using InteractiveUtils # ╔═╡ f7dfc33e-6ff8-44d6-a88e-bea5834a9d27 import A1 using A2 # ╔═╡ 360ee541-cbc4-4df6-bdc5-ea23fe08abdd import A1, B1, .C1, D1.E1 using A2, B2, .C2, D2.E2 # ╔═╡ 8a4eff2d-5dbc-4056-a81b-da0618503467 import A1:...
[ 27, 7856, 261, 480, 29, 75, 1229, 7087, 3064, 19, 14, 3646, 9390, 13, 20362, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1433, 13, 19, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, ...
1.449944
889
<reponame>memetics19/My_julia_practice-<gh_stars>1-10 #= Author:= <NAME> License:= MIT UTF-8 =# #= In Julia the for loop is simple, Unlike python, matlab it won't use vectorized code. `for.....end` =# println("***********************1st Example*************************") for num = 1:10 # here the colon is u...
[ 27, 7856, 261, 480, 29, 11883, 14596, 1129, 14, 3666, 62, 73, 43640, 62, 39541, 12, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 1303, 28, 198, 13838, 25, 28, 1279, 20608, 29, 198, 34156, 25, 28, 17168, 220, 198, 48504, 12, 23, 796...
2.868952
496
<reponame>joehuchette/Justitia.jl<gh_stars>1-10 """ Subtypes are different approaches for solving an optimization problem. We use "approach" to mean a configured algorithm: that is, the algorithm (e.g. simplex), along with fixed values for all the algorithm hyperparemeters. """ abstract type AbstractApproach end """ S...
[ 27, 7856, 261, 480, 29, 73, 2577, 71, 1229, 3202, 660, 14, 5703, 36723, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 7004, 19199, 389, 1180, 10581, 329, 18120, 281, 23989, 1917, 13, 775, 779, 198, 1, 21064, 620...
3.924658
876
<gh_stars>0 # UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. using UnitCommitment, Test, LinearAlgebra @testset "Sensitivity" begin @tests...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 11801, 6935, 270, 434, 13, 20362, 25, 30011, 1634, 15717, 329, 4765, 12, 3103, 2536, 1328, 11801, 35910, 434, 198, 2, 15069, 357, 34, 8, 12131, 11, 471, 25705, 49974, 710, 11, 11419, 13, 1439, 2...
1.627155
3,712
# Winston: using Winston # optionally call figure prior to plotting to set the size figure(width=600, height=400) # plot some data pl = plot(cumsum(rand(500) - 0.5), "r", cumsum(rand(500) - 0.5), "b") # display the plot (not done automatically!) display(pl) println("Press enter to continue: ") readline(STDIN) # save th...
[ 2, 21400, 25, 198, 3500, 21400, 198, 2, 42976, 869, 3785, 3161, 284, 29353, 284, 900, 262, 2546, 198, 26875, 7, 10394, 28, 8054, 11, 6001, 28, 7029, 8, 198, 2, 7110, 617, 1366, 198, 489, 796, 7110, 7, 66, 5700, 388, 7, 25192, 7,...
3.016807
119
<filename>src/julia/Audio/music.jl type Music ptr::Ptr{Void} function Music(ptr::Ptr{Void}) m = new(ptr) finalizer(m, destroy) m end end function Music(filename::AbstractString) Music(ccall((:sfMusic_createFromFile, libcsfml_audio), Ptr{Void}, (Ptr{Cchar},), filename)) end fun...
[ 27, 34345, 29, 10677, 14, 73, 43640, 14, 21206, 14, 28965, 13, 20362, 198, 4906, 7849, 198, 220, 220, 220, 50116, 3712, 46745, 90, 53, 1868, 92, 628, 220, 220, 220, 2163, 7849, 7, 20692, 3712, 46745, 90, 53, 1868, 30072, 198, 220, ...
2.544471
832
<reponame>Joel-Dahne/ArbExtras.jl<gh_stars>1-10 """ bounded_by(f, a::Arf, b::Arf, C::Arf; degree, abs_value, log_bisection, depth_start, maxevals, depth, threaded, verbose) Return `true` if the function `f` can be shown to be bounded by `C` on the interval `[a, b]`, i.e. `f(x) <= C` for all `x ∈ [a, b]`, otherwise...
[ 27, 7856, 261, 480, 29, 9908, 417, 12, 35, 993, 710, 14, 3163, 65, 11627, 8847, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 49948, 62, 1525, 7, 69, 11, 257, 3712, 3163, 69, 11, 275, 3712, 31...
2.514779
2,199
<gh_stars>10-100 using Revise using POMDPModelChecking using POMDPs using POMDPModels using POMDPSimulators using BeliefUpdaters using QMDP using SARSOP using POMCPOW pomdp = TigerPOMDP() function POMDPModelChecking.labels(pomdp::TigerPOMDP, s::Bool, a::Int64) if (a == 1 && s) || (a == 2 && !s) ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 5416, 786, 201, 198, 3500, 350, 2662, 6322, 17633, 9787, 278, 201, 198, 3500, 350, 2662, 6322, 82, 201, 198, 3500, 350, 2662, 6322, 5841, 1424, 201, 198, 3500, 350, 2662, 35, 3705, ...
2.118077
1,643
<gh_stars>1-10 #------------------------------------------------------------------- #* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. #* #* This LIBRARY is free software; you can distribute it and/or modify #* it under the therms of the ALSOC FREE LICENSE as available at #* http://www.enq.ufrgs.br/alsoc. #* ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 10097, 6329, 198, 2, 9, 41363, 46, 9104, 10074, 357, 3620, 43, 8, 15069, 357, 34, 8, 5472, 532, 4343, 27249, 4503, 13, 198, 2, 9, 198, 2, 9, 770, 45651, 49, 13153, 318, 1479, 3788, ...
2.500525
2,855
<filename>test/packages/DocumentedCode/src/organized_folder/v_func.jl """ v_func() Lorem ipsum dolor sit amet. """ function v_func() 9 end """ v_func(cur_obj::GType) Lorem ipsum dolor sit amet. """ function v_func(cur_obj::GType) 8 end """ v_func(cur_obj::AType) Lorem ipsum dolor sit amet. """ func...
[ 27, 34345, 29, 9288, 14, 43789, 14, 35, 17664, 10669, 14, 10677, 14, 30280, 62, 43551, 14, 85, 62, 20786, 13, 20362, 198, 37811, 198, 220, 220, 220, 410, 62, 20786, 3419, 198, 198, 43, 29625, 220, 2419, 388, 288, 45621, 1650, 716, ...
2.21118
161
<reponame>giordano/DataScienceTutorials.jl<gh_stars>0 # Before running this, please make sure to activate and instantiate the environment # corresponding to [this `Project.toml`](https://raw.githubusercontent.com/alan-turing-institute/DataScienceTutorials.jl/master/Project.toml) and [this `Manifest.toml`](https://raw.g...
[ 27, 7856, 261, 480, 29, 12397, 585, 5733, 14, 6601, 26959, 51, 44917, 82, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 7413, 2491, 428, 11, 3387, 787, 1654, 284, 15155, 290, 9113, 9386, 262, 2858, 198, 2, 11188, 284, 685, 5661, ...
2.950645
1,783
# benchmarks of reduction on views using NumericExtensions const a = rand(1000, 1000) const a_sub = sub(a, 1:999, :) const a_view = view(a, 1:999, :) println("for sum:") for dim = 1:2 # warmup sum(a_sub, dim) sum(a_view, dim) # profile et1 = @elapsed for i=1:100; sum(a_sub, dim); end et2 = ...
[ 2, 31747, 286, 7741, 319, 5009, 198, 198, 3500, 399, 39223, 11627, 5736, 198, 198, 9979, 257, 796, 43720, 7, 12825, 11, 8576, 8, 198, 198, 9979, 257, 62, 7266, 796, 850, 7, 64, 11, 352, 25, 17032, 11, 14373, 198, 9979, 257, 62, ...
2.041262
412
<reponame>raphaelpanta/julia-lang-exemplos include("..\\src\\introducao.jl") module IntroducaoTeste include("error_handler_pt_br.jl") end using Base.Test import Introducao Test.with_handler(custom_handler) do @test soma(1,2) == 2 end
[ 27, 7856, 261, 480, 29, 1470, 3010, 79, 4910, 14, 73, 43640, 12, 17204, 12, 1069, 18856, 418, 198, 17256, 7203, 492, 6852, 10677, 6852, 27427, 66, 5488, 13, 20362, 4943, 198, 198, 21412, 11036, 66, 5488, 14402, 68, 198, 220, 2291, 7...
2.520833
96
module Node mutable struct node mass radius position velocity end export node end
[ 21412, 19081, 198, 198, 76, 18187, 2878, 10139, 198, 220, 220, 220, 2347, 198, 220, 220, 220, 16874, 198, 220, 220, 220, 2292, 198, 220, 220, 220, 15432, 198, 437, 198, 198, 39344, 10139, 198, 437, 198 ]
2.702703
37
<gh_stars>1-10 using RCall, MixedModels, Test using StatsBase: zscore const LMM = LinearMixedModel const GLMM = GeneralizedLinearMixedModel @testset "merMod" begin # this is available in MixedModels.dataset(:sleepstudy) but with different # capitalization than in R sleepstudy = rcopy(R"sleepstudy") jlm...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 13987, 439, 11, 35250, 5841, 1424, 11, 6208, 198, 3500, 20595, 14881, 25, 1976, 26675, 198, 9979, 406, 12038, 796, 44800, 44, 2966, 17633, 198, 9979, 10188, 12038, 796, 3611, 1143, 14993...
2.526316
247
<filename>basics.jl println(Sys.WORD_SIZE) println("typeof(1): $(typeof(1))") println("zero: $(zero(Float64))") println("zero: $(one(Float64))") for T in [Int8,Int16,Int32,Int64,Int128,UInt8,UInt16,UInt32,UInt64,UInt128] println("$(lpad(T,7)): [$(typemin(T)),$(typemax(T))]") end x = [1,2,3] .^ 3 println("vector...
[ 27, 34345, 29, 12093, 873, 13, 20362, 198, 198, 35235, 7, 44387, 13, 54, 12532, 62, 33489, 8, 198, 198, 35235, 7203, 4906, 1659, 7, 16, 2599, 29568, 4906, 1659, 7, 16, 4008, 4943, 198, 35235, 7203, 22570, 25, 29568, 22570, 7, 43879,...
2.413509
1,821
""" readMapFromFITS{T <: Number}(f::FITSIO.FITSFILE, column, t::Type{T}) readMapFromFITS{T <: Number}(fileName::String, column, t::Type{T}) Read a Healpix map from the specified (1-base indexed) column in a FITS file. The values will be read as numbers of type T. If the code fails, FITSIO will raise an excepti...
[ 37811, 198, 220, 220, 220, 1100, 13912, 4863, 37, 29722, 90, 51, 1279, 25, 7913, 92, 7, 69, 3712, 37, 29722, 9399, 13, 37, 29722, 25664, 11, 5721, 11, 256, 3712, 6030, 90, 51, 30072, 198, 220, 220, 220, 1100, 13912, 4863, 37, 2972...
2.141118
2,218
""" Bridges `CP.Reification{MOI.EqualTo}` to indicator constraints, both with equality and inequalities (CP.DifferentFrom). """ struct ReificationEqualTo2IndicatorBridge{T <: Real} <: MOIBC.AbstractBridge indic_true::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ONE, MOI.EqualTo{T}}...
[ 37811, 198, 33, 32124, 4600, 8697, 13, 3041, 2649, 90, 11770, 40, 13, 36, 13255, 2514, 92, 63, 284, 16916, 17778, 11, 1111, 351, 10537, 198, 392, 45460, 357, 8697, 13, 40341, 4863, 737, 198, 37811, 198, 7249, 797, 2649, 36, 13255, 2...
2.239366
1,387
module SizeInterlacedTest using SimplePNGs using Test include("common.jl") using .TestCommon: load_json pl(name) = SimplePNGs.load(joinpath("PngSuite", name*".png")) @testset "Size test files" begin @testset "1x1 paletted file, interlaced" begin img1 = load_json("s01n3p01") img2 = pl("s01i3p01") ...
[ 21412, 12849, 9492, 75, 2286, 14402, 198, 3500, 17427, 47, 10503, 82, 198, 3500, 6208, 198, 198, 17256, 7203, 11321, 13, 20362, 4943, 198, 3500, 764, 14402, 17227, 25, 3440, 62, 17752, 198, 198, 489, 7, 3672, 8, 796, 17427, 47, 10503,...
1.900126
1,592
using Dates @testset "util.jl" begin p1 = DDR2import.util.Point(1.0, 2.0) @test p1.lat == 1.0 @test p1.lon == 2.0 @test DDR2import.util.extract_lat("S123456") ≈ -12.58222222 atol = 0.0001 @test DDR2import.util.extract_lat("N123456.0") ≈ 12.58222222 atol = 0.0001 @test DDR2import.util.extract_l...
[ 3500, 44712, 198, 198, 31, 9288, 2617, 366, 22602, 13, 20362, 1, 2221, 198, 220, 220, 220, 279, 16, 796, 30085, 17, 11748, 13, 22602, 13, 12727, 7, 16, 13, 15, 11, 362, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 279, 16, 13, 1...
2.238095
1,470
<reponame>tpr0p/Altro.jl ############################################################################################ # INFEASIBLE MODELS # ############################################################################################ struct Infeasib...
[ 27, 7856, 261, 480, 29, 83, 1050, 15, 79, 14, 2348, 23528, 13, 20362, 198, 198, 29113, 29113, 14468, 7804, 4242, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.243124
2,727
module GatekeepHelperFlagSummitGem using ..Ahorn, Maple # Thanks to Communal Helper for most of this implementation @mapdef Entity "GatekeepHelper/FlagSummitGem" FlagSummitGem( x::Integer, y::Integer, index::Integer=0, sprite::String="", flag::String="", particleColor::String="", ) const pla...
[ 21412, 12816, 14894, 47429, 34227, 13065, 2781, 38, 368, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 2, 6930, 284, 4440, 282, 5053, 525, 329, 749, 286, 428, 7822, 198, 198, 31, 8899, 4299, 20885, 366, 22628, 14894, 47429, ...
2.581498
454
<gh_stars>0 coast(region=[110 140 20 35], proj=(name=:Albers, center=[125 20], parallels=[25 45]), frame=:ag, resolution=:low, area=250, land=:green, shore=:thinnest, fmt=:png, savefig="1") coast(region=[-88 -70 18 24], proj=(name=:eqdc, center=[-79 21], parallels=[19 23]), ...
[ 27, 456, 62, 30783, 29, 15, 198, 1073, 459, 7, 36996, 41888, 11442, 12713, 1160, 3439, 4357, 220, 198, 220, 220, 220, 220, 220, 386, 73, 16193, 3672, 28, 25, 2348, 1213, 11, 3641, 41888, 11623, 1160, 4357, 30614, 41888, 1495, 4153, ...
2.160787
2,948
<filename>src/Assessors.jl # ---------------------------------------------------- # --- Accessor.jl # ---------------------------------------------------- # Function to access to radio parameters getError(obj::UHDBinding) = UHDBindings.getError(obj); getError(obj::RadioSim) = RadioSims.getError(obj); getError(obj::SD...
[ 27, 34345, 29, 10677, 14, 8021, 23295, 13, 20362, 198, 2, 20368, 19351, 198, 2, 11420, 8798, 273, 13, 20362, 198, 2, 20368, 19351, 220, 198, 2, 15553, 284, 1895, 284, 5243, 10007, 198, 198, 1136, 12331, 7, 26801, 3712, 52, 10227, 33...
2.968062
908
<reponame>yakir12/polarimetryLab push!(LOAD_PATH, pwd()) const assets = "assets" using Images, ImageMagick, Colors, Photopolarimetry import Tk.ChooseDirectory #include("Photopolar.jl") include("PhotopolarGUIfunctions.jl") path = Input(ChooseDirectory()) flip = Input(false) flop = Input(false) torun = Input{Any}(leftb...
[ 27, 7856, 261, 480, 29, 88, 461, 343, 1065, 14, 79, 6192, 320, 11973, 17822, 198, 14689, 0, 7, 35613, 62, 34219, 11, 279, 16993, 28955, 198, 9979, 6798, 796, 366, 19668, 1, 198, 3500, 5382, 11, 7412, 13436, 624, 11, 29792, 11, 591...
2.316055
2,180
d = [0 19 17 34 7 20 10 17 28 15 23 29 23 29 21 20 9 16 21 13 12; 19 0 10 41 26 3 27 25 15 17 17 14 18 48 17 6 21 14 17 13 31; 17 10 0 47 23 13 26 15 25 22 26 24 27 44 7 5 23 21 25 18 29; 34 41 47 0 36 39 25 51 36 24 27 38 25 44 54 45 25 28 26 28 27; 7 26 23 36 0 27 11 17 35 22 30 36 30 22 25 26 14 23 28 20 10; 20...
[ 67, 796, 685, 15, 678, 1596, 4974, 767, 1160, 838, 1596, 2579, 1315, 2242, 2808, 2242, 2808, 2310, 1160, 860, 1467, 2310, 1511, 1105, 26, 201, 198, 1129, 657, 838, 6073, 2608, 513, 2681, 1679, 1315, 1596, 1596, 1478, 1248, 4764, 1596,...
2.158105
3,251
immutable NGramModel ml::Dict{UTF8String, Float64} n::Integer end getindex(m::NGramModel, gram::String) = get(m.ml, utf8(gram), 0.0) function NGramModel(sentences::Vector{String}, n) # Tokenize string tokenize(s) = TextAnalysis.tokenize(TextAnalysis.EnglishLanguage, s) # NGramize tokens fu...
[ 198, 198, 8608, 18187, 39058, 859, 17633, 198, 220, 220, 220, 25962, 3712, 35, 713, 90, 48504, 23, 10100, 11, 48436, 2414, 92, 198, 220, 220, 220, 299, 3712, 46541, 198, 437, 198, 198, 1136, 9630, 7, 76, 3712, 10503, 859, 17633, 11,...
2.196591
880
abstract type CIService end struct GitHubActions <: CIService username::String email::String api_hostname::String clone_hostname::String function GitHubActions(; username="github-actions[bot]", email="41898282+<EMAIL>-<EMAIL>[<EMAIL>", api_hostname="https://api.github.com",...
[ 397, 8709, 2099, 36159, 712, 501, 886, 198, 198, 7249, 21722, 32, 2733, 1279, 25, 36159, 712, 501, 198, 220, 220, 220, 20579, 3712, 10100, 198, 220, 220, 220, 3053, 3712, 10100, 198, 220, 220, 220, 40391, 62, 4774, 3672, 3712, 10100, ...
2.309497
895
<reponame>invenia/Patchwork.jl # Use Julia's `jl_type_morespecific` function to emulate Julia's multiple dispatch across # generic functions. # # Origin: # https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/types.md#subtyping-and-method-sorting type_morespecific(a, b) = ccall(:jl_type_morespecific, Bool, (A...
[ 27, 7856, 261, 480, 29, 259, 574, 544, 14, 33952, 1818, 13, 20362, 198, 2, 5765, 22300, 338, 4600, 20362, 62, 4906, 62, 76, 2850, 431, 7790, 63, 2163, 284, 33836, 22300, 338, 3294, 27965, 1973, 198, 2, 14276, 5499, 13, 198, 2, 198...
2.919903
824
""" Facet (`Vector{Int64}`) -> `BellGame` convert( ::Type{BellGame}, facet::Vector{Int64}, scenario::Union{BlackBox, LocalSignaling}; rep = "normalized"::String ) """ function convert( ::Type{BellGame}, facet::Vector{Int64}, scenario::Union{BlackBox,LocalSignaling}; ...
[ 37811, 198, 37, 23253, 357, 63, 38469, 90, 5317, 2414, 92, 63, 8, 4613, 4600, 36488, 8777, 63, 628, 220, 220, 220, 10385, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7904, 6030, 90, 36488, 8777, 5512, 198, 220, 220, 220, 220, 220, ...
2.071243
4,239
""" KMarkovEnvironment{OV, M<:POMDP, S, R<:AbstractRNG} <: AbstractEnvironment{OV} A k-markov wrapper for MDPs and POMDPs, given a MDP or POMDP create an AbstractEnvironment where s_t = (o_t, ..., o_t-k) The K-Markov observation is represented by a vector of k observations. """ mutable struct KMarkovEnvironment{OV,...
[ 37811, 198, 220, 220, 220, 509, 9704, 709, 31441, 90, 8874, 11, 337, 27, 25, 47, 2662, 6322, 11, 311, 11, 371, 27, 25, 23839, 49, 10503, 92, 1279, 25, 27741, 31441, 90, 8874, 92, 198, 32, 479, 12, 4102, 709, 29908, 329, 337, 632...
2.470353
1,248
<filename>src/QuadOsc.jl module QuadOsc export quadosc include("SeriesAccelerations.jl") using .SeriesAccelerations using QuadGK @doc raw""" quadosc(fn, a, Inf, fnzeros; ...) Integrate the function `fn(x)` from `a` to `Inf`. The function `fnzeros(n)` takes an integer `n` and is such that `fn(fnzeros(n)) == 0`....
[ 27, 34345, 29, 10677, 14, 4507, 324, 46, 1416, 13, 20362, 198, 21412, 20648, 46, 1416, 198, 198, 39344, 15094, 17500, 198, 198, 17256, 7203, 27996, 12832, 7015, 602, 13, 20362, 4943, 198, 3500, 764, 27996, 12832, 7015, 602, 198, 3500, ...
2.090646
1,037
<filename>src/hartree_fock.jl<gh_stars>1-10 module HartreeFock export extract_tij_Uijlk, solve_scf using LinearAlgebra import PyCall: pyimport """ Extract tij and Uijlk from a FermionOperator object, representing a Hamiltonian. The Hamiltonian must be number conserving, and is allowed to contain upto two-body opera...
[ 27, 34345, 29, 10677, 14, 18647, 631, 62, 69, 735, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 11345, 631, 37, 735, 198, 198, 39344, 7925, 62, 83, 2926, 62, 52, 2926, 75, 74, 11, 8494, 62, 1416, 69, 198, 198, 3...
2.065149
1,274
<reponame>korzhimanov/Vasilek.jl<gh_stars>1-10 module VlasovBenchmarks using BenchmarkTools const SUITE = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","LaxWendroff.jl")) import .LaxWendroff SUITE["LaxWendroff"] = BenchmarkGroup() SUITE["LaxWendroff c"] = BenchmarkGroup() include(jo...
[ 27, 7856, 261, 480, 29, 74, 273, 23548, 24086, 709, 14, 53, 292, 576, 74, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 569, 21921, 709, 44199, 14306, 198, 198, 3500, 25187, 4102, 33637, 198, 198, 9979, 13558, 12709, ...
1.954821
1,815
export mutate "Mutate: Change weights" function mutate_weights(indiv::NEATInd, cfg::Dict) # TODO: check original weight mutation ind = NEATInd(indiv) for c in ind.connections if rand() < cfg["p_mut_weights"] c.weight = c.weight + randn()*cfg["weight_factor"] end end ind ...
[ 39344, 4517, 378, 198, 198, 1, 41603, 378, 25, 9794, 19590, 1, 198, 8818, 4517, 378, 62, 43775, 7, 521, 452, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 8, 198, 220, 220, 220, 1303, 16926, 46, 25, 2198, 2656, 3463, 1514...
2.349107
1,120
<reponame>gdalle/MultiAgentPathFinding.jl<filename>test/learn_agents.jl<gh_stars>0 ## Imports using Base.Threads using Flux using Graphs using InferOpt using MultiAgentPathFinding using PythonCall using ProgressMeter using UnicodePlots ## Test rail_generators = pyimport("flatland.envs.rail_generators") line_generato...
[ 27, 7856, 261, 480, 29, 21287, 6765, 14, 29800, 36772, 15235, 36276, 13, 20362, 27, 34345, 29, 9288, 14, 35720, 62, 49638, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2235, 1846, 3742, 198, 198, 3500, 7308, 13, 16818, 82, 198, 3500,...
2.4
1,250
<reponame>hennyg888/Oceananigans.jl using Oceananigans.Architectures using Oceananigans.BoundaryConditions using Oceananigans.TurbulenceClosures: calculate_diffusivities! import Oceananigans.TimeSteppers: update_state! """ update_state!(model::IncompressibleModel) Update peripheral aspects of the model (halo reg...
[ 27, 7856, 261, 480, 29, 831, 3281, 70, 28011, 14, 46607, 272, 34090, 13, 20362, 198, 3500, 10692, 272, 34090, 13, 19895, 5712, 942, 198, 3500, 10692, 272, 34090, 13, 49646, 560, 25559, 1756, 198, 3500, 10692, 272, 34090, 13, 51, 5945,...
2.696565
524
<reponame>akhand9999/IncrementalInference.jl<filename>src/CSMOccuranceUtils.jl export CSMOccuranceType export parseCSMVerboseLog, calcCSMOccurancesFolders, calcCSMOccuranceMax, printCSMOccuranceMax, reconstructCSMHistoryLogical # [cliqId][fsmIterNumber][fsmFunctionName] => (nr. call occurances, list global call seque...
[ 27, 7856, 261, 480, 29, 461, 4993, 24214, 14, 15562, 37098, 818, 4288, 13, 20362, 27, 34345, 29, 10677, 14, 7902, 11770, 535, 3874, 18274, 4487, 13, 20362, 198, 198, 39344, 9429, 11770, 535, 3874, 6030, 198, 39344, 21136, 7902, 44, 13...
2.261017
2,950
using AutoTest Package = "BlackBoxOptim" using BlackBoxOptim function run(packagename, srcdir = "src", testdir = "test"; testfileregexp = r"^test_.*\.jl$", srcfileregexp = r"^.*\.jl$") testfiles = AutoTest.findfiles(testdir, testfileregexp; recursive = true) # in AutoTest this is false srcfiles = Au...
[ 3500, 11160, 14402, 198, 198, 27813, 796, 366, 9915, 14253, 27871, 320, 1, 198, 198, 3500, 2619, 14253, 27871, 320, 198, 198, 8818, 1057, 7, 8002, 11286, 480, 11, 12351, 15908, 796, 366, 10677, 1600, 1332, 15908, 796, 366, 9288, 8172, ...
2.590361
249
using RealInterface using Base.Test import SpecialFunctions, NaNMath for f in RealInterface.UNARY_ARITHMETIC @test isa(eval(Base, f), Function) end for f in RealInterface.BINARY_ARITHMETIC @test isa(eval(Base, f), Function) end for f in RealInterface.UNARY_MATH @test isa(eval(Base, f), Function) end for...
[ 3500, 6416, 39317, 198, 3500, 7308, 13, 14402, 198, 11748, 6093, 24629, 2733, 11, 11013, 32755, 776, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 1503, 10554, 47123, 2149, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 182...
2.526077
441
<filename>src/OceanTurbulenceParameterEstimation.jl module OceanTurbulenceParameterEstimation export OneDimensionalTimeSeries, InverseProblem, FreeParameters, IdentityNormalization, ZScore, forward_map, observation_map, eki, lognormal_with_mean_std, iterate!, EnsembleKalmanInversion, UnscentedKalmanIn...
[ 27, 34345, 29, 10677, 14, 46607, 51, 5945, 32401, 36301, 22362, 18991, 13, 20362, 198, 21412, 10692, 51, 5945, 32401, 36301, 22362, 18991, 198, 198, 39344, 1881, 35, 16198, 7575, 27996, 11, 554, 4399, 40781, 11, 3232, 48944, 11, 220, 19...
3.17193
285
<gh_stars>1-10 # Raw memory management export Mem, available_memory, total_memory module Mem using ..VectorEngine using ..VectorEngine.VEDA: vedaMemAlloc, vedaMemPtr, vedaMemFree, vedaMemGetInfo, vedaMemAllocHost, vedaMemFreeHost using Printf # # buffers # # a chunk of memory allocated using the VEDA APIs...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 16089, 4088, 4542, 198, 198, 39344, 4942, 11, 1695, 62, 31673, 11, 2472, 62, 31673, 198, 198, 21412, 4942, 198, 198, 3500, 11485, 38469, 13798, 198, 3500, 11485, 38469, 13798, 13, 53, 196...
2.356749
4,897
<filename>src/utilities.jl<gh_stars>0 import LowRankModels: copy_estimate, copy export copy_estimate, copy function copy_estimate(g::GFRM) return GFRM(g.A,g.losses,g.r,g.k, g.observed_features,g.observed_examples, copy(g.U),copy(g.W)) end
[ 27, 34345, 29, 10677, 14, 315, 2410, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 11748, 7754, 27520, 5841, 1424, 25, 4866, 62, 395, 1920, 11, 4866, 198, 198, 39344, 4866, 62, 395, 1920, 11, 4866, 198, 198, 8818, 4866, 62, 395, 192...
2.037594
133
n = 9 # rand(1:10) @test matrixdepot("clement", Float64, n) == matrixdepot("clement", n) A = matrixdepot("clement", n) B = matrixdepot("clement", n, 1) @test diag(A+A', 1) == n*ones(n-1) @test issymmetric(Array(B)) θ = matrixdepot("clement", 1) println("'clement' passed test...")
[ 77, 796, 860, 1303, 43720, 7, 16, 25, 940, 8, 198, 31, 9288, 17593, 10378, 313, 7203, 66, 1732, 1600, 48436, 2414, 11, 299, 8, 6624, 17593, 10378, 313, 7203, 66, 1732, 1600, 299, 8, 198, 198, 32, 796, 17593, 10378, 313, 7203, 66, ...
2.358333
120
@testset "Global Quantities" begin # Test Residual T = Float64 N = 10 dt = 0.1 p = 3 i = 2 model = UnicycleGame(p=p) probsize = ProblemSize(N,model) x0 = rand(SVector{model.n,T}) opts = Options() Q = [Diagonal(rand(SVector{model.ni[i],T})) for i=1:p] R = [Diagonal(rand(...
[ 31, 9288, 2617, 366, 22289, 16972, 871, 1, 2221, 628, 220, 220, 220, 1303, 6208, 1874, 312, 723, 198, 220, 220, 220, 309, 796, 48436, 2414, 198, 220, 220, 220, 399, 796, 838, 198, 220, 220, 220, 288, 83, 796, 657, 13, 16, 198, 2...
1.897356
643
using SubHunt using Test using Random using POMDPs using POMDPPolicies using POMDPSimulators using DiscreteValueIteration using ParticleFilters using POMDPModelTools using QMDP @testset "VI" begin rng = MersenneTwister(6) pomdp = SubHuntPOMDP() # show(STDOUT, MIME("text/plain"), SubVis(pomdp)) solver...
[ 3500, 3834, 47663, 198, 3500, 6208, 198, 3500, 14534, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 47, 4160, 444, 198, 3500, 350, 2662, 35, 3705, 320, 24325, 198, 3500, 8444, 8374, 11395, 29993, 341, 198, 3500, 2142, 15...
2.178049
820
# InflationTotalCPI - Implementación para obtener la medida estándar de ritmo # inflacionario a través de la variación interanual del IPC struct InflationTotalCPI <: InflationFunction end # Extender el método para obtener el nombre de esta medida measure_name(::InflationTotalCPI) = "Variación interanual IPC" measure_...
[ 2, 554, 33521, 14957, 8697, 40, 532, 48282, 32009, 18840, 31215, 909, 83, 877, 8591, 1117, 3755, 1556, 6557, 358, 283, 390, 374, 270, 5908, 198, 2, 28472, 49443, 4982, 257, 1291, 85, 20954, 390, 8591, 5553, 32009, 18840, 987, 272, 723...
2.598485
528
<filename>src/BinaryProvider.jl __precompile__() module BinaryProvider using Compat using Compat.Libdl # Utilities for controlling verbosity include("LoggingUtils.jl") # Include our subprocess running functionality include("OutputCollector.jl") # External utilities such as downloading/decompressing tarballs include("...
[ 27, 34345, 29, 10677, 14, 33, 3219, 29495, 13, 20362, 198, 834, 3866, 5589, 576, 834, 3419, 198, 21412, 45755, 29495, 198, 198, 3500, 3082, 265, 198, 3500, 3082, 265, 13, 25835, 25404, 198, 198, 2, 41086, 329, 12755, 15942, 16579, 198...
3.232704
318
using HDF5 HDF5File <: HDF5Object HDF5Object
[ 198, 3500, 5572, 37, 20, 198, 198, 39, 8068, 20, 8979, 1279, 25, 5572, 37, 20, 10267, 198, 198, 39, 8068, 20, 10267, 198 ]
2
24
<gh_stars>0 #TYPES """ AbstractModel abstract type for models """ abstract type AbstractModel end """ AbstractDependenceStructure Types inheriting from abstract type `AbstractDependenceStructure` """ abstract type AbstractDependenceStructure end """ FullIndependence <: AbstractDependenceStructure Ty...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 9936, 47, 1546, 198, 37811, 198, 220, 220, 220, 27741, 17633, 198, 198, 397, 8709, 2099, 329, 4981, 198, 37811, 198, 397, 8709, 2099, 27741, 17633, 886, 628, 628, 198, 37811, 198, 220, 220, 220, ...
3
735
function linsolve_cg( LF::LF3dGrid, b::Array{Float64,1}; x0 = nothing, NiterMax = 1000, TOL=5.e-10, convmsg=true, showprogress=false ) # Npoints = size(b)[1] if x0 == nothing x = zeros(Float64, Npoints) else x = copy(x0) end # r = z...
[ 8818, 300, 1040, 6442, 62, 66, 70, 7, 47629, 3712, 43, 37, 18, 67, 41339, 11, 275, 3712, 19182, 90, 43879, 2414, 11, 16, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.871237
598
using LowRankModels # test losses in losses.jl srand(1); losses = [ QuadLoss(), QuadLoss(10), L1Loss(), L1Loss(5.2), HuberLoss(), HuberLoss(4), HuberLoss(3.1, crossover=3.2), PeriodicLoss(2*pi), PeriodicLoss(2*pi, 4), PoissonLoss(20), PoissonLoss(22,4.1), OrdinalHingeLoss(1,10), OrdinalHingeLoss(2,7,5), Logistic...
[ 3500, 7754, 27520, 5841, 1424, 198, 198, 2, 1332, 9089, 287, 9089, 13, 20362, 198, 82, 25192, 7, 16, 1776, 198, 198, 22462, 274, 796, 685, 198, 4507, 324, 43, 793, 22784, 198, 4507, 324, 43, 793, 7, 940, 828, 198, 43, 16, 43, 79...
2.428101
911
using SerialPorts function _end_of_command(ser) for i in 0:2 write(stdout, 0xff) write(ser, 0xff) end end function _execute_command(ser, cmd) println(cmd) write(ser, cmd) _end_of_command(ser) end function main() ser = SerialPort("COM4", 9600) _execute_command(ser, "page 0"...
[ 3500, 23283, 47, 2096, 198, 198, 8818, 4808, 437, 62, 1659, 62, 21812, 7, 2655, 8, 198, 220, 220, 220, 329, 1312, 287, 657, 25, 17, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 19282, 448, 11, 657, 47596, 8, 198, 220, 220, ...
2.180952
210
<gh_stars>0 using Distributed using Distributions nb_draws = 100000 function inside_circle(x::Float64, y::Float64) output = 0 if x^2 + y^2 <= 1 output = 1 end return output end function pi_serial(nbPoints::Int64 = 128 * 1000; d=Uniform(-1.0,1.0)) #draw NbPoints from within the square centered in...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 4307, 6169, 198, 3500, 46567, 507, 198, 198, 46803, 62, 19334, 82, 796, 1802, 830, 198, 198, 8818, 2641, 62, 45597, 7, 87, 3712, 43879, 2414, 11, 331, 3712, 43879, 2414, 8, 198, 220, 220, 220...
2.512281
285
#= From "CAV 2020 Tutorial: Probabilistic Programming: A Guide for Verificationists" https://www.youtube.com/watch?v=yz5uUf_03Ik&t=2657s Around @23:30 Summary Statistics parameters mean std naive_se mcse ess rhat ess_per_sec Symbol Float64 Float64 Float64 F...
[ 2, 28, 628, 220, 3574, 198, 220, 366, 8141, 53, 12131, 36361, 25, 30873, 14991, 2569, 30297, 25, 317, 10005, 329, 4643, 2649, 1023, 1, 198, 220, 3740, 1378, 2503, 13, 11604, 13, 785, 14, 8340, 30, 85, 28, 45579, 20, 84, 52, 69, ...
1.992545
939
function main(dataPath) lines = parse(readall(pipeline(`cat $[dataPath]ratings.csv`, `wc -l`))) @time ratings = readdlm(dataPath * "ratings.csv", ',', header=true, dims=(lines, 4)) ratingsHeader = ratings[2] ratings = ratings[1] order = shuffle(collect(1:size(ratings)[1])) ratings = ratings[order, :] trainEnd ...
[ 8818, 1388, 7, 7890, 15235, 8, 198, 197, 6615, 796, 21136, 7, 961, 439, 7, 79, 541, 4470, 7, 63, 9246, 720, 58, 7890, 15235, 60, 10366, 654, 13, 40664, 47671, 4600, 86, 66, 532, 75, 63, 22305, 198, 197, 31, 2435, 10109, 796, 110...
2.599379
322
<reponame>biomass-dev/BioMASS.jl using PyCall function __init__() py""" import os import shutil import re def main(model_path): ''' Convert fitparam/n/*.dat -> out/n/*.npy Parameters ---------- model_path : str Path to your model written in Julia. ...
[ 27, 7856, 261, 480, 29, 8482, 296, 562, 12, 7959, 14, 42787, 44, 10705, 13, 20362, 198, 3500, 9485, 14134, 198, 198, 8818, 11593, 15003, 834, 3419, 198, 220, 220, 220, 12972, 37811, 198, 220, 220, 220, 1330, 28686, 198, 220, 220, 22...
1.385652
2,746
using hyporheicBiogeochemistry, DifferentialEquations α = 1.6; τ₋ = 0.01; τ₊ = 1000.0; k = 0.0; V_frac = 1.0 q = qCalc_powerLaw(α, τ₋, τ₊, V_frac) p = (q, α, τ₋, τ₊, k) h(p,t) = [50.0] u0 = [100.0] tspan = (1000.0, 2000.0) f = build_sam_model_dde(E_powerLaw, foc, tspan[1]) j = build_sam_model_dde2(E_powerLaw, foc, t...
[ 3500, 2537, 1819, 258, 291, 42787, 469, 37074, 11, 20615, 498, 23588, 602, 198, 198, 17394, 796, 352, 13, 21, 26, 46651, 158, 224, 233, 796, 657, 13, 486, 26, 46651, 158, 224, 232, 796, 8576, 13, 15, 26, 479, 796, 657, 13, 15, 2...
2.151862
349
<reponame>grahamas/AxisIndices.jl<gh_stars>10-100 using Documenter using AxisIndices using LinearAlgebra using Metadata using Statistics makedocs(; modules=[AxisIndices], format=Documenter.HTML(), pages=[ "index.md", "references.md", ], repo="https://github.com/Tokazama/AxisIndices...
[ 27, 7856, 261, 480, 29, 70, 13220, 292, 14, 31554, 271, 5497, 1063, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 198, 3500, 16854, 263, 198, 3500, 38349, 5497, 1063, 198, 3500, 44800, 2348, 29230, 198, 3500, 3395, 14706, 1...
2.287081
209
<reponame>UnofficialJuliaMirror/IntArrays.jl-45d23951-e9a5-545c-8049-e4c4887f5525<filename>src/matrix.jl const IntMatrix{w,T} = IntArray{w,T,2} function IntMatrix{w,T}(m::Integer, n::Integer, mmap::Bool=false) where {w,T} return IntArray{w,T}((m, n), mmap) end function IntMatrix{w,T}(mmap::Bool=false) where {w,T}...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 5317, 3163, 20477, 13, 20362, 12, 2231, 67, 1954, 50119, 12, 68, 24, 64, 20, 12, 45326, 66, 12, 1795, 2920, 12, 68, 19, 66, 2780, 5774, 69, 2816, 1495, 27, 34345, ...
2.244361
266
<filename>test/tracers_test.jl using eFEM, Test
[ 27, 34345, 29, 9288, 14, 2213, 49908, 62, 9288, 13, 20362, 198, 3500, 304, 37, 3620, 11, 6208, 220, 198 ]
2.45
20
@ghdef mutable struct Installation id::Union{Int, Nothing} end namefield(i::Installation) = i.id @api_default function create_access_token(api::GitHubAPI, i::Installation, auth::JWTAuth; headers = Dict(), options...) headers["Accept"] = "application/vnd.github.machine-man-preview+json" payload = gh_post_...
[ 31, 456, 4299, 4517, 540, 2878, 32588, 198, 220, 220, 220, 4686, 3712, 38176, 90, 5317, 11, 10528, 92, 198, 437, 198, 198, 3672, 3245, 7, 72, 3712, 30838, 8, 796, 1312, 13, 312, 628, 198, 31, 15042, 62, 12286, 2163, 2251, 62, 1552...
2.818824
425
""" #### function ```get_line_params(xi::Float64, df::DataFrame)``` <br> Description of ```get_line_params``` ----------------------------------------- Returns the parameters a,b of linear approximation y = ax +b. For the segment where the random number ξ falls into. `` """ function get_line_params(xi::Float...
[ 37811, 198, 4242, 2163, 7559, 63, 1136, 62, 1370, 62, 37266, 7, 29992, 3712, 43879, 2414, 11, 47764, 3712, 6601, 19778, 8, 15506, 63, 220, 198, 27, 1671, 29, 628, 220, 220, 220, 12489, 286, 7559, 63, 1136, 62, 1370, 62, 37266, 15506...
2.222668
997
<reponame>findmyway/MLStyle.jl module MLStyle export @case, @data, @match, Pattern, Case, Failed, failed, PatternDef, pattern_match, app_pattern_match, (..), enum_next include("utils.jl") include("Err.jl") using MLStyle.Err include("Match.jl") using MLStyle.Match include("ADT.jl") using MLStyle.ADT include("Match...
[ 27, 7856, 261, 480, 29, 19796, 1820, 1014, 14, 5805, 21466, 13, 20362, 198, 21412, 13981, 774, 293, 198, 198, 39344, 2488, 7442, 11, 2488, 7890, 11, 2488, 15699, 11, 23939, 11, 8913, 11, 22738, 11, 4054, 11, 23939, 7469, 11, 3912, 6...
2.662338
154
using HDF5 using JSON savepath = "SARA/NatCom2020/outer/data/" xrd_file = "Bi2O3_19F44_01_outer_xrd_gradients_input_noise_iSARA.h5" # savefile = "Bi2O3_19F44_01_outer_xrd_gradients_no_input_noise.h5" xrd_f = h5open(savepath * xrd_file, "r") xrd_temperatures = read(xrd_f, "temperatures") xrd_dwelltimes = read(xrd_f, "d...
[ 3500, 5572, 37, 20, 198, 3500, 19449, 198, 21928, 6978, 796, 366, 50, 24401, 14, 47849, 5377, 42334, 14, 39605, 14, 7890, 30487, 198, 87, 4372, 62, 7753, 796, 366, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 62, 39605, 62, 87,...
2.093785
885
using Test using LinearAlgebraicRepresentation Lar = LinearAlgebraicRepresentation using ViewerGL GL = ViewerGL @testset "GLShader.jl" begin # function GLShader(vertex, fragment) @testset "GLShader" begin @test @test @test @test end # function releaseGpuResources(shader::GLShader)...
[ 3500, 6208, 198, 3500, 44800, 2348, 29230, 291, 40171, 341, 198, 43, 283, 796, 44800, 2348, 29230, 291, 40171, 341, 198, 3500, 3582, 263, 8763, 198, 8763, 796, 3582, 263, 8763, 198, 198, 31, 9288, 2617, 366, 8763, 2484, 5067, 13, 2036...
2.27762
353
using SatelliteToolbox """ T = disturbance(sun_vecs, air_density, current_qua) 擾乱によるトルクの計算 # Arguments - `sun_vecs`: 太陽方向ベクトル@SEOF - `air_density`:大気密度 - `sat_velocity`:衛星速度ベクトル@seof - `current_qua`: 現在の姿勢クォータニオン # Returns - `T`: 擾乱によるトルクの合計 """ function disturbance(sun_vecs, air_density, sat_velocity, current_qua...
[ 3500, 33530, 25391, 3524, 198, 198, 37811, 198, 51, 796, 30497, 7, 19155, 62, 303, 6359, 11, 1633, 62, 43337, 11, 1459, 62, 39566, 8, 198, 198, 162, 241, 122, 20046, 109, 28618, 1792, 230, 25748, 13298, 9202, 14099, 5641, 164, 101, ...
1.489472
5,414
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,jl:hydrogen # text_representation: # extension: .jl # format_name: hydrogen # format_version: '1.3' # jupytext_version: 1.10.3 # kernelspec: # display_name: Julia 1.6.4 # language: julia # name: julia-1...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 17519, 25, 20966, 2047, 65, 11, 20362, 25, 15511, ...
2.000837
1,195
<reponame>JuliaBinaryWrappers/czmq_jll.jl # Use baremodule to shave off a few KB from the serialized `.ji` file baremodule czmq_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("czmq") JLLWrappers.@generate_main_file("czmq", UUID("bada3277-1da5-58a9-94c6-da212cd39369")) end # ...
[ 27, 7856, 261, 480, 29, 16980, 544, 33, 3219, 36918, 11799, 14, 26691, 76, 80, 62, 73, 297, 13, 20362, 198, 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412,...
2.382979
141
<reponame>dourouc05/ConstraintProgrammingExtensions.jl """ Bridges `CP.GlobalCardinality` to `CP.Count`. """ struct GlobalCardinalityFixedOpen2CountBridge{T} <: MOIBC.AbstractBridge cons_count::Vector{MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}}} end function MOIBC.bridge_constraint( ...
[ 27, 7856, 261, 480, 29, 67, 454, 280, 66, 2713, 14, 3103, 2536, 2913, 15167, 2229, 11627, 5736, 13, 20362, 198, 37811, 198, 33, 32124, 4600, 8697, 13, 22289, 16962, 1292, 414, 63, 284, 4600, 8697, 13, 12332, 44646, 198, 37811, 198, ...
2.167095
1,167
module LevenshteinToolkit # ---------------------------------------- # EXPORTED INTERFACE # ---------------------------------------- export distance_matrix export distance_row export dfa export nfa export check export draw include("matrix.jl") include("row.jl") include("automata.jl") end
[ 21412, 1004, 574, 1477, 22006, 25391, 15813, 198, 198, 2, 20368, 982, 198, 2, 7788, 15490, 1961, 23255, 49836, 198, 2, 20368, 982, 198, 198, 39344, 5253, 62, 6759, 8609, 198, 39344, 5253, 62, 808, 198, 198, 39344, 288, 13331, 198, 393...
3.6875
80
<filename>src/filters.jl<gh_stars>0 """ ```math \\tilde X = \\hat X_{t+1|t} = A\\hat X_{t|t} ``` """ function KalmanFilter(M::LGSSM, y) RR = M.R * M.R' SS = M.S * M.S' ydim, qdim = size(M.B) xdim, pdim = size(M.R) n = size(y, 1) ϵ = zeros(ydim, 1, n) Γ = zeros(ydim, ydim, n) Γ⁻¹ = zero...
[ 27, 34345, 29, 10677, 14, 10379, 1010, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 198, 15506, 63, 11018, 198, 6852, 83, 44725, 1395, 796, 26867, 5183, 1395, 23330, 83, 10, 16, 91, 83, 92, 796, 317, 6852, 5183, 1395, 2...
1.404023
4,574
module MCMC Base.warn("MCMC.jl has moved to Lora.jl. Development in Lora.jl will continue. MCMC.jl is a placeholder for the future merge of various independent MCMC implementations in Julia, including Lora.jl.") end
[ 21412, 13122, 9655, 198, 198, 14881, 13, 40539, 7203, 9655, 9655, 13, 20362, 468, 3888, 284, 406, 5799, 13, 20362, 13, 7712, 287, 406, 5799, 13, 20362, 481, 2555, 13, 13122, 9655, 13, 20362, 318, 257, 46076, 329, 262, 2003, 20121, 286...
3.633333
60
using BoardGames struct RandomStrategy <: Strategy end function BoardGames.getmove(board, s::RandomStrategy) rand(getmoves(board)) end
[ 3500, 5926, 24474, 198, 198, 7249, 14534, 13290, 4338, 1279, 25, 20561, 886, 198, 198, 8818, 5926, 24474, 13, 1136, 21084, 7, 3526, 11, 264, 3712, 29531, 13290, 4338, 8, 198, 220, 220, 220, 43720, 7, 1136, 76, 5241, 7, 3526, 4008, 1...
3.133333
45
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md # # Generating local matrices for problems using JuliaFEM # Plane stress Quad4 element with linear material model: # In JuliaFEM the plane stress element can be defined using Quad4 element which #...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 37, 3620, 13, 198, 2, 13789, 318, 17168, 25, 766, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 37, 3620, 14, 16980, 544, 37, 3620, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, ...
3.235294
663
<gh_stars>1-10 export RecipeInflation, filter_state!, vortexassim struct RecipeInflation <: InflationType "Parameters" p::Array{Float64,1} end # Filtering function to bound the strength of the vortices and sources function filter_state!(x, config::VortexConfig) @inbounds for j=1:config.Nv # Ensure that vor...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 39344, 26694, 818, 33521, 11, 8106, 62, 5219, 28265, 42726, 562, 320, 198, 198, 7249, 26694, 818, 33521, 1279, 25, 554, 33521, 6030, 198, 220, 220, 220, 366, 48944, 1, 198, 220, 220, 220, ...
1.973014
1,964
<gh_stars>100-1000 using Revise using ADCME using PyCall using LinearAlgebra using PyPlot using SparseArrays using Random # Random.seed!(233) # TODO: specify your input parameters A = sprand(10,5,0.3) f = rand(10) sol = A\f u = constant(A)\f sess = Session() init(sess) @show run(sess, u)-sol # error() # TODO: cha...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 5416, 786, 198, 198, 3500, 49169, 11682, 198, 3500, 9485, 14134, 198, 3500, 44800, 2348, 29230, 198, 3500, 9485, 43328, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 14534, 198, 2, ...
2.053645
727
<gh_stars>1-10 # SPDX-License-Identifier: X11 # 2020-11-14 using Random function geninput(bound::Integer, fn::AbstractString) X = collect(-bound:bound) Y = collect(-bound:bound) n = 2bound + 1 println("Shuffling...") shuffle!(X) shuffle!(Y) println("Printing to $fn...") open(fn, "w") do f for i...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 1395, 1157, 198, 2, 12131, 12, 1157, 12, 1415, 198, 198, 3500, 14534, 198, 198, 8818, 2429, 15414, 7, 7784, 3712, 46541, 11, 24714, 3712, 2383...
2.004082
245
module PackageName # Write your package code here. print("Hello Julia, Git and Kraken!") end
[ 21412, 15717, 5376, 198, 198, 2, 19430, 534, 5301, 2438, 994, 13, 198, 198, 4798, 7203, 15496, 22300, 11, 15151, 290, 43392, 2474, 8, 198, 198, 437, 198 ]
3.428571
28
using CairoMakie using ElectronDisplay using FFTW using LinearAlgebra using Scapin.Elasticity using Scapin.Bri17 const T = Float64 const d = 2 C = Hooke{d,T}(1.0, 0.3) α = (0.25, 0.25) # Fraction of the domained that is polarized N_coarse = (4, 4) r_max = 9 N_fine = (2^r_max) .* N_coarse results = Dict() for r ∈ 0:...
[ 3500, 23732, 44, 461, 494, 198, 3500, 5903, 1313, 23114, 198, 3500, 376, 9792, 54, 198, 3500, 44800, 2348, 29230, 198, 3500, 1446, 499, 259, 13, 9527, 3477, 414, 198, 3500, 1446, 499, 259, 13, 33, 380, 1558, 198, 198, 9979, 309, 796...
1.736165
777
<filename>test/test_tools.jl module TestTools using Test using Mimi import Mimi: getproperty, reset_compdefs reset_compdefs() #utils: prettify @test Mimi.prettify("camelCaseBasic") == Mimi.prettify(:camelCaseBasic) == "Camel Case Basic" @test Mimi.prettify("camelWithAOneLetterWord") == Mimi.prettify(:camelWithA...
[ 27, 34345, 29, 9288, 14, 9288, 62, 31391, 13, 20362, 198, 21412, 6208, 33637, 198, 198, 3500, 6208, 198, 3500, 337, 25236, 198, 198, 11748, 337, 25236, 25, 198, 220, 220, 220, 651, 26745, 11, 13259, 62, 5589, 4299, 82, 198, 198, 425...
2.433393
563
SubWorker{T,A,PT} = RemoteChannel{Channel{Vector{SubProblem{T,A,PT}}}} ScenarioProblemChannel{S} = RemoteChannel{Channel{ScenarioProblems{S}}} Work = RemoteChannel{Channel{Int}} Progress{T <: AbstractFloat} = Tuple{Int,Int,SubproblemSolution{T}} ProgressQueue{T <: AbstractFloat} = RemoteChannel{Channel{Progress{T}}} f...
[ 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 92, 796, 21520, 29239, 90, 29239, 90, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 11709, 198, 3351, 39055, 40781, 29239, 90, 50, 92, 796, 21520, 29239, 90, 29239, 90, 3351, ...
1.76566
4,071
# tests for the synchronous task runner import Arbiter.Sync: run_tasks import Arbiter.ArbiterTasks: ArbiterTask import Arbiter.ArbiterGraphs: NodeSet, ImmutableNodeSet facts("empty") do # solve no tasks results = run_tasks(()) @fact results.completed --> ImmutableNodeSet() @fact results.failed --> Im...
[ 2, 5254, 329, 262, 18305, 516, 4876, 17490, 198, 11748, 33619, 263, 13, 28985, 25, 1057, 62, 83, 6791, 198, 11748, 33619, 263, 13, 3163, 2545, 263, 51, 6791, 25, 33619, 263, 25714, 198, 11748, 33619, 263, 13, 3163, 2545, 263, 37065, ...
2.476427
403
# Julia wrapper for header: /usr/local/include/sodium.h # Automatically generated using Clang.jl wrap_c, version 0.0.0 @c Int32 sodium_init () libsodium @c Int32 crypto_auth_hmacsha512256 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_auth_hmacsha512256_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, P...
[ 2, 22300, 29908, 329, 13639, 25, 1220, 14629, 14, 12001, 14, 17256, 14, 82, 12664, 13, 71, 198, 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 11, 2196, 657, 13, 15, 13, 15, 198, 198, 31, 66, 2558, 2624, 21072, ...
2.318304
5,212
#! format: off using PowerSystems using PowerSimulations using PowerSystemCaseBuilder using Cbc #solver solver = optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 1, "ratioGap" => 0.5) sys = build_system(PSITestSystems, "test_RTS_GMLC_sys") for line in get_components(Line, sys) if (get_base_voltage(get_fro...
[ 2, 0, 5794, 25, 572, 198, 198, 3500, 4333, 11964, 82, 198, 3500, 4333, 8890, 5768, 198, 3500, 4333, 11964, 20448, 32875, 198, 198, 3500, 327, 15630, 1303, 82, 14375, 198, 82, 14375, 796, 6436, 7509, 62, 4480, 62, 1078, 7657, 7, 34, ...
2.588384
396
module HypergraphsEpidemics using CSV using DataFrames using Query using Tables using Dates using DataStructures using Distributions using SimpleHypergraphs using Statistics using Combinatorics using Pipe: @pipe using Random using JSON using JSON3 using Serialization export Person export Household export Company expo...
[ 21412, 15079, 34960, 82, 13807, 28913, 873, 198, 198, 3500, 44189, 198, 3500, 6060, 35439, 198, 3500, 43301, 198, 3500, 33220, 198, 3500, 44712, 198, 3500, 6060, 44909, 942, 198, 3500, 46567, 507, 198, 3500, 17427, 38197, 34960, 82, 198, ...
3.331707
205
using Test # test the seg error functions using EMIRT using EMIRT.Evaluate @testset "test evaluate" begin # get test data aff = EMIRT.IOs.imread(joinpath(dirname(@__FILE__),"../assets/aff.h5")) lbl = EMIRT.IOs.imread(joinpath(dirname(@__FILE__),"../assets/lbl.h5")) lbl = Array{UInt32,3}(lbl) # compare python code ...
[ 3500, 6208, 198, 2, 1332, 262, 384, 70, 4049, 5499, 198, 3500, 17228, 48771, 198, 3500, 17228, 48771, 13, 36, 2100, 4985, 198, 198, 31, 9288, 2617, 366, 9288, 13446, 1, 2221, 220, 198, 198, 2, 651, 1332, 1366, 198, 2001, 796, 17228,...
2.360424
283
""" gen_ref_dirs(dimension, n_paritions) Generates Das and Dennis's structured reference points. `dimension` could be the number of objective functions in multi-objective functions. """ function gen_ref_dirs(dimension, n_paritions) return gen_weights(dimension, n_paritions) end function gen_weights(a, b) ...
[ 37811, 198, 220, 220, 220, 2429, 62, 5420, 62, 15908, 82, 7, 46156, 11, 299, 62, 1845, 1756, 8, 198, 8645, 689, 29533, 290, 16902, 338, 20793, 4941, 2173, 13, 4600, 46156, 63, 714, 307, 198, 1169, 1271, 286, 9432, 5499, 287, 5021, ...
2.244311
835
<reponame>fingolfin/CompileBot.jl<filename>test/TestPackage3.jl/test/runtests.jl<gh_stars>10-100 using Test, TestPackage3 @static if VERSION > v"1.3" @test hello3("Julia") == "Hello, Julia" elseif VERSION > v"1.2" @test domath3(2.0) ≈ 7.0 else multiply3(2.0) == 8.0 end
[ 27, 7856, 261, 480, 29, 28825, 4024, 259, 14, 7293, 576, 20630, 13, 20362, 27, 34345, 29, 9288, 14, 14402, 27813, 18, 13, 20362, 14, 9288, 14, 81, 2797, 3558, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6208, 11, ...
2.241935
124
<reponame>UzielLinares/TaylorModels.jl<filename>src/validatedODEs.jl # Some methods for validated integration of ODEs const _DEF_MINABSTOL = 1.0e-50 """ remainder_taylorstep!(f!, t, x, dx, xI, dxI, δI, δt, params) Returns a remainder for the integration step for the dependent variables (`x`) checking that the so...
[ 27, 7856, 261, 480, 29, 52, 89, 8207, 43, 1437, 411, 14, 29907, 5841, 1424, 13, 20362, 27, 34345, 29, 10677, 14, 12102, 515, 16820, 82, 13, 20362, 198, 2, 2773, 5050, 329, 31031, 11812, 286, 440, 7206, 82, 198, 198, 9979, 4808, 32...
1.972592
15,470
<gh_stars>0 @testset "Protting" begin @testset "DistPlot1D" begin # TODO end @testset "DistPlot2D" begin # TODO end @testset "CornerPlot" begin # TODO end end
[ 27, 456, 62, 30783, 29, 15, 198, 31, 9288, 2617, 366, 19703, 889, 1, 2221, 198, 220, 2488, 9288, 2617, 366, 20344, 43328, 16, 35, 1, 2221, 198, 220, 220, 220, 1303, 16926, 46, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 20344,...
2.228916
83
<gh_stars>10-100 using RecurrenceAnalysis, DelimitedFiles, Statistics # Measure the times (in ms) of evaluating an expression n times macro measuretime(ex, n) quote # Train the expression and get the result result = $(esc(ex)) t = zeros($n) for i in 1:$n t[i] = 1000*(@el...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 3311, 33928, 32750, 11, 4216, 320, 863, 25876, 11, 14370, 198, 198, 2, 24291, 262, 1661, 357, 259, 13845, 8, 286, 22232, 281, 5408, 299, 1661, 198, 20285, 305, 3953, 2435, 7, 1069, ...
2.042553
564
""" dt = DotTheta( (x,y) -> dot(x,y) / length(x) ) This parametric type allows to define a new dot product from the one saved in `dt::dot`. More precisely: dt(u1, u2, p1::T, p2::T, theta::T) where {T <: Real} computes, the weigthed dot product ``\\langle (u_1,p_1), (u_2,p_2)\\rangle_\\theta = \\theta \\Re \\langle...
[ 37811, 198, 197, 28664, 796, 22875, 464, 8326, 7, 357, 87, 11, 88, 8, 4613, 16605, 7, 87, 11, 88, 8, 1220, 4129, 7, 87, 8, 1267, 198, 198, 1212, 5772, 19482, 2099, 3578, 284, 8160, 257, 649, 16605, 1720, 422, 262, 530, 7448, 287...
2.494313
8,353
using Test, Onda, Dates, Random, UUIDs @testset "pretty printing" begin @test repr(TimeSpan(6149872364198, 123412345678910)) == "TimeSpan(01:42:29.872364198, 34:16:52.345678910)" signal = Signal([:a, :b, Symbol("c-d")], Nanosecond(3), Nanosecond(Second(12345)), :unit, 0.25, -0.5,...
[ 3500, 6208, 11, 440, 45658, 11, 44712, 11, 14534, 11, 471, 27586, 82, 198, 198, 31, 9288, 2617, 366, 37784, 13570, 1, 2221, 198, 220, 220, 220, 2488, 9288, 41575, 7, 7575, 4561, 272, 7, 46841, 44183, 1954, 2414, 22337, 11, 1105, 268...
1.628696
2,063
<gh_stars>0 #################### Discrete Gibbs Sampler #################### #################### Types and Constructors #################### const DGSUnivariateDistribution = Union{Bernoulli, Binomial, Categorical, DiscreteUniform, Hypergeometric, NoncentralHypergeometric} const DSForm = ...
[ 27, 456, 62, 30783, 29, 15, 198, 14468, 4242, 8444, 8374, 41071, 3409, 20053, 1303, 14468, 21017, 198, 198, 14468, 4242, 24897, 290, 28407, 669, 1303, 14468, 21017, 198, 198, 9979, 360, 14313, 3118, 42524, 20344, 3890, 796, 198, 220, 22...
2.696024
1,635
cd(@__DIR__); include("setups/grid7x3.jl") pyplot(dpi = 200) ## (a) eigenvectors by nondecreasing eigenvalue ordering plot(layout = Plots.grid(3, 7)) for i in 1:N heatmap!(reshape(𝚽[:, i], (Nx, Ny))', c = :viridis, cbar = false, clims = (-0.4,0.4), frame = :none, ratio = 1, ylim = [0, Ny + 1], ...
[ 10210, 7, 31, 834, 34720, 834, 1776, 2291, 7203, 2617, 4739, 14, 25928, 22, 87, 18, 13, 20362, 4943, 198, 9078, 29487, 7, 67, 14415, 796, 939, 8, 198, 198, 2235, 357, 64, 8, 304, 9324, 303, 5217, 416, 30745, 721, 260, 2313, 304, ...
1.987755
490
# not working. using LinearAlgebra, FFTW import BSON, Statistics, Random import PyPlot import NMRSpectraSimulator include("../src/NMRCalibrate.jl") import .NMRCalibrate # for loading something with Interpolations.jl import OffsetArrays import Interpolations import PlotlyJS import Plots Plots.plotly() import Destr...
[ 2, 407, 1762, 13, 198, 198, 3500, 44800, 2348, 29230, 11, 376, 9792, 54, 198, 11748, 347, 11782, 11, 14370, 11, 14534, 198, 11748, 9485, 43328, 198, 198, 11748, 28692, 6998, 806, 430, 8890, 8927, 198, 198, 17256, 7203, 40720, 10677, 1...
2.53159
459
/** * This class models a cloud storage API. */ class Cloud { int{L} cloud; /** * Put a value into the cloud. */ void put(int x) { this.cloud = x; } /** * Put the only value the cloud stores. */ int get() { return this.cloud; } }
[ 35343, 198, 1635, 770, 1398, 4981, 257, 6279, 6143, 7824, 13, 198, 9466, 198, 4871, 10130, 1391, 198, 220, 220, 220, 493, 90, 43, 92, 6279, 26, 628, 220, 220, 220, 42638, 198, 220, 220, 220, 220, 1635, 5930, 257, 1988, 656, 262, 6...
2.300813
123
<reponame>UnofficialJuliaMirror/ProteinEnsembles.jl-186d2b2d-8ad5-54a6-bcea-66047609c611 # Tests for align.jl @testset "Align" begin coords_one = [ 1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 0.0; ] coords_two = [ 0.0 -1.0 0.0; 1.0 0.0 0.0; 1.0 1.0 1.0; ] tran...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 47, 35574, 4834, 4428, 829, 13, 20362, 12, 25096, 67, 17, 65, 17, 67, 12, 23, 324, 20, 12, 4051, 64, 21, 12, 65, 344, 64, 12, 39885, 2857, 31751, 66, 21, 1157, ...
1.635536
2,527
module Jags using Compat, Pkg, Documenter, DelimitedFiles, Unicode, MCMCChains, StatsPlots #### Includes #### include("jagsmodel.jl") include("jagscode.jl") if !isdefined(Main, :Stanmodel) include("utilities.jl") end """The directory which contains the executable `bin/stanc`. Inferred from `Main.JAGS_HOME` or `E...
[ 21412, 449, 3775, 198, 198, 3500, 3082, 265, 11, 350, 10025, 11, 16854, 263, 11, 4216, 320, 863, 25876, 11, 34371, 11, 13122, 9655, 1925, 1299, 11, 20595, 3646, 1747, 198, 198, 4242, 29581, 1303, 21017, 198, 198, 17256, 7203, 73, 3775...
2.348341
422