content
stringlengths
5
1.03M
input_ids
listlengths
4
823k
ratio_char_token
float64
0.4
12.5
token_count
int64
4
823k
struct InterfaceOperators operators::Any celltooperator::Any ncells::Any numoperators::Any function InterfaceOperators(operators, celltooperator) ncells = length(celltooperator) numcouples, numoperators = size(operators) @assert numcouples == 4 @assert all(celltooper...
[ 7249, 26491, 18843, 2024, 198, 220, 220, 220, 12879, 3712, 7149, 198, 220, 220, 220, 2685, 1462, 46616, 3712, 7149, 198, 220, 220, 220, 299, 46342, 3712, 7149, 198, 220, 220, 220, 997, 3575, 2024, 3712, 7149, 198, 220, 220, 220, 2163,...
2.233685
5,302
# Script using Distributions, PyPlot, BayesianNonparametricStatistics β=0.5 θ = sumoffunctions(vcat([faberschauderone],[faberschauder(j,k) for j in 0:4 for k in 1:2^j]),vcat([1.0],[(-1)^(j*k)*2^(-β*j) for j in 0:4 for k in 1:2^j])) x = 0.0:0.001:1.0 y = θ.(x) # Uncomment the following lines to plot θ. # clf() # pl...
[ 2, 12327, 198, 198, 3500, 46567, 507, 11, 9485, 43328, 11, 4696, 35610, 15419, 17143, 19482, 48346, 198, 198, 26638, 28, 15, 13, 20, 198, 138, 116, 796, 2160, 2364, 46797, 7, 85, 9246, 26933, 36434, 364, 354, 29233, 505, 38430, 36434,...
2.063253
332
""" Berlage(; <keyword arguments>) Create a Berlage wavelet. # Arguments **Keyword arguments** * `dt::Real=0.002`: sampling interval in secs. * `f0::Real=20.0`: central frequency in Hz. * `m::Real=2`: exponential parameter of Berlage wavelet. * `alpha::Real=180.0`: alpha parameter of Berlage wavelet in rad/secs...
[ 37811, 198, 220, 220, 220, 4312, 75, 496, 7, 26, 1279, 2539, 4775, 7159, 43734, 198, 198, 16447, 257, 4312, 75, 496, 6769, 1616, 13, 198, 198, 2, 20559, 2886, 198, 198, 1174, 9218, 4775, 7159, 1174, 198, 198, 9, 4600, 28664, 3712, ...
2.161111
360
struct Lennnon2000Air <: ThermoState.ThermoModel end const TAU_MAX_EXP_87 = 0.4207493606569795 const lemmon2000_air_R = 8.314510 const lemmon2000_air_T_reducing = 132.6312 const lemmon2000_air_P_reducing = 3.78502E6 const lemmon2000_air_rho_reducing = 10447.7 const lemmon2000_air_rho_reducing_inv = 1.0/lemmon2000_air_...
[ 7249, 28423, 13159, 11024, 16170, 1279, 25, 12634, 5908, 9012, 13, 35048, 5908, 17633, 886, 198, 9979, 21664, 52, 62, 22921, 62, 49864, 62, 5774, 796, 657, 13, 19, 22745, 2920, 15277, 2996, 3388, 41544, 198, 9979, 443, 76, 2144, 11024, ...
1.861965
2,311
export SingleLayer """ singleLayer σ(K*s+b) where K,b are trainable weights """ struct SingleLayer end mσ(x::AbstractArray{R}) where R<:Real = abs.(x)+log.(R(1) .+ exp.(-R(2)*abs.(x))) mdσ(x::AbstractArray{R}) where R<:Real = tanh.(x) md2σ(x::AbstractArray{R}) where R<:Real = one(eltype(x)) .- tanh.(x).^2 """ eva...
[ 39344, 14206, 49925, 198, 198, 37811, 198, 29762, 49925, 198, 198, 38392, 7, 42, 9, 82, 10, 65, 8, 198, 198, 3003, 509, 11, 65, 389, 4512, 540, 19590, 198, 198, 37811, 198, 7249, 14206, 49925, 198, 437, 198, 198, 76, 38392, 7, 87,...
1.906939
4,309
""" parseFunctionNode(nodeDict::Dict) Parses a [`FunctionNode`](@ref) from a node set configuration file. """ function parseFunctionNode(nodeDict::Dict) func = get(nodeDict, "function", false) if func == false error("function field is not set in FunctionNode") else aux = 0 try ...
[ 37811, 198, 220, 220, 220, 21136, 22203, 19667, 7, 17440, 35, 713, 3712, 35, 713, 8, 198, 198, 47, 945, 274, 257, 685, 63, 22203, 19667, 63, 16151, 31, 5420, 8, 422, 257, 10139, 900, 8398, 2393, 13, 198, 37811, 198, 8818, 21136, 2...
2.331475
3,587
export DepthMap import ImageView type DepthMap camera :: M34 depth :: Array{Float32, 2} nxcorr :: Array{Float32, 2} end function DepthMap(view, nbrs, voi, w = 3) cam = view.camera im = view.image (nc, nx, ny) = size(im) mn = LibAminda.mean_and_inverse_deviation(im, w) # determine depth range, resolu...
[ 39344, 36350, 13912, 198, 198, 11748, 7412, 7680, 198, 198, 4906, 36350, 13912, 198, 220, 4676, 7904, 337, 2682, 198, 220, 6795, 7904, 15690, 90, 43879, 2624, 11, 362, 92, 198, 220, 299, 87, 10215, 81, 7904, 15690, 90, 43879, 2624, 11...
2.091429
525
# This file is a part of Julia. License is MIT: https://julialang.org/license module REPLCompletions export completions, shell_completions, bslash_completions, completion_text using Base.Meta using Base: propertynames, something abstract type Completion end struct KeywordCompletion <: Completion keyword::Strin...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 21412, 45285, 5377, 37069, 507, 198, 198, 39344, 1224, 45240, 11, 7582, 62, 785, 37069, 507, 11, 275, ...
2.280064
13,047
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md using JuliaFEM using JuliaFEM.Preprocess using JuliaFEM.Testing function JuliaFEM.get_mesh(::Type{Val{Symbol("two elements 1.0x0.5 with 0.1 gap in y direction")}}) mesh = Mesh() add_node!(me...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 37, 3620, 13, 198, 2, 13789, 318, 17168, 25, 766, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 37, 3620, 14, 16980, 544, 37, 3620, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, ...
2.258367
1,494
using StatsBase # Support some of the weighted statistics function in StatsBase # NOTES: # - Ambiguity errors are still possible for weights with overly specific methods (e.g., UnitWeights) # - Ideally, when the weighted statistics is moved to Statistics.jl we can remove this entire file. # https://github.com/Julia...
[ 198, 3500, 20595, 14881, 198, 198, 2, 7929, 617, 286, 262, 26356, 7869, 2163, 287, 20595, 14881, 198, 2, 5626, 1546, 25, 198, 2, 532, 12457, 328, 14834, 8563, 389, 991, 1744, 329, 19590, 351, 17698, 2176, 5050, 357, 68, 13, 70, 1539...
2.387769
1,439
# Compute tracks from entity edge data. using JLD, PyPlot include("findtracks.jl") include("findtrackgraph.jl") # Load edge incidence matrix. # Load the data file file_dir = joinpath(Base.source_dir(),"../1EntityAnalysis/Entity.jld") E = load(file_dir)["E"] #E = loadassoc(file_dir) E = logical(E) # Set prefixes p = ...
[ 2, 3082, 1133, 8339, 422, 9312, 5743, 1366, 13, 198, 198, 3500, 449, 11163, 11, 9485, 43328, 198, 17256, 7203, 19796, 46074, 13, 20362, 4943, 198, 17256, 7203, 19796, 11659, 34960, 13, 20362, 4943, 198, 198, 2, 8778, 5743, 18349, 17593,...
2.640741
270
struct SVRG_basic_iterable{R<:Real,C<:RealOrComplex{R},Tx<:AbstractArray{C},Tf,Tg} F::Array{Tf} # smooth term g::Tg # nonsmooth term x0::Tx # initial point N::Int # of data points in the finite sum problem L::Maybe{Union{Array{R},R}}...
[ 7249, 311, 13024, 38, 62, 35487, 62, 2676, 540, 90, 49, 27, 25, 15633, 11, 34, 27, 25, 15633, 5574, 5377, 11141, 90, 49, 5512, 46047, 27, 25, 23839, 19182, 90, 34, 5512, 51, 69, 11, 51, 70, 92, 198, 220, 220, 220, 376, 3712, 1...
1.914427
1,823
# CuArray{ComplexF32} function gpu_downconvert!( downconverted_signal::CuVector{ComplexF32}, carrier::CuVector{ComplexF32}, signal::CuVector{ComplexF32}, start_sample::Integer, num_samples_left::Integer ) @. @views downconverted_signal[start_sample:num_samples_left + start_sample - 1] = ...
[ 2, 14496, 19182, 90, 5377, 11141, 37, 2624, 92, 198, 8818, 308, 19944, 62, 2902, 1102, 1851, 0, 7, 198, 220, 220, 220, 866, 1102, 13658, 62, 12683, 282, 3712, 46141, 38469, 90, 5377, 11141, 37, 2624, 5512, 198, 220, 220, 220, 11920,...
2.414361
1,337
module ComradeDynesty using Comrade using AbstractMCMC using TupleVectors using Reexport @reexport using Dynesty Comrade.samplertype(::Type{<:NestedSampler}) = Comrade.IsCube() Comrade.samplertype(::Type{<:DynamicNestedSampler}) = Comrade.IsCube() function AbstractMCMC.sample(post::Comrade.TransformedPosterior, ...
[ 21412, 955, 27585, 35, 2047, 9673, 198, 198, 3500, 955, 27585, 198, 198, 3500, 27741, 9655, 9655, 198, 3500, 309, 29291, 53, 478, 669, 198, 3500, 797, 39344, 198, 198, 31, 631, 87, 634, 1262, 39530, 9673, 628, 198, 5377, 27585, 13, ...
2.137778
450
using Test using POMDPs using Random let struct M <: POMDP{Int, Int, Char} end @test_throws MethodError generate_s(M(), 1, 1, MersenneTwister(4)) POMDPs.transition(::M, ::Int, ::Int) = [1] @test generate_s(M(), 1, 1, MersenneTwister(4)) == 1 @test_throws MethodError generate_sor(M(), 1, 1, Mersenne...
[ 3500, 6208, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 14534, 198, 198, 1616, 198, 220, 220, 220, 2878, 337, 1279, 25, 350, 2662, 6322, 90, 5317, 11, 2558, 11, 3178, 92, 886, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 11789, 1...
2.190476
336
let doc = open("$testdir/example.html") do example example |> readstring |> parsehtml end io = IOBuffer() print(io, doc) seek(io, 0) newdoc = io |> readstring |> parsehtml @test newdoc == doc end
[ 198, 1616, 198, 220, 220, 220, 2205, 796, 1280, 7203, 3, 9288, 15908, 14, 20688, 13, 6494, 4943, 466, 1672, 198, 220, 220, 220, 220, 220, 220, 220, 1672, 930, 29, 1100, 8841, 930, 29, 21136, 6494, 198, 220, 220, 220, 886, 198, 220...
2.306931
101
#=############################################################################## # DESCRIPTION Utilities. # AUTHORSHIP * Author : Eduardo J. Alvarez * Email : Edo.AlvarezR@gmail.com * Created : Sep 2018 * License : MIT License =#####################################################################...
[ 2, 28, 29113, 29113, 7804, 4242, 2235, 198, 2, 22196, 40165, 198, 220, 220, 220, 41086, 13, 198, 2, 44746, 49423, 198, 220, 1635, 6434, 220, 220, 220, 1058, 40766, 13109, 449, 13, 36952, 198, 220, 1635, 9570, 220, 220, 220, 220, 105...
1.925057
2,642
if Base.libllvm_version >= v"7.0" include(joinpath("gcn_intrinsics", "math.jl")) end include(joinpath("gcn_intrinsics", "indexing.jl")) include(joinpath("gcn_intrinsics", "assertion.jl")) include(joinpath("gcn_intrinsics", "synchronization.jl")) include(joinpath("gcn_intrinsics", "extras.jl"))
[ 361, 7308, 13, 8019, 297, 14761, 62, 9641, 18189, 410, 1, 22, 13, 15, 1, 198, 220, 220, 220, 2291, 7, 22179, 6978, 7203, 70, 31522, 62, 600, 81, 1040, 873, 1600, 366, 11018, 13, 20362, 48774, 198, 437, 198, 17256, 7, 22179, 6978, ...
2.471074
121
using LinearAlgebra export transform, backtransform """ backtransform(Rsets::ReachSolution, options::Options) Undo a coordinate transformation. ### Input - `Rsets` -- flowpipe - `option` -- problem options containing an `:transformation_matrix` entry ### Output A new flowpipe where each reach set has...
[ 3500, 44800, 2348, 29230, 198, 198, 39344, 6121, 11, 198, 220, 220, 220, 220, 220, 220, 736, 35636, 198, 198, 37811, 198, 220, 220, 220, 736, 35636, 7, 49, 28709, 3712, 3041, 620, 46344, 11, 3689, 3712, 29046, 8, 198, 198, 31319, 78...
2.955574
1,238
function renderloop(screen::Screen; framerate = 1/30, prerender = () -> nothing) try while isopen(screen) t = time() GLFW.PollEvents() # GLFW poll prerender() make_context_current(screen) render_frame(screen) GLFW.SwapBuffers(to_native(...
[ 8818, 8543, 26268, 7, 9612, 3712, 23901, 26, 5346, 21620, 796, 352, 14, 1270, 11, 662, 13287, 796, 7499, 4613, 2147, 8, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 981, 318, 9654, 7, 9612, 8, 198, 220, 220, ...
2.090209
1,818
""" module that holds functions needed to react to scrolling Generally first we need to pass the GLFW callback to the Rocket obeservable code adapted from https://discourse.julialang.org/t/custom-subject-in-rocket-jl-for-mouse-events-from-glfw/65133/3 """ module ReactToScroll using ModernGL, ..DisplayWords,Rocket, G...
[ 198, 37811, 198, 21412, 326, 6622, 5499, 2622, 284, 220, 6324, 284, 28659, 198, 37058, 717, 356, 761, 284, 1208, 262, 10188, 24160, 23838, 284, 262, 16920, 909, 274, 712, 540, 220, 198, 8189, 16573, 422, 3740, 1378, 15410, 9047, 13, 7...
2.610805
1,999
module SMRTypes import Base: show export cSMRWMrkChannel, SMRWMrkChannel, cSMRContChannel, SMRContChannel, cSMREventChannel, SMREventChannel, cSMRMarkerChannel, SMRMarkerChannel, cSMRChannelInfo, cSMRChannelInfoArray, SMRChannelInfo, show, channel_string const MARKER_SIZE = UInt8(4) abstract ty...
[ 21412, 9447, 14181, 9497, 198, 198, 11748, 7308, 25, 905, 198, 198, 39344, 269, 12310, 46747, 5246, 74, 29239, 11, 9447, 46747, 5246, 74, 29239, 11, 269, 12310, 49, 4264, 29239, 11, 9447, 49, 4264, 29239, 11, 198, 220, 220, 220, 220, ...
2.379638
2,210
# This file is a part of Julia. License is MIT: https://julialang.org/license using Random using LinearAlgebra function isnan_type(::Type{T}, x) where T isa(x, T) && isnan(x) end @testset "clamp" begin @test clamp(0, 1, 3) == 1 @test clamp(1, 1, 3) == 1 @test clamp(2, 1, 3) == 2 @test clamp(3, 1,...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 3500, 14534, 198, 3500, 44800, 2348, 29230, 198, 198, 8818, 2125, 272, 62, 4906, 7, 3712, 6030, 90, ...
1.758228
22,240
@testset "zygote_adjoints" begin rng = MersenneTwister(123456) x = rand(rng, 5) y = rand(rng, 5) r = rand(rng, 5) Q = Matrix(Cholesky(rand(rng, 5, 5), 'U', 0)) @assert isposdef(Q) gzeucl = gradient(:Zygote, [x, y]) do xy evaluate(Euclidean(), xy[1], xy[2]) end gzsqeucl = gra...
[ 31, 9288, 2617, 366, 7357, 70, 1258, 62, 41255, 1563, 82, 1, 2221, 198, 220, 220, 220, 374, 782, 796, 337, 364, 29727, 5080, 1694, 7, 10163, 29228, 8, 198, 220, 220, 220, 2124, 796, 43720, 7, 81, 782, 11, 642, 8, 198, 220, 220, ...
1.894336
918
module TestDay05 import AOC2021.Day05.part1, AOC2021.Day05.part2 using Test test_input_raw = """ 0,9 -> 5,9 8,0 -> 0,8 9,4 -> 3,4 2,2 -> 2,1 7,0 -> 7,4 6,4 -> 2,0 0,9 -> 2,9 3,4 -> 1,4 0,0 -> 8,8 5,5 -> 8,2""" test_input = [string(x) for x in split(test_input_raw, "\n")] @testset "Day 05" begin @testset "part 1...
[ 21412, 6208, 12393, 2713, 198, 198, 11748, 317, 4503, 1238, 2481, 13, 12393, 2713, 13, 3911, 16, 11, 317, 4503, 1238, 2481, 13, 12393, 2713, 13, 3911, 17, 198, 3500, 6208, 198, 198, 9288, 62, 15414, 62, 1831, 796, 37227, 198, 15, 11...
1.962025
237
@doc raw""" BrownianMotionTorus(n::Int) Returns a hidden state model corresponding to a Brownian motion on an `n`-dimensional torus, with initial condition drawn uniformly at random. """ struct BrownianMotionTorus <: HiddenStateModel{Vector{Float64}, ContinuousTime} n::Int end ...
[ 31, 15390, 8246, 37811, 198, 220, 220, 220, 4373, 666, 45740, 51, 15125, 7, 77, 3712, 5317, 8, 198, 198, 35561, 257, 7104, 1181, 2746, 11188, 284, 257, 4373, 666, 6268, 319, 281, 4600, 77, 63, 12, 19577, 7332, 385, 11, 351, 4238, ...
1.791492
1,904
# Helper functions sameSense(pra::Int, ra::Int) = mod(pra,2)==mod(ra,2) downSense(ra::Int) = (ra>0) .& (mod(ra,2)==1) upSense(ra::Int) = (ra>0) .& (mod(ra,2)==0) # Reward function for VerticalCAS MDP function POMDPs.reward(mdp::VerticalCAS_MDP, s::stateType, ra::actType) h = s[1]; vown = s[2]; vint = s[3]; pra = s...
[ 2, 5053, 525, 5499, 198, 31642, 41166, 7, 79, 430, 3712, 5317, 11, 2179, 3712, 5317, 8, 796, 953, 7, 79, 430, 11, 17, 8, 855, 4666, 7, 430, 11, 17, 8, 198, 2902, 41166, 7, 430, 3712, 5317, 8, 796, 357, 430, 29, 15, 8, 764, ...
1.688213
1,315
name = "LLVM" llvm_full_version = v"11.0.1+3" libllvm_version = v"11.0.1+3" # Include common LLVM stuff include("../common.jl") build_tarballs(ARGS, configure_extraction(ARGS, llvm_full_version, name, libllvm_version; experimental_platforms=true, assert=true)...; skip_audit=true, julia_compat="1.6")
[ 3672, 796, 366, 3069, 15996, 1, 198, 297, 14761, 62, 12853, 62, 9641, 796, 410, 1, 1157, 13, 15, 13, 16, 10, 18, 1, 198, 8019, 297, 14761, 62, 9641, 796, 410, 1, 1157, 13, 15, 13, 16, 10, 18, 1, 198, 198, 2, 40348, 2219, 271...
2.525
120
include("MultiFidelityABC.jl") mkpath("figures") using StatsPlots, Random println("#### Repressilator") println("# Loading data") bm = MakeBenchmarkCloud("repressilator/output") epsilons = (50.0,50.0) sample_size = 10^4 println("# Fig 1") fig1a = view_distances(bm[1:sample_size], epsilons) fig1b = view_distances(bm[...
[ 17256, 7203, 29800, 37, 23091, 24694, 13, 20362, 4943, 198, 28015, 6978, 7203, 5647, 942, 4943, 198, 198, 3500, 20595, 3646, 1747, 11, 14534, 198, 198, 35235, 7203, 4242, 1432, 601, 346, 1352, 4943, 198, 35235, 7203, 2, 12320, 1366, 494...
2.325982
1,451
struct Lattice{D,T,M,U} site::Vector{Site{D,T}} # sorted by ID coord_order::Vector{Site{D,T}} # sort by coord neighbors::Vector{Vector{Int}} types::Vector{U} end function Lattice(coord, types::Vector; nbhood = VonNeumann(), type_list = unique(types) ) dimension = coord isa Matrix ? size(coord, 1)...
[ 7249, 406, 1078, 501, 90, 35, 11, 51, 11, 44, 11, 52, 92, 198, 220, 2524, 3712, 38469, 90, 29123, 90, 35, 11, 51, 11709, 220, 1303, 23243, 416, 4522, 198, 220, 6349, 62, 2875, 3712, 38469, 90, 29123, 90, 35, 11, 51, 11709, 1303,...
2.444514
3,208
using LinearAlgebra, Jets, JetPack, Test n1,n2 = 33,44 @testset "JopLog, correctness T=$(T)" for T in (Float64,Float32,Complex{Float64},Complex{Float32}) F = JopLog(JetSpace(T,n1,n2)) x1 = rand(domain(F)) .+ T(0.0001) @test F*x1 ≈ log.(x1) end @testset "JopLog, linearity test, T=$(T)" for T in (Float64,F...
[ 3500, 44800, 2348, 29230, 11, 14728, 11, 19013, 11869, 11, 6208, 198, 198, 77, 16, 11, 77, 17, 796, 4747, 11, 2598, 198, 198, 31, 9288, 2617, 366, 41, 404, 11187, 11, 29409, 309, 43641, 7, 51, 16725, 329, 309, 287, 357, 43879, 241...
2.111111
792
using FileIO, BedgraphFiles using Bedgraph using IteratorInterfaceExtensions using TableTraits using DataFrames using Query using Test using Logging # old_logger = global_logger(ConsoleLogger(stdout, Logging.Debug)) module Bag using Bedgraph const chroms = ["chr19", "chr19", "chr19", "chr19", "chr19", "chr19", "...
[ 3500, 9220, 9399, 11, 15585, 34960, 25876, 198, 3500, 15585, 34960, 198, 198, 3500, 40806, 1352, 39317, 11627, 5736, 198, 3500, 8655, 15721, 896, 198, 198, 3500, 6060, 35439, 198, 3500, 43301, 198, 198, 3500, 6208, 198, 3500, 5972, 2667, ...
2.7
1,080
using Test using LinearAlgebraicRepresentation Lar = LinearAlgebraicRepresentation using ViewerGL GL = ViewerGL @testset "GLUtils.jl" begin # function lar4mesh(verts,cells) # cells are triangles @testset "lar4mesh" begin @test @test @test @test end # function two2three(points) ...
[ 3500, 6208, 198, 3500, 44800, 2348, 29230, 291, 40171, 341, 198, 43, 283, 796, 44800, 2348, 29230, 291, 40171, 341, 198, 3500, 3582, 263, 8763, 198, 8763, 796, 3582, 263, 8763, 198, 198, 31, 9288, 2617, 366, 8763, 18274, 4487, 13, 203...
2.131545
783
# This is Subset Tournament CMSA-ES as proposed by Robert Feldt in the paper: # R. Feldt, "Covariate Subset Tournaments for High-Dimensional Blackbox Optimization with Covariance Matrix Adapting Evolutionary Strategies", 2014 function normalize_utilities(utilities) utilities / sum(utilities) end function linear_ut...
[ 2, 770, 318, 3834, 2617, 9595, 16477, 4090, 12, 1546, 355, 5150, 416, 5199, 34873, 83, 287, 262, 3348, 25, 198, 2, 220, 371, 13, 34873, 83, 11, 366, 34, 709, 2743, 378, 3834, 2617, 309, 16950, 329, 3334, 12, 35, 16198, 2619, 3524,...
2.604946
5,055
using BinaryBuilder name = "Chafa" version = v"1.4.1" sources = [ ArchiveSource("https://hpjansson.org/chafa/releases/chafa-$(version).tar.xz", "46d34034f4c96d120e0639f87a26590427cc29e95fe5489e903a48ec96402ba3"), ] script = raw""" cd ${WORKSPACE}/srcdir/chafa-*/ if [[ "${target}" == *darwin* ]...
[ 3500, 45755, 32875, 198, 198, 3672, 796, 366, 1925, 28485, 1, 198, 9641, 796, 410, 1, 16, 13, 19, 13, 16, 1, 198, 198, 82, 2203, 796, 685, 198, 220, 220, 220, 20816, 7416, 7203, 5450, 1378, 24831, 73, 44038, 13, 2398, 14, 354, 2...
2.351085
507
""" ULMFiT - Text Classifier This is wrapper around the LanguageMode struct. It has three fields: vocab : contains the same vocabulary from the LanguageModel rnn_layers : contains same DroppedEmebeddings, LSTM (AWD_LSTM) and VarDrop layers of LanguageModel except for last softmax layer linear_layers ...
[ 37811, 198, 6239, 44, 10547, 51, 532, 8255, 5016, 7483, 198, 198, 1212, 318, 29908, 1088, 262, 15417, 19076, 2878, 13, 632, 468, 1115, 7032, 25, 198, 198, 18893, 397, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 4909, 262...
2.38677
3,855
## 2D Panels #==========================================================================================# abstract type AbstractPanel2D <: AbstractPanel end struct Panel2D{T <: Real} <: AbstractPanel2D p1 :: SVector{2,T} p2 :: SVector{2,T} end struct WakePanel2D{T <: Real} <: AbstractPanel2D p1 :: SVect...
[ 198, 2235, 362, 35, 5961, 1424, 198, 2, 23926, 4770, 2559, 855, 2, 198, 198, 397, 8709, 2099, 27741, 26639, 17, 35, 1279, 25, 27741, 26639, 886, 198, 198, 7249, 18810, 17, 35, 90, 51, 1279, 25, 6416, 92, 1279, 25, 27741, 26639, 17...
2.426029
1,798
################################################################################## # This file is part of ModelBaseEcon.jl # BSD 3-Clause License # Copyright (c) 2020, Bank of Canada # All rights reserved. ################################################################################## export Transformation, NoTrans...
[ 29113, 29113, 14468, 2235, 198, 2, 770, 2393, 318, 636, 286, 9104, 14881, 36, 1102, 13, 20362, 198, 2, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 15069, 357, 66, 8, 12131, 11, 5018, 286, 3340, 198, 2, 1439, 2489, 10395, 13, 19...
3.718704
679
mutable struct Model{T, TV<:AbstractVector{T}, TC<:AbstractVector{<:Function}} dim::Int objective::Function ineq_constraints::TC box_max::TV box_min::TV end GPUUtils.whichdevice(m::Model) = whichdevice(m.box_max) dim(m::Model) = m.dim min(m::Model, i::Integer) = m.box_min[i] max(m::Model, i::Intege...
[ 76, 18187, 2878, 9104, 90, 51, 11, 3195, 27, 25, 23839, 38469, 90, 51, 5512, 17283, 27, 25, 23839, 38469, 90, 27, 25, 22203, 11709, 198, 220, 220, 220, 5391, 3712, 5317, 198, 220, 220, 220, 9432, 3712, 22203, 198, 220, 220, 220, 2...
2.231539
1,598
#-------- Inverses of DPR1 function inv{T}(A::SymDPR1{T},i::Integer,tols::Vector{Float64}) # COMPUTES: inverse of a shifted SymDPR1 matrix A=diagm(A.D)+A.r*A.u*A.u', # inv(A-A.D[i]*I) which is a SymArrow. # Uses higher precision to compute top of the arrow element accurately, if # needed. # tols=...
[ 2, 982, 554, 690, 274, 286, 41176, 16, 198, 198, 8818, 800, 90, 51, 92, 7, 32, 3712, 43094, 35, 4805, 16, 90, 51, 5512, 72, 3712, 46541, 11, 83, 10220, 3712, 38469, 90, 43879, 2414, 30072, 628, 220, 220, 220, 1303, 24301, 3843, ...
1.659746
8,188
# Tests for Mamlmquist DEA Model @testset "MalmquistDEAModel" begin ## Test Mamlmquist DEA Model with 1 input and 1 output X = Array{Float64,3}(undef, 5, 1, 2) X[:, :, 1] = [2; 3; 5; 4; 4]; X[:, :, 2] = [1; 2; 4; 3; 4]; Y = Array{Float64,3}(undef, 5, 1, 2) Y[:, :, 1] = [1; 4; 6; 3; 5]; Y[:...
[ 2, 30307, 329, 29926, 75, 76, 30062, 28647, 9104, 198, 31, 9288, 2617, 366, 15029, 76, 30062, 7206, 2390, 375, 417, 1, 2221, 628, 220, 220, 220, 22492, 6208, 29926, 75, 76, 30062, 28647, 9104, 351, 352, 5128, 290, 352, 5072, 198, 22...
1.82359
1,950
# Implements node data types and associated helper functions export SumNode, ProductNode, CategoricalDistribution, IndicatorFunction, GaussianDistribution """ Node Data Structures Implement a labeled sparse matrix. """ abstract type Node end " Sum node data type " struct SumNode <: Node chi...
[ 2, 1846, 1154, 902, 10139, 1366, 3858, 290, 3917, 31904, 5499, 198, 39344, 220, 198, 220, 220, 220, 5060, 19667, 11, 220, 198, 220, 220, 220, 8721, 19667, 11, 198, 220, 220, 220, 327, 2397, 12409, 20344, 3890, 11, 198, 220, 220, 220...
2.827586
1,334
function petk06() # # M. Petkovic testing polynomials, page 146 # y = [-1.0*[1;1;1;1];3*[1;1;1];-im;-im]; p1 = reverse(poly(y).a) p2 = [1.0;-2;5]; p2 = conv(p2,p2); p = conv(p1,p2); z = [-1.0 4; 3 3; -im 2; 1+2*im 2; 1-2*im 2]; p, PolyZeros(z) end
[ 8818, 4273, 74, 3312, 3419, 198, 2, 198, 2, 337, 13, 4767, 74, 17215, 4856, 745, 6213, 296, 8231, 11, 2443, 22986, 198, 2, 198, 220, 220, 220, 331, 796, 25915, 16, 13, 15, 9, 58, 16, 26, 16, 26, 16, 26, 16, 11208, 18, 9, 58,...
1.630058
173
module TPT export TPTSystem, # Basic information ncomp, composition, numberdensity, totalnumberdensity, temperature, # Structural properties structurefactor, paircorrelation, cavityfunction, nndistance, # Interatomi...
[ 21412, 309, 11571, 201, 198, 201, 198, 39344, 24525, 4694, 6781, 11, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 1303, 14392, 1321, 201, 198, 220, 220, 220, 220, 220, 220, 299, 5589, 11, 201, 198, 220, 220, 220, 220, 220, 22...
2.128543
988
import SMC import Distributions using DataFrames include("hmm_serialization.jl") include("schema.jl") @everywhere begin using SMC using Distributions include("smc_samplers.jl") include("../aide.jl") end function generate_aide_estimates(hmm::HiddenMarkovModel, observati...
[ 11748, 9447, 34, 198, 11748, 46567, 507, 198, 3500, 6060, 35439, 198, 17256, 7203, 71, 3020, 62, 46911, 1634, 13, 20362, 4943, 198, 17256, 7203, 15952, 2611, 13, 20362, 4943, 198, 198, 31, 16833, 3003, 2221, 198, 220, 220, 220, 1262, ...
2.177498
2,062
## utility functions import OffsetArrays import ImageFiltering import ShiftedArrays export cov_avg! export boxsmooth! export outest_bounds # """ outest_bounds(cx,sx) -> px0 Helper function to find maximum padding in pixels required to accomodate all query points `cx` outside of the image size 1:`sx`. # Argument...
[ 2235, 10361, 5499, 198, 11748, 3242, 2617, 3163, 20477, 198, 11748, 7412, 11928, 20212, 198, 11748, 911, 21715, 3163, 20477, 198, 198, 39344, 39849, 62, 615, 70, 0, 198, 39344, 3091, 5796, 5226, 0, 198, 39344, 503, 395, 62, 65, 3733, ...
2.226147
1,897
# insert functions """ insert_boundary!(tier, time; split_at = 0) insert_boundary!(tg, num, time; split_at = 0) Insert a boundary at `time` in an interval `tier`, which can also be specified by its number in a `TextGrid`. This action splits an existing interval and increases the size of the tier by 1. The ke...
[ 2, 7550, 5499, 198, 198, 37811, 198, 220, 220, 220, 7550, 62, 7784, 560, 0, 7, 24948, 11, 640, 26, 6626, 62, 265, 796, 657, 8, 198, 220, 220, 220, 7550, 62, 7784, 560, 0, 7, 25297, 11, 997, 11, 640, 26, 6626, 62, 265, 796, 6...
2.859753
5,583
###################### # 1: The Julia type for ToricVarieties ###################### abstract type AbstractNormalToricVariety end struct NormalToricVariety <: AbstractNormalToricVariety polymakeNTV::Polymake.BigObject end export NormalToricVariety struct AffineNormalToricVariety <: AbstractNormalToricVarie...
[ 14468, 4242, 2235, 198, 2, 352, 25, 383, 22300, 2099, 329, 4022, 291, 19852, 9545, 198, 14468, 4242, 2235, 198, 397, 8709, 2099, 27741, 26447, 51, 8146, 19852, 1905, 886, 198, 198, 7249, 14435, 51, 8146, 19852, 1905, 1279, 25, 27741, ...
2.788588
2,436
# Download links in `assets.csv` dir = joinpath(@__DIR__, "Pluto", "frontend", "offline_assets") rm(dir, force=true, recursive=true) mkpath(dir) for url in readlines(joinpath(@__DIR__, "assets.csv") ) @info "Downloading: $url" file = touch(joinpath(dir, basename(url))) download(url, file) end
[ 2, 10472, 6117, 287, 4600, 19668, 13, 40664, 63, 198, 198, 15908, 796, 4654, 6978, 7, 31, 834, 34720, 834, 11, 366, 3646, 9390, 1600, 366, 8534, 437, 1600, 366, 2364, 1370, 62, 19668, 4943, 198, 26224, 7, 15908, 11, 2700, 28, 7942, ...
2.579832
119
import sbp err = sbp.MMS using Test using LinearAlgebra using DataStructures @testset "extract_vars" begin n = [4, 8, 12] data = Array(1:sum(n)) vars = OrderedDict("u" => n[1], "v" => n[2], "w" => n[3]) ans_u = Array(1:n[1]) ans_v = Array(n[1]+1:n[1] + n[2]) ans_w = Arra...
[ 11748, 264, 46583, 198, 8056, 796, 264, 46583, 13, 44, 5653, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 6060, 44909, 942, 198, 198, 31, 9288, 2617, 366, 2302, 974, 62, 85, 945, 1, 2221, 198, 220, 220, 220, 220, 220, ...
1.797781
811
{"timestamp": 1580591738.0, "score_count": 39747, "score": 7.45} {"timestamp": 1580205822.0, "score_count": 39008, "score": 7.45} {"timestamp": 1579597688.0, "score_count": 37448, "score": 7.46} {"timestamp": 1578990311.0, "score_count": 35377, "score": 7.46} {"timestamp": 1578377542.0, "score_count": 31908, "score": 7...
[ 4895, 16514, 27823, 1298, 1315, 1795, 3270, 1558, 2548, 13, 15, 11, 366, 26675, 62, 9127, 1298, 5014, 48882, 11, 366, 26675, 1298, 767, 13, 2231, 92, 198, 4895, 16514, 27823, 1298, 1315, 1795, 1238, 3365, 1828, 13, 15, 11, 366, 26675,...
2.358187
684
#================================ All kinds of functions related to pruning =================================# """ get_next_prune_constraint(com::CS.CoM, constraint_idxs_vec) Check which function will be called for pruning next. This is based on `constraint_idxs_vec`. The constraint with the lowest value is...
[ 2, 10052, 628, 220, 220, 220, 1439, 6982, 286, 5499, 3519, 284, 778, 46493, 198, 198, 10052, 46249, 198, 198, 37811, 198, 220, 220, 220, 651, 62, 19545, 62, 1050, 1726, 62, 1102, 2536, 2913, 7, 785, 3712, 7902, 13, 7222, 44, 11, 3...
2.185407
4,002
using SuiteSparseMatrixCollection using MatrixMarket using SuiteSparseGraphBLAS SuiteSparseGraphBLAS.gbset(SuiteSparseGraphBLAS.FORMAT, SuiteSparseGraphBLAS.BYROW) using BenchmarkTools using SparseArrays using LinearAlgebra include("tc.jl") include("pr.jl") graphs = [ #"karate", #"com-Youtube", #"as-Skitter...
[ 3500, 26264, 50, 29572, 46912, 36307, 198, 3500, 24936, 27470, 198, 3500, 26264, 50, 29572, 37065, 9148, 1921, 198, 5606, 578, 50, 29572, 37065, 9148, 1921, 13, 70, 1443, 316, 7, 5606, 578, 50, 29572, 37065, 9148, 1921, 13, 21389, 1404,...
2.270506
573
### A Pluto.jl notebook ### # v0.17.4 using Markdown using InteractiveUtils # ╔═╡ 3668f786-9597-11eb-01a1-87d34b49eef9 begin #packages for I/O, interpolation, etc using MITgcmTools, MeshArrays, Plots, PlutoUI PICKUP_hs94_download() 🏁 = "🏁" "Downloads and packages : complete." end # ╔═╡ 19095067-33f5-495...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1558, 13, 19, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 513, 35809, 69, 46302, 12, 24, 43239, 12, 1157,...
1.859883
24,815
# MIT License # Copyright (c) Microsoft Corporation. # 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, modify, mer...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366...
2.19683
4,984
using Distributed using Images using FileIO using Mmap # calculate a distributed fractal width = 40000 height = 20000 rmin = -2.5 rmax = 1.5 imin = -1.25 imax = 1.25 iter = 500 epsilon = 0.25 mapfile = "zset-$(width)-$(height)" s = open(mapfile) n = read(s, Int) println("size of zset is $n") if n != (width * heig...
[ 3500, 4307, 6169, 198, 3500, 5382, 198, 3500, 9220, 9399, 198, 3500, 337, 8899, 628, 198, 2, 15284, 257, 9387, 12999, 282, 198, 10394, 796, 604, 2388, 198, 17015, 796, 939, 405, 198, 198, 81, 1084, 796, 532, 17, 13, 20, 198, 81, 9...
2.458774
473
const POWER_SYSTEM_DESCRIPTOR_FILE = joinpath(dirname(pathof(PowerSystems)), "descriptors", "power_system_inputs.json") const INPUT_CATEGORY_NAMES = [ ("branch", InputCategory.BRANCH), ("bus", InputCategory.BUS), ("dc_branch", InputCategory.DC_BRANCH), ("gen", InputCategory.GENERATOR), ("load"...
[ 198, 9979, 40295, 62, 23060, 25361, 62, 30910, 36584, 32961, 62, 25664, 796, 198, 220, 220, 220, 4654, 6978, 7, 15908, 3672, 7, 6978, 1659, 7, 13434, 11964, 82, 36911, 366, 20147, 1968, 669, 1600, 366, 6477, 62, 10057, 62, 15414, 82, ...
2.182766
25,333
using Inequality using StatsBase using Test using DataFrames df_1 = DataFrame(v = [8,5,1,3,5,6,7,6,3], w = collect(0.1:0.1:0.9)) df_2 = DataFrame(v = repeat([8,5,1,3,5,6,7,6,3],2), w = repeat(collect(0.1:0.1:0.9),2), group = [1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2]) @t...
[ 3500, 554, 48203, 198, 3500, 20595, 14881, 198, 3500, 6208, 198, 3500, 6060, 35439, 628, 198, 7568, 62, 16, 796, 6060, 19778, 7, 85, 796, 685, 23, 11, 20, 11, 16, 11, 18, 11, 20, 11, 21, 11, 22, 11, 21, 11, 18, 4357, 198, 220,...
1.7407
13,656
module StructuredQueries using Compat export Cursor, Grouped, @with, source, graph include("utils.jl") # grouped include("grouped/grouped.jl") include("grouped/show.jl") #verbs include("verbs/verbs.jl") include("verbs/primitives.jl") include("verbs/expr/assignment_expr_ops.jl") in...
[ 21412, 32112, 1522, 4507, 10640, 198, 198, 3500, 3082, 265, 198, 198, 39344, 220, 327, 21471, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4912, 276, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 4480, 11, 198, 220, 220, 220, 2...
2.62963
351
# This file is a part of Julia. License is MIT: http://julialang.org/license struct Rational{T<:Integer} <: Real num::T den::T function Rational{T}(num::Integer, den::Integer) where T<:Integer num == den == zero(T) && throw(ArgumentError("invalid rational: zero($T)//zero($T)")) g = den < 0...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 2638, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 7249, 46863, 90, 51, 27, 25, 46541, 92, 1279, 25, 6416, 198, 220, 220, 220, 997, 3712, 51, 198, 22...
1.999233
6,521
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule CGAL2_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("CGAL2") JLLWrappers.@generate_main_file("CGAL2", UUID("a133c068-ba04-5466-9207-ec1c2ac43820")) end # module CGAL2_jll
[ 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412, 29925, 1847, 17, 62, 73, 297, 198, 3500, 7308, 198, 3500, 7308, 25, 471, 27586, 198, 11748, 449, 3069, 36918,...
2.483333
120
function warning_callback(message::String) global TEST_CALLBACK = true error("checking that error are supported") end @testset "Errors" begin err = ChemfilesError("oops") iobuf = IOBuffer() show(iobuf, err) @test String(iobuf.data[1:(19 + length(err.message))]) == "\"Chemfiles error: oops\"" ...
[ 8818, 6509, 62, 47423, 7, 20500, 3712, 10100, 8, 198, 220, 220, 220, 3298, 43001, 62, 34, 7036, 31098, 796, 2081, 198, 220, 220, 220, 4049, 7203, 41004, 326, 4049, 389, 4855, 4943, 198, 437, 198, 198, 31, 9288, 2617, 366, 9139, 5965...
2.460177
904
using PySerial using Base.Test @test typeof(list_ports()) == Array{Any,1}
[ 3500, 9485, 32634, 198, 3500, 7308, 13, 14402, 198, 198, 31, 9288, 2099, 1659, 7, 4868, 62, 3742, 28955, 6624, 15690, 90, 7149, 11, 16, 92, 198 ]
2.777778
27
using KiteConnect using Test @test_throws ArgumentError KiteConnect.ltp("INFY")
[ 198, 3500, 509, 578, 13313, 198, 3500, 6208, 198, 198, 31, 9288, 62, 400, 8516, 45751, 12331, 509, 578, 13313, 13, 2528, 79, 7203, 1268, 43833, 4943, 628 ]
2.964286
28
# ---------------------- # -- read -- # ---------------------- function read_nodenum(skipnum) """ xmax : 仮想セルも含めたnodeのxの数 ymax : 仮想セルも含めたnodeのyの数 """ fff=[] open("grid/nodesnum", "r") do f fff=read(f,String) end fff=split(fff,"\n",keepempty=false) num_nodes=leng...
[ 2, 41436, 438, 198, 2, 1377, 1100, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1377, 198, 2, 41436, 438, 198, 8818, 1100, 62, 77, 375, 44709, 7, 48267, 22510, 8, 198, 220, 220, 220, 37227, 220, 198, 220, 220, 220...
1.837061
1,878
# This file describes how we decide which logger (e.g. LogText vs LogValue vs LogHistograms) # to use for what data, and any preprocessing """ preprocess(name, val, data) This method takes a tag `name` and the value `val::T` pair. If type `T` can be serialized to TensorBoard then the pair is pushed to `data`, oth...
[ 2, 770, 2393, 8477, 703, 356, 5409, 543, 49706, 357, 68, 13, 70, 13, 5972, 8206, 3691, 5972, 11395, 3691, 5972, 13749, 26836, 8, 198, 2, 284, 779, 329, 644, 1366, 11, 290, 597, 662, 36948, 198, 198, 37811, 198, 220, 220, 220, 662,...
2.941485
1,333
function solve() a = readline() a == uppercase(a) ? "A" : "a" end println(solve())
[ 8818, 8494, 3419, 198, 220, 220, 220, 257, 796, 1100, 1370, 3419, 198, 220, 220, 220, 257, 6624, 334, 39921, 589, 7, 64, 8, 5633, 366, 32, 1, 1058, 366, 64, 1, 198, 437, 198, 198, 35235, 7, 82, 6442, 28955, 198 ]
2.190476
42
using BinaryBuilder, Pkg name = "GLPK" version = v"5.0" # Collection of sources required to build GLPK sources = [ ArchiveSource("http://ftpmirror.gnu.org/gnu/glpk/glpk-$(version.major).$(version.minor).tar.gz", "4a1013eebb50f728fc601bdd833b0b2870333c3b3e5a816eeba921d95bec6f15"), ] # Bash recip...
[ 3500, 45755, 32875, 11, 350, 10025, 198, 198, 3672, 796, 366, 8763, 40492, 1, 198, 9641, 796, 410, 1, 20, 13, 15, 1, 198, 198, 2, 12251, 286, 4237, 2672, 284, 1382, 10188, 40492, 198, 82, 2203, 796, 685, 198, 220, 220, 220, 20816,...
2.638393
448
module UI import GLFW using ModernGL include("gltools.jl") GLFW.Init() # OS X-specific GLFW hints to initialize the correct version of OpenGL @osx_only begin GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3) GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 2) GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_C...
[ 21412, 12454, 198, 220, 198, 11748, 10188, 24160, 198, 3500, 12495, 8763, 198, 198, 17256, 7203, 70, 2528, 10141, 13, 20362, 4943, 198, 198, 8763, 24160, 13, 31768, 3419, 198, 220, 198, 2, 7294, 1395, 12, 11423, 10188, 24160, 20269, 284...
2.425971
824
abstract type AbstractBC{T} <: AbstractDiffEqAffineOperator{T} end abstract type AtomicBC{T} <: AbstractBC{T} end """ Robin, General, and in general Neumann, Dirichlet and Bridge BCs are not necessarily linear operators. Instead, they are affine operators, with a constant term Q*x = Qa*x + Qb. """ abstract type Aff...
[ 397, 8709, 2099, 27741, 2749, 90, 51, 92, 1279, 25, 27741, 28813, 36, 80, 35191, 500, 18843, 1352, 90, 51, 92, 886, 628, 198, 397, 8709, 2099, 28976, 2749, 90, 51, 92, 1279, 25, 27741, 2749, 90, 51, 92, 886, 198, 198, 37811, 198, ...
2.220544
3,972
const HubbardConf = Array{Int8, 2} # conf === hsfield === discrete Hubbard Stratonovich field (Hirsch field) const HubbardDistribution = Int8[-1,1] """ Famous attractive (negative U) Hubbard model on a cubic lattice. Discrete Hubbard Stratonovich transformation (Hirsch transformation) in the density/charge channel, su...
[ 9979, 34342, 18546, 796, 15690, 90, 5317, 23, 11, 362, 92, 1303, 1013, 24844, 289, 82, 3245, 24844, 28810, 34342, 4285, 13951, 18198, 2214, 357, 39, 47108, 2214, 8, 198, 9979, 34342, 20344, 3890, 796, 2558, 23, 58, 12, 16, 11, 16, 6...
2.653783
1,837
export expandModelNearest, getSimilarLinearModel, addAbsorbingLayer export addAbsorbingLayer, smoothModel, smooth3 export velocityToSlowSquared,slowSquaredToVelocity,velocityToSlow,slowToSlowSquared,slowSquaredToSlow export slowToLeveledSlowSquared,getModelInvNewton using Statistics using jInv.Mesh function slowToLev...
[ 39344, 4292, 17633, 8199, 12423, 11, 651, 18925, 14993, 451, 17633, 11, 751, 24849, 273, 4623, 49925, 198, 39344, 751, 24849, 273, 4623, 49925, 11, 7209, 17633, 11, 7209, 18, 198, 39344, 15432, 2514, 36423, 22266, 1144, 11, 38246, 22266, ...
1.895738
3,050
using Test using MarketData using TimeSeries using MarketTechnicals @testset "Levels" begin @testset "floor pivots" begin # values verified by various website calculators @test isapprox(values(floorpivots(ohlc)[:r3])[1] , 123.310, atol=.01) @test isapprox(values(floorpivots(ohlc)[:r2])[1] , 119.52...
[ 3500, 6208, 198, 198, 3500, 5991, 6601, 198, 3500, 3862, 27996, 198, 198, 3500, 5991, 25574, 20155, 628, 198, 31, 9288, 2617, 366, 4971, 82, 1, 2221, 628, 198, 31, 9288, 2617, 366, 28300, 16767, 1747, 1, 2221, 198, 220, 220, 220, 13...
2.117955
763
""" # Description Rewrite an expression to remove all use of backticks. # Arguments 1. `e::Any`: An expression. # Return Values 1. `e::Any`: An expression in which backticks have been removed. # Examples ``` julia> remove_backticks(:(`mean(a)`)) :(mean(a)) ``` """ function remove_backticks(@nospecialize(e::Any)...
[ 198, 37811, 198, 2, 12489, 198, 198, 30003, 6525, 281, 5408, 284, 4781, 477, 779, 286, 736, 83, 3378, 13, 198, 198, 2, 20559, 2886, 198, 198, 16, 13, 4600, 68, 3712, 7149, 63, 25, 1052, 5408, 13, 198, 198, 2, 8229, 27068, 198, 1...
2.131944
288
using Measures const CategoricalAesthetic = Union{Nothing, IndirectArray} const NumericalAesthetic = Union{Nothing, AbstractMatrix, AbstractVector} const NumericalOrCategoricalAesthetic = Union{CategoricalAesthetic, NumericalAesthetic} @varset Aesthetics begin x, Union{NumericalOrCategori...
[ 3500, 45040, 198, 198, 9979, 327, 2397, 12409, 32, 37531, 796, 198, 220, 220, 220, 4479, 90, 18465, 11, 1423, 1060, 19182, 92, 198, 198, 9979, 399, 6975, 605, 32, 37531, 796, 198, 220, 220, 220, 4479, 90, 18465, 11, 27741, 46912, 11...
2.07668
6,964
export RobotBasedMagneticFieldStaticProtocolParams, RobotBasedMagneticFieldStaticProtocol, measurement, filename Base.@kwdef struct RobotBasedMagneticFieldStaticProtocolParams <: RobotBasedProtocolParams positions::Union{Positions, Missing} = missing postMoveWaitTime::typeof(1.0u"s") = 0.5u"s" numCooldowns::Inte...
[ 39344, 16071, 15001, 13436, 9833, 15878, 45442, 19703, 4668, 10044, 4105, 11, 16071, 15001, 13436, 9833, 15878, 45442, 19703, 4668, 11, 15558, 11, 29472, 198, 198, 14881, 13, 31, 46265, 4299, 2878, 16071, 15001, 13436, 9833, 15878, 45442, 1...
3.375874
1,144
doc""" tanh(x::Var) Hyperbolic tangent function. """ Base.tanh(x::Var) = Var(tanh(x.data), ∇tanh!, (x,)) Base.tanh(x::Array) = tanh.(x) Base.tanh(x::CuArray) = CUDNN.tanh(x) Base.tanh(x::Node) = Node(tanh, (x,)) function ∇tanh!(y::Var, x::Var) isnothing(x.grad) && return ∇tanh!(y.data, y.grad, x.data, x.g...
[ 15390, 37811, 198, 220, 220, 220, 25706, 71, 7, 87, 3712, 19852, 8, 198, 198, 38197, 65, 4160, 13875, 298, 2163, 13, 198, 37811, 198, 14881, 13, 38006, 71, 7, 87, 3712, 19852, 8, 796, 12372, 7, 38006, 71, 7, 87, 13, 7890, 828, 1...
1.878594
313
""" static_analysis(assembly; kwargs...) Perform a static analysis of the system of nonlinear beams contained in `assembly`. Return the resulting system and a flag indicating whether the iteration procedure converged. # Keyword Arguments - `prescribed_conditions = Dict{Int,PrescribedConditions{Float64}}()`: ...
[ 37811, 198, 220, 220, 220, 9037, 62, 20930, 7, 41873, 26, 479, 86, 22046, 23029, 198, 198, 5990, 687, 257, 9037, 3781, 286, 262, 1080, 286, 1729, 29127, 26741, 7763, 287, 198, 63, 41873, 44646, 8229, 262, 7186, 1080, 290, 257, 6056, ...
2.498696
16,489
# Multidimensional arrays z = zeros(Float64, 2, 3) println(typeof(z)) # Declare array of dimension n x m n, m = 2, 4 arr = Array{Int}(undef, 2, 4) println(arr) println(size(arr)) arr2 = Array{Int}(undef, 3, 2, 2) println(arr2) println(size(arr2)) s = ones(String, 1, 3) println(s) # Note that s is considered a "row ma...
[ 2, 7854, 312, 16198, 26515, 198, 89, 796, 1976, 27498, 7, 43879, 2414, 11, 362, 11, 513, 8, 198, 35235, 7, 4906, 1659, 7, 89, 4008, 198, 198, 2, 16691, 533, 7177, 286, 15793, 299, 2124, 285, 198, 77, 11, 285, 796, 362, 11, 604, ...
2.369099
233
function randuint() :: UInt32 Base.llvmcall(( """ define i32 @randuint() #0 { %1 = tail call { i32, i32 } @llvm.x86.rdrand.32() #1 %2 = extractvalue { i32, i32 } %1, 0 ret i32 %2 } ; Function Attrs: nounwind declare { i32, i32 } @llvm.x86.rdrand.32() #1 attributes #0 = { nounwind ssp uwtable "less-precise-...
[ 198, 8818, 43720, 28611, 3419, 7904, 471, 5317, 2624, 198, 220, 220, 220, 7308, 13, 297, 14761, 13345, 19510, 198, 37811, 198, 13086, 1312, 2624, 2488, 25192, 28611, 3419, 1303, 15, 1391, 198, 220, 4064, 16, 796, 7894, 869, 1391, 1312, ...
2.127907
344
using LazyTaylorSeries using Test @testset "Basic usage" begin t = Taylor1((t, i) -> (i == 1) ? 1.0 : 0.0, Float64[]) # define variable t2 = Taylor1((t, i) -> (i == 1) ? 1.0 : 0.0, Dict{Int,Float64}()) # define variable @test t[0] == 0 == t2[0] @test t[1] == 1 == t2[1] @test t[2] == 0 == t2[2]...
[ 3500, 406, 12582, 29907, 27996, 198, 3500, 6208, 628, 198, 31, 9288, 2617, 366, 26416, 8748, 1, 2221, 198, 220, 220, 220, 256, 220, 796, 8121, 16, 19510, 83, 11, 1312, 8, 4613, 357, 72, 6624, 352, 8, 5633, 352, 13, 15, 1058, 657, ...
1.78553
387
using Documenter, MyPkg1 makedocs(; modules=[MyPkg1], format=Documenter.HTML(), pages=[ "Home" => "index.md", ], repo="https://github.com/XiaodongMa-MRI/MyPkg1.jl/blob/{commit}{path}#L{line}", sitename="MyPkg1.jl", authors="Xiaodong Ma", assets=String[], ) deploydocs(; repo...
[ 3500, 16854, 263, 11, 2011, 47, 10025, 16, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 3666, 47, 10025, 16, 4357, 198, 220, 220, 220, 5794, 28, 24941, 263, 13, 28656, 22784, 198, 220, 220, 220, 5468, 4188...
2.022346
179
import Base include("production.jl") """ A grammar, represented as a tuple ``G=(N,T,P,S)`` """ struct Grammar "The nonterminal symbols Set" N::Set "The terminal symbols Set" T::Set "The productions Array" P::Array "The starting symbol" S::AbstractString iscontextfree::Bool end ###...
[ 11748, 7308, 198, 198, 17256, 7203, 25493, 13, 20362, 4943, 198, 198, 37811, 198, 32, 23491, 11, 7997, 355, 257, 46545, 7559, 38, 16193, 45, 11, 51, 11, 47, 11, 50, 8, 15506, 198, 37811, 198, 7249, 20159, 3876, 198, 220, 220, 220, ...
2.366938
1,349
const ALWB_URI = URI(scheme="http", host="www.bom.gov.au", path="/jsp/awra/thredds/fileServer/AWRACMS") abstract type DataMode end """ Values <: DataMode Get the dataset as regular measured values. """ struct Values <: DataMode end """ Deciles <: DataMode Get the dataset in relative deciles. """ struct De...
[ 198, 9979, 8355, 45607, 62, 47269, 796, 43975, 7, 15952, 1326, 2625, 4023, 1600, 2583, 2625, 2503, 13, 65, 296, 13, 9567, 13, 559, 1600, 3108, 35922, 73, 2777, 14, 707, 430, 14, 400, 445, 9310, 14, 7753, 10697, 14, 12298, 49, 2246, ...
2.378389
2,471
""" scattering_field(args) Returns a function which gives the average scattering coefficients for any vector `x` inside the material. This field is defined by Equation (3.13) in [AL Gower and G Kristensson, "Effective waves for random three-dimensional particulate materials", (2021)](https://arxiv.org/pdf/2010.00...
[ 198, 37811, 198, 220, 220, 220, 45765, 62, 3245, 7, 22046, 8, 198, 198, 35561, 257, 2163, 543, 3607, 262, 2811, 45765, 44036, 329, 597, 15879, 4600, 87, 63, 2641, 262, 2587, 13, 770, 2214, 318, 5447, 416, 7889, 341, 357, 18, 13, 1...
2.881301
2,460
############## # Owner Type # ############## @ghdef mutable struct Owner typ::Union{String, Nothing} email::Union{String, Nothing} name::Union{String, Nothing} login::Union{String, Nothing} bio::Union{String, Nothing} company::Union{String, Nothing} location::Union{String, Nothing} avat...
[ 7804, 4242, 2235, 198, 2, 23853, 5994, 1303, 198, 7804, 4242, 2235, 198, 198, 31, 456, 4299, 4517, 540, 2878, 23853, 198, 220, 220, 220, 2170, 3712, 38176, 90, 10100, 11, 10528, 92, 198, 220, 220, 220, 3053, 3712, 38176, 90, 10100, ...
2.7671
1,769
################################ ## Generic DataFile interface ## ################################ # This provides common methods that could be applicable to any # interface for reading variables out of a file, e.g. HDF5, # JLD, or MAT files. This is the super class of HDF5File, HDF5Group, # JldFile, JldGroup, Matlabv5...
[ 29113, 198, 2235, 42044, 6060, 8979, 7071, 22492, 198, 29113, 198, 2, 770, 3769, 2219, 5050, 326, 714, 307, 9723, 284, 597, 198, 2, 7071, 329, 3555, 9633, 503, 286, 257, 2393, 11, 304, 13, 70, 13, 5572, 37, 20, 11, 198, 2, 449, ...
2.536337
688
mutable struct LUFactorization{Tv,Ti} <: AbstractLUFactorization{Tv,Ti} A::Union{Nothing,ExtendableSparseMatrix{Tv,Ti}} fact::Union{Nothing,SuiteSparse.UMFPACK.UmfpackLU{Tv,Ti}} phash::UInt64 end """ ``` LUFactorization(;valuetype=Float64, indextype=Int64) LUFactorization(matrix) ``` Default Juli...
[ 76, 18187, 2878, 406, 36820, 11218, 1634, 90, 51, 85, 11, 40533, 92, 1279, 25, 27741, 43, 36820, 11218, 1634, 90, 51, 85, 11, 40533, 92, 198, 220, 220, 220, 317, 3712, 38176, 90, 18465, 11, 11627, 437, 540, 50, 29572, 46912, 90, 5...
2.205882
340
# CEP """ setup_cep_opt_sets(ts_data::ClustData,opt_data::CEPData,opt_config::Dict{String,Any}) fetching sets from the time series (ts_data) and capacity expansion model data (opt_data) and returning Dictionary with Sets as Symbols """ function setup_opt_cep_set(ts_data::ClustData, opt_d...
[ 2, 327, 8905, 198, 37811, 198, 220, 220, 220, 9058, 62, 344, 79, 62, 8738, 62, 28709, 7, 912, 62, 7890, 3712, 2601, 436, 6601, 11, 8738, 62, 7890, 3712, 5222, 5760, 1045, 11, 8738, 62, 11250, 3712, 35, 713, 90, 10100, 11, 7149, ...
2.313312
15,467
# requires LinearAlgebra, Images, ImageView include("GrahamScan.jl") using ImageView, Images using SparseArrays using Random using LinearAlgebra using Statistics function FindRoughEdge(A) # Find the rough coordinates of the non-horizontal edges of shapes in A B = Float64.(A); abs.(B[:, 2:end] - B[:, 1:en...
[ 2, 4433, 44800, 2348, 29230, 11, 5382, 11, 7412, 7680, 198, 198, 17256, 7203, 45821, 33351, 13, 20362, 4943, 198, 198, 3500, 7412, 7680, 11, 5382, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 14534, 198, 3500, 44800, 2348, 29230, 198...
2.299646
1,979
module NamedIndicesMeta using NamedDims, ImageCore, ImageMetadata, ImageAxes, FieldProperties, AxisIndices, LightGraphs, SimpleWeightedGraphs, Reexport, MappedArrays using Base: tail import ImageAxes: timeaxis, timedim, colordim, checknames, isstreamedaxis export NamedDimsArray, AxisIndicesArray, N...
[ 21412, 34441, 5497, 1063, 48526, 198, 198, 3500, 34441, 35, 12078, 11, 7412, 14055, 11, 7412, 9171, 14706, 11, 7412, 31554, 274, 11, 7663, 2964, 18200, 11, 198, 220, 220, 220, 220, 220, 38349, 5497, 1063, 11, 4401, 37065, 82, 11, 1742...
2.782609
368
### A Pluto.jl notebook ### # v0.14.4 using Markdown using InteractiveUtils # ╔═╡ d01a9b4f-8b55-4607-abb6-717d227fcd48 begin using PlutoUI, LinearAlgebra PlutoUI.TableOfContents(aside=true) end # ╔═╡ 479a40d9-b81e-442b-9962-f972b110a4dd # Pkg.checkout("SpecialMatrices") using SpecialMatrices # ╔═╡ 574e86bb-159c-4...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1415, 13, 19, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 288, 486, 64, 24, 65, 19, 69, 12, 23, 65, 2...
1.828712
15,798
# This file is a part of Julia. License is MIT: https://julialang.org/license using Test # code_native / code_llvm (issue #8239) # It's hard to really test these, but just running them should be # sufficient to catch segfault bugs. module ReflectionTest using Test, Random function test_ir_reflection(freflect, f, ty...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 3500, 6208, 198, 198, 2, 2438, 62, 30191, 1220, 2438, 62, 297, 14761, 357, 21949, 1303, 23, 23516, 8...
2.341793
13,751
using Plots include("src/pwl_approx.jl") ## Define a submodular cardinality based function via Combined gadget k = 2 w = random_scb_function(k::Int64) w = 10*w/maximum(w) pl = scatter(0:k,w,legend = false, xticks = 0:k) epsi = 10.0 z0, zk, a, b, cgf = SubCardFun_to_CGF_weights(w,epsi,false) Jtrue = length(a) + 1 J =...
[ 3500, 1345, 1747, 198, 198, 17256, 7203, 10677, 14, 79, 40989, 62, 1324, 13907, 13, 20362, 4943, 198, 198, 2235, 2896, 500, 257, 850, 4666, 934, 38691, 414, 1912, 2163, 2884, 32028, 42892, 198, 74, 796, 362, 198, 86, 796, 4738, 62, ...
2.097276
257
@enum Shape CIRCLE RECTANGLE ROUNDED_RECTANGLE DISTANCEFIELD TRIANGLE @enum CubeSides TOP BOTTOM FRONT BACK RIGHT LEFT struct Grid{N, T <: AbstractRange} dims::NTuple{N, T} end Base.ndims(::Grid{N,T}) where {N,T} = N Grid(ranges::AbstractRange...) = Grid(ranges) function Grid(a::Array{T, N}) where {N, T} s = ...
[ 31, 44709, 25959, 327, 4663, 29931, 371, 9782, 15567, 2538, 371, 15919, 1961, 62, 23988, 15567, 2538, 360, 8808, 19240, 44603, 37679, 15567, 2538, 198, 31, 44709, 23315, 50, 1460, 28662, 347, 29089, 2662, 8782, 35830, 28767, 33621, 12509, ...
2.286923
1,537
# Variable reference. mutable struct VariableNode <: AbstractSQLNode name::Symbol VariableNode(; name::Union{Symbol, AbstractString}) = new(Symbol(name)) end VariableNode(name) = VariableNode(name = name) """ Var(; name) Var(name) Var.name Var."name" Var[name] Var["...
[ 2, 35748, 4941, 13, 198, 198, 76, 18187, 2878, 35748, 19667, 1279, 25, 27741, 17861, 19667, 198, 220, 220, 220, 1438, 3712, 13940, 23650, 628, 220, 220, 220, 35748, 19667, 7, 26, 1438, 3712, 38176, 90, 13940, 23650, 11, 27741, 10100, ...
2.420949
506
# packages - using Dates using Optim using JSON using DataFrames using Statistics using LsqFit using Reexport @reexport using PooksoftBase # include my code - include("./base/Types.jl") include("./base/Checks.jl") include("./base/Intrinsic.jl") include("./base/Binary.jl") include("./base/Ternary.jl") include("./base/G...
[ 2, 10392, 532, 198, 3500, 44712, 198, 3500, 30011, 198, 3500, 19449, 198, 3500, 6060, 35439, 198, 3500, 14370, 198, 3500, 406, 31166, 31805, 198, 3500, 797, 39344, 198, 31, 631, 87, 634, 1262, 350, 566, 4215, 14881, 198, 198, 2, 2291,...
2.661458
192
module test_Variables import ModiaMath # Desired: # using Test # # In order that Test needs not to be defined in the user environment, it is included via ModiaMath: @static if VERSION < v"0.7.0-DEV.2005" using Base.Test else using ModiaMath.Test end mutable struct Revolute <: ModiaMath.AbstractComponentWi...
[ 21412, 1332, 62, 23907, 2977, 198, 198, 11748, 3401, 544, 37372, 198, 198, 2, 2935, 1202, 25, 198, 2, 220, 220, 1262, 6208, 198, 2, 198, 2, 554, 1502, 326, 6208, 2476, 407, 284, 307, 5447, 287, 262, 2836, 2858, 11, 340, 318, 3017,...
1.942417
5,783
# Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder name = "iso_codes" version = v"4.3" # Collection of sources required to build iso-codes sources = [ "https://salsa.debian.org/iso-codes-team/iso-codes/-/archiv...
[ 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, 284, 766, 257, 8748, 3275, 13, 198, 3500, 45755, 32875, 198, 198, 3672, 796,...
3.065491
397
# This file is a part of TypeDBClient. License is MIT: https://github.com/Humans-of-Julia/TypeDBClient.jl/blob/main/LICENSE # --------------------------------------------------------------------------------- module DatabaseManagerRequestBuilder using ..TypeDBClient: Proto create_req(name::String) = Proto.CoreDataba...
[ 2, 770, 2393, 318, 257, 636, 286, 5994, 11012, 11792, 13, 220, 13789, 318, 17168, 25, 3740, 1378, 12567, 13, 785, 14, 32661, 504, 12, 1659, 12, 16980, 544, 14, 6030, 11012, 11792, 13, 20362, 14, 2436, 672, 14, 12417, 14, 43, 2149, ...
2.589072
6,680