content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
# test not exported @test_throws UndefVarError Pipeline @test_throws UndefVarError AbstractPipeline @test_throws UndefVarError ImmutablePipeline @test Augmentor.AbstractPipeline <: Any @test Augmentor.Pipeline <: Augmentor.AbstractPipeline @test Augmentor.ImmutablePipeline <: Augmentor.Pipeline @test typeof((FlipX(),F...
[ 2, 1332, 407, 29050, 198, 31, 9288, 62, 400, 8516, 13794, 891, 19852, 12331, 37709, 198, 31, 9288, 62, 400, 8516, 13794, 891, 19852, 12331, 27741, 47, 541, 4470, 198, 31, 9288, 62, 400, 8516, 13794, 891, 19852, 12331, 9543, 18187, 47,...
2.434739
2,015
# Typical usage: run `generate_artifacts.jl . --deploy` from within the directory that contains the files using Pkg.Artifacts, LibGit2, ghr_jll deploy = true if deploy && !haskey(ENV, "GITHUB_TOKEN") error("For automatic github deployment, export GITHUB_TOKEN!") end data_dir = @__DIR__ if deploy # Where we w...
[ 2, 48752, 8748, 25, 1057, 4600, 8612, 378, 62, 50179, 13, 20362, 764, 1377, 2934, 1420, 63, 422, 1626, 262, 8619, 326, 4909, 262, 3696, 198, 3500, 350, 10025, 13, 8001, 37199, 11, 7980, 38, 270, 17, 11, 308, 11840, 62, 73, 297, 19...
2.536047
860
<filename>examples/03_funcwrap.jl #= Example 3: Fit the following analytical model with 3 parameters: (p1 + p2 * x + p3 * x^2) * cos(x) A `FuncWrap` component is used to wrap a common Julia function =# using Random, DataFitting # Define the analytic model function f(x, p1, p2, p3) = @. (p1 + p2 * x + ...
[ 27, 34345, 29, 1069, 12629, 14, 3070, 62, 20786, 37150, 13, 20362, 198, 2, 28, 220, 198, 16281, 513, 25, 220, 220, 198, 220, 25048, 262, 1708, 30063, 2746, 351, 513, 10007, 25, 198, 220, 357, 79, 16, 220, 1343, 220, 279, 17, 1635,...
2.627002
437
<filename>zadanie_10.jl #ДАНО: Робот - в юго-западном углу поля, на котором расставлено некоторое количество маркеров #РЕЗУЛЬТАТ: Функция вернула значение средней температуры всех замаркированных клеток function sum_temp(r::Robot) sum = 0 count = 0 side = Ost while isborder(r,Nord) == false...
[ 27, 34345, 29, 89, 29157, 494, 62, 940, 13, 20362, 198, 2, 140, 242, 140, 238, 140, 251, 140, 252, 25, 12466, 254, 25443, 109, 15166, 20375, 532, 12466, 110, 220, 141, 236, 140, 111, 15166, 12, 140, 115, 16142, 140, 123, 16142, 43...
1.510067
596
type Fourier1d <: SuperRes #1D Static model freqs :: Vector{Int} filter :: Vector{Float64} x_max :: Float64 approx_grid :: Vector{Float64} bounds :: Tuple{Vector{Float64},Vector{Float64}} function Fourier1d(f_c, x_max, filter = ones(2*f_c+1), n_approx = 10*f_c+1) # step to get rid of the...
[ 4906, 34296, 5277, 16, 67, 1279, 25, 3115, 4965, 1303, 16, 35, 36125, 2746, 198, 220, 220, 220, 2030, 48382, 7904, 20650, 90, 5317, 92, 198, 220, 220, 220, 8106, 7904, 20650, 90, 43879, 2414, 92, 198, 220, 220, 220, 2124, 62, 9806, ...
2.109449
1,471
<filename>src/ubox/uslice.jl uslice(x::Utype) = uslice(x.val) function uslice{ESS,FSS}(x::Unum{ESS,FSS}) #first, slice must operate strictly on ulps is_ulp(x) || throw(ArgumentError("slice doesn't operate on exact values!")) (x.fsize == max_fsize(FSS)) && throw(ArgumentError("slice doesn't operate on terminal ul...
[ 27, 34345, 29, 10677, 14, 549, 1140, 14, 385, 75, 501, 13, 20362, 198, 385, 75, 501, 7, 87, 3712, 52, 4906, 8, 796, 514, 75, 501, 7, 87, 13, 2100, 8, 198, 198, 8818, 514, 75, 501, 90, 7597, 11, 37, 5432, 92, 7, 87, 3712, 3...
2.360022
1,811
module MakieRipserer using AbstractPlotting using IterTools using PersistenceDiagrams using PlotUtils using ProgressMeter using Ripserer using AbstractPlotting: Plot, PointBased, Triangle using Ripserer: AbstractSimplex, AbstractFiltration, AbstractRipsFiltration, AbstractChainElement using GeometryBasics: GLTria...
[ 21412, 15841, 494, 49, 541, 325, 11751, 198, 198, 3500, 27741, 43328, 889, 198, 3500, 40806, 33637, 198, 3500, 9467, 13274, 18683, 6713, 82, 198, 3500, 28114, 18274, 4487, 198, 3500, 18387, 44, 2357, 198, 3500, 29496, 325, 11751, 198, 1...
2.798246
342
<reponame>UnofficialJuliaMirror/RealNeuralNetworks.jl-4491297b-8966-5840-8cb9-b189d60f3398 module PointObjs export PointObj mutable struct PointObj class :: UInt8 x :: Float32 y :: Float32 z :: Float32 radius :: Float32 parent :: Int32 end fun...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 15633, 8199, 1523, 7934, 5225, 13, 20362, 12, 31911, 1065, 5607, 65, 12, 4531, 2791, 12, 3365, 1821, 12, 23, 21101, 24, 12, 65, 23362, 67, 1899, 69, 2091, 4089, 198, ...
2.182631
783
abstract CorrectionMethod immutable BonferroniMethod <: CorrectionMethod end immutable BenjaminiHochbergMethod <: CorrectionMethod end immutable BenjaminiYekutieliMethod <: CorrectionMethod end immutable HochbergMethod <: CorrectionMethod end immutable HolmMethod <: CorrectionMethod end # some constants Bonferroni = B...
[ 397, 8709, 35074, 17410, 198, 8608, 18187, 7979, 2232, 1313, 72, 17410, 1279, 25, 35074, 17410, 886, 198, 8608, 18187, 3932, 39159, 5362, 39, 5374, 3900, 17410, 1279, 25, 35074, 17410, 886, 198, 8608, 18187, 3932, 39159, 5362, 56, 988, ...
3.34965
143
<gh_stars>1-10 __precompile__() module BioSequenceGraphs using BioSequences include("Nodes.jl") include("Links.jl") include("SequenceGraph.jl") include("IO.jl") include("GFA1/GFA1.jl") end # module BioSequenceGraphs
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 16024, 44015, 594, 37065, 82, 198, 198, 3500, 16024, 44015, 3007, 198, 198, 17256, 7203, 45, 4147, 13, 20362, 4943, 198, 17256, 7203, 31815, ...
2.588235
85
using DataFrames struct DBPerson database::SQLite.DB pkey::Int name::String email::String end Base.show(io::IO, per::DBPerson) = print(io, per.name) function NeXLUncertainties.asa(::Type{DataFrame}, people::AbstractArray{DBPerson}) return DataFrame( PKey = [ person.pkey for person in peop...
[ 3500, 6060, 35439, 198, 198, 7249, 20137, 15439, 198, 220, 220, 220, 6831, 3712, 17861, 578, 13, 11012, 198, 220, 220, 220, 279, 2539, 3712, 5317, 198, 220, 220, 220, 1438, 3712, 10100, 198, 220, 220, 220, 3053, 3712, 10100, 198, 437,...
2.449519
832
function process_pokes(ongoing::AbstractDict) curr_data = adjust_matfile(ongoing) dropmissing!(curr_data, :Trial) process_pokes(curr_data) end function process_pokes(curr_data::AbstractDataFrame) curr_data[!,:Poke_within_Trial] = Vector{Union{Float64,Missing}}(undef,size(curr_data,1)) curr_data[!,:...
[ 8818, 1429, 62, 79, 3369, 7, 25162, 278, 3712, 23839, 35, 713, 8, 198, 220, 220, 220, 1090, 81, 62, 7890, 796, 4532, 62, 6759, 7753, 7, 25162, 278, 8, 198, 220, 220, 220, 4268, 45688, 0, 7, 22019, 81, 62, 7890, 11, 1058, 51, 4...
2.186279
2,099
using IICGP using Test cfg_filename = string(@__DIR__, "/dualcgp_test.yaml") game = "assault" main_cfg, enco_cfg, cont_cfg, reducer, bootstrap = IICGP.dualcgp_config( cfg_filename, game ) enco = IPCGPInd(enco_cfg) cont = CGPInd(cont_cfg) @test true
[ 3500, 314, 2149, 16960, 198, 3500, 6208, 198, 198, 37581, 62, 34345, 796, 4731, 7, 31, 834, 34720, 834, 11, 12813, 646, 282, 66, 31197, 62, 9288, 13, 88, 43695, 4943, 198, 6057, 796, 366, 46635, 1, 198, 198, 12417, 62, 37581, 11, ...
2.297297
111
<filename>test/solvers.jl<gh_stars>0 using JuMP import GLPK lp_solver = with_optimizer(GLPK.Optimizer)
[ 27, 34345, 29, 9288, 14, 34453, 690, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 12585, 7378, 198, 198, 11748, 10188, 40492, 198, 34431, 62, 82, 14375, 796, 351, 62, 40085, 7509, 7, 8763, 40492, 13, 27871, 320, 7509, 8, 198 ]
2.418605
43
# Test constructing empty future function test_construct_empty_future() fut = Banyan.Future() @test fut.value == nothing @test fut.mutated == false @test Banyan.get_src_name(fut) == "None" fut = Banyan.Future(source=Client()) @test fut.value == nothing @test fut.mutated = true @test Bany...
[ 2, 6208, 30580, 6565, 2003, 198, 8818, 1332, 62, 41571, 62, 28920, 62, 37443, 3419, 198, 220, 220, 220, 13294, 796, 347, 1092, 272, 13, 29783, 3419, 198, 220, 220, 220, 2488, 9288, 13294, 13, 8367, 6624, 2147, 198, 220, 220, 220, 24...
2.302647
869
<gh_stars>1-10 # run this file with julia -p 4 to use 4 cores in the comparison using JLD2, Distributed @everywhere begin using ReinforcementLearningEnvironmentClassicControl, Flux, ReinforcementLearning getenv() = (CartPole(), 4, 2) # getenv() = (MountainCar(maxsteps = 10^4), 2, 3) function setup(learner, env, preproc...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 1057, 428, 2393, 351, 474, 43640, 532, 79, 604, 284, 779, 604, 21758, 287, 262, 7208, 198, 3500, 449, 11163, 17, 11, 4307, 6169, 198, 31, 16833, 3003, 2221, 198, 3500, 22299, 13442, 417...
2.075368
1,088
<gh_stars>0 ## @lc code=start using LeetCode function merge_nodes!(head::ListNode)::ListNode node, cur = head, head.next while !isnothing(cur) if cur.val == 0 && !isnothing(cur.next) node.next = cur node = node.next else node.val += cur.val end ...
[ 27, 456, 62, 30783, 29, 15, 198, 2235, 2488, 44601, 2438, 28, 9688, 198, 3500, 1004, 316, 10669, 198, 198, 8818, 20121, 62, 77, 4147, 0, 7, 2256, 3712, 8053, 19667, 2599, 25, 8053, 19667, 198, 220, 220, 220, 10139, 11, 1090, 796, ...
2.033735
415
using MusicXML # Reads musicxml file and then extracts the data, builds all the types and stores them in proper format. doc = readmusicxml(joinpath("examples", "musescore.musicxml")) # Example 1: # Prints Each instrument name and then the pitches # Extracting each instrument information scprts = doc.scorepartwise.pa...
[ 3500, 7849, 55, 5805, 198, 198, 2, 4149, 82, 2647, 19875, 2393, 290, 788, 32139, 262, 1366, 11, 12188, 477, 262, 3858, 290, 7000, 606, 287, 1774, 5794, 13, 198, 15390, 796, 1100, 28965, 19875, 7, 22179, 6978, 7203, 1069, 12629, 1600, ...
2.497132
523
export gauss_line_fit function gaussclossure(X::AbstractVector) function gaussloss(params) a, σ = params[1], params[2] x = a * [exp(-(t)^2 / (2 * σ^2)) for t in axes(X, 1)] return sum(abs2, x - X) end return gaussloss end function gauss_line_fit(X::AbstractVector; kwargs...) f...
[ 198, 39344, 31986, 1046, 62, 1370, 62, 11147, 198, 198, 8818, 31986, 1046, 565, 793, 495, 7, 55, 3712, 23839, 38469, 8, 198, 220, 220, 220, 2163, 31986, 1046, 22462, 7, 37266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 257, 11, 18...
2.275956
366
<gh_stars>0 ### A Pluto.jl notebook ### # v0.12.20 using Markdown using InteractiveUtils # ╔═╡ 4dd67540-6696-11eb-313d-49aaec40c97b using ScikitLearn # ╔═╡ 07836df0-669b-11eb-36e1-c7a130d62f2a using Statistics # ╔═╡ ba206ea0-6695-11eb-0046-77b8e1fcd083 begin using PlutoUI using CSV # This is a pacakge we us...
[ 27, 456, 62, 30783, 29, 15, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 1238, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 604, 1860, ...
1.803199
2,688
""" bloch_redfield_tensor(H, a_ops; J=[], use_secular=true, secular_cutoff=0.1) Create the super-operator for the Bloch-Redfield master equation such that ``\\dot ρ = R ρ`` based on the QuTiP implementation. See QuTiP's documentation (http://qutip.org/docs/latest/guide/dynamics/dynamics-bloch-redfield.html) for m...
[ 37811, 198, 220, 220, 220, 698, 5374, 62, 445, 3245, 62, 83, 22854, 7, 39, 11, 257, 62, 2840, 26, 449, 41888, 4357, 779, 62, 2363, 934, 28, 7942, 11, 14589, 62, 8968, 2364, 28, 15, 13, 16, 8, 198, 198, 16447, 262, 2208, 12, 46...
2.201341
4,028
<gh_stars>0 import Pkg; packages = ["Plots", "PlotlyJS", "GenericLinearAlgebra", "WriteVTK", "LanguageServer"] Pkg.add(packages) Pkg.gc() using IJulia installkernel("Julia Singlethreaded", env=Dict("JULIA_NUM_THREADS"=>"1"))
[ 27, 456, 62, 30783, 29, 15, 198, 11748, 350, 10025, 26, 198, 198, 43789, 796, 14631, 3646, 1747, 1600, 366, 43328, 306, 20120, 1600, 366, 46189, 14993, 451, 2348, 29230, 1600, 366, 16594, 36392, 42, 1600, 366, 32065, 10697, 8973, 198, ...
2.48913
92
# This fille contains functions for loading atmosphere model # curves from the Sonora Bobcat models using DelimitedFiles using NamedTupleTools using BasicInterpolators using Interpolations """ sonora_photometry_interpolator(:Keck_L′, [metalicity="+0.0"]) Given a supported photometric band and [M/H] metalicity (d...
[ 2, 770, 1226, 293, 4909, 5499, 329, 11046, 8137, 2746, 198, 2, 23759, 422, 262, 6295, 5799, 5811, 9246, 4981, 198, 198, 3500, 4216, 320, 863, 25876, 198, 3500, 34441, 51, 29291, 33637, 198, 3500, 14392, 9492, 16104, 2024, 198, 3500, 4...
2.206517
2,455
<reponame>dourouc05/ConstraintProgrammingExtensions.jl """ Bridges `CP.VectorDomain` to MILP by adding one binary variable per possible combination. """ struct VectorDomain2MILPBridge{T} <: MOIBC.AbstractBridge vars::Vector{MOI.VariableIndex} vars_bin::Vector{MOI.ConstraintIndex{MOI.VariableIndex, MOI.ZeroOne}...
[ 27, 7856, 261, 480, 29, 67, 454, 280, 66, 2713, 14, 3103, 2536, 2913, 15167, 2229, 11627, 5736, 13, 20362, 198, 37811, 198, 33, 32124, 4600, 8697, 13, 38469, 43961, 63, 284, 31515, 47, 416, 4375, 530, 13934, 7885, 583, 220, 198, 79,...
2.149488
1,465
""" 素数判定 """ function is_prime_simple(n::Int64) if n < 2 return false elseif n == 2 return true else for i in 2:n-1 #println(i, "...") if n % i == 0 return false end #println("わりきれない") end end return tru...
[ 198, 37811, 198, 163, 112, 254, 46763, 108, 26344, 97, 22522, 248, 198, 37811, 198, 8818, 318, 62, 35505, 62, 36439, 7, 77, 3712, 5317, 2414, 8, 198, 220, 220, 220, 611, 299, 1279, 362, 198, 220, 220, 220, 220, 220, 220, 220, 1441...
1.642667
375
function test_clean() rm(joinpath(TEST_TMP_DIR, "test-playground"), recursive=true) @test !ispath(joinpath(TEST_TMP_DIR, "test-playground")) @test islink(joinpath(TEST_CONFIG.dir.bin, "julia-bin")) @test islink(joinpath(TEST_CONFIG.dir.store, "myproject")) clean(TEST_CONFIG) @test !ispath(joinp...
[ 8818, 1332, 62, 27773, 3419, 198, 220, 220, 220, 42721, 7, 22179, 6978, 7, 51, 6465, 62, 51, 7378, 62, 34720, 11, 366, 9288, 12, 1759, 2833, 12340, 45115, 28, 7942, 8, 198, 220, 220, 220, 2488, 9288, 5145, 271, 6978, 7, 22179, 697...
2.324468
376
<reponame>CmdQ/AoC using Utils using Chain struct Point x::Int y::Int end Point() = Point(0, 0) struct Area ll::Point ur::Point end struct Shot loc::Point vel::Point end Shot(p) = Shot(Point(), p) const file = find_input(@__FILE__) function load(file) content = read(file, String) nu...
[ 27, 7856, 261, 480, 29, 40109, 48, 14, 32, 78, 34, 198, 3500, 7273, 4487, 198, 198, 3500, 21853, 198, 198, 7249, 6252, 198, 220, 220, 220, 2124, 3712, 5317, 198, 220, 220, 220, 331, 3712, 5317, 198, 437, 198, 12727, 3419, 796, 625...
2.242647
544
include("./src/ShellModel.jl") using .ShellModel ########################## ### solve EC for approx. eigenpairs ########################## """ calc_moment=true # calc. mu&Q-moment write_appwav0false # to write .appwav you need to make sample w.f. """ function solve(write_appwav=false) sntpath = "snts/random_inp...
[ 17256, 7, 1911, 14, 10677, 14, 23248, 17633, 13, 20362, 4943, 198, 3500, 764, 23248, 17633, 198, 198, 14468, 7804, 2235, 198, 21017, 8494, 13182, 329, 5561, 13, 304, 9324, 79, 3468, 198, 14468, 7804, 2235, 198, 37811, 198, 9948, 66, 6...
2.159827
463
println("Welcome to rate-plot.jl, where rates for CIRIS are plotted") using DataFrames using Gadfly path = "/scratch/cns7ae/losalamos/" outfile = "rates-plot.pdf" xmax = 1e15 xmin = 1e13 speciesName = "O<sub>3</sub>" speciesNum = 7 plottheme = Gadfly.Theme( highlight_width=0pt, ...
[ 35235, 7203, 14618, 284, 2494, 12, 29487, 13, 20362, 11, 810, 3965, 329, 327, 4663, 1797, 389, 37515, 4943, 198, 3500, 6060, 35439, 198, 3500, 20925, 12254, 198, 198, 6978, 796, 12813, 1416, 36722, 14, 66, 5907, 22, 3609, 14, 33280, 4...
2.111094
6,445
module test_julia_divisions using Test @test repr(5/3) == "1.6666666666666667" @test repr(5//3) == "5//3" @test repr(5\3) == "0.6" @test repr(5÷3) == "1" #@info :divisions 5/3 5//3 5\3 5÷3 #= ┌ Info: divisions │ 5 / 3 = 1.6666666666666667 │ 5 // 3 = 5//3 │ 5 \ 3 = 0.6 └ 5 ÷ 3 = 1 =# end # module test_...
[ 21412, 1332, 62, 73, 43640, 62, 7146, 3279, 198, 198, 3500, 6208, 198, 198, 31, 9288, 41575, 7, 20, 14, 18, 8, 220, 6624, 366, 16, 13, 41977, 19060, 2791, 3134, 1, 198, 31, 9288, 41575, 7, 20, 1003, 18, 8, 6624, 366, 20, 1003, ...
1.909091
176
<filename>src/programs/EXTROSNB.jl # Problem : GROUP A # ********* # Source: problem 10 in # Ph.L. Toint, # "Test problems for partially separable optimization and results # for the routine PSPMIN", # Report 83/4, Department of Mathematics, FUNDP (Namur, B), 1983. # # See also Buckley#116. Note...
[ 27, 34345, 29, 10677, 14, 23065, 82, 14, 6369, 5446, 2640, 32819, 13, 20362, 198, 2, 220, 220, 220, 20647, 1058, 44441, 317, 198, 2, 220, 220, 220, 220, 4557, 9, 198, 2, 220, 220, 220, 8090, 25, 1917, 838, 287, 198, 2, 220, 220,...
2.406746
504
export Packed_Normal, Packed_MvNormal, Packed_AliasingScalarSampler, Packed_BallTreeDensity mutable struct Packed_Normal mean::Float64 std::Float64 distType::String end mutable struct Packed_MvNormal mean::Vector{Float64} cov::Vector{Float64} distType::String end mutable struct Packed_Ali...
[ 39344, 198, 220, 220, 220, 350, 6021, 62, 26447, 11, 198, 220, 220, 220, 350, 6021, 62, 44, 85, 26447, 11, 198, 220, 220, 220, 350, 6021, 62, 37893, 2313, 3351, 282, 283, 16305, 20053, 11, 198, 220, 220, 220, 350, 6021, 62, 23410,...
2.845833
240
<gh_stars>1-10 """ scale(f=std, x, y=f(skipmissing(x))) Scale an array `x` by a scalar `y`. !!! warning This only scales and does not center the values, unlike `scale` in R. See `StatsBase.zscore` for that functionality. See also [`scale!`](@ref) """ scale(x) = scale(std, x) scale(f::Function, x) = scal...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 5046, 7, 69, 28, 19282, 11, 2124, 11, 331, 28, 69, 7, 48267, 45688, 7, 87, 22305, 198, 198, 29990, 281, 7177, 4600, 87, 63, 416, 257, 16578, 283, 4600, 88, 4...
2.44392
1,908
<reponame>ModiaSim/ModiaMath.jl module Test_ode_pendulum_with_Measurement #= This test model demonstrates how to simulate a simple pendulum with DifferentialEquations.jl using different types: - model1: states and parameters are Float64 - model2: states and some parameters are Measurement{Float64} and the r...
[ 27, 7856, 261, 480, 29, 5841, 544, 8890, 14, 5841, 544, 37372, 13, 20362, 198, 21412, 6208, 62, 1098, 62, 37038, 14452, 62, 4480, 62, 47384, 434, 198, 198, 2, 28, 198, 1212, 1332, 2746, 15687, 703, 284, 29308, 257, 2829, 44017, 1445...
2.174528
1,696
using Documenter using gRPC makedocs(; sitename="gRPC", format=Documenter.HTML(), modules=[gRPC]) # Documenter can also automatically deploy documentation to gh-pages. # See "Hosting Documentation" and deploydocs() in the Documenter manual # for more information. #=deploydocs( repo = "<repository url>" )=#
[ 3500, 16854, 263, 198, 3500, 308, 49, 5662, 198, 198, 76, 4335, 420, 82, 7, 26, 1650, 12453, 2625, 70, 49, 5662, 1600, 5794, 28, 24941, 263, 13, 28656, 22784, 13103, 41888, 70, 49, 5662, 12962, 198, 198, 2, 16854, 263, 460, 635, 6...
3.237113
97
struct EconomicDispatch <: AbstractOperationsModel end struct SCEconomicDispatch <: AbstractOperationsModel end function EconomicDispatch(system::PSY.System, transmission::Type{S}; optimizer::Union{Nothing,JuMP.OptimizerFactory}=nothing, kwargs...) where {S <: PM.AbstractPowerFormulation} devices = Dict{Symbol, P...
[ 7249, 11279, 49354, 1279, 25, 27741, 18843, 602, 17633, 886, 198, 7249, 311, 5222, 1519, 291, 49354, 1279, 25, 27741, 18843, 602, 17633, 886, 198, 198, 8818, 11279, 49354, 7, 10057, 3712, 3705, 56, 13, 11964, 11, 11478, 3712, 6030, 90, ...
2.055462
1,190
using LinearAlgebra function RCCSDpT(rhf::RHF, Alg::RpTa) aoints = IntegralHelper() moints = IntegralHelper(orbitals=rhf.orbitals) ccsd = RCCSD(moints, aoints) return RCCSDpT(ccsd, moints, Alg) end function RCCSDpT(Alg::RpTa) aoints = IntegralHelper{Float64}() rhf = RHF(aoints) moints = In...
[ 3500, 44800, 2348, 29230, 198, 198, 8818, 371, 4093, 10305, 79, 51, 7, 17179, 69, 3712, 49, 29567, 11, 978, 70, 3712, 49, 79, 38586, 8, 198, 220, 220, 220, 257, 1563, 82, 796, 15995, 1373, 47429, 3419, 198, 220, 220, 220, 285, 156...
1.447694
3,317
<reponame>tor4z/convex_optimization<gh_stars>0 using Plots function wheeler(x, a=1.5) return exp(-(x[1]*x[2] - a)^2 - (x[2] - a)^2); end # plot heatmap(-10:0.01:25, -3:0.01:6, (x, y)->wheeler([x, y]))
[ 27, 7856, 261, 480, 29, 13165, 19, 89, 14, 1102, 303, 87, 62, 40085, 1634, 27, 456, 62, 30783, 29, 15, 198, 3500, 1345, 1747, 628, 198, 8818, 7825, 263, 7, 87, 11, 257, 28, 16, 13, 20, 8, 198, 220, 220, 220, 1441, 1033, 7, 3...
1.801724
116
<filename>test/runtests.jl using Test using PointCloudRasterizers using LazIO using GeoArrays using Statistics lazfn = joinpath(dirname(pathof(LazIO)), "..", "test/libLAS_1.2.laz") pointcloud = LazIO.open(lazfn) cellsizes = (1.,1.) idx = index(pointcloud, cellsizes) raster = reduce(idx, field=:Z, reducer=median) # ...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 6208, 198, 198, 3500, 6252, 18839, 49, 1603, 11341, 198, 3500, 22807, 9399, 198, 3500, 32960, 3163, 20477, 198, 3500, 14370, 198, 198, 75, 1031, 22184, 796, 4654, 6978, 7,...
2.542522
341
function _read_bash(src::String; verbose = true, cmdkwargs... ) cmd = Cmd(`bash -c $(src)`; cmdkwargs...) out = read(cmd, String) verbose && println(out) return out end function _spawn_bash(src::String; cmdkwargs...) cmd = Cmd(`bash -c $(src)`; cmdkwargs...) proc = run(cmd;...
[ 8818, 4808, 961, 62, 41757, 7, 10677, 3712, 10100, 26, 220, 198, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 796, 2081, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23991, 46265, 22046, 986, 198, 220, 220, 220, 1267, 198, 220, 2...
2.271605
162
n = [1,4,7,9,11,17,243,5247] @test reinterpret(Int, decode(Base64, encode(Base64, reinterpret(UInt8, n)))) == n for i in n @test decode(BCD, encode(BCD, i)) == i @test decode(BCD, encode(BCD, i, true), true) == i end
[ 198, 77, 796, 685, 16, 11, 19, 11, 22, 11, 24, 11, 1157, 11, 1558, 11, 26660, 11, 20, 23753, 60, 198, 198, 31, 9288, 302, 27381, 7, 5317, 11, 36899, 7, 14881, 2414, 11, 37773, 7, 14881, 2414, 11, 302, 27381, 7, 52, 5317, 23, ...
2.192308
104
const MaybeSymbol = Union{Nothing, Symbol} const MaybeString = Union{Nothing, String} const MaybeNumber = Union{Nothing, Int, Float64} const MaybeInteger = Union{Nothing, Int32, Int64} const MaybeFloat = Union{Nothing, Float32, Float64} const MaybeURI = Union{Nothing, URI} const MaybeMIME = Union{Nothing, M...
[ 9979, 6674, 13940, 23650, 220, 796, 4479, 90, 18465, 11, 38357, 92, 198, 9979, 6674, 10100, 220, 796, 4479, 90, 18465, 11, 10903, 92, 198, 9979, 6674, 15057, 220, 796, 4479, 90, 18465, 11, 2558, 11, 48436, 2414, 92, 198, 9979, 6674, ...
2.368992
645
using JuLIP, ACE, JuLIP.Potentials, LinearAlgebra using ACE.Testing: lsq, get_V0 using LinearAlgebra: qr, cond using Plots using ACE using Printf, Test, LinearAlgebra, JuLIP, JuLIP.Testing using JuLIP: evaluate, evaluate_d using JuLIP.Potentials: i2z, numz using ACE.RPI using ACEds using ACEds.equivRotations3D using ...
[ 3500, 12585, 43, 4061, 11, 40488, 11, 12585, 43, 4061, 13, 25396, 14817, 11, 44800, 2348, 29230, 198, 3500, 40488, 13, 44154, 25, 300, 31166, 11, 651, 62, 53, 15, 198, 3500, 44800, 2348, 29230, 25, 10662, 81, 11, 1779, 198, 3500, 13...
2.029253
4,444
<filename>notebooks/halo-solvers/Halo-Orbit-Solvers.jl ### A Pluto.jl notebook ### # v0.12.20 using Markdown using InteractiveUtils # ╔═╡ 9739e5dc-369e-11eb-2c56-f36ccd348299 begin using Plots using Roots using PlutoUI using Latexify using StaticArrays using LinearAlgebra using ModelingToolkit using Unitful...
[ 27, 34345, 29, 11295, 12106, 14, 71, 7335, 12, 34453, 690, 14, 39, 7335, 12, 5574, 2545, 12, 36949, 690, 13, 20362, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 1238, 198, 198, 3500, 2940, 2902, ...
2.192145
7,588
<reponame>BenLauwens/ES313.jl ### A Pluto.jl notebook ### # v0.16.1 using Markdown using InteractiveUtils # ╔═╡ a62a0de6-04b8-11eb-342f-bfea16900b85 begin using Pkg cd(joinpath(dirname(@__FILE__),"..")) Pkg.activate(pwd()) using PlutoUI using JuMP, GLPK, Tulip, Optim # Non-linear problem using Ipopt, Plots ...
[ 27, 7856, 261, 480, 29, 11696, 43, 559, 86, 641, 14, 1546, 25838, 13, 20362, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1433, 13, 16, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, ...
2.115586
7,847
<filename>test/runtests.jl using Test @testset "JLDArchives" begin include("v0.2.jl") include("v0.4.jl") end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 41, 11163, 19895, 1083, 1, 2221, 198, 220, 220, 220, 2291, 7203, 85, 15, 13, 17, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, ...
2.185185
54
<gh_stars>0 export ImmutablePolynomial """ ImmutablePolynomial{T<:Number, N}(coeffs::AbstractVector{T}, var=:x) Construct an immutable (static) polynomial from its coefficients `a₀, a₁, …, aₙ`, lowest order first, optionally in terms of the given variable `x` where `x` can be a character, symbol, or string. If ...
[ 27, 456, 62, 30783, 29, 15, 198, 39344, 9543, 18187, 34220, 26601, 498, 198, 198, 37811, 198, 220, 220, 220, 9543, 18187, 34220, 26601, 498, 90, 51, 27, 25, 15057, 11, 399, 92, 7, 1073, 14822, 82, 3712, 23839, 38469, 90, 51, 5512, ...
2.166789
5,456
using Test using Quadmath @testset "conversion $T" for T in (Float64, Int32, Int64, BigFloat, BigInt) @test Float128(T(1)) + Float128(T(2)) == Float128(T(3)) @test Float128(T(1)) + Float128(T(2)) <= Float128(T(3)) @test Float128(T(1)) + Float128(T(2)) != Float128(T(4)) @test Float128(T(1)) + Float128(T...
[ 3500, 6208, 198, 3500, 20648, 11018, 198, 198, 31, 9288, 2617, 366, 1102, 9641, 720, 51, 1, 329, 309, 287, 357, 43879, 2414, 11, 2558, 2624, 11, 2558, 2414, 11, 4403, 43879, 11, 4403, 5317, 8, 198, 220, 220, 220, 2488, 9288, 48436, ...
2.081604
723
<gh_stars>1-10 export athenasetup, athenaquery """ athenasetup(bucket) Create AWS Athena database and table for SQL queries. # Arguments - `bucket::String`: Name of AWS bucket to store query results """ function athenasetup(aws::AWSConfig,bucket::String; database::String="scedcindex", ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 39344, 379, 831, 292, 316, 929, 11, 379, 831, 64, 22766, 198, 37811, 198, 220, 379, 831, 292, 316, 929, 7, 27041, 316, 8, 198, 198, 16447, 30865, 21341, 6831, 290, 3084, 329, 16363, 20743,...
2.432616
2,508
module JuliaLearn # PrintSourceCode export PrintSourceCode include("PrintSourceCode.jl") # CombineScreenShots export CombineScreenShots include("CombineScreenShots.jl") # PlotTopography export PlotTopography include("PlotTopography.jl") end # module
[ 21412, 22300, 20238, 198, 198, 2, 12578, 7416, 10669, 198, 39344, 12578, 7416, 10669, 198, 17256, 7203, 18557, 7416, 10669, 13, 20362, 4943, 198, 198, 2, 29176, 23901, 2484, 1747, 198, 39344, 29176, 23901, 2484, 1747, 198, 17256, 7203, 20...
3.479452
73
<gh_stars>10-100 using NonlinearEigenproblemsTest using NonlinearEigenproblems using Test using LinearAlgebra using SparseArrays @testset "MSLP" begin target=0; nev=3; nep=nep_gallery("beam",5); # Full matrix test λ1,v1=mslp(nep) @test norm(compute_Mlincomb(nep,λ1,v1))<1e-10 Av=[sparse(n...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 8504, 29127, 36, 9324, 1676, 22143, 14402, 198, 3500, 8504, 29127, 36, 9324, 1676, 22143, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 1338, 17208, 3163, 20477, 198, 198, ...
1.993197
441
<reponame>simonbyrne/libm.jl function round(x::FloatingPoint) isfinite(x) || return x+x t = trunc(x) if x > 0.0 x-t >= half(x) ? t+one(t) : t else x-t <= -half(x) ? t-one(t) : t end end function floor(x::FloatingPoint) t = trunc(x) x < zero(x) && x!=t ? t-one(x) : t end fu...
[ 27, 7856, 261, 480, 29, 14323, 261, 1525, 81, 710, 14, 8019, 76, 13, 20362, 198, 8818, 2835, 7, 87, 3712, 33574, 803, 12727, 8, 198, 220, 220, 220, 318, 69, 9504, 7, 87, 8, 8614, 1441, 2124, 10, 87, 198, 220, 220, 220, 256, 79...
1.872146
219
<gh_stars>10-100 # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct ResourceRateCardInfo <: SwaggerModel Currency::Any # spec type: Union{ Nothing, String } # spec name: Currency Locale::Any # spec type: Un...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20855, 2427, 13, 628, 198, 76, 18187, 2878, ...
2.994069
843
using BinaryProvider # requires BinaryProvider 0.3.0 or later # Parse some basic command-line arguments const verbose = "--verbose" in ARGS const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr"))) products = [ LibraryProduct(prefix, String["libFLAC"], :libflac), ] # Download...
[ 3500, 45755, 29495, 1303, 4433, 45755, 29495, 657, 13, 18, 13, 15, 393, 1568, 198, 198, 2, 2547, 325, 617, 4096, 3141, 12, 1370, 7159, 198, 9979, 15942, 577, 796, 366, 438, 19011, 577, 1, 287, 5923, 14313, 198, 9979, 21231, 796, 377...
2.364465
1,317
<reponame>louisponet/GLider.jl # All Systems are defined in these files include("systems/core.jl") include("systems/camera.jl") include("systems/mesher.jl") abstract type AbstractRenderSystem <: System end include("systems/rendering/prerenderer.jl") include("systems/rendering/default.jl") include("systems/rendering/li...
[ 27, 7856, 261, 480, 29, 75, 280, 8802, 36823, 14, 8763, 1304, 13, 20362, 198, 2, 1439, 11998, 389, 5447, 287, 777, 3696, 198, 17256, 7203, 10057, 82, 14, 7295, 13, 20362, 4943, 198, 17256, 7203, 10057, 82, 14, 25695, 13, 20362, 4943...
3.017241
232
<filename>calendar/03/solution.jl<gh_stars>0 # Part 1 diagnostic = map(x -> parse.(Bool, split(x, "")), readlines("input.txt")) γ = sum(diagnostic) .>= length(diagnostic)/2 ϵ = .!γ bit2decimal(x) = sum([2^(i-1) for i in eachindex(x) if Bool(x[end-(i-1)])]) @info "Power consumption = $(prod(bit2decimal, [γ, ϵ]))" bit2de...
[ 27, 34345, 29, 9948, 9239, 14, 3070, 14, 82, 2122, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 2142, 352, 198, 47356, 15132, 796, 3975, 7, 87, 4613, 21136, 12195, 33, 970, 11, 6626, 7, 87, 11, 366, 4943, 828, 1100, 6615, 7203...
2.136483
381
""" circle(; center::Union{Point, Position}, radius::Real=5., steps::Integer=64, units::String="kilometers") Take a Point or a Position and calculate the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision. # Examples ```jldoctest julia> point = Point([35, 45]) Point([...
[ 37811, 198, 220, 220, 220, 9197, 7, 26, 3641, 3712, 38176, 90, 12727, 11, 23158, 5512, 16874, 3712, 15633, 28, 20, 1539, 4831, 3712, 46541, 28, 2414, 11, 4991, 3712, 10100, 2625, 34553, 40077, 4943, 198, 198, 12322, 257, 6252, 393, 25...
2.520157
1,017
@info "---------- Modal test ----------" st=Structure() lcset=LoadCaseSet() add_uniaxial_metal!(st,"steel",2e11,0.2,7849.0474) add_general_section!(st,"frame",4.26e-3,3.301e-6,6.572e-5,9.651e-8,1e-3,1e-3,0,0) add_node!(st,1,0,0,0) add_node!(st,2,18,18,0) add_beam!(st,1,1,2,"steel","frame") set_nodal_restraint!(st,1,...
[ 31, 10951, 366, 35937, 3401, 282, 1332, 24200, 438, 1, 198, 301, 28, 1273, 5620, 3419, 198, 44601, 2617, 28, 8912, 20448, 7248, 3419, 198, 198, 2860, 62, 39934, 87, 498, 62, 28469, 0, 7, 301, 553, 44822, 1600, 17, 68, 1157, 11, 15...
1.954802
708
<reponame>daanhb/BasisFunctions.jl """ An `OperatedDict` represents a set that is acted on by an operator, for example the differentiation operator. The `OperatedDict` has the dimension of the source set of the operator, but each basis function is acted on by the operator. In practice the operator `D` acts on the coe...
[ 27, 7856, 261, 480, 29, 6814, 272, 71, 65, 14, 15522, 271, 24629, 2733, 13, 20362, 198, 198, 37811, 198, 2025, 4600, 18843, 515, 35, 713, 63, 6870, 257, 900, 326, 318, 13134, 319, 416, 281, 10088, 11, 329, 1672, 198, 1169, 32488, ...
2.701202
3,079
""" MicrostructureNoise.Prior(; N, α1, β1, αη, βη, Πα, μ0, C0) MicrostructureNoise.Prior(; kwargs...) Struct holding prior distribution parameters. `N` is the number of bins, `InverseGamma(α1, β1)` is the prior of `θ[1]` on the first bin, the prior on the noise variance `η` is `InverseGamma(αη, βη)`, the hid...
[ 198, 37811, 198, 220, 220, 220, 4527, 301, 5620, 2949, 786, 13, 22442, 7, 26, 399, 11, 26367, 16, 11, 27169, 16, 11, 26367, 138, 115, 11, 27169, 138, 115, 11, 7377, 254, 17394, 11, 18919, 15, 11, 327, 15, 8, 198, 220, 220, 220, ...
1.788028
5,279
module ManufacturedSolMHDTest using Gridap using Gridap.FESpaces: residual using Test u(x) = VectorValue(x[1]^2+x[2]^2,-x[1]-x[2]^2,one(x[1])+x[2]^2) p(x) = x[1]+x[2]+x[3] j(x) = VectorValue(x[1]^2+x[2],-x[1]-x[2]^2,one(x[1])+x[3]^2) φ(x) = x[1]+x[2]+x[3] B = VectorValue(1.0,1.0,1.0) ∇u(x) = ∇(u)(x) Δu(x) = Δ(u)(x) ...
[ 21412, 17858, 1522, 36949, 44, 10227, 14402, 198, 198, 3500, 24846, 499, 198, 3500, 24846, 499, 13, 37, 1546, 43076, 25, 29598, 198, 3500, 6208, 198, 198, 84, 7, 87, 8, 796, 20650, 11395, 7, 87, 58, 16, 60, 61, 17, 10, 87, 58, 1...
1.671201
2,132
# A SearchSpace determines which candidate points can be # considered in a search/optimization. This base class has very few restrictions # and can allow varying number of dimensions etc. abstract SearchSpace # SearchSpace with a fixed number of dimensions. The vast majority of problems. abstract FixedDimensionSearch...
[ 2, 317, 11140, 14106, 15947, 543, 4540, 2173, 460, 307, 220, 198, 2, 3177, 287, 257, 2989, 14, 40085, 1634, 13, 770, 2779, 1398, 468, 845, 1178, 8733, 198, 2, 290, 460, 1249, 15874, 1271, 286, 15225, 3503, 13, 198, 397, 8709, 11140,...
3.197337
826
<reponame>PhysicsCodesLab/MPSLabXD.jl # finiteEnvironment.jl # The environment of finite MPS and MPO form of Hamiltonian. # an be used to do DMRG or calculating physical observables """ struct FiniteEnvironment{S<:EuclideanSpace} """ struct FiniteEnvironment{S<:EuclideanSpace} left_env::Vector{<:AbstractTensorM...
[ 27, 7856, 261, 480, 29, 2725, 23154, 34, 4147, 17822, 14, 44, 3705, 17822, 55, 35, 13, 20362, 198, 2, 27454, 31441, 13, 20362, 198, 2, 383, 2858, 286, 27454, 337, 3705, 290, 4904, 46, 1296, 286, 11582, 666, 13, 198, 2, 281, 307, ...
1.937124
1,495
<gh_stars>0 #### Extract subset # ------------------------------------------------------------------------------------------------- # # Subsetting, meaning extracting some portion of the 3D domain # # ------------------------------------------------------------------------------------------------- function extract_subs...
[ 27, 456, 62, 30783, 29, 15, 198, 4242, 29677, 24637, 198, 2, 16529, 3880, 12, 198, 2, 198, 2, 3834, 33990, 11, 3616, 37895, 617, 6903, 286, 262, 513, 35, 7386, 198, 2, 198, 2, 16529, 3880, 12, 198, 8818, 7925, 62, 7266, 2617, 62...
2.003378
2,072
# Base16 Encoder # ============== struct Base16Encoder <: Codec table::CodeTable16 state::State end Base16Encoder(table::CodeTable16) = Base16Encoder(table, State()) """ Base16Encoder(;lowercase=false) Create a base16 encoding codec. Arguments - `lowercase`: use [0-9a-f] instead of [0-9A-F]. """ functi...
[ 2, 7308, 1433, 14711, 12342, 198, 2, 796, 25609, 28, 198, 198, 7249, 7308, 1433, 27195, 12342, 1279, 25, 39298, 198, 220, 220, 220, 3084, 3712, 10669, 10962, 1433, 198, 220, 220, 220, 1181, 3712, 9012, 198, 437, 198, 198, 14881, 1433,...
2.185444
1,003
<reponame>swt30/Ogre.jl using Base.Test import Ogre import WaterData module test_integrator_resources import Ogre import WaterData # Simple ODEs # dy/dt = 6 --> y = 6t (y0=0) ode_1(t, y::Real) = 6 ode_1(t, y::Vector) = [6] ode_1_sol(t) = 6.*t # dy/dt = 2t --> t = t^2 + y0 (y0=0) ode_2(t, y) = 2.*t ode_2_sol(t) = t...
[ 27, 7856, 261, 480, 29, 2032, 83, 1270, 14, 46, 16694, 13, 20362, 198, 3500, 7308, 13, 14402, 198, 11748, 30660, 198, 11748, 5638, 6601, 198, 198, 21412, 1332, 62, 18908, 12392, 62, 37540, 198, 11748, 30660, 198, 11748, 5638, 6601, 19...
2.006602
3,787
<reponame>josePereiro/ExternalCmds.jl # --------------------------------------------------------------- function run_cmd(cmd::Cmd; ios = [stdout], detach = false) # run _out = Pipe() cmd = pipeline(Cmd(cmd; detach), stdout = _out, stderr = _out) proc = run(cmd, wait = false) pid = _try_getpid(proc)...
[ 27, 7856, 261, 480, 29, 73, 577, 47, 567, 7058, 14, 41506, 40109, 82, 13, 20362, 198, 2, 20368, 1783, 24305, 198, 8818, 1057, 62, 28758, 7, 28758, 3712, 40109, 26, 1312, 418, 796, 685, 19282, 448, 4357, 48224, 796, 3991, 8, 628, 2...
2.239835
1,451
""" ConfigTypes Module containing CLIMA configuration types. """ module ConfigTypes export CLIMAConfigType, AtmosLESConfigType, AtmosGCMConfigType, OceanBoxGCMConfigType abstract type CLIMAConfigType end struct AtmosLESConfigType <: CLIMAConfigType end struct AtmosGCMConfigType <: CLIMAConfi...
[ 37811, 198, 220, 220, 220, 17056, 31431, 198, 198, 26796, 7268, 7852, 3955, 32, 8398, 3858, 13, 198, 37811, 198, 21412, 17056, 31431, 198, 198, 39344, 7852, 3955, 2246, 261, 5647, 6030, 11, 198, 220, 220, 220, 220, 220, 220, 1629, 167...
2.784173
139
<filename>__site/assets/end-to-end/telco/code/ex39.jl<gh_stars>10-100 # This file was generated, do not modify it. # hide fi = rpt.evo_tree_classifier.feature_importances feature_importance_table = (feature=Symbol.(first.(fi)), importance=last.(fi)) |> DataFrames.DataFrame
[ 27, 34345, 29, 834, 15654, 14, 19668, 14, 437, 12, 1462, 12, 437, 14, 37524, 1073, 14, 8189, 14, 1069, 2670, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 770, 2393, 373, 7560, 11, 466, 407, 13096, 340, 13, 1303, 780...
2.826531
98
<reponame>jbrea/GaussianProcesses.jl<filename>src/kernels/mat12_iso.jl<gh_stars>0 # Matern 1/2 isotropic covariance Function """ Mat12Iso <: MaternISO Isotropic Matern 1/2 kernel (covariance) ```math k(x,x') = σ^2 \\exp(-|x-y|/ℓ) ``` with length scale ``ℓ`` and signal standard deviation ``σ``. """ mutable struct ...
[ 27, 7856, 261, 480, 29, 73, 4679, 64, 14, 35389, 31562, 18709, 274, 13, 20362, 27, 34345, 29, 10677, 14, 74, 44930, 14, 6759, 1065, 62, 26786, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 337, 9205, 352, 14, 17, 31624, 1773, 2...
2.222642
530
<filename>test/runtests.jl using Mass2 using Base.Test include("runningvectors.jl") include("mockpulses.jl") include("calibration.jl") include("histogram.jl") include("corrections.jl") include("ljh.jl") include("tes_optimal_filtering.jl") include("steps_macros.jl") #include("steps_with_mockpulses.jl") include("good_mn...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 5674, 17, 198, 3500, 7308, 13, 14402, 198, 198, 17256, 7203, 20270, 303, 5217, 13, 20362, 4943, 198, 17256, 7203, 76, 735, 79, 5753, 274, 13, 20362, 4943, 198, 17256, 72...
2.589404
151
<gh_stars>10-100 # MIT License # # Copyright (c) 2018 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 1279, 20608, 29, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198,...
3.35241
664
<filename>test/Finance/finance.jl module _Finance using Brainstorm._Finance using Base.Test include("daycount.jl") include("cashflow.jl") function test_all() println("") test_daycount_all() test_cashflow_all() end end
[ 27, 34345, 29, 9288, 14, 37, 14149, 14, 69, 14149, 13, 20362, 198, 21412, 4808, 37, 14149, 198, 198, 3500, 14842, 12135, 13557, 37, 14149, 198, 3500, 7308, 13, 14402, 198, 198, 17256, 7203, 820, 9127, 13, 20362, 4943, 198, 17256, 7203...
2.629213
89
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # FILE CONTENTS: # SUMMARY: Integration schemes # # INTEGRATION METHODS # midpoint: midpoint or trapezoidal integration # rk4: Runge-Kutta 4 # rk3: Runge-Kutta 3 # OTHER METHODS # f_augmented!: C...
[ 2, 220, 27156, 27156, 27156, 27156, 15116, 8728, 4907, 198, 2, 45811, 22904, 15365, 25, 198, 2, 220, 220, 220, 220, 35683, 44, 13153, 25, 38410, 16546, 198, 2, 198, 2, 220, 220, 220, 220, 17828, 7156, 49, 6234, 337, 36252, 50, 198, ...
1.950358
1,954
<gh_stars>0 mutable struct CanonicalModel JuMPmodel::JuMP.AbstractModel variables::Dict{Symbol, JuMP.Containers.DenseAxisArray} constraints::Dict{Symbol, JuMP.Containers.DenseAxisArray} cost_function::JuMP.AbstractJuMPScalar expressions::Dict{Symbol, JuMP.Containers.DenseAxisArray} parameters::...
[ 27, 456, 62, 30783, 29, 15, 198, 76, 18187, 2878, 19507, 605, 17633, 220, 198, 220, 220, 220, 12585, 7378, 19849, 3712, 33018, 7378, 13, 23839, 17633, 198, 220, 220, 220, 9633, 3712, 35, 713, 90, 13940, 23650, 11, 12585, 7378, 13, 4...
2.643519
216
function param_values(f::AbstractParameterizedFunction) [getfield(f,s) for s in f.params] end num_params(f::AbstractParameterizedFunction) = length(f.params) # Fallbacks param_values(f) = nothing num_params(f) = 0 function problem_new_parameters(prob::ODEProblem,p) f = (t,u,du) -> prob.f(t,u,p,du) uEltype = e...
[ 8818, 5772, 62, 27160, 7, 69, 3712, 23839, 36301, 1143, 22203, 8, 198, 220, 685, 1136, 3245, 7, 69, 11, 82, 8, 329, 264, 287, 277, 13, 37266, 60, 198, 437, 198, 198, 22510, 62, 37266, 7, 69, 3712, 23839, 36301, 1143, 22203, 8, 7...
2.098874
1,598
const BG_COLOR = RGB(255/255, 255/255, 255/255) const LN_COLOR = RGB(67/255, 75/255, 86/255) const MK_COLOR = RGB(67/255, 75/255, 86/255) const LN01_COLOR = RGB(202/255,0/255,32/255) const LN02_COLOR = RGB(5/255,113/255,176/255) const FL01_COLOR = RGB(239/255, 138/255, 98/255) const FL02_COLOR = RGB(103/255, 169/255, 2...
[ 9979, 34839, 62, 46786, 796, 25228, 7, 13381, 14, 13381, 11, 14280, 14, 13381, 11, 14280, 14, 13381, 8, 198, 9979, 406, 45, 62, 46786, 796, 25228, 7, 3134, 14, 13381, 11, 5441, 14, 13381, 11, 9849, 14, 13381, 8, 198, 9979, 20553, ...
2.324653
8,295
<reponame>Samayel/Brainstorm.jl function test_factor_isperfectsquare() @test find([isperfectsquare(i) for i in 1:100]) == [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] end function test_factor_factor() @test factor(147573952589676412927) == Dict{BigInt,Int}(193707721 => 1, 761838257287 => 1) @test factor((2^31-1)...
[ 27, 7856, 261, 480, 29, 16305, 323, 417, 14, 44687, 12135, 13, 20362, 198, 8818, 1332, 62, 31412, 62, 271, 25833, 23415, 3419, 198, 220, 220, 220, 2488, 9288, 1064, 26933, 271, 25833, 23415, 7, 72, 8, 329, 1312, 287, 352, 25, 3064, ...
2.244926
2,217
<filename>src/geointerface.jl let pointtypes = (GDAL.wkbPoint, GDAL.wkbPoint25D, GDAL.wkbPointM, GDAL.wkbPointZM), multipointtypes = (GDAL.wkbMultiPoint, GDAL.wkbMultiPoint25D, GDAL.wkbMultiPointM, GDAL.wkbMultiPointZM), linetypes = (GDAL.wkbLineString, GDAL.wkbLineString25D, GDAL.wkbLineStringM...
[ 27, 34345, 29, 10677, 14, 469, 78, 39994, 13, 20362, 198, 1616, 966, 19199, 796, 357, 45113, 1847, 13, 86, 32812, 12727, 11, 27044, 1847, 13, 86, 32812, 12727, 1495, 35, 11, 27044, 1847, 13, 86, 32812, 12727, 44, 11, 198, 220, 220, ...
1.98802
1,419
<filename>test/runtests.jl using LabDataSources using Test @testset "LabDataSources.jl" begin # Write your tests here. end
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 3498, 6601, 21188, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 17822, 6601, 21188, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437,...
2.909091
44
<reponame>gragusa/Factotum using Factotum, Statistics, LinearAlgebra, Test T, n, r = (200, 10, 6) x = rand(T,n) # generate data fm = Factotum.FactorModel(x, 6; scale = true) # fit factor model F = Factotum.factors(fm) Λ = Factotum.loadings(fm) σ = Factotum.sdev(fm) ## Check diagonality cov(F) Σ ...
[ 27, 7856, 261, 480, 29, 2164, 363, 22064, 14, 29054, 313, 388, 198, 3500, 19020, 313, 388, 11, 14370, 11, 44800, 2348, 29230, 11, 6208, 198, 51, 11, 299, 11, 374, 796, 357, 2167, 11, 838, 11, 718, 8, 198, 87, 796, 43720, 7, 51, ...
2.182039
412
function create_subgraph(vertex_set::AbstractArray,edge_list::AbstractArray,directed::Bool) new_graph = graph(Int64[],ExEdge{Int64}[],is_directed = directed) vertex_set_d = Dict() for vertex in vertex_set add_vertex!(new_graph,vertex) vertex_set_d[vertex] = 1 end for edge in edge_list if (haskey(v...
[ 8818, 2251, 62, 7266, 34960, 7, 332, 16886, 62, 2617, 3712, 23839, 19182, 11, 14907, 62, 4868, 3712, 23839, 19182, 11, 34762, 3712, 33, 970, 8, 198, 220, 649, 62, 34960, 796, 4823, 7, 5317, 2414, 58, 4357, 3109, 37021, 90, 5317, 241...
2.184765
617
<reponame>sonosole/Delta export Chain export popitems """ Chain(blocks...) Chain multiple blocks / functions together, so that they are called in sequence on a given input. `Chain` also supports indexing and slicing, e.g. `c[2]` or `c[1:3]` or c[[1,3]]. # Examples julia> m = Chain(Dense(256,128), lstm(128,64...
[ 27, 7856, 261, 480, 29, 1559, 418, 2305, 14, 42430, 198, 39344, 21853, 198, 39344, 1461, 23814, 198, 198, 37811, 198, 220, 220, 220, 21853, 7, 27372, 23029, 198, 198, 35491, 3294, 7021, 1220, 5499, 1978, 11, 523, 326, 484, 389, 1444, ...
2.168285
1,545
using Distributions, StatsBase, Parameters, LinearAlgebra, DataStructures, PyPlot, Random import Base: isless include("parameters.jl") include("rand_engine_model.jl") include("event_controllers.jl") include("views.jl")
[ 3500, 46567, 507, 11, 20595, 14881, 11, 40117, 11, 44800, 2348, 29230, 11, 6060, 44909, 942, 11, 9485, 43328, 11, 14534, 198, 198, 11748, 7308, 25, 318, 1203, 198, 198, 17256, 7203, 17143, 7307, 13, 20362, 4943, 198, 17256, 7203, 25192,...
3.384615
65
<reponame>mipals/SymEGRSSMatrices struct SymEGRQSCholesky{T,UT<:AbstractMatrix,WT<:AbstractMatrix,dT<:AbstractArray} <: AbstractMatrix{T} Ut::UT Wt::WT d::dT n::Int p::Int function SymEGRQSCholesky{T,UT,WT,dT}(Ut,Wt,d,n,p) where {T,UT<:AbstractMatrix,WT<:AbstractMatrix,dT<:AbstractArray} Up, Un = ...
[ 27, 7856, 261, 480, 29, 76, 541, 874, 14, 43094, 7156, 49, 5432, 19044, 45977, 198, 7249, 15845, 7156, 49, 48, 50, 1925, 4316, 2584, 90, 51, 11, 3843, 27, 25, 23839, 46912, 11, 39386, 27, 25, 23839, 46912, 11, 67, 51, 27, 25, 23...
1.962113
3,616
<gh_stars>0 # Julia wrapper for header: /usr/include/scip/pub_relax.h # Automatically generated using Clang.jl wrap_c function SCIPrelaxComp(elem1, elem2) ccall((:SCIPrelaxComp, libscip), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), elem1, elem2) end function SCIPrelaxCompName(elem1, elem2) ccall((:SCIPrelaxCompName, lib...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 22300, 29908, 329, 13639, 25, 1220, 14629, 14, 17256, 14, 1416, 541, 14, 12984, 62, 2411, 897, 13, 71, 198, 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 628, 198, 8818, 6374,...
2.281167
754
<reponame>UnofficialJuliaMirrorSnapshots/Gadfly.jl-c91e804a-d5a3-530f-b6f0-dfbca275c004 using RDatasets, DataFrames, Gadfly set_default_plot_size(6inch, 3inch) df = dataset("plm", "Cigar") df = df[df.State .== 1, :] ymin = df.Sales .- 20*0.23603334566204692 ymax = df.Sales .+ 20*0.34651701419196046 plot(df, x="Year"...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 38, 324, 12254, 13, 20362, 12, 66, 6420, 68, 36088, 64, 12, 67, 20, 64, 18, 12, 38612, 69, 12, 65, 21, 69, 15, 12, 7568, 65, 6888, 23195, 66, 22914,...
2.092391
184
<filename>src/multivariate/MvBrownianMotion.jl immutable MvBrownianMotion{Cov<:AbstractPDMat} <: ContinuousMultivariateStochasticProcess timepoints::Vector{Float64} npoints::Int64 Σ::Cov function MvBrownianMotion{Cov<:AbstractPDMat}(t::Vector{Float64}, n::Int64, Σ::Cov) t[1] > 0.0 || error("First provided ...
[ 27, 34345, 29, 10677, 14, 16680, 42524, 14, 44, 85, 20644, 666, 45740, 13, 20362, 198, 8608, 18187, 337, 85, 20644, 666, 45740, 90, 34, 709, 27, 25, 23839, 5760, 19044, 92, 1279, 25, 45012, 15205, 42524, 1273, 5374, 3477, 18709, 198, ...
2.857143
217
""" ```ϵ_hole_layers(x, y, ps, interstice = 0.5, hole = 0.75)``` return the permittivity of a unit-cell which consists of air holes in silica Arguments: - ps : widths of the air holes (need to be unit-less) - refractive_indexes : optional argument with refractive indexes of background, hole and substrate. For referen...
[ 37811, 198, 15506, 63, 139, 113, 62, 13207, 62, 75, 6962, 7, 87, 11, 331, 11, 26692, 11, 987, 43788, 796, 657, 13, 20, 11, 7604, 796, 657, 13, 2425, 8, 15506, 63, 198, 7783, 262, 9943, 715, 3458, 286, 257, 4326, 12, 3846, 543, ...
2.457361
2,486
<filename>benchmarks/benchmark_trust_regions.jl using Manifolds, Manopt, BenchmarkTools, Test include("../test/solvers/trust_region_model.jl") n = size(A, 1) p = 2 N = Grassmann(n, p) M = PowerManifold(N, ArrayPowerRepresentation(), 2) x = random_point(M) x_opt = trust_regions(M, cost, rgrad, rhess, x; max_trust_re...
[ 27, 34345, 29, 26968, 14306, 14, 26968, 4102, 62, 38087, 62, 2301, 507, 13, 20362, 198, 198, 3500, 1869, 361, 10119, 11, 1869, 8738, 11, 25187, 4102, 33637, 11, 6208, 198, 198, 17256, 7203, 40720, 9288, 14, 34453, 690, 14, 38087, 62, ...
2.269978
463
include(joinpath(@__DIR__, "example_data.jl"))
[ 17256, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 20688, 62, 7890, 13, 20362, 48774, 198 ]
2.611111
18
<reponame>JuliaTagBot/GLVisualize.jl using GLVisualize include(GLVisualize.dir("examples", "ExampleRunner.jl")) using ExampleRunner import ExampleRunner: flatten_paths files = [ "introduction/rotate_robj.jl", "introduction/screens.jl", "plots/3dplots.jl", "plots/lines_scatter.jl", "plots/hybrid.jl"...
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 8763, 36259, 1096, 13, 20362, 198, 3500, 10188, 36259, 1096, 198, 17256, 7, 8763, 36259, 1096, 13, 15908, 7203, 1069, 12629, 1600, 366, 16281, 49493, 13, 20362, 48774, 198, 3500, 179...
2.533654
416
<reponame>OTDE/RenderingGeometry.jl export Vector2, Vector2i, Vector2f, Vector2s, Vector2d, Point2, Point2i, Point2f, Point2s, Point2d, Vector3, Vector3i, Vector3f, Vector3s, Vector3d, Point3, Point3i, Point3f, Point3s, Point3d, Normal3, Normal3i, Normal3f, Normal3s, Normal3d const CartesianPair{T,U} = CartesianTuple{...
[ 27, 7856, 261, 480, 29, 2394, 7206, 14, 49, 437, 1586, 10082, 15748, 13, 20362, 198, 39344, 198, 38469, 17, 11, 20650, 17, 72, 11, 20650, 17, 69, 11, 20650, 17, 82, 11, 20650, 17, 67, 11, 198, 12727, 17, 11, 6252, 17, 72, 11, ...
2.145833
480
## ExoplanetsSysSim/src/limb_darkening.jl ## (c) 2015 <NAME> abstract LimbDarkeningParamAbstract immutable LimbDarkeningParamQuadratic <: LimbDarkeningParamAbstract u1::Float64 u2::Float64 # Demo of how to enforce constraints on parameter when constructing class # TODO SCI DETAIL: Repalce with sensible limits...
[ 2235, 1475, 46853, 1039, 44387, 8890, 14, 10677, 14, 2475, 65, 62, 21953, 3101, 13, 20362, 198, 2235, 357, 66, 8, 1853, 1279, 20608, 29, 198, 198, 397, 8709, 7576, 65, 17367, 3101, 22973, 23839, 198, 198, 8608, 18187, 7576, 65, 17367,...
2.68
200
p = random_micrm_params(2,2,0.5) #convert to micrm_params p_struct = micrm_params(p) u0 = ones(4) tspan = (0.0,1.0) prob = ODEProblem(MiCRM.dx!,u0,tspan,p_struct) sol = solve(prob)
[ 79, 796, 4738, 62, 9383, 26224, 62, 37266, 7, 17, 11, 17, 11, 15, 13, 20, 8, 198, 198, 2, 1102, 1851, 284, 12314, 26224, 62, 37266, 198, 79, 62, 7249, 796, 12314, 26224, 62, 37266, 7, 79, 8, 198, 198, 84, 15, 796, 3392, 7, 1...
1.956989
93
<filename>src/Network/NetworkWatcherClient/model_ConnectionMonitorTestGroup.jl<gh_stars>10-100 # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct ConnectionMonitorTestGroup <: SwaggerModel name::Any # spec type...
[ 27, 34345, 29, 10677, 14, 26245, 14, 26245, 54, 34734, 11792, 14, 19849, 62, 32048, 35479, 14402, 13247, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, ...
3.387778
900
<gh_stars>100-1000 using Gadfly set_default_plot_size(6inch, 3inch) closure(a) = [x -> a[i]*x for i in 1:length(a)] plot(closure(1:2), 0, 2π, Scale.y_log10())
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 20925, 12254, 198, 198, 2617, 62, 12286, 62, 29487, 62, 7857, 7, 21, 8589, 11, 513, 8589, 8, 198, 198, 17966, 7, 64, 8, 796, 685, 87, 4613, 257, 58, 72, 60, 9, 87, 329, 1312,...
2.146667
75
<reponame>mikelehu/IRKGL16.jl<gh_stars>10-100 mutable struct tcoeffs{T} mu::Array{T,2} hc::Array{T,1} hb::Array{T,1} nu::Array{T,2} alpha::Array{T,2} end mutable struct tcache{uType,elTypeu,uLowType,low_prec_type} U::Array{uType,1} Uz::Array{uType,1} L::Array{uType,1} Lz::Array{uType,1} ...
[ 27, 7856, 261, 480, 29, 76, 522, 293, 13415, 14, 4663, 42, 8763, 1433, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 198, 76, 18187, 2878, 256, 1073, 14822, 82, 90, 51, 92, 198, 220, 220, 220, 220, 220, 220, 38779, 3712...
1.490036
28,102
<gh_stars>10-100 immutable CacheStack{T} size::Int stack::Vector{T} end typealias CacheStackT{T} Type{CacheStack{T}} (::CacheStackT{T}){T}(size = 1) = CacheStack{T}(size, T[]) function touch!{T}(c::CacheStack{T}, x::T) isloaded(x) && return x if isempty(c.stack) push!(c.stack, x) elseif c.stack[1] === ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 8608, 18187, 34088, 25896, 90, 51, 92, 198, 220, 2546, 3712, 5317, 198, 220, 8931, 3712, 38469, 90, 51, 92, 198, 437, 198, 198, 4906, 26011, 34088, 25896, 51, 90, 51, 92, 5994, 90, 30562...
2.394517
839
include("src/CellularAutomata.jl") ### EXAMPLE 1: RULE 178 ### # push iterations into this array automaton = [] # initial configuration iter = bitrand(100) push!(automaton, copy(iter)) # construct graph g = LightGraphs.grid([length(iter), 1], periodic=true) # run and display automaton for i in 1:100 global it...
[ 17256, 7203, 10677, 14, 28780, 934, 38062, 1045, 13, 20362, 4943, 628, 198, 21017, 7788, 2390, 16437, 352, 25, 371, 24212, 27368, 44386, 198, 198, 2, 4574, 34820, 656, 428, 7177, 198, 2306, 296, 13951, 796, 17635, 198, 198, 2, 4238, 8...
2.640559
715