content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
struct NullParameters end struct NonlinearProblem{uType,isinplace,P,F,K} <: AbstractNonlinearProblem{uType,isinplace} f::F u0::uType p::P kwargs::K @add_kwonly function NonlinearProblem{iip}(f,u0,p=NullParameters();kwargs...) where iip new{typeof(u0),iip,typeof(p),typeof(f),typeof(kwargs)}(...
[ 7249, 35886, 48944, 886, 198, 198, 7249, 8504, 29127, 40781, 90, 84, 6030, 11, 45763, 5372, 11, 47, 11, 37, 11, 42, 92, 1279, 25, 27741, 15419, 29127, 40781, 90, 84, 6030, 11, 45763, 5372, 92, 198, 220, 220, 220, 277, 3712, 37, 19...
2.315436
1,043
<filename>src/sampling.jl """ ``` sample_points_on_ellipse(A::Real, B::Real, H::Real, K::Real, τ::Real, N::Integer, α₁::Real, α₂::Real) ``` Samples N data points in the angle range [α₁, α₂] for an ellipse specified by semi-major (A) semi-minor (B) axes, centroid (H,K) and orientation (τ). All angles are as...
[ 27, 34345, 29, 10677, 14, 37687, 11347, 13, 20362, 198, 37811, 198, 15506, 63, 198, 220, 220, 220, 6291, 62, 13033, 62, 261, 62, 695, 541, 325, 7, 32, 3712, 15633, 11, 347, 3712, 15633, 11, 367, 3712, 15633, 11, 509, 3712, 15633, ...
2.031863
408
# We have to be able to handle illegal and unexpected things s = """ 1=1 """ msgs = lintstr(s) @test msgs[1].code == :I171 @test contains(msgs[1].message, "LHS in assignment not understood by Lint") s = """ local 5 """ msgs = lintstr(s) @test msgs[1].code == :E135 @test msgs[1].variable == "5" @test contains(msgs[1].m...
[ 2, 775, 423, 284, 307, 1498, 284, 5412, 5293, 290, 10059, 1243, 198, 82, 796, 37227, 198, 16, 28, 16, 198, 37811, 198, 907, 14542, 796, 300, 600, 2536, 7, 82, 8, 198, 31, 9288, 13845, 14542, 58, 16, 4083, 8189, 6624, 1058, 40, 2...
2.457386
352
<gh_stars>10-100 # # # These methods are for testing purposes only. # They are not optimized at all. # # """ Calculates `B_M B_M-1 ... B_1` and stabilizes the matrix products by intermediate matrix decompositions. Assumes that the input `Bs` are ordered as `[B_1, B_2, ..., B_M]`. """ function calc_Bchain_svd(Bs; ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 198, 2, 198, 2, 220, 220, 2312, 5050, 389, 329, 4856, 4959, 691, 13, 198, 2, 220, 220, 1119, 389, 407, 23392, 379, 477, 13, 198, 2, 198, 2, 628, 198, 37811, 198, 9771, 3129, 689, ...
1.827105
1,793
X = Interval(0,1) ll = LazyBox(Dict(1=>Interval(0,1))) ll[3] @test domaineq(ll[3],Interval(0,1)) @test ndims(ll) == 2 ll[5] @test ndims(ll) == 3 ll[5] @test ndims(ll) == 3 @test length(convert(Vector{Interval},ll)) == ndims(ll) @test length(convert(Vector{Interval},ll,[1,2])) == 2 l1 = LazyBox(Float64) l1[1] l1[2] = ...
[ 55, 796, 4225, 2100, 7, 15, 11, 16, 8, 198, 297, 796, 406, 12582, 14253, 7, 35, 713, 7, 16, 14804, 9492, 2100, 7, 15, 11, 16, 22305, 198, 297, 58, 18, 60, 198, 31, 9288, 2401, 5718, 80, 7, 297, 58, 18, 4357, 9492, 2100, 7, ...
1.993994
333
<reponame>grenkoca/JuliaTutorials # ------------------------------------------------------------------------------------------ # # Julia is fast # (Originally from https://juliabox.com under tutorials/intro-to-julia/short- # version/05.Julia_is_fast.ipynb) # # Very often, benchmarks are used to compare languages. Thes...
[ 27, 7856, 261, 480, 29, 32762, 74, 11216, 14, 16980, 544, 51, 44917, 82, 198, 2, 16529, 22369, 438, 198, 2, 1303, 22300, 318, 3049, 198, 2, 357, 22731, 422, 3740, 1378, 73, 32176, 397, 1140, 13, 785, 739, 27992, 14, 600, 305, 12, ...
3.734609
2,404
using Test using NeXLSpectrum using NeXLCore using Statistics using Distributions @testset "Spectrum" begin les = LinearEnergyScale(-495.0, 5.0) @testset "Energy Scale" begin @test NeXLSpectrum.energy(200, les) == -495.0 + 5.0 * (200 - 1) @test NeXLSpectrum.energy(1, les) == -495.0 + 5.0 * (1 ...
[ 3500, 6208, 198, 3500, 3169, 55, 6561, 806, 6582, 198, 3500, 3169, 55, 5639, 382, 198, 3500, 14370, 198, 3500, 46567, 507, 198, 198, 31, 9288, 2617, 366, 49738, 6582, 1, 2221, 198, 220, 220, 220, 10287, 796, 44800, 28925, 29990, 32590...
1.824168
4,146
<filename>src/Plots_scripts/PaperFigures.jl include("filtering.jl"); gr(size=(600,600), tick_orientation = :out, grid = false, linecolor = :black, markerstrokecolor = :black, thickness_scaling = 2, markersize = 6) ################################ Adjust Streaks table ################################## l...
[ 27, 34345, 29, 10677, 14, 3646, 1747, 62, 46521, 14, 42950, 14989, 942, 13, 20362, 198, 17256, 7203, 10379, 20212, 13, 20362, 15341, 198, 2164, 7, 7857, 16193, 8054, 11, 8054, 828, 4378, 62, 13989, 341, 796, 1058, 448, 11, 10706, 796,...
2.36445
9,277
<gh_stars>0 using VLKeggSDK using DataFrames using ProgressMeter using BSON # setup list of reactions - rn_number_array = [ # upper glycolysis - "rn:R00299" # 1 "rn:R00771" # 2 "rn:R00756" # 3 "rn:R00762" # 4 "rn:R01068" # 5 "rn:R01015" # 6 "rn:R01061" # 7 "rn:R01512" # 8 "rn:R...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 569, 43, 8896, 1130, 10305, 42, 198, 3500, 6060, 35439, 198, 3500, 18387, 44, 2357, 198, 3500, 347, 11782, 198, 198, 2, 9058, 1351, 286, 12737, 532, 198, 35906, 62, 17618, 62, 18747, 796, 685, ...
2.266886
1,821
<reponame>jpgmolina/DS-Julia2925 @testset "flatland" begin import DSJulia.Flatland @testset "rectangle" begin rect = Flatland.Rectangle((1, 1), l=2, w=2) square = Flatland.Square((2.0, 1), l=2) @test Flatland.ncorners(rect) == Flatland.ncorners(square) == 4 @test Flatland.cen...
[ 27, 7856, 261, 480, 29, 9479, 43132, 1437, 14, 5258, 12, 16980, 544, 1959, 1495, 628, 198, 31, 9288, 2617, 366, 38568, 1044, 1, 2221, 198, 220, 220, 220, 1330, 17400, 16980, 544, 13, 7414, 265, 1044, 628, 220, 220, 220, 2488, 9288, ...
1.949695
1,312
# should be reimplement as macros by using Julia 1.5's @ccall macro function igText(text) ccall((:igText, libcimgui), Cvoid, (Cstring, Cstring), "%s", text) end function igTextColored(col, text) ccall((:igTextColored, libcimgui), Cvoid, (ImVec4, Cstring), col, text) end function igTextDisabled(text) ccall...
[ 2, 815, 307, 21123, 26908, 355, 34749, 416, 1262, 22300, 352, 13, 20, 338, 2488, 535, 439, 15021, 198, 8818, 45329, 8206, 7, 5239, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 328, 8206, 11, 9195, 66, 320, 48317, 828, 327, 19382, ...
2.475279
627
using SirenSeq using Base.Test module TestNames testC = 0 nextName = "dummy" testName(name::AbstractString) = ( global testC += 1 ; global nextName = name ; testC ) handler(r::Test.Success) = println("test $(testC): success") handler(r::Test.Failure) = println("test $(testC): FAILURE!\n $(nextName)") handler(r...
[ 3500, 43904, 4653, 80, 198, 3500, 7308, 13, 14402, 628, 198, 21412, 6208, 36690, 198, 198, 9288, 34, 796, 657, 198, 19545, 5376, 796, 366, 67, 13513, 1, 198, 9288, 5376, 7, 3672, 3712, 23839, 10100, 8, 796, 357, 3298, 1332, 34, 1585...
2.18356
1,618
<gh_stars>10-100 # # error messages: # SOM_ERRORS = Dict( :ERR_MPL => """ Matplotlib is not correctly installed! See the documentation at https://andreasdominik.github.io/SOM.jl/stable/ for details and potential solutions. """, :ERR_MATRIX => """ Input data is not a numerical 2D-matrix! Please pro...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 198, 2, 4049, 6218, 25, 198, 2, 198, 50, 2662, 62, 24908, 50, 796, 360, 713, 7, 198, 25, 1137, 49, 62, 44, 6489, 5218, 198, 37811, 198, 220, 220, 220, 6550, 29487, 8019, 318, 407,...
2.83908
261
<reponame>nlw0/Yggdrasil # Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder, Pkg name = "COSMA" version = v"2.2.0" # Collection of sources required to complete build sources = [ ArchiveSource("https://github.co...
[ 27, 7856, 261, 480, 29, 21283, 86, 15, 14, 56, 1130, 7109, 292, 346, 198, 2, 5740, 326, 428, 4226, 460, 2453, 617, 3614, 3141, 12, 1370, 7159, 11, 1057, 198, 2, 4600, 73, 43640, 1382, 62, 18870, 21591, 13, 20362, 1377, 16794, 63, ...
2.2737
1,308
using Random using StatsBase using Distributions using DataStructures using LsqFit ############################################################################### ############################################################################### ### spread in mean-field population with offsprings generated by conditiona...
[ 3500, 14534, 198, 3500, 20595, 14881, 198, 3500, 46567, 507, 198, 3500, 6060, 44909, 942, 198, 198, 3500, 406, 31166, 31805, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 29113, 29113, 7804, 4242, 21017, 198, 21017, 4104, 287, 1612, 12,...
2.691772
6,745
# Author: <NAME>, <EMAIL> # Date: 06/25/2014 module SISLES export CorrAEM, LLAEM, CorrAEMDBN, StarDBN, SideOnDBN, PairwiseCorrAEMDBN, SimplePilotResponse, StochasticLinearPR, LLDetPR, SimpleADM, LLADM, AirSpace, SimpleTCASSensor, ACASXSensor...
[ 2, 6434, 25, 1279, 20608, 22330, 1279, 27630, 4146, 29, 201, 198, 2, 7536, 25, 9130, 14, 1495, 14, 4967, 201, 198, 201, 198, 201, 198, 21412, 311, 1797, 28378, 201, 198, 201, 198, 39344, 201, 198, 220, 220, 220, 2744, 81, 32, 3620...
2.356835
1,390
using DiscreteAdjoint, OrdinaryDiffEq, ForwardDiff using Test @testset "DiscreteAdjoint.jl" begin function f(du, u, p, t) du[1] = dx = p[1]*u[1] - p[2]*u[1]*u[2] du[2] = dy = -p[3]*u[2] + p[4]*u[1]*u[2] end p = [1.5,1.0,3.0,1.0]; tspan = (0.0, 10.0); u0 = [1.0,1.0]; prob = ODEProb...
[ 3500, 8444, 8374, 2782, 73, 1563, 11, 14230, 3219, 28813, 36, 80, 11, 19530, 28813, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 15642, 8374, 2782, 73, 1563, 13, 20362, 1, 2221, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2163, ...
1.774747
990
struct LJRefParam <: EoSParam epsilon::PairParam{Float64} sigma::PairParam{Float64} Mw::SingleParam{Float64} end struct LJRefConsts <: EoSParam n::Vector{Float64} t::Vector{Float64} d::Vector{Int} c::Vector{Int} beta::Vector{Float64} gamma::Vector{Float64} eta::Vector{Float64} ...
[ 7249, 406, 41, 8134, 22973, 1279, 25, 412, 78, 4303, 41158, 198, 220, 220, 220, 304, 862, 33576, 3712, 47, 958, 22973, 90, 43879, 2414, 92, 198, 220, 220, 220, 264, 13495, 3712, 47, 958, 22973, 90, 43879, 2414, 92, 198, 220, 220, ...
1.577433
4,378
<reponame>biona001/GeneticVariation.jl module TestGeneticVariation using Test import BioCore.Testing: get_bio_fmt_specimens, random_seq, random_interval import BioCore.Exceptions.MissingFieldException using BioSequences, GeneticVariation import BufferedStreams: BufferedInputStream import IntervalTrees: In...
[ 27, 7856, 261, 480, 29, 65, 32792, 8298, 14, 13746, 5139, 23907, 341, 13, 20362, 198, 21412, 6208, 13746, 5139, 23907, 341, 198, 198, 3500, 6208, 198, 198, 11748, 16024, 14055, 13, 44154, 25, 198, 220, 220, 220, 651, 62, 65, 952, 62...
2.684385
301
module ExtensibleEffects export effect, noeffect, NoEffect, runhandlers, @runhandlers, @insert_into_runhandlers, @syntax_eff, @syntax_eff_noautorun, noautorun, WriterHandler, ContextManagerHandler, @runcontextmanager, @runcontextmanager_, ContextManagerCombinedHandler, CallableHandler, @runcallable, # Call...
[ 21412, 5683, 27339, 47738, 198, 39344, 1245, 11, 645, 10760, 11, 1400, 18610, 11, 198, 220, 1057, 4993, 8116, 11, 2488, 5143, 4993, 8116, 11, 198, 220, 2488, 28463, 62, 20424, 62, 5143, 4993, 8116, 11, 198, 220, 2488, 1837, 41641, 62,...
3.141631
233
<filename>src/utils.jl "Check if formula contains a predicate name." has_pred(formula::Const, pred_names) = formula.name in pred_names has_pred(formula::Var, pred_names) = false has_pred(formula::Compound, pred_names) = formula.name in pred_names || any(has_pred(f, pred_names) for f in formula.args) has_pred(formul...
[ 27, 34345, 29, 10677, 14, 26791, 13, 20362, 198, 1, 9787, 611, 10451, 4909, 257, 44010, 1438, 526, 198, 10134, 62, 28764, 7, 687, 4712, 3712, 34184, 11, 2747, 62, 14933, 8, 796, 10451, 13, 3672, 287, 2747, 62, 14933, 198, 10134, 62,...
2.513574
2,247
<gh_stars>0 @doc raw""" PositiveNumbers <: Manifold{ℝ} The hyperbolic manifold of positive numbers $H^1$ is a the hyperbolic manifold represented by just positive numbers. # Constructor PositiveNumbers() Generate the `ℝ`-valued hyperbolic model represented by positive positive numbers. To use this with arra...
[ 27, 456, 62, 30783, 29, 15, 198, 31, 15390, 8246, 37811, 198, 220, 220, 220, 33733, 49601, 1279, 25, 1869, 361, 727, 90, 158, 226, 251, 92, 198, 198, 464, 8718, 65, 4160, 48048, 286, 3967, 3146, 720, 39, 61, 16, 3, 318, 257, 262...
2.531171
2,775
<gh_stars>0 include("base_extension_structs.jl") include("single_qubit_gates.jl") include("multi_qubit_gates.jl")
[ 27, 456, 62, 30783, 29, 15, 198, 17256, 7203, 8692, 62, 2302, 3004, 62, 7249, 82, 13, 20362, 4943, 198, 17256, 7203, 29762, 62, 421, 2545, 62, 70, 689, 13, 20362, 4943, 198, 17256, 7203, 41684, 62, 421, 2545, 62, 70, 689, 13, 2036...
2.478261
46
#------------------------------ # functions to define and manipulate ODE-VAE model #------------------------------ #------------------------------ # ODE systems #------------------------------ # Linear function linear_2d_system(du,u,p,t) a11, a12, a21, a22 = p z1,z2 = u du[1] = dz1 = a11 * z1 + a12 * z2...
[ 2, 1783, 26171, 198, 2, 5499, 284, 8160, 290, 18510, 440, 7206, 12, 11731, 36, 2746, 220, 198, 2, 1783, 26171, 198, 198, 2, 1783, 26171, 198, 2, 440, 7206, 3341, 198, 2, 1783, 26171, 198, 198, 2, 44800, 220, 198, 8818, 14174, 62, ...
2.212213
1,654
<reponame>Gnimuc/Videre using CSFML.LibCSFML using ModernGL using CSyntax using CSyntax.CSwitch # shader sources const vert_source = """ #version 150 core in vec2 position; in vec3 color; out vec3 Color; void main() { Color = color; gl_Position = vec4(position, 0.0, 1.0); }"...
[ 27, 7856, 261, 480, 29, 38, 77, 320, 1229, 14, 53, 485, 260, 198, 3500, 9429, 34708, 13, 25835, 7902, 34708, 198, 3500, 12495, 8763, 198, 3500, 9429, 33567, 897, 198, 3500, 9429, 33567, 897, 13, 7902, 42248, 198, 198, 2, 33030, 4237...
2.361311
1,251
### ### Copying ### ### ### Copying methods for biological sequences. ### ### This file is a part of BioJulia. ### License is MIT: https://github.com/BioJulia/BioSequences.jl/blob/master/LICENSE.md # TODO: Add generic emethods for other bioseqs like mers and refseqs ########## """ copy!(dst::LongSequence, src::Bio...
[ 21017, 198, 21017, 6955, 1112, 198, 21017, 198, 21017, 198, 21017, 6955, 1112, 5050, 329, 10685, 16311, 13, 198, 21017, 198, 21017, 770, 2393, 318, 257, 636, 286, 16024, 16980, 544, 13, 198, 21017, 13789, 318, 17168, 25, 3740, 1378, 125...
2.300041
4,836
<reponame>IsaacRudich/PnB_SOP struct ExtensionalArcFunction{T<:Real} components ::Dict{Tuple{Int, Int}, T} end struct ExtensionalArcObjective<:ObjectiveFunction f ::ExtensionalArcFunction type ::ObjectiveType end """ evaluateDecision(obj::ExtensionalArcObjective, i1::Int, i2::Int...
[ 27, 7856, 261, 480, 29, 39443, 330, 49, 463, 488, 14, 47, 77, 33, 62, 50, 3185, 198, 7249, 5683, 37176, 24021, 22203, 90, 51, 27, 25, 15633, 92, 198, 220, 220, 220, 6805, 220, 220, 220, 220, 220, 7904, 35, 713, 90, 51, 29291, ...
2.786885
549
""" $(SIGNATURES) Abstract type for admissions rules. Not a ModelObject. This is combined with an `AbstractAdmProbFct` that potentially contains calibrated parameters. """ abstract type AbstractAdmissionsRule{I1, F1 <: Real} end """ $(SIGNATURES) Abstract type for switches from which admissions rules are construct...
[ 37811, 198, 197, 3, 7, 46224, 47471, 8, 198, 198, 23839, 2099, 329, 25349, 3173, 13, 198, 3673, 257, 9104, 10267, 13, 770, 318, 5929, 351, 281, 4600, 23839, 2782, 76, 2964, 65, 37, 310, 63, 326, 6196, 4909, 48050, 10007, 13, 198, ...
2.439252
1,391
using Base.Test using NPZ, Compat Debug = false tmp = mktempdir() if Debug println("temporary directory: $tmp") end TestArrays = Any[ true, false, @compat(Int8(-42)), @compat(Int16(-42)), @compat(Int32(-42)), @compat(Int64(-42)), @compat(UInt8(42)), @compat(UInt16(42)), @compat(UInt32(42)), @compat(UInt64...
[ 3500, 7308, 13, 14402, 198, 3500, 28498, 57, 11, 3082, 265, 198, 198, 27509, 796, 3991, 198, 198, 22065, 796, 33480, 29510, 15908, 3419, 198, 361, 31687, 198, 197, 35235, 7203, 11498, 5551, 8619, 25, 720, 22065, 4943, 198, 437, 198, 1...
1.994528
731
<filename>src/ParameterProfiles.jl<gh_stars>0 """Functions for constructing parameter profiles""" constantParameter(offset::Real=0.0) = x -> offset export constantParameter constant = constantParameter export constant function heaviside(x::Real, stepOpt::Real=1.0) if x < 0 y = 0 elseif x > 0 y...
[ 27, 34345, 29, 10677, 14, 36301, 15404, 2915, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 24629, 2733, 329, 30580, 11507, 16545, 37811, 198, 9979, 415, 36301, 7, 28968, 3712, 15633, 28, 15, 13, 15, 8, 796, 2124, 4613, 11677, ...
2.503618
2,073
<reponame>bueschgens/RadMod2D using Pkg Pkg.activate(".") Pkg.instantiate() using RadMod2D using GLMakie include("./models2D.jl") include("./plot2D.jl") #### calculation elemsize = 0.01 n = 60 # m = model_circles_in_circle_rand_full(0.1, 1.8, elemsize) # m = model_circles_in_circle_rand_half(0.1, 1.8, elemsize) m =...
[ 27, 7856, 261, 480, 29, 65, 947, 354, 70, 641, 14, 15546, 5841, 17, 35, 198, 3500, 350, 10025, 198, 47, 10025, 13, 39022, 7203, 19570, 198, 47, 10025, 13, 8625, 415, 9386, 3419, 198, 198, 3500, 5325, 5841, 17, 35, 198, 3500, 10188...
2.278723
940
mutable struct EM probA::Float32 probB::Float32 probC::Float32 end EM() = EM(0.5, 0.5, 0.5) """ E_step(self::EM, iter::Int32) -> Float32 返回一个浮点数μ^{i+1} """ function E_step(self::EM, data::Bool) probFromB = self.probA * self.probB^data * (1-self.probB)^(1-data) probSum = probFromB + ...
[ 76, 18187, 2878, 17228, 198, 220, 220, 220, 1861, 32, 3712, 43879, 2624, 198, 220, 220, 220, 1861, 33, 3712, 43879, 2624, 198, 220, 220, 220, 1861, 34, 3712, 43879, 2624, 198, 437, 198, 198, 3620, 3419, 796, 17228, 7, 15, 13, 20, ...
1.858642
1,620
<reponame>simonpea/tsodso_der """ EconomicDispatch(hours, nodes::Nodes, powerplants::PowerPlants, renewables::Renewables, ) Creates an economic dispatch model from power plants and renewables. Solves using JuMP. Returns ED_mod, P_opt, P_R_opt, P_R_opt_dist, price. """ function EconomicDispatch...
[ 27, 7856, 261, 480, 29, 14323, 261, 431, 64, 14, 912, 375, 568, 62, 1082, 198, 37811, 198, 197, 48307, 49354, 7, 24425, 11, 198, 197, 197, 197, 197, 197, 13760, 3712, 45, 4147, 11, 198, 197, 197, 197, 197, 197, 1176, 489, 1187, ...
2.208737
8,676
{"score_count": 73538, "score": 7.62, "timestamp": 1558990020.0} {"score_count": 73512, "score": 7.62, "timestamp": 1558546871.0} {"score_count": 73027, "score": 7.62, "timestamp": 1554165772.0} {"score_count": 73027, "score": 7.62, "timestamp": 1554103252.0} {"score_count": 71978, "score": 7.63, "timestamp": 154466902...
[ 4895, 26675, 62, 9127, 1298, 767, 2327, 2548, 11, 366, 26675, 1298, 767, 13, 5237, 11, 366, 16514, 27823, 1298, 1315, 3365, 2079, 405, 1238, 13, 15, 92, 198, 4895, 26675, 62, 9127, 1298, 767, 2327, 1065, 11, 366, 26675, 1298, 767, 1...
2.331293
1,307
<filename>src/rules/1 Algebraic functions/1.1 Binomial products/.jl include("1.1.1 Linear/.jl") include("1.1.2 Quadratic/.jl") include("1.1.3 General/.jl") include("1.1.4 Improper/.jl")
[ 27, 34345, 29, 10677, 14, 38785, 14, 16, 978, 29230, 291, 5499, 14, 16, 13, 16, 20828, 49070, 3186, 11757, 20362, 198, 17256, 7203, 16, 13, 16, 13, 16, 44800, 11757, 20362, 4943, 198, 17256, 7203, 16, 13, 16, 13, 17, 20648, 81, 15...
2.547945
73
# println("Dd) Test of the PhotoRecombination module with ASF from an internally generated initial- and final-state multiplet.") # setDefaults("print summary: open", "zzz-PhotoRecombination.sum") setDefaults("method: continuum, asymptotic Coulomb") ## setDefaults("method: continuum, Galerkin") setDefaults("method: no...
[ 198, 2, 198, 35235, 7203, 35, 67, 8, 6208, 286, 262, 5555, 6690, 2381, 1883, 8265, 351, 7054, 37, 422, 281, 20947, 7560, 4238, 12, 290, 2457, 12, 5219, 18540, 1616, 19570, 198, 2, 198, 2617, 7469, 13185, 7203, 4798, 10638, 25, 1280,...
2.292929
495
<reponame>sdobber/BallroomSkatingSystem.jl ## Helper functions """ remove!(a, item) Removes `item` from the collection `a`. """ function remove!(a, item) deleteat!(a, findfirst(==(item), a)) end """ prepare_sums(results, depth) Returns the DataFrame for the calculation of the majority of votes, as well ...
[ 27, 7856, 261, 480, 29, 21282, 672, 527, 14, 23410, 3823, 15739, 803, 11964, 13, 20362, 198, 2235, 5053, 525, 5499, 198, 198, 37811, 198, 220, 220, 220, 4781, 0, 7, 64, 11, 2378, 8, 198, 198, 8413, 5241, 4600, 9186, 63, 422, 262, ...
2.474093
386
<reponame>quendera/EvolveImage # Run all the code up until the variable definitions to load functions to memory using TestImages #You don't need this line when using local files using Images ##### Define the fitness function function fitness(a,b) score = sqrt(512*512-sum((a - b).^2)) return score end # ge...
[ 27, 7856, 261, 480, 29, 421, 2194, 64, 14, 15200, 6442, 5159, 198, 2, 5660, 477, 262, 2438, 510, 1566, 262, 7885, 17336, 284, 3440, 5499, 284, 4088, 198, 198, 3500, 6208, 29398, 1303, 1639, 836, 470, 761, 428, 1627, 618, 1262, 1957,...
2.311377
1,336
using LinearAlgebra include("../ellpla.jl") include("../expmap.jl") x = [0.; 0.; 1.]; a = 1.; b = 1.; c = 1.05; R = Matrix{Float64}(I, 3, 3) point = [0.; 0.; 0.]; normal = [0.; 0.; 1.]; (conpnt, depth, A, B) = ellipsoid_plane_contact(x, a, b, c, R, point, normal) println("--------------------------------------------...
[ 3500, 44800, 2348, 29230, 198, 17256, 7203, 40720, 695, 489, 64, 13, 20362, 4943, 198, 17256, 7203, 40720, 1069, 4426, 499, 13, 20362, 4943, 198, 198, 87, 796, 685, 15, 15089, 657, 15089, 352, 8183, 26, 198, 64, 796, 352, 15089, 198, ...
2.588771
659
<filename>src/rbd-fast_sensitivity.jl<gh_stars>10-100 struct RBDFAST <: GSAMethod num_harmonics::Int end RBDFAST(;num_harmonics = 6) = RBDFAST(num_harmonics) """ Code based on the theory presented in: <NAME>. (2008). Global sensitivity analysis: The primer. Chichester: Wiley, pp. 167-169. and <NAME>, <NA...
[ 27, 34345, 29, 10677, 14, 81, 17457, 12, 7217, 62, 82, 40545, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 7249, 17986, 8068, 11262, 1279, 25, 26681, 2390, 316, 2065, 220, 220, 198, 220, 220, 220, 997, 62, 29155, 38530, ...
2.356777
782
<gh_stars>1-10 @testset "airy" begin @test_throws AmosException airyai(200im) @test_throws AmosException airybi(200) for T in [Float16, Float32, Float64,Complex{Float16}, Complex{Float32},Complex{Float64}] @test airyai(T(1.8)) ≈ 0.0470362168668458052247 @test airyaiprime(T(1.8)) ≈ -0.068524...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 31, 9288, 2617, 366, 13021, 1, 2221, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 49104, 16922, 1633, 88, 1872, 7, 2167, 320, 8, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 49104, 1...
1.796972
6,738
<filename>Chapter06/StructOfArraysPattern/4_nested_struct.jl<gh_stars>100-1000 # What do we do if the struct has a nested structure? using BenchmarkTools, CSV, Statistics using StructArrays struct Fare fare_amount::Float64 extra::Float64 mta_tax::Float64 tip_amount::Float64 tolls_amount::Float64 ...
[ 27, 34345, 29, 14126, 3312, 14, 44909, 5189, 3163, 20477, 47546, 14, 19, 62, 77, 7287, 62, 7249, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 1867, 466, 356, 466, 611, 262, 2878, 468, 257, 28376, 4645, 30, 198, 198,...
2
1,192
""" restriction(submesh, supermesh) Computes the restriction matrix relative to a submesh `submesh` of `supermesh`. The restriction matrix has size `(m,n)`, where m == numcells(submesh) n == numcells(supermesh) It has entries `1` at location `[i,j]` iff cell `i` of submesh equals cell `j` of supermesh. ...
[ 37811, 198, 220, 220, 220, 17504, 7, 7266, 76, 5069, 11, 2208, 76, 5069, 8, 198, 198, 7293, 1769, 262, 17504, 17593, 3585, 284, 257, 850, 76, 5069, 4600, 7266, 76, 5069, 63, 286, 4600, 2385, 16321, 5069, 44646, 198, 198, 464, 17504,...
2.981675
382
<filename>src/Tofu.jl module Tofu export ◻ import LinearAlgebra import REPL togetfield(ex) = ex togetfield(ex::Expr) = if ex.head == :. && ex.args[1] == :g @assert length(ex.args) == 2 :($getfield(g, $(ex.args[2]))) else Expr(ex.head, togetfield.(ex.args)...) end """ @G ex Con...
[ 27, 34345, 29, 10677, 14, 51, 1659, 84, 13, 20362, 198, 21412, 309, 1659, 84, 198, 198, 39344, 24966, 119, 198, 198, 11748, 44800, 2348, 29230, 198, 11748, 45285, 198, 198, 83, 519, 316, 3245, 7, 1069, 8, 796, 409, 198, 83, 519, 3...
1.998255
2,292
<gh_stars>1-10 """ Construct model for HydroGen with FixedOutput Formulation """ function construct_device!( psi_container::PSIContainer, sys::PSY.System, model::DeviceModel{H, FixedOutput}, ::Type{S}, ) where {H <: PSY.HydroGen, S <: PM.AbstractPowerModel} devices = get_available_components(H, sys)...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 42316, 2746, 329, 32116, 13746, 351, 10832, 26410, 5178, 1741, 198, 37811, 198, 8818, 5678, 62, 25202, 0, 7, 198, 220, 220, 220, 46231, 62, 34924, 3712, 3705, 2149, 756, 10613, 1...
2.572931
6,561
<gh_stars>10-100 using DataDeps register(DataDep( "geographic-origin-music", "https://archive.ics.uci.edu/ml/datasets/Geographical+Original+of+Music", "http://archive.ics.uci.edu/ml/machine-learning-databases/00315/Geographical%20Original%20of%20Music.zip", "37bd14730ef7e4786e094421982ad32536298a9d84d875cd35d2...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6060, 12156, 82, 198, 198, 30238, 7, 6601, 12156, 7, 198, 220, 366, 469, 6826, 12, 47103, 12, 28965, 1600, 198, 220, 366, 5450, 1378, 17474, 13, 873, 13, 42008, 13, 15532, 14, 4029...
2.389513
267
# Tests using TaylorModel1 and RTaylorModel1 using TaylorModels using LinearAlgebra: norm using Test const _num_tests = 1000 setformat(:full) function check_containment(ftest, xx::TaylorModelN{N,T,S}, tma::TaylorModelN{N,T,S}) where {N,T,S} xfp = diam.(tma.I) .* (rand(N) .- 0.5) .+ mid(tma.x0) xbf = [big(x...
[ 2, 30307, 1262, 8121, 17633, 16, 290, 11923, 7167, 17633, 16, 198, 198, 3500, 8121, 5841, 1424, 198, 3500, 44800, 2348, 29230, 25, 2593, 198, 3500, 6208, 198, 198, 9979, 4808, 22510, 62, 41989, 796, 8576, 198, 198, 2617, 18982, 7, 25,...
1.761846
4,875
abstract type QuantumVariable{T} <: Convex.AbstractVariable{T} end export ProbabilityVector, DensityMatrix, Choi using Convex: ⪰ include("probability_vectors.jl") include("choi.jl") include("density_matrices.jl")
[ 397, 8709, 2099, 29082, 43015, 90, 51, 92, 1279, 25, 1482, 303, 87, 13, 23839, 43015, 90, 51, 92, 886, 198, 198, 39344, 30873, 1799, 38469, 11, 360, 6377, 46912, 11, 42198, 198, 198, 3500, 1482, 303, 87, 25, 2343, 103, 108, 198, 1...
2.918919
74
<reponame>catawbasam/CapacityExpansion.jl<filename>examples/workflow_example_cep.jl<gh_stars>0 # This file exemplifies the workflow from data input to optimization result generation using CapacityExpansion using Clp ## LOAD DATA ## state="GER_18" # or "GER_18" or "CA_1" or "TX_1" years=[2015] #2016 works for GER_1 and ...
[ 27, 7856, 261, 480, 29, 9246, 707, 12093, 321, 14, 15610, 4355, 16870, 5487, 13, 20362, 27, 34345, 29, 1069, 12629, 14, 1818, 11125, 62, 20688, 62, 344, 79, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 770, 2393, 21433, 6945, 26...
2.912946
896
<reponame>sortie/official-images<filename>test/tests/julia-downloads/container.jl<gh_stars>1000+ # https://github.com/docker-library/julia/pull/6 download("https://google.com") # https://github.com/docker-library/julia/pull/9 if VERSION.major > 0 || (VERSION.major == 0 && VERSION.minor >= 7) # https://github.com/dock...
[ 27, 7856, 261, 480, 29, 30619, 494, 14, 16841, 12, 17566, 27, 34345, 29, 9288, 14, 41989, 14, 73, 43640, 12, 15002, 82, 14, 34924, 13, 20362, 27, 456, 62, 30783, 29, 12825, 10, 198, 2, 3740, 1378, 12567, 13, 785, 14, 45986, 12, ...
2.560694
173
using Test using MPI MPI.Init() function allgatherv_array(A, counts::Vector{Cint}) comm = MPI.COMM_WORLD B = MPI.Allgatherv(A, counts, comm) end comm = MPI.COMM_WORLD size = MPI.Comm_size(comm) rank = MPI.Comm_rank(comm) # Defining this to make ones work for Char Base.one(::Type{Char}) = '\01' for typ in B...
[ 3500, 6208, 198, 3500, 4904, 40, 198, 198, 7378, 40, 13, 31768, 3419, 198, 198, 8818, 477, 70, 1032, 85, 62, 18747, 7, 32, 11, 9853, 3712, 38469, 90, 34, 600, 30072, 198, 220, 220, 220, 725, 796, 4904, 40, 13, 9858, 44, 62, 4535...
2.147761
670
#= Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed). For example, given the string "([])[]({})", you should return true. Given the string "([)]" or "((()", you should return false. =# #= For a string of brackets to be balanced, it needs to h...
[ 2, 28, 198, 15056, 257, 4731, 286, 2835, 11, 45731, 11, 290, 6616, 1280, 290, 9605, 28103, 11, 1441, 1771, 262, 28103, 389, 12974, 357, 4053, 12, 12214, 737, 198, 198, 1890, 1672, 11, 1813, 262, 4731, 366, 26933, 12962, 21737, 15090, ...
2.390572
594
<reponame>tpght/Manifolds.jl @doc doc""" Euclidean{T<:Tuple} <: Manifold Euclidean vector space $\mathbb R^n$. # Constructor Euclidean(n) generates the $n$-dimensional vector space $\mathbb R^n$. Euclidean(m, n) generates the $mn$-dimensional vector space $\mathbb R^{m \times n}$, whose elements are in...
[ 27, 7856, 261, 480, 29, 34788, 456, 83, 14, 5124, 361, 10119, 13, 20362, 198, 31, 15390, 2205, 37811, 198, 220, 220, 220, 48862, 485, 272, 90, 51, 27, 25, 51, 29291, 92, 1279, 25, 1869, 361, 727, 198, 198, 36, 36616, 485, 272, 1...
2.40245
1,143
<gh_stars>10-100 using StochasticArithmetic using StochasticArithmetic.EFT using Test, Jive using Formatting using LinearAlgebra using Random Random.seed!(42) @onlyonce begin const x1 = [-6.340663515282668472e-01, -1.032478304663339008e+00, -9.398547076618038787e+00, 8.775666080119043144e+00, 8.15...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 520, 5374, 3477, 3163, 29848, 198, 3500, 520, 5374, 3477, 3163, 29848, 13, 36, 9792, 198, 3500, 6208, 11, 449, 425, 198, 3500, 18980, 889, 198, 3500, 44800, 2348, 29230, 198, 3500, 1...
1.616483
12,255
function dden_complete(ygrid, W, eta, Z, mus, sig2; i, j) K = size(W, 2) L0 = size(eta[0], 3) L1 = size(eta[1], 3) L = Dict(0 => L0, 1 => L1) dden = [begin si = sqrt(sig2[i]) dd = 0.0 for k in 1:K ddk = 0.0 z = Z[j, k] for ell in 1...
[ 8818, 288, 6559, 62, 20751, 7, 88, 25928, 11, 370, 11, 2123, 64, 11, 1168, 11, 1928, 11, 43237, 17, 26, 1312, 11, 474, 8, 198, 220, 509, 796, 2546, 7, 54, 11, 362, 8, 198, 220, 406, 15, 796, 2546, 7, 17167, 58, 15, 4357, 513...
1.595618
502
using OptiMode, BenchmarkTools include("mpb_example.jl") # for now, just to load ε⁻¹ H,kz = solve_k(ω,ε⁻¹,Δx,Δy,Δz) @benchmark solve_k($ω,$ε⁻¹,$Δx,$Δy,$Δz) # BenchmarkTools.Trial: # memory estimate: 250.60 MiB # allocs estimate: 147758 # -------------- # minimum time: 1.178 s (0.97% GC) # median time: ...
[ 3500, 13123, 72, 19076, 11, 25187, 4102, 33637, 198, 17256, 7203, 3149, 65, 62, 20688, 13, 20362, 4943, 1303, 329, 783, 11, 655, 284, 3440, 7377, 113, 46256, 119, 126, 117, 198, 198, 39, 11, 74, 89, 796, 8494, 62, 74, 7, 49535, 11...
1.786
1,000
struct Level{Tprice, Tvolume} price::Tprice volume::Tvolume end import Base: isless isless(l1::Level, l2::Level) = isless(l1.price, l2.price) function isunique(v_lev::Array{Level{Tprice,Tvolume},1}) where {Tprice,Tvolume} length(unique([lv.price for lv in v_lev])) == length(v_lev) end
[ 7249, 5684, 90, 51, 20888, 11, 309, 29048, 92, 198, 220, 220, 220, 2756, 3712, 51, 20888, 198, 220, 220, 220, 6115, 3712, 51, 29048, 198, 437, 198, 198, 11748, 7308, 25, 318, 1203, 198, 271, 1203, 7, 75, 16, 3712, 4971, 11, 300, ...
2.459016
122
using MPI using ClimateMachine using Logging using ClimateMachine.Mesh.Topologies using ClimateMachine.Mesh.Grids using ClimateMachine.DGMethods using ClimateMachine.BalanceLaws: update_auxiliary_state! using ClimateMachine.DGMethods.NumericalFluxes using ClimateMachine.DGMethods.FVReconstructions: FVConstant, FVLinear...
[ 3500, 4904, 40, 198, 3500, 13963, 37573, 198, 3500, 5972, 2667, 198, 3500, 13963, 37573, 13, 37031, 13, 9126, 5823, 198, 3500, 13963, 37573, 13, 37031, 13, 8642, 2340, 198, 3500, 13963, 37573, 13, 35, 38, 46202, 198, 3500, 13963, 37573,...
1.85023
7,398
module Distance include("dist.jl") export # Funtion GetDistance, # Types of distances Euclidean, CityBlock, TotalVariation, Chebyshev, Jaccard, BrayCurtis, CosineDist, SpanNormDist end
[ 21412, 34600, 198, 198, 17256, 7203, 17080, 13, 20362, 4943, 198, 198, 39344, 198, 220, 220, 220, 1303, 220, 220, 376, 2797, 295, 198, 220, 220, 220, 3497, 45767, 11, 628, 220, 220, 220, 1303, 220, 220, 24897, 286, 18868, 198, 220, ...
2.205607
107
<reponame>pkofod/SimpleSolve.jl function nlsolve(f, j, x, iterations = 10^5, r_norm = norm, r_abstol = sqrt(eps(eltype(x)))) xnext = x r = f(x) for i = 1:iterations if r_norm(r) <= r_abstol return r, xnext, :success end x = copy(xnext) s = - j(x)\r xnext =...
[ 27, 7856, 261, 480, 29, 79, 74, 1659, 375, 14, 26437, 50, 6442, 13, 20362, 198, 8818, 299, 7278, 6442, 7, 69, 11, 474, 11, 2124, 11, 34820, 796, 838, 61, 20, 11, 374, 62, 27237, 796, 2593, 11, 374, 62, 397, 301, 349, 796, 1986...
1.801587
252
<filename>src/collect_simple.jl using RPOMDPModels, RPOMDPs, RPOMDPToolbox using RobustValueIteration using SimpleProbabilitySets using DataFrames, ProgressMeter, CSV, BenchmarkTools const RPBVI = RobustValueIteration TOL = 1e-6 # intialize problems ip = SimpleIPOMDP(0.8, 0.7, 0.66, 0.85) rip = SimpleRIPOMDP(0.8, 0.7,...
[ 27, 34345, 29, 10677, 14, 33327, 62, 36439, 13, 20362, 198, 3500, 25812, 2662, 6322, 5841, 1424, 11, 25812, 2662, 6322, 82, 11, 25812, 2662, 6322, 25391, 3524, 198, 3500, 3851, 436, 11395, 29993, 341, 198, 3500, 17427, 2964, 65, 1799, ...
2.186139
2,756
using LiquidsStructure using Test const AHS = AttractiveHardSpheres const k∞ = inv(eps()) # large wavevector @testset "Hard disks, Rosenfeld FMT" begin η = 0.1 f = StructureFactor(HardDisks(η), RosenfeldFMT) @test f(0.0) ≈ 0.6604201250395436 @test f(π/2) ≈ 0.7269796280941714 @test f(1π ) ≈ 0.905...
[ 3500, 35515, 2340, 1273, 5620, 198, 3500, 6208, 628, 198, 9979, 317, 7998, 796, 3460, 35587, 17309, 4561, 19079, 198, 9979, 479, 24861, 252, 796, 800, 7, 25386, 28955, 1303, 1588, 6769, 31364, 628, 198, 31, 9288, 2617, 366, 17309, 32505...
1.720344
11,979
<gh_stars>1-10 #fi = "test_22.jl" read_all_lines(fi) = readlines(fi) function read_all_lines(fis::Vector) lins = String[] for fi in fis push!(lins, readlines(fi)...) end lins end function line_no(fi, no) read_all_lines(fi)[no] end function words(fi) wd = String[] for line in read_al...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 12463, 796, 366, 9288, 62, 1828, 13, 20362, 1, 198, 961, 62, 439, 62, 6615, 7, 12463, 8, 796, 1100, 6615, 7, 12463, 8, 198, 8818, 1100, 62, 439, 62, 6615, 7, 69, 271, 3712, 38469, ...
1.892486
1,637
# ------------------------------------------------------------------ # Licensed under the MIT License. See LICENSE in the project root. # ------------------------------------------------------------------ """ supportfun(geometry, direction) Support function of `geometry` for given `direction`. ## References * <...
[ 2, 16529, 438, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 287, 262, 1628, 6808, 13, 198, 2, 16529, 438, 198, 198, 37811, 198, 220, 220, 220, 1104, 12543, 7, 469, 15748, 11, 4571, 8, 198, 198, 15514, 2163, 286, ...
3.21875
224
<filename>src/dataParsing.jl<gh_stars>0 using Statistics using LaTeXStrings using Measures using Plots using Plots.PlotMeasures gr() dropmean(A; dims=:) = dropdims(mean(A; dims=dims); dims=dims) dropstd(A; dims=:) = dropdims(std(A; dims=dims); dims=dims) # @userplot Ucurve # @recipe function f(u::Ucurve) # x,y...
[ 27, 34345, 29, 10677, 14, 7890, 47, 945, 278, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 198, 3500, 14370, 198, 3500, 4689, 49568, 13290, 654, 198, 3500, 45040, 198, 3500, 1345, 1747, 198, 3500, 1345, 1747, 13, 43328, 5308, 13846, ...
2.03076
1,658
using Cement_Hydration using Test @testset "Cement_Hydration.jl" begin # Write your tests here. end
[ 3500, 327, 972, 62, 40436, 1358, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 34, 972, 62, 40436, 1358, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437, 198 ]
2.837838
37
<filename>analysis/behavior/src/comparisons.jl<gh_stars>0 module comparisons """ Code to facilitate the comparison of models with data. """ using Interpolations import DataFrames: DataFrame import MyterialColors: salmon, blue, green, purple, teal, indigo_dark import Statistics: mean, std, median import jcontrol:...
[ 27, 34345, 29, 20930, 14, 46571, 14, 10677, 14, 785, 1845, 9886, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 17909, 198, 37811, 198, 220, 220, 220, 6127, 284, 15570, 262, 7208, 286, 4981, 351, 1366, 13, 198, 37811, 198, 198, ...
2.398787
2,144
<gh_stars>0 ### Compute the gradients using a gradient function and matrices Js ### base_kernel(k::Kernel) = eval(nameof(typeof(k))) function compute_hyperparameter_gradient(k::Kernel,gradient_function::Function,J::Vector{<:AbstractMatrix}) return map(gradient_function,J) end function compute_hyperparameter_grad...
[ 27, 456, 62, 30783, 29, 15, 198, 21017, 3082, 1133, 262, 3915, 2334, 1262, 257, 31312, 2163, 290, 2603, 45977, 449, 82, 44386, 198, 198, 8692, 62, 33885, 7, 74, 3712, 42, 7948, 8, 796, 5418, 7, 3672, 1659, 7, 4906, 1659, 7, 74, ...
2.404987
1,484
# Defines the core Node abstraction # Defines the core Node and operations on the graph using Base importall Base typealias Float Float64 typealias TensorValue Union{Real, Array} ############### # Basic types # ############### abstract OpType type Node op::OpType inputs::Vector{Node} outputs::Vector{Nod...
[ 2, 2896, 1127, 262, 4755, 19081, 34651, 198, 2, 2896, 1127, 262, 4755, 19081, 290, 4560, 319, 262, 4823, 198, 198, 3500, 7308, 198, 11748, 439, 7308, 198, 198, 4906, 26011, 48436, 48436, 2414, 198, 4906, 26011, 309, 22854, 11395, 4479, ...
2.335417
2,719
# TODO: rewrite in a better and more julian way. # # This is just kind of thrown together without any real planning but it seems to # work. An obviouse design improvement would be to drop the string identifiers # and use types or something instead. Conssider this as a functional outline for # a future product. s = raw"...
[ 2, 16926, 46, 25, 28183, 287, 257, 1365, 290, 517, 474, 377, 666, 835, 13, 198, 2, 198, 2, 770, 318, 655, 1611, 286, 8754, 1978, 1231, 597, 1103, 5410, 475, 340, 2331, 284, 198, 2, 670, 13, 1052, 909, 8903, 1076, 1486, 9025, 561...
2.116645
4,698
include("hrb_utils.jl") type HBMeta # Metadata attached to a Harwell-Boeing matrix. title :: AbstractString key :: AbstractString totcrd :: Int ptrcrd :: Int indcrd :: Int valcrd :: Int rhscrd :: Int mxtype :: AbstractString nrow :: Int ncol :: Int nnzero :: Int neltvl :: Int hermitia...
[ 17256, 7203, 11840, 65, 62, 26791, 13, 20362, 4943, 628, 198, 4906, 25997, 48526, 198, 220, 1303, 3395, 14706, 7223, 284, 257, 2113, 4053, 12, 33, 2577, 278, 17593, 13, 198, 220, 3670, 7904, 27741, 10100, 198, 220, 1994, 220, 220, 790...
2.086741
2,617
mutable struct A t::Array{Float64, 1} s::Float64 end mutable struct B a::A s::Float64 end @testset "update" begin # setfield_nested b = B(A([1, 2, 3], 4), 5) setfield_nested!(b, (:a, :t), [-1.0, -2.0, -3.0]) setfield_nested!(b, (:a, :s), -4.0) setfield_nested!(b, (:s,), -5.0) ...
[ 76, 18187, 2878, 317, 198, 220, 220, 220, 256, 3712, 19182, 90, 43879, 2414, 11, 352, 92, 198, 220, 220, 220, 264, 3712, 43879, 2414, 198, 437, 198, 198, 76, 18187, 2878, 347, 198, 220, 220, 220, 257, 3712, 32, 198, 220, 220, 220,...
1.719081
566
import Term: cleantext, chars, textlen, split_lines function same_widths(text::String)::Bool widths = textlen.(split_lines(text)) return length(unique(widths)) == 1 end function check_widths(text, width) for line in split_lines(text) @test textlen(line) <= width end end """ Extensively test...
[ 11748, 35118, 25, 1190, 415, 2302, 11, 34534, 11, 2420, 11925, 11, 6626, 62, 6615, 628, 198, 8818, 976, 62, 10394, 82, 7, 5239, 3712, 10100, 2599, 25, 33, 970, 198, 220, 220, 220, 9647, 82, 796, 2420, 11925, 12195, 35312, 62, 6615, ...
2.513841
578
#= Copyright (c) 2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
[ 2, 28, 198, 15269, 357, 66, 8, 1853, 11, 8180, 10501, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 220, 198, 4666, 2649, 11, 389, 10431, 2810, 326, 262, 1708, 34...
1.950188
2,931
bshow(i) = bitstring(i)[end-7:end] function large_enough_unsigned(bit_cnt) unsigned_types = [UInt8, UInt16, UInt32, UInt64, UInt128] atype = nothing for xtype in unsigned_types if sizeof(xtype) * 8 >= bit_cnt atype = xtype break end end atype end """ i...
[ 1443, 4919, 7, 72, 8, 796, 1643, 8841, 7, 72, 38381, 437, 12, 22, 25, 437, 60, 628, 198, 8818, 1588, 62, 48229, 62, 43375, 7, 2545, 62, 66, 429, 8, 198, 220, 220, 220, 22165, 62, 19199, 796, 685, 52, 5317, 23, 11, 471, 5317, ...
1.65858
5,647
<reponame>cropbox/Cropbox.jl using MacroTools: MacroTools, isexpr, isline, @capture, @q using Setfield: @set struct VarInfo{S<:Union{Symbol,Nothing}} system::Symbol name::Symbol alias::Union{Symbol,Nothing} args::Vector kwargs::Vector body#::Union{Expr,Symbol,Nothing} state::S type::Uni...
[ 27, 7856, 261, 480, 29, 31476, 3524, 14, 34, 1773, 3524, 13, 20362, 198, 3500, 42755, 33637, 25, 42755, 33637, 11, 318, 31937, 11, 318, 1370, 11, 2488, 27144, 495, 11, 2488, 80, 198, 3500, 5345, 3245, 25, 2488, 2617, 198, 198, 7249,...
2.21275
14,745
<gh_stars>0 function anglelimits() end function voltagelimits() end
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 9848, 49196, 3419, 198, 198, 437, 198, 198, 8818, 2322, 12985, 417, 320, 896, 3419, 198, 198, 437, 198 ]
2.62963
27
<reponame>ethansaxenian/RosettaDecode module NumericError import Base: convert, promote_rule, +, -, *, /, ^ export Measure type Measure <: Number x::Float64 σ::Float64 Measure(x::Real) = new(Float64(x), 0) Measure(x::Real, σ::Real) = new(Float64(x), σ) end Base.show(io::IO, x::Measure) = print(io, string(x....
[ 27, 7856, 261, 480, 29, 2788, 504, 897, 268, 666, 14, 35740, 15253, 10707, 1098, 198, 21412, 399, 39223, 12331, 198, 198, 11748, 7308, 25, 10385, 11, 7719, 62, 25135, 11, 1343, 11, 532, 11, 1635, 11, 1220, 11, 10563, 198, 198, 39344...
2.051546
679
using GaussianProcesses using GaussianProcesses: KernelData using BenchmarkLite # Define Benchmark test type KernelTest <: Proc k::Kernel d::Int op::Function KernelTest(k::Kernel, d::Int, op::Function) = new(k, d, op) end AbstractString(proc::KernelTest) = "$(typeof(proc.k)), d=$(proc.d)" Base.length...
[ 3500, 12822, 31562, 18709, 274, 198, 3500, 12822, 31562, 18709, 274, 25, 32169, 6601, 198, 3500, 25187, 4102, 43, 578, 198, 198, 2, 2896, 500, 25187, 4102, 1332, 198, 198, 4906, 32169, 14402, 1279, 25, 31345, 198, 220, 220, 220, 479, ...
2.370748
294
#= "ESSE: Environmental and State Dependent Diversification" submodule package =# module ESSE using Random: randexp using DelimitedFiles: readdlm, writedlm using ProgressMeter: Progress, next! using DifferentialEquations: ODEProblem, init, reinit!, solve!, Tsit5, DiffEqBase using LinearAlgebra: BLAS.gemv!, rank, ...
[ 2, 28, 628, 220, 366, 1546, 5188, 25, 13272, 290, 1812, 37947, 298, 360, 1191, 2649, 1, 850, 21412, 5301, 198, 198, 46249, 198, 198, 21412, 13380, 5188, 198, 198, 3500, 14534, 25, 43720, 11201, 198, 3500, 4216, 320, 863, 25876, 25, ...
2.829201
363
<filename>src/abstract_vlae.jl abstract type AbstractVLAE end function elbo(m::AbstractVLAE, x::AbstractArray{T,4}) where T # encoder pass - KL divergence μzs_σzs = _encoded_mu_vars(m, x) zs = map(y->rptrick(y...), μzs_σzs) kldl = sum(map(y->Flux.mean(kld(y...)), μzs_σzs)) # decoder pass -...
[ 27, 34345, 29, 10677, 14, 397, 8709, 62, 19279, 3609, 13, 20362, 198, 397, 8709, 2099, 27741, 53, 13534, 36, 886, 198, 198, 8818, 1288, 2127, 7, 76, 3712, 23839, 53, 13534, 36, 11, 2124, 3712, 23839, 19182, 90, 51, 11, 19, 30072, ...
1.998793
2,485
<reponame>masashitshit/Interpolations.jl module Interpolations export linerinterp function linerinterp(grid,vals) function funfun(x) if x < grid[1] return (vals[2]-vals[1])/(grid[2]-grid[1])*(x-grid[1])+vals[1] end if grid[end] <= x ...
[ 27, 7856, 261, 480, 29, 5356, 1077, 896, 17945, 14, 9492, 16104, 602, 13, 20362, 198, 198, 21412, 4225, 16104, 602, 628, 198, 39344, 35940, 3849, 79, 628, 198, 8818, 35940, 3849, 79, 7, 25928, 11, 12786, 8, 198, 220, 220, 220, 220, ...
1.645455
440
<filename>src/entities/wallbooster.jl module WallBooster using ..Ahorn, Maple const placements = Ahorn.PlacementDict( "Wall Booster (Right)" => Ahorn.EntityPlacement( Maple.WallBooster, "rectangle", Dict{String, Any}( "left" => true ) ), "Wall Booster (Left)" =>...
[ 27, 34345, 29, 10677, 14, 298, 871, 14, 11930, 2127, 6197, 13, 20362, 198, 21412, 5007, 16635, 6197, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, 198, 220, ...
2.243716
915
struct GpuIndirectSolver <: LinearSolver end if haskey(ENV, "JULIA_SCS_LIBRARY_PATH") @isdefined(libscsgpuindir) && push!(available_solvers, GpuIndirectSolver) else import SCS_GPU_jll const gpuindirect = SCS_GPU_jll.libscsgpuindir push!(available_solvers, GpuIndirectSolver) end scsint_t(::Type{GpuIndi...
[ 7249, 402, 19944, 5497, 1060, 50, 14375, 1279, 25, 44800, 50, 14375, 886, 198, 198, 361, 468, 2539, 7, 1677, 53, 11, 366, 41, 6239, 3539, 62, 6173, 50, 62, 40347, 49, 13153, 62, 34219, 4943, 198, 220, 220, 220, 2488, 271, 23211, 7...
1.962707
724
<filename>src/SolveEig.jl module SolveEig using LinearAlgebra using ..Interp:getD using ..Interp:getCpts using ..Interp:getCpts1 using ..Interp:baryW1 using ..Interp:barymat using ..Interp:forward using ..Interp:rev using ..EdgeDetect:find using ..Op:setup #= function many_ham(V, N; d2 = -0.5, d1 = 0.0, a = -1.0, b =...
[ 27, 34345, 29, 10677, 14, 50, 6442, 36, 328, 13, 20362, 198, 21412, 4294, 303, 36, 328, 198, 198, 3500, 44800, 2348, 29230, 198, 3500, 11485, 9492, 79, 25, 1136, 35, 198, 3500, 11485, 9492, 79, 25, 1136, 34, 457, 82, 198, 3500, 11...
1.575665
4,249
<gh_stars>1-10 ### A Pluto.jl notebook ### # v0.12.21 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) q...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1065, 13, 2481, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 770, 32217, 20922, 3544, 2488, 21653,...
1.754919
11,943
<reponame>johnnychen94/NiLang.jl using CUDA, GPUArrays using NiLang, NiLang.AD """ A reversible swap kernel for GPU for SWAP gate in quantum computing. See the irreversible version for comparison http://tutorials.yaoquantum.org/dev/generated/developer-guide/2.cuda-acceleration/ """ @i @inline function swap_kernel(sta...
[ 27, 7856, 261, 480, 29, 30686, 3281, 6607, 5824, 14, 34153, 43, 648, 13, 20362, 198, 3500, 29369, 5631, 11, 11362, 3163, 20477, 198, 3500, 11556, 43, 648, 11, 11556, 43, 648, 13, 2885, 198, 198, 37811, 198, 32, 48287, 16075, 9720, 3...
2.306748
1,141
<gh_stars>10-100 # f(x)=hcat(x...) Fhcat(x...)=(hcat(x...),nothing) Fhcat_inplace(value,auxvalue,x...)=copy!(value,hcat(x...)) function Dhcat(derivativeIDX,f_c,faux_c,grad_c,grad_n,x...) startind=1 for i=1:length(x) endind=startind+length(x[i])-1 if pointer(x[i])==pointer(x[derivativeIDX]) # us...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 277, 7, 87, 47505, 71, 9246, 7, 87, 23029, 198, 37, 71, 9246, 7, 87, 23029, 16193, 71, 9246, 7, 87, 986, 828, 22366, 8, 198, 37, 71, 9246, 62, 259, 5372, 7, 8367, 11, 14644, 836...
1.924638
690
<gh_stars>0 """ # `module Data` Provides methods to read files containing simulation data. Primarily this is intended to load `.xyz` files and convert them to JuLIP-compatible data: ``` data = IPFitting.Data.load_data("mydata.xyz") ``` where `mydata.xyz` contains multiple configurations, will read in those configurat...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 37811, 198, 2, 4600, 21412, 6060, 63, 198, 198, 15946, 1460, 5050, 284, 1100, 3696, 7268, 18640, 1366, 13, 11460, 3093, 428, 318, 198, 600, 1631, 284, 3440, 4600, 13, 5431, 89, 63, 3696, 290, ...
2.219439
1,996
# Module to communicate with GW instek PSP series power supplies #= note: 1) The serial port on the PSP-603 (and possibly others) is non standard. Pin 4 needs +12V to power the line driver. The transmitter will swing from Vpin4 - 4v to 0v. This worked with my RS232 adapter. 2) The equipment and probably ...
[ 2, 19937, 284, 10996, 351, 27164, 916, 988, 48651, 2168, 1176, 9416, 198, 2, 28, 198, 11295, 25, 220, 198, 16, 8, 220, 383, 11389, 2493, 319, 262, 48651, 12, 35642, 357, 392, 5457, 1854, 8, 318, 1729, 3210, 13, 220, 220, 198, 220,...
2.564669
634
<reponame>JuliaAstrodynamics/Orekit.jl<filename>gen/HipparchusWrapper/OptimWrapper/NonlinearWrapper/VectorWrapper/VectorWrapper.jl module VectorWrapper using JavaCall include("LeastsquaresWrapper/LeastsquaresWrapper.jl") end
[ 27, 7856, 261, 480, 29, 16980, 544, 33751, 14892, 4989, 873, 14, 41543, 15813, 13, 20362, 27, 34345, 29, 5235, 14, 39, 3974, 998, 385, 36918, 2848, 14, 27871, 320, 36918, 2848, 14, 15419, 29127, 36918, 2848, 14, 38469, 36918, 2848, 14...
2.814815
81
<reponame>Michiel-VL/PolyaViz<gh_stars>0 using Plots function lineplot(st::SearchTrace, xdata::Symbol, ydata::Symbol; kwargs...) return plot(st.df[:, xdata], st.df[:, ydata]; kwargs...) end function objective_plot(st::SearchTrace, xsym::Symbol=:it, ysym::Symbol=:v_s; kwargs...) return lineplot(st, xsym, ysym;...
[ 27, 7856, 261, 480, 29, 11180, 8207, 12, 47468, 14, 34220, 64, 53, 528, 27, 456, 62, 30783, 29, 15, 198, 3500, 1345, 1747, 198, 198, 8818, 1627, 29487, 7, 301, 3712, 18243, 2898, 558, 11, 2124, 7890, 3712, 13940, 23650, 11, 331, 7...
2.392857
140
<reponame>LawrenceMMStewart/Bayesian_Optimization include("Kernals.jl") include("gaussian_process.jl") function uniform(a,b,N) rand(N)*(b-a)+a end using Distributions n=50 #number of test points N=10;#Number of training points Xtest=linspace(-5,5,n); #Xtest are all of available points to check on the axis X=unif...
[ 27, 7856, 261, 480, 29, 16966, 6784, 12038, 49328, 433, 14, 15262, 35610, 62, 27871, 320, 1634, 198, 17256, 7203, 42, 1142, 874, 13, 20362, 4943, 198, 17256, 7203, 4908, 31562, 62, 14681, 13, 20362, 4943, 628, 198, 8818, 8187, 7, 64, ...
2.485507
690
export project_cardinality_parallel function project_cardinality_parallel(x::Vector, k ::Int64, n_proc::Int64 ) """ Project the vector x onto the set of vectors with cardinality (l0 'norm') less then or equal to k. project m onto {m...
[ 39344, 1628, 62, 9517, 1292, 414, 62, 1845, 29363, 198, 198, 8818, 1628, 62, 9517, 1292, 414, 62, 1845, 29363, 7, 87, 3712, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.915361
638
<filename>src/Gen2DAgentMotion.jl module Gen2DAgentMotion include("scene.jl") include("planner.jl") include("motion.jl") include("distributions.jl") end # module
[ 27, 34345, 29, 10677, 14, 13746, 17, 5631, 6783, 45740, 13, 20362, 198, 21412, 5215, 17, 5631, 6783, 45740, 198, 198, 17256, 7203, 29734, 13, 20362, 4943, 198, 17256, 7203, 11578, 1008, 13, 20362, 4943, 198, 17256, 7203, 38714, 13, 2036...
2.877193
57
<reponame>ORNLJulia/Privacy.jl module DPSGD export DifferentialPrivacy, privacy_spent export solve_niterations, solve_noise_multiplier using Flux, LogarithmicNumbers, Parameters, Random, Statistics, Zygote, LinearAlgebra using SpecialFunctions: logerfc, gamma Base.binomial(n, k) = gamma(...
[ 27, 7856, 261, 480, 29, 30649, 43, 16980, 544, 14, 48948, 13, 20362, 198, 21412, 25366, 45113, 198, 198, 39344, 20615, 498, 48948, 11, 6782, 62, 2777, 298, 198, 39344, 8494, 62, 77, 2676, 602, 11, 8494, 62, 3919, 786, 62, 47945, 959...
2.135958
4,597
<gh_stars>1-10 # Tests for General Direct Approach Cost DEA Models @testset "CostGDADEAModel" begin # Test using Book data 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]; W = [1 1; 1 1; 1 1; 1 1; 1 1; 1 1; 1 1; 1 1]; # Cost GDA costgda = deacostgda(X, Y, W, :ERG) ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 30307, 329, 3611, 4128, 38066, 6446, 28647, 32329, 198, 31, 9288, 2617, 366, 13729, 45113, 19266, 2390, 375, 417, 1, 2221, 628, 220, 220, 220, 1303, 6208, 1262, 4897, 1366, 198, 220, 220,...
2.127986
1,172
module FinancialSymbology using HTTP, StructArrays const APIKEYNAME = "X-OPENFIGI-APIKEY" include("Identifiers.jl") using .Identifiers include("apitypes.jl") include("apiconstructors.jl") include("prettyprinters.jl") export Identifier, Sedol, Cusip, Isin, Figi, Ticker, Index export OpenFigiAPI export makeidentifi...
[ 21412, 11302, 13940, 2022, 1435, 198, 198, 3500, 14626, 11, 32112, 3163, 20477, 198, 198, 9979, 7824, 20373, 20608, 796, 366, 55, 12, 3185, 1677, 16254, 40, 12, 17614, 20373, 1, 198, 198, 17256, 7203, 33234, 13350, 13, 20362, 4943, 198,...
2.792202
2,180
export some import Base: show """ some() Creates a some operator, which filters out `nothing` items by the source Observable by emitting only those that not equal to `nothing`. # Producing Stream of type `<: Subscribable{L}` where `L` refers to type of source stream `<: Subscribable{Union{L, Nothing}}` # Exam...
[ 39344, 617, 198, 198, 11748, 7308, 25, 905, 198, 198, 37811, 198, 220, 220, 220, 617, 3419, 198, 198, 16719, 274, 257, 617, 10088, 11, 543, 16628, 503, 4600, 22366, 63, 3709, 416, 262, 2723, 19243, 540, 416, 48143, 691, 198, 25591, ...
2.653214
669
<reponame>JuliaTagBot/NestedMaps.jl using NestedMaps, Test @testset "fallback" begin x = 1:10 @test nested_map(identity, x) == x @test nested_map(sum, x) == sum(x) end @testset "tuple" begin t = [(i, -i) for i in 1:10] @test nested_map(identity, t) == (1:10, -(1:10)) @test nested_map(sum, t) =...
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 45, 7287, 47010, 13, 20362, 198, 3500, 399, 7287, 47010, 11, 6208, 198, 198, 31, 9288, 2617, 366, 7207, 1891, 1, 2221, 198, 220, 220, 220, 2124, 796, 352, 25, 940, 198, 220, 22...
1.969163
681