content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>crstnbr/dqmc using LightXML """ xml2parameters!(p::Params, input_xml) Load `p` from XML file (e.g. `.in.xml`). """ function xml2parameters!(p, input_xml::AbstractString, verbose=true) # READ INPUT XML params = Dict{Any, Any}() try params = xml2dict(input_xml, verbose) catch e printl...
[ 27, 7856, 261, 480, 29, 6098, 301, 77, 1671, 14, 49506, 23209, 198, 3500, 4401, 55, 5805, 198, 198, 37811, 198, 220, 220, 220, 35555, 17, 17143, 7307, 0, 7, 79, 3712, 10044, 4105, 11, 5128, 62, 19875, 8, 198, 220, 220, 220, 220, ...
2.28536
806
<filename>deps/build.jl import PyCall # , Conda # Conda.add("git") # Conda.add("pip") # Conda.add("cython") # Conda.add("numpy") # const pip = joinpath(Conda.BINDIR, "pip") # proxy_arg = String[] # if haskey(ENV, "http_proxy") # push!(proxy_arg, "--proxy") # push!(proxy_arg, ENV["http_proxy"]) # end pip = ...
[ 27, 34345, 29, 10378, 82, 14, 11249, 13, 20362, 198, 11748, 9485, 14134, 198, 198, 2, 837, 9724, 64, 198, 198, 2, 9724, 64, 13, 2860, 7203, 18300, 4943, 198, 2, 9724, 64, 13, 2860, 7203, 79, 541, 4943, 198, 2, 9724, 64, 13, 2860...
2.301948
308
<reponame>ModiaSim/ModiaResult include("test_01_OneScalarSignal.jl") include("test_02_OneScalarSignalWithUnit.jl") include("test_03_OneVectorSignalWithUnit.jl") include("test_04_ConstantSignalsWithUnit.jl") include("test_05_ArraySignalsWithUnit.jl") include("test_06_OneScalarMeasurementSignal.jl") include("test_07_One...
[ 27, 7856, 261, 480, 29, 5841, 544, 8890, 14, 5841, 544, 23004, 198, 17256, 7203, 9288, 62, 486, 62, 3198, 3351, 282, 283, 11712, 282, 13, 20362, 4943, 198, 17256, 7203, 9288, 62, 2999, 62, 3198, 3351, 282, 283, 11712, 282, 3152, 264...
2.662818
433
<gh_stars>1-10 #!/usr/bin/env julia using GraphIdx.Io.Snap: open_snap, parse_snap_edges using HDF5: h5open, attrs fname = get(ARGS, 1, "com-youtube.txt.gz") out = get(ARGS, 2, "out.h5") output_bin = false @time n, m, head, tail = open_snap(parse_snap_edges, fname) isfile(out) && rm(out) h5open(out, "w") do io at...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 3500, 29681, 7390, 87, 13, 40, 78, 13, 43826, 25, 1280, 62, 45380, 11, 21136, 62, 45380, 62, 276, 3212, 198, 3500, 5572, 37, 20, 25...
2.076
250
<reponame>ilkayn01/18.600-probability-RandomVariables begin using StatsBase function coin_toss(n) toss = [] head = 0 for i in 1:n push!(toss, sample(["H", "T"], 1, replace = false)) end for i in toss if i == ["H"] head += 1 end end return head/n end end
[ 27, 7856, 261, 480, 29, 346, 5568, 77, 486, 14, 1507, 13, 8054, 12, 1676, 65, 1799, 12, 29531, 23907, 2977, 198, 27471, 198, 197, 3500, 20595, 14881, 198, 197, 8818, 10752, 62, 83, 793, 7, 77, 8, 198, 197, 197, 83, 793, 796, 176...
2.103704
135
module Lu_julia_dense # using Lu # ArgName = "julia_dense" Descr = "Julia's default algorithm on a dense matrix." # type Dat{T} prob::Lu.Problem{T} A::Array{T,2} # Dat() = new() end # function construct_dat(T::DataType) return Dat{T}() end function fill_dat{T}(prob::Lu.Problem, dat::Dat{T}) dat.pro...
[ 21412, 6026, 62, 73, 43640, 62, 67, 1072, 198, 2, 198, 197, 3500, 6026, 198, 2, 198, 197, 197, 28100, 5376, 796, 366, 73, 43640, 62, 67, 1072, 1, 198, 197, 197, 24564, 81, 796, 366, 16980, 544, 338, 4277, 11862, 319, 257, 15715, ...
2.226576
587
let n = 50 p = 3 t = (1:n)/n Ut,Vt = egrss.generators(t,p); Wt,c = egrss.potrf(Ut,Vt,1e-2*ones(n)) Yt,Zt = egrss.trtri(Ut,Wt,c) Lref = cholesky(egrss.full(Ut,Vt) + Diagonal(1e-2*ones(n))).L Lref_inv = LowerTriangular(tril(inv(Lref))); L_inv = egrss.full_tril(Yt,Zt,1.0./c) @test...
[ 1616, 198, 220, 220, 220, 299, 796, 2026, 198, 220, 220, 220, 279, 796, 513, 198, 220, 220, 220, 256, 796, 357, 16, 25, 77, 20679, 77, 198, 220, 220, 220, 7273, 11, 53, 83, 796, 304, 2164, 824, 13, 8612, 2024, 7, 83, 11, 79, ...
1.671875
256
""" default_PARF(grid, ΔT, iterations) Generate default hourly surface PAR. """ function default_PARF(grid, ΔT, iterations) PAR = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3871666666666666, 87.10258333333333, 475.78150000000016, 929.2737916666669, 1232.3633333333337, 1638.918916666667, 1823.7921666666664, 190...
[ 37811, 198, 220, 220, 220, 4277, 62, 27082, 37, 7, 25928, 11, 37455, 51, 11, 34820, 8, 198, 8645, 378, 4277, 30160, 4417, 29463, 13, 198, 37811, 198, 8818, 4277, 62, 27082, 37, 7, 25928, 11, 37455, 51, 11, 34820, 8, 198, 220, 220,...
1.992621
7,589
<filename>src/interpolation_utils.jl function findRequiredIdxs(A::LagrangeInterpolation, t) idxs = sortperm(A.t,by=x->abs(t-x)) idxs[1:(A.n+1)] end function spline_coefficients(n, d, k, u::Number) N = zeros(n) if u == k[1] N[1] = one(u) elseif u == k[end] N[end] = one(u) else i = fi...
[ 27, 34345, 29, 10677, 14, 3849, 16104, 341, 62, 26791, 13, 20362, 198, 8818, 1064, 37374, 7390, 34223, 7, 32, 3712, 43, 363, 9521, 9492, 16104, 341, 11, 256, 8, 201, 198, 220, 4686, 34223, 796, 3297, 16321, 7, 32, 13, 83, 11, 1525...
1.705514
798
<reponame>chkwon/TrafficAssignment.jl-<filename>src/frank_wolfe.jl # Frank-Wolfe Methods # CFW and BFW in Mitradijieva and Lindberg (2013) # required packages: Graphs, Optim include("misc.jl") function BPR(x::Vector{Float64}, td::TA_Data) bpr = similar(x) for i in 1:length(bpr) bpr[i] = td.free_flow_...
[ 27, 7856, 261, 480, 29, 354, 74, 26502, 14, 15721, 2108, 8021, 16747, 13, 20362, 12, 27, 34345, 29, 10677, 14, 8310, 962, 62, 18829, 68, 13, 20362, 198, 2, 5278, 12, 32069, 68, 25458, 198, 2, 18551, 54, 290, 347, 24160, 287, 11707...
1.904153
5,707
<filename>src/distribution_functions.jl<gh_stars>0 using FFTW using LinearAlgebra using Statistics export DistributionFunction """ DistributionFunction( grid1, grid2 ) """ struct DistributionFunction xgrid :: OneDGrid vgrid :: OneDGrid values :: Array{AbstractFloat, 2} function DistributionFunc...
[ 27, 34345, 29, 10677, 14, 17080, 3890, 62, 12543, 2733, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 376, 9792, 54, 198, 3500, 44800, 2348, 29230, 198, 3500, 14370, 198, 198, 39344, 27484, 22203, 198, 198, 37811, 198, 220, 220, ...
2.054054
666
module IEEE_754_2008 import Base: min, max, minmax, precision, ldexp, frexp include("extensions.jl") include("ulpufp.jl") # include bypasses precompilation # modulename = :QNaN; @eval begin import $modulename; using $modulename end modulename = :QNaN; @eval importall $modulename modulename = :SignificantBits; @eval ...
[ 21412, 40552, 62, 41874, 62, 11528, 198, 198, 11748, 7308, 25, 949, 11, 3509, 11, 949, 9806, 11, 15440, 11, 300, 67, 11201, 11, 2030, 42372, 198, 198, 17256, 7203, 2302, 5736, 13, 20362, 4943, 198, 17256, 7203, 29528, 3046, 79, 13, ...
2.545455
330
using Documenter, TextStylometry makedocs( format = :html, sitename = "Text Stylometry", modules = [TextStylometry], pages = [ "index.md", "Corpus" => "corpus.md", "Features" => "features.md", "Measures" => "measures.md", "Bootstrap measures" => "bootstrap.md", ...
[ 3500, 16854, 263, 11, 8255, 18716, 75, 15748, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 5794, 796, 1058, 6494, 11, 198, 220, 220, 220, 1650, 12453, 796, 366, 8206, 520, 2645, 15748, 1600, 198, 220, 220, 220, 13103, 796, ...
2.164659
249
using Blue using Test
[ 3500, 4518, 220, 198, 3500, 6208, 198 ]
3.285714
7
using ExpFamily using Base.Test @testset "gaussian" begin include("gaussian_test.jl") end @testset "diaggaussian" begin include("diaggaussian_test.jl") end @testset "gauss suffst" begin include("gaussian_suffstats_test.jl") end @testset "gauss loglik" begin include("gaussian_loglik_test.jl") end...
[ 3500, 5518, 24094, 198, 3500, 7308, 13, 14402, 198, 198, 31, 9288, 2617, 366, 4908, 31562, 1, 220, 220, 220, 220, 2221, 2291, 7203, 4908, 31562, 62, 9288, 13, 20362, 4943, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, ...
2.609756
123
<gh_stars>0 # Basic Operators # --------------- """ Count how many nucleotides satisfy a condition (i.e. f(seq[i]) -> true). The first argument should be a function which accepts a nucleotide as its parameter. """ function Base.count(f::Function, seq::BioSequence) n = 0 for x in seq if f(x) ...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 14392, 6564, 2024, 198, 2, 220, 24305, 198, 198, 37811, 198, 12332, 703, 867, 17751, 313, 1460, 15959, 257, 4006, 357, 72, 13, 68, 13, 277, 7, 41068, 58, 72, 12962, 4613, 2081, 737, 198, 198, ...
2.174939
4,916
module Node_Test using Compat using Compat.Test using IntervalArithmetic using EAGOBranchBound B = BnBModel([Interval(1.0,2.0),Interval(3.0,4.0)]) A1,A2,A3,A4,A5 = EAGOBranchBound.NS_depth_breadth(B) @test A1 == [Interval(1.0,2.0),Interval(3.0,4.0)] @test A2 == -Inf @test A3 == Inf @test A4 == 1 @test A5 == 1 end
[ 21412, 19081, 62, 14402, 198, 198, 3500, 3082, 265, 198, 3500, 3082, 265, 13, 14402, 198, 3500, 4225, 2100, 3163, 29848, 198, 3500, 412, 4760, 9864, 25642, 49646, 198, 198, 33, 796, 347, 77, 33, 17633, 26933, 9492, 2100, 7, 16, 13, ...
2.078431
153
<reponame>0382/CGcoefficient.jl<filename>src/WignerSymbols.jl # This file contains the core functions of WignerSymbols and CG-coefficient. """ HalfInt = Union{Integer, Rational} Angular momentum quantum numbers may be half integers and integers. With `HalfInt` type, you can use both `2` and `3//2` as parameters. ...
[ 27, 7856, 261, 480, 29, 15, 36243, 14, 39816, 1073, 16814, 13, 20362, 27, 34345, 29, 10677, 14, 54, 570, 263, 13940, 2022, 10220, 13, 20362, 198, 2, 770, 2393, 4909, 262, 4755, 5499, 286, 370, 570, 263, 13940, 2022, 10220, 290, 2992...
1.963303
5,123
using DataStructures using Test # Setup for pycall tests - done by travis, uncomment for manual run # using Conda; ENV["PYTHON"] = Conda.PYTHONDIR # using Pkg # Pkg.build("PyCall") # Conda.add_channel("conda-forge") # Conda.add("cfgrib") using PyCall @testset "era5-levels-members DataSet parity" begin test_fi...
[ 3500, 6060, 44909, 942, 198, 3500, 6208, 198, 198, 2, 220, 31122, 329, 12972, 13345, 5254, 532, 1760, 416, 1291, 4703, 11, 8820, 434, 329, 10107, 1057, 198, 2, 1262, 9724, 64, 26, 12964, 53, 14692, 47, 56, 4221, 1340, 8973, 796, 972...
1.817183
10,289
<filename>src/CauchyBorn_Si.jl<gh_stars>1-10 module CauchyBorn using JuLIP using JuLIP.Potentials: StillingerWeber import JuLIPMaterials.CLE: elastic_moduli export WcbQuad # "a fully equilibrated SW potential" # function sw_eq() # T(σ, at) = trace(stress(StillingerWeber(σ=σ), at)) # at = JuLIP.ASE.bulk("...
[ 27, 34345, 29, 10677, 14, 34, 559, 29658, 28524, 62, 42801, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 628, 198, 21412, 327, 559, 29658, 28524, 198, 198, 3500, 12585, 43, 4061, 198, 3500, 12585, 43, 4061, 13, 25396, 14817, 25, ...
1.683883
1,607
###################################################################### # trajectory_generation.jl ###################################################################### # helper files include("gradients.jl") include("scoring.jl") include("projection.jl") include("printing.jl") # actual methods include("pto.jl") inclu...
[ 29113, 29113, 4242, 2235, 198, 2, 22942, 62, 20158, 13, 20362, 198, 29113, 29113, 4242, 2235, 198, 198, 2, 31904, 3696, 198, 17256, 7203, 9744, 2334, 13, 20362, 4943, 198, 17256, 7203, 46536, 13, 20362, 4943, 198, 17256, 7203, 16302, 29...
2.424427
655
struct Model{D} dims::Dims{3} h::NamedTuple{(:ZZ, :X, :Z), NTuple{3, Float64}} J::NamedTuple{(:ZZ, :X, :Z), NTuple{3, Vector{Float64}}} ∂Jt::Vector{Float64} end Base.size(M) = M.dims Base.length(M) = prod(M.dims) function couplings(θ::Vector{Float64})#, hx::Float64, hz::Float64)# ::ImmutableDi...
[ 7249, 9104, 90, 35, 92, 201, 198, 220, 220, 220, 5391, 82, 3712, 35, 12078, 90, 18, 92, 201, 198, 220, 220, 220, 289, 3712, 45, 2434, 51, 29291, 90, 7, 25, 30148, 11, 1058, 55, 11, 1058, 57, 828, 24563, 29291, 90, 18, 11, 4843...
1.769446
1,787
<reponame>simsurace/AugmentedGPLikelihoods.jl module AugmentedGPLikelihoods using Reexport using ChainRulesCore: @ignore_derivatives using Distributions @reexport using GPLikelihoods using GPLikelihoods: AbstractLikelihood, AbstractLink using IrrationalConstants using LogExpFunctions using MeasureBase using MeasureTh...
[ 27, 7856, 261, 480, 29, 14323, 11793, 558, 14, 12512, 12061, 38, 6489, 522, 11935, 82, 13, 20362, 198, 21412, 2447, 12061, 38, 6489, 522, 11935, 82, 198, 198, 3500, 797, 39344, 198, 198, 3500, 21853, 37766, 14055, 25, 2488, 46430, 62,...
3.07243
428
# This is a simple script which implements the "graphics hello world" described in chapter 2 # constants rows = 200; cols = 100; max_color = 255; # colors go from 0-255 fio = open("outputs\\helloWorld.ppm", "w"); # format meta information, P3 format name, second line tells rows by column println(fio, "P3\n$rows $cols\...
[ 2, 770, 318, 257, 2829, 4226, 543, 23986, 262, 366, 70, 11549, 23748, 995, 1, 3417, 287, 6843, 362, 198, 198, 2, 38491, 198, 8516, 796, 939, 26, 198, 4033, 82, 796, 1802, 26, 198, 9806, 62, 8043, 796, 14280, 26, 1303, 7577, 467, ...
2.512821
234
""" solve_newton is a symbolic Newton-Ralphson solver f is a symbolic equation to be solved (f ~ 0) x is the variable to solve x₀ is the initial guess """ function solve_newton(f, x, x₀; abstol=1e-8, maxiter=50) xₙ = Complex(x₀) ∂f = differentiate(f, x) for i = 1:maxiter xₙ₊₁ = xₙ -...
[ 37811, 198, 220, 220, 220, 8494, 62, 3605, 1122, 318, 257, 18975, 17321, 12, 49, 17307, 1559, 1540, 332, 198, 220, 220, 220, 277, 318, 257, 18975, 16022, 284, 307, 16019, 357, 69, 5299, 657, 8, 198, 220, 220, 220, 2124, 318, 262, ...
1.839785
930
# # Task # move linear at constant velocity along x axis, 10m/s, starting from 0 # Track the state separate like a filter by using underlying Factor Graph operations instead. # the next example will keep the data in the same factor, and achieve objective more efficiently. using IncrementalInference # state # Contin...
[ 2, 198, 198, 2, 15941, 198, 2, 1445, 14174, 379, 6937, 15432, 1863, 2124, 16488, 11, 838, 76, 14, 82, 11, 3599, 422, 657, 198, 198, 2, 17762, 262, 1181, 4553, 588, 257, 8106, 416, 1262, 10238, 27929, 29681, 4560, 2427, 13, 198, 2,...
2.6192
625
using CompScienceMeshes, BEAST using LinearAlgebra using Profile using StaticArrays ttrc = X->ttrace(X,y) T= tetmeshsphere(1.0,0.2) X = nedelecc3d(T) y = boundary(T) @show numfunctions(X) ϵ, μ, ω = 1.0, 1.0, 1.0; κ, η = ω * √(ϵ*μ), √(μ/ϵ) ϵ_r = 5.0 function tau(x::SVector{U,T}) where {U,T} 5.0 -1.0 end χ = t...
[ 3500, 3082, 26959, 44, 274, 956, 11, 9348, 11262, 198, 3500, 44800, 2348, 29230, 198, 3500, 13118, 198, 3500, 36125, 3163, 20477, 628, 198, 198, 926, 6015, 796, 1395, 3784, 926, 16740, 7, 55, 11, 88, 8, 198, 198, 51, 28, 28408, 76, ...
1.916193
704
""" theoretical_memory_bandwidth(; device::CuDevice=CUDA.device(); verbose=true) Estimates the theoretical maximal GPU memory bandwidth in GiB/s. """ function theoretical_memory_bandwidth(dev::CuDevice=CUDA.device(); verbose=true, io::IO=stdout) max_mem_clock_rate = CUDA.attribute(dev, CUDA.CU_DEVICE_AT...
[ 37811, 198, 220, 220, 220, 16200, 62, 31673, 62, 3903, 10394, 7, 26, 3335, 3712, 46141, 24728, 28, 43633, 5631, 13, 25202, 9783, 15942, 577, 28, 7942, 8, 198, 22362, 26748, 262, 16200, 40708, 11362, 4088, 19484, 287, 8118, 33, 14, 82,...
2.265052
1,445
# Tests for Reverse DDF DEA Models @testset "ReverseDDFDEAModel" begin # ------------------ # Input oriented # ------------------ X = [2 2; 1 4; 4 1; 4 3; 5 5; 6 1; 2 5; 1.6 8] Y = [1; 1; 1; 1; 1; 1; 1; 1] # Reverse DDF for input :ERG russelio = dearussell(X, Y, orient = :Input, rts = :VRS...
[ 2, 30307, 329, 31849, 360, 8068, 28647, 32329, 198, 31, 9288, 2617, 366, 49, 964, 325, 35, 8068, 7206, 2390, 375, 417, 1, 2221, 628, 220, 220, 220, 1303, 34400, 438, 198, 220, 220, 220, 1303, 23412, 25921, 198, 220, 220, 220, 1303, ...
2.066995
3,045
<reponame>TheCedarPrince/JuliaTutor.jl using JuliaTutor using Documenter @info "Makeing documentation..." makedocs(; modules=[JuliaTutor], authors="caseykneale", repo="https://github.com/Humans-of-Julia/JuliaTutor.jl/blob/{commit}{path}#L{line}", sitename="JuliaTutor.jl", format=Documenter.HTML(; ...
[ 27, 7856, 261, 480, 29, 464, 34, 44226, 35784, 14, 16980, 544, 51, 38409, 13, 20362, 198, 3500, 22300, 51, 38409, 198, 3500, 16854, 263, 198, 198, 31, 10951, 366, 12050, 278, 10314, 9313, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 2...
2.247525
303
<filename>R/RDKit/build_tarballs.jl using BinaryBuilder, Pkg name = "RDKit" version = v"2022.03.1" sources = [ GitSource("https://github.com/rdkit/rdkit.git", "7e205e0d93a3046c1eaab37120c9f6971194ddf2"), DirectorySource("./bundled"), ] script = raw""" cd ${WORKSPACE}/srcdir/rdkit # Fix name of static librar...
[ 27, 34345, 29, 49, 14, 35257, 20827, 14, 11249, 62, 18870, 21591, 13, 20362, 198, 3500, 45755, 32875, 11, 350, 10025, 198, 198, 3672, 796, 366, 35257, 20827, 1, 198, 9641, 796, 410, 1, 1238, 1828, 13, 3070, 13, 16, 1, 198, 198, 82...
2.283429
875
using Dates using ArgParse include("../btg.jl") include("../datasets/load_abalone.jl") s = ArgParseSettings() @add_arg_table! s begin "--fast" help = "use fast or not" action = :store_true end parsed_args = parse_args(ARGS, s) ind = 1:50 posx = 1:7 posc = 1:3 x = data[ind, posx] Fx = data[ind, ...
[ 3500, 44712, 198, 3500, 20559, 10044, 325, 198, 198, 17256, 7203, 40720, 18347, 70, 13, 20362, 4943, 198, 17256, 7203, 40720, 19608, 292, 1039, 14, 2220, 62, 397, 17749, 13, 20362, 4943, 198, 198, 82, 796, 20559, 10044, 325, 26232, 3419...
1.986264
1,820
function WSM(A,b,C,d,XLB,XUB,VariableDef,Lambda;MyModel = [],TimeLim = 999999) if MyModel == [] MyModel = WSM(A,b,C,d,XLB,XUB,VariableDef) end X = getindex(MyModel,:X); ObjNum = size(C)[1]; m,n = size(A); @objective(MyModel, Min, sum(Lambda[i]*(sum(C[i,j]*X[j] for j = 1:n )+d[i]) for i ...
[ 8818, 370, 12310, 7, 32, 11, 65, 11, 34, 11, 67, 11, 55, 30501, 11, 55, 10526, 11, 43015, 7469, 11, 43, 4131, 6814, 26, 3666, 17633, 796, 685, 4357, 7575, 19352, 796, 36006, 17032, 8, 198, 220, 220, 220, 611, 2011, 17633, 6624, ...
1.95171
497
<reponame>ericphanson/TensorCast.jl using .NamedArrays # import TensorCast: namedarray # because Revise doesn't track these namedarray(A::AbstractArray, syms...) = namedarray(A, syms) namedarray(A::AbstractArray, syms::Tuple) = namedarray(NamedArray(A), syms) function namedarray(A::NamedArrays.NamedArray, syms::Tu...
[ 27, 7856, 261, 480, 29, 35626, 746, 23103, 14, 51, 22854, 19248, 13, 20362, 198, 198, 3500, 764, 45, 2434, 3163, 20477, 198, 198, 2, 1330, 309, 22854, 19248, 25, 3706, 18747, 1303, 780, 5416, 786, 1595, 470, 2610, 777, 198, 198, 131...
2.220884
249
<reponame>gronniger/RubiSymbolics.jl @testset "5.3 Inverse tangent" begin include("5.3.2 (d x)^m (a+b arctan(c x^n))^p.jl") include("5.3.3 (d+e x)^m (a+b arctan(c x^n))^p.jl") include("5.3.4 u (a+b arctan(c x))^p.jl") include("5.3.5 u (a+b arctan(c+d x))^p.jl") include("5.3.6 Exponentials of inverse...
[ 27, 7856, 261, 480, 29, 70, 1313, 77, 8254, 14, 21312, 72, 13940, 2022, 19615, 13, 20362, 198, 31, 9288, 2617, 366, 20, 13, 18, 554, 4399, 13875, 298, 1, 2221, 198, 220, 220, 220, 2291, 7203, 20, 13, 18, 13, 17, 357, 67, 2124, ...
1.901961
204
<filename>src/web/model_DefsCommentId.jl # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. if !isdefined(@__MODULE__, :DefsCommentId) const DefsCommentId = String else @warn("Skipping redefinition of DefsCommentId to Stri...
[ 27, 34345, 29, 10677, 14, 12384, 14, 19849, 62, 7469, 82, 21357, 7390, 13, 20362, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20...
3.3
100
""" Treat WAV files as lazy arrays stored on disk. Documentation: https://github.com/baggepinnen/LazyWAVFiles.jl ## Quick start ### LazyWAVFile ``` f1 = LazyWAVFile(joinpath(d,"f1.wav")) f1[1] f1[1:5] size(f1) f1.fs # Get the sample rate [f1; f2] # Creates a `DistributedWAVFile` ``` ### DistributedWAVFile ``` df = ...
[ 37811, 198, 51, 630, 370, 10116, 3696, 355, 16931, 26515, 8574, 319, 11898, 13, 198, 198, 24941, 341, 25, 3740, 1378, 12567, 13, 785, 14, 21454, 469, 79, 3732, 268, 14, 43, 12582, 54, 10116, 25876, 13, 20362, 198, 198, 2235, 12029, ...
2.300578
2,595
<reponame>Keno/AC274.jl # This file is ugly. Don't look at it. Should be replaced by fixed-size arrays/tuples using Polynomials import Base: getindex, start, done, next, length, size, eltype, promote_rule, zero, one, zeros, ones, conj, copy using ImmutableArrays using Meshes import Meshes: Vertex2 # C...
[ 27, 7856, 261, 480, 29, 42, 23397, 14, 2246, 28857, 13, 20362, 198, 2, 770, 2393, 318, 13400, 13, 2094, 470, 804, 379, 340, 13, 10358, 307, 6928, 416, 5969, 12, 7857, 26515, 14, 28047, 2374, 198, 198, 3500, 12280, 26601, 8231, 198, ...
1.808736
1,511
<reponame>NYUEcon/GrowthModels module X using CompEcon immutable Agent ρ::Float64 α::Float64 β::Float64 end _unpack(a::Agent) = (a.ρ, a.α, a.β) immutable Exog A::Float64 B::Float64 τ::Float64 φᵥ::Float64 vbar::Float64 p::Matrix{Float64} Π::Vector{Float64} xp::Matrix{Float...
[ 27, 7856, 261, 480, 29, 12805, 8924, 1102, 14, 38, 13046, 5841, 1424, 198, 21412, 1395, 198, 198, 3500, 3082, 36, 1102, 198, 198, 8608, 18187, 15906, 198, 220, 220, 220, 18074, 223, 3712, 43879, 2414, 198, 220, 220, 220, 26367, 3712, ...
1.812524
2,587
# Common utilities ##### common types """ Base type for the output of clustering algorithm. """ abstract type ClusteringResult end # generic functions """ nclusters(R::ClusteringResult) Get the number of clusters. """ nclusters(R::ClusteringResult) = length(R.counts) """ counts(R::ClusteringResult) Get t...
[ 2, 8070, 20081, 198, 198, 4242, 2, 2219, 3858, 198, 198, 37811, 198, 14881, 2099, 329, 262, 5072, 286, 32966, 1586, 11862, 13, 198, 37811, 198, 397, 8709, 2099, 1012, 436, 1586, 23004, 886, 198, 198, 2, 14276, 5499, 198, 198, 37811, ...
2.642384
453
export init_random_pars! """ build_rng_generator_T(T::abstractArray, seed) builds an RNG generator for the type of T. Defaults to MersenneTWister. """ function build_rng_generator_T(arrT::Array, seed) return MersenneTwister(seed) end """ init_random_pars!([rng=GLOBAL_RNG], net; sigma=0.01 ) Initiali...
[ 39344, 2315, 62, 25120, 62, 79, 945, 0, 198, 198, 37811, 198, 220, 220, 220, 1382, 62, 81, 782, 62, 8612, 1352, 62, 51, 7, 51, 3712, 397, 8709, 19182, 11, 9403, 8, 198, 198, 11249, 82, 281, 371, 10503, 17301, 329, 262, 2099, 286...
2.37971
345
using Test using ImageCore using IterTools using ReferenceTests using ImageDistances # general distances should cover any combination of number_types and color_types unless it's special designed include("testutils.jl") include("hausdorff.jl") include("metrics.jl") include("ciede2000.jl") nothing
[ 3500, 6208, 198, 3500, 7412, 14055, 198, 3500, 40806, 33637, 198, 3500, 20984, 51, 3558, 198, 3500, 7412, 20344, 1817, 198, 198, 2, 2276, 18868, 815, 3002, 597, 6087, 286, 1271, 62, 19199, 290, 3124, 62, 19199, 4556, 340, 338, 2041, 3...
3.670732
82
<reponame>mattBrzezinski/MassInstallAction.jl """ MassInstallAction Install or update GitHub Action workflows on repositories API (all require qualification with `MassInstallAction`): - Workflow creation: `Workflow`, `compat_helper`, `tag_bot` - Workflow installation: `install` """ module MassInstallAction incl...
[ 27, 7856, 261, 480, 29, 76, 1078, 9414, 2736, 46394, 14, 20273, 15798, 12502, 13, 20362, 198, 37811, 198, 220, 220, 220, 5674, 15798, 12502, 198, 198, 15798, 393, 4296, 21722, 7561, 670, 44041, 319, 38072, 198, 198, 17614, 357, 439, 2...
3.223022
139
using Flux using Zygote using CUDA abstract type NNStructure end """ (nn::NNStructure)(x::AbstractArray{Float32,3}) Make NNStructure able to work with batches. """ (nn::NNStructure)(ts::AbstractTrajectoryState) = throw(ErrorException("missing function (::$(typeof(nn)))(::$(typeof(ts))).")) function (nn::NNStruct...
[ 3500, 1610, 2821, 198, 3500, 1168, 35641, 1258, 198, 3500, 29369, 5631, 198, 198, 397, 8709, 2099, 399, 45, 1273, 5620, 886, 198, 198, 37811, 198, 220, 220, 220, 357, 20471, 3712, 6144, 1273, 5620, 5769, 87, 3712, 23839, 19182, 90, 43...
2.637931
406
<reponame>banyan-team/banyan-julia<filename>Banyan/src/tasks.jl ######### # Tasks # ######### mutable struct DelayedTask # Fields for use in processed task ready to be recorded used_modules::Vector code::String value_names::Vector{Tuple{ValueId,String}} effects::Dict{ValueId,String} pa_union::V...
[ 27, 7856, 261, 480, 29, 65, 1092, 272, 12, 15097, 14, 65, 1092, 272, 12, 73, 43640, 27, 34345, 29, 33, 1092, 272, 14, 10677, 14, 83, 6791, 13, 20362, 198, 7804, 2, 198, 2, 309, 6791, 1303, 198, 7804, 2, 198, 198, 76, 18187, 28...
2.667598
358
using CMAEvolutionStrategy if isinstalled("scipy.optimize") include("scipy_optimize.jl") using .SciPyOptimize end function local_search!( objective::Function, ip::Vector{Int64}, population::Matrix{Float64}, n_population::Int64, n_gene::Int64; method::String, ...
[ 3500, 327, 5673, 15200, 2122, 13290, 4338, 198, 198, 361, 318, 37050, 7203, 1416, 541, 88, 13, 40085, 1096, 4943, 198, 220, 220, 220, 2291, 7203, 1416, 541, 88, 62, 40085, 1096, 13, 20362, 4943, 198, 220, 220, 220, 1262, 764, 50, 97...
1.95288
1,528
<gh_stars>0 using FreeType using Base.Test library = Array(FT_Library, 1) error = FT_Init_FreeType(library) @test error == 0
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 3232, 6030, 198, 3500, 7308, 13, 14402, 198, 198, 32016, 796, 15690, 7, 9792, 62, 23377, 11, 352, 8, 198, 18224, 796, 19446, 62, 31768, 62, 11146, 6030, 7, 32016, 8, 198, 31, 9288, 4049, 6624...
2.73913
46
#---------------------------------------------------------------------# #This routine advances the solution in time using #a simple General Order RK method. #Written by <NAME> / <NAME> on 9/21/19 # Department of Applied Mathematics # Naval Postgraduate School # Monterey, CA 93943-5216 #---...
[ 2, 10097, 30934, 2, 198, 2, 1212, 8027, 14901, 262, 4610, 287, 640, 1262, 198, 2, 64, 2829, 3611, 8284, 371, 42, 2446, 13, 198, 2, 25354, 416, 1279, 20608, 29, 1220, 1279, 20608, 29, 319, 860, 14, 2481, 14, 1129, 198, 2, 220, 22...
2.27762
353
<filename>src/constants.jl # Air Constants const GAMMA_AIR = 1.4 # Adiabatic index or ratio of specific heats (dry air at 20º C) const R_AIR = 287.05287 # Specific gas constant for dry air (J/(Kg·K)) # Air at sea level conditions h=0 (m) const RHO0 = 1.225 # Density at sea level (kg/m3) const P0 = 101325.0 # Press...
[ 27, 34345, 29, 10677, 14, 9979, 1187, 13, 20362, 198, 2, 3701, 4757, 1187, 198, 9979, 49965, 5673, 62, 42149, 796, 352, 13, 19, 220, 1303, 1215, 72, 397, 1512, 6376, 393, 8064, 286, 2176, 37876, 357, 39140, 1633, 379, 1160, 36165, 3...
2.256517
1,688
module Proc export cubeAnomalies, removeMSC, gapFillMSC, normalizeTS, simpleAnomalies, sampleLandPoints, getMSC, filterTSFFT, getNpY, getMedSC, DATfitOnline, spatialinterp, extractLonLats, cubePCA, rotation_matrix, transformPCA, explained_variance,exportcube using ..DAT, ..Cubes import Dates.year """ getNpY(cu...
[ 21412, 31345, 198, 39344, 23441, 2025, 18048, 444, 11, 4781, 5653, 34, 11, 7625, 33762, 5653, 34, 11, 3487, 1096, 4694, 11, 2829, 2025, 18048, 444, 11, 198, 220, 6291, 22342, 40710, 11, 651, 5653, 34, 11, 8106, 4694, 5777, 51, 11, 6...
2.591398
372
<filename>test/joint_limits.jl using LCPSim using Base.Test using RigidBodyDynamics using RigidBodyDynamics: Bounds using StaticArrays: SVector using Gurobi @testset "joint limits" begin @testset "1D mechanism" begin world = RigidBody{Float64}("world") mech = Mechanism(world; gravity=SVector(0, 0, ...
[ 27, 34345, 29, 9288, 14, 73, 1563, 62, 49196, 13, 20362, 198, 3500, 22228, 3705, 320, 198, 3500, 7308, 13, 14402, 198, 3500, 24666, 312, 25842, 35, 4989, 873, 198, 3500, 24666, 312, 25842, 35, 4989, 873, 25, 347, 3733, 198, 3500, 36...
1.957223
1,426
<filename>src/backwardsfiltering.jl<gh_stars>1-10 """ GuidRecursions{TL,TM⁺,TM, Tμ, TH, TLt0, TMt⁺0, Tμt0} GuidRecursions defines a struct that contains all info required for computing the guiding term and likelihood (including ptilde term) for a single shape ## Arguments Suppose t is the specified (fixed) time g...
[ 27, 34345, 29, 10677, 14, 1891, 2017, 10379, 20212, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 37026, 6690, 42394, 90, 14990, 11, 15972, 46256, 118, 11, 15972, 11, 309, 34703, 11, 2320, 11, 24811...
1.947795
2,835
<filename>src/Interface.jl module Interface include("SpectralSolver.jl") include("NewtonSolver.jl") include("SchwarszchildModes.jl") using .NewtonSolver using .Schwarzschild using .SpectralSolver #P = ModeParameters((l=2,s=2,m=0,n=0,a=0.01,ω = 0.373672 - 0.0889623*im,Alm = 0, Nmax = 300, lmax = 10)) function GetMod...
[ 27, 34345, 29, 10677, 14, 39317, 13, 20362, 198, 21412, 26491, 198, 198, 17256, 7203, 49738, 1373, 50, 14375, 13, 20362, 4943, 198, 17256, 7203, 3791, 1122, 50, 14375, 13, 20362, 4943, 198, 17256, 7203, 14874, 86, 945, 89, 9410, 44, 4...
1.815279
877
<filename>src/tools/grid3D.jl """ ``` grid3D(solute,solute_atoms,mddf_result,output_file; dmin=1.5, ddax=5.0, step=0.5) ``` This function builds the grid of the 3D density function and fills an array of mutable structures of type Atom, containing the position of the atoms of grid, the closest atom to that position, ...
[ 27, 34345, 29, 10677, 14, 31391, 14, 25928, 18, 35, 13, 20362, 198, 37811, 198, 198, 15506, 63, 198, 25928, 18, 35, 7, 82, 3552, 11, 82, 3552, 62, 265, 3150, 11, 76, 1860, 69, 62, 20274, 11, 22915, 62, 7753, 26, 288, 1084, 28, ...
2.313384
1,838
<gh_stars>0 using GitWorkers ## --------------------------------------------------------------- # cmd for run the server # julia 'SERVER_SCRIPT_PATH' ## --------------------------------------------------------------- # run to reset all # gw_create_devland(; # sys_root = "SYSTEM_ROOT", # clear_repos = true, #...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 15151, 12468, 364, 198, 198, 2235, 20368, 1783, 24305, 198, 2, 23991, 329, 1057, 262, 4382, 198, 2, 474, 43640, 705, 35009, 5959, 62, 6173, 46023, 62, 34219, 6, 198, 198, 2235, 20368, 1783, 243...
3.406593
182
using Images, JLD function main() w = 2000 h = 2000 points = load("./sets/15k.jld", "points") img = zeros(RGB,w,h) for c::ComplexF64 in points i::Int = 0 z::ComplexF64 = c while abs(z) < 3 && i < 5000 x::Int = trunc(Int,(real(z) + 2)*w/3); y::Int = tr...
[ 3500, 5382, 11, 449, 11163, 201, 198, 201, 198, 8818, 1388, 3419, 201, 198, 220, 220, 220, 266, 796, 4751, 201, 198, 220, 220, 220, 289, 796, 4751, 201, 198, 220, 220, 220, 2173, 796, 3440, 7, 1911, 14, 28709, 14, 1314, 74, 13, ...
1.757485
334
<reponame>hmorlon/JPANDA<filename>src/clads/clads_output.jl """ A structure containig the informations about the resulot of a ClaDS run. Contains the following fields : - `tree::Tree`: the phylogeny on which the analysis was performed. - `chains::Array{Array{Array{Float64,1},1},1}` : the mcmc chains - `rtt_chains::Arr...
[ 27, 7856, 261, 480, 29, 71, 4491, 14995, 14, 12889, 1565, 5631, 27, 34345, 29, 10677, 14, 565, 5643, 14, 565, 5643, 62, 22915, 13, 20362, 198, 37811, 198, 32, 4645, 3994, 328, 262, 4175, 602, 546, 262, 581, 377, 313, 286, 257, 271...
2.362809
1,538
<reponame>brendanjohnharris/NonstationaryProcesses.jl<gh_stars>0 using NonstationaryProcesses using Plots lorenz = lorenzSim( X0 = [0.0, -0.01, 9.0], parameter_profile = (constantParameter, constantParameter, constantParameter), parameter_profile_parameters = (10.0, 28.0, 8/3), # Sprott's recomendation ...
[ 27, 7856, 261, 480, 29, 4679, 358, 272, 30686, 9869, 2442, 14, 15419, 17529, 560, 18709, 274, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 8504, 17529, 560, 18709, 274, 198, 3500, 1345, 1747, 198, 198, 31131, 27305, 796, 24044, ...
2.119777
359
@testset "Storage data misspecification" begin # See https://discourse.julialang.org/t/how-to-use-test-warn/15557/5 about testing for warning throwing warn_message = "The data doesn't include devices of type GenericBattery, consider changing the device models" model = DeviceModel(GenericBattery, BookKeeping...
[ 31, 9288, 2617, 366, 31425, 1366, 2051, 43106, 2649, 1, 2221, 198, 220, 220, 220, 1303, 4091, 3740, 1378, 15410, 9047, 13, 73, 377, 498, 648, 13, 2398, 14, 83, 14, 4919, 12, 1462, 12, 1904, 12, 9288, 12, 40539, 14, 1314, 41948, 14...
2.609869
1,297
<reponame>byuflowlab/Composites.jl<gh_stars>0 import Composites # Step 1: Identify Material Properties e1 = [181e9,203e9,38.6e9,76e9] e2 = [10.3e9,11.2e9,8.27e9,5.5e9] g12 = [7.17e9,8.4e9,4.14e9,2.3e9] nu12 = [0.28,0.32,0.26,0.34] rho = zeros(Float64,4) xt = [1500.0,3500.0,1062.0,1400.0]*1e6 xc = [1500.0,1540.0,610.0,...
[ 27, 7856, 261, 480, 29, 1525, 84, 2704, 4883, 397, 14, 5377, 1930, 2737, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 11748, 29936, 2737, 198, 198, 2, 5012, 352, 25, 11440, 1958, 14633, 24946, 198, 68, 16, 796, 685, 27057, 68, 24, ...
2.204873
903
maxiter = 1000 using Stopping stp = NLPStopping(nlp, NLPAtX(nlp.meta.x0) ) Lp = Inf my_unconstrained_check(nlp, st; kwargs...) = unconstrained_check(nlp, st, pnorm = Lp; kwargs...) stp.meta.optimality_check = my_unconstrained_check #stp.meta.optimality_check = unconstrained_check stp.meta.max_iter = maxiter stp.m...
[ 9806, 2676, 796, 8576, 198, 198, 3500, 22025, 2105, 198, 198, 301, 79, 796, 399, 19930, 1273, 33307, 7, 21283, 79, 11, 399, 19930, 2953, 55, 7, 21283, 79, 13, 28961, 13, 87, 15, 8, 220, 1267, 198, 198, 43, 79, 796, 4806, 198, 19...
2.169394
3,666
""" add_input(state, agent_idx, post_list, config) Create new directed edges from other agents. # Arguments - `state`: A tuple of the current graph and agent_list - `agent_idx`: Agent index - `post_list`: List of all published posts in network - `config`: `Config` object as provided by `Config` See also: [`Config...
[ 37811, 198, 220, 220, 751, 62, 15414, 7, 5219, 11, 5797, 62, 312, 87, 11, 1281, 62, 4868, 11, 4566, 8, 198, 198, 16447, 649, 7924, 13015, 422, 584, 6554, 13, 198, 198, 2, 20559, 2886, 198, 12, 4600, 5219, 63, 25, 317, 46545, 286...
2.042076
1,426
<filename>test/gherkin/scenario_test.jl # Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 27, 34345, 29, 9288, 14, 70, 372, 5116, 14, 1416, 39055, 62, 9288, 13, 20362, 198, 2, 15069, 2864, 1279, 20608, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
2.056195
7,901
<gh_stars>0 function mandel( c ) z = c itrMax = 80 for n in 1:itrMax if abs(z) > 2 return n-1 end z = z^2 + c end return itrMax end
[ 27, 456, 62, 30783, 29, 15, 198, 198, 8818, 6855, 417, 7, 269, 1267, 198, 220, 220, 220, 1976, 796, 269, 198, 220, 220, 220, 340, 81, 11518, 796, 4019, 198, 220, 220, 220, 329, 299, 287, 352, 25, 270, 81, 11518, 198, 220, 220, ...
1.681416
113
<reponame>UltraHeckerNick/MechanicalPrograms_small using LinearAlgebra #Givens from Problem Statement #Elastic Modulus(psi),Area(in^2),length(in),Force(lb) E = 1.9*10^6 A = 8 l = 3*12 l2 = 3*sqrt(2)*12 F = 500 # Torsional Stiffness Function k(A,E,l) = (A*E)/l # k_local(Elastic Modulus,Area,length,theta,...
[ 27, 7856, 261, 480, 29, 36122, 1544, 15280, 23609, 14, 28452, 36684, 15167, 82, 62, 17470, 198, 3500, 44800, 2348, 29230, 201, 198, 201, 198, 2, 38, 452, 641, 422, 20647, 21983, 201, 198, 2, 9527, 3477, 3401, 23515, 7, 862, 72, 828,...
1.755258
1,046
<gh_stars>0 module NetSci01 using LightGraphs, GraphPlot using Distributions export readnetwork, samplenetwork const line_regex = r"^(\d+)\s(\d+)" "Read a space separated file into an (undirected) Graph in an efficient way." function readnetwork(filename::String, limit::Number = Inf; fromzero::Bool = false) gra...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 3433, 50, 979, 486, 198, 198, 3500, 4401, 37065, 82, 11, 29681, 43328, 198, 3500, 46567, 507, 198, 198, 39344, 1100, 27349, 11, 6072, 489, 268, 316, 1818, 198, 198, 9979, 1627, 62, 260, 25636,...
2.066556
2,404
using Nemo, GibbsTypePriors, JLD grid_k = [collect(1:25:10000); 10000] Vnk_numerical_accuracy = GibbsTypePriors.Vnk_NGG.(10000, grid_k, 1.2, 0.6) |> x -> accuracy_bits.(x) save("test/graphical_tests/saves_for_graphical_tests/accuracy_Vnk_10000.jld", "Vnk_numerical_accuracy", Vnk_numerical_accuracy)
[ 3500, 22547, 78, 11, 41071, 6030, 47, 8657, 11, 449, 11163, 198, 198, 25928, 62, 74, 796, 685, 33327, 7, 16, 25, 1495, 25, 49388, 1776, 33028, 60, 198, 198, 53, 77, 74, 62, 77, 6975, 605, 62, 4134, 23843, 796, 41071, 6030, 47, 8...
2.270677
133
using Harmonie_namelists using Test # These are very basic test. Once we have JSONSchema files for namelists # we could validate the namelists much better # Check that the mechanism where we take variables from the ENVironment works @testset "ENV" begin dicts = read_namelist.(["global", "canari"]) totdict...
[ 198, 3500, 39712, 494, 62, 7402, 417, 1023, 198, 3500, 6208, 628, 198, 2, 2312, 389, 845, 4096, 1332, 13, 4874, 356, 423, 19449, 27054, 2611, 3696, 329, 299, 17983, 1023, 220, 198, 2, 356, 714, 26571, 262, 299, 17983, 1023, 881, 136...
2.612094
678
<filename>src/InvariantMeasures/InvariantDistributions/plot_recipes.jl using RecipesBase @recipe f(::Type{InvariantDistribution}, ivd::InvariantDistribution) = ivd.dist
[ 27, 34345, 29, 10677, 14, 19904, 2743, 415, 5308, 13846, 14, 19904, 2743, 415, 20344, 2455, 507, 14, 29487, 62, 8344, 18636, 13, 20362, 198, 3500, 44229, 14881, 198, 198, 31, 29102, 431, 277, 7, 3712, 6030, 90, 19904, 2743, 415, 20344...
2.881356
59
using CounterTools using Test # Function for compiling read/write tests function compile_test_program(kernel; ntimes = 10, array_size = 100000000) commands = [ "g++", "-march=native", "-mtune=native", "-mcmodel=large", "-DSTREAM_ARRAY_SIZE=$array_size", "-DFUNCTION=$...
[ 3500, 15034, 33637, 198, 3500, 6208, 198, 198, 2, 15553, 329, 33393, 1100, 14, 13564, 5254, 198, 8818, 17632, 62, 9288, 62, 23065, 7, 33885, 26, 299, 22355, 796, 838, 11, 7177, 62, 7857, 796, 1802, 10535, 8, 198, 220, 220, 220, 9729...
2.288557
402
# Starting example file for working with chars and strings in Julia # Julia has a specific character type myChar = 'x' # use single quotation mark for character println(Int(myChar)) println(Char(120)) # Strings are defined using double quotes or triple quotes myStr = "This is a sample string in Julia" myOtherStr = ""...
[ 2, 17962, 1672, 2393, 329, 1762, 351, 34534, 290, 13042, 287, 22300, 198, 198, 2, 22300, 468, 257, 2176, 2095, 2099, 198, 1820, 12441, 796, 705, 87, 6, 1303, 779, 2060, 35777, 1317, 329, 2095, 198, 35235, 7, 5317, 7, 1820, 12441, 40...
3.218659
343
<reponame>JuliaApproximation/HierarchicalSingularIntegralEquations.jl ## # Represent a binary hierarchical Domain, Space, and Fun ## mutable struct HierarchicalDomain{S,T,HS} <: ApproxFun.UnivariateDomain{T} data::HS HierarchicalDomain{S,T,HS}(data::HS) where {S,T,HS} = new{S,T,HS}(data) end mutable struct ...
[ 27, 7856, 261, 480, 29, 16980, 544, 4677, 13907, 18991, 14, 39, 959, 998, 605, 29974, 934, 34500, 1373, 23588, 602, 13, 20362, 628, 198, 2235, 198, 2, 10858, 257, 13934, 38958, 20021, 11, 4687, 11, 290, 11138, 198, 2235, 198, 198, 7...
1.824781
4,794
using Alexya @init "Drawing" 1200 800 @layout aside(:v, 220) mutable struct Sketch points::Vector{Point} color::Color stroke::Real fill::Bool end trash = Sketch[] sketchs = Sketch[] clear() = empty!(sketchs) # ------------- ------------- Controls ------------- ------------- # Background color bg =...
[ 3500, 4422, 3972, 198, 198, 31, 15003, 366, 25302, 278, 1, 24938, 10460, 198, 31, 39786, 7263, 7, 25, 85, 11, 15629, 8, 198, 76, 18187, 2878, 17001, 198, 220, 220, 220, 2173, 3712, 38469, 90, 12727, 92, 198, 220, 220, 220, 3124, 3...
2.213693
964
# tests for the environment type and related functions. # using Base.Test # using PyPlot # push!(LOAD_PATH, ".") # include("includes.jl") function get_test_uavs() actions = [-1., 1., 0.] joint_actions = ones(3, 3) joint_actions[:, 1] = -1 r = collect(1:10) q_table = zeros(10^7, size(joint_action...
[ 2, 5254, 329, 262, 2858, 2099, 290, 3519, 5499, 13, 198, 198, 2, 1262, 7308, 13, 14402, 198, 2, 1262, 9485, 43328, 198, 198, 2, 4574, 0, 7, 35613, 62, 34219, 11, 366, 19570, 198, 2, 2291, 7203, 42813, 13, 20362, 4943, 198, 198, ...
2.212505
2,607
<reponame>Ashymad/praca.inz<filename>tests/julia/tests/four1/test.jl # four1 test Fs = 1000; # Sampling frequency T = 1/Fs; # Sampling period function prepare_input(input_size) t = (0:input_size-1)*T; # Time vector S = zeros(2^ceil(log2(input_size))) S[1:inp...
[ 27, 7856, 261, 480, 29, 26754, 4948, 324, 14, 1050, 22260, 13, 259, 89, 27, 34345, 29, 41989, 14, 73, 43640, 14, 41989, 14, 14337, 16, 14, 9288, 13, 20362, 198, 2, 1440, 16, 1332, 198, 198, 42388, 796, 8576, 26, 220, 220, 220, 2...
1.904437
586
export ScaledBeta, TrGeometric, TrBinomial, StringCategorical, likelihood, log_likelihood export normalising_const ## Scaled beta distribution """ Scaled Beta distribution. Instantiate with ScaledBeta() e.g. ``` d = ScaledBeta(α, β, 0.0, 10.0) ``` would make a ScaledBeta type d which is bounded by 0.0 and 10.0. Note - ...
[ 39344, 1446, 3021, 43303, 11, 833, 10082, 16996, 11, 833, 33, 259, 49070, 11, 10903, 34, 2397, 12409, 11, 14955, 11, 2604, 62, 2339, 11935, 198, 39344, 3487, 1710, 62, 9979, 198, 2235, 1446, 3021, 12159, 6082, 198, 37811, 198, 3351, 3...
2.360848
1,793
function train_surrogate_model(sModelsProblem::SModelsProblem; verbose::Bool=false, saveToDisk::Bool=false, robust::Bool=true) starting_date = date_now() #initialization: #-------------- # regression model to predict the continuous output: clfr = MLPRegressor(solver="lbfgs", alpha=1e-5, hidden_layer_sizes =...
[ 8818, 4512, 62, 11793, 3828, 378, 62, 19849, 7, 82, 5841, 1424, 40781, 3712, 50, 5841, 1424, 40781, 26, 15942, 577, 3712, 33, 970, 28, 9562, 11, 3613, 2514, 40961, 3712, 33, 970, 28, 9562, 11, 12373, 3712, 33, 970, 28, 7942, 8, 62...
2.722296
6,010
struct WendlandC4{T} <: SPHKernel n_neighbours::Int64 norm_1D::T norm_2D::T norm_3D::T end """ WendlandC4(T::DataType=Float64, n_neighbours::Integer=216) Set up a `WendlandC4` kernel for a given DataType `T`. """ WendlandC4(T::DataType=Float64, n_neighbours::Integer=216) = WendlandC4{T}(n_neighbou...
[ 7249, 21042, 1044, 34, 19, 90, 51, 92, 1279, 25, 6226, 38730, 7948, 198, 220, 220, 220, 299, 62, 710, 394, 65, 4662, 3712, 5317, 2414, 198, 220, 220, 220, 2593, 62, 16, 35, 3712, 51, 198, 220, 220, 220, 2593, 62, 17, 35, 3712, ...
2.028965
2,106
<filename>test/template.jl @info "Test template pattern..." println("Brew coffee process") coffee = Coffee("", "") prepare(coffee) println() println("Brew tea process") tea = Tea("", "") prepare(tea)
[ 27, 34345, 29, 9288, 14, 28243, 13, 20362, 198, 31, 10951, 366, 14402, 11055, 3912, 9313, 198, 198, 35235, 7203, 44029, 6891, 1429, 4943, 198, 1073, 5853, 796, 19443, 7203, 1600, 366, 4943, 198, 46012, 533, 7, 1073, 5853, 8, 198, 198,...
2.942029
69
""" Function to obtain the output current time series of a Dynamic Inverter model out of the DAE Solution. It receives the simulation inputs, the dynamic device and bus voltage. It is dispatched for device type to compute the specific current. """ function compute_output_current( sim::Simulation, dynamic_devic...
[ 37811, 198, 22203, 284, 7330, 262, 5072, 1459, 640, 2168, 286, 257, 26977, 554, 332, 353, 2746, 503, 286, 262, 360, 14242, 28186, 13, 632, 11583, 262, 18640, 17311, 11, 198, 1169, 8925, 3335, 290, 1323, 15004, 13, 632, 318, 26562, 329...
2.57451
510
<reponame>UnofficialJuliaMirrorSnapshots/REDCap.jl-ba918724-fbf9-5e4a-a61c-87e95654e718 """ REDCap.Config(url::String, key::String; ssl::Bool = true) Struct to hold api url and key/superkey. `APIConfigObj = Config("http...","ABCD...")` This will be passed to all function calls to both orient and authorize the api_pu...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 22083, 15610, 13, 20362, 12, 7012, 24, 23451, 1731, 12, 69, 19881, 24, 12, 20, 68, 19, 64, 12, 64, 5333, 66, 12, 5774, 68, 3865, 39111, 68, 45720, 198...
3.061508
504
<reponame>rdeits/LoewnerJohnEllipsoids.jl __precompile__() module LoewnerJohnEllipsoids using Convex export inner_ellipsoid, outer_ellipsoid, box, barrier_value type LinearConstraint{T<:Real} # Represents the constraint a * x <= b a::Vector{T} b::T end type Ellipsoid{T} # Represents an ellipsoid as t...
[ 27, 7856, 261, 480, 29, 81, 2934, 896, 14, 27654, 413, 1008, 7554, 30639, 541, 568, 2340, 13, 20362, 198, 834, 3866, 5589, 576, 834, 3419, 198, 21412, 6706, 413, 1008, 7554, 30639, 541, 568, 2340, 198, 198, 3500, 1482, 303, 87, 198,...
2.356842
950
module TestGradient using Test using LinearAlgebra using BlockFactorizations using CovarianceFunctions using CovarianceFunctions: EQ, RQ, Dot, ExponentialDot, NN, Matern, MaternP, Lengthscale, input_trait, GradientKernel, ValueGradientKernel, GradientKernelElement, DerivativeKernel, ValueDerivativeKern...
[ 21412, 6208, 42731, 1153, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 9726, 41384, 4582, 198, 198, 3500, 39751, 2743, 590, 24629, 2733, 198, 3500, 39751, 2743, 590, 24629, 2733, 25, 36529, 11, 371, 48, 11, 22875, 11, 5518...
1.987597
2,822
using Base.Meta using JuMP: _valid_model, _error_if_cannot_register, object_dictionary, variable_type using JuMP.Containers # Parse raw input to define the upper bound for an interval set function _parse_one_operator_parameter( _error::Function, infoexpr::_ParameterInfoExpr, ::Union{Val{:<=}, Val{:≤}}, upper) ...
[ 3500, 7308, 13, 48526, 198, 3500, 12585, 7378, 25, 4808, 12102, 62, 19849, 11, 4808, 18224, 62, 361, 62, 66, 34574, 62, 30238, 11, 2134, 62, 67, 14188, 11, 7885, 62, 4906, 198, 3500, 12585, 7378, 13, 4264, 50221, 198, 198, 2, 2547, ...
2.425947
31,903
<reponame>BradLyman/AWS.jl<filename>src/services/polly.jl # This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: polly using AWS.Compat using AWS.UUIDs """ DeleteLexicon() Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not availab...
[ 27, 7856, 261, 480, 29, 30805, 31633, 805, 14, 12298, 50, 13, 20362, 27, 34345, 29, 10677, 14, 30416, 14, 79, 5098, 13, 20362, 198, 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500,...
3.609436
3,815
<gh_stars>10-100 using Yao using QuAlgorithmZoo using YaoBlocks.ConstGate using Test using LinearAlgebra @testset "hadamard test" begin n = 2 U = chain(put(n, 2=>Rx(0.2)), put(n, 1=>Rz(1.2)), put(n, 1=>phase(0.4))) US = chain(2n, put(2n, (3,4)=>U), chain(2n, [swap(2n,i,i+n) for i=1:n])) reg...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 37826, 198, 3500, 2264, 2348, 42289, 57, 2238, 198, 3500, 37826, 45356, 13, 34184, 22628, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 198, 31, 9288, 2617, 366, 18108, 321, 446...
1.834395
314
<reponame>akazachk/UnitCommitment2.jl<filename>test/instance_test.jl<gh_stars>0 # UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. using UnitComm...
[ 27, 7856, 261, 480, 29, 461, 1031, 620, 74, 14, 26453, 6935, 270, 434, 17, 13, 20362, 27, 34345, 29, 9288, 14, 39098, 62, 9288, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 11801, 6935, 270, 434, 13, 20362, 25, 30011, 1634, 15...
1.894844
3,452
# --- # title: 994. Rotting Oranges # id: problem994 # author: Indigo # date: 2021-02-18 # difficulty: Medium # categories: Breadth-first Search # link: <https://leetcode.com/problems/rotting-oranges/description/> # hidden: true # --- # # In a given grid, each cell can have one of three values: # # * the value `0` ...
[ 2, 11420, 198, 2, 3670, 25, 860, 5824, 13, 18481, 889, 1471, 6231, 198, 2, 4686, 25, 1917, 42691, 198, 2, 1772, 25, 40673, 198, 2, 3128, 25, 33448, 12, 2999, 12, 1507, 198, 2, 8722, 25, 13398, 198, 2, 9376, 25, 28731, 400, 12, ...
2.044232
1,153
import .CUDA function Base.cconvert(::Type{MPIPtr}, buf::CUDA.CuArray{T}) where T Base.cconvert(CUDA.CuPtr{T}, buf) # returns DeviceBuffer end function Base.unsafe_convert(::Type{MPIPtr}, X::CUDA.CuArray{T}) where T reinterpret(MPIPtr, Base.unsafe_convert(CUDA.CuPtr{T}, X)) end # only need to define this for...
[ 11748, 764, 43633, 5631, 198, 198, 8818, 7308, 13, 535, 261, 1851, 7, 3712, 6030, 90, 7378, 4061, 2213, 5512, 42684, 3712, 43633, 5631, 13, 46141, 19182, 90, 51, 30072, 810, 309, 198, 220, 220, 220, 7308, 13, 535, 261, 1851, 7, 4363...
2.394984
319
include("area.jl") include("vectorin.jl") include("volume.jl") function Assemblein(IK,JK,VK,con,Node, Ele, Cen, Face_in, EE, NU, FF) @inbounds @sync @distributed for i = 1:size(Face_in,1) v1 = Volume(Node[Face_in[i,1],1],Node[Face_in[i,1],2],Node[Face_in[i,1],3], Node[Face_in[i,2],1],N...
[ 17256, 7203, 20337, 13, 20362, 4943, 198, 17256, 7203, 31364, 259, 13, 20362, 4943, 198, 17256, 7203, 29048, 13, 20362, 4943, 198, 198, 8818, 1081, 15140, 259, 7, 18694, 11, 41, 42, 11, 47191, 11, 1102, 11, 19667, 11, 15987, 11, 327, ...
1.386845
3,968
<gh_stars>0 module MinimalPerfectHash export CHD include("chd.jl") include("chdhasher.jl") include("chdconstructor.jl") #include("chd_new.jl") end # module
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 1855, 4402, 36635, 26257, 198, 198, 39344, 5870, 35, 198, 17256, 7203, 354, 67, 13, 20362, 4943, 198, 17256, 7203, 354, 67, 10134, 372, 13, 20362, 4943, 198, 17256, 7203, 354, 67, 41571, 273, ...
2.548387
62
using AcronymGenerator using Test @testset "AcronymGenerator.jl" begin # Write your tests here. end
[ 3500, 4013, 1313, 4948, 8645, 1352, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 12832, 1313, 4948, 8645, 1352, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437, 198 ]
2.837838
37
<reponame>sdangelis/GenomePermutations.jl """ anyoverlapping(a::GenomicFeatures.Interval{T}, b::GenomicFeatures.IntervalCollection{S}) Extend GenomicFeatures.isoverlapping to linearly check if interval a. overlaps collection. Return true or false ```jldoctest using GenomicFeatures a = GenomicFeatures.Interval("chr...
[ 27, 7856, 261, 480, 29, 21282, 8368, 271, 14, 13746, 462, 5990, 21973, 602, 13, 20362, 198, 37811, 198, 197, 1092, 2502, 75, 5912, 7, 64, 3712, 13746, 10179, 23595, 13, 9492, 2100, 90, 51, 5512, 198, 197, 65, 3712, 13746, 10179, 235...
2.746891
1,608
<gh_stars>0 ### A Pluto.jl notebook ### # v0.19.0 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...
[ 27, 456, 62, 30783, 29, 15, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1129, 13, 15, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 770, 32217, 20922, 3544, 2488, 21653, 329, 9427,...
1.717629
2,564
# Examples presented in class - Lecture 1 # LP Resource allocation using JuMP, Cbc # JuMP is for implementing math. programming models; # Cbc is for solving them. # Example 1 - resource allocation # Problem data i = 1:2 # i=1: Seattle; i=2: San Diego j = 1:3 # j=1: New York; j=2: Chicago; j=3: Miami C = [350 600] #...
[ 2, 21066, 5545, 287, 1398, 532, 31209, 495, 352, 198, 2, 18470, 20857, 20157, 198, 198, 3500, 12585, 7378, 11, 327, 15630, 198, 2, 12585, 7378, 318, 329, 15427, 10688, 13, 8300, 4981, 26, 198, 2, 327, 15630, 318, 329, 18120, 606, 13...
2.700508
394
@testset "Periodic Kernel" begin x = rand()*2; v1 = rand(3); v2 = rand(3); r = rand(3) k = PeriodicKernel(r = r) @test kappa(k, x) ≈ exp(-0.5x) @test k(v1, v2) ≈ exp(-0.5 * sum(abs2, sinpi.(v1 - v2) ./ r)) @test k(v1, v2) == k(v2, v1) @test PeriodicKernel(3)(v1, v2) == PeriodicKernel(r = one...
[ 31, 9288, 2617, 366, 5990, 2101, 291, 32169, 1, 2221, 198, 220, 220, 220, 2124, 796, 43720, 3419, 9, 17, 26, 410, 16, 796, 43720, 7, 18, 1776, 410, 17, 796, 43720, 7, 18, 1776, 198, 220, 220, 220, 374, 796, 43720, 7, 18, 8, 19...
2.130742
283
include("maximin.jl") include("cc_maximin.jl") include("minimax.jl") include("custom.jl") include("no_obj.jl")
[ 17256, 7203, 9806, 320, 259, 13, 20362, 4943, 198, 17256, 7203, 535, 62, 9806, 320, 259, 13, 20362, 4943, 198, 17256, 7203, 1084, 320, 897, 13, 20362, 4943, 198, 17256, 7203, 23144, 13, 20362, 4943, 198, 17256, 7203, 3919, 62, 26801, ...
2.466667
45
struct NotOffloadableError ir sv reason end function Base.showerror(io::IO, e::NotOffloadableError) println(io, "The specified function is not offloadable. The offending IR was:") Base.IRShow.show_ir(io, e.ir; verbose_linetable=false) if isa(e.reason, String) println(io, e.reason) e...
[ 7249, 1892, 9362, 2220, 540, 12331, 198, 220, 220, 220, 4173, 198, 220, 220, 220, 38487, 198, 220, 220, 220, 1738, 198, 437, 198, 198, 8818, 7308, 13, 1477, 789, 1472, 7, 952, 3712, 9399, 11, 304, 3712, 3673, 9362, 2220, 540, 12331,...
2.101914
2,247
using AdventOfCodeSolutions using Test function input(puzzle::Puzzle{2020, 6, n}) where n io = openInput(puzzle) return read(io, String) end function parseInput(input) groups = split(input, "\n\n") return map(group -> split(group, '\n', keepempty = false), groups) end function solve(::Puzzle{2020, 6,...
[ 3500, 33732, 5189, 10669, 50, 14191, 198, 3500, 6208, 198, 198, 8818, 5128, 7, 79, 9625, 3712, 47, 9625, 90, 42334, 11, 718, 11, 299, 30072, 810, 299, 198, 220, 220, 220, 33245, 796, 1280, 20560, 7, 79, 9625, 8, 198, 220, 220, 220...
2.419142
303
<gh_stars>1-10 # [[file:~/GitHub/J4Org.jl/docs/main.org::*A%20documented%20Julia%20=Foo=%20module][A documented Julia =Foo= module:1]] module Foo export Point, norm, foo import Base: norm #+Point L:Point_struct # This is my Point structure # # *Example:* # # Creates a point $p$ of coordinates $(x=1,y=2)$. # # #+...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 16410, 7753, 25, 93, 14, 38, 270, 16066, 14, 41, 19, 46808, 13, 20362, 14, 31628, 14, 12417, 13, 2398, 3712, 9, 32, 4, 1238, 47045, 4, 1238, 16980, 544, 4, 1238, 28, 37, 2238, 28, ...
2.294355
496