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>0 Pkg.clone("git://github.com/adriantorrie/EodDataTestXml.jl.git") tests = ["eod_utils_external", "eod_utils_internal"] for t in tests fpath = "$t.jl" @printf("running %s ...\n", fpath) include(fpath) end
[ 27, 456, 62, 30783, 29, 15, 198, 47, 10025, 13, 21018, 7203, 18300, 1378, 12567, 13, 785, 14, 324, 380, 415, 273, 5034, 14, 36, 375, 6601, 14402, 55, 4029, 13, 20362, 13, 18300, 4943, 198, 41989, 796, 14631, 68, 375, 62, 26791, 62...
2.257426
101
# Initial tests to see if deleteLeaf works # as expected with QuartetNetwork type # <NAME> 2014 include("../examples/bad_triangle_example.jl") include("../examples/case_f_example.jl") qnet = QuartetNetwork(net); printEdges(qnet) printNodes(qnet) printEdges(net) printNodes(net) qnet.hasEdge # bad triangle deleteLeaf!...
[ 2, 20768, 5254, 284, 766, 611, 12233, 3123, 1878, 2499, 198, 2, 355, 2938, 351, 48748, 316, 26245, 2099, 198, 2, 1279, 20608, 29, 1946, 198, 198, 17256, 7203, 40720, 1069, 12629, 14, 14774, 62, 28461, 9248, 62, 20688, 13, 20362, 4943,...
2.244147
897
<gh_stars>0 using Roots using Compat.Test import SpecialFunctions.erf include("./test_find_zero.jl") include("./test_fzero.jl") include("./test_find_zeros.jl") include("./test_newton.jl") include("./test_simple.jl") include("./RootTesting.jl") #include("./test_composable.jl") #run_benchmark_tests() #include("./test...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 34341, 198, 3500, 3082, 265, 13, 14402, 198, 11748, 6093, 24629, 2733, 13, 263, 69, 198, 198, 17256, 7, 1911, 14, 9288, 62, 19796, 62, 22570, 13, 20362, 4943, 198, 17256, 7, 1911, 14, 9288, 6...
2.408537
164
<filename>src/TestProblems/Scalars/ftanx.jl<gh_stars>10-100 """ ftanx() Function and derivative for Figures 1.1 and 1.3 in the print book. Also used as simple test problems. """ function ftanx(x) return tan(x) - x end function ftanxp(x) return sec(x)^2 - 1 end
[ 27, 34345, 29, 10677, 14, 14402, 2964, 22143, 14, 3351, 282, 945, 14, 701, 272, 87, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 37811, 198, 701, 272, 87, 3419, 198, 198, 22203, 290, 27255, 329, 36574, 352, 13, 16, 290, ...
2.509259
108
<filename>src/linesegments.jl using CairoMakie, Random, Distributions Random.seed!(1234) b = Binomial(10, 0.85) n = 500 function someSegments(; n = 50) Point2f0.(vec([[x, rand(b)] for i in 1:2, x = rand(n)])) end with_theme(theme_dark()) do fig, = linesegments(someSegments(; n = n); color = rand(n), co...
[ 27, 34345, 29, 10677, 14, 6615, 1533, 902, 13, 20362, 198, 3500, 23732, 44, 461, 494, 11, 14534, 11, 46567, 507, 198, 29531, 13, 28826, 0, 7, 1065, 2682, 8, 198, 65, 796, 20828, 49070, 7, 940, 11, 657, 13, 5332, 8, 198, 77, 796,...
2.286325
234
<filename>test/CellMapsTests.jl module CellMapsTests using Test using CellwiseValues using TensorValues using ..CellValuesMocks using ..MapsMocks l = 10 a = VectorValue(10,10) b = VectorValue(15,20) p1 = VectorValue(1,1) p2 = VectorValue(2,2) p3 = VectorValue(3,3) p = [p1,p2,p3] m = MockMap(a) r = evaluate(m,p) cm...
[ 27, 34345, 29, 9288, 14, 28780, 47010, 51, 3558, 13, 20362, 198, 21412, 12440, 47010, 51, 3558, 198, 198, 3500, 6208, 198, 3500, 12440, 3083, 40161, 198, 3500, 309, 22854, 40161, 198, 198, 3500, 11485, 28780, 40161, 44, 3320, 198, 3500,...
2.280769
260
<reponame>Roger-luo/Ion.jl """ subcommands for managing large Julia package that contains sub-packages in its `lib` directory. """ @cast module Package using Pkg using TOML using Comonicon using ..Internal: collect_lib_deps, foreach_subpackage, develop_local_deps """ initall(;root_path::String=root_dir(), no_docs...
[ 27, 7856, 261, 480, 29, 43719, 12, 2290, 78, 14, 40, 261, 13, 20362, 198, 37811, 198, 7266, 9503, 1746, 329, 11149, 1588, 22300, 5301, 198, 5562, 4909, 850, 12, 43789, 287, 663, 4600, 8019, 63, 8619, 13, 198, 37811, 198, 31, 2701, ...
2.807848
739
<reponame>ljk233/AdventOfCode2021 #= Counter ADT =========== A simple interface for a counting bag. =# """ counter([seq]) Return an initialised counter. """ function counter() return Dict{Any, Int}() end """ add!(counter, item, [freq=1]) Add the item to the counter. If freq is passed as an argument, t...
[ 27, 7856, 261, 480, 29, 75, 73, 74, 25429, 14, 2782, 1151, 5189, 10669, 1238, 2481, 198, 198, 2, 28, 198, 31694, 5984, 51, 198, 2559, 18604, 198, 32, 2829, 7071, 329, 257, 14143, 6131, 13, 198, 46249, 198, 198, 37811, 198, 220, 22...
2.539961
513
<filename>julia/p029.jl function compute() """ seen=Set{BigInt}() for a=2:100 for b=2:100 d=BigInt(a); push!(seen,d^b) end end return length(seen) """ seen=Set(a^b for a::BigInt in 2:100 for b::BigInt in 2:100) return length(seen) end println(compute())
[ 27, 34345, 29, 73, 43640, 14, 79, 48891, 13, 20362, 198, 8818, 24061, 3419, 201, 198, 197, 37811, 201, 198, 197, 15898, 28, 7248, 90, 12804, 5317, 92, 3419, 201, 198, 197, 1640, 257, 28, 17, 25, 3064, 201, 198, 197, 197, 1640, 275...
1.934641
153
<filename>test/plotrecipes.jl using Rasters, Test, Dates, Plots ga2 = Raster(ones(91) * (-25:15)', (X(0.0:4.0:360.0), Y(-25.0:1.0:15.0), ); name=:Test) ga3 = Raster(rand(10, 41, 91), (Z(100:100:1000), Y(-20.0:1.0:20.0), X(0.0:4.0:360.0))) ga4ti = Raster( rand(10, 41, 91, 4), (Z(100:100:1000), Y(-20.0:1.0:20.0...
[ 27, 34345, 29, 9288, 14, 29487, 8344, 18636, 13, 20362, 198, 3500, 371, 7060, 11, 6208, 11, 44712, 11, 1345, 1747, 198, 198, 4908, 17, 796, 371, 1603, 7, 1952, 7, 6420, 8, 1635, 13841, 1495, 25, 1314, 8, 3256, 357, 55, 7, 15, 13...
1.962617
535
export reconstruction_direct_2d, reconstruction_direct_3d """ reconstruction_direct(acqData::AcquisitionData, reconSize::NTuple{D,Int64}, weights::Vector{Vector{Complex{<:AbstractFloat}}}, correctionMap::Array{Complex{<:AbstractFloat}}=Complex{<:AbstractFloat}[]) Performs a direct Fourier-based image reconstructi...
[ 39344, 25056, 62, 12942, 62, 17, 67, 11, 25056, 62, 12942, 62, 18, 67, 198, 198, 37811, 198, 220, 220, 220, 25056, 62, 12942, 7, 330, 80, 6601, 3712, 12832, 421, 10027, 6601, 11, 8195, 10699, 3712, 11251, 29291, 90, 35, 11, 5317, ...
2.377584
919
<filename>examples/logistic_regression.jl<gh_stars>100-1000 # # Logistic Regression # The presented example is adapted from the [Machine Learning - course by <NAME>](https://www.coursera.org/learn/machine-learning). # # In this example we use logistic regression to estimate the parameters $\theta_i$ of a logistic model...
[ 27, 34345, 29, 1069, 12629, 14, 6404, 2569, 62, 2301, 2234, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 1303, 5972, 2569, 3310, 2234, 198, 2, 383, 5545, 1672, 318, 16573, 422, 262, 685, 37573, 18252, 532, 1781, 416, ...
2.538947
3,800
using Test using CellMLToolkit using DifferentialEquations, Plots path = @__DIR__ ml = CellModel(path * "/../models/beeler_reuter_1977.cellml.xml") # @test length(ml.eqs) == 8 # @test ml.iv.op.name == :time # eqs, vs = CellMLToolkit.flat_equations(ml) # @test length(vs) == 8 # @test find_V(ml).op.name == :V prob =...
[ 3500, 6208, 198, 3500, 12440, 5805, 25391, 15813, 198, 3500, 20615, 498, 23588, 602, 11, 1345, 1747, 198, 198, 6978, 796, 2488, 834, 34720, 834, 198, 4029, 796, 12440, 17633, 7, 6978, 1635, 12813, 40720, 27530, 14, 1350, 417, 263, 62, ...
2.134522
617
using StochasticDiffEq#, Plots Random.seed!(100) prob = prob_sde_2Dlinear ## Solve and plot println("Solve and Plot") #Let the solver determine the initial stepsize for you! sol =solve(prob,SRI()) TEST_PLOT && plot(sol,plot_analytic=true) #gui() #Make sure it does a good job sol.t[2] > 1e-7
[ 3500, 520, 5374, 3477, 28813, 36, 80, 2, 11, 1345, 1747, 198, 29531, 13, 28826, 0, 7, 3064, 8, 198, 1676, 65, 796, 1861, 62, 82, 2934, 62, 17, 35, 29127, 198, 198, 2235, 4294, 303, 290, 7110, 198, 35235, 7203, 50, 6442, 290, 281...
2.5
118
# # Fast Nearest Neighbor Search on python using kd-tree # # author: <NAME> # module jufastnns using NearestNeighbors using PyCall @pyimport matplotlib.pyplot as plt function printmat(A) for i in 1:length(A[1,:]) println(A[:,i]) end end function test_3d() data3d = rand(3, 5000) # print(dat...
[ 2, 198, 2, 12549, 3169, 12423, 28708, 11140, 319, 21015, 1262, 479, 67, 12, 21048, 198, 2, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 198, 198, 21412, 474, 3046, 459, 77, 5907, 198, 198, 3500, 3169, 12423, 46445, 32289, 198, 3500, ...
2.083333
528
# Julia wrapper for header: /usr/include/scip/cons_symresack.h # Automatically generated using Clang.jl wrap_c function SCIPincludeConshdlrSymresack(scip) ccall((:SCIPincludeConshdlrSymresack, libscip), SCIP_RETCODE, (Ptr{SCIP_},), scip) end function SCIPcreateSymbreakCons(scip, cons, name, perm, vars, nvars, in...
[ 2, 22300, 29908, 329, 13639, 25, 1220, 14629, 14, 17256, 14, 1416, 541, 14, 5936, 62, 37047, 411, 441, 13, 71, 198, 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 628, 198, 8818, 6374, 4061, 17256, 9444, 31298, 140...
2.566343
618
<filename>Julia Monte Carlo Fitting/Example.jl using DifferentialEquations,ParameterizedFunctions, DiffEqParamEstim #DiffEq using RecursiveArrayTools, StatsBase,Distributions #Vector of Arrays and stats using StatsPlots, CSV, DataFrames,Printf,Dierckx,ProgressMeter using AverageShiftedHistograms, DelimitedFiles #######...
[ 27, 34345, 29, 16980, 544, 22489, 40089, 376, 2535, 14, 16281, 13, 20362, 198, 3500, 20615, 498, 23588, 602, 11, 36301, 1143, 24629, 2733, 11, 10631, 36, 80, 22973, 22362, 320, 1303, 28813, 36, 80, 198, 3500, 3311, 30753, 19182, 33637, ...
2.247619
2,415
# IO for the AbstractSolutionData (and maybe other?) objects """ This function writes an array to a file an an efficient manner. Ovewrites existing file with same name. **Inputs** * fname: the file name, including extension. Can be a relative or absolute path * arr: the array to write. Its...
[ 2, 24418, 329, 262, 27741, 46344, 6601, 357, 392, 3863, 584, 10091, 5563, 198, 198, 37811, 198, 220, 770, 2163, 6797, 281, 7177, 284, 257, 2393, 281, 281, 6942, 5642, 13, 220, 440, 303, 8933, 274, 198, 220, 4683, 2393, 351, 976, 143...
2.821179
1,577
<filename>test/runtests.jl # # Correctness Tests # using Base.Test using DataFrames my_tests = ["extras.jl", "data.jl", "index.jl", "dataframe.jl", "operators.jl", "io.jl", # "formula.jl", "datastream.jl", "constructors.jl...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 2, 198, 2, 22941, 1108, 30307, 198, 2, 198, 198, 3500, 7308, 13, 14402, 198, 3500, 6060, 35439, 198, 198, 1820, 62, 41989, 796, 14631, 2302, 8847, 13, 20362, 1600, 198, 220, ...
1.720317
379
using Documenter, FrankWolfe using SparseArrays using LinearAlgebra using Literate, Test const _EXAMPLE_DIR = joinpath(@__DIR__, "src", "examples") """ _include_sandbox(filename) Include the `filename` in a temporary module that acts as a sandbox. (Ensuring no constants or functions leak into other files.) """ f...
[ 3500, 16854, 263, 11, 5278, 32069, 68, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 44800, 2348, 29230, 198, 198, 3500, 17667, 378, 11, 6208, 198, 198, 9979, 4808, 6369, 2390, 16437, 62, 34720, 796, 4654, 6978, 7, 31, 834, 34720, 8...
2.35084
952
@rule typeof(dot)(:in1, Marginalisation) (m_out::UnivariateNormalDistributionsFamily, m_in2::PointMass, meta::AbstractCorrection) = begin return @call_rule typeof(dot)(:in2, Marginalisation) (m_out = m_out, m_in1 = m_in2, meta = meta) end
[ 198, 31, 25135, 2099, 1659, 7, 26518, 5769, 25, 259, 16, 11, 11899, 1292, 5612, 8, 357, 76, 62, 448, 3712, 3118, 42524, 26447, 20344, 2455, 507, 24094, 11, 285, 62, 259, 17, 3712, 12727, 20273, 11, 13634, 3712, 23839, 43267, 8, 796,...
2.663043
92
import GPLinearODEMaker.powers_of_negative_one """ pp_kernel(hyperparameters, Ξ΄, dorder; shift_ind=0) Created by kernel_coder(). Requires 1 hyperparameters. Likely created using pp_kernel_base() as an input. Use with include("src/kernels/pp_kernel.jl"). # Arguments - `hyperparameters::Vector`: The hyperparameter...
[ 11748, 38644, 259, 451, 3727, 3620, 3110, 13, 30132, 62, 1659, 62, 31591, 62, 505, 198, 198, 37811, 198, 220, 220, 220, 9788, 62, 33885, 7, 49229, 17143, 7307, 11, 7377, 112, 11, 288, 2875, 26, 6482, 62, 521, 28, 15, 8, 198, 198, ...
1.463923
7,581
# This file includes code that was formerly a part of Julia. # License is MIT: LICENSE.md using ModuleInterfaceTools using Random @api test StrBase # Should test GenericString also, once overthing else is working const UnicodeStringTypes = (String, UTF8Str, ) # (String, UTF16Str, UTF32Str, UniStr, UTF8Str) cons...
[ 2, 770, 2393, 3407, 2438, 326, 373, 15734, 257, 636, 286, 22300, 13, 198, 2, 13789, 318, 17168, 25, 38559, 24290, 13, 9132, 198, 198, 3500, 19937, 39317, 33637, 198, 198, 3500, 14534, 198, 198, 31, 15042, 1332, 4285, 14881, 198, 198, ...
2.740576
451
<filename>src/services/app_mesh.jl # This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: app_mesh using AWS.Compat using AWS.UUIDs """ CreateGatewayRoute() Creates a gateway route. A gateway route is attached to a virtual gateway and routes traffic to an existing virtu...
[ 27, 34345, 29, 10677, 14, 30416, 14, 1324, 62, 76, 5069, 13, 20362, 198, 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 598, 62, 76, 5069, ...
3.207254
17,452
using Test using MeshCat using MeshCatMechanisms using RigidBodyDynamics using RigidBodyDynamics.OdeIntegrators using CoordinateTransformations: Translation using ValkyrieRobot using NBInclude using StaticArrays vis = Visualizer() @testset "MeshCatMechanisms" begin @testset "URDF mechanism" begin urdf = j...
[ 3500, 6208, 198, 3500, 47529, 21979, 198, 3500, 47529, 21979, 28452, 272, 6583, 198, 3500, 24666, 312, 25842, 35, 4989, 873, 198, 3500, 24666, 312, 25842, 35, 4989, 873, 13, 46, 2934, 34500, 18942, 198, 3500, 22819, 4559, 41762, 602, 25...
2.035266
2,552
# Copyright Β© nhdalyMadeThis, LLC # Released under MIT License module HueClone using Colors using Rematch # For matching text-based user input export play_blink, play_juno const DEFAULT_ROWS, DEFAULT_COLS = 6,4 function create_colors_grid(rows, cols) corners = rand(RGB, 4) topleft,topright,bottomleft,bott...
[ 2, 15069, 10673, 299, 31298, 3400, 24616, 1212, 11, 11419, 198, 2, 28728, 739, 17168, 13789, 198, 198, 21412, 31788, 2601, 505, 198, 198, 3500, 29792, 198, 3500, 3982, 963, 1303, 1114, 12336, 2420, 12, 3106, 2836, 5128, 198, 198, 39344,...
2.071552
2,306
<reponame>russelljjarvis/SpikingNeuralNetworks.jl """ Julia SNN Implementation of AdExp Neuron. [Adaptive_exponential_integrate and fire neuron](http://www.scholarpedia.org/article/Adaptive_exponential_integrate-and-fire_model) Dr. <NAME> <NAME>, <NAME>, Paris, France """ @snn_kw struct ADEXParameter{FT=Float32} ...
[ 27, 7856, 261, 480, 29, 14932, 7255, 73, 9491, 4703, 14, 4561, 14132, 8199, 1523, 7934, 5225, 13, 20362, 198, 37811, 198, 16980, 544, 311, 6144, 46333, 286, 1215, 16870, 3169, 44372, 13, 198, 58, 48003, 425, 62, 11201, 35470, 62, 1890...
1.679558
1,267
<filename>test/test_AbatementCosts.jl using DataFrames using Test m = page_model() for gas in [:CO2, :CH4, :N2O, :Lin] abatementcostparameters = MimiPAGE2009.addabatementcostparameters(m, gas) abatementcosts = MimiPAGE2009.addabatementcosts(m, gas) abatementcostparameters[:yagg] = readpagedata(m,"test/v...
[ 27, 34345, 29, 9288, 14, 9288, 62, 4826, 265, 972, 13729, 82, 13, 20362, 198, 198, 3500, 6060, 35439, 198, 3500, 6208, 198, 198, 76, 796, 2443, 62, 19849, 3419, 198, 198, 1640, 3623, 287, 685, 25, 8220, 17, 11, 1058, 3398, 19, 11,...
2.202911
1,168
module Pathogen # Dependencies using Distributed, DataFrames, Distributions, RecipesBase, Logging, StatsBase, Statistics, ProgressMeter, LinearAlgebra, OnlineStats, PhyloModels, Random # Methods for functions not in Base i...
[ 21412, 10644, 6644, 628, 220, 1303, 37947, 3976, 198, 220, 1262, 4307, 6169, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 35439, 11, 198, 220, 220, 220, 220, 220, 220, 220, 46567, 507, 11, 198, 220, 220, 220, 220, 220, 220, 2...
2.892734
1,156
module utils using LinearAlgebra using Statistics: mean export check_index,clear_output,_average_helper,convert2array,convert_1d,_check_curve,_calculate_for_curves, _calculate_for_curves_with_matrices, _trapz, _validate_distance_input global CONVERT_ARRAY_TYPE = true global ARRAY_TYPE = AbstractArray global SUPRESS_W...
[ 21412, 3384, 4487, 198, 198, 3500, 44800, 2348, 29230, 198, 3500, 14370, 25, 1612, 198, 39344, 2198, 62, 9630, 11, 20063, 62, 22915, 11, 62, 23913, 62, 2978, 525, 11, 1102, 1851, 17, 18747, 11, 1102, 1851, 62, 16, 67, 11, 62, 9122, ...
2.805195
2,156
<filename>benchmark/benchmarks.jl using Tensors using BenchmarkTools using ForwardDiff const SUITE = BenchmarkGroup() const ALL_DIMENSIONS = true const MIXED_SYM_NONSYM = true const MIXED_ELTYPES = true const dT = ForwardDiff.Dual{Nothing,Float64,4} function create_tensors() tensor_dict = Dict{Tuple{Int, Int, Da...
[ 27, 34345, 29, 26968, 4102, 14, 26968, 14306, 13, 20362, 198, 3500, 40280, 669, 198, 3500, 25187, 4102, 33637, 198, 3500, 19530, 28813, 198, 198, 9979, 13558, 12709, 796, 25187, 4102, 13247, 3419, 198, 9979, 11096, 62, 35, 3955, 16938, ...
2.109164
742
<reponame>kura-okubo/SeisXcorrelation using SeisIO, SeisNoise, JLD2, PlotlyJS, StatsBase, Sockets, ORCA, Statistics include("../pairing.jl") include("../reference.jl") include("../stacking.jl") function plot_seismograms(finame::String, stn::String; norm_factor=nothing, sparse::Int64=1, foname::String="", show::Bool=t...
[ 27, 7856, 261, 480, 29, 74, 5330, 12, 482, 549, 78, 14, 4653, 271, 55, 10215, 49501, 198, 3500, 1001, 271, 9399, 11, 1001, 271, 2949, 786, 11, 449, 11163, 17, 11, 28114, 306, 20120, 11, 20595, 14881, 11, 311, 11603, 11, 6375, 8141...
1.969243
9,754
using SparseSpatialPrecisionMatrices using Plots using TriangleMesh using Clustering using LinearAlgebra, SparseArrays using Distributions using PDMats using Random Random.seed!(1) n = 2_000 pts = 100 * rand(n-4, 2) nodes = collect(kmeans(pts', 500).centers') # corners = [-20 -20; 120 -20; 120 120; -20 120] corners =...
[ 3500, 1338, 17208, 4561, 34961, 6719, 16005, 19044, 45977, 198, 3500, 1345, 1747, 198, 3500, 33233, 37031, 198, 3500, 1012, 436, 1586, 198, 3500, 44800, 2348, 29230, 11, 1338, 17208, 3163, 20477, 198, 3500, 46567, 507, 198, 3500, 14340, 4...
2.330882
408
abstract type AbstractBSONReader end struct BSONReader{S <: DenseVector{UInt8}, V <: BSONValidator} <: AbstractBSONReader src::S offset::Int type::UInt8 validator::V end @inline function BSONReader(src::DenseVector{UInt8}, validator = LightBSONValidator()) validate_root(validator, src) BSONRea...
[ 397, 8709, 2099, 27741, 4462, 1340, 33634, 886, 198, 198, 7249, 347, 11782, 33634, 90, 50, 1279, 25, 360, 1072, 38469, 90, 52, 5317, 23, 5512, 569, 1279, 25, 347, 11782, 47139, 1352, 92, 1279, 25, 27741, 4462, 1340, 33634, 198, 220, ...
2.320683
7,615
<filename>src/datasets/flatland/agent.jl Base.@kwdef mutable struct Agent handle::Int earliest_departure::Int latest_arrival::Int initial_position::Tuple{Int,Int} initial_direction::Int target_position::Tuple{Int,Int} end function Agent(pyagent::Py) handle = pyconvert(Int, pyagent.handle) +...
[ 27, 34345, 29, 10677, 14, 19608, 292, 1039, 14, 38568, 1044, 14, 25781, 13, 20362, 198, 14881, 13, 31, 46265, 4299, 4517, 540, 2878, 15906, 198, 220, 220, 220, 5412, 3712, 5317, 198, 220, 220, 220, 14555, 62, 10378, 433, 495, 3712, ...
2.755299
519
using Test using carnivalparty @testset "My test" begin @test 1 + 1 β‰ˆ 2 end
[ 198, 3500, 6208, 198, 3500, 18466, 2473, 10608, 198, 198, 31, 9288, 2617, 366, 3666, 1332, 1, 2221, 198, 220, 2488, 9288, 352, 1343, 352, 15139, 230, 362, 198, 437, 628 ]
2.612903
31
<gh_stars>0 # This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: elastic_load_balancing using AWS.Compat using AWS.UUIDs """ add_tags(load_balancer_names, tags) add_tags(load_balancer_names, tags, params::Dict{String,<:Any}) Adds the specified tags to the specified load balancer. E...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 27468, 62, 2220, 62, 6893, 5077, 198, 3500, 30865, 13, 4007...
3.399481
12,321
<gh_stars>1-10 const categoricalplottypes = [BarPlot, Heatmap, Volume] function compute_edges(intervals::Tuple, bins, closed) bs = bins isa Tuple ? bins : map(_ -> bins, intervals) return map(intervals, bs) do (min, max), b b isa AbstractVector && return b b isa Integer && return histrange(floa...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 9979, 4253, 12409, 29487, 19199, 796, 685, 10374, 43328, 11, 12308, 8899, 11, 14701, 60, 198, 198, 8818, 24061, 62, 276, 3212, 7, 3849, 12786, 3712, 51, 29291, 11, 41701, 11, 4838, 8, 198, ...
2.900372
1,345
<reponame>vollmersj/coexist-julia<gh_stars>1-10 # Library Imports #Based on England data (CHESS and NHS England) # I want a way to keep this as the "average" disease progression, # but modify it such that old people have less favorable outcomes (as observed) # But correspondingly I want people at lower risk to have mo...
[ 27, 7856, 261, 480, 29, 85, 692, 11056, 73, 14, 1073, 38476, 12, 73, 43640, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 10074, 1846, 3742, 198, 198, 2, 15001, 319, 4492, 1366, 357, 3398, 7597, 290, 18183, 4492, 8, 198, 2, 314, ...
2.206107
13,721
""" Plot example file, and create a matlab file for good measure. If you are not interested in the matlab file comment out those sections. """ # Pkg.add("Plots") # uncomment for first run # Pkg.add("Revise") # uncomment for first run # using Revise using MAT using HDF5 using Plots using Gantner # loa...
[ 37811, 201, 198, 43328, 1672, 2393, 11, 290, 2251, 257, 2603, 23912, 2393, 329, 922, 3953, 13, 220, 1002, 345, 389, 407, 4609, 287, 262, 220, 201, 198, 6759, 23912, 2393, 2912, 503, 883, 9004, 13, 201, 198, 37811, 201, 198, 201, 198...
2.436725
403
<reponame>ntselepidis/FinalProjectRepo.jl if !@isdefined USE_GPU const USE_GPU = length(ARGS) > 0 && ARGS[1] == "gpu" end using Test using LinearAlgebra using ParallelStencil if !ParallelStencil.is_initialized() @static if USE_GPU @init_parallel_stencil(CUDA, Float64, 2) else @init_paralle...
[ 27, 7856, 261, 480, 29, 429, 325, 293, 79, 29207, 14, 19006, 16775, 6207, 78, 13, 20362, 198, 361, 5145, 31, 271, 23211, 23210, 62, 33346, 198, 220, 220, 220, 1500, 23210, 62, 33346, 796, 4129, 7, 1503, 14313, 8, 1875, 657, 11405, ...
2.076037
434
<filename>test/runtests.jl # addprocs(3) using Test # using Compat # using IncrementalInference @testset "out of module evalPotential..." begin include("TestModuleFunctions.jl") end include("testStateMachine.jl") include("testCompareVariablesFactors.jl") @testset "Ensure memory return is working properly..." be...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 2, 751, 1676, 6359, 7, 18, 8, 198, 3500, 6208, 198, 2, 1262, 3082, 265, 198, 2, 1262, 10791, 37098, 818, 4288, 198, 198, 31, 9288, 2617, 366, 448, 286, 8265, 5418, 25396, ...
2.984932
730
<filename>src/utility.jl function _sum_dimensions(h) dim = 0 for hh in values(h) dim += dimension(hh) end return dim end
[ 27, 34345, 29, 10677, 14, 315, 879, 13, 20362, 198, 8818, 4808, 16345, 62, 27740, 5736, 7, 71, 8, 198, 220, 220, 220, 5391, 796, 657, 198, 220, 220, 220, 329, 289, 71, 287, 3815, 7, 71, 8, 198, 220, 220, 220, 220, 220, 220, 22...
2.19697
66
<gh_stars>10-100 (p::Polynomial)(s...) = MP.substitute(MP.Eval(), p, s) (t::Term)(s...) = MP.substitute(MP.Eval(), t, s) (m::Monomial)(s...) = MP.substitute(MP.Eval(), m, s) (v::Variable)(s...) = MP.substitute(MP.Eval(), v, s)
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 7, 79, 3712, 34220, 26601, 498, 5769, 82, 23029, 796, 4904, 13, 7266, 301, 3678, 7, 7378, 13, 36, 2100, 22784, 279, 11, 264, 8, 198, 7, 83, 3712, 40596, 5769, 82, 23029, 220, 220, 220,...
1.991597
119
module PackageCompiler using Libdl, SnoopCompile Sys.iswindows() && using WinRPM include("compiler_flags.jl") include("static_julia.jl") include("api.jl") include("snooping.jl") include("system_image.jl") const sysimage_binaries = ("sys.$(Libdl.dlext)",) function copy_system_image(src, dest, ignore_missing = false)...
[ 21412, 15717, 7293, 5329, 198, 198, 3500, 7980, 25404, 11, 42578, 404, 7293, 576, 198, 44387, 13, 271, 28457, 3419, 11405, 1262, 7178, 49, 5868, 198, 198, 17256, 7203, 5589, 5329, 62, 33152, 13, 20362, 4943, 198, 17256, 7203, 12708, 62,...
2.627277
2,031
""" Returns the boundingbox of a patch in terms of its center and halfsize. function boundingbox{U,D,C,N,T}(p::Simplex{U,D,C,N,T}) -> center, halfsize """ function boundingbox(p::Simplex{U,D,C,N,T}) where {U,D,C,N,T} # ll = minimum(p.vertices) # ur = maximum(p.vertices) ll = first(p.vertices); for v ...
[ 37811, 198, 35561, 262, 5421, 278, 3524, 286, 257, 8529, 287, 2846, 286, 663, 3641, 290, 2063, 7857, 13, 628, 220, 220, 220, 2163, 5421, 278, 3524, 90, 52, 11, 35, 11, 34, 11, 45, 11, 51, 92, 7, 79, 3712, 8890, 11141, 90, 52, ...
2.27027
370
include("../utils.jl") @testset "write_figure" begin # p = plot([1,2],[3,4]) # s = G.write_figure(gcf(); debug=true) # @test occursin(s, """ # size 12.0 9.0 # set font texcmss hei 0.35 # """) end
[ 17256, 7203, 40720, 26791, 13, 20362, 4943, 628, 198, 31, 9288, 2617, 366, 13564, 62, 26875, 1, 2221, 198, 220, 220, 220, 1303, 279, 796, 7110, 26933, 16, 11, 17, 38430, 18, 11, 19, 12962, 198, 220, 220, 220, 1303, 264, 796, 402, ...
2
117
<filename>src/regularization_methods/relaxation_algo.jl """ mpcc_solve: Relaxation method for the MPCC. `mpcc_solve(:: MPCCStopping; verbose :: Bool = true, kwargs...)` Note: kwargs are passed to the ParamMPCC structure See also: *ParamMPCC*, *solveIpopt* """ function mpcc_solve(stp :: MPCCStopping; verbose :: Bool ...
[ 27, 34345, 29, 10677, 14, 16338, 1634, 62, 24396, 82, 14, 2411, 897, 341, 62, 282, 2188, 13, 20362, 198, 37811, 198, 3149, 535, 62, 82, 6442, 25, 46883, 341, 2446, 329, 262, 4904, 4093, 13, 198, 198, 63, 3149, 535, 62, 82, 6442, ...
1.702394
2,799
@testset "Lattice" begin param = Dict{String,Any}("L" => 3) @testset "$lname" for (lname, latt) in [("dimer", dimer_lattice), ("chain", chain_lattice), ("square", square_lattice), ...
[ 31, 9288, 2617, 366, 43, 1078, 501, 1, 2221, 628, 220, 220, 220, 5772, 796, 360, 713, 90, 10100, 11, 7149, 92, 7203, 43, 1, 5218, 513, 8, 198, 220, 220, 220, 2488, 9288, 2617, 17971, 75, 3672, 1, 329, 357, 75, 3672, 11, 47240, ...
1.501818
825
using ChainRulesCore using Random import ChainRulesCore: frule, rrule using LinearAlgebra const RealOrComplex = Union{Real, Complex} # Addition function frule( (_, Ξ”A, Ξ”B), ::typeof(+), A::Array{<:RealOrComplex}, B::Array{<:RealOrComplex}, ) Ξ© = A + B βˆ‚Ξ© = Ξ”A + Ξ”B return (Ξ©, βˆ‚Ξ©) end # Mult...
[ 3500, 21853, 37766, 14055, 198, 3500, 14534, 198, 11748, 21853, 37766, 14055, 25, 12658, 293, 11, 374, 25135, 198, 3500, 44800, 2348, 29230, 198, 9979, 6416, 5574, 5377, 11141, 796, 4479, 90, 15633, 11, 19157, 92, 198, 198, 2, 3060, 653...
1.855728
707
<reponame>hamzaelsaawy/Factors.jl<gh_stars>1-10 # # Factors Broadcast Tests # @testset "Factors Broadcast" begin @testset "basic" begin Ο• = Factor([:X, :Y], [1 2; 3 4; 5 6]) @test_approx_eq( broadcast(*, Ο•, [:Y, :X], [[10, 0.1], 100.0]).potential, Float64[10...
[ 27, 7856, 261, 480, 29, 2763, 4496, 1424, 64, 707, 88, 14, 29054, 669, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 201, 198, 2, 41140, 44244, 30307, 201, 198, 2, 201, 198, 201, 198, 31, 9288, 2617, 366, 29054, 669, ...
1.824197
529
<filename>autodiff/test/test_dual_2.jl include("../src/autodiff_module.jl") include("../../__lib__/math/common/numder/src/numder_module.jl") module dtest using PyPlot PyPlot.pygui(true) using ..autodiff using ..numder x = autodiff.DualNumber(1.0) y = autodiff.DualNumber(3.0) z = x + y fcn1(x...
[ 27, 34345, 29, 2306, 375, 733, 14, 9288, 14, 9288, 62, 646, 282, 62, 17, 13, 20362, 198, 201, 198, 201, 198, 17256, 7203, 40720, 10677, 14, 2306, 375, 733, 62, 21412, 13, 20362, 4943, 201, 198, 17256, 7203, 40720, 40720, 834, 8019, ...
1.751131
442
export ishexcolor function ishexcolor(str::AbstractString)::Bool hexcolorReg = r"^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$"i return contains(str, hexcolorReg) end
[ 39344, 318, 33095, 8043, 198, 198, 8818, 318, 33095, 8043, 7, 2536, 3712, 23839, 10100, 2599, 25, 33, 970, 198, 220, 220, 220, 17910, 8043, 8081, 796, 374, 1, 61, 2, 30, 26933, 15, 12, 24, 32, 12, 37, 60, 90, 18, 92, 91, 58, 1...
1.896907
97
<filename>JuliaEMSOModels/heat_exchangers/HEX_Engine/DoublePipe_HeatTransfer.jl #------------------------------------------------------------------- #* 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 F...
[ 27, 34345, 29, 16980, 544, 39201, 2662, 375, 1424, 14, 25080, 62, 1069, 354, 6606, 14, 39, 6369, 62, 13798, 14, 25628, 47, 3757, 62, 39596, 43260, 13, 20362, 198, 2, 10097, 6329, 198, 2, 9, 41363, 46, 9104, 10074, 357, 3620, 43, 8...
2.337294
1,094
function maximumsimultlicenses(io::IO) out, maxout, maxtimes = 0, -1, String[] for job in readlines(io) out += ifelse(occursin("OUT", job), 1, -1) if out > maxout maxout = out empty!(maxtimes) end if out == maxout push!(maxtimes, split(job)[4])...
[ 8818, 5415, 14323, 586, 677, 4541, 7, 952, 3712, 9399, 8, 198, 220, 220, 220, 503, 11, 3509, 448, 11, 17266, 742, 999, 796, 657, 11, 532, 16, 11, 10903, 21737, 198, 220, 220, 220, 329, 1693, 287, 1100, 6615, 7, 952, 8, 198, 220,...
2.198444
257
""" parseqps([t::Type{T}, ]filename::AbstractString) -> mps Parse QPS formatted file `filename`. `T` must be an `AbstractFloat` type. When only `filename` is provided, the first argument defaults to `Float64`. `mps` is of `MPSDescription` type. It contains the description of the the following optimization problem...
[ 37811, 198, 220, 220, 220, 21136, 80, 862, 26933, 83, 3712, 6030, 90, 51, 5512, 2361, 34345, 3712, 23839, 10100, 8, 4613, 285, 862, 198, 198, 10044, 325, 1195, 3705, 39559, 2393, 4600, 34345, 44646, 4600, 51, 63, 1276, 307, 281, 4600,...
1.900429
4,891
module MJPlayGround # package code goes here using JuMP a=2; a b end # module
[ 21412, 33974, 11002, 35539, 198, 198, 2, 5301, 2438, 2925, 994, 198, 198, 3500, 12585, 7378, 198, 64, 28, 17, 26, 198, 64, 198, 65, 198, 437, 1303, 8265, 198 ]
2.666667
30
<reponame>pushingPulling/BALL.jl export KernelInterface """ Objects can be selected and deselected for certain operations (in the future). Supertype of [`AbstractComposite`](@ref). """ abstract type Selectable end """ Interface which `KERNEL` types implement. See [`AbstractComposite`](@ref) and [`DataFrameSystem`](@r...
[ 27, 7856, 261, 480, 29, 79, 8023, 42940, 278, 14, 45463, 13, 20362, 198, 39344, 32169, 39317, 198, 37811, 198, 10267, 82, 460, 307, 6163, 290, 748, 28604, 329, 1728, 4560, 357, 259, 262, 2003, 737, 3115, 4906, 286, 685, 63, 23839, 5...
3.213904
187
<reponame>vavrines/KitBase.jl<filename>test/test_solver_scalar.jl # scalar set = Setup( "scalar", # matter "advection", # case "1d0f0v", # space "gks", # flux "", # collision: for scalar conservation laws there are none 1, # species 1, # interpolation order "vanleer", # limiter "peri...
[ 27, 7856, 261, 480, 29, 85, 615, 81, 1127, 14, 20827, 14881, 13, 20362, 27, 34345, 29, 9288, 14, 9288, 62, 82, 14375, 62, 1416, 282, 283, 13, 20362, 198, 2, 16578, 283, 198, 2617, 796, 31122, 7, 198, 220, 220, 220, 366, 1416, 28...
2.135501
369
<reponame>ziotom78/SolidState.jl<gh_stars>0 module SolidState using ColorTypes using Images using Interpolations: LinearInterpolation using LinearAlgebra using Printf using StaticArrays include("types.jl") include("transformations.jl") include("cameras.jl") include("materials.jl") include("shapes.jl") include("render...
[ 27, 7856, 261, 480, 29, 89, 5151, 296, 3695, 14, 46933, 9012, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 15831, 9012, 198, 198, 3500, 5315, 31431, 198, 3500, 5382, 198, 3500, 4225, 16104, 602, 25, 44800, 9492, 16104, 341, 19...
3.090909
110
import Base: get, length, show export CosDict, CosString, CosXString, CosLiteralString, CosNumeric, CosBoolean, CosTrue, CosFalse, CosObject, CosNull, CosNullType, CosFloat, CosInt, CosArray, CosName, CosDict, CosIndirectObjectRef, CosStream, set!, @cn_str, createTreeNode, CosTreeNode, CosIndirectObject, ...
[ 11748, 7308, 25, 651, 11, 4129, 11, 905, 198, 198, 39344, 10437, 35, 713, 11, 10437, 10100, 11, 10437, 55, 10100, 11, 10437, 43, 270, 1691, 10100, 11, 10437, 45, 39223, 11, 198, 220, 220, 220, 10437, 46120, 13087, 11, 10437, 17821, ...
2.353103
6,171
VERSION >= v"0.5-" && __precompile__(true) module Temporal using Base.Dates using Requests export TS, ts, size, overlaps, ojoin, ijoin, ljoin, rjoin, merge, hcat, vcat, head, tail, nanrows, nancols, dropnan, fillnan, fillnan!, ffill!, bfill!, linterp!, numfun, arrfun, op, ones, zeros, trues, false...
[ 43717, 18189, 410, 1, 15, 13, 20, 21215, 11405, 11593, 3866, 5589, 576, 834, 7, 7942, 8, 198, 198, 21412, 5825, 35738, 198, 3500, 7308, 13, 35, 689, 198, 3500, 9394, 3558, 198, 198, 39344, 198, 220, 220, 220, 26136, 11, 40379, 11, ...
2.431953
338
using Markov using Catlab using Catlab.Theories using Test X = Ob(FreeCartesianCategory, :Float64) u = Hom(x->x*rand(), X, X) uβ‚€ = Hom(()->rand(), munit(FreeCartesianCategory.Ob), X) crand(uβ‚€βŠ—uβ‚€) meantest(f::Function, ΞΌ::Real, n::Int, Ο΅::Real) = begin ΞΌΜ‚ = sum(map(f, 1:n))/n @test ΞΌ - Ο΅ < ΞΌΜ‚ @test ΞΌΜ‚ < ΞΌ...
[ 3500, 2940, 709, 198, 3500, 5181, 23912, 198, 3500, 5181, 23912, 13, 464, 1749, 198, 3500, 6208, 198, 198, 55, 796, 1835, 7, 11146, 43476, 35610, 27313, 11, 1058, 43879, 2414, 8, 198, 84, 796, 8074, 7, 87, 3784, 87, 9, 25192, 22784,...
1.792299
857
using Talkon using ConfigEnv dotenv() db = initialize("varTEST.data") talka(db)
[ 3500, 12167, 261, 201, 198, 3500, 17056, 4834, 85, 201, 198, 201, 198, 26518, 24330, 3419, 201, 198, 201, 198, 9945, 796, 41216, 7203, 7785, 51, 6465, 13, 7890, 4943, 201, 198, 16620, 64, 7, 9945, 8, 201, 198 ]
2.282051
39
<reponame>kylejbrown17/GraphUtils.jl<filename>src/cached_elements.jl export CachedElement, get_element, is_up_to_date, time_stamp, set_up_to_date!, set_element!, set_time_stamp!, update_element! """ CachedElement{E} A mutable container for caching things. """ mutable struct CachedE...
[ 27, 7856, 261, 480, 29, 74, 2349, 73, 33282, 1558, 14, 37065, 18274, 4487, 13, 20362, 27, 34345, 29, 10677, 14, 66, 2317, 62, 68, 3639, 13, 20362, 198, 39344, 198, 220, 220, 220, 327, 2317, 20180, 11, 198, 220, 220, 220, 651, 62, ...
2.476234
1,094
<filename>backend/anime_data/snapshots_38297.jl<gh_stars>1-10 {"score_count": 36149, "timestamp": 1578503338.0, "score": 6.56} {"score_count": 36149, "timestamp": 1578503279.0, "score": 6.56} {"score_count": 31898, "timestamp": 1573924410.0, "score": 6.57} {"score_count": 28405, "timestamp": 1571545468.0, "score": 6.57...
[ 27, 34345, 29, 1891, 437, 14, 272, 524, 62, 7890, 14, 45380, 20910, 62, 2548, 26561, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 4895, 26675, 62, 9127, 1298, 4570, 19442, 11, 366, 16514, 27823, 1298, 1315, 3695, 1120, 2091,...
2.346505
987
using LinearAlgebra # k_local(Elastic Modulus,thickness,height,length,number of nodes,row/column one, row/column two) #creates local stiffness matrix and maps to global function k_local(k,l,n,rc_1,rc_2) k_global = zeros(n,n) k_global[rc_1,rc_1] = k k_global[rc_1,rc_2] = -k k_global[rc_2,rc_1]...
[ 3500, 44800, 2348, 29230, 201, 198, 201, 198, 2, 479, 62, 12001, 7, 9527, 3477, 3401, 23515, 11, 400, 624, 1108, 11, 17015, 11, 13664, 11, 17618, 286, 13760, 11, 808, 14, 28665, 530, 11, 5752, 14, 28665, 734, 8, 201, 198, 201, 198...
2.012195
492
# List of macros that generate functions to interpolate data that contain hard-coded data macro generateInputSine(mean, amplitude, freq, offset) quote function dummy(t) $mean + $amplitude*sin($freq*t + $offset) end end end macro generateInputStep(tstep,i0,i1) quote function dummy(t) if (t...
[ 2, 7343, 286, 34749, 326, 7716, 5499, 284, 39555, 378, 1366, 326, 3994, 1327, 12, 40976, 1366, 198, 20285, 305, 7716, 20560, 50, 500, 7, 32604, 11, 37188, 11, 2030, 80, 11, 11677, 8, 198, 220, 9577, 198, 220, 220, 220, 2163, 31548, ...
1.978056
319
@testset "cuda/conv" begin T = Float32 in_channel = 3 out_channel = 5 N = 4 adj = T[0 1 0 1; 1 0 1 0; 0 1 0 1; 1 0 1 0] fg = FeaturedGraph(adj) @testset "GCNConv" begin gc = GCNConv(fg, in_channel=>out_channel) |> gpu @test size(gc.weight) =...
[ 31, 9288, 2617, 366, 66, 15339, 14, 42946, 1, 2221, 198, 220, 220, 220, 309, 796, 48436, 2624, 198, 220, 220, 220, 287, 62, 17620, 796, 513, 198, 220, 220, 220, 503, 62, 17620, 796, 642, 198, 220, 220, 220, 399, 796, 604, 198, 2...
1.904249
1,577
module FirstFourierPlans using FFTW using LinearAlgebra: mul! using ..PoincareInvariants: FirstPoincareInvariant, getpointnum, getform, getplan import ..PoincareInvariants: compute!, getpoints, getpointspec export FirstFourierPlan struct FirstFourierPlan{T, D, FTP} ΞΈs::Matrix{T} input::Vector{Float64} ...
[ 21412, 3274, 37, 280, 5277, 3646, 504, 198, 198, 3500, 376, 9792, 54, 198, 3500, 44800, 2348, 29230, 25, 35971, 0, 198, 198, 3500, 11485, 18833, 1939, 533, 19904, 2743, 1187, 25, 3274, 18833, 1939, 533, 19904, 2743, 415, 11, 651, 4122...
2.091001
989
# This file is a part of UpROOT.jl, licensed under the MIT License (MIT). """ TTree <: AbstractVector{Any} `UpROOT.TTree` is a wrapper around Python objects with mix-in `uproot.tree.TTreeMethods`. It behaves like a Julia `AbstractVector` and `Tables.Table` (with column access). Limitations: Write access is not i...
[ 2, 770, 2393, 318, 257, 636, 286, 3205, 13252, 2394, 13, 20362, 11, 11971, 739, 262, 17168, 13789, 357, 36393, 737, 198, 198, 37811, 198, 220, 220, 220, 26653, 631, 1279, 25, 27741, 38469, 90, 7149, 92, 198, 198, 63, 4933, 13252, 23...
2.646941
1,504
<reponame>femtotrader/TA-Lib.jl<filename>src/constants.jl #= Constants, Enums for TA-Lib inspired by https://github.com/stoni/ta-lib/blob/6edc8d665f145ca7eb19c6992191e0c4f0b61ec0/c/include/ta_defs.h =# INDENT = " " _PRICE=:Close _OPEN=:Open _HIGH=:High _LOW=:Low _CLOSE=:Close _VOLUME=:Volume @enum(TA_RetCode, ...
[ 27, 7856, 261, 480, 29, 69, 368, 83, 313, 81, 5067, 14, 5603, 12, 25835, 13, 20362, 27, 34345, 29, 10677, 14, 9979, 1187, 13, 20362, 198, 2, 28, 198, 198, 34184, 1187, 11, 2039, 5700, 329, 21664, 12, 25835, 198, 24194, 416, 3740, ...
1.869226
1,667
### A Pluto.jl notebook ### # v0.15.1 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 loc...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1314, 13, 16, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 770, 32217, 20922, 3544, 2488, 21653, 329, 9427, 3458, 13, 1649, 2491, 428, 20922, ...
1.877415
24,530
<filename>julia/bfs_test.jl # To run: `julia bfs_test.jl` include("bfs.jl") nodes = [ 1 => [2, 3, 4], 2 => [1, 5, 6], 3 => [1], 4 => [1, 7, 8], 5 => [2, 9, 10], 6 => [2], 7 => [4, 11, 12], 8 => [4], 9 => [5], 10 => [5], 11 => [7], 12 => [7] ] visited = Number[]...
[ 27, 34345, 29, 73, 43640, 14, 65, 9501, 62, 9288, 13, 20362, 198, 2, 1675, 1057, 25, 4600, 73, 43640, 275, 9501, 62, 9288, 13, 20362, 63, 198, 17256, 7203, 65, 9501, 13, 20362, 4943, 198, 198, 77, 4147, 796, 685, 198, 220, 220, ...
1.831111
225
<gh_stars>1-10 function get_estimated_measurement(obj::EstimationsProvider, arg0::jint) return jcall(obj, "getEstimatedMeasurement", EstimatedMeasurement, (jint,), arg0) end function get_number(obj::EstimationsProvider) return jcall(obj, "getNumber", jint, ()) end
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 651, 62, 395, 15655, 62, 1326, 5015, 434, 7, 26801, 3712, 22362, 320, 602, 29495, 11, 1822, 15, 3712, 73, 600, 8, 198, 220, 220, 220, 1441, 474, 13345, 7, 26801, 11, 366, 1136, 223...
2.806122
98
<filename>src/inputnorm.jl #= Similar to Batch Normalization, except online and without the rescaling/skew y = (a .- ΞΌ) ./ Οƒ TODO: This is currently broken because OnlineStats.Variances no longer exists. =# type InputNorm{T,W<:Weight} <: Transformation n::Int # maps n --> n vars::Variances{W} ...
[ 27, 34345, 29, 10677, 14, 15414, 27237, 13, 20362, 198, 198, 2, 28, 198, 18925, 284, 347, 963, 14435, 1634, 11, 2845, 2691, 290, 1231, 262, 6811, 4272, 14, 82, 365, 86, 198, 220, 220, 220, 331, 796, 357, 64, 764, 12, 18919, 8, 2...
1.951684
683
<filename>src/junk.jl """Transform anchor based upon a rotation of a surface of size w x h.""" function transform_anchor(ax, ay, w, h, angle) ΞΈ = -deg2rad(angle) sinΞΈ = sin(ΞΈ) cosΞΈ = cos(ΞΈ) # Dims of the transformed rect tw = abs(w * cosΞΈ) + abs(h * sinΞΈ) th = abs(w * sinΞΈ) + abs(h...
[ 27, 34345, 29, 10677, 14, 73, 2954, 13, 20362, 198, 37811, 41762, 18021, 1912, 2402, 257, 13179, 286, 257, 4417, 286, 2546, 266, 2124, 289, 526, 15931, 201, 198, 8818, 220, 6121, 62, 3702, 273, 7, 897, 11, 38762, 11, 266, 11, 289, ...
2.034921
315
<reponame>garrekstemo/Makie.jl<filename>metrics/ttfp/benchmark-library.jl using JSON, Statistics, GitHub, Base64, SHA, Downloads, Dates function cpu_key() cpus = map(Sys.cpu_info()) do cpu replace(cpu.model, " " => "") end return join(unique(cpus), "") end julia_key() = "julia-" * replace(s...
[ 27, 7856, 261, 480, 29, 4563, 37818, 927, 78, 14, 44, 461, 494, 13, 20362, 27, 34345, 29, 4164, 10466, 14, 926, 46428, 14, 26968, 4102, 12, 32016, 13, 20362, 198, 3500, 19449, 11, 14370, 11, 21722, 11, 7308, 2414, 11, 25630, 11, 5...
2.247608
4,180
<reponame>UnofficialJuliaMirrorSnapshots/SchroedingersSmoke.jl-ca2212eb-e997-5e02-8188-6a86c81ae544<filename>test/runtests.jl using SchroedingersSmoke vol_size = (4,2,2)# box size dims = (64, 32, 32) .* 2 # volume resolution hbar = 0.1f0 # Planck constant dt = 1f0/48f0 # time step jet_velocity = (1f0, 0f0, 0...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 14874, 305, 8228, 364, 7556, 2088, 13, 20362, 12, 6888, 1828, 1065, 1765, 12, 68, 39647, 12, 20, 68, 2999, 12, 23, 20356, 12, 21, 64, 4521, 66, 6659, ...
2.12047
1,021
<filename>src/statistics.jl ######### # THIS SECTION JUST STEALS FROM STATSBASE BUT REMOVES TYPE RESTRICTIONS AND ADDS SIMD # Skewness # This is Type 1 definition according to Joanes and Gill (1998) """ skew(v, m=mean(v)) Compute the standardized skewness of iterable `v`. """ function skew(v, m::T) where {T<:U...
[ 27, 34345, 29, 10677, 14, 14269, 3969, 13, 20362, 628, 198, 7804, 2, 198, 2, 12680, 44513, 25848, 24483, 23333, 16034, 15486, 16811, 11159, 21728, 22657, 8874, 1546, 41876, 15731, 5446, 18379, 11053, 5357, 5984, 5258, 23749, 35, 628, 198,...
2.191309
1,887
using GeometryTypes using LinearAlgebra """ subdivide(msh::HomogenousMesh,f::Function) Returns a subdived triangular mesh from passed mesh `msh` and interpolator function `f`. The interpolator `f` is expected to accept two vertex indicies of the edge and to return a tuple of coordinates of the middle point (as on...
[ 3500, 2269, 15748, 31431, 198, 3500, 44800, 2348, 29230, 198, 198, 37811, 198, 220, 220, 220, 45944, 485, 7, 907, 71, 3712, 28718, 27897, 37031, 11, 69, 3712, 22203, 8, 198, 198, 35561, 257, 850, 67, 1572, 46963, 19609, 422, 3804, 196...
2.007895
1,140
# #--------------------------------------# export hlmz #--------------------------------------# """ for v,u in H^1 of Omega (v,(-Ξ½βˆ‡Β² + k)u)\n = Ξ½ * a(v,u) + k * (v,u) """ function hlmz(u::Array ,Ξ½,k,msh::Mesh) Hu = Ξ½ .* lapl(u,msh) Hu .+= k .* mass(u,msh) return Hu end #...
[ 2, 198, 2, 3880, 23031, 2, 198, 39344, 289, 75, 76, 89, 198, 2, 3880, 23031, 2, 198, 37811, 198, 329, 410, 11, 84, 287, 367, 61, 16, 286, 19839, 628, 357, 85, 11, 32590, 26180, 24861, 229, 31185, 1343, 479, 8, 84, 19415, 77, 1...
2.032847
274
<gh_stars>10-100 """ ## formm! This subroutine forms the derivatives of the invariants with respect to stress in 2- or 3-d. See equation 6.25. ### Function ```julia formm!(stress, m1, m2, m3) ``` ### Arguments ```julia * stress::Vector{Float64} : Stress vector, see eq 6.25 * m1::Matrix{Float64} : m1 matrix...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 37811, 198, 2235, 1296, 76, 0, 198, 198, 1212, 850, 81, 28399, 5107, 262, 28486, 286, 262, 25275, 1187, 351, 2461, 284, 198, 41494, 287, 362, 12, 393, 513, 12, 67, 13, 4091, 16022, 718, ...
1.535187
1,762
""" **Checks that the queries for occurrences searches are well formatted** This is used internally. Everything this function does is derived from the GBIF API documentation, including (and especially) the values for enum types. This modifies the queryset. Filters that are not allowed are removed, and filters that ha...
[ 37811, 198, 1174, 7376, 4657, 326, 262, 20743, 329, 40279, 15455, 389, 880, 39559, 1174, 198, 198, 1212, 318, 973, 20947, 13, 198, 198, 19693, 428, 2163, 857, 318, 10944, 422, 262, 402, 3483, 37, 7824, 10314, 11, 198, 8201, 357, 392, ...
3.088136
590
using Test using CalculatedABC using DelimitedFiles using Random, Distributions Random.seed!(123) include("test_curve.jl") include("test_analysis.jl") include("test_gini.jl")
[ 3500, 6208, 198, 3500, 27131, 515, 24694, 198, 198, 3500, 4216, 320, 863, 25876, 198, 3500, 14534, 11, 46567, 507, 198, 29531, 13, 28826, 0, 7, 10163, 8, 198, 198, 17256, 7203, 9288, 62, 22019, 303, 13, 20362, 4943, 198, 17256, 7203, ...
3
59
# This file is part of Fatou.jl. It is licensed under the MIT license # Copyright (C) 2017 <NAME> import Base: invokelatest rdpm(tex) = split(split(tex,"\n\\end{displaymath}")[1],"\\begin{displaymath}\n")[2] # we can substitute the expression into Newton's method and display it with LaTeX function newton_raphson...
[ 2, 220, 220, 770, 2393, 318, 636, 286, 12301, 280, 13, 20362, 13, 632, 318, 11971, 739, 262, 17168, 5964, 198, 2, 220, 220, 15069, 357, 34, 8, 2177, 1279, 20608, 29, 198, 198, 11748, 7308, 25, 26342, 42861, 198, 198, 4372, 4426, 7...
2.271242
612
<reponame>josePereiro/GitWorkers module GitWorkers import GitLinks import GitLinks: GitLink import Dates import Dates: now import Pkg import TOML import Serialization: serialize, deserialize import Logging import LoggingExtras # Type (Order matters) include("Work...
[ 27, 7856, 261, 480, 29, 73, 577, 47, 567, 7058, 14, 38, 270, 12468, 364, 198, 21412, 15151, 12468, 364, 628, 220, 220, 220, 1330, 15151, 31815, 198, 220, 220, 220, 1330, 15151, 31815, 25, 15151, 11280, 198, 220, 220, 220, 220, 198, ...
2.315202
717
using ITensors using ITensors.ITensorNetworkMaps using KrylovKit using LinearAlgebra include("utils.jl") N = 4 s = siteinds("S=1/2", N; conserve_qns=true) Ο‡ = 2 ψ = randomMPS(s, n -> isodd(n) ? "↑" : "↓"; linkdims=Ο‡) β„‹ = OpSum() for n in 1:(N - 1) β„‹ .+= 0.5, "S+", n, "S-", n + 1 β„‹ .+= 0.5, "S-", n, "S+", n + 1 ...
[ 3500, 7283, 641, 669, 198, 3500, 7283, 641, 669, 13, 2043, 22854, 26245, 47010, 198, 3500, 41662, 27086, 20827, 198, 3500, 44800, 2348, 29230, 198, 198, 17256, 7203, 26791, 13, 20362, 4943, 198, 198, 45, 796, 604, 198, 82, 796, 2524, ...
1.677678
999
# This file is a part of Julia. License is MIT: http://julialang.org/license module MicroPerf import Perftests: @perf, meta ## recursive fib ## fib(n) = n < 2 ? n : fib(n-1) + fib(n-2) @perf fib(20) meta("fib", "Recursive fibonacci") ## parse integer ## function parseintperf(t) local n, m for i=1:t n...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 2638, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 21412, 4527, 5990, 69, 198, 11748, 2448, 701, 3558, 25, 2488, 525, 69, 11, 13634, 198, 198, 2235, 45...
1.973999
1,423
module BasicAuthRequest using ..Base64 using URIs import ..Messages: setheader, hasheader import ..@debug, ..DEBUG_LEVEL export basicauthlayer """ basicauthlayer(req) -> HTTP.Response Add `Authorization: Basic` header using credentials from url userinfo. """ function basicauthlayer(handler) return function(r...
[ 21412, 14392, 30515, 18453, 198, 198, 3500, 11485, 14881, 2414, 198, 3500, 37902, 3792, 198, 11748, 11485, 36479, 1095, 25, 900, 25677, 11, 468, 25677, 198, 11748, 11485, 31, 24442, 11, 11485, 30531, 62, 2538, 18697, 198, 198, 39344, 1615...
2.556667
300
<reponame>flixpar/covid-resource-allocation module PatientAllocation using JuMP using Gurobi using LinearAlgebra using MathOptInterface using Distributions using Memoize using Statistics ############################################## ############# Standard Model ################# ###################################...
[ 27, 7856, 261, 480, 29, 10046, 1845, 14, 66, 709, 312, 12, 31092, 12, 439, 5040, 198, 21412, 35550, 3237, 5040, 198, 198, 3500, 12585, 7378, 198, 3500, 402, 1434, 8482, 198, 198, 3500, 44800, 2348, 29230, 198, 3500, 16320, 27871, 3931...
2.351314
13,051
pf = API(joinpath(@__DIR__, "resources", "defs.jl"), sym -> @eval(vk, $(Meta.parse("$sym")))) # println(pf.structs) # println(pf.funcs) # println(pf.consts) # println(pf.enums) s1 = SDefinition("MyMutableStruct", true) s2 = SDefinition("MyStruct", false, fields=("a" => "Int", "b" => "Ptr{Cvoid}", "c" => "NTuple{16,Cf...
[ 79, 69, 796, 7824, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 37540, 1600, 366, 4299, 82, 13, 20362, 12340, 5659, 4613, 2488, 18206, 7, 85, 74, 11, 29568, 48526, 13, 29572, 7203, 3, 37047, 1, 35514, 198, 198, 2, 44872, 7, ...
2.375522
719
# Load required packages using DataFrames, Distributions, Gadfly, FishABM # Specify stock assumptions: # # * Age specific mortality # * Age at 50% maturity # * Age specific fecundity # * Carrying capacity (total adults) # * Compensatory strength - fecundity # * Compensatory strength - age at 50% maturity # * Compens...
[ 2, 8778, 2672, 10392, 198, 198, 3500, 6060, 35439, 11, 46567, 507, 11, 20925, 12254, 11, 13388, 6242, 44, 628, 198, 2, 18291, 1958, 4283, 14895, 25, 198, 2, 198, 2, 1635, 7129, 2176, 12430, 198, 2, 1635, 7129, 379, 2026, 4, 24841, ...
1.880153
2,086
insts = OrderedDict() insts["minimal"] = [ # tr neglog ((3, false, MatLogdetCone()),), ((3, true, MatLogdetCone()),), ((3, false, MatNegLog()),), ((3, true, MatNegLog()),), ((3, false, MatNegLogDirect()),), ((3, true, MatNegLogDirect()),), ((3, false, MatNegLogEigOrd()),), # negrtde...
[ 198, 259, 6448, 796, 14230, 1068, 35, 713, 3419, 198, 259, 6448, 14692, 1084, 4402, 8973, 796, 685, 198, 220, 220, 220, 1303, 491, 2469, 6404, 198, 220, 220, 220, 14808, 18, 11, 3991, 11, 6550, 11187, 15255, 34, 505, 3419, 828, 828,...
2.098602
1,288
using AmplNLWriter import Ipopt import MathOptInterface const MOI = MathOptInterface const MOIT = MOI.Test const OPTIMIZER = MOI.Bridges.full_bridge_optimizer( AmplNLWriter.Optimizer(Ipopt.amplexe, ["print_level = 0"]), Float64 ) @test sprint( show, AmplNLWriter.Optimizer(Ipopt.amplexe, ["print_level...
[ 3500, 44074, 32572, 34379, 198, 11748, 314, 79, 8738, 198, 11748, 16320, 27871, 39317, 198, 198, 9979, 13070, 40, 796, 16320, 27871, 39317, 198, 9979, 13070, 2043, 796, 13070, 40, 13, 14402, 198, 198, 9979, 39852, 3955, 14887, 1137, 796, ...
2.175494
1,265
include("solver_preamble.jl") import ECOS factory = with_optimizer(ECOS.Optimizer, verbose=false) config = MOI.Test.Config(atol=1e-5, rtol=1e-5) @testset "Linear" begin Tests.linear_test(factory, config) end @testset "SOC" begin Tests.soc_test(factory, config, [ # K = 30: Test Failed at /home/blegat/.julia/...
[ 17256, 7203, 82, 14375, 62, 79, 1476, 903, 13, 20362, 4943, 198, 11748, 13182, 2640, 198, 69, 9548, 796, 351, 62, 40085, 7509, 7, 2943, 2640, 13, 27871, 320, 7509, 11, 15942, 577, 28, 9562, 8, 198, 11250, 796, 13070, 40, 13, 14402, ...
2.256831
366
# common facilities ### value type conversion f64(x::Real) = Float64(x) ### Common type hierarchy ## # The base type for all likelihood model # abstract LikelihoodModel ### Auxiliary functions # half of squared L2-norm hsqrnorm(x::AbstractArray) = vecnorm(x)^2 / 2
[ 2, 2219, 7291, 198, 198, 21017, 1988, 2099, 11315, 198, 198, 69, 2414, 7, 87, 3712, 15633, 8, 796, 48436, 2414, 7, 87, 8, 198, 198, 21017, 8070, 2099, 18911, 198, 198, 2235, 198, 2, 220, 383, 2779, 2099, 329, 477, 14955, 2746, 198...
3.05618
89
<filename>src/composite-systems.jl export ## Types ## Methods unitary_propagator CompositeQSystem() = CompositeQSystem(QSystem[], Interaction[], ParametricInteraction[], Tuple{Vector{IndexSet...
[ 27, 34345, 29, 10677, 14, 785, 1930, 578, 12, 10057, 82, 13, 20362, 198, 39344, 22492, 24897, 198, 220, 220, 220, 220, 220, 220, 22492, 25458, 198, 220, 220, 220, 220, 220, 220, 4326, 560, 62, 22930, 363, 1352, 198, 198, 5377, 1930,...
2.300956
4,602
<reponame>jmmshn/LeetCode.jl @testset "373.find-k-pairs-with-smallest-sums.jl" begin @test k_smallest_pairs([1, 7, 11], [2, 4, 6], 3) == [(1, 2), (1, 4), (1, 6)] @test k_smallest_pairs([1,1,2], [1, 2, 3], 2) == [(1, 1), (1, 1)] @test k_smallest_pairs([1,2], [3], 2) == [(1, 3), (2, 3)] end
[ 27, 7856, 261, 480, 29, 73, 76, 907, 21116, 14, 3123, 316, 10669, 13, 20362, 198, 31, 9288, 2617, 366, 34770, 13, 19796, 12, 74, 12, 79, 3468, 12, 4480, 12, 17470, 395, 12, 82, 5700, 13, 20362, 1, 2221, 198, 220, 220, 220, 2488,...
1.843373
166
# FWI on the 2D Overthrust model using spectral projected gradient descent # Author: <EMAIL> # Date: February 2021 # using Distributed @everywhere using DrWatson @everywhere @quickactivate :TimeProbeSeismic # Load starting model ~isfile(datadir("models", "overthrust_model.h5")) && run(`curl -L ftp://slim.gatech.edu/da...
[ 2, 376, 36326, 319, 262, 362, 35, 3827, 400, 11469, 2746, 1262, 37410, 13301, 31312, 18598, 198, 2, 6434, 25, 1279, 27630, 4146, 29, 198, 2, 7536, 25, 3945, 33448, 198, 2, 198, 3500, 4307, 6169, 198, 31, 16833, 3003, 1262, 1583, 54,...
2.344985
1,316