content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>UnofficialJuliaMirrorSnapshots/Gridap.jl-56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e<filename>test/CellValuesTests/ConstantCellValuesTests.jl module ConstantCellValuesTests using Test using Gridap using TensorValues using ..MapsMocks # Constructors l = 10 sv = 1.0 scv = ConstantCellNumber(sv,l) sv2 = 1.1 scv2 = ...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 41339, 499, 13, 20362, 12, 3980, 67, 19, 69, 17, 68, 24, 12, 22, 18213, 16, 12, 3365, 2598, 12, 24, 12993, 21, 12, 65, 24, 66, 4349, 6888, 22, 344, ...
2.167121
1,101
<filename>examples/TwoD_block.jl using WaterLily using StaticArrays function block(L=2^5;Re=250,U=1,amp=0,ϵ=0.5,thk=2ϵ+√2) # Set viscosity ν=U*L/Re # Create dynamic block geometry function sdf(x,t) y = x .- SVector(0.,clamp(x[2],-L/2,L/2)) √sum(abs2,y)-thk/2 end function map(x,...
[ 27, 34345, 29, 1069, 12629, 14, 7571, 35, 62, 9967, 13, 20362, 198, 3500, 5638, 43, 813, 198, 3500, 36125, 3163, 20477, 198, 198, 8818, 2512, 7, 43, 28, 17, 61, 20, 26, 3041, 28, 9031, 11, 52, 28, 16, 11, 696, 28, 15, 11, 139,...
1.91055
436
using DifferentialEquations: ODEProblem, DifferentialEquations @inline function __integrate(u::Function, domain::Tuple{T,T}; kwargs...) where T <: AbstractFloat prob = ODEProblem( (f, p, τ) -> u(τ), zero(T), domain) return DifferentialEquations.solve(prob; kwargs...) end @inline function __getNorm(u::Function, c::C...
[ 3500, 20615, 498, 23588, 602, 25, 440, 7206, 40781, 11, 20615, 498, 23588, 602, 198, 198, 31, 45145, 2163, 11593, 18908, 4873, 7, 84, 3712, 22203, 11, 7386, 3712, 51, 29291, 90, 51, 11, 51, 19629, 479, 86, 22046, 23029, 810, 309, 12...
2.520149
1,613
## Day 22: Reactor Reboot ## ############################ struct Instr is_on::Bool x1::Int x2::Int y1::Int y2::Int z1::Int z2::Int end function parse_line(line::String)::Instr m = match(r"(on|off) x=(-?[0-9]+)..(-?[0-9]+),y=(-?[0-9]+)..(-?[0-9]+),z=(-?[0-9]+)..(-?[0-9]+)", line) I...
[ 2235, 3596, 2534, 25, 797, 11218, 50204, 22492, 198, 14468, 7804, 4242, 198, 198, 7249, 27901, 198, 220, 220, 220, 318, 62, 261, 3712, 33, 970, 198, 220, 220, 220, 2124, 16, 3712, 5317, 198, 220, 220, 220, 2124, 17, 3712, 5317, 198,...
2.094887
2,034
# Julia wrapper for header: /usr/include/scip/scip_dialog.h # Automatically generated using Clang.jl wrap_c function SCIPincludeDialog(scip, dialog, dialogcopy, dialogexec, dialogdesc, dialogfree, name, desc, issubmenu, dialogdata) ccall((:SCIPincludeDialog, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{Ptr{SCIP_DIALO...
[ 2, 22300, 29908, 329, 13639, 25, 1220, 14629, 14, 17256, 14, 1416, 541, 14, 1416, 541, 62, 38969, 519, 13, 71, 198, 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 628, 198, 8818, 6374, 4061, 17256, 44204, 7, 1416, ...
2.452855
753
module TestBasic using ConicHulls, ConicHulls.Common, ConicHulls.Dets, ConicHulls.Hulls using ConicHulls.RefHull using ConicHulls.Hulls.dominates using ConicHulls.Insertion.find_dominated_facet function printhull(hull::ConicHull) println("ConicHull:") for facet in hull.facets println(" ", facet) ...
[ 21412, 6208, 26416, 198, 198, 3500, 1482, 291, 39, 724, 82, 11, 1482, 291, 39, 724, 82, 13, 17227, 11, 1482, 291, 39, 724, 82, 13, 35, 1039, 11, 1482, 291, 39, 724, 82, 13, 39, 724, 82, 198, 3500, 1482, 291, 39, 724, 82, 13, ...
2.120732
820
<gh_stars>1-10 module HTM using Hyperscript export @htm_str const UENDTAG = "<//>" include("util.jl") include("parse.jl") """ create_element(tag, attrs[, children...]) Create a DOM element. This is an alternative syntax and (currently) serves as a rather trivial abstraction layer inspired by [`React.createEle...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 7154, 44, 198, 198, 3500, 21209, 364, 6519, 198, 39344, 2488, 19211, 62, 2536, 198, 198, 9979, 471, 10619, 42197, 796, 33490, 1003, 24618, 198, 198, 17256, 7203, 22602, 13, 20362, 4943,...
2.510691
2,011
using Printf parse_line(line) = [c == '.' ? false : true for c in line] function load(path) # NOTE: I do not know why vcat doesn't work here, but this is just the input loader, so I don't # care too much hcat(map(parse_line, readlines(path))...)' end function check_slopes(data) y = 1 # NOTE: We could do th...
[ 3500, 12578, 69, 198, 198, 29572, 62, 1370, 7, 1370, 8, 796, 685, 66, 6624, 705, 2637, 5633, 3991, 1058, 2081, 329, 269, 287, 1627, 60, 198, 198, 8818, 3440, 7, 6978, 8, 198, 220, 1303, 24550, 25, 314, 466, 407, 760, 1521, 410, ...
2.355556
360
""" Line(p1, p2) Construct a `Line` geometric object (representing a segment) with given beginning and end points, which are generally 2-vectors or 3-vectors. """ struct Line{N, T <: Real} p1::SVector{N, T} p2::SVector{N, T} end function Line(p1::StaticVector{N, T}, p2::StaticVector{N, T}) where {N, T <: ...
[ 37811, 198, 220, 220, 220, 6910, 7, 79, 16, 11, 279, 17, 8, 198, 198, 42316, 257, 4600, 13949, 63, 38445, 2134, 357, 15603, 278, 257, 10618, 8, 351, 1813, 3726, 290, 886, 198, 13033, 11, 543, 389, 4143, 362, 12, 303, 5217, 393, ...
2.114921
1,079
<reponame>PallHaraldsson/Dash.jl struct WatchState filename::String mtime ::Float64 WatchState(filename) = new(filename, mtime(filename)) end function poll_until_changed(files::Set{String}; interval = 1.) watched = WatchState[] for f in files !isfile(f) && return push!(watched, Watch...
[ 27, 7856, 261, 480, 29, 47, 439, 13587, 1940, 16528, 14, 43041, 13, 20362, 198, 7249, 6305, 9012, 198, 220, 220, 220, 29472, 3712, 10100, 198, 220, 220, 220, 285, 2435, 7904, 43879, 2414, 198, 220, 220, 220, 6305, 9012, 7, 34345, 8,...
1.829762
840
<filename>examples/marine/rov/asfm/animateSonarSim.jl addprocs(2) # Visualize SONAR with Director using TransformUtils using KernelDensityEstimate using IncrementalInference using RoME using Caesar using DrakeVisualizer, GeometryTypes using ColorTypes: RGBA using MeshIO, FileIO using CoordinateTransformations using Ro...
[ 27, 34345, 29, 1069, 12629, 14, 42380, 14, 18657, 14, 292, 38353, 14, 45685, 31056, 283, 8890, 13, 20362, 198, 2860, 1676, 6359, 7, 17, 8, 198, 2, 15612, 1096, 311, 1340, 1503, 351, 5890, 198, 198, 3500, 26981, 18274, 4487, 198, 350...
2.036443
2,058
<gh_stars>0 """ constraints.jl """ using Altro using LinearAlgebra @inline bound_constraint_eval(x, u, x_max, x_min, u_max, u_min) = ([ x - x_max; x_min - x; u - u_max; u_min - u; ]) function bound_constraint_jacobian(x, u, x_max, x_min, u_max, u_min) n = length(x) m = length(u) p = 2 * n...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 1102, 2536, 6003, 13, 20362, 198, 37811, 198, 198, 3500, 12344, 305, 198, 3500, 44800, 2348, 29230, 198, 198, 31, 45145, 5421, 62, 1102, 2536, 2913, 62, 18206, 7, 87, 11, 334, 11, 2124, ...
1.607973
903
using TensorOperations using KrylovKit using LinearAlgebra using Random function init_random_MPS(d,m,N) MPS=Dict() MPS[1] = im*rand(1,d,m) for i in 2:N-1 MPS[i]= im*rand(m,d,m) end MPS[N] = im*rand(m,d,1) return MPS end function Construct_Ising_MPO(h,J,N) d=2 D=3 id = [ 1 ...
[ 3500, 309, 22854, 18843, 602, 198, 3500, 41662, 27086, 20827, 198, 3500, 44800, 2348, 29230, 198, 3500, 14534, 198, 198, 8818, 2315, 62, 25120, 62, 44, 3705, 7, 67, 11, 76, 11, 45, 8, 628, 220, 220, 220, 337, 3705, 28, 35, 713, 34...
1.686456
1,078
<reponame>pkofod/StructuralEstimation.jl using StructuralEstimation srand(123) # State 1 X1 = 0:1 F1 = [[1. 0.; 1. 0.], [0. 1.; 0. 1.]] # State 2 X2 = 1:5 nX2 = length(X2) F2 = 1./(1+abs(ones(length(X2),1)*X2'-X2*ones(1, length(X2)))) F2 = F2./sum(F2,1)' # States S = States(State(X1, F1), CommonState(X2, F2)) # Util...
[ 27, 7856, 261, 480, 29, 79, 74, 1659, 375, 14, 44909, 1523, 22362, 18991, 13, 20362, 198, 3500, 32112, 1523, 22362, 18991, 198, 82, 25192, 7, 10163, 8, 198, 2, 1812, 352, 198, 55, 16, 796, 657, 25, 16, 198, 37, 16, 796, 16410, 1...
1.89698
563
# have Petsc report errors to Julia function error_handler(comm::comm_type, line::Int32, func::Ptr{UInt8}, file::Ptr{UInt8}, n::PetscErrorCode, p::PetscErrorType, mess::Ptr{UInt8}, ctx::Ptr{Void}) # receives the error call from Petsc func_string = bytestring(func) file_string = bytestring(file) if p == PETSC_ERROR_I...
[ 2, 423, 43578, 66, 989, 8563, 284, 22300, 198, 198, 8818, 4049, 62, 30281, 7, 9503, 3712, 9503, 62, 4906, 11, 1627, 3712, 5317, 2624, 11, 25439, 3712, 46745, 90, 52, 5317, 23, 5512, 2393, 3712, 46745, 90, 52, 5317, 23, 5512, 299, ...
2.652755
599
<reponame>ven-k/LoopVectorization.jl<gh_stars>100-1000 function dot_simd(a::AbstractVector, b::AbstractVector) s = zero(eltype(a)) @fastmath @inbounds @simd for i ∈ eachindex(a) s += a[i]' * b[i] end s end function cdot_mat(ca::AbstractVector{Complex{T}}, cb::AbstractVector{Complex{T}}) where {T...
[ 27, 7856, 261, 480, 29, 574, 12, 74, 14, 39516, 38469, 1634, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 8818, 16605, 62, 14323, 67, 7, 64, 3712, 23839, 38469, 11, 275, 3712, 23839, 38469, 8, 198, 220, 220, 220, 264, ...
1.613071
7,880
function load(model::JuMP.Model, d::Data) d.state = Loading for variable in d.variables load(model, variable) end for (index, constraint) in d.constraints cref = load(model, constraint) if cref !== nothing d.transformed_constraints[index] = cref end end ...
[ 8818, 3440, 7, 19849, 3712, 33018, 7378, 13, 17633, 11, 288, 3712, 6601, 8, 198, 220, 220, 220, 288, 13, 5219, 796, 12320, 198, 220, 220, 220, 329, 7885, 287, 288, 13, 25641, 2977, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 7, ...
2.509333
375
isempty(ARGS) && error("Please pass a config file as command line argument.") config_file = ARGS[1] isfile(config_file) || error("Cannot read '$config_file'") println("Config supplied: '$config_file'") include(config_file) using SVDD, OneClassActiveLearning, OneClassSampling using JuMP using Gurobi using MLKernels usi...
[ 271, 28920, 7, 1503, 14313, 8, 11405, 4049, 7203, 5492, 1208, 257, 4566, 2393, 355, 3141, 1627, 4578, 19570, 198, 11250, 62, 7753, 796, 5923, 14313, 58, 16, 60, 198, 4468, 576, 7, 11250, 62, 7753, 8, 8614, 4049, 7203, 34, 34574, 110...
2.357843
2,040
<filename>test/Perceptron_tests.jl using Statistics using Test using DelimitedFiles import MLJBase const Mlj = MLJBase using StableRNGs using BetaML #TESTRNG = FIXEDRNG # This could change... TESTRNG = StableRNG(123) println("*** Testing Perceptron algorithms...") # ================================== # TEST 1: Norma...
[ 27, 34345, 29, 9288, 14, 5990, 984, 1313, 62, 41989, 13, 20362, 198, 3500, 14370, 198, 3500, 6208, 198, 3500, 4216, 320, 863, 25876, 198, 11748, 10373, 41, 14881, 198, 9979, 337, 75, 73, 796, 10373, 41, 14881, 198, 3500, 520, 540, 4...
2.038376
4,039
<filename>src/QueryStrategies/BatchQueryStrategies/EnumFilterHierarchicalBatchQs.jl struct EnumFilterHierarchicalBatchQs <: MultiObjectiveBatchQs model::SVDD.OCClassifier inf_measure::SequentialPQs rep_measure::Function div_measure::Function k::Int function EnumFilterHierarchicalBatchQs(model::...
[ 27, 34345, 29, 10677, 14, 20746, 13290, 2397, 444, 14, 33, 963, 20746, 13290, 2397, 444, 14, 4834, 388, 22417, 39, 959, 998, 605, 33, 963, 48, 82, 13, 20362, 198, 7249, 2039, 388, 22417, 39, 959, 998, 605, 33, 963, 48, 82, 1279, ...
2.560256
780
<gh_stars>0 @testset "Discretization" begin @testset "FanTriangulation" begin pts = P2[(0.,0.), (1.,0.), (1.,1.), (0.75,1.5), (0.25,1.5), (0.,1.)] tris = [Triangle([pts[1], pts[i], pts[i+1]]) for i in 2:length(pts)-1] hex = Hexagon(pts) mesh = discretize(hex, FanTriangulation()) @test nvertices(...
[ 27, 456, 62, 30783, 29, 15, 198, 31, 9288, 2617, 366, 15642, 1186, 1634, 1, 2221, 198, 220, 2488, 9288, 2617, 366, 22480, 14824, 648, 1741, 1, 2221, 198, 220, 220, 220, 43344, 220, 796, 350, 17, 58, 7, 15, 1539, 15, 12179, 357, ...
1.982646
5,186
# estimate with MCMC (Turing) for conjugate prior # compare with jlbayes_conjugate_regression.jl using Turing using Distributions using Random using LinearAlgebra using StatsPlots using Optim # Generate moc data n = 50 dim = 1 Random.seed!(99) u = rand(Normal(0, 0.7), n) # true value σ² = 0.49 x = rand(Uniform(-sqrt(...
[ 2, 8636, 351, 13122, 9655, 357, 51, 870, 8, 329, 11644, 1018, 378, 3161, 198, 2, 8996, 351, 474, 23160, 323, 274, 62, 1102, 31761, 378, 62, 2301, 2234, 13, 20362, 198, 198, 3500, 39141, 198, 3500, 46567, 507, 198, 3500, 14534, 198, ...
2.525385
1,300
import Requires function __init__()::Nothing Requires.@require PyPlot="d330b81b-6aea-500a-939a-2ce795aea3ee" include("pyplot.jl") Requires.@require Winston="bd07be1c-e76f-5ff0-9c0b-f51ef45303c6" include("winston.jl") return nothing end
[ 11748, 26848, 198, 198, 8818, 11593, 15003, 834, 33529, 25, 18465, 198, 220, 220, 220, 26848, 13, 31, 46115, 9485, 43328, 2625, 67, 26073, 65, 6659, 65, 12, 21, 44705, 12, 4059, 64, 12, 24, 2670, 64, 12, 17, 344, 41544, 44705, 18, ...
2.390476
105
using Printf using Random using GLFW using ModernGL using CSyntax using CSyntax.CStatic using CImGui using CImGui.LibCImGui using CImGui.GLFWBackend using CImGui.OpenGLBackend using ImPlot import CImGui.LibCImGui: ImGuiCond_Always using Formatting import DataStructures.CircularBuffer #using .W...
[ 201, 198, 3500, 12578, 69, 201, 198, 3500, 14534, 201, 198, 201, 198, 3500, 10188, 24160, 201, 198, 3500, 12495, 8763, 201, 198, 3500, 9429, 33567, 897, 201, 198, 3500, 9429, 33567, 897, 13, 34, 45442, 201, 198, 201, 198, 3500, 327, ...
1.831326
13,203
function free_energy_nopool(rbm::ConvRBM, v::AbstractArray; β::Real = true) E = energy(visible(rbm), v) I = inputs_v_to_h(rbm, v) F = free_energy(hidden(rbm), I; β) @assert size(E) == (vsizes(rbm, v).input_size..., vsizes(rbm, v).batch_size...) @assert size(F) == (hsizes(rbm, I).output_size..., vsiz...
[ 8818, 1479, 62, 22554, 62, 77, 404, 970, 7, 81, 20475, 3712, 3103, 85, 49, 12261, 11, 410, 3712, 23839, 19182, 26, 27169, 3712, 15633, 796, 2081, 8, 198, 220, 220, 220, 412, 796, 2568, 7, 23504, 7, 81, 20475, 828, 410, 8, 198, 2...
2.255692
1,142
using SoftSquishyMatter # load simulation package using Random # useful if you want to shuffle arrays cd(dirname(@__FILE__)) # set directory to this file's folder #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Initialize empty simulation with a description for future reference ...
[ 3500, 8297, 22266, 49785, 44, 1436, 1303, 3440, 18640, 5301, 201, 198, 3500, 14534, 1303, 4465, 611, 345, 765, 284, 36273, 26515, 201, 198, 10210, 7, 15908, 3672, 7, 31, 834, 25664, 834, 4008, 1303, 900, 8619, 284, 428, 2393, 338, 948...
3.326258
1,649
export Experiment using Dates using ReinforcementLearningBase using ReinforcementLearningCore using .ReinforcementLearningEnvironments using Flux using BSON using TensorBoardLogger using Logging function RLCore.Experiment( ::Val{:JuliaRL}, ::Val{:BasicDQN}, ::Val{:CartPole}, ::Nothing; save_dir = ...
[ 39344, 29544, 198, 198, 3500, 44712, 198, 3500, 22299, 13442, 41730, 14881, 198, 3500, 22299, 13442, 41730, 14055, 198, 3500, 764, 3041, 259, 13442, 41730, 4834, 12103, 198, 3500, 1610, 2821, 198, 3500, 347, 11782, 198, 3500, 309, 22854, ...
1.889073
16,858
<gh_stars>1-10 #!/usr/bin/env julia module SCUTIWEN import LightXML: parse_string, root, child_elements, find_element, content import TextWrap: wrap function main() uri = "https://api.forismatic.com/api/1.0/?" * "method=getQuote&format=xml&lang=en" response = read(`curl $uri -s`, String) le...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 21412, 6374, 3843, 40, 54, 1677, 198, 11748, 4401, 55, 5805, 25, 21136, 62, 8841, 11, 6808, 11, 198, 220, 220, 220, 1200, 62, 68, 3...
1.823204
543
using SafeTestsets @safetestset "Binary trend tests" begin include("binary_trend.jl") end
[ 3500, 19978, 51, 3558, 1039, 198, 198, 31, 49585, 316, 395, 2617, 366, 33, 3219, 5182, 5254, 1, 2221, 2291, 7203, 39491, 62, 83, 10920, 13, 20362, 4943, 886, 198 ]
3.033333
30
<filename>test/UnitTests/sets.jl # Unit Test for by default supported convex sets and their functions using COSMO, Test, Random, LinearAlgebra rng = Random.MersenneTwister(13131) @testset "Convex Sets" begin tol = 1e-4 @testset "Create and project" begin # Zero Cone zset = COSMO.ZeroSet(10) x = ran...
[ 27, 34345, 29, 9288, 14, 26453, 51, 3558, 14, 28709, 13, 20362, 198, 2, 11801, 6208, 329, 416, 4277, 4855, 24748, 87, 5621, 290, 511, 5499, 198, 3500, 327, 2640, 11770, 11, 6208, 11, 14534, 11, 44800, 2348, 29230, 198, 198, 81, 782,...
2.022618
2,697
using Documenter, MixedModels, StatsBase makedocs( sitename = "MixedModels", pages = ["index.md", "constructors.md", "optimization.md", "GaussHermite.md", "bootstrap.md", "SimpleLMM.md", "MultipleTerms.md", "SingularCova...
[ 3500, 16854, 263, 11, 35250, 5841, 1424, 11, 20595, 14881, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 1650, 12453, 796, 366, 44, 2966, 5841, 1424, 1600, 198, 220, 220, 220, 5468, 796, 14631, 9630, 13, 9132, 1600, 198, 220, ...
1.79845
258
<reponame>habemus-papadum/julia<gh_stars>0 # This file is a part of Julia. License is MIT: http://julialang.org/license # TODO: optimize this function Base.string(dt::DateTime) y,m,d = yearmonthday(days(dt)) h,mi,s = hour(dt),minute(dt),second(dt) yy = y < 0 ? @sprintf("%05i",y) : lpad(y,4,"0") mm = lp...
[ 27, 7856, 261, 480, 29, 5976, 368, 385, 12, 79, 499, 324, 388, 14, 73, 43640, 27, 456, 62, 30783, 29, 15, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 2638, 1378, 73, 377, 498, 648, 13, 2398, 14, 43...
2.327866
6,219
<reponame>alejandromerchan/USDAQuickStats.jl function get_nass(args...; format="json") key = ENV["USDA_QUICK_SURVEY_KEY"] header = string(usda_url, "/api/api_GET/?key=", key, "&format=$format") query = "" for i in args arg = string("&", i) query *= arg end req...
[ 27, 7856, 261, 480, 29, 1000, 73, 392, 398, 263, 3147, 14, 2937, 5631, 21063, 29668, 13, 20362, 198, 201, 198, 201, 198, 201, 198, 8818, 651, 62, 77, 562, 7, 22046, 986, 26, 5794, 2625, 17752, 4943, 201, 198, 220, 220, 220, 1994, ...
2.098837
172
<reponame>UnofficialJuliaMirror/PlanOut.jl-307e1779-6603-555d-8172-ea684b6e5cfa<filename>src/ops/random.jl<gh_stars>1-10 LONG_SCALE = float(0xFFFFFFFFFFFFFFF) maybeAppendUnit(unit::Any, appended_unit) = maybeAppendUnit([unit], appended_unit) function maybeAppendUnit(unit::AbstractArray, appended_unit) if length(appe...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 20854, 7975, 13, 20362, 12, 22996, 68, 1558, 3720, 12, 21, 35642, 12, 31046, 67, 12, 23, 23628, 12, 18213, 41580, 65, 21, 68, 20, 12993, 64, 27, 34345, 29, 10677, 1...
2.55243
1,564
include("./exportData.jl") using .exportData, DelimitedFiles inds = [78, 88, 100, 106, 114] output = Array{Any,2}(undef,(1002,length(inds)+1)); for (n,ind) in enumerate(inds) t, data, BCL = getExpData(ind; tInds=1:1000); if n==1 output[1,:] .= vcat("#ind", inds) output[2,1] = "#BCLs" output[3:end,1] .= t.-t[...
[ 17256, 7, 1911, 14, 39344, 6601, 13, 20362, 4943, 198, 3500, 764, 39344, 6601, 11, 4216, 320, 863, 25876, 198, 198, 521, 82, 796, 685, 3695, 11, 9193, 11, 1802, 11, 15696, 11, 17342, 60, 198, 198, 22915, 796, 15690, 90, 7149, 11, ...
1.977556
401
#------------------------------------------------------------------------------- # File: sat_encoding.jl # Description: This file contains all the fuctions needed to encode # an SGP instance into an SAT model. # Date: December 10, 2019 # Author: <NAME>, <NAME>, # <NAME>, <NAME>, <NAME> # TBH : This was mostly ...
[ 2, 10097, 24305, 198, 2, 9220, 25, 3332, 62, 12685, 7656, 13, 20362, 198, 2, 12489, 25, 770, 2393, 4909, 477, 262, 14035, 2733, 2622, 284, 37773, 198, 2, 281, 311, 16960, 4554, 656, 281, 29020, 2746, 13, 198, 2, 7536, 25, 3426, 83...
2.108302
2,096
using DiffEqFlux, Test u0 = Float32[2.0; 0.0] dudt2 = FastChain((x, p) -> x.^3, FastDense(2, 50, tanh), FastDense(50, 2)) p = initial_params(dudt2) @test !DiffEqSensitivity.hasbranching(dudt2,u0,p) dudt2 = FastChain((x, p) -> x.^3, StaticDense(2, 4, tanh), ...
[ 3500, 10631, 36, 80, 37, 22564, 11, 6208, 198, 198, 84, 15, 796, 48436, 2624, 58, 17, 13, 15, 26, 657, 13, 15, 60, 198, 67, 463, 83, 17, 796, 12549, 35491, 19510, 87, 11, 279, 8, 4613, 2124, 13, 61, 18, 11, 198, 220, 220, 22...
1.717742
248
<filename>test/test_cardinality.jl using Infinities, Base64, Base.Checked, Test @testset "InfiniteCardinal" begin @testset "basics" begin @test !isone(ℵ₀) @test !iszero(ℵ₀) @test sign(ℵ₀) ≡ 1 && !signbit(ℵ₀) @test angle(ℵ₀) ≡ 0 @test Integer(∞) ≡ convert(Integer,∞) ≡ Integer...
[ 27, 34345, 29, 9288, 14, 9288, 62, 9517, 1292, 414, 13, 20362, 198, 3500, 4806, 259, 871, 11, 7308, 2414, 11, 7308, 13, 9787, 276, 11, 6208, 198, 198, 31, 9288, 2617, 366, 18943, 9504, 16962, 1292, 1, 2221, 198, 220, 220, 220, 248...
1.293287
3,754
<filename>plotlyjs_basics.jl<gh_stars>0 using PlotlyJS using DataFrames, RDatasets function linescatter() trace1 = scatter(x=1:4, y=[10, 15, 13, 18]) plot(trace1) end linescatter() function multiple_scatter_traces() trace1 = scatter(;x=1:4, y=[10, 15, 13, 17], mode="markers", name="marker only") trac...
[ 27, 34345, 29, 29487, 306, 8457, 62, 12093, 873, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 198, 3500, 28114, 306, 20120, 198, 3500, 6060, 35439, 11, 371, 27354, 292, 1039, 198, 198, 8818, 3951, 66, 1436, 3419, 198, 220, 220, 220, ...
1.905099
2,687
using Test using CLIMA.SurfaceFluxes using CLIMA.SurfaceFluxes.Nishizawa2018 using CLIMA.SurfaceFluxes.Byun1990 using CLIMA.MoistThermodynamics using RootSolvers # FIXME: Use realistic values / test for correctness # These tests have been run to ensure they do not fail, # but they need further testing for correctness...
[ 3500, 6208, 198, 198, 3500, 7852, 3955, 32, 13, 14214, 2550, 37, 22564, 274, 198, 3500, 7852, 3955, 32, 13, 14214, 2550, 37, 22564, 274, 13, 45, 680, 528, 6909, 7908, 198, 3500, 7852, 3955, 32, 13, 14214, 2550, 37, 22564, 274, 13, ...
1.653548
1,677
module AccurateArithmetic export four, two, negone, onehalf, onequarter, fourx, twox, halfx, quarterx, #= These functions appear in the literature, named similarly. =# two_sum, two_diff, two_prod, fast_two_sum, fast_two_diff, ufp, ulp, splitting, extractscalar, #= Thes...
[ 21412, 6366, 15537, 3163, 29848, 628, 198, 39344, 198, 220, 220, 220, 220, 220, 220, 1440, 11, 734, 11, 2469, 505, 11, 530, 13959, 11, 530, 24385, 11, 220, 198, 220, 220, 220, 220, 220, 220, 1440, 87, 11, 734, 87, 11, 2063, 87, ...
2.057661
607
<reponame>cbw124/Catlab.jl<gh_stars>0 module CategoricalAlgebra using Reexport include("FreeDiagrams.jl") include("Limits.jl") include("Sets.jl") include("FinSets.jl") include("Matrices.jl") include("FinRelations.jl") include("CSets.jl") include("ACSetViews.jl") include("GraphCategories.jl") include("StructuredCospan...
[ 27, 7856, 261, 480, 29, 21101, 86, 17464, 14, 21979, 23912, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 327, 2397, 12409, 2348, 29230, 198, 198, 3500, 797, 39344, 198, 198, 17256, 7203, 11146, 18683, 6713, 82, 13, 20362, 4943, ...
2.679803
203
<filename>lib/YaoSym/src/symengine/blocks.jl using YaoBlocks using LuxurySparse using LinearAlgebra using ..SymEngine using ..SymEngine: BasicType, BasicOp, BasicTrigFunction op_types = [:Mul, :Add, :Pow] const BiVarOp = Union{[SymEngine.BasicType{Val{i}} for i in op_types]...} export @vars simag = SymFunction("Im")...
[ 27, 34345, 29, 8019, 14, 56, 5488, 43094, 14, 10677, 14, 37047, 18392, 14, 27372, 13, 20362, 198, 3500, 37826, 45356, 198, 3500, 17145, 1601, 50, 29572, 198, 3500, 44800, 2348, 29230, 198, 3500, 11485, 43094, 13798, 198, 3500, 11485, 43...
2.182932
2,367
using ForwardDiff using ReverseDiff using Measures include("helper_functions.jl") begin λ1 = 0.4 λ2 = 1.5 α = 1 μ(α) = 1 / (1.5 * (α)) ν(α) = 1 / (0.7 * (α)) parameters = (λ1, λ2, α, μ, ν) opponent_parameters = (λ2, λ1, α, μ, ν) p, q = equilibrium_probability(parameters...) step = 0...
[ 3500, 19530, 28813, 198, 3500, 31849, 28813, 198, 3500, 45040, 198, 17256, 7203, 2978, 525, 62, 12543, 2733, 13, 20362, 4943, 198, 198, 27471, 198, 220, 220, 220, 7377, 119, 16, 796, 657, 13, 19, 198, 220, 220, 220, 7377, 119, 17, 7...
2.083857
1,908
<reponame>omdowley/DynamicalBilliards.jl<filename>src/DynamicalBilliards.jl<gh_stars>10-100 __precompile__() """ A Julia package for dynamical billiard systems in two dimensions. The goals of the package is to provide a flexible, easy-to-use and intuitive framework for fast implementation of billiard systems o...
[ 27, 7856, 261, 480, 29, 296, 67, 322, 1636, 14, 35, 4989, 605, 17798, 72, 1371, 13, 20362, 27, 34345, 29, 10677, 14, 35, 4989, 605, 17798, 72, 1371, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 834, 3866, 5589, 576, 83...
2.749164
897
abstract type Model end struct Zerodominant <: Model end #trait that highlights the regulation mechanism of a type # struct Onedominant <: Model end ## future work: regulation network for conductances. Onedominant is not used for now. ## trait functions model(::Type{<:RegIonChannel}) = Zerodominant() #model(::Type{<...
[ 397, 8709, 2099, 9104, 886, 198, 7249, 37028, 375, 6351, 415, 1279, 25, 9104, 886, 1303, 9535, 270, 326, 11330, 262, 9001, 9030, 286, 257, 2099, 220, 198, 2, 2878, 1550, 3836, 42483, 1279, 25, 9104, 886, 198, 2235, 2003, 670, 25, 90...
2.397974
691
<filename>src/write_outputs/dftranspose.jl<gh_stars>0 """ GenX: An Configurable Capacity Expansion Model Copyright (C) 2021, Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software ...
[ 27, 34345, 29, 10677, 14, 13564, 62, 22915, 82, 14, 67, 701, 26084, 3455, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 13746, 55, 25, 1052, 17056, 11970, 29765, 25042, 9104, 198, 15269, 357, 34, 8, 33448, 11, 220, 10140, ...
3.565674
571
<reponame>uzaynagme/LazySets.jl # ======================== # Sampling from a LazySet # ======================== """ AbstractSampler Abstract type for defining new sampling methods. ### Notes All subtypes should implement a `sample!(D, X, ::Method)` method where the first argument is the output (vector of vector...
[ 27, 7856, 261, 480, 29, 10277, 49987, 363, 1326, 14, 43, 12582, 50, 1039, 13, 20362, 198, 2, 36658, 1421, 18604, 198, 2, 3409, 11347, 422, 257, 406, 12582, 7248, 198, 2, 36658, 1421, 18604, 198, 198, 37811, 198, 220, 220, 220, 27741...
2.422516
5,143
<gh_stars>0 using ArgParse s = ArgParseSettings() @add_arg_table s begin "--part2" help = "Do part 2" action = :store_true "--test" help = "Run test data" action = :store_true end parsed_args = parse_args(ARGS, s) mutable struct SNumber value :: Union{UInt32, Tuple{SNumber, SNumber}} end ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 20559, 10044, 325, 628, 198, 82, 796, 20559, 10044, 325, 26232, 3419, 198, 31, 2860, 62, 853, 62, 11487, 264, 2221, 198, 220, 220, 220, 366, 438, 3911, 17, 1, 198, 220, 220, 220, 1037, 796, ...
1.963799
2,127
module TestGraphvizWiringDiagrams using Test import JSON using Catlab.Theories, Catlab.WiringDiagrams, Catlab.Graphics import Catlab.Graphics: Graphviz using Catlab.Graphics.WiringDiagramLayouts: position, normal # Drawing ######### function stmts(graph::Graphviz.Graph, type::Type) [ stmt for stmt in graph.stmts ...
[ 21412, 6208, 37065, 85, 528, 54, 3428, 18683, 6713, 82, 198, 198, 3500, 6208, 198, 11748, 19449, 198, 198, 3500, 5181, 23912, 13, 464, 1749, 11, 5181, 23912, 13, 54, 3428, 18683, 6713, 82, 11, 5181, 23912, 13, 18172, 198, 11748, 5181,...
2.570946
1,184
# Portions translated from SLICOT-Reference distribution # Copyright (c) 2002-2020 NICONET e.V. function run_mb04zd(datfile, io=stdout) NIN = 5 NOUT = 6 NMAX = 20 LDA = NMAX LDQG = NMAX LDU = NMAX LDWORK = ( NMAX+NMAX )*( NMAX+NMAX+1 ) ZERO = 0.0e0 ONE = 1.0e0 A = Array{Float64,2...
[ 2, 4347, 507, 14251, 422, 12419, 2149, 2394, 12, 26687, 6082, 198, 2, 15069, 357, 66, 8, 6244, 12, 42334, 45593, 1340, 2767, 304, 13, 53, 13, 198, 8818, 1057, 62, 2022, 3023, 89, 67, 7, 19608, 7753, 11, 33245, 28, 19282, 448, 8, ...
1.755872
1,405
<filename>viaCheb.jl module bycheb using LinearAlgebra include("cheb.jl") using .cheb export ring EXTEND = 0.0 #0.5 """ Σ is an even function of x Φ is an odd function of x U is an odd function of x """ mutable struct ring N::Integer # number of nodes for full ring nn::Integer parmd::Dict{...
[ 27, 34345, 29, 8869, 7376, 65, 13, 20362, 198, 198, 21412, 416, 2395, 65, 198, 3500, 44800, 2348, 29230, 198, 17256, 7203, 2395, 65, 13, 20362, 4943, 198, 3500, 764, 2395, 65, 198, 198, 39344, 5858, 198, 198, 13918, 10619, 796, 657, ...
1.847994
1,421
#broad_pdf.jl using JSON function create_broad_pdf(n_x::Int, n_y::Int, n_z::Int, dependence::Float64=0.) :: Dict{Tuple{Int,Int,Int},BigFloat} @assert n_x ≥ 2 "create_broad_pdf(): n_x >= 2 needed" @assert n_y ≥ 2 "create_broad_pdf(): n_y >= 2 needed" @assert n_z ≥ 2 "create_broad_pdf(): n_z >= 2 needed" ...
[ 2, 36654, 62, 12315, 13, 20362, 198, 3500, 19449, 198, 198, 8818, 2251, 62, 36654, 62, 12315, 7, 77, 62, 87, 3712, 5317, 11, 299, 62, 88, 3712, 5317, 11, 299, 62, 89, 3712, 5317, 11, 21403, 3712, 43879, 2414, 28, 15, 2014, 7904, ...
1.870546
842
<reponame>FHoltorf/MomentClosure.jl<gh_stars>10-100 using MomentClosure using MomentClosure: define_M, define_μ using Test using Catalyst @parameters t, k_on, k_off, k_p, γ_p, b @variables p(t), g(t) vars = [g, p] ps = [k_on, k_off, k_p, γ_p, b] S = [1 -1 0 0; 0 0 b -1] as = [k_on*(1-g), # 0 -> ...
[ 27, 7856, 261, 480, 29, 44602, 5978, 24263, 14, 29252, 298, 45398, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 29278, 45398, 201, 198, 3500, 29278, 45398, 25, 8160, 62, 44, 11, 8160, 62, 34703, 201, 198, 3500, 6208,...
2.062063
1,144
<filename>examples/SkyTEM1D/gradientbased/03_make_model_fits_to_noise.jl using PyPlot, DelimitedFiles, Random, Statistics, Revise, transD_GP ## model fixed parts, i.e., air Random.seed!(23) zfixed = [-1e5] ρfixed = [1e12] nmax = 200 # Note that the receiver and transmitter need to be in layer 1 zstart = 0.0 e...
[ 27, 34345, 29, 1069, 12629, 14, 22308, 51, 3620, 16, 35, 14, 49607, 3106, 14, 3070, 62, 15883, 62, 19849, 62, 21013, 62, 1462, 62, 3919, 786, 13, 20362, 198, 3500, 9485, 43328, 11, 4216, 320, 863, 25876, 11, 14534, 11, 14370, 11, ...
1.72349
3,244
using Test using Bridge, StaticArrays, Distributions using Statistics, Random, LinearAlgebra POSSIBLE_PARAMS = [:regular, :simpleAlter, :complexAlter, :simpleConjug, :complexConjug] SRC_DIR = joinpath(Base.source_dir(), "..", "src") include("test_ODE_solver_change_pt.jl") include("test_blocking.jl...
[ 3500, 6208, 198, 198, 3500, 10290, 11, 36125, 3163, 20477, 11, 46567, 507, 198, 3500, 14370, 11, 14534, 11, 44800, 2348, 29230, 198, 47, 18420, 34563, 62, 27082, 40834, 796, 685, 25, 16338, 11, 1058, 36439, 2348, 353, 11, 1058, 41887, ...
2.669421
121
<gh_stars>1-10 """ market_hours(market::AbstractString, date=today()) market_hours(market::Array, date=today()) Get hours of a market in the future: https://developer.tdameritrade.com/market-hours/apis/get/marketdata/%7Bmarket%7D/hours Get hours of multiple markets: https://developer.tdameritrade.com/market-h...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 1910, 62, 24425, 7, 10728, 3712, 23839, 10100, 11, 3128, 28, 40838, 28955, 198, 220, 220, 220, 1910, 62, 24425, 7, 10728, 3712, 19182, 11, 3128, 28, 40838, 28955, ...
2.542955
582
<filename>src/LinearEvolution.jl """ Linear evolution of the NP equations: this includes the Teukolsky equation and the Metric reconstruction equations. For more details see Loutrel et. al. Phys.Rev.D 103 (2021) 10, 104017, arXiv:2008.11770 Ripley et. al. Phys.Rev.D 103 (2021) 1040180, arXiv:2010.00162 ""...
[ 27, 34345, 29, 10677, 14, 14993, 451, 15200, 2122, 13, 20362, 198, 37811, 198, 14993, 451, 6954, 286, 262, 28498, 27490, 25, 428, 3407, 262, 198, 6767, 2724, 10220, 2584, 16022, 290, 262, 3395, 1173, 25056, 27490, 13, 198, 198, 1890, ...
1.434974
20,861
<filename>test/load.jl try using TestFunctionRunnerTests true catch false end || begin let path = joinpath(@__DIR__, "TestFunctionRunnerTests") path in LOAD_PATH || push!(LOAD_PATH, path) end using TestFunctionRunnerTests end
[ 27, 34345, 29, 9288, 14, 2220, 13, 20362, 198, 28311, 198, 220, 220, 220, 1262, 6208, 22203, 49493, 51, 3558, 198, 220, 220, 220, 2081, 198, 40198, 198, 220, 220, 220, 3991, 198, 437, 8614, 2221, 198, 220, 220, 220, 1309, 3108, 796,...
2.58
100
# include("time_parse.jl") # include("multifrequency-opf.jl") # include("utilities.jl") # function to run multifrequency_opf on one case within the given time range. # # parameters: # month_st, day_st, period_st, month_en, day_en, period_en: the parameters specifying the period to plot # folder: the directory containi...
[ 2, 2291, 7203, 2435, 62, 29572, 13, 20362, 4943, 198, 2, 2291, 7203, 16680, 361, 28707, 12, 404, 69, 13, 20362, 4943, 198, 2, 2291, 7203, 315, 2410, 13, 20362, 4943, 198, 198, 2, 2163, 284, 1057, 43543, 28707, 62, 404, 69, 319, 53...
2.082713
10,470
<gh_stars>1-10 @testset "Term and Polynomial tests" begin @testset "Term" begin @polyvar x # @test coefficienttype(1x) == Int # @test coefficienttype(1.0x^2) == Float64 # @test coefficienttype(Term{true, Int}) == Int @test zeroterm(Term{false, Int}).α == 0 @test one(Term{tr...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 31, 9288, 2617, 366, 40596, 290, 12280, 26601, 498, 5254, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 40596, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 35428, 7785, 212...
1.944291
1,813
<gh_stars>100-1000 using Flux using Flux: @treelike struct ResidualBlock{L,S} layers::L shortcut::S end struct ConvNorm{C, N} conv::C norm::N end (cn::ConvNorm)(value) = cn.norm(cn.conv(value)) @treelike ResidualBlock @treelike ConvNorm function ResidualBlock(filters, kernels::Array{Tuple{Int,Int}}, pads::A...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 1610, 2821, 198, 3500, 1610, 2821, 25, 2488, 33945, 417, 522, 198, 198, 7249, 1874, 312, 723, 12235, 90, 43, 11, 50, 92, 198, 220, 11685, 3712, 43, 198, 220, 29401, 3712, 50, 198...
2.479543
1,051
<reponame>HatsuneMiku/Win32API.jl<gh_stars>0 # Win32API VERSION >= v"0.4.0-dev+6521" && __precompile__() module Win32API export MessageBoxA, MessageBoxW function MessageBoxA( hwnd::Ptr{Void}, msg::AbstractString, title::AbstractString, opt::Int) return ccall((:MessageBoxA, :user32), stdcall, UInt, (Ptr{Void}...
[ 27, 7856, 261, 480, 29, 39, 1381, 1726, 44, 28643, 14, 16643, 2624, 17614, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 7178, 2624, 17614, 198, 198, 43717, 18189, 410, 1, 15, 13, 19, 13, 15, 12, 7959, 10, 2996, 2481, 1, 11405,...
2.268116
276
<reponame>SimonTreillou/PlantBiophysics.jl """ struct to hold the parameters for Medlyn et al. (2011) stomatal conductance model for CO₂. # Arguments - `g0`: intercept. - `g1`: slope. - `gs_min = 0.001`: residual conductance. We consider the residual conductance being different from `g0` because in practice `g0` can...
[ 27, 7856, 261, 480, 29, 35475, 31055, 359, 280, 14, 3646, 415, 23286, 2522, 23154, 13, 20362, 198, 37811, 198, 7249, 284, 1745, 262, 10007, 329, 2019, 6213, 2123, 435, 13, 357, 9804, 8, 336, 296, 10254, 198, 36495, 590, 2746, 329, 7...
2.397041
1,622
using Sundials, Test println("Test error handling") f_error(u,p,t) = u/t u0 = 1.0 prob = ODEProblem(f_error,u0,(0.0,1.0)) sol = solve(prob,CVODE_BDF()) sol = solve(prob,CVODE_BDF(),verbose=false) f_error2(du,u,p,t) = u/t-1 u0 = 1.0; du0 = 1.0 prob = DAEProblem(f_error2,u0,du0,(0.0,1.0),differential_vars=[1]) sol = s...
[ 3500, 3309, 8231, 11, 6208, 198, 198, 35235, 7203, 14402, 4049, 9041, 4943, 198, 198, 69, 62, 18224, 7, 84, 11, 79, 11, 83, 8, 796, 334, 14, 83, 198, 84, 15, 796, 352, 13, 15, 198, 1676, 65, 796, 440, 7206, 40781, 7, 69, 62, ...
2.044554
202
<gh_stars>1-10 function nlp_cvx_206_010( optimizer, objective_tol, primal_tol, dual_tol, termination_target = TERMINATION_TARGET_LOCAL, primal_target = PRIMAL_TARGET_LOCAL, ) # Test Goals: # - linear objective # - intersection convex quadratic constraints # - power cones # Va...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 299, 34431, 62, 33967, 87, 62, 22136, 62, 20943, 7, 198, 220, 220, 220, 6436, 7509, 11, 198, 220, 220, 220, 9432, 62, 83, 349, 11, 198, 220, 220, 220, 43750, 62, 83, 349, 11, 198...
2.28046
435
export spgline """ Non-monotone linesearch """ function spgline(A::TA, f::Tf, d::AbstractVector{<:Number}, gtd_in::Number, x::AbstractArray{ETx}, fMax::Tf, funForward::Function, funPenalty::Function, ...
[ 39344, 599, 70, 1370, 198, 198, 37811, 198, 15419, 12, 2144, 313, 505, 3951, 3679, 198, 37811, 198, 8818, 599, 70, 1370, 7, 32, 3712, 5603, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.788618
2,460
<gh_stars>0 sprites = [ [ 0b11110000, # **** 0b10010000, # * * 0b10010000, # * * 0b10010000, # * * 0b11110000 # **** ] [ 0b00100000, # * 0b01100000, # ** 0b00100000, # * 0b00100000, # * 0b01110000 # *** ] [ 0b11110000, # **** 0b00010000, # ...
[ 27, 456, 62, 30783, 29, 15, 198, 2777, 23156, 796, 685, 198, 220, 685, 198, 220, 220, 220, 657, 65, 26259, 2388, 11, 220, 1303, 25998, 198, 220, 220, 220, 657, 65, 47705, 2388, 11, 220, 1303, 1635, 220, 1635, 198, 220, 220, 220, ...
1.764398
1,146
# This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: polly using AWS.Compat using AWS.UUIDs """ delete_lexicon(lexicon_name) delete_lexicon(lexicon_name, params::Dict{String,<:Any}) Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been delete...
[ 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 3278, 88, 198, 3500, 30865, 13, 40073, 198, 3500, 30865, 13, 52, 27586, 82, 198, 198, 37811, ...
3.430259
4,402
function Newton_Spectral( nlp::AbstractNLPModel, x₀::AbstractVector; τ₀::Float64 = 0.0005, ϵ::Float64 = 1e-6, maxiter::Int = 200, ) x = copy(x₀) iter = 0 f, g = obj(nlp, x), grad(nlp, x) while (norm(g, Inf) > ϵ) && (iter <= maxiter) H = Matrix(Symmetric(hess(nlp, x), :L)) Δ, O = eigen(H) ...
[ 8818, 17321, 62, 49738, 1373, 7, 198, 220, 299, 34431, 3712, 23839, 45, 19930, 17633, 11, 198, 220, 2124, 158, 224, 222, 3712, 23839, 38469, 26, 198, 220, 46651, 158, 224, 222, 3712, 43879, 2414, 796, 657, 13, 830, 20, 11, 198, 220,...
1.929293
396
<filename>individual_implementations/btg julia/kernel.jl using Random using LinearAlgebra using Distances """ Gaussian/RBF/Squared Exponential correlation function """ function rbf(x, y, θ=1.0) 1/sqrt(2*pi)*exp.(-θ*0.5*(norm(x .- y))^2) end """ Gaussian/RBF/Squared Exponential correlation function """ function rb...
[ 27, 34345, 29, 43129, 62, 320, 26908, 602, 14, 18347, 70, 474, 43640, 14, 33885, 13, 20362, 198, 3500, 14534, 198, 3500, 44800, 2348, 29230, 198, 3500, 4307, 1817, 198, 198, 37811, 198, 35389, 31562, 14, 27912, 37, 14, 22266, 1144, 55...
2.128583
1,221
<gh_stars>1-10 using Test, SeisModels @testset "Conversion" begin @testset "To LinearLayeredModel" begin # PREMPolyModel let m = LinearLayeredModel(PREM) @test m isa LinearLayeredModel # Default spacing @test maximum(diff(m.r)) == 20 @test minimum(dif...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 6208, 11, 1001, 271, 5841, 1424, 198, 198, 31, 9288, 2617, 366, 3103, 9641, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 2514, 44800, 23763, 1068, 17633, 1, 2221, 198, 220, 22...
1.825683
1,939
# Autogenerated wrapper script for HDF5_jll for aarch64-apple-darwin export libhdf5, libhdf5_hl using Zlib_jll using OpenSSL_jll using LibCURL_jll JLLWrappers.@generate_wrapper_header("HDF5") JLLWrappers.@declare_library_product(libhdf5, "@rpath/libhdf5.200.dylib") JLLWrappers.@declare_library_product(libhdf5_hl, "@rp...
[ 2, 5231, 519, 877, 515, 29908, 4226, 329, 5572, 37, 20, 62, 73, 297, 329, 257, 998, 2414, 12, 18040, 12, 27455, 5404, 198, 39344, 9195, 71, 7568, 20, 11, 9195, 71, 7568, 20, 62, 18519, 198, 198, 3500, 1168, 8019, 62, 73, 297, 19...
2.061828
372
<filename>src/ExampleSubmodule.jl """ This module is an example of how to create and import a submodule. Functions can be exported using `export` and are then usable when the parent module has a line like `using .ExampleSubmodule`. """ module ExampleSubmodule export anexamplefunction function anexamplefunction() p...
[ 27, 34345, 29, 10677, 14, 16281, 7004, 21412, 13, 20362, 198, 37811, 198, 1212, 8265, 318, 281, 1672, 286, 703, 284, 2251, 290, 1330, 257, 850, 21412, 13, 198, 198, 24629, 2733, 460, 307, 29050, 1262, 4600, 39344, 63, 290, 389, 788, ...
3.909091
99
using Plots; pyplot(fmt = :png) using SolidStateDetectors using Unitful T = Float32 simulation = Simulation{T}(SSD_examples[:InvertedCoax]) plot(simulation.detector, size=(700, 700)) apply_initial_state!(simulation, ElectricPotential) # optional plot( plot(simulation.electric_potential), # initial electric poten...
[ 3500, 1345, 1747, 26, 12972, 29487, 7, 69, 16762, 796, 1058, 11134, 8, 198, 3500, 15831, 9012, 47504, 669, 198, 3500, 11801, 913, 198, 198, 51, 796, 48436, 2624, 198, 14323, 1741, 796, 41798, 90, 51, 92, 7, 5432, 35, 62, 1069, 12629...
2.566062
772
<gh_stars>0 using SignatureGB using Test using Singular SG = SignatureGB include("./tests.jl")
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 34894, 4579, 198, 3500, 6208, 198, 3500, 5573, 934, 198, 198, 38475, 796, 34894, 4579, 198, 198, 17256, 7, 1911, 14, 41989, 13, 20362, 4943, 198 ]
2.852941
34
<filename>src/indexes/pivotselectiontables.jl<gh_stars>0 # Copyright 2016-2019 <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice...
[ 27, 34345, 29, 10677, 14, 9630, 274, 14, 79, 45785, 49283, 83, 2977, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 220, 15069, 1584, 12, 23344, 1279, 20608, 29, 9959, 27630, 4146, 4211, 198, 2, 198, 2, 220, 220, 220, 49962, 739, ...
2.839844
512
using Dispersal, Test init = [1.0 4.0 7.0; 2.0 5.0 8.0; 3.0 6.0 9.0] output = ArrayOutput(init; tspan=1:2) rule = AlleeExtinction(minfounders = 8.0) sim!(output, rule) @test output[1] == [1.0 4.0 7.0; 2.0 5.0 8.0; 3.0 6.0 9.0] @test output[2] == [0.0 0.0 0.0; ...
[ 3500, 3167, 19276, 282, 11, 6208, 198, 198, 15003, 796, 685, 16, 13, 15, 604, 13, 15, 767, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220, 362, 13, 15, 642, 13, 15, 807, 13, 15, 26, 198, 220, 220, 220, 220, 220, 220, 220...
1.498054
257
include("../imports.jl") @testset ExtendedTestSet "StopEarly" begin learner = testlearner(Recorder(), Metrics(), EarlyStopping(1), ProgressPrinter(), coeff = 3, opt = Descent(0.1)) @test_throws CancelFittingException begin @suppress fit!(learner, 100) end @test_nowarn print(Base.DevNull(), Ear...
[ 17256, 7203, 40720, 320, 3742, 13, 20362, 4943, 628, 198, 31, 9288, 2617, 24204, 14402, 7248, 366, 19485, 20457, 1, 2221, 198, 220, 220, 220, 22454, 1008, 796, 1332, 3238, 1008, 7, 6690, 2875, 22784, 3395, 10466, 22784, 12556, 1273, 333...
2.717949
156
<filename>scripts/JX/large_batch/large_batch.jl using DrWatson, PyCall @quickactivate "GCN_HM_GRN-Integration" pushfirst!(PyVector(pyimport("sys")."path"), ""); run_sim = pyimport("large_batch").run_sim allparams = Dict( :layer => ["arma", "sage", "tag"], :batch => [100, 200], :cl => ["E116"] ) dicts = ...
[ 27, 34345, 29, 46521, 14, 41, 55, 14, 11664, 62, 43501, 14, 11664, 62, 43501, 13, 20362, 198, 3500, 1583, 54, 13506, 11, 9485, 14134, 198, 31, 24209, 39022, 366, 15916, 45, 62, 36905, 62, 10761, 45, 12, 34500, 1358, 1, 198, 198, 1...
2.288952
353
""" A rule contains all the information required to run a rule in a cellular simulation, given an initial array. Rules can be chained together sequentially. The output of the rule for an Rule is allways written to the current cell in the grid. """ abstract type Rule end show(io::IO, rule::R) where R <: Rule = begin ...
[ 37811, 198, 32, 3896, 4909, 477, 262, 1321, 2672, 284, 1057, 257, 3896, 287, 257, 19824, 198, 14323, 1741, 11, 1813, 281, 4238, 7177, 13, 14252, 460, 307, 40682, 1978, 4726, 3746, 13, 198, 198, 464, 5072, 286, 262, 3896, 329, 281, 1...
3.26335
824
<reponame>aerappa/Gridap.jl """ struct SubVector{T,A<:AbstractVector{T}} <: AbstractVector{T} vector::A pini::Int pend::Int end """ struct SubVector{T,A<:AbstractVector{T}} <: AbstractVector{T} vector::A pini::Int pend::Int end Base.size(a::SubVector) = (1+a.pend-a.pini,) @propagate_i...
[ 27, 7856, 261, 480, 29, 25534, 20975, 14, 41339, 499, 13, 20362, 198, 198, 37811, 198, 220, 220, 220, 2878, 3834, 38469, 90, 51, 11, 32, 27, 25, 23839, 38469, 90, 51, 11709, 1279, 25, 27741, 38469, 90, 51, 92, 198, 220, 220, 220, ...
2.238095
294
<reponame>nignatiadis/RegressionDiscontinuity.jl using .Empirikos using Zygote using LinearFractional using StatsFuns abstract type AbstractRegressionDiscontinuityTarget end abstract type TargetedRegressionDiscontinuityTarget <: AbstractRegressionDiscontinuityTarget end struct ConstantTarget <: AbstractRegressionDisc...
[ 27, 7856, 261, 480, 29, 77, 570, 7246, 324, 271, 14, 8081, 2234, 15642, 756, 259, 14834, 13, 20362, 198, 3500, 764, 36, 3149, 343, 1134, 418, 198, 3500, 1168, 35641, 1258, 198, 3500, 44800, 37, 7861, 282, 198, 3500, 20595, 37, 13271...
2.037315
11,604
<gh_stars>10-100 using Test, LinearAlgebra, StaticArrays using DomainSets using CompositeTypes.Indexing include("test_common.jl") include("test_maps.jl") include("test_generic_domain.jl") include("test_specific_domains.jl") include("test_canonical.jl") include("test_setoperations.jl") include("test_applications.jl") ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6208, 11, 44800, 2348, 29230, 11, 36125, 3163, 20477, 198, 198, 3500, 20021, 50, 1039, 198, 3500, 49355, 31431, 13, 15732, 278, 198, 198, 17256, 7203, 9288, 62, 11321, 13, 20362, 4943,...
2.957265
117
<gh_stars>1-10 using FactCheck, MarketData FactCheck.setstyle(:compact) FactCheck.onlystats(true) facts("last methods takes the first observations") do context("defaults to n=1") do @fact last(cl).values[1] --> 21.9 end context("takes other n values") do @fact last(cl, 2).values[1] --> ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 19020, 9787, 11, 5991, 6601, 198, 29054, 9787, 13, 2617, 7635, 7, 25, 5589, 529, 8, 198, 29054, 9787, 13, 8807, 34242, 7, 7942, 8, 198, 198, 37473, 7203, 12957, 5050, 2753, 262, 717,...
2.474453
137
@testset "mesh" begin eM = eMesh{Tri,Tet}() push!(eM.point, SVector{3,Float64}(NaN, NaN, NaN)) @test_throws ErrorException verify_mesh(eM) push!(eM.ϵ, NaN) append!(eM, output_eMesh_half_plane()) mesh_remove_unused_points!(eM) @test length(eM.point) == 4 append!(eM, output_eMesh_half_p...
[ 198, 31, 9288, 2617, 366, 76, 5069, 1, 2221, 198, 220, 220, 220, 304, 44, 796, 304, 37031, 90, 14824, 11, 51, 316, 92, 3419, 198, 220, 220, 220, 4574, 0, 7, 68, 44, 13, 4122, 11, 20546, 9250, 90, 18, 11, 43879, 2414, 92, 7, ...
1.841121
1,177
<reponame>karajan9/statisticalrethinking using DrWatson @quickactivate "StatReth" # %% using DataFrames using CSV using StatsBase using Distributions using StatsPlots # %% 4.7 - 4.11 d = DataFrame(CSV.File(datadir("exp_raw/Howell_1.csv"))) # precis(d) d.height d2 = filter(row -> row.age >= 18, d) # either d2 = d[...
[ 27, 7856, 261, 480, 29, 21070, 1228, 272, 24, 14, 14269, 19929, 260, 28973, 198, 3500, 1583, 54, 13506, 198, 31, 24209, 39022, 366, 17126, 49, 2788, 1, 198, 198, 2, 43313, 198, 3500, 6060, 35439, 198, 3500, 44189, 198, 3500, 20595, ...
2.20603
995
""" Provide an API for the interface defined in StatsBase. cov(ce::CovarianceEstimator, X::AbstractMatrix, [w::AbstractWeights]; mean=nothing, dims::Int=1) Compute the covariance matrix of the matrix `X` along dimension `dims` using estimator `ce`. A weighting vector `w` can be specified. The keyword argument `mean...
[ 37811, 198, 15946, 485, 281, 7824, 329, 262, 7071, 5447, 287, 20595, 14881, 13, 628, 198, 66, 709, 7, 344, 3712, 34, 709, 2743, 590, 22362, 320, 1352, 11, 1395, 3712, 23839, 46912, 11, 685, 86, 3712, 23839, 1135, 2337, 11208, 1612, ...
2.544693
716
# # Single degree-of-freedom using ReachabilityAnalysis, StructuralDynamicsODESolvers # ### Equations of motion # Struct that holds a problem describing an harmonic oscillator with frequency ω: # x''(t) + ω^2 x(t) = 0 # # solution x(t) = Acos(ωt + B), v(t) = -ωAsin(ωt + B) # x(0) = Acos(B) # v(0) = -ωAsin(B) # # spe...
[ 2, 1303, 14206, 4922, 12, 1659, 12, 41295, 198, 198, 3500, 25146, 1799, 32750, 11, 32112, 1523, 35, 4989, 873, 3727, 1546, 349, 690, 198, 198, 2, 44386, 7889, 602, 286, 6268, 198, 198, 2, 32112, 326, 6622, 257, 1917, 12059, 281, 492...
2.010761
2,602
rel(path::AbstractString) = joinpath(splitdir(@__FILE__)[1], path) facts("OHLC backtest with timearray input") do # using quantstrat goldencross test # details in teststrategy_goldencross.jl ohlc_BA = TimeSeries.readtimearray( rel("quantstrat/goldencross/data/OHLC_BA_2.csv")) targetfun = TradingLogic.gold...
[ 2411, 7, 6978, 3712, 23839, 10100, 8, 796, 4654, 6978, 7, 35312, 15908, 7, 31, 834, 25664, 834, 38381, 16, 4357, 3108, 8, 198, 198, 37473, 7203, 12096, 5639, 736, 9288, 351, 4628, 451, 2433, 5128, 4943, 466, 198, 220, 1303, 1262, 55...
2.373357
2,207
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/FEMBasis.jl/blob/master/LICENSE import Base: length, size function length{T<:AbstractBasis}(B::T) return length(T) end function size{T<:AbstractBasis}(B::T) return size(T) end function eval_basis!{T<:AbstractBasis}(B::T, N,...
[ 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, 37, 3620, 15522, 271, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, ...
1.74325
3,778
<reponame>nwh/QuasiDefinite.jl using QuasiDefinite using Base.Test # generate random nxn spd matrix function gen_spd(n,seed=0) srand(seed) A = rand(n,n) A = A*A' + eye(n) A end function test_qdtf2!(A,uplo::Char) m, n = size(A) LD = copy(A) LD, info = QuasiDefinite.qdtf2!(uplo,LD) @test...
[ 27, 7856, 261, 480, 29, 77, 1929, 14, 4507, 17053, 7469, 9504, 13, 20362, 198, 3500, 2264, 17053, 7469, 9504, 198, 3500, 7308, 13, 14402, 198, 198, 2, 7716, 4738, 299, 87, 77, 599, 67, 17593, 198, 8818, 2429, 62, 2777, 67, 7, 77, ...
1.769231
442
<filename>test/helper/validate_sdd.jl # helper test functions to check for SDD properties holding function validate(sdd::Sdd) for node in linearize(sdd) # linearize first so that callee can use bit field validate_node(node) end #TODO make one of these for structured decomposability @test isdecompos...
[ 27, 34345, 29, 9288, 14, 2978, 525, 14, 12102, 378, 62, 82, 1860, 13, 20362, 198, 2, 31904, 1332, 5499, 284, 2198, 329, 9834, 35, 6608, 4769, 198, 198, 8818, 26571, 7, 82, 1860, 3712, 50, 1860, 8, 198, 220, 220, 329, 10139, 287, ...
2.376989
817
<gh_stars>10-100 # Test for infinite Bi-Lanczos using NonlinearEigenproblemsTest using NonlinearEigenproblems using Test using LinearAlgebra @bench @testset "Infbilanczos σ=0" begin nep=nep_gallery("qdep0"); nept=SPMF_NEP([copy(nep.A[1]'), copy(nep.A[2]'), copy(nep.A[3]')], nep.fi) n=size(nep,1); m=4...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 6208, 329, 15541, 8436, 12, 43, 1192, 37925, 198, 198, 3500, 8504, 29127, 36, 9324, 1676, 22143, 14402, 198, 3500, 8504, 29127, 36, 9324, 1676, 22143, 198, 3500, 6208, 198, 3500, 44800, ...
1.762781
1,467
<filename>test/conversions.jl<gh_stars>0 module TestConversions using Base.Test using DataArrays @assert isequal(@data([1, 2, NA]), convert(DataArray, @pdata([1, 2, NA]))) # Test vector() and matrix() conversion tools dv = @data ones(5) @assert isa(array(dv), Vector{Float64}) @assert isa(convert(...
[ 27, 34345, 29, 9288, 14, 1102, 47178, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 6208, 3103, 47178, 198, 197, 3500, 7308, 13, 14402, 198, 197, 3500, 6060, 3163, 20477, 628, 197, 31, 30493, 318, 40496, 7, 31, 7890, 26933, 16,...
2.44403
268
using Atum using Atum.Euler using PGFPlotsX using StaticArrays: SVector function sod(law, x⃗) FT = eltype(law) ρ = x⃗[1] < 1 // 2 ? 1 : 1 // 8 ρu⃗ = SVector(FT(0)) p = x⃗[1] < 1 // 2 ? 1 : 1 // 10 ρe = Euler.energy(law, ρ, ρu⃗, p) SVector(ρ, ρu⃗..., ρe) end import Atum: boundarystate boundarystate(law::E...
[ 3500, 1629, 388, 198, 3500, 1629, 388, 13, 36, 18173, 198, 198, 3500, 350, 21713, 3646, 1747, 55, 198, 3500, 36125, 3163, 20477, 25, 20546, 9250, 198, 198, 8818, 32581, 7, 6270, 11, 2124, 158, 225, 245, 8, 198, 220, 19446, 796, 1288...
2.008526
821
# This file is a part of BAT.jl, licensed under the MIT License (MIT). struct DensityWithDiff{D<:AbstractDensity,VJP<:DifferentiationAlgorithm} <: AbstractDensity vjpalg::VJP density::D end @inline Base.parent(density::DensityWithDiff) = density.density vjp_algorithm(density::DensityWithDiff) = density.vjp...
[ 2, 770, 2393, 318, 257, 636, 286, 37421, 13, 20362, 11, 11971, 739, 262, 17168, 13789, 357, 36393, 737, 628, 198, 7249, 360, 6377, 3152, 28813, 90, 35, 27, 25, 23839, 35, 6377, 11, 53, 12889, 27, 25, 40341, 3920, 2348, 42289, 92, ...
3.052885
624
<filename>src/laguerre.jl<gh_stars>1-10 """ struct LaguerreBasis{P} <: AbstractMultipleOrthogonalBasis{P} polynomials::Vector{P} end Orthogonal polynomial with respect to the univariate weight function ``w(x) = \\exp(-x)`` over the interval ``[0, \\infty]``. """ struct LaguerreBasis{P} <: AbstractMulti...
[ 27, 34345, 29, 10677, 14, 75, 11433, 263, 260, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 2878, 406, 11433, 263, 260, 15522, 271, 90, 47, 92, 1279, 25, 27741, 31217, 5574, 400, 519, 20996, 1552...
2.365079
378
<gh_stars>10-100 ## Example script for constant-strength source panel method using LinearAlgebra using Base.Iterators using Seaborn using AeroMDAO ## Airfoil airfoil = Foil(naca4((0,0,1,2), 81; sharp_trailing_edge = true)) V, α = 1., 0. ρ = 1.225 uniform = Uniform2D(V, α) num_pans = 80 panels = paneller(airf...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2235, 17934, 4226, 329, 6937, 12, 41402, 2723, 6103, 2446, 198, 3500, 44800, 2348, 29230, 198, 3500, 7308, 13, 29993, 2024, 198, 3500, 1001, 397, 1211, 198, 3500, 44720, 44, 5631, 46, 198, ...
2.559413
749
using Documenter, ParticleSwarmOptimizer makedocs( format = :html, assets = ["assets/pso_animation_preview.gif"], sitename = "ParticleSwarmOptimizer Documentation", authors = "<NAME>", pages = [ "Home" => "index.md", "Settings" => Any[ "Parameter" => "parameter.md", ...
[ 3500, 16854, 263, 11, 2142, 1548, 10462, 1670, 27871, 320, 7509, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 5794, 796, 1058, 6494, 11, 198, 220, 220, 220, 6798, 796, 14631, 19668, 14, 79, 568, 62, 11227, 341, 62, 3866, 11...
2.139205
352