content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
module MathOptInterfaceECOS export ECOSOptimizer using MathOptInterface const MOI = MathOptInterface const CI = MOI.ConstraintIndex const VI = MOI.VariableIndex const MOIU = MOI.Utilities const SF = Union{MOI.SingleVariable, MOI.ScalarAffineFunction{Float64}, MOI.VectorOfVariables, MOI.VectorAffineFunction{Float64}...
[ 21412, 16320, 27871, 39317, 2943, 2640, 198, 198, 39344, 13182, 2640, 27871, 320, 7509, 198, 198, 3500, 16320, 27871, 39317, 198, 9979, 13070, 40, 796, 16320, 27871, 39317, 198, 9979, 14514, 796, 13070, 40, 13, 3103, 2536, 2913, 15732, 19...
2.765781
602
using Test using LinearAlgebra using StaticArrays using IFGF K(x,y) = 1/norm(x-y) IFGF.wavenumber(::typeof(K)) = 0 @testset "Near field" begin @testset "Single leaf" begin nx,ny = 100, 200 nz = 5 Xpts = rand(SVector{2,Float64},nx) Ypts = rand(SVector{2,Float64},ny) p ...
[ 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 36125, 3163, 20477, 198, 3500, 16876, 21713, 198, 198, 42, 7, 87, 11, 88, 8, 220, 220, 796, 352, 14, 27237, 7, 87, 12, 88, 8, 198, 5064, 21713, 13, 86, 4005, 4494, 7, 3712, 4...
1.651624
1,817
<reponame>mcx/RoboDojo.jl @testset "Robots: particle" begin # TODO: add tests q0 = nominal_configuration(particle) # visualizer vis = RoboDojo.Visualizer(); @test visualize!(vis, particle, [q0], Δt=0.1); end
[ 27, 7856, 261, 480, 29, 23209, 87, 14, 14350, 78, 5211, 7639, 13, 20362, 198, 31, 9288, 2617, 366, 14350, 1747, 25, 18758, 1, 2221, 220, 198, 220, 220, 220, 1303, 16926, 46, 25, 751, 5254, 198, 220, 220, 220, 10662, 15, 796, 26934...
2.336735
98
<reponame>mwarusz/CLIMA refVals = [] refPrecs = [] #! format: off # SC ========== Test number 1 reference values and precision match template. ======= # SC ========== /home/jmc/cliMa/cliMa_update/test/Ocean/SplitExplicit/simple_box_2dt.jl test reference values ====================================== # BEGIN SCPRINT # v...
[ 27, 7856, 261, 480, 29, 76, 5767, 385, 89, 14, 5097, 3955, 32, 198, 5420, 53, 874, 796, 17635, 198, 5420, 6719, 6359, 796, 17635, 198, 198, 2, 0, 5794, 25, 572, 198, 2, 6374, 796, 2559, 28, 6208, 1271, 352, 4941, 3815, 290, 1544...
1.795231
3,565
using SubHunt using Base.Test using POMDPs using POMDPToolbox using DiscreteValueIteration using QMDP using ParticleFilters using Plots pomdp = SubHuntPOMDP() # show(STDOUT, MIME("text/plain"), SubVis(pomdp)) rng = MersenneTwister(6000) # policy = RandomPolicy(pomdp, rng=rng) solver = QMDPSolver() if !isdefined(:p...
[ 3500, 3834, 47663, 198, 3500, 7308, 13, 14402, 198, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 25391, 3524, 198, 3500, 8444, 8374, 11395, 29993, 341, 198, 3500, 1195, 44, 6322, 198, 3500, 2142, 1548, 11928, 1010, 198, ...
2.224868
378
<gh_stars>10-100 InputFolder = './Images/NucleiNoisy/'; OutputFolder = './Results/Images/NucleiNoisy/'; @iA = '*.tif'; @fxg_gDenoiseBM3 [iA] > [D, An]; params.AddNoiseVar = 0; /endf /show iA >; /show D >; /keep D > tif;
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 20560, 41092, 796, 705, 19571, 29398, 14, 45, 14913, 72, 2949, 13560, 14, 17020, 198, 26410, 41092, 796, 705, 19571, 25468, 14, 29398, 14, 45, 14913, 72, 2949, 13560, 14, 17020, 198, 198, ...
2.074766
107
<reponame>konkam/approximatingBNPpriors using RCall, JLD R" library(gridExtra) library(cowplot) library(tidyverse) library(latex2exp) library(viridis) " function plot_draw_prior_distribution(df,N,beta,sigma,y_l,x_lab,n,m) ps_sb_py = smooth_pk(df.Pkn_SB[1:N]) R"p = ggplot(data.frame(k ...
[ 27, 7856, 261, 480, 29, 74, 261, 74, 321, 14, 1324, 13907, 39204, 15766, 47, 3448, 669, 198, 3500, 13987, 439, 11, 449, 11163, 628, 198, 49, 1, 198, 32016, 7, 25928, 27726, 8, 198, 32016, 7, 8232, 29487, 8, 198, 32016, 7, 83, 19...
1.83205
1,429
# This dictionary maps easy to remember names to Youtube video IDs # after adding an ID here, you can use the {{youtube <shortname>}} # syntax in your markdown files to embed the video into the page! videos = Dict( "installation" => "OOjKEgbt8AI", "jupyter-notebooks" => "MFgMO8Xwx-k", ...
[ 2, 770, 22155, 8739, 2562, 284, 3505, 3891, 284, 27431, 2008, 32373, 198, 2, 706, 4375, 281, 4522, 994, 11, 345, 460, 779, 262, 22935, 11604, 1279, 19509, 3672, 29, 11709, 198, 2, 15582, 287, 534, 1317, 2902, 3696, 284, 11525, 262, ...
1.88253
332
# This file was generated, do not modify it. # hide @show size(auto) @show nrow(auto) @show ncol(auto)
[ 2, 770, 2393, 373, 7560, 11, 466, 407, 13096, 340, 13, 1303, 7808, 198, 31, 12860, 2546, 7, 23736, 8, 198, 31, 12860, 299, 808, 7, 23736, 8, 198, 31, 12860, 299, 4033, 7, 23736, 8 ]
2.833333
36
<filename>test/runtests.jl using DiffusionMap using Test @testset "DiffusionMap.jl" begin # Write your own tests here. end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 10631, 4241, 13912, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 28813, 4241, 13912, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 898, 5254, 994, 13, 198...
2.844444
45
""" #checks for parity errors. $(SIGNATURES) # Details # Uses the parity algorithm to compute parity and compare them to given parity bits """ function parity_check(word, prev_29, prev_30) # Parity check to verify the data integrity: D_25 = prev_29 ⊻ word[1] ⊻ word[2] ⊻ word[3] ⊻ wo...
[ 198, 198, 37811, 198, 220, 220, 220, 1303, 42116, 329, 34383, 8563, 13, 220, 198, 220, 220, 220, 29568, 46224, 47471, 8, 628, 220, 220, 220, 1303, 14890, 198, 220, 220, 220, 1303, 36965, 262, 34383, 11862, 284, 24061, 34383, 290, 8996...
1.754624
811
<filename>src/initiation/initiation.jl include("meshing/meshing.jl") include("init_model.jl") include("init_receiver.jl") include("init_source.jl")
[ 27, 34345, 29, 10677, 14, 15003, 3920, 14, 15003, 3920, 13, 20362, 198, 17256, 7203, 6880, 722, 14, 6880, 722, 13, 20362, 4943, 198, 17256, 7203, 15003, 62, 19849, 13, 20362, 4943, 198, 17256, 7203, 15003, 62, 260, 39729, 13, 20362, 4...
2.846154
52
""" MatAcoustFluidModule Module for acoustic-fluid material. """ module MatAcoustFluidModule using FinEtools.FTypesModule: FInt, FFlt, FCplxFlt, FFltVec, FIntVec, FFltMat, FIntMat, FMat, FVec, FDataDict # Class for acoustic fluid models of Mats. struct MatAcoustFluid bulk_modulus::FFlt;# Bulk modulus mass_d...
[ 37811, 198, 220, 220, 220, 6550, 12832, 23968, 37, 2290, 312, 26796, 198, 198, 26796, 329, 26071, 12, 35522, 312, 220, 2587, 13, 198, 37811, 198, 21412, 6550, 12832, 23968, 37, 2290, 312, 26796, 198, 198, 3500, 4463, 36, 31391, 13, 97...
2.579749
1,116
<gh_stars>1-10 export VectorizedHermitianMatrix """ struct VectorizedHermitianMatrix{T} <: AbstractMatrix{Complex{T}} Q::Vector{T} n::Int end Hermitian ``n \\times n`` matrix storing the vectorized upper triangular real part of the matrix followed by the vectorized upper triangular imaginary p...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 39344, 20650, 1143, 9360, 2781, 666, 46912, 198, 198, 37811, 198, 220, 220, 220, 2878, 20650, 1143, 9360, 2781, 666, 46912, 90, 51, 92, 1279, 25, 27741, 46912, 90, 5377, 11141, 90, 51, 11709...
2.110316
2,375
import GreyDecision.GreyNumbers: GreyNumber import GreyDecision.Saw: saw @testset "Saw in white numbers" begin tol = 0.0001 mat = [ GreyNumber{Float64}(25.0, 25.0) GreyNumber{Float64}(65.0, 65.0) GreyNumber{Float64}(07.0, 07.0) GreyNumber{Float64}(20.0, 20.0); GreyNumber{Float64}(2...
[ 11748, 13980, 10707, 1166, 13, 49141, 49601, 25, 13980, 15057, 198, 11748, 13980, 10707, 1166, 13, 50, 707, 25, 2497, 628, 198, 31, 9288, 2617, 366, 50, 707, 287, 2330, 3146, 1, 2221, 198, 220, 220, 220, 284, 75, 796, 657, 13, 18005...
2.049587
605
import Dolo errs = Dolo.lint("LAMP_2s.yaml") for err in errs println(err) end
[ 11748, 360, 14057, 198, 198, 263, 3808, 796, 360, 14057, 13, 75, 600, 7203, 43, 23518, 62, 17, 82, 13, 88, 43695, 4943, 198, 198, 1640, 11454, 287, 1931, 3808, 198, 220, 220, 220, 44872, 7, 8056, 8, 198, 437, 198 ]
2.04878
41
<reponame>UnofficialJuliaMirror/DandelionWebSockets.jl-a3dee88c-baf6-5d24-a1ed-2b752da90c9e<filename>src/core.jl # Core defines the core WebSocket types, such as a frame and opcodes. # Description of a WebSocket frame from https://tools.ietf.org/html/rfc6455, chapter 5.2. # # 0 1 ...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 35, 33134, 295, 13908, 50, 11603, 13, 20362, 12, 64, 18, 67, 1453, 3459, 66, 12, 65, 1878, 21, 12, 20, 67, 1731, 12, 64, 16, 276, 12, 17, 65, 43665, 6814, 3829, ...
2.086432
2,071
using GridWorld gameboard = zeros(Int8, 3, 3) gameboard[3,1] = 1 gameboard[2,2] = 2 gameboard[1,3] = 1 function ttt(row,col) if gameboard[row,col] == 0 return nothing end if gameboard[row,col] == 1 return Label("X") end Label("O"; color="red") end g = Grid(3, 3, ttt, margin_top=20, m...
[ 3500, 24846, 10603, 198, 6057, 3526, 796, 1976, 27498, 7, 5317, 23, 11, 513, 11, 513, 8, 198, 6057, 3526, 58, 18, 11, 16, 60, 796, 352, 198, 6057, 3526, 58, 17, 11, 17, 60, 796, 362, 198, 6057, 3526, 58, 16, 11, 18, 60, 796, ...
2.227468
233
using PackageCompiler scripts_dir = joinpath(@__DIR__, "..", "scripts") toml_file = joinpath(scripts_dir, "Project.toml") script = joinpath(scripts_dir, "exploration.jl") precompiles_file = joinpath(scripts_dir, "precompiles.jl") blacklist = ["CentroidalTrajOpt", "QPWalkingControl", "QPControl"]#, "AtlasRobot"] sysimg...
[ 3500, 15717, 7293, 5329, 198, 198, 46521, 62, 15908, 796, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 46521, 4943, 198, 39532, 75, 62, 7753, 796, 4654, 6978, 7, 46521, 62, 15908, 11, 366, 16775, 13, 39532, 75, 4943,...
2.900398
251
<filename>src/components/extensions/EquityWeighting_growth.jl @defcomp EquityWeighting begin region = Index() # Basic information y_year = Parameter(index=[time], unit="year") y_year_0 = Parameter(unit="year") # Impacts across all gases pop_population = Parameter(index=[time, region], unit="mi...
[ 27, 34345, 29, 10677, 14, 5589, 3906, 14, 2302, 5736, 14, 23588, 414, 25844, 278, 62, 27922, 13, 20362, 198, 31, 4299, 5589, 35659, 25844, 278, 2221, 198, 220, 220, 220, 3814, 796, 12901, 3419, 628, 220, 220, 220, 1303, 14392, 1321, ...
2.199709
7,571
function TwoPhase(Kx::Array{T,3}, ϕ::Array{T,3}, qinj::Tuple{T1, T1, T1}, qrate::Number, d::Tuple{T2, T2, T2}, time::Number, nt::Int; Ky=nothing, Kz=nothing, o=nothing) where {T, T1, T2} "Kx permeability, ϕ porosity, qinj injection coordinate [m], qrate injection rate [Mt/y]" if isnothing(Ky) Ky = Kx ...
[ 8818, 4930, 35645, 7, 42, 87, 3712, 19182, 90, 51, 11, 18, 5512, 18074, 243, 3712, 19182, 90, 51, 11, 18, 5512, 10662, 259, 73, 3712, 51, 29291, 90, 51, 16, 11, 309, 16, 11, 309, 16, 5512, 10662, 4873, 3712, 15057, 11, 288, 3712...
2.003973
3,524
using GoogleSheets # Example based upon: # https://developers.google.com/sheets/api/quickstart/python client = sheets_client(AUTH_SCOPE_READWRITE) # The ID and range of a sample spreadsheet. SAMPLE_SPREADSHEET_ID = "1pG4OyAdePAelCT2fSBTVJ9lVYo6M-ApuTyeEPz49DOM" SAMPLE_RANGE_NAME = "Sheet1" sheet = Spreadsheet(SAMP...
[ 198, 3500, 3012, 3347, 1039, 198, 198, 2, 17934, 1912, 2402, 25, 1303, 3740, 1378, 16244, 364, 13, 13297, 13, 785, 14, 42011, 14, 15042, 14, 24209, 9688, 14, 29412, 198, 198, 16366, 796, 15747, 62, 16366, 7, 32, 24318, 62, 6173, 321...
2.799207
757
module TestFoldl using Test using LazyGroupBy using LazyGroupBy: foldxl @testset "tuple" begin @testset for fold in [foldl, foldxl] foldl = nothing @test fold.(tuple, grouped(isodd, [0, 7, 3, 1, 5, 9, 4, 3, 0, 5])) == Dict(false => ((0, 4), 0), true => ((((((7, 3), 1), 5), 9), 3), 5...
[ 21412, 6208, 37, 727, 75, 198, 198, 3500, 6208, 198, 3500, 406, 12582, 13247, 3886, 198, 3500, 406, 12582, 13247, 3886, 25, 5591, 87, 75, 198, 198, 31, 9288, 2617, 366, 83, 29291, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 329, ...
1.88565
446
<gh_stars>0 using DelimitedFiles fishdata = readdlm("llist.txt",',',Int) @show fishdata function agefish(fishdata,day) if day == 81 @show length(fishdata) return end newfishes = 0 for fishidx in eachindex(fishdata) fish = fishdata[fishidx] if fish == 0 fish ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 4216, 320, 863, 25876, 198, 11084, 7890, 796, 1100, 25404, 76, 7203, 297, 396, 13, 14116, 1600, 3256, 3256, 5317, 8, 198, 31, 12860, 5916, 7890, 198, 198, 8818, 2479, 11084, 7, 11084, 7890, 11,...
2.014388
278
<gh_stars>1-10 module Blackscholes using GPUBenchmarks, BenchmarkTools import CUDAdrv using CUDAnative const cu = CUDAnative const description = """ Blackschole is a nice benchmark for broadcasting performance. It's a medium heavy calculation per array element, where the calculation is completely independant from ea...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 2619, 20601, 4316, 198, 198, 3500, 11362, 44199, 14306, 11, 25187, 4102, 33637, 198, 11748, 327, 8322, 2782, 81, 85, 198, 198, 3500, 327, 8322, 2025, 876, 198, 9979, 18912, 796, 327, ...
2.136806
1,747
<filename>test/runtests.jl using ReinforcementLearningZoo using Test using ReinforcementLearningBase using ReinforcementLearningCore using ReinforcementLearningEnvironments using Flux using StatsBase @testset "ReinforcementLearningZoo.jl" begin include("basic_dqn.jl") include("dqn.jl") include("prioritize...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 22299, 13442, 41730, 57, 2238, 198, 3500, 6208, 198, 3500, 22299, 13442, 41730, 14881, 198, 3500, 22299, 13442, 41730, 14055, 198, 3500, 22299, 13442, 41730, 4834, 12103, 198,...
3.094017
117
using D3Trees using Colors using Printf """ Return text to display below the node corresponding to state or action s """ node_tag(s) = string(s) """ Return text to display in the tooltip for the node corresponding to state or action s """ tooltip_tag(s) = node_tag(s) """ Creates a D3Tree instance for a given tree. ...
[ 3500, 360, 18, 51, 6037, 198, 3500, 29792, 198, 3500, 12578, 69, 198, 198, 37811, 198, 13615, 2420, 284, 3359, 2174, 262, 10139, 11188, 284, 1181, 393, 2223, 264, 198, 37811, 198, 17440, 62, 12985, 7, 82, 8, 796, 4731, 7, 82, 8, 1...
1.757922
1,925
include("networks/Network-Visualization.jl") include("LiftAlgorithm.jl") function lift_visualization!(fgp::FixedGraphPlot, lift_alg::LiftAlgorithm) _lift_nodecolors!(fgp, lift_alg) _lift_edges_visualization!(fgp, lift_alg) return fgp end function _lift_nodecolors!(fgp::FixedGraphPlot, lift_alg::LiftAlgor...
[ 17256, 7203, 3262, 5225, 14, 26245, 12, 36259, 1634, 13, 20362, 4943, 198, 17256, 7203, 43, 2135, 2348, 42289, 13, 20362, 4943, 198, 198, 8818, 10303, 62, 41464, 1634, 0, 7, 69, 31197, 3712, 13715, 37065, 43328, 11, 10303, 62, 14016, ...
2.137143
525
<reponame>giordano/ADI.jl<gh_stars>0 using FillArrays """ annular(alg, cube, angles; fwhm, ann_size=4, init=0, nframes=4, delta_rot=1) annular(algs::AbstractVector, cube, angles; fwhm, ann_size=4, init=0, nframes=4, delta_rot=1) """ function annular(alg::ADIAlgorithm, cube, angles; kwargs...) n, y, x = s...
[ 27, 7856, 261, 480, 29, 12397, 585, 5733, 14, 2885, 40, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 27845, 3163, 20477, 198, 198, 37811, 198, 220, 220, 220, 1529, 934, 7, 14016, 11, 23441, 11, 18333, 26, 277, 1929, 76, 11, ...
2.207755
1,728
""" isconstant(profile) Return `true` if the time profile `profile` is intervalwise constant. """ isconstant(::TimeProfile) = false isconstant(::PGSE) = true isconstant(::DoublePGSE) = true
[ 37811, 198, 220, 220, 220, 318, 9979, 415, 7, 13317, 8, 198, 198, 13615, 4600, 7942, 63, 611, 262, 640, 7034, 4600, 13317, 63, 318, 16654, 3083, 6937, 13, 198, 37811, 198, 271, 9979, 415, 7, 3712, 7575, 37046, 8, 796, 3991, 198, 2...
2.954545
66
module RocketGenerateObservableTest using Test using Rocket include("../test_helpers.jl") @testset "GenerateObservable" begin println("Testing: generate") @testset begin source = generate(1, x -> x < 2, x -> x + 1) io = IOBuffer() show(io, source) printed = String(take!(io...
[ 21412, 16920, 8645, 378, 31310, 712, 540, 14402, 198, 198, 3500, 6208, 198, 3500, 16920, 198, 198, 17256, 7203, 40720, 9288, 62, 16794, 364, 13, 20362, 4943, 198, 198, 31, 9288, 2617, 366, 8645, 378, 31310, 712, 540, 1, 2221, 628, 220...
1.88206
602
<filename>src/collect.jl const default_initializer = ArrayInitializer(t -> t<:Union{Tuple, NamedTuple, Pair}, (T, sz) -> similar(arrayof(T), sz)) """ collect_columns(itr) Collect an iterable as a `Columns` object if it iterates `Tuples` or `NamedTuples`, as a normal `Array` otherwise. # Examples s = [(1,2),...
[ 27, 34345, 29, 10677, 14, 33327, 13, 20362, 198, 9979, 4277, 62, 36733, 7509, 796, 15690, 24243, 7509, 7, 83, 4613, 256, 27, 25, 38176, 90, 51, 29291, 11, 34441, 51, 29291, 11, 39645, 5512, 357, 51, 11, 264, 89, 8, 4613, 2092, 7, ...
2.313458
1,174
using Documenter using ModelicaScriptingTools makedocs( sitename = "HH-Modelica", format = Documenter.HTML(), modules = Module[] ) deploydocs( repo = "github.com/CSchoel/hh-modelica.git", devbranch = "main", versions = ["v^", "v#.#", "stable" => "v^"] )
[ 3500, 16854, 263, 198, 3500, 9104, 3970, 7391, 278, 33637, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 1650, 12453, 796, 366, 16768, 12, 17633, 3970, 1600, 198, 220, 220, 220, 5794, 796, 16854, 263, 13, 28656, 22784, 198, 22...
2.413793
116
# Inference algorithm for generalized bilinear model (GBM) with g(E(Y)) = XA' + BZ' + XCZ' + UDV'. # # Copyright (c) 2020: <NAME>. # This file is released under the MIT "Expat" License. module Infer export infer using LinearAlgebra: diag import LinearAlgebra Identity = LinearAlgebra.I Diagonal = LinearAlgebra.Diagon...
[ 2, 554, 4288, 11862, 329, 38284, 47027, 259, 451, 2746, 357, 4579, 44, 8, 351, 308, 7, 36, 7, 56, 4008, 796, 1395, 32, 6, 1343, 347, 57, 6, 1343, 1395, 34, 57, 6, 1343, 43700, 53, 4458, 198, 2, 198, 2, 15069, 357, 66, 8, 121...
1.632831
11,812
<filename>src/gui/line_edit.jl function point_attribs(mh, points_robj, line_robj) isoverpoints, isoverlines = mh[1] == points_robj.id, mh[1] == line_robj.id points_robj[:glow_color] = isoverpoints ? RGBA{Float32}(0.9,.1,0.2,0.9) : RGBA{Float32}(0.,0.,0.,0.) points_robj[:visible] = isoverpoints || isoverline...
[ 27, 34345, 29, 10677, 14, 48317, 14, 1370, 62, 19312, 13, 20362, 198, 8818, 966, 62, 1078, 822, 82, 7, 76, 71, 11, 2173, 62, 22609, 73, 11, 1627, 62, 22609, 73, 8, 198, 220, 220, 220, 318, 2502, 13033, 11, 318, 2502, 6615, 796, ...
2.076382
2,985
function update( registry_path = joinpath(homedir(), ".julia", "registries"), registry_name = "General" ) # gen_stdlib() generate(joinpath(registry_path, registry_name)) end
[ 8818, 4296, 7, 198, 220, 220, 220, 20478, 62, 6978, 796, 4654, 6978, 7, 71, 12657, 343, 22784, 27071, 73, 43640, 1600, 366, 2301, 32995, 12340, 198, 220, 220, 220, 20478, 62, 3672, 796, 366, 12218, 1, 198, 8, 198, 220, 220, 220, 1...
2.714286
70
# Represents a stop time, which is only referenced in the transit network within trips struct StopTime # NB possible optimization: stop is not even needed, as it's in the pattern # but that might not actually help, because by iterating over stop times, we are keeping everything memory locality stop::Int64 ...
[ 2, 1432, 6629, 257, 2245, 640, 11, 543, 318, 691, 20717, 287, 262, 11168, 3127, 1626, 13229, 198, 7249, 13707, 7575, 198, 220, 220, 220, 1303, 41354, 1744, 23989, 25, 2245, 318, 407, 772, 2622, 11, 355, 340, 338, 287, 262, 3912, 198...
3.818898
127
type TwCoordinate lon::Float32 lat::Float32 end function TwCoordinate(d::Dict) TwCoordinate( get(d, "coordinates", [0])[1], get(d, "coordinates", [0,0])[2] ) end
[ 4906, 1815, 7222, 45480, 198, 220, 300, 261, 3712, 43879, 2624, 198, 220, 3042, 3712, 43879, 2624, 198, 437, 198, 198, 8818, 1815, 7222, 45480, 7, 67, 3712, 35, 713, 8, 198, 220, 1815, 7222, 45480, 7, 198, 220, 220, 220, 651, 7, 6...
2.209877
81
function welcome_message() println("___________________________________________________________") println(" ") println(" Welcome to the Zilindroa Code") println("___________________________________________________________") end
[ 8818, 7062, 62, 20500, 3419, 628, 220, 220, 220, 44872, 7203, 10221, 32941, 17569, 4943, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 44872, 7203, 366, 8, 198, 220, 220, 220, 44872, 7203, 19134, 284, 262, 1168, 346, 5...
3.984615
65
export ALL_solvers # Valid combinations ALL_solvers = Function[] include("ARCSpectral.jl") push!(ALL_solvers, ARCSpectral) include("ARCSpectral_abs.jl") push!(ALL_solvers, ARCSpectral_abs) include("TRSpectral.jl") push!(ALL_solvers, TRSpectral) include("TRSpectral_abs.jl") push!(ALL_solvers, TRSpectral_abs) in...
[ 39344, 11096, 62, 34453, 690, 198, 198, 2, 48951, 17790, 198, 198, 7036, 62, 34453, 690, 796, 15553, 21737, 198, 198, 17256, 7203, 1503, 7902, 806, 1373, 13, 20362, 4943, 198, 14689, 0, 7, 7036, 62, 34453, 690, 11, 5923, 7902, 806, ...
2.125124
1,007
<reponame>justincfeng/squirrel.jl<gh_stars>0 #----------------------------------------------------------------------- # # OUTLIER DETECTION FUNCTIONS # #----------------------------------------------------------------------- #----------------------------------------------------------------------- """ combX( X::R...
[ 27, 7856, 261, 480, 29, 3137, 1939, 69, 1516, 14, 16485, 22793, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 10097, 26866, 198, 2, 198, 2, 220, 220, 16289, 31271, 1137, 38267, 24565, 29397, 4177, 11053, 198, 2, 198, 2, 10097, 26...
1.939804
1,329
<reponame>NoelAraujo/CoupledDipole.jl<gh_stars>0 using LinearAlgebra """ Far Fiel Condition: r_emitter^2 / 2r_observation ≪ 1 Condition comes from is the Eq (4.4) in https://engineering.purdue.edu/wcchew/ece604f18/latex%20lecture%20notes/LectureNotes20.pdf (A copy of the file is inside the `benchmark...
[ 27, 7856, 261, 480, 29, 2949, 417, 32, 430, 84, 7639, 14, 34, 280, 10137, 35, 541, 2305, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 44800, 2348, 29230, 198, 198, 37811, 198, 220, 220, 220, 6755, 376, 8207, 24295, 25, 374, ...
2.34415
1,171
<gh_stars>0 module QuadraticTools include("Expanded.jl") include("Factored.jl") include("Vertex.jl") include("Utils.jl") export calcdelta export calcvalue export Expanded export Factored export Vertex export toexpanded export tofactored export tovertex end # module
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 20648, 81, 1512, 33637, 628, 220, 220, 220, 2291, 7203, 16870, 12249, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 29054, 1850, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 13414, 16886,...
2.614754
122
<reponame>meirizarrygelpi/CayleyDickson.jl using CayleyDickson using Base.Test: @test, @test_throws @test begin a = CayleyDickson.randomBigFloat() isreal(Exo3Real(a)) end @test begin a = 1 !isreal(Exo3Real(a, a, a, a)) end @test begin z = random(Exo3Real{Int}) z == +(z) end @test begin a...
[ 27, 7856, 261, 480, 29, 1326, 343, 528, 6532, 25280, 14415, 14, 34, 323, 1636, 35, 46381, 13, 20362, 198, 3500, 28335, 1636, 35, 46381, 198, 3500, 7308, 13, 14402, 25, 2488, 9288, 11, 2488, 9288, 62, 400, 8516, 198, 198, 31, 9288, ...
1.924013
4,027
<reponame>probcomp/GenCurveSegmentation.jl function trace_to_seq(trace::Trace, incl_disconnect=true) sequence = map(enumerate(trace[:strokes])) do (i, (dir, x)) s = ["D", "U", "L", "R"][dir] if incl_disconnect && trace[:strokes => i => :disconnect] s = "#" * s end return ...
[ 27, 7856, 261, 480, 29, 1676, 65, 5589, 14, 13746, 26628, 303, 41030, 14374, 13, 20362, 198, 8818, 12854, 62, 1462, 62, 41068, 7, 40546, 3712, 2898, 558, 11, 13358, 62, 6381, 8443, 28, 7942, 8, 198, 220, 220, 220, 8379, 796, 3975, ...
2.475166
604
{"timestamp": 1569423400.0, "score": 8.29, "score_count": 280468} {"timestamp": 1567156754.0, "score": 8.29, "score_count": 278066} {"timestamp": 1565469034.0, "score": 8.29, "score_count": 275631} {"timestamp": 1565467195.0, "score": 8.29, "score_count": 275631} {"timestamp": 1564796466.0, "score": 8.29, "score_count"...
[ 4895, 16514, 27823, 1298, 1315, 3388, 43356, 7029, 13, 15, 11, 366, 26675, 1298, 807, 13, 1959, 11, 366, 26675, 62, 9127, 1298, 21355, 38472, 92, 198, 4895, 16514, 27823, 1298, 1315, 3134, 21599, 41874, 13, 15, 11, 366, 26675, 1298, 8...
2.35775
14,239
using JinjaTemplates """ JinjaTemplates.renders a given element tree by passing elements thru Jinja Templates """ function jinja(env, md::Markdown.MD) env.scratch[:settings_cache] = flatten(env.settings) stream = IOBuffer() for element in md.content println(stream, jinja(env, element)) end t...
[ 3500, 17297, 6592, 12966, 17041, 198, 37811, 17297, 6592, 12966, 17041, 13, 10920, 364, 257, 1813, 5002, 5509, 416, 6427, 4847, 33834, 17297, 6592, 5825, 17041, 37227, 198, 8818, 474, 259, 6592, 7, 24330, 11, 45243, 3712, 9704, 2902, 13, ...
2.339772
2,278
<reponame>JuliaReach/ARCH2021_AFF_RE<filename>models/ISS/ISS_benchmark.jl using BenchmarkTools, Plots, Plots.PlotMeasures, LaTeXStrings using BenchmarkTools: minimum, median SUITE = BenchmarkGroup() model = "ISS" cases = ["ISSF01-ISS01", "ISSF01-ISU01", "ISSF01-ISS01-discrete", "ISSF01-ISU01-discrete", ...
[ 27, 7856, 261, 480, 29, 16980, 544, 3041, 620, 14, 31315, 1238, 2481, 62, 32, 5777, 62, 2200, 27, 34345, 29, 27530, 14, 16744, 14, 16744, 62, 26968, 4102, 13, 20362, 198, 3500, 25187, 4102, 33637, 11, 1345, 1747, 11, 1345, 1747, 13,...
2.288513
3,012
using Makie s=Scene() xy1, xz1, xy2, xz2 = -1., -1., 1., 1. lines!(s,[0.,0.,0.,0.,0.],[xy1,xy1,xy2,xy2,xy1],[xz1,xz2,xz2,xz1,xz1]) b=vec(Point3f0.([0.,0.,0.,0.],[xy1,xy1,xy2,xy2],[xz1,xz2,xz2,xz1])) u=vec(Point3f0.([0.,0.,0.,0.],[0,xy2-xy1,0.,xy1-xy2],[xz2-xz1,0.,xz1-xz2,0])) arrows!(s,b,u) yz1, yx1, yz2, yx2 = -1., ...
[ 3500, 15841, 494, 198, 198, 82, 28, 36542, 3419, 198, 5431, 16, 11, 2124, 89, 16, 11, 2124, 88, 17, 11, 2124, 89, 17, 796, 532, 16, 1539, 532, 16, 1539, 352, 1539, 352, 13, 198, 6615, 0, 7, 82, 17414, 15, 1539, 15, 1539, 15, ...
1.460457
569
<filename>src/GMT.jl module GMT using Printf # Need to know what GMT version is available or if none at all to warn users on how to # install GMT. try # Due to a likely Julia bug next command fails when this file called with 'using' #ver_s = @capture_out run(`gmt --version`); #@show(length(ver_s)) # Prints 0 len...
[ 27, 34345, 29, 10677, 14, 49424, 13, 20362, 198, 21412, 16987, 198, 198, 3500, 12578, 69, 198, 198, 2, 10664, 284, 760, 644, 16987, 2196, 318, 1695, 393, 611, 4844, 379, 477, 284, 9828, 2985, 319, 703, 284, 198, 2, 2721, 16987, 13, ...
2.611507
1,825
<gh_stars>0 isbanded(A::AbstractTriangular) = isbanded(parent(A)) bandwidths(A::Union{UpperTriangular,UnitUpperTriangular}) = (min(0,bandwidth(parent(A),1)), bandwidth(parent(A),2)) bandwidths(A::Union{LowerTriangular,UnitLowerTriangular}) = (bandwidth(parent(A),1), min(0,bandwidth(parent(A),2))) triangularl...
[ 27, 456, 62, 30783, 29, 15, 628, 198, 271, 3903, 276, 7, 32, 3712, 23839, 14824, 21413, 8, 796, 318, 3903, 276, 7, 8000, 7, 32, 4008, 198, 3903, 10394, 82, 7, 32, 3712, 38176, 90, 52, 2848, 14824, 21413, 11, 26453, 52, 2848, 148...
1.840959
1,836
<filename>src/types.jl # ============================================================================== # Trop{T} types # Fake templates to make difference between Min-Plus and Max-Plus numbers struct Min end struct Max end const MM = Union{Min, Max} # Base class for Max-Plus and Min-Plus structures struct Trop{T <: ...
[ 27, 34345, 29, 10677, 14, 19199, 13, 20362, 198, 2, 38093, 25609, 28, 198, 2, 25491, 90, 51, 92, 3858, 198, 198, 2, 33482, 24019, 284, 787, 3580, 1022, 1855, 12, 17860, 290, 5436, 12, 17860, 3146, 198, 7249, 1855, 886, 198, 7249, ...
2.820574
418
" Test for projected newton QP solver author: <NAME> " using ArgMin using Test function test_solve_qp_with_projected_newton1() println("test_solve_qp_with_projected_newton1") n = 5 g = randn(n) H = randn(n,n) H = H*H' lower = -ones(n) upper = ones(n) xstar, status = sol...
[ 1, 198, 6208, 329, 13301, 649, 1122, 1195, 47, 1540, 332, 220, 628, 1772, 25, 1279, 20608, 29, 198, 1, 198, 198, 3500, 20559, 9452, 198, 3500, 6208, 198, 198, 8818, 1332, 62, 82, 6442, 62, 80, 79, 62, 4480, 62, 16302, 276, 62, 3...
1.734242
587
<reponame>UnofficialJuliaMirrorSnapshots/Gridap.jl-56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e<gh_stars>0 module Assemblers using Gridap using Gridap.Helpers using SparseArrays using SparseMatricesCSR export Assembler export SparseMatrixAssembler export assemble export assemble! export sparse_from_coo """ Abstract assemb...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 41339, 499, 13, 20362, 12, 3980, 67, 19, 69, 17, 68, 24, 12, 22, 18213, 16, 12, 3365, 2598, 12, 24, 12993, 21, 12, 65, 24, 66, 4349, 6888, 22, 344, ...
2.37666
2,108
module Util export find_extremes, random_cities """ find_extremes(array) Locate minimum and maximum in array. #Return value ((minimum, idx_of_min), (maximum, idx_of_max)) """ function find_extremes(arr::AbstractArray) min = max = arr[1] min_i = max_i = 1 for ...
[ 21412, 7273, 346, 198, 220, 220, 220, 10784, 1064, 62, 2302, 2787, 274, 11, 4738, 62, 66, 871, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1064, 62, 2302, 2787, 274, 7, 18747, 8, 198, 220, 220, 220, 406, 1...
1.868421
304
<gh_stars>1-10 function intempdir(fn::Function, parent=tempdir()) tmpdir = mktempdir(parent) try cd(fn, tmpdir) finally rm(tmpdir, recursive=true) end end
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 8818, 493, 45787, 15908, 7, 22184, 3712, 22203, 11, 2560, 28, 29510, 15908, 28955, 198, 220, 220, 220, 45218, 15908, 796, 33480, 29510, 15908, 7, 8000, 8, 198, 220, 220, 220, 1949, 198,...
2.172414
87
module FusionDirect using OpenGene using OpenGene.Algorithm using OpenGene.Reference # package code goes here # make it compatible for different version of Julia include("compat.jl") export detect import Base: -, abs include("index/index.jl") include("detect/detect.jl") end # module
[ 21412, 21278, 13470, 198, 198, 3500, 4946, 39358, 198, 3500, 4946, 39358, 13, 2348, 42289, 198, 3500, 4946, 39358, 13, 26687, 198, 198, 2, 5301, 2438, 2925, 994, 198, 198, 2, 787, 340, 11670, 329, 1180, 2196, 286, 22300, 198, 17256, 7...
3.277778
90
<gh_stars>0 using Plots using CSV function general_setup() gr() fntsm = Plots.font(pointsize = 12) fntlg = Plots.font(pointsize = 18) default(titlefont = fntlg, guidefont = fntlg, tickfont = fntsm, legendfont = fntsm) end function plot_agent_losses(csv_path, plot_file; lower_bound = 1.0e-15, upper_bou...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 1345, 1747, 198, 3500, 44189, 198, 198, 8818, 2276, 62, 40406, 3419, 198, 220, 220, 220, 1036, 3419, 198, 220, 220, 220, 277, 429, 5796, 796, 1345, 1747, 13, 10331, 7, 4122, 7857, 796, 1105, ...
2.166237
776
<reponame>ikroener/ClimateTools.jl<gh_stars>10-100 using Dates, AxisArrays @testset "Functions" begin # findmax d = collect(DateTime(2003,1,1):Day(1):DateTime(2005,12,31)) data = Array{Float64,3}(undef, 2, 2,1096) data[1,1,:] = collect(1.0:1096.0); data[1,2,:] = collect(1.0:1096.0); data[2,1,:]=collect(1.0:1096.0); d...
[ 27, 7856, 261, 480, 29, 1134, 305, 877, 14, 37649, 33637, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 44712, 11, 38349, 3163, 20477, 198, 198, 31, 9288, 2617, 366, 24629, 2733, 1, 2221, 198, 2, 1064, 9806, 198, 67...
2.14488
918
<reponame>qhho/POMDPSimulators.jl ds = DisplaySimulator(max_steps=10, extra_initial=true, extra_final=true, rng=MersenneTwister(4)) m = BabyPOMDP() @test simulate(ds, m, Starve()) ≈ 0.0 ds = DisplaySimulator(max_steps=1, extra_init...
[ 27, 7856, 261, 480, 29, 80, 71, 8873, 14, 47, 2662, 35, 3705, 320, 24325, 13, 20362, 198, 9310, 796, 16531, 8890, 8927, 7, 9806, 62, 20214, 28, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.8
280
iscapitalletter(b) = UInt(0x0041) <= b <= UInt(0x05A) islowercaseletter(b) = UInt(0x0061) <= b <= UInt(0x07A) isnamestart(b) = iscapitalletter(b) || islowercaseletter(b) || b == UInt('_') isnamecontinue(b) = isnamestart(b) || isdigit(Char(b)) isunicodechar(b) = iscapitalletter(b) || islowercaseletter(b) || isdigit(Ch...
[ 2304, 499, 1287, 9291, 7, 65, 8, 796, 471, 5317, 7, 15, 87, 405, 3901, 8, 19841, 275, 19841, 471, 5317, 7, 15, 87, 2713, 32, 8, 220, 198, 3044, 789, 7442, 9291, 7, 65, 8, 796, 471, 5317, 7, 15, 87, 405, 5333, 8, 19841, 275, ...
1.889211
1,724
<reponame>usnistgov/NeXLDatabase.jl ### A Pluto.jl notebook ### # v0.12.18 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 bin...
[ 27, 7856, 261, 480, 29, 385, 77, 396, 9567, 14, 8199, 55, 11163, 265, 5754, 13, 20362, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 1507, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, ...
1.829099
1,299
struct MPISum{T} data::T comm::MPI.Comm end MPISum(data::T, comm=MPI.COMM_WORLD) where {T} = MPISum{T}(data, comm) # Apply the sum function (A::MPISum)(v) return MPI.Allreduce(A.data(v), +, A.comm) end
[ 7249, 4904, 1797, 388, 90, 51, 92, 198, 220, 1366, 3712, 51, 198, 220, 725, 3712, 7378, 40, 13, 6935, 198, 437, 198, 198, 7378, 1797, 388, 7, 7890, 3712, 51, 11, 725, 28, 7378, 40, 13, 9858, 44, 62, 45359, 11163, 8, 810, 1391, ...
2.079208
101
function sift!(Eav, decomp, d_osf, nsifts=5) N = length(decomp) e1 = zeros(N) e2 = zeros(N) avg = zeros(N) w = max(div(d_osf-1, 2), 3) if iseven(w) w += 1 end for j in 1:nsifts stream_minmax(e1, e2, decomp, d_osf) e1 .= moving_average(e1, d_osf) ...
[ 8818, 264, 2135, 0, 7, 36, 615, 11, 38237, 11, 288, 62, 418, 69, 11, 36545, 19265, 28, 20, 8, 201, 198, 220, 220, 220, 399, 796, 4129, 7, 12501, 3361, 8, 201, 198, 220, 220, 220, 304, 16, 796, 1976, 27498, 7, 45, 8, 201, 198...
1.64697
660
using Colors export normalcolors, lambert, basic, phong, visible, edges abstract MaterialPrimitive immutable Material{P<:MaterialPrimitive} <: Compose3DNode primitives::Vector{P} end isscalar(material::Material) = length(material.primitives) == 1 immutable MeshColor <: MaterialPrimitive color::Color end f...
[ 3500, 29792, 198, 198, 39344, 3487, 4033, 669, 11, 30592, 4835, 11, 4096, 11, 872, 506, 11, 7424, 11, 13015, 198, 198, 397, 8709, 14633, 23828, 1800, 198, 198, 8608, 18187, 14633, 90, 47, 27, 25, 17518, 23828, 1800, 92, 1279, 25, 30...
3.071739
460
<reponame>danielzhaotongliu/MALTrendsWeb {"score_count": 463641, "score": 7.94, "timestamp": 1565469087.0} {"score_count": 463641, "score": 7.94, "timestamp": 1565467461.0} {"score_count": 462632, "score": 7.94, "timestamp": 1564796506.0} {"score_count": 462632, "score": 7.94, "timestamp": 1564455237.0} {"score_count":...
[ 27, 7856, 261, 480, 29, 67, 6321, 89, 3099, 313, 506, 4528, 84, 14, 44, 31429, 10920, 82, 13908, 198, 4895, 26675, 62, 9127, 1298, 604, 5066, 42759, 11, 366, 26675, 1298, 767, 13, 5824, 11, 366, 16514, 27823, 1298, 1315, 39111, 3388...
2.347573
19,219
push!(LOAD_PATH, "../src/") using Documenter using BasicDataLoaders makedocs(sitename="BasicDataLoaders") deploydocs(repo = "github.com/lucasondel/BasicDataLoaders.git", devbranch = "main")
[ 14689, 0, 7, 35613, 62, 34219, 11, 366, 40720, 10677, 14, 4943, 198, 198, 3500, 16854, 263, 198, 3500, 14392, 6601, 8912, 364, 198, 198, 76, 4335, 420, 82, 7, 48937, 12453, 2625, 26416, 6601, 8912, 364, 4943, 198, 198, 2934, 1420, 3...
2.428571
84
<reponame>mmider/GuidedProposals.jl #=============================================================================== Routines for computing the log-likelihood functions and solve!'ing the path from the Wiener path and computing the log-likelihood at the same time. =========================================...
[ 27, 7856, 261, 480, 29, 3020, 1304, 14, 8205, 1384, 24331, 418, 874, 13, 20362, 198, 2, 23926, 25609, 18604, 628, 220, 220, 220, 39602, 1127, 329, 14492, 262, 2604, 12, 2339, 11935, 5499, 290, 8494, 13679, 278, 198, 220, 220, 220, 2...
1.907813
3,200
<reponame>chmathys/ForneyLab.jl module BetaTest using Test using ForneyLab using ForneyLab: outboundType, isApplicable, prod!, unsafeMean, unsafeLogMean, unsafeMirroredLogMean, unsafeVar, vague, dims, logPdf, naturalParams, standardDistribution using ForneyLab: SPBetaOutNPP, SPBetaAMNM, SPBetaBMMN, SPBetaOutNMM, VBBet...
[ 27, 7856, 261, 480, 29, 354, 11018, 893, 14, 1890, 1681, 17822, 13, 20362, 198, 21412, 17993, 14402, 198, 198, 3500, 6208, 198, 3500, 1114, 1681, 17822, 198, 3500, 1114, 1681, 17822, 25, 503, 7784, 6030, 11, 318, 33583, 540, 11, 40426...
2.598394
2,241
<gh_stars>0 using BivMatFun; using BenchmarkTools; using Printf; using LinearAlgebra; using DelimitedFiles; using MAT; include("experiments_common.jl") function run_test() success = true; matrices = [ "jordbloc1", "grcar", "smoke", "kahan2", "lesp", "sampling", "grcar-randn" ]; m = 64; ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 347, 452, 19044, 24629, 26, 198, 3500, 25187, 4102, 33637, 26, 198, 3500, 12578, 69, 26, 198, 3500, 44800, 2348, 29230, 26, 198, 3500, 4216, 320, 863, 25876, 26, 198, 3500, 36775, 26, 198, 198,...
1.751484
2,358
# This example will be gone through by the teacher using SpatialEcology, DataFrames, CSV, Plots # Read the data mammals = CSV.read("mammals.csv", DataFrame) regions = DataFrame(CSV.File("wallace_points.csv")) coord = CSV.read("coord.csv", DataFrame) # build the assemblage object and plot it world_mammals = Assemblage...
[ 2, 770, 1672, 481, 307, 3750, 832, 416, 262, 4701, 198, 3500, 1338, 34961, 49136, 1435, 11, 6060, 35439, 11, 44189, 11, 1345, 1747, 198, 198, 2, 4149, 262, 1366, 198, 76, 6475, 874, 796, 44189, 13, 961, 7203, 76, 6475, 874, 13, 40...
2.607143
700
<reponame>jorgepz/Materialis.jl using Materialis using Test @testset "Test: FEM2Grid interpolation matrix" begin # generate the FEM mesh Lx = 0.5 Ly = 1.0 Lz = 1.2 testNodes = [ 0 0 0 ; 0 0 Lz ; 0 Ly Lz ; 0 Ly 0 ; ...
[ 27, 7856, 261, 480, 29, 73, 3643, 79, 89, 14, 17518, 271, 13, 20362, 198, 3500, 14633, 271, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 14402, 25, 376, 3620, 17, 41339, 39555, 341, 17593, 1, 2221, 628, 220, 220, 220, 1303, 771...
1.872054
891
<gh_stars>1-10 module Causality import Base: union import CausalInference import Combinatorics using Base using Reexport @reexport using LightGraphs @reexport using MetaGraphs @reexport using SymbolicUtils function _update_module_doc() path = joinpath(@__DIR__, "..", "README.md") text = read(path, String) ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 6488, 385, 1483, 198, 198, 11748, 7308, 25, 6441, 198, 11748, 6488, 6775, 818, 4288, 198, 11748, 955, 8800, 1352, 873, 198, 198, 3500, 7308, 198, 3500, 797, 39344, 198, 31, 631, 87, ...
2.65098
255
<gh_stars>1-10 const refinements = 5 const Lx = 2.0 const Ly = 1.0
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 9979, 50170, 3196, 796, 642, 198, 9979, 406, 87, 796, 362, 13, 15, 198, 9979, 9334, 796, 352, 13, 15, 628 ]
2.266667
30
""" atleast2d \\ For formatting the dimensions of the random variables to at least 2 dimensions \\ Arguments: random_variable \\ Returns: A 2-d version of the variable \\ """ function atleast2d(random_variable::Array) is_one_d = 1 == ndims(random_variable) return is_one_d ? reshape(random_variable, size(rando...
[ 37811, 198, 265, 293, 459, 17, 67, 26867, 198, 198, 1890, 33313, 262, 15225, 286, 262, 4738, 9633, 284, 379, 1551, 362, 15225, 220, 26867, 198, 28100, 2886, 25, 220, 4738, 62, 45286, 26867, 198, 35561, 25, 220, 220, 220, 317, 362, 1...
3.112069
116
#= distributions.jl Contains code to create alternatively parameterised distributions, including copulae. Author: <NAME> ====================== School of Mathematical Sciences Queensland University of Technology ====================== ...
[ 2, 28, 628, 220, 220, 220, 24570, 13, 20362, 628, 220, 220, 220, 49850, 2438, 284, 2251, 46596, 11507, 1417, 24570, 11, 1390, 2243, 377, 3609, 13, 628, 220, 220, 220, 6434, 25, 220, 220, 220, 220, 1279, 20608, 29, 198, 220, 220, 2...
2.305681
3,327
module test_julia_generated using Test generated_arg_types = [] non_generated_args = [] function f(x) if @generated push!(generated_arg_types, x) :x else push!(non_generated_args, x) 0 end end f(1) @test generated_arg_types == [Int] f("") @test generated_arg_types == [Int...
[ 21412, 1332, 62, 73, 43640, 62, 27568, 198, 198, 3500, 6208, 198, 198, 27568, 62, 853, 62, 19199, 796, 17635, 198, 13159, 62, 27568, 62, 22046, 796, 17635, 198, 198, 8818, 277, 7, 87, 8, 198, 220, 220, 220, 611, 2488, 27568, 198, ...
2.383686
331
<reponame>gbarsih/Representations-in-Robotics<filename>julia-scripts/vgate.jl struct VirtualGate{T<:AbstractFloat} <: Wall{T} sp::SVector{2,T} ep::SVector{2,T} normal::SVector{2,T} width::T center::SVector{2,T} color::Symbol name::String end function VirtualGate(sp::AbstractVector, ep::Abstr...
[ 27, 7856, 261, 480, 29, 22296, 945, 4449, 14, 40171, 602, 12, 259, 12, 14350, 23891, 27, 34345, 29, 73, 43640, 12, 46521, 14, 85, 10494, 13, 20362, 198, 7249, 15595, 22628, 90, 51, 27, 25, 23839, 43879, 92, 1279, 25, 5007, 90, 51,...
2.28865
1,022
# abstract type Equation end #---------------------------------------------------------------------- export Diffusion #---------------------------------------------------------------------- struct Diffusion{T,U} <: Equation # {T,U,D,K} # type, dimension, (bdfK order) fld::Field{T} ν ::Array{T} # viscosity ...
[ 2, 198, 397, 8709, 2099, 7889, 341, 886, 198, 198, 2, 10097, 23031, 198, 39344, 10631, 4241, 198, 2, 10097, 23031, 198, 7249, 10631, 4241, 90, 51, 11, 52, 92, 1279, 25, 7889, 341, 1303, 1391, 51, 11, 52, 11, 35, 11, 42, 92, 1303...
2.088932
1,563
if basename(pwd()) == "aoc" cd("2017/7") end function mermaid(filename::AbstractString) open(replace(filename, ".txt" => ".mmd"), "w") do f write(f, "graph TD\r\n") for line in eachline(filename; keep = true) if occursin(r"->", line) write(f, replace(line, ", " => " ...
[ 361, 1615, 12453, 7, 79, 16993, 28955, 6624, 366, 64, 420, 1, 198, 220, 220, 220, 22927, 7203, 5539, 14, 22, 4943, 198, 437, 198, 198, 8818, 4017, 23151, 7, 34345, 3712, 23839, 10100, 8, 198, 220, 220, 220, 1280, 7, 33491, 7, 3434...
2.262916
871
<gh_stars>0 function update_beta!(state::State, data::Data, prior::Prior, flags::Vector{Flag}) if UpdateBetaWithSkewT() in flags llC = marginal_loglike_beta('C', state, data) llT = marginal_loglike_beta('T', state, data) else llC = marginal_loglike_beta_latent_var('C', state, data)...
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 4296, 62, 31361, 0, 7, 5219, 3712, 9012, 11, 1366, 3712, 6601, 11, 3161, 3712, 22442, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.343434
198
<reponame>davidbarber/Julia0p5ProbabilisticInferenceEngine<filename>Demos/demoChainIndepRational.jl function demoChainIndepRational() println("In this demo we consider the directed graph A->B->C") println("The chain is such that A and B are dependent, B and C are dependent, yet A and C are independent.") p...
[ 27, 7856, 261, 480, 29, 67, 8490, 5657, 527, 14, 16980, 544, 15, 79, 20, 2964, 65, 14991, 2569, 818, 4288, 13798, 27, 34345, 29, 11522, 418, 14, 9536, 78, 35491, 5497, 538, 49, 864, 13, 20362, 198, 8818, 13605, 35491, 5497, 538, 4...
2.302768
578
<reponame>vavrines/KitML.jl nn = Chain(Dense(21, 21, tanh), Dense(21, 21)) nn1 = FastChain(FastDense(21, 21, tanh), FastDense(21, 21)) X = randn(Float32, 21, 10) Y = rand(Float32, 21, 10) KitML.sci_train!(nn, (X, Y), ADAM()) KitML.sci_train!(nn, Flux.Data.DataLoader((X, Y)), ADAM(); device = cpu, epoch = 1) KitML.sci_...
[ 27, 7856, 261, 480, 29, 85, 615, 81, 1127, 14, 20827, 5805, 13, 20362, 198, 20471, 796, 21853, 7, 35, 1072, 7, 2481, 11, 2310, 11, 25706, 71, 828, 360, 1072, 7, 2481, 11, 2310, 4008, 198, 20471, 16, 796, 12549, 35491, 7, 22968, ...
2.110687
262
<reponame>tgymnich/Metal.jl using Test using Metal @testset "MTL" begin @testset "devices" begin devs = devices() @test length(devs) > 0 dev = first(devs) @test dev == devs[1] if length(devs) > 1 @test dev != devs[2] end end @testset "buffers" begin dev = first(devices()) buf = MtlBuffer{Int}(dev, 1) @test...
[ 27, 7856, 261, 480, 29, 83, 1360, 10295, 488, 14, 36790, 13, 20362, 198, 3500, 6208, 198, 3500, 12136, 198, 198, 31, 9288, 2617, 366, 13752, 43, 1, 2221, 198, 31, 9288, 2617, 366, 42034, 1, 2221, 198, 198, 7959, 82, 796, 4410, 341...
2.352601
173
# This file contains functions for economic optimization problems. # These functions are intended for internal use and package extensions. function deamincost(X::Union{Matrix,Vector}, Y::Union{Matrix,Vector}, W::Union{Matrix,Vector}; rts::Symbol = :VRS, dispos::Symbol = :Strong, optimizer::Union{DEAOptimizer,No...
[ 2, 770, 2393, 4909, 5499, 329, 3034, 23989, 2761, 13, 198, 2, 2312, 5499, 389, 5292, 329, 5387, 779, 290, 5301, 18366, 13, 198, 8818, 390, 321, 1939, 455, 7, 55, 3712, 38176, 90, 46912, 11, 38469, 5512, 575, 3712, 38176, 90, 46912, ...
2.142028
3,619
<reponame>JuliaPackageMirrors/Kafka.jl module Kafka export KafkaClient, metadata, produce, fetch, list_offsets, _metadata, _produce, _fetch, _list_offsets, earliest_offset, latest_offset include("core.jl") end # module
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 42, 1878, 4914, 13, 20362, 198, 21412, 46906, 198, 198, 39344, 46906, 11792, 11, 198, 220, 220, 220, 220, 220, 220, 20150, 11, 198, 220, 220, 220, 220, 220, 220, 4439, 11, ...
2.027778
144
<reponame>pmoura/eye # See https://en.wikipedia.org/wiki/Graph_(discrete_mathematics) using Julog clauses = @julog [ oneway(paris, orleans) <<= true, oneway(paris, chartres) <<= true, oneway(paris, amiens) <<= true, oneway(orleans, blois) <<= true, oneway(orleans, bourges) <<= true, oneway(blo...
[ 27, 7856, 261, 480, 29, 4426, 280, 430, 14, 25379, 198, 2, 4091, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 37065, 41052, 15410, 8374, 62, 6759, 10024, 873, 8, 198, 198, 3500, 5979, 519, 198, 198, 565, 64, 2664, 796, 248...
2.235294
374
using BinDeps using Compat import Base.Sys.WORD_SIZE # version of cubature package to use letsberational="1.0.0.1203" tagfile = "installed_vers" if !isfile(tagfile) || readchomp(tagfile) != "$letsberational $WORD_SIZE" info("Installing Let's be rational library...") cd("src") do run(`make`) end ...
[ 3500, 20828, 12156, 82, 198, 3500, 3082, 265, 198, 11748, 7308, 13, 44387, 13, 54, 12532, 62, 33489, 198, 198, 2, 2196, 286, 13617, 1300, 5301, 284, 779, 198, 5289, 527, 864, 2625, 16, 13, 15, 13, 15, 13, 1065, 3070, 1, 198, 12985...
2.566845
187
""" PyRef([x]) A reference to a Python object converted from `x`, or a null reference if `x` is not given. This is baically just a mutable reference to a pointer to a Python object. It owns the reference (if non-NULL) and automatically decrefs it when finalized. Building block for more complex wrapper types such...
[ 37811, 198, 220, 220, 220, 9485, 8134, 26933, 87, 12962, 198, 198, 32, 4941, 284, 257, 11361, 2134, 11513, 422, 4600, 87, 47671, 393, 257, 9242, 4941, 611, 4600, 87, 63, 318, 407, 1813, 13, 198, 198, 1212, 318, 26605, 1146, 655, 257...
2.020096
1,045
<reponame>UnofficialJuliaMirrorSnapshots/PlanarMaps.jl-291fd964-e446-5d75-9412-e8e0eb420fa7<filename>src/uniformwoodedtriangulations.jl #-------------------------------------------------------- function sample(RNG::Random.AbstractRNG,w::Vector) w /= sum(w) p = rand(RNG) runningsum = 0 for i=1:length(w...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 20854, 283, 47010, 13, 20362, 12, 33551, 16344, 24, 2414, 12, 68, 27260, 12, 20, 67, 2425, 12, 5824, 1065, 12, 68, 23, 68, 15, 1765, 27211, 13331, 22, ...
1.833534
4,145
<reponame>mlkrock/BATsDistribution.jl module BulkAndTails using Distributions, ForwardDiff, Ipopt, Roots, Random export BulkAndTailsDist, fitbats, fit_bats_mle_covariates, fitbats_covariates, batspdf, batscdf, batsquantile, batslogpdf, batslogcdf, batsrand include("BulkAndTailsDist_struct.jl") include("BulkAn...
[ 27, 7856, 261, 480, 29, 4029, 74, 10823, 14, 47379, 82, 20344, 3890, 13, 20362, 198, 21412, 47900, 1870, 51, 1768, 628, 220, 1262, 46567, 507, 11, 19530, 28813, 11, 314, 79, 8738, 11, 34341, 11, 14534, 198, 220, 10784, 47900, 1870, ...
2.805369
149
<gh_stars>0 using IndEco using Test @testset "IndEco.jl" begin # Write your tests here. end
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 1423, 36, 1073, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 5497, 36, 1073, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437, 198 ]
2.425
40
# so need to write a function that uses the helper functions to send a get request to tm1 base url @api_default function ping(api::TM1API; options...) tm1_get_json(api) end
[ 2, 523, 761, 284, 3551, 257, 2163, 326, 3544, 262, 31904, 5499, 284, 3758, 257, 651, 2581, 284, 256, 76, 16, 2779, 19016, 198, 198, 31, 15042, 62, 12286, 2163, 29400, 7, 15042, 3712, 15972, 16, 17614, 26, 3689, 23029, 198, 220, 256,...
3.2
55
using Base.Test println("testing MPI...") run(`julia mpi_test.jl`) run(`mpirun -np 2 julia mpi_test.jl`) println("done testing MPI.") println("testing data source/sink...") include("source_test.jl") include("sink_test.jl") run(`mpirun -np 2 julia sink_test.jl`) println("done testing data source/sink.") println("test...
[ 3500, 7308, 13, 14402, 198, 198, 35235, 7203, 33407, 4904, 40, 9313, 8, 198, 5143, 7, 63, 73, 43640, 285, 14415, 62, 9288, 13, 20362, 63, 8, 198, 5143, 7, 63, 3149, 343, 403, 532, 37659, 362, 474, 43640, 285, 14415, 62, 9288, 13, ...
2.570957
606
using OpenQuantumTools, OrdinaryDiffEq, Plots, Printf, LaTeXStrings β = 4 T = β_2_temperature(β) η = 0.1 fc= 10/(2π) bath = Ohmic(η, fc, T) plot(bath, :γ, range(0,10,length=100), linewidth=2, label="") τsb, err_τsb = τ_SB((x)->correlation(x, bath)) @printf("τ_sb of the Ohmic bath is %.6f with error estimation %.2...
[ 198, 3500, 4946, 24915, 388, 33637, 11, 14230, 3219, 28813, 36, 80, 11, 1345, 1747, 11, 12578, 69, 11, 4689, 49568, 13290, 654, 198, 198, 26638, 796, 604, 198, 51, 796, 27169, 62, 17, 62, 11498, 21069, 7, 26638, 8, 198, 138, 115, ...
2.02439
943
using BSplines function gen_traj(t, via_points; order=3, basis=nothing) @assert length(t) == size(points)[1] x = via_points[:,1] y = via_points[:,2] z = via_points[:,3] if basis === nothing basis = averagebasis(order, t) end xspline = BSplines.interpolate(basis, t, x) yspline =...
[ 3500, 24218, 489, 1127, 198, 198, 8818, 2429, 62, 9535, 73, 7, 83, 11, 2884, 62, 13033, 26, 1502, 28, 18, 11, 4308, 28, 22366, 8, 198, 220, 220, 220, 2488, 30493, 4129, 7, 83, 8, 6624, 2546, 7, 13033, 38381, 16, 60, 198, 220, ...
2.19
200
using PackageCompiler using Setfield using Pkg using Random const trace_dir = abspath(@__DIR__,"../traces/") const trace_file = Vector{UInt8}() function trace() global trace_dir,trace_file !isdir(trace_dir) && mkdir(trace_dir) empty!(trace_file) for c in joinpath(trace_dir,"trace_$(rand(UInt32)).jl")...
[ 3500, 15717, 7293, 5329, 198, 3500, 5345, 3245, 198, 3500, 350, 10025, 198, 3500, 14534, 198, 198, 9979, 12854, 62, 15908, 796, 2352, 6978, 7, 31, 834, 34720, 834, 553, 40720, 2213, 2114, 14, 4943, 198, 9979, 12854, 62, 7753, 796, 206...
2.276361
2,627
using Revtok using Base.Test # write your own tests here @test begin text = replace(normalize_string(readstring( download("http://www.gutenberg.org/cache/epub/1661/pg1661.txt"))[4:end], newline2lf=true), r"\n+", s->length(s) == 1 ? " " : "\n" ^ (length(s) - 1)); detokenize(tokenize(text)) == te...
[ 3500, 5416, 83, 482, 198, 3500, 7308, 13, 14402, 198, 198, 2, 3551, 534, 898, 5254, 994, 198, 31, 9288, 2221, 198, 220, 220, 220, 2420, 796, 6330, 7, 11265, 1096, 62, 8841, 7, 961, 8841, 7, 198, 220, 220, 220, 220, 220, 220, 220...
2.369565
138
using ArgParse include("./src/raft.jl") using Raft ## I'm just a follower to start with ps = Raft.PersistentState(0, 0, []) vs = Raft.VolatileState(0, 0) s = ArgParseSettings("Runs a Raft server") @add_arg_table s begin "--server_id", "-s" help = "id of this server" arg_type = UInt64 required = ...
[ 3500, 20559, 10044, 325, 198, 198, 17256, 7, 1911, 14, 10677, 14, 1617, 13, 20362, 4943, 198, 3500, 7567, 701, 198, 198, 2235, 314, 1101, 655, 257, 33040, 284, 923, 351, 198, 862, 796, 7567, 701, 13, 30946, 7609, 9012, 7, 15, 11, ...
2.354906
479
using Base.Test using Compat # for breaking changes in julia 0.7 using SoilTracers anyerrors = false tests = ["consts.jl", "soilgrid/soilgrid.jl", "physchem/thermodyn.jl", "physchem/diffus.jl", "physchem/solub.jl", "physchem/water.jl", "physchem/rxn.jl", ...
[ 3500, 7308, 13, 14402, 198, 3500, 3082, 265, 220, 1303, 329, 7163, 2458, 287, 474, 43640, 657, 13, 22, 198, 3500, 1406, 346, 2898, 49908, 628, 198, 1092, 48277, 796, 3991, 198, 198, 41989, 796, 14631, 1102, 6448, 13, 20362, 1600, 198,...
2.026866
335