content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>q2kuhn/QuantumLab.jl<gh_stars>10-100 using QuantumLab using Test using Dates using LinearAlgebra INFO(str) = @info "$(Dates.format(now(),dateformat"Y/m/d HH:MM:SS,sss")) $str" if (!@isdefined(indent)) indent = "" end INFO("$(indent)READING: h2o.xyz -> h2o::Geometry ") h2o = readGeometryXYZ("h2o.xyz") ...
[ 27, 7856, 261, 480, 29, 80, 17, 74, 7456, 77, 14, 24915, 388, 17822, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 29082, 17822, 198, 3500, 6208, 198, 3500, 44712, 198, 3500, 44800, 2348, 29230, 198, 198, 10778, 7, ...
2.449393
741
using DiscgolfRecord using Test @testset "DiscgolfRecord.jl" begin # Write your tests here. # Make sure we can preview courses @test_nowarn preview_course(COURSES["kit_carson"]) @test_nowarn preview_course(COURSES["mast_park"]) # Test the round reader sample_round_file = "20210719_mastpark.c...
[ 3500, 8444, 70, 4024, 23739, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 15642, 70, 4024, 23739, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 628, 220, 220, 220, 1303, 6889, 1654, 356, 460, 12714, 109...
2.635762
151
@doc doc""" latexraw(arg) Generate LaTeX equations from `arg`. Parses expressions, ParameterizedFunctions, SymEngine.Base and arrays thereof. Returns a string formatted for LaTeX. # Examples ## using expressions ```jldoctest expr = :(x/(y+x)) latexraw(expr) # output "\\frac{x}{y + x}" ``` ```jldoctest expr =...
[ 31, 15390, 2205, 37811, 198, 220, 220, 220, 47038, 1831, 7, 853, 8, 198, 198, 8645, 378, 4689, 49568, 27490, 422, 4600, 853, 44646, 198, 198, 47, 945, 274, 14700, 11, 25139, 2357, 1143, 24629, 2733, 11, 15845, 13798, 13, 14881, 290, ...
2.355277
1,838
push!(LOAD_PATH,"../source/0.6/src/") # include package info("Include all...") try include("../source/0.6/src/App.jl") include("../source/0.6/src/ThreadManager.jl") catch e # do not exit this run! warn(e) end info("Include done.") info("Create Docs...") using Documenter, App makedocs( build = joinpath(@_...
[ 14689, 0, 7, 35613, 62, 34219, 553, 40720, 10459, 14, 15, 13, 21, 14, 10677, 14, 4943, 198, 198, 2, 2291, 5301, 198, 10951, 7203, 818, 9152, 477, 9313, 8, 198, 28311, 198, 220, 2291, 7203, 40720, 10459, 14, 15, 13, 21, 14, 10677, ...
2.09682
1,415
<gh_stars>0 int_rules_6_1_10 = @theory begin #= ::Subsection::Closed:: =# #= 6.1.10*(c+d*x)^m*(a+b*sinh)^n =# @apply_utils Antiderivative((~u) ^ ~(m') * (~(a') + ~(b') * sinh(~v)) ^ ~(n'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~m * (~a + ~b * sinh(ExpandToSum(~v, ~x))) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~m...
[ 27, 456, 62, 30783, 29, 15, 198, 600, 62, 38785, 62, 21, 62, 16, 62, 940, 796, 2488, 1169, 652, 2221, 628, 220, 220, 220, 1303, 28, 7904, 7004, 5458, 3712, 2601, 1335, 3712, 796, 2, 198, 220, 220, 220, 1303, 28, 718, 13, 16, 1...
1.838356
365
<reponame>JuliaPackageMirrors/DataArrays.jl ## mapreduce implementation that skips NA function skipna_init(f, op, na::BitArray, data::Array, ifirst::Int, ilast::Int) # Get first non-NA element ifirst = Base.findnextnot(na, ifirst) @inbounds d1 = data[ifirst] # Get next non-NA element ifirst = Base...
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 6601, 3163, 20477, 13, 20362, 198, 2235, 3975, 445, 7234, 7822, 326, 1341, 2419, 11746, 198, 198, 8818, 14267, 2616, 62, 15003, 7, 69, 11, 1034, 11, 12385, 3712, 13128, 19182...
2.175633
3,513
using ModelingToolkit, OrdinaryDiffEq, Test @parameters t α β γ δ @variables x(t) y(t) D = Differential(t) eqs = [D(x) ~ α*x - β*x*y, D(y) ~ -δ*y + γ*x*y] sys = ODESystem(eqs) u0 = [x => 1.0, y => 1.0] p = [α => 1.5, β => 1.0, δ => 3.0, γ => 1.0] tspan = (0.0,10.0) prob = ODEProble...
[ 3500, 9104, 278, 25391, 15813, 11, 14230, 3219, 28813, 36, 80, 11, 6208, 198, 198, 31, 17143, 7307, 256, 26367, 27169, 7377, 111, 7377, 112, 198, 31, 25641, 2977, 2124, 7, 83, 8, 331, 7, 83, 8, 198, 35, 796, 20615, 498, 7, 83, 8...
1.728916
332
using Base.Test using QuantumOptics @testset "spin" begin D(op1::Operator, op2::Operator) = abs(tracedistance_nh(full(op1), full(op2))) # Test creation @test_throws AssertionError SpinBasis(1//3) @test_throws AssertionError SpinBasis(-1//2) @test_throws AssertionError SpinBasis(0) for spinnumber=[1//2, 1, 3//2, 4/...
[ 3500, 7308, 13, 14402, 198, 3500, 29082, 27871, 873, 198, 198, 31, 9288, 2617, 366, 39706, 1, 2221, 198, 198, 35, 7, 404, 16, 3712, 18843, 1352, 11, 1034, 17, 3712, 18843, 1352, 8, 796, 2352, 7, 2213, 2286, 9311, 62, 77, 71, 7, ...
2.012295
1,708
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule Xorg_xcb_util_wm_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("Xorg_xcb_util_wm") JLLWrappers.@generate_main_file("Xorg_xcb_util_wm", UUID("c22f9ab0-d5fe-5066-847c-f4bb1cd4e361")) end # module...
[ 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412, 1395, 2398, 62, 87, 21101, 62, 22602, 62, 26377, 62, 73, 297, 198, 3500, 7308, 198, 3500, 7308, 25, 471, 27...
2.310811
148
<gh_stars>1-10 ##### Beginning of file @info("Importing the RemoveLFS module...") import RemoveLFS import TimeZones @info("Reading config files...") include(joinpath("config","preferences","branches.jl",)) include(joinpath("config","preferences","git-hosts.jl",)) include(joinpath("config","preferences","git-user.j...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 4242, 2, 25976, 286, 2393, 198, 198, 31, 10951, 7203, 20939, 278, 262, 17220, 43, 10652, 8265, 9313, 8, 198, 198, 11748, 17220, 43, 10652, 198, 198, 11748, 3862, 57, 1952, 198, 198, 31, 10...
2.171561
647
<reponame>BradLyman/AWS.jl<filename>src/services/comprehendmedical.jl # This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: comprehendmedical using AWS.Compat using AWS.UUIDs """ DescribeEntitiesDetectionV2Job() Gets the properties associated with a medical entities detection job. Use t...
[ 27, 7856, 261, 480, 29, 30805, 31633, 805, 14, 12298, 50, 13, 20362, 27, 34345, 29, 10677, 14, 30416, 14, 785, 3866, 15631, 41693, 13, 20362, 198, 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30...
3.373441
6,416
<reponame>EcoJulia/Julia-PhD-course-Copenhagen ### A Pluto.jl notebook ### # v0.16.1 using Markdown using InteractiveUtils # ╔═╡ bc0083ae-2c24-11ec-27d1-d3151362feba using VegaLite, DataFrames, CSV, RDatasets # ╔═╡ af8af33a-f75c-4ac1-9c3e-7afa932fd4c1 md"## Plotting with VegaLite Vegalite is a modern grammar-of-grap...
[ 27, 7856, 261, 480, 29, 36, 1073, 16980, 544, 14, 16980, 544, 12, 2725, 35, 12, 17319, 12, 34, 9654, 71, 11286, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1433, 13, 16, 198, 198, 3500, 2940, 2902, 198, ...
1.873372
10,827
""" unitRandom3Cartesian(rng = MersenneTwister()) Returns a unit vector pointing in a random direction in Cartesian coordinates. """ function unitRandom3Cartesian(rng = MersenneTwister()) θ = π*rand(rng) ϕ = 2.0*π*rand(rng) return Vector([ cos(ϕ)*sin(θ), sin(ϕ)*sin(θ), cos(θ) ...
[ 37811, 198, 220, 220, 220, 4326, 29531, 18, 43476, 35610, 7, 81, 782, 796, 337, 364, 29727, 5080, 1694, 28955, 198, 198, 35561, 257, 4326, 15879, 10609, 287, 257, 4738, 4571, 287, 13690, 35610, 22715, 13, 198, 37811, 198, 8818, 4326, ...
2.134448
1,495
<filename>sims/sim_study/sim.jl println("Loading packages...") @time begin using Cytof5 using Random, Distributions # TODO: Get rid of this dep using RCall using BSON using ArgParse import Cytof5.Model.logger include("util.jl") end println("Done loading packages.") # TODO: review # ARG PARSING # Defi...
[ 27, 34345, 29, 82, 12078, 14, 14323, 62, 44517, 14, 14323, 13, 20362, 198, 35235, 7203, 19031, 10392, 9313, 8, 198, 31, 2435, 2221, 198, 220, 1262, 5934, 1462, 69, 20, 198, 220, 1262, 14534, 11, 46567, 507, 198, 220, 1303, 16926, 46...
1.942966
2,630
<filename>src/processes.jl # ------------------------------------------------------------------ # Licensed under the MIT License. See LICENCE in the project root. # ------------------------------------------------------------------ """ Process A geological process of evolution. """ abstract type Process end """ ...
[ 27, 34345, 29, 10677, 14, 14681, 274, 13, 20362, 198, 2, 16529, 438, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 38559, 18310, 287, 262, 1628, 6808, 13, 198, 2, 16529, 438, 198, 198, 37811, 198, 220, 220, 220, 10854, 198, 198, ...
3.234234
444
<filename>test/FESpacesTests/ConstrainedFESpacesTests.jl module ConstrainedFESpacesTests using Test using Gridap using Gridap.ConstrainedFESpaces: VectorOfTwoParts D = 2 dom = fill(4,D) model = CartesianDiscreteModel(partition=tuple(dom...)) order = 1 diritag = "boundary" _fespace = CLagrangianFESpace(Float64,model,...
[ 27, 34345, 29, 9288, 14, 37, 1546, 43076, 51, 3558, 14, 3103, 2536, 1328, 37, 1546, 43076, 51, 3558, 13, 20362, 198, 21412, 1482, 2536, 1328, 37, 1546, 43076, 51, 3558, 198, 198, 3500, 6208, 198, 3500, 24846, 499, 198, 3500, 24846, ...
2.167712
638
module FESpacesTests1 using Test @testset "ConformingFESpaces" begin include("ConformingFESpacesTests.jl") end @testset "FESpacesInterfaces" begin include("FESpacesInterfacesTests.jl") end @testset "SingleFieldFESpaces" begin include("SingleFieldFESpacesTests.jl") end @testset "TrialFESpaces" begin include("TrialF...
[ 21412, 376, 1546, 43076, 51, 3558, 16, 198, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 3103, 15464, 37, 1546, 43076, 1, 2221, 2291, 7203, 3103, 15464, 37, 1546, 43076, 51, 3558, 13, 20362, 4943, 886, 198, 198, 31, 9288, 2617, 3...
2.890411
365
@testset "Testing IndexZero" begin IndexZero = CounterTools.IndexZero x = CounterTools.IndexZero(0) @test CounterTools.value(x) == 0 # `Integers` should have 1 subtracted from them. # `IndexZero`s should just pass through y = CounterTools.indexzero(1) z = CounterTools.indexzero(x) @test...
[ 31, 9288, 2617, 366, 44154, 12901, 28667, 1, 2221, 198, 220, 220, 220, 12901, 28667, 796, 15034, 33637, 13, 15732, 28667, 198, 220, 220, 220, 2124, 796, 15034, 33637, 13, 15732, 28667, 7, 15, 8, 198, 220, 220, 220, 2488, 9288, 15034, ...
2.345794
214
<reponame>mattirish/PowerSimulations.jl<filename>src/devices_models/devices/hydro_generation.jl abstract type AbstractHydroFormulation <: AbstractDeviceFormulation end abstract type AbstractHydroDispatchFormulation <: AbstractHydroFormulation end abstract type AbstractHydroUnitCommitment <: AbstractHydroFormulation e...
[ 27, 7856, 261, 480, 29, 76, 1078, 343, 680, 14, 13434, 8890, 5768, 13, 20362, 27, 34345, 29, 10677, 14, 42034, 62, 27530, 14, 42034, 14, 15511, 305, 62, 20158, 13, 20362, 198, 397, 8709, 2099, 27741, 40436, 305, 8479, 1741, 1279, 25...
1.993614
8,613
<reponame>scottiealexander/Spk.jl<filename>Histogram/src/Histogram.jl module Histogram # simple histogram functions copied from Julia v0.4.7 to avoid having to # pull in all of Statistics.jl export hist, hist! function histrange(v::AbstractArray{T}, n::Integer) where {T<:AbstractFloat} nv = length(v) if nv =...
[ 27, 7856, 261, 480, 29, 1416, 1252, 494, 1000, 87, 4066, 14, 4561, 74, 13, 20362, 27, 34345, 29, 13749, 21857, 14, 10677, 14, 13749, 21857, 13, 20362, 198, 21412, 5590, 21857, 198, 198, 2, 2829, 1554, 21857, 5499, 18984, 422, 22300, ...
2.079239
1,262
using Catlab.CategoricalAlgebra, Catlab.Graphs, Catlab.Present, Catlab.Graphics, Catlab.Theories, Catlab.Present using Catlab.CategoricalAlgebra.FinCats: FinCatGraphEq @present ThSIR(FreeSchema) begin (S,I,R)::Ob end """This code will work for any choice of 'type graph'""" function update_state(state::StructACSe...
[ 3500, 5181, 23912, 13, 34, 2397, 12409, 2348, 29230, 11, 5181, 23912, 13, 37065, 82, 11, 5181, 23912, 13, 34695, 11, 5181, 23912, 13, 18172, 11, 5181, 23912, 13, 464, 1749, 11, 5181, 23912, 13, 34695, 198, 3500, 5181, 23912, 13, 34, ...
2.456494
793
import Base.Cartesian.@ntuple nparticles(p) = length(p) nparticles(p::Type{<:AbstractParticles{T,N}}) where {T,N} = N nparticles(p::AbstractParticles{T,N}) where {T,N} = N nparticles(p::ParticleArray) = nparticles(eltype(p)) nparticles(p::Type{<:ParticleArray}) = nparticles(eltype(p)) particletype(p::AbstractParticle...
[ 11748, 7308, 13, 43476, 35610, 13, 31, 429, 29291, 198, 198, 77, 3911, 2983, 7, 79, 8, 796, 4129, 7, 79, 8, 198, 77, 3911, 2983, 7, 79, 3712, 6030, 90, 27, 25, 23839, 7841, 2983, 90, 51, 11, 45, 11709, 8, 810, 1391, 51, 11, ...
2.511335
1,985
<gh_stars>1-10 using FileIO using Images field = [ "s3", "s8", "s14", "s15", "s20","s37", "s40"] data_dir = "/datahub/rawdata/tandeng/mRNA_imaging/mRNA_confocal_hamamatsu-60X-TIRF/20200316"; output_dir = "$(data_dir)_visualization" try mkdir("$output_dir") catch end function max_projection(pos) println("Proc...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 3500, 9220, 9399, 198, 3500, 5382, 198, 198, 3245, 796, 685, 366, 82, 18, 1600, 366, 82, 23, 1600, 366, 82, 1415, 1600, 366, 82, 1314, 1600, 366, 82, 1238, 2430, 82, 2718, 1600, 366...
2.064246
358
<gh_stars>0 import Flatten: flattenable @metadata initial_value nothing import FieldMetadata: @units, units import FieldMetadata: @limits, limits import FieldMetadata: @prior, prior import FieldMetadata: @description, description @metadata bounds nothing import FieldMetadata: @logscaled, logscaled @metadata reference n...
[ 27, 456, 62, 30783, 29, 15, 198, 11748, 1610, 41769, 25, 27172, 21633, 198, 31, 38993, 4238, 62, 8367, 2147, 198, 11748, 7663, 9171, 14706, 25, 2488, 41667, 11, 4991, 198, 11748, 7663, 9171, 14706, 25, 2488, 49196, 11, 7095, 198, 1174...
2.481211
6,307
using StatsBase, Plots; pyplot() names = ["Mary","Mel","David","John","Kayley","Anderson"] randomName() = rand(names) X = 3:8 N = 10^6 sampleLengths = [length(randomName()) for _ in 1:N] bar(X,counts(sampleLengths)/N, ylims=(0,0.35), xlabel="Name length", ylabel="Estimated p(x)", legend=:none)
[ 3500, 20595, 14881, 11, 1345, 1747, 26, 12972, 29487, 3419, 198, 198, 14933, 796, 14631, 24119, 2430, 21102, 2430, 11006, 2430, 7554, 2430, 37247, 1636, 2430, 42991, 8973, 198, 25120, 5376, 3419, 796, 43720, 7, 14933, 8, 198, 55, 796, 5...
2.586207
116
<filename>test/testsuite/good/intarith4.jl int main () { printInt(fact(7)) ; printInt(factr(7)) ; return 0 ; } // iterative factorial int fact (int n) { int i,r ; i = 1 ; r = 1 ; while (i <= n) { r = r * i ; i++ ; } return r ; } // recursive factorial int factr (int n) { if (n < 2) return 1 ; else return n * factr(n-1)...
[ 27, 34345, 29, 9288, 14, 9288, 2385, 578, 14, 11274, 14, 600, 283, 342, 19, 13, 20362, 198, 600, 1388, 7499, 1391, 198, 4798, 5317, 7, 22584, 7, 22, 4008, 2162, 198, 4798, 5317, 7, 22584, 81, 7, 22, 4008, 2162, 198, 7783, 657, 2...
2.226027
146
<reponame>dpsanders/IntervalUnionArithmetic.jl<gh_stars>0 """ Interval unions sets of defined by unions of disjoint intervals. This file includes constructors, arithmetic (including intervals and scalars) and complement functions Empty sets and intersecting intervals are appropriately handled in the c...
[ 27, 7856, 261, 480, 29, 67, 862, 45070, 14, 9492, 2100, 38176, 3163, 29848, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 37811, 628, 220, 220, 220, 4225, 2100, 11936, 5621, 286, 5447, 416, 11936, 286, 595, 73, 1563, 20016, 13, 198, ...
2.19795
1,854
<gh_stars>0 #= reverser.jl based on https://stackoverflow.com/questions/27411401/julia-reverse-n-dimensional-arrays =# export reverser using Test: @test """ y = reverser(x, dims) reverse array along specified dimensions (or all if unspecified) """ function reverser(x::AbstractArray, dims::AbstractVector{<:Int}) ...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 28, 198, 260, 690, 263, 13, 20362, 198, 3106, 319, 198, 5450, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 28857, 16562, 486, 14, 73, 43640, 12, 50188, 12, 77, 12, 19577, 12, 3258, 59...
2.388235
340
<gh_stars>0 """ # Module FortranReader FortranReader provides basic commands to read the 'unformatted' files written by Fortran programs. Although not technically portable, most Fortran programs write these files in a predictable way, in 'records'. Each record contains either one or several variables, marked before ...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 2, 19937, 6401, 2596, 33634, 198, 198, 21926, 2596, 33634, 3769, 4096, 9729, 284, 1100, 262, 705, 403, 687, 16898, 6, 3696, 3194, 198, 1525, 6401, 2596, 4056, 13, 198, 198, 7003, 407, 144...
2.636199
1,652
<reponame>ali-ramadhan/Atmosfoolery.jl<gh_stars>1-10 using Test using Logging using Statistics using Printf using JLD2 using CUDA using Oceananigans using Oceananigans.Architectures using JULES Logging.global_logger(OceananigansLogger()) Archs = [CPU] @hascuda Archs = [GPU] CUDA.allowscalar(true) @testse...
[ 27, 7856, 261, 480, 29, 7344, 12, 859, 324, 7637, 14, 2953, 16785, 69, 970, 1924, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 6208, 198, 3500, 5972, 2667, 198, 3500, 14370, 198, 3500, 12578, 69, 198, 3500, 449, 1116...
2.497382
191
<gh_stars>0 using SearchLight, SearchLight.Migrations, SearchLight.Relationships cd(@__DIR__) connection_file = joinpath(@__DIR__,"mysql_connection.yml") conn_info_postgres = SearchLight.Configuration.load(connection_file) const conn = SearchLight.connect(conn_info_postgres) try SearchLight.Migrations.status() cat...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 11140, 15047, 11, 11140, 15047, 13, 44, 3692, 602, 11, 11140, 15047, 13, 47117, 5748, 198, 198, 10210, 7, 31, 834, 34720, 834, 8, 198, 198, 38659, 62, 7753, 796, 4654, 6978, 7, 31, 834, 34720...
2.78125
448
<reponame>bovine3dom/JustJoshing.jl<gh_stars>0 #!/usr/bin/env julia # Best run in the REPL until I work out how to get unicodeplots to print to stdout when in an `include` # `env JULIA_NUM_THREADS=(nproc) julia --project` using JustJoshing import Plots Plots.unicodeplots() # This should look like Figure 5.3, page 1...
[ 27, 7856, 261, 480, 29, 65, 709, 500, 18, 3438, 14, 5703, 41, 418, 722, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 2, 6705, 1057, 287, 262, 45285, 1566, 314, 670, 503,...
1.993021
1,003
__precompile__() module PAPA export papa_reconstruction, papa_reconstruction_debug using LinearAlgebra, LeastSquaresOptim greet() = print("Welcome to PAPA world!") include("Process_Solver.jl") include("SupportFunctions.jl") """ papa_reconstruction(N, Npairs, pair_order, initial_chilist, sigmaVec[, CP_penalty, ...
[ 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 350, 2969, 32, 198, 198, 39344, 20461, 64, 62, 260, 9979, 2762, 11, 20461, 64, 62, 260, 9979, 2762, 62, 24442, 198, 198, 3500, 44800, 2348, 29230, 11, 1004, 459, 22266, 3565, 27871, ...
1.991056
2,348
# Run package tests println("Testing Silo.jl in Julia version ", VERSION) using Base.Test include(joinpath("..", "src", "Silo.jl")) # using Silo # run(`cd $(dirname(@__FILE__))/files && make`) include("test1dwriteInt.jl") include("test1dreadwrite.jl") # Silo.DBInqFile(dbfile.file_name)
[ 2, 5660, 5301, 5254, 198, 35235, 7203, 44154, 4243, 78, 13, 20362, 287, 22300, 2196, 33172, 44156, 2849, 8, 198, 198, 3500, 7308, 13, 14402, 198, 17256, 7, 22179, 6978, 7203, 492, 1600, 366, 10677, 1600, 366, 15086, 78, 13, 20362, 487...
2.636364
110
# Modelo de turbina sem sangria type Turbina Turbina()=begin PP2=outers.PP2 new( DanaPlugin(Dict{Symbol,Any}( :Brief=>"Steam tables" )), Entalpia(), Eficiencia(Dict{Symbol,Any}( :Brief=>"Eficiencia da turbina" )), Corrente(Dict{Symbol,Any}( :Symbol=>"_{in}", :PosX=>0, :PosY=>0...
[ 2, 9104, 78, 390, 14830, 1437, 5026, 25889, 7496, 198, 4906, 3831, 65, 1437, 198, 197, 51, 5945, 1437, 3419, 28, 27471, 198, 197, 197, 10246, 17, 28, 280, 1010, 13, 10246, 17, 198, 197, 197, 3605, 7, 198, 197, 197, 197, 35, 2271, ...
1.850856
818
getevennumbers(arr) = filter(iseven,arr)
[ 1136, 10197, 77, 17024, 7, 3258, 8, 796, 8106, 7, 786, 574, 11, 3258, 8 ]
2.666667
15
@testset "Bus Constructors" begin tBus = Bus() tLoadZones = LoadZones() end @testset "Generation Constructors" begin tEconThermal = EconThermal() @test tEconThermal isa PowerSystems.Component tTechThermal = TechThermal() @test tTechThermal isa PowerSystems.Component tThermalGen = ThermalDis...
[ 31, 9288, 2617, 366, 16286, 28407, 669, 1, 2221, 198, 220, 220, 220, 256, 16286, 796, 5869, 3419, 198, 220, 220, 220, 256, 8912, 57, 1952, 796, 8778, 57, 1952, 3419, 198, 437, 198, 198, 31, 9288, 2617, 366, 8645, 341, 28407, 669, ...
2.755513
1,043
<reponame>ChristianSchuler/GeophysicalModelGenerator.jl using Base: Int64, Float64, NamedTuple using Printf using Glob # LaMEM I/O # # These are routines that help to create a LaMEM marker files from a ParaviewData structure, which can be used to perform geodynamic simulations # We also include routines with which we...
[ 27, 7856, 261, 480, 29, 20298, 14874, 18173, 14, 10082, 41789, 17633, 8645, 1352, 13, 20362, 198, 3500, 7308, 25, 2558, 2414, 11, 48436, 2414, 11, 34441, 51, 29291, 198, 3500, 12578, 69, 198, 3500, 40713, 198, 198, 2, 4689, 44, 3620, ...
2.021001
14,142
mutable struct NewickXMLElement <: MyXMLElement el::XMLOrNothing newick::String fix_tree::Bool NewickXMLElement(newick::String) = new(nothing, newick, true) end function make_xml(nl::NewickXMLElement) el = new_element(bn.NEWICK) set_attribute(el, bn.ID, bn.DEFAULT_TREE_NAME) if nl.fix_tre...
[ 76, 18187, 2878, 968, 624, 37643, 2538, 1732, 1279, 25, 2011, 37643, 2538, 1732, 198, 220, 220, 220, 1288, 3712, 55, 5805, 5574, 18465, 198, 220, 220, 220, 649, 624, 3712, 10100, 198, 220, 220, 220, 4259, 62, 21048, 3712, 33, 970, 6...
2.139831
236
<gh_stars>0 global DISABLESTBPRTLINES = false function togglePrtStbLines() global DISABLESTBPRTLINES DISABLESTBPRTLINES = !DISABLESTBPRTLINES end function plotLsrScanFeats(br::Array{Float64,2}) Cart = zeros(size(br)) Cart[:,1] = br[:,2].*cos(br[:,1]) Cart[:,2] = br[:,2].*sin(br[:,1]) plot(x=Cart[:,1],y=Ca...
[ 27, 456, 62, 30783, 29, 15, 198, 20541, 13954, 6242, 43, 6465, 33, 4805, 14990, 1268, 1546, 796, 3991, 198, 198, 8818, 19846, 6836, 83, 1273, 65, 43, 1127, 3419, 198, 220, 3298, 13954, 6242, 43, 6465, 33, 4805, 14990, 1268, 1546, 19...
1.915194
12,735
module QuakePAK const _fileid = 0x5041434b # The chars "PACK" used as a signature of PAK archives struct ReadableFile <: IO _io::IO filename:: String offset:: Int size:: Int end Base.position(rf::ReadableFile) = position(rf._io) - rf.offset Base.eof(rf.ReadableFile) = position(rf._io) < rf.offset + rf.s...
[ 21412, 42901, 4537, 42, 198, 198, 9979, 4808, 7753, 312, 796, 657, 87, 33580, 1415, 2682, 65, 220, 220, 220, 220, 220, 1303, 383, 34534, 366, 47, 8120, 1, 973, 355, 257, 9877, 286, 8147, 42, 22415, 198, 198, 7249, 4149, 540, 8979, ...
2.519763
506
@testset "ladderize" begin start_tree = ParseNewick("((A,(B,(C,(D,E)))),(F,(G,H)));") descending_tree = ParseNewick("(((((D,E),C),B),A),((G,H),F));") ascending_tree = ParseNewick("((F,(G,H)),(A,(B,(C,(D,E)))));") start_newick = newick(start_tree) desc_newick = newick(descending_tree) asc_newic...
[ 198, 31, 9288, 2617, 366, 9435, 1082, 1096, 1, 2221, 198, 220, 220, 220, 923, 62, 21048, 796, 2547, 325, 3791, 624, 7203, 19510, 32, 11, 7, 33, 11, 7, 34, 11, 7, 35, 11, 36, 22305, 828, 7, 37, 11, 7, 38, 11, 39, 4008, 1776, ...
2.196133
362
<gh_stars>1-10 @everywhere module DatasetPreloader using HDF5 using Distributed export preload, load, getPreloadFileName preloadFileName = "" preloadFuture = 0 function readFromHDF(filename) GC.gc() try return h5read(filename,"/FullSpectra/TofData") catch return 0 end end getPreloadFileName() =...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 31, 16833, 3003, 8265, 16092, 292, 316, 6719, 29356, 198, 197, 3500, 5572, 37, 20, 198, 197, 3500, 4307, 6169, 198, 197, 39344, 662, 2220, 11, 3440, 11, 651, 6719, 2220, 8979, 5376, 628, 1...
2.78806
335
module TracePrecompiles function run_julia(cmd) current_proj = unsafe_string(Base.JLOptions().project) run(`$(Base.julia_cmd()) --project=$(current_proj) --startup-file=no $(cmd)`) end function trace_compiles(package, trace_file, outputfile) tdir = mktempdir(; cleanup=true) trace_out = joinpath(tdir, ...
[ 21412, 34912, 6719, 5589, 2915, 198, 198, 8818, 1057, 62, 73, 43640, 7, 28758, 8, 198, 220, 220, 220, 1459, 62, 1676, 73, 796, 21596, 62, 8841, 7, 14881, 13, 41, 21982, 8544, 22446, 16302, 8, 198, 220, 220, 220, 1057, 7, 63, 3, ...
2.419811
212
import ..KERNEL.System "Save information needed to identify a SSBond" struct SSBond #Tuple of chain_id and residue_number chain_id::Char res_num::Int64 end "Packages the parsed fields from a conect line in a struct to avoid allocations" mutable struct ConectLineParams bonding_atoms::Vector{Int} ...
[ 198, 11748, 11485, 42, 28778, 3698, 13, 11964, 628, 198, 198, 1, 16928, 1321, 2622, 284, 5911, 257, 6723, 33, 623, 1, 198, 7249, 6723, 33, 623, 220, 220, 220, 1303, 51, 29291, 286, 6333, 62, 312, 290, 35186, 62, 17618, 198, 220, 2...
2.013446
6,991
<reponame>jeremiahpslewis/Term.jl<gh_stars>0 import Term: Panel, TextBox @testset "\e[34mPanel - no content" begin for style in ("default", "red", "on_blue") testpanel( Panel(;fit=true, style=style), 3, 2 ) testpanel( Panel(), 88, 2 ) testpanel( ...
[ 27, 7856, 261, 480, 29, 73, 567, 35029, 862, 293, 86, 271, 14, 40596, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 11748, 35118, 25, 18810, 11, 8255, 14253, 628, 198, 198, 31, 9288, 2617, 37082, 68, 58, 2682, 76, 26639, 532, 645, ...
1.572339
5,336
<reponame>mschauer/Gadfly.jl<filename>src/statistics.jl module Stat import Gadfly import StatsBase using DataArrays using Compose using Color using Loess using Hexagons import Gadfly: Scale, Coord, element_aesthetics, default_scales, isconcrete, nonzero_length, setfield! import StatsBase: bandwidth, kd...
[ 27, 7856, 261, 480, 29, 907, 354, 16261, 14, 38, 324, 12254, 13, 20362, 27, 34345, 29, 10677, 14, 14269, 3969, 13, 20362, 198, 21412, 5133, 198, 198, 11748, 20925, 12254, 198, 11748, 20595, 14881, 198, 3500, 6060, 3163, 20477, 198, 35...
1.905493
13,544
using CSV, DataFrames, Distributed, Dates, LinearAlgebra, Distributions, DelimitedFiles, SharedArrays # Custom package using Jevo # Get date to append to output file date = Dates.format(Dates.today(), "yyyy_mm_dd") # Get number of workers as a script argument if length(ARGS) == 1 addprocs(parse(Int64, ARGS[1]))...
[ 3500, 44189, 11, 6060, 35439, 11, 4307, 6169, 11, 44712, 11, 44800, 2348, 29230, 11, 46567, 507, 11, 4216, 320, 863, 25876, 11, 39403, 3163, 20477, 198, 198, 2, 8562, 5301, 198, 3500, 449, 1990, 78, 628, 198, 2, 3497, 3128, 284, 244...
2.06914
1,186
<reponame>ranocha/EllipsisNotation.jl __precompile__() module EllipsisNotation import Base: to_indices, tail const .. = Val{:..}() @inline fillcolons(inds, I) = fillcolons((), inds, I) @inline fillcolons(colons, ::Tuple{}, ::Tuple{}) = colons @noinline fillcolons(colons, ::Tuple{}, ::Tuple) = throw(ArgumentError(...
[ 27, 7856, 261, 480, 29, 2596, 5374, 64, 14, 30639, 2419, 271, 3673, 341, 13, 20362, 198, 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 7122, 2419, 271, 3673, 341, 198, 198, 11748, 7308, 25, 284, 62, 521, 1063, 11, 7894, 198, 9...
2.473186
317
<gh_stars>10-100 using ImageSegmentation using ImageSegmentation.Colors using ImageSegmentation.FixedPointNumbers using FileIO using Statistics using SparseArrays using Test @testset "flood_fill" begin # 0d a = reshape([true]) @test flood(identity, a, CartesianIndex()) == a @test_throws ArgumentError f...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 7412, 41030, 14374, 198, 3500, 7412, 41030, 14374, 13, 5216, 669, 198, 3500, 7412, 41030, 14374, 13, 13715, 12727, 49601, 198, 3500, 9220, 9399, 198, 3500, 14370, 198, 3500, 1338, 17208,...
2.090308
1,816
<reponame>mppmu/SIS3316.jl<gh_stars>1-10 # This file is a part of StruckVMEDevices.jl, licensed under the MIT License (MIT). import Test Test.@testset "SIS3316Digitizers" begin end # testset
[ 27, 7856, 261, 480, 29, 76, 381, 30300, 14, 50, 1797, 2091, 1433, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2393, 318, 257, 636, 286, 520, 30915, 15996, 1961, 1990, 1063, 13, 20362, 11, 11971, 739, 262, 17168, ...
2.573333
75
using STC.SUniward using Base.Test using Images function testreflectedsetindex() a=zeros(20,30) b= padarray(a,Pad(:symmetric,[16,16],[16,16])) @testset begin for j in 1:size(a,2) for i in 1:size(a,1) a[i,j]=1 SUniward.reflectedsetindex!(b,i,j,1) c = padarray(a,Pad(...
[ 3500, 3563, 34, 13, 50, 3118, 72, 904, 198, 3500, 7308, 13, 14402, 198, 3500, 5382, 198, 198, 8818, 1332, 5420, 12609, 2617, 9630, 3419, 198, 220, 257, 28, 9107, 418, 7, 1238, 11, 1270, 8, 198, 220, 275, 28, 14841, 18747, 7, 64, ...
1.995199
5,624
const packages = [ "AverageShiftedHistograms", "BDF", "BrainWave", "Diversity", "IterativeSolvers", "RCall", "SDT", "Sims", "TargetedLearning" ] const failures = Set() for package in packages print(" - ", package) try require(package) println(" ✓") c...
[ 9979, 10392, 796, 685, 198, 220, 220, 220, 366, 26287, 2484, 21715, 13749, 26836, 1600, 198, 220, 220, 220, 366, 33, 8068, 1600, 198, 220, 220, 220, 366, 44687, 39709, 1600, 198, 220, 220, 220, 366, 35, 1608, 1600, 198, 220, 220, 22...
2.19917
241
function retrieve_parent_ex(parent_handle::SpecHandle, func::SpecFunc) parent_handle_var = findfirst(==(parent_handle.name), func.params.type) @match n = func.name begin if !isnothing(parent_handle_var) end => wrap_identifier(func.params[parent_handle_var]) _ => nothing end end func...
[ 8818, 19818, 62, 8000, 62, 1069, 7, 8000, 62, 28144, 3712, 22882, 37508, 11, 25439, 3712, 22882, 37, 19524, 8, 198, 220, 220, 220, 2560, 62, 28144, 62, 7785, 796, 1064, 11085, 7, 855, 7, 8000, 62, 28144, 13, 3672, 828, 25439, 13, ...
2.458045
1,013
################################################################################ # Common models used in testing ################################################################################ function reldiff(a, b) diff = sum(abs(a - b)) norm = sum(abs(a)) return diff / (norm + 1e-10) end function rand_dims(ma...
[ 29113, 29113, 14468, 198, 2, 8070, 4981, 973, 287, 4856, 198, 29113, 29113, 14468, 198, 8818, 302, 335, 733, 7, 64, 11, 275, 8, 198, 220, 814, 796, 2160, 7, 8937, 7, 64, 532, 275, 4008, 198, 220, 2593, 796, 2160, 7, 8937, 7, 64,...
3.034653
202
<filename>src/utilities.jl get_all_plots_types() = Set([:fit, :residuals, :normal_checks, :cooksd, :leverage, :homoscedasticity]) get_needed_plots(s::String) = return get_needed_plots([s]) get_needed_plots(s::Symbol) = return get_needed_plots([s]) get_needed_plots(s::Vector{String}) = return get_needed_plots(Symbol.(lo...
[ 27, 34345, 29, 10677, 14, 315, 2410, 13, 20362, 198, 1136, 62, 439, 62, 489, 1747, 62, 19199, 3419, 796, 5345, 26933, 25, 11147, 11, 1058, 411, 312, 723, 82, 11, 1058, 11265, 62, 42116, 11, 1058, 27916, 21282, 11, 1058, 293, 1857, ...
2.363663
6,803
<gh_stars>0 abstract type CMF end abstract type CIE1931_CMF <: CMF end abstract type CIE1964_CMF <: CMF end abstract type CIE1931J_CMF <: CMF end abstract type CIE1931JV_CMF <: CMF end abstract type CIE2006_2_CMF <: CMF end abstract type CIE2006_10_CMF <: CMF end """ colormatch(wavelength) colormatch(matching...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 397, 8709, 2099, 16477, 37, 886, 198, 397, 8709, 2099, 327, 10008, 1129, 3132, 62, 24187, 37, 1279, 25, 16477, 37, 886, 198, 397, 8709, 2099, 327, 10008, 46477, 62, 24187, 37, 1279, 25, 16477, ...
1.839334
52,824
<reponame>giadasp/Psychometrics.jl include("je_polyagamma_struct.jl") include("je_polyagamma_optimize.jl") function joint_estimate_pg!( items::Vector{<:AbstractItem}, examinees::Vector{<:AbstractExaminee}, responses::Vector{<:AbstractResponse}; max_time::Int64 = 100, mcmc_iter::Int64 = 10, x_to...
[ 27, 7856, 261, 480, 29, 12397, 324, 5126, 14, 31923, 908, 10466, 13, 20362, 198, 17256, 7203, 18015, 62, 35428, 363, 321, 2611, 62, 7249, 13, 20362, 4943, 198, 17256, 7203, 18015, 62, 35428, 363, 321, 2611, 62, 40085, 1096, 13, 20362,...
1.764164
2,930
<reponame>sloede/TriplotRecipes.jl module TriplotRecipes using PlotUtils,RecipesBase,TriplotBase export tricontour,tricontour!,tripcolor,tripcolor!,dgtripcolor,dgtripcolor!,trimesh,trimesh! function append_with_nan!(a,b) append!(a,b) push!(a,NaN) end @recipe function f(contours::Vector{TriplotBase.Contour{T...
[ 27, 7856, 261, 480, 29, 82, 5439, 18654, 14, 14824, 29487, 6690, 18636, 13, 20362, 198, 21412, 7563, 29487, 6690, 18636, 198, 198, 3500, 28114, 18274, 4487, 11, 6690, 18636, 14881, 11, 14824, 29487, 14881, 198, 198, 39344, 491, 291, 756...
1.919037
1,371
using LinearAlgebra using Random using SparseArrays using Test using Jutils.Elements using Jutils.Functions using Jutils.Integration using Jutils.Mesh using Jutils.Transforms using Jutils.Topologies const lineelt = Element(Simplex{1}(), 1) const squareelt = Element(Tensor([Simplex{1}(), Simplex{1}()]), 1) ev(func, ...
[ 3500, 44800, 2348, 29230, 198, 3500, 14534, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 6208, 198, 198, 3500, 449, 26791, 13, 36, 3639, 198, 3500, 449, 26791, 13, 24629, 2733, 198, 3500, 449, 26791, 13, 34500, 1358, 198, 3500, 449, ...
3.037559
213
using Test using Base.BinaryPlatforms import Libdl using BinaryBuilderBase using BinaryBuilderBase: template, dlopen_flags_str # The platform we're running on const platform = HostPlatform() @testset "Products" begin @test template(raw"$libdir/foo-$arch/$nbits/bar-$target", Platform("x86_64", "windows")) == ...
[ 3500, 6208, 198, 3500, 7308, 13, 33, 3219, 37148, 82, 198, 11748, 7980, 25404, 198, 3500, 45755, 32875, 14881, 198, 3500, 45755, 32875, 14881, 25, 11055, 11, 288, 75, 9654, 62, 33152, 62, 2536, 198, 198, 2, 383, 3859, 356, 821, 2491, ...
2.359073
4,403
<reponame>mwhatters/SpringCollab2020 module SpringCollab2020TrollStrawberry using ..Ahorn, Maple @mapdef Entity "SpringCollab2020/trollStrawberry" TrollStrawberry(x::Integer, y::Integer, winged::Bool=false) const placements = Ahorn.PlacementDict( "Troll Strawberry (Spring Collab 2020)" => Ahorn.EntityPlacement(...
[ 27, 7856, 261, 480, 29, 76, 10919, 1010, 14, 30387, 22667, 397, 42334, 198, 171, 119, 123, 21412, 8225, 22667, 397, 42334, 51, 2487, 1273, 1831, 8396, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 31, 8899, 4299, 20885, 366...
2.542714
597
<gh_stars>0 module triangleInterpolator using Images export rasterizationBBOX function pointLine(x::Float64, y::Float64, line::Array{Float64}, linex::Float64, liney::Float64 )::Float64 return lin...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 22950, 9492, 16104, 1352, 198, 220, 220, 220, 1262, 5382, 198, 220, 220, 220, 10784, 374, 1603, 1634, 33, 39758, 628, 220, 220, 220, 2163, 966, 13949, 7, 87, 3712, 43879, 2414, 11, 198, 220, ...
1.602572
3,110
using Lazy import Lazy: cycle, range, drop, take using Test # dummy function to test threading macros on function add_things(n1, n2, n3) 100n1 + 10n2 + n3 end # dummy macro to test threading macros on macro m_add_things(n1, n2, n3) quote 100 * $(esc(n1)) + 10 * $(esc(n2)) + $(esc(n3)) end end # d...
[ 3500, 406, 12582, 198, 11748, 406, 12582, 25, 6772, 11, 2837, 11, 4268, 11, 1011, 198, 3500, 6208, 198, 198, 2, 31548, 2163, 284, 1332, 4704, 278, 34749, 319, 198, 8818, 751, 62, 27971, 7, 77, 16, 11, 299, 17, 11, 299, 18, 8, 19...
2.059898
1,970
import Base: isempty export ResetMap, get_A, get_b """ ResetMap{N<:Real, S<:LazySet{N}} <: LazySet{N} Type that represents a lazy reset map. A reset map is a special case of an affine map ``A x + b, x ∈ X`` where the linear map ``A`` is the identity matrix with zero entries in all reset dimensions,...
[ 11748, 7308, 25, 318, 28920, 198, 198, 39344, 30027, 13912, 11, 198, 220, 220, 220, 220, 220, 220, 651, 62, 32, 11, 198, 220, 220, 220, 220, 220, 220, 651, 62, 65, 198, 198, 37811, 198, 220, 220, 220, 30027, 13912, 90, 45, 27, 2...
2.417473
3,308
function tuning_display(p) lines=show(p.output, p.tuner, progress=true) println(); return lines end function convergence_display(p) try ciplot=lineplot([p.counter-(length(p.convergence_history)-1):p.counter...], p.convergence_history, title="Convergence Interval Recent History", xlabel="Iterate...
[ 8818, 24549, 62, 13812, 7, 79, 8, 198, 220, 220, 220, 3951, 28, 12860, 7, 79, 13, 22915, 11, 279, 13, 28286, 263, 11, 4371, 28, 7942, 8, 198, 220, 220, 220, 44872, 9783, 198, 220, 220, 220, 1441, 3951, 198, 437, 198, 198, 8818, ...
2.252547
1,374
<gh_stars>10-100 struct ERBFilterbank{C,G,T<:Real,U<:Real,V<:Real} <: Filterbank filters::Vector{SecondOrderSections{C,G}} ERB::Vector{T} center_frequencies::Vector{U} fs::V end function make_erb_filterbank(fs, num_channels, low_freq, EarQ = 9.26449, minBW = 24.7, order = 1) T = 1/fs if length(...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 7249, 13793, 33, 22417, 17796, 90, 34, 11, 38, 11, 51, 27, 25, 15633, 11, 52, 27, 25, 15633, 11, 53, 27, 25, 15633, 92, 1279, 25, 25853, 17796, 198, 220, 220, 220, 16628, 3712, 38469, ...
1.740956
1,548
<reponame>KlausC/ResourceBundles.jl using Logging bundle = ResourceBundle(@__MODULE__, "messages2") @test bundle.path == abspath("resources") bundle2 = ResourceBundle(ResourceBundles, "bundle") @test realpath(bundle2.path) == realpath(normpath(pwd(), "resources")) bundle3 = ResourceBundle(ResourceBundles, "does1not2...
[ 27, 7856, 261, 480, 29, 42, 38024, 34, 14, 26198, 33, 917, 829, 13, 20362, 198, 3500, 5972, 2667, 198, 198, 65, 31249, 796, 20857, 33, 31249, 7, 31, 834, 33365, 24212, 834, 11, 366, 37348, 1095, 17, 4943, 198, 31, 9288, 18537, 13,...
2.083304
2,845
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .jl # format_name: light # format_version: '1.3' # jupytext_version: 0.8.6 # kernelspec: # display_name: Julia 1.0.3 # language: julia # name: julia-1.0 # --- module SEIRmodel using Ordi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 2420, 62, 15603, 341, 25, 198, 2, 220, 220, 220, ...
2.011834
676
<reponame>DarioSarra/FLPDevelopment.jl # function NormalDifference(df, group, var; ind_summary = mean, ylabel = "Median ...", xyfont = font(18, "Bookman Light")) # res_plt, res_group, res_individual = mean_sem_scatter(df, group, var; ind_summary = ind_summary) # res_test = test_difference(res_individual, group,...
[ 27, 7856, 261, 480, 29, 35, 4982, 50, 283, 430, 14, 3697, 47, 41206, 13, 20362, 198, 2, 2163, 14435, 28813, 1945, 7, 7568, 11, 1448, 11, 1401, 26, 773, 62, 49736, 796, 1612, 11, 331, 18242, 796, 366, 9921, 666, 35713, 11, 2124, ...
2.246867
3,192
# --- # title: 20. Valid Parentheses # id: problem20 # author: <NAME> # date: 2020-10-31 # difficulty: Easy # categories: String, Stack # link: <https://leetcode.com/problems/valid-parentheses/description/> # hidden: true # --- # # Given a string `s` containing just the characters `'('`, `')'`, `'{'`, `'}'`, # `'['` a...
[ 2, 11420, 198, 2, 3670, 25, 1160, 13, 48951, 16774, 39815, 198, 2, 4686, 25, 1917, 1238, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940, 12, 3132, 198, 2, 8722, 25, 16789, 198, 2, 9376, 25, 10903, 11, 23881,...
2.101266
553
function assemble_structures(layup,n_pt,twist,sloc,xaf,yaf,nchord,lam_t,designparams,x_offset,orientation,xloc,zloc,geom,webloc) # assemble structural properties mat = Array{Array{Composites.material,1}}(n_pt) lam = Array{Composites.laminate,1}(n_pt) precompinput = Array{PreComp.input,1}(n_pt) preco...
[ 8818, 25432, 62, 7249, 942, 7, 10724, 929, 11, 77, 62, 457, 11, 4246, 396, 11, 6649, 420, 11, 87, 1878, 11, 88, 1878, 11, 77, 354, 585, 11, 2543, 62, 83, 11, 26124, 37266, 11, 87, 62, 28968, 11, 13989, 341, 11, 87, 17946, 11, ...
1.93438
11,338
using Makie Base.@ccallable function julia_main(ARGS::Vector{String})::Cint scene = Scene() scatter(scene, rand(50), rand(50), markersize = 0.01) a = axis(scene, range(0, stop = 1, length = 4), range(0, stop = 1, length = 4), textsize = 0.1, axisnames = ("", "", "")) tf = to_value(a, :tickfont2d) a...
[ 3500, 15841, 494, 198, 198, 14881, 13, 31, 535, 439, 540, 2163, 474, 43640, 62, 12417, 7, 1503, 14313, 3712, 38469, 90, 10100, 92, 2599, 25, 34, 600, 198, 220, 220, 220, 3715, 796, 28315, 3419, 198, 220, 220, 220, 41058, 7, 29734, ...
2.276596
188
# for GMM function SVmoments(m, n, θ, η, ϵ) S = size(ϵ, 2) ms = zeros(S,size(m,1)) Threads.@threads for s=1:S ms[s,:] = sqrt(n)*aux_stat(SVmodel(θ, n, η[:,s], ϵ[:,s])[1]) end ms .- m' end
[ 2, 329, 6951, 44, 220, 198, 8818, 20546, 32542, 658, 7, 76, 11, 299, 11, 7377, 116, 11, 7377, 115, 11, 18074, 113, 8, 198, 220, 220, 220, 311, 796, 2546, 7, 139, 113, 11, 362, 8, 198, 220, 220, 220, 13845, 796, 1976, 27498, 7,...
1.619403
134
# Init to get started
[ 2, 44707, 284, 651, 2067, 198 ]
3.666667
6
<filename>dirichlet_process_mixture_model/crp.jl<gh_stars>1-10 import DataStructures.Stack type CRPState # map from data index to cluster index assignments::Dict{Int, Int} # map from cluster index size of cluser counts::Dict{Int, Int} # reuse ids for the new clusters by pushing them onto a stack ...
[ 27, 34345, 29, 15908, 488, 1616, 62, 14681, 62, 76, 9602, 62, 19849, 14, 6098, 79, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 11748, 6060, 44909, 942, 13, 25896, 198, 198, 4906, 8740, 47, 9012, 198, 220, 220, 220, 1303, ...
2.245068
1,318
struct HillClimb <: BaseStructureLearning end
[ 7249, 3327, 34, 2475, 65, 1279, 25, 7308, 1273, 5620, 41730, 886, 198 ]
3.538462
13
"""In-place version of `signed_exponent(::Array)`.""" function signed_exponent!(A::Array{T}) where {T<:Union{Float16,Float32,Float64}} # sign&fraction mask sfmask = Base.sign_mask(T) | Base.significand_mask(T) emask = Base.exponent_mask(T) sbits = Base.significand_bits(T) bias = Base.exponent_bia...
[ 37811, 818, 12, 5372, 2196, 286, 4600, 32696, 62, 11201, 3471, 7, 3712, 19182, 8, 63, 526, 15931, 198, 8818, 4488, 62, 11201, 3471, 0, 7, 32, 3712, 19182, 90, 51, 30072, 810, 1391, 51, 27, 25, 38176, 90, 43879, 1433, 11, 43879, 26...
2.489552
670
#=================================================================================================== Kernel Kernels Module ===================================================================================================# module MLKernels import Base: convert, eltype, print, show, string, ==, *, /, +, -, ^, exp, ...
[ 2, 23926, 10052, 18604, 198, 220, 32169, 509, 44930, 19937, 198, 23926, 10052, 18604, 2, 198, 198, 21412, 10373, 42, 44930, 198, 198, 11748, 7308, 25, 10385, 11, 1288, 4906, 11, 3601, 11, 905, 11, 4731, 11, 6624, 11, 1635, 11, 1220, ...
2.566186
763
module IntegralsModule export computeIntegralOverlap, computeElectronRepulsionIntegral, computeTensorBlockElectronRepulsionIntegrals, computeIntegralKinetic, computeIntegralNuclearAttraction, computeIntegralThreeCenterOverlap, computeMatrixBlockOverlap, computeMatrixBlockKinetic, computeMatrixBlockNuclearAttraction usi...
[ 21412, 15995, 30691, 26796, 198, 39344, 24061, 34500, 1373, 5886, 37796, 11, 24061, 19453, 1313, 6207, 15204, 34500, 1373, 11, 24061, 51, 22854, 12235, 19453, 1313, 6207, 15204, 34500, 30691, 11, 24061, 34500, 1373, 49681, 5139, 11, 24061, ...
2.089992
7,734
using Test using InteractiveUtils using MagneticReadHead: moduleof, functiontypeof # Define an extra method of eps in this module, so we can test methods of Base.eps(::typeof(moduleof)) = "dummy" @testset "moduleof" begin for meth in methods(detect_ambiguities) @test moduleof(meth) == Test end #...
[ 3500, 6208, 198, 3500, 21365, 18274, 4487, 198, 3500, 44629, 5569, 13847, 25, 8265, 1659, 11, 2163, 4906, 1659, 628, 198, 2, 2896, 500, 281, 3131, 2446, 286, 304, 862, 287, 428, 8265, 11, 523, 356, 460, 1332, 5050, 286, 198, 14881, ...
2.604839
372
#utilities import Base.LinAlg: HermOrSym, AbstractTriangular, *, +, -, \, A_mul_Bt, At_mul_B, At_mul_Bt, Ac_mul_B, At_ldiv_B, Ac_ldiv_B # convert SparseChar {N,T,C} to cusparseOperation_t function cusparseop(trans::SparseChar) if trans == 'N' return CUSPARSE_OPERATION_NON_TRANSPOSE end if trans ==...
[ 2, 315, 2410, 198, 198, 11748, 7308, 13, 14993, 2348, 70, 25, 18113, 5574, 43094, 11, 27741, 14824, 21413, 11, 1635, 11, 1343, 11, 532, 11, 3467, 11, 317, 62, 76, 377, 62, 33, 83, 11, 1629, 62, 76, 377, 62, 33, 11, 1629, 62, 7...
1.601063
81,073
<gh_stars>1-10 export absolute_error function Base.:(|>)(t::Transform{T}, p::Point{3,U}) where {T,U} (xₚ, yₚ, zₚ, wₚ) = sum(transpose(t.m[:,StaticArrays.SUnitRange(1,3)]) .* p,), dims=1) .+ transpose(t.m[:,StaticArrays.SUnitRange(4,4))] return wₚ ≈ 1 ? promote_type(T, typeof(p))(xₚ, yₚ, zₚ) / wₚ : promote_type...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 39344, 4112, 62, 18224, 198, 198, 8818, 7308, 11207, 7, 91, 29, 5769, 83, 3712, 41762, 90, 51, 5512, 279, 3712, 12727, 90, 18, 11, 52, 30072, 810, 1391, 51, 11, 52, 92, 198, 220, 220, ...
1.869342
972
<gh_stars>0 using GenomicAnnotations using GenomicMaps using ColorTypes # You can add any kind of annotation that you want to display. # Here, I add COG annotation: function addcogs!(chr, filename) cogs = split.(readlines(filename), Ref('\t')) i = 1 for gene in @genes(chr, :feature == "CDS") if ge...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 5215, 10179, 2025, 30078, 198, 3500, 5215, 10179, 47010, 198, 3500, 5315, 31431, 628, 198, 2, 921, 460, 751, 597, 1611, 286, 23025, 326, 345, 765, 284, 3359, 13, 198, 2, 3423, 11, 314, 751, 7...
1.881872
1,346
export MCVanilla, Vegas, Domain export integral, ∫ using QuickTypes: @qstruct using ArgCheck using LinearAlgebra, Statistics using StaticArrays using Base.Threads: @threads using Setfield: @settable import Random abstract type MCAlgorithm end @settable @qstruct MCVanilla{R}( neval::Int64=10^6, rng:...
[ 198, 39344, 13122, 25298, 5049, 11, 9621, 11, 20021, 198, 39344, 19287, 11, 18872, 104, 198, 198, 3500, 12029, 31431, 25, 2488, 80, 7249, 198, 3500, 20559, 9787, 198, 3500, 44800, 2348, 29230, 11, 14370, 198, 3500, 36125, 3163, 20477, 1...
2.152219
1,938
<gh_stars>1-10 #= MIT License Copyright (c) 2020, 2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 28, 17168, 13789, 198, 198, 15269, 357, 66, 8, 12131, 11, 33448, 1279, 20608, 29, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198,...
2.06801
6,102
<filename>src/Gumbo.jl module Gumbo using Compat if isfile(joinpath(dirname(dirname(@__FILE__)),"deps","deps.jl")) include("../deps/deps.jl") else error("Gumbo not properly installed. Please run Pkg.build(\"Gumbo\")") end include("CGumbo.jl") export HTMLElement, HTMLDocument, HTMLText, ...
[ 27, 34345, 29, 10677, 14, 38, 29309, 13, 20362, 198, 21412, 402, 29309, 198, 198, 3500, 3082, 265, 198, 198, 361, 318, 7753, 7, 22179, 6978, 7, 15908, 3672, 7, 15908, 3672, 7, 31, 834, 25664, 834, 4008, 553, 10378, 82, 2430, 10378, ...
2.176667
300
<gh_stars>0 @testset "distributions" begin Random.seed!(1234) # Create random vectors and matrices dim = 3 a = rand(dim) b = rand(dim) c = rand(dim) A = rand(dim, dim) B = rand(dim, dim) C = rand(dim, dim) # Create random numbers alpha = rand() beta = rand() gamma =...
[ 27, 456, 62, 30783, 29, 15, 198, 31, 9288, 2617, 366, 17080, 2455, 507, 1, 2221, 198, 220, 220, 220, 14534, 13, 28826, 0, 7, 1065, 2682, 8, 628, 220, 220, 220, 1303, 13610, 4738, 30104, 290, 2603, 45977, 198, 220, 220, 220, 5391, ...
1.855581
12,436
<reponame>UnofficialJuliaMirror/SecureSessions.jl-fd66a1d0-90d3-555d-a35d-c122df06773c # Contents: Functions for creating/handling secure cookies. ################################################################################ # Create session cookie # # The scheme: # const_key, const_iv = global constants, o...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 49793, 50, 6202, 13, 20362, 12, 16344, 2791, 64, 16, 67, 15, 12, 3829, 67, 18, 12, 31046, 67, 12, 64, 2327, 67, 12, 66, 18376, 7568, 15, 3134, 4790, 66, 198, 2, ...
2.878354
2,236
# packages - using LinearAlgebra using GLPK # my codes - include("Flux.jl") include("Expa.jl") include("Stoichiometric.jl") include("Utility.jl")
[ 2, 10392, 532, 198, 3500, 44800, 2348, 29230, 198, 3500, 10188, 40492, 198, 198, 2, 616, 12416, 532, 198, 17256, 7203, 37, 22564, 13, 20362, 4943, 198, 17256, 7203, 3109, 8957, 13, 20362, 4943, 198, 17256, 7203, 1273, 78, 16590, 16996, ...
2.807692
52
using Statistics using LinearAlgebra using Printf #function nnComputeCosts(nn,datax,datay;print=true,dIdx=1:size(datax,2)) # c = [ nnCost(datay[:,d],nnForward(nn,datax[:,d])) for d=dIdx ]; # # #Print costs # if print # #for d=1:length(c) # # @printf("dataset %3d: cost=%10.8f\n",d,c[d]); # #end # @pri...
[ 3500, 14370, 198, 3500, 44800, 2348, 29230, 198, 3500, 12578, 69, 198, 198, 2, 8818, 299, 77, 7293, 1133, 13729, 82, 7, 20471, 11, 19608, 897, 11, 19608, 323, 26, 4798, 28, 7942, 11, 67, 7390, 87, 28, 16, 25, 7857, 7, 19608, 897, ...
2.068
750
<reponame>UnofficialJuliaMirror/Crispulator.jl-e21f4509-7b4e-5b4b-a375-a5512fd6f24f function convert_cells_to_pop(cells, cell_phenotypes, guides) cells_to_phenotypes = [DefaultDict{Float64, Int}(0) for _ in 1:length(guides)] @inbounds for i in eachindex(cells) cells_to_phenotypes[cells[i]][cell_phenoty...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 34, 2442, 79, 8927, 13, 20362, 12, 68, 2481, 69, 17885, 24, 12, 22, 65, 19, 68, 12, 20, 65, 19, 65, 12, 64, 22318, 12, 64, 2816, 1065, 16344, 21, 69, 1731, 69, ...
2.270396
858
macro jl15_str(code::AbstractString) if VERSION >= v"1.5-rc0" @debug "Parsing code for Julia ≥ 1.5" Text(code) expr = Meta.parse(string("begin\n", code, "\nend")) @assert expr.head === :block if expr.args[1] isa LineNumberNode expr.args[1] = __source__ end ...
[ 20285, 305, 474, 75, 1314, 62, 2536, 7, 8189, 3712, 23839, 10100, 8, 198, 220, 220, 220, 611, 44156, 2849, 18189, 410, 1, 16, 13, 20, 12, 6015, 15, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 24442, 366, 47, 945, 278, 2438,...
1.975904
332
using ForwardDiff using NLSolvers #ScalarLsqObjective #VectorLsqObjective @. model(x, p) = p[1] * exp(-x * p[2]) xdata = range(0, stop = 10, length = 20) ydata = model(xdata, [1.0 2.0]) + 0.01 * randn(length(xdata)) p0 = [0.5, 0.5] function f(x) mod = model(xdata, x) return sum(abs2, mod .- ydata) / 2 end x0...
[ 3500, 19530, 28813, 198, 3500, 399, 6561, 349, 690, 198, 198, 2, 3351, 282, 283, 43, 31166, 10267, 425, 198, 2, 38469, 43, 31166, 10267, 425, 198, 198, 31, 13, 2746, 7, 87, 11, 279, 8, 796, 279, 58, 16, 60, 1635, 1033, 32590, 87...
2.297872
2,256
export body!, content!, loadcss!, loadjs!, load!, importhtml! content!(o, sel, html::AbstractString; fade = true) = fade ? @js_(o, Blink.fill($sel, $html)) : @js_ o document.querySelector($sel).innerHTML = $html content!(o, sel, html; fade = true) = content!(o, sel, stringmime(MIME"text/html"(), html), fa...
[ 39344, 1767, 28265, 2695, 28265, 3440, 25471, 28265, 3440, 8457, 28265, 3440, 28265, 848, 1506, 20369, 0, 198, 198, 11299, 0, 7, 78, 11, 384, 75, 11, 27711, 3712, 23839, 10100, 26, 22100, 796, 2081, 8, 796, 198, 220, 22100, 5633, 198,...
2.214529
881
<reponame>SyxP/LightGraphs.jl<filename>test/degeneracy.jl @testset "Decomposition" begin d = loadgraph(joinpath(testdir, "testdata", "graph-decomposition.jgz")) for g in testgraphs(d) corenum = @inferred(core_number(g)) @test corenum == [3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, ...
[ 27, 7856, 261, 480, 29, 13940, 87, 47, 14, 15047, 37065, 82, 13, 20362, 27, 34345, 29, 9288, 14, 13500, 877, 1590, 13, 20362, 198, 31, 9288, 2617, 366, 10707, 296, 9150, 1, 2221, 198, 220, 220, 220, 288, 796, 3440, 34960, 7, 22179...
1.923513
706
@safetestset "HEAD requests" begin @safetestset "HEAD requests should be by default handled by GET" begin using Genie using HTTP port = nothing port = rand(8500:8900) route("/") do "GET request" end server = up(port) response = try HTTP.request("GET", "http://127.0.0.1:...
[ 31, 49585, 316, 395, 2617, 366, 37682, 7007, 1, 2221, 198, 220, 2488, 49585, 316, 395, 2617, 366, 37682, 7007, 815, 307, 416, 4277, 12118, 416, 17151, 1, 2221, 198, 220, 220, 220, 1262, 49405, 198, 220, 220, 220, 1262, 14626, 628, 2...
2.425097
1,028
<filename>tutorials/limitCycleOscillation/simRun.jl push!(LOAD_PATH,"../../src/") import UNSflow alpha_init = 10. *pi/180 alphadot_init = 0. h_init = 0. hdot_init = 0. u = 0.467 udot = 0 kinem = UNSflow.KinemPar2DOF(alpha_init, h_init, alphadot_init, hdot_init, u) x_alpha = 0.05 r_alpha = 0.5 kappa = 0.05 w_alpha = 1...
[ 27, 34345, 29, 83, 44917, 82, 14, 32374, 20418, 2375, 46, 22360, 341, 14, 14323, 10987, 13, 20362, 198, 14689, 0, 7, 35613, 62, 34219, 553, 40720, 40720, 10677, 14, 4943, 198, 11748, 4725, 50, 11125, 198, 198, 26591, 62, 15003, 796, ...
2.144246
617
<reponame>albert-de-montserrat/Persephone struct DoFHandler{N,T} DoF::Vector{NTuple{N,T}} nDofs::T end Base.getindex(a::DoFHandler, I::Int64) = a.DoF[I] Base.getindex(a::DoFHandler, I::Int32) = a.DoF[I] Base.getindex(a::DoFHandler, I::Int8) = a.DoF[I] function DoFs_Thermal(EL2NOD, nnodel) DoF = [ntuple(j-...
[ 27, 7856, 261, 480, 29, 282, 4835, 12, 2934, 12, 8691, 2655, 10366, 14, 5990, 325, 4862, 198, 7249, 2141, 37, 25060, 90, 45, 11, 51, 92, 198, 220, 220, 220, 2141, 37, 3712, 38469, 90, 11251, 29291, 90, 45, 11, 51, 11709, 198, 22...
1.845679
486
<reponame>Keno/AbstractTrees.jl using AbstractTrees using Test @testset "Array" begin tree = Any[1,Any[2,3]] @test collect(Leaves(tree)) == [1,2,3] @test collect(Leaves(tree)) isa Vector{Int} @test collect(PostOrderDFS(tree)) == Any[1,2,3,Any[2,3],Any[1,Any[2,3]]] @test collect(StatelessBFS(tree))...
[ 27, 7856, 261, 480, 29, 42, 23397, 14, 23839, 51, 6037, 13, 20362, 198, 3500, 27741, 51, 6037, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 19182, 1, 2221, 198, 220, 220, 220, 5509, 796, 4377, 58, 16, 11, 7149, 58, 17, 11, 18...
2.182823
1,176