content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>pnavaro/AnalogDataAssimilation.jl export AnEnKS struct AnEnKS np::Int64 end """ data_assimilation( yo, da) Apply stochastic and sequential data assimilation technics using model forecasting or analog forecasting. """ function forecast(da::DataAssimilation, yo::TimeSeries, mc::AnEnKS; progress ...
[ 27, 7856, 261, 480, 29, 21999, 615, 12022, 14, 2025, 11794, 6601, 8021, 42963, 13, 20362, 198, 39344, 1052, 4834, 27015, 198, 198, 7249, 1052, 4834, 27015, 628, 220, 220, 220, 45941, 3712, 5317, 2414, 198, 198, 437, 198, 198, 37811, 2...
1.757858
1,718
module MultivariateStochasticVolatility # Import using LinearAlgebra: diag, diagm, kron, I, cholesky using Distributions: Normal, MvNormal, InverseWishart, MatrixNormal # Constants const REALMAT = Matrix{T} where T <:Real const REALVEC = Vector{T} where T <:Real # Include scripts include("types.jl") include("utils.j...
[ 21412, 7854, 42524, 1273, 5374, 3477, 16598, 18486, 198, 198, 2, 17267, 198, 3500, 44800, 2348, 29230, 25, 2566, 363, 11, 2566, 363, 76, 11, 479, 1313, 11, 314, 11, 442, 4316, 2584, 198, 3500, 46567, 507, 25, 14435, 11, 337, 85, 264...
3.165563
151
# This file is a part of BAT.jl, licensed under the MIT License (MIT). # ToDo: Add literature references to AdaptiveMHTuning docstring. """ AdaptiveMHTuning(...) <: MHProposalDistTuning Adaptive MCMC tuning strategy for Metropolis-Hastings samplers. Adapts the proposal function based on the acceptance ratio an...
[ 2, 770, 2393, 318, 257, 636, 286, 37421, 13, 20362, 11, 11971, 739, 262, 17168, 13789, 357, 36393, 737, 628, 198, 2, 1675, 5211, 25, 3060, 9285, 10288, 284, 30019, 425, 44, 6535, 46493, 2205, 8841, 13, 198, 198, 37811, 198, 220, 220...
2.583283
1,651
<reponame>aquatiko/ImageMorphology.jl __precompile__() module ImageMorphology using ImageCore include("dilation_and_erosion.jl") include("thinning.jl") export dilate, erode, opening, closing, tophat, bothat, morphogradient, morpholaplace, thinning, GuoAlgo end # module
[ 27, 7856, 261, 480, 29, 36129, 265, 12125, 14, 5159, 44, 13425, 1435, 13, 20362, 198, 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 7412, 44, 13425, 1435, 198, 198, 3500, 7412, 14055, 198, 198, 17256, 7203, 67, 10520, 62, 392, 6...
2.297101
138
""" To deal with calcium issue: Take tau_ca out of the calcium currents themselves, and put them in the soma, like a capacitance What do compartments need? Reversal potentials Capacitance Hooks Time constants (Ca + V) Dict(:V => -60., :Ca => 0.1), Dict(:Cm => -60., :τCa => 10., :Cainf => 0.05, :ENa => -50.) Dict(:Cₘ...
[ 37811, 198, 2514, 1730, 351, 19700, 2071, 25, 198, 198, 12322, 256, 559, 62, 6888, 503, 286, 262, 19700, 28629, 2405, 11, 290, 1234, 606, 287, 262, 3870, 64, 11, 588, 257, 18457, 42942, 628, 198, 2061, 466, 552, 32514, 761, 30, 198,...
2.322785
316
using Kinetic, Plots, LinearAlgebra using KitBase.JLD2 using Flux: onecold cd(@__DIR__) begin set = Setup(case = "sod", space = "1d2f1v", maxTime = 0.15) ps = PSpace1D(0.0, 1.0, 200, 1) vs = VSpace1D(-5.0, 5.0, 100) #gas = Gas(Kn = 1e-4, K = 2, γ = 5/3) gas = Gas(Kn = 1e-3, K = 2, γ = 5/3) #gas...
[ 3500, 16645, 5139, 11, 1345, 1747, 11, 44800, 2348, 29230, 198, 3500, 10897, 14881, 13, 41, 11163, 17, 198, 3500, 1610, 2821, 25, 530, 36673, 198, 10210, 7, 31, 834, 34720, 834, 8, 198, 198, 27471, 198, 220, 220, 220, 900, 796, 3112...
1.691545
2,117
<gh_stars>0 import JSON struct Emitter io::IO cache::Cache end function make_emitter(io, verbose::Bool) let cache = verbose ? NoopCache() : RollingCache() Emitter(io, cache) end end function emit_raw(e::Emitter, s::AbstractString) print(e.io, s) end function emit_tag(e::Emitter, x::AbstractString) e...
[ 27, 456, 62, 30783, 29, 15, 198, 11748, 19449, 198, 198, 7249, 2295, 1967, 198, 220, 33245, 3712, 9399, 198, 220, 12940, 3712, 30562, 198, 437, 198, 198, 8818, 787, 62, 368, 1967, 7, 952, 11, 15942, 577, 3712, 33, 970, 8, 198, 220...
2.305927
523
<reponame>JuliaNeuroscience/SpikeSynchrony.jl<gh_stars>1-10 using Test, SpikeSynchrony @testset "SPIKE distance" begin include("SPIKEdistance_tests.jl") end @testset "vanRossum" begin include("vanRossum_tests.jl") end
[ 27, 7856, 261, 480, 29, 16980, 544, 8199, 1434, 16801, 14, 4561, 522, 50, 24871, 88, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 6208, 11, 26309, 50, 24871, 88, 198, 198, 31, 9288, 2617, 366, 4303, 40, 7336, 5253, ...
2.7375
80
<filename>4-unit-3-demos/simple-matrix-view.jl using Plots using Random Random.seed!(0) A = randn(40,30) heatmap(A)
[ 27, 34345, 29, 19, 12, 20850, 12, 18, 12, 9536, 418, 14, 36439, 12, 6759, 8609, 12, 1177, 13, 20362, 198, 3500, 1345, 1747, 198, 3500, 14534, 198, 29531, 13, 28826, 0, 7, 15, 8, 198, 32, 796, 43720, 77, 7, 1821, 11, 1270, 8, 1...
2.230769
52
# Items are assembled by the rss_generator in a global feed and sub-feeds # for each of the tag. So each item is a tuple with the string of the item # and struct RSSItem item::String date::Date tags::Vector{String} end const RSS_ITEMS = Vector{RSSItem}() """ $SIGNATURES If there's an RSS feed to generat...
[ 2, 17230, 389, 16030, 416, 262, 374, 824, 62, 8612, 1352, 287, 257, 3298, 3745, 290, 850, 12, 12363, 82, 198, 2, 329, 1123, 286, 262, 7621, 13, 1406, 1123, 2378, 318, 257, 46545, 351, 262, 4731, 286, 262, 2378, 198, 2, 290, 198, ...
2.290037
2,148
<reponame>hzgzh/NG R=8.31451;p=101325;T=293.15 molemass=[ 16.0430,30.0700,44.0970,58.1230,58.1230,72.1500,72.1500,72.1500, 86.1770,86.1770,86.1770,86.1770,86.1770,100.204,114.231,128.258, 142.285,28.0540,42.0810,56.1080,56.0180,56.1080,56.1080,70.1340, 40.0650,54.0920,54.0920,26.0380,70.1340,84.1610,98...
[ 27, 7856, 261, 480, 29, 32179, 70, 23548, 14, 10503, 198, 49, 28, 23, 13, 33638, 4349, 26, 79, 28, 8784, 26582, 26, 51, 28, 31675, 13, 1314, 198, 198, 76, 2305, 22208, 41888, 198, 220, 220, 220, 1467, 13, 3023, 1270, 11, 1270, 1...
1.326366
7,320
<filename>src/photosynthesis/FvCB.jl<gh_stars>0 """ Farquhar–von Caemmerer–Berry (FvCB) model for C3 photosynthesis (Farquhar et al., 1980; von Caemmerer and Farquhar, 1981). The definition: - `Tᵣ`: the reference temperature (°C) at which other parameters were measured - `VcMaxRef`: maximum rate of Rubisco activity ...
[ 27, 34345, 29, 10677, 14, 24729, 44411, 14, 37, 85, 23199, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 198, 37811, 198, 21428, 421, 9869, 1906, 26982, 6488, 368, 76, 11882, 1906, 25215, 357, 37, 85, 23199, 8, 2746, 329, 327, 18, 5...
2.338474
6,160
<filename>src/PilotResponse/SimplePilotResponseImpl/SimplePilotResponseImpl.jl # Author: <NAME>, <EMAIL> # Date: 06/09/2014 module SimplePilotResponseImpl export initialize, update, updatePilotResponse, SimplePilotResponse, SimplePRResolutionAdvisory, SimplePRCommand usin...
[ 27, 34345, 29, 10677, 14, 47, 23439, 31077, 14, 26437, 47, 23439, 31077, 29710, 14, 26437, 47, 23439, 31077, 29710, 13, 20362, 198, 2, 6434, 25, 1279, 20608, 22330, 1279, 27630, 4146, 29, 201, 198, 2, 7536, 25, 9130, 14, 2931, 14, 4...
2.581121
678
<gh_stars>1-10 tu = (1, 2, "Hello") # 1 based println(tu[1]) println(tu[3]) named = (first = 100, second = 10) println(named[1]) println(named.first) map(x -> x * 10, named) |> println (a, b, c) = 2:4 println(a, b, c) println(length(tu)) println(lastindex(tu))
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 28047, 796, 357, 16, 11, 362, 11, 366, 15496, 4943, 198, 2, 352, 1912, 198, 35235, 7, 28047, 58, 16, 12962, 198, 35235, 7, 28047, 58, 18, 12962, 198, 198, 13190, 796, 357, 11085, 796, 18...
2.25641
117
<reponame>JuliaBinaryWrappers/Clingcon_jll.jl # Use baremodule to shave off a few KB from the serialized `.ji` file baremodule Clingcon_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("Clingcon") JLLWrappers.@generate_main_file("Clingcon", UUID("f3fadb3f-5422-5a6c-be27-a20f6ff...
[ 27, 7856, 261, 480, 29, 16980, 544, 33, 3219, 36918, 11799, 14, 34, 1359, 1102, 62, 73, 297, 13, 20362, 198, 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412...
2.438356
146
# Interacting with the Petsc Options Database export PetscOptionsSetValue, PetscOptionsClearValue, PetscOptionsView, PetscSetOptions, PetscClearOptions """ Typedef of PetscOptions """ const PetscOptions = Ptr{Void} """ PetscOptionsSetValue **Inputs** * arg1: the key (string) * arg2: the value (string) ...
[ 2, 4225, 27362, 351, 262, 43578, 66, 18634, 24047, 198, 39344, 43578, 66, 29046, 7248, 11395, 11, 43578, 66, 29046, 19856, 11395, 11, 43578, 66, 29046, 7680, 11, 43578, 66, 7248, 29046, 11, 43578, 66, 19856, 29046, 198, 198, 37811, 198,...
2.840678
590
# Tolerance epsilon = 0.0001 """ Function used to transform a column with numerical values into one or several binary columns. Arguments: - data: table which contains the column that will be binarized (1 row = 1 individual, 1 column = 1 feature); - header: header of the column of data that will be binarized - inte...
[ 2, 309, 37668, 198, 538, 18217, 261, 796, 657, 13, 18005, 198, 198, 37811, 198, 22203, 973, 284, 6121, 257, 5721, 351, 29052, 3815, 656, 530, 393, 1811, 13934, 15180, 13, 198, 198, 28100, 2886, 25, 198, 532, 1366, 25, 3084, 543, 490...
2.179296
9,264
is_valid(x, ::Val{:one_hot}) = sum(x) == 1 function binarize(x, d::D, ::Val{:one_hot}) where {T <: Number, D <: DiscreteDomain{T}} y = zeros(T, length(d)) is_in = false for (i, v) in enumerate(get_domain(d)) if x == v y[i] = 1 is_in = true break end e...
[ 271, 62, 12102, 7, 87, 11, 7904, 7762, 90, 25, 505, 62, 8940, 30072, 796, 2160, 7, 87, 8, 6624, 352, 198, 198, 8818, 9874, 283, 1096, 7, 87, 11, 288, 3712, 35, 11, 7904, 7762, 90, 25, 505, 62, 8940, 30072, 810, 1391, 51, 1279,...
1.985537
484
<filename>src/qn/qnitensor.jl function ITensor(::Type{ElT}, flux::QN, inds::IndexSet) where {ElT<:Number} blocks = nzblocks(flux,inds) T = BlockSparseTensor(ElT,blocks,inds) return itensor(T) end function ITensor(inds::QNIndex...) T = BlockSparseTensor(IndexSet(inds)) retur...
[ 27, 34345, 29, 10677, 14, 80, 77, 14, 80, 48825, 22854, 13, 20362, 198, 198, 8818, 7283, 22854, 7, 3712, 6030, 90, 9527, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 3712, ...
2.196119
2,422
function Center(P,h,n) s=zeros(Float64,1,n-1) Pc=zeros(Float64,1,n-1) s2=0.0 for i in 1:n if i != h for j in 1:n-1 s[j]+=P[i][j] end end end for i in 1:n-1 Pc[i]=s[i]/n end return Pc end functi...
[ 198, 8818, 3337, 7, 47, 11, 71, 11, 77, 8, 198, 220, 220, 220, 264, 28, 9107, 418, 7, 43879, 2414, 11, 16, 11, 77, 12, 16, 8, 198, 220, 220, 220, 350, 66, 28, 9107, 418, 7, 43879, 2414, 11, 16, 11, 77, 12, 16, 8, 198, 22...
1.415629
2,892
# Code in this file inspired by NetworkX. """ core_number(g) Return the core number for each vertex in graph `g`. A k-core is a maximal subgraph that contains vertices of degree `k` or more. The core number of a vertex is the largest value `k` of a k-core containing that vertex. ### Implementation Notes Not imp...
[ 2, 6127, 287, 428, 2393, 7867, 416, 7311, 55, 13, 198, 198, 37811, 198, 220, 220, 220, 4755, 62, 17618, 7, 70, 8, 198, 198, 13615, 262, 4755, 1271, 329, 1123, 37423, 287, 4823, 4600, 70, 44646, 198, 198, 32, 479, 12, 7295, 318, ...
2.536048
1,817
<gh_stars>0 module REPL using Revise, SHA, Dates, Pkg using Genie, Genie.Loggers, Genie.Configuration, Genie.Generator, Genie.Tester, Genie.Util, Genie.FileTemplates const JULIA_PATH = joinpath(Sys.BINDIR, "julia") """ secret_token() :: String Generates a random secret token to be used for configuring the SECR...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 45285, 198, 198, 3500, 5416, 786, 11, 25630, 11, 44712, 11, 350, 10025, 198, 3500, 49405, 11, 49405, 13, 11187, 5355, 11, 49405, 13, 38149, 11, 49405, 13, 8645, 1352, 11, 49405, 13, 51, 7834, ...
2.651024
1,172
using DifferentialEquations, Plots function orego(du,u,p,t) s,q,w = p y1,y2,y3 = u du[1] = s*(y2+y1*(1-q*y1-y2)) du[2] = (y3-(1+y1)*y2)/s du[3] = w*(y1-y3) end p = [77.27,8.375e-6,0.161] prob = ODEProblem(orego,[1.0,2.0,3.0],(0.0,360.0),p) sol = solve(prob) plot(sol) plot(sol,vars=(1,2,3)) using Benchmar...
[ 198, 3500, 20615, 498, 23588, 602, 11, 1345, 1747, 198, 8818, 23751, 2188, 7, 646, 11, 84, 11, 79, 11, 83, 8, 198, 220, 264, 11, 80, 11, 86, 796, 279, 198, 220, 331, 16, 11, 88, 17, 11, 88, 18, 796, 334, 198, 220, 7043, 58, ...
1.744108
1,188
<reponame>sthagen/facultyai-dash-bootstrap-components<gh_stars>10-100 using DashBootstrapComponents popovers = html_div([ dbc_button("Hidden Arrow", id = "hide-arrow-target", className = "me-1", n_clicks = 0), dbc_popover( "I am a popover without an arrow!", target = "hide-arrow-target", ...
[ 27, 7856, 261, 480, 29, 48476, 11286, 14, 38942, 10672, 1872, 12, 42460, 12, 18769, 26418, 12, 5589, 3906, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 16189, 36476, 26418, 7293, 3906, 198, 198, 12924, 13801, 796, 27711, 62, 7146...
2.272401
279
<reponame>UnofficialJuliaMirror/NKLandscapes.jl-89ab07c8-7ba9-54fb-a7de-e55844b2596b # Test runner include("unit.jl")
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 46888, 22342, 1416, 7916, 13, 20362, 12, 4531, 397, 2998, 66, 23, 12, 22, 7012, 24, 12, 4051, 21855, 12, 64, 22, 2934, 12, 68, 40486, 2598, 65, 1495, 4846, 65, 198,...
2.142857
56
unittests = [ "photoreceptor", "analysis"] println("===================") println("Running unit tests:") println("===================") for t in unittests tfile = t*".jl" println(" * $(tfile) *") include(string("unit/",tfile)) println() println() end
[ 403, 715, 3558, 796, 685, 198, 220, 220, 220, 366, 38611, 382, 49492, 1600, 198, 220, 220, 220, 366, 20930, 8973, 198, 198, 35235, 7203, 4770, 855, 2625, 8, 198, 35235, 7203, 28768, 4326, 5254, 25, 4943, 198, 35235, 7203, 4770, 855, ...
2.814433
97
<reponame>Maximilian-Stefan-Ernst/julia_sem<filename>src/loss/ML/ML.jl # Ordinary Maximum Likelihood Estimation ############################################################################ ### Types ############################################################################ struct SemML{INV,M,M2,B,FT,GT,HT} <: SemLo...
[ 27, 7856, 261, 480, 29, 11518, 26641, 666, 12, 7447, 24408, 12, 9139, 77, 301, 14, 73, 43640, 62, 43616, 27, 34345, 29, 10677, 14, 22462, 14, 5805, 14, 5805, 13, 20362, 198, 2, 14230, 3219, 22246, 4525, 11935, 10062, 18991, 198, 198...
1.841823
4,849
{"timestamp": 1580439731.0, "score": 7.17, "score_count": 224487} {"timestamp": 1571343561.0, "score": 7.2, "score_count": 217726} {"timestamp": 1567459194.0, "score": 7.2, "score_count": 216208} {"timestamp": 1567156746.0, "score": 7.2, "score_count": 215890} {"timestamp": 1565672257.0, "score": 7.2, "score_count": 21...
[ 4895, 16514, 27823, 1298, 1315, 36088, 33372, 3132, 13, 15, 11, 366, 26675, 1298, 767, 13, 1558, 11, 366, 26675, 62, 9127, 1298, 26063, 35133, 92, 198, 4895, 16514, 27823, 1298, 23313, 19880, 2327, 5333, 13, 15, 11, 366, 26675, 1298, ...
2.375812
2,770
module GeneralizedCRT export crt using Base.Threads import Base.Threads.@spawn const THRESHOLD1 = 7 # split longer input arrays to use binary instead of sequential algo const THRESHOLD2 = 15 # split longer input arrays to different cpu threads """ crt(a, b, p, q) Given `0 <= a < p` and `0 <= b < q` with `a == ...
[ 21412, 3611, 1143, 9419, 51, 198, 198, 39344, 1067, 83, 198, 3500, 7308, 13, 16818, 82, 198, 11748, 7308, 13, 16818, 82, 13, 31, 48183, 198, 198, 9979, 2320, 19535, 39, 15173, 16, 796, 767, 220, 1303, 6626, 2392, 5128, 26515, 284, 7...
1.994624
1,860
using SpecialFunctions import NaNMath import Calculus # This implementation is essentially identical to the implementation in DualNumbers.jl # force use of NaNMath functions in derivative calculations function to_nanmath(x::Expr) if x.head == :call funsym = Expr(:.,:NaNMath,Base.Meta.quot(x.args[1])) ...
[ 3500, 6093, 24629, 2733, 198, 11748, 11013, 32755, 776, 198, 11748, 2199, 17576, 628, 198, 2, 770, 7822, 318, 6986, 10411, 284, 262, 7822, 287, 20446, 49601, 13, 20362, 628, 198, 2, 2700, 779, 286, 11013, 32755, 776, 5499, 287, 27255, ...
2.121113
1,222
struct CostFunctionUE <: CostFunction tfc::TimeFunctionContainer function CostFunctionUE(network::AbstractNetwork, fn::Function) new(TimeFunctionContainer(network, fn)) end end function (f::CostFunctionUE)(x::Array{<:Real,1}, ids=nothing; returnitems=[:costs], tolls=nothing) t, dt = nothing, ...
[ 198, 7249, 6446, 22203, 8924, 1279, 25, 6446, 22203, 198, 220, 220, 220, 256, 16072, 3712, 7575, 22203, 29869, 628, 220, 220, 220, 2163, 6446, 22203, 8924, 7, 27349, 3712, 23839, 26245, 11, 24714, 3712, 22203, 8, 198, 220, 220, 220, 2...
2.154639
873
<reponame>ArjunNarayanan/MeshPlotter.jl using MeshPlotter using Test @testset "MeshPlotter.jl" begin # Write your tests here. end
[ 27, 7856, 261, 480, 29, 3163, 29741, 40059, 22931, 272, 14, 37031, 43328, 353, 13, 20362, 198, 3500, 47529, 43328, 353, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 37031, 43328, 353, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, ...
2.7
50
@testset "ConditionalDistribution" begin xlength = 3 zlength = 2 batchsize = 10 m = SplitLayer(zlength, [xlength,xlength], [identity,abs]) d = TuringMvNormal p = ConditionalDistribution(d,m) |> gpu # MvNormal res = condition(p, rand(zlength) |> gpu) μ = mean(res) σ2 = var(res) ...
[ 31, 9288, 2617, 366, 25559, 1859, 20344, 3890, 1, 2221, 628, 220, 220, 220, 2124, 13664, 796, 513, 198, 220, 220, 220, 1976, 13664, 796, 362, 198, 220, 220, 220, 15458, 7857, 796, 838, 198, 220, 220, 220, 285, 796, 27758, 49925, 7, ...
2.169492
531
<filename>examples_Julia/TEMP/arrays_dataframes.jl<gh_stars>0 using DataFrames #Arrays and Dataframe example dfGenPath = "C://Users//rapiduser//github//GRACE-ARPAE//examples_Julia//UC_DukeEnergy_Sample//inputs//data_generators.csv" dfGenerator = CSV.read(dfGenPath, DataFrame) myArr = [0.0, 0.0, 0.0, -0.0, -0.0, -0....
[ 27, 34345, 29, 1069, 12629, 62, 16980, 544, 14, 51, 39494, 14, 3258, 592, 62, 7890, 37805, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 6060, 35439, 198, 198, 2, 3163, 20477, 290, 6060, 14535, 1672, 628, 198, 7568, 13746, 15235...
1.925094
801
<reponame>UnofficialJuliaMirror/StatisticalRethinking.jl-2d09df54-9d0f-5258-8220-54c2a3d4fbee using StatsFuns,Distributions import ForwardDiff, Zygote f(x) = poislogpdf(x[1], x[2]) #new Poisson logpdf poission_lpdf(x) = -x[1]+x[2]*log(x[1])-log(factorial(x[2])) x = [.5,2.] f(x) |> display fd_grad1 =ForwardDiff.gradi...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 17126, 19929, 49, 2788, 8040, 13, 20362, 12, 17, 67, 2931, 7568, 4051, 12, 24, 67, 15, 69, 12, 20, 25600, 12, 6469, 1238, 12, 4051, 66, 17, 64, 18, 67, 19, 69, ...
2.00303
330
using HTTP, Sockets todos = """ ToDo 1: Getting groceries ToDo 2: Visiting my therapist ToDo 3: Getting a haircut """ const HOST = ip"127.0.0.1" const PORT = 9999 const ROUTER = HTTP.Router() # 1 HTTP.@register(ROUTER, "GET", "/*", req -> HTTP.Response(200, "Hello")) # 2 HTTP.@register(ROUTER, "GET...
[ 3500, 14626, 11, 311, 11603, 198, 198, 83, 375, 418, 796, 37227, 198, 2514, 5211, 352, 25, 18067, 38464, 198, 2514, 5211, 362, 25, 6911, 1780, 616, 24636, 198, 2514, 5211, 513, 25, 18067, 257, 45548, 198, 37811, 198, 9979, 367, 10892,...
2.25
188
using PSCOPF using Test using Dates @testset verbose=true "test_init_firmness" begin gen1 = PSCOPF.Networks.Generator("fuel_1_0", "bus_1", PSCOPF.Networks.PILOTABLE, 10., 100., 0., 10., Dates.Second(210*60), Dates.Second(210*60)) #dmo, dp gen2 = PSCOPF.Networks.Generator( ...
[ 3500, 350, 6173, 3185, 37, 198, 198, 3500, 6208, 198, 3500, 44712, 198, 198, 31, 9288, 2617, 15942, 577, 28, 7942, 366, 9288, 62, 15003, 62, 69, 2533, 1108, 1, 2221, 628, 220, 220, 220, 2429, 16, 796, 350, 6173, 3185, 37, 13, 7934...
1.804585
6,325
<reponame>mzagorowska/InfiniteOpt.jl<gh_stars>0 ## Define the new measure evaluation method # Make alias for our new method struct NewUniEvalMethod <: InfiniteOpt.MeasureToolbox.AbstractUnivariateMethod end struct NewMultiEvalMethod <: InfiniteOpt.MeasureToolbox.AbstractMultivariateMethod end # Extend generate_support...
[ 27, 7856, 261, 480, 29, 76, 50183, 273, 1666, 4914, 14, 18943, 9504, 27871, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2235, 2896, 500, 262, 649, 3953, 12660, 2446, 198, 2, 6889, 16144, 329, 674, 649, 2446, 198, 7249, 968, 3118, ...
2.69176
983
<reponame>ahalwright/CGP.jl # Evolvability using a dictionary to keep track of the phenotypes that contribute to evolution evolvability. # Additional objectives are to simplify the logical structure form geno_complexity() and to # use neutral_evolution() and lambda_evolution() instead of mut_evolve() export run_evo_d...
[ 27, 7856, 261, 480, 29, 993, 282, 29995, 14, 34, 16960, 13, 20362, 198, 2, 4319, 349, 85, 1799, 1262, 257, 22155, 284, 1394, 2610, 286, 262, 6566, 13567, 326, 8676, 284, 6954, 819, 349, 85, 1799, 13, 198, 2, 15891, 15221, 389, 284...
2.366084
3,603
<filename>src/lazyconcat.jl # Lazy concatenation of AbstractVector's. # Similar to Iterators.Flatten and some code has been reused from julia/base/iterators.jl function _Vcat end abstract type AbstractConcatArray{T,N} <: AbstractArray{T,N} end struct Vcat{T,N,I} <: AbstractConcatArray{T,N} arrays::I global fu...
[ 27, 34345, 29, 10677, 14, 75, 12582, 1102, 9246, 13, 20362, 198, 2, 406, 12582, 1673, 36686, 341, 286, 27741, 38469, 338, 13, 198, 2, 11014, 284, 40806, 2024, 13, 7414, 41769, 290, 617, 2438, 468, 587, 46823, 422, 474, 43640, 14, 86...
2.063495
5,276
<filename>Julia/dp/fibonacci.jl<gh_stars>100-1000 #= Finding the Nth number in the Fibonacci Sequence using Dynamic Programming =# ## Function function fibonacci(n) f = Int64[] push!(f, 0) push!(f, 1) for i = 3:n temp = f[i-1] + f[i-2] push!(f, temp) end return f[n] end ## In...
[ 27, 34345, 29, 16980, 544, 14, 26059, 14, 69, 571, 261, 44456, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 28, 27063, 262, 399, 400, 1271, 287, 262, 41566, 261, 44456, 45835, 1262, 26977, 30297, 198, 46249, 198, 198,...
2.269962
263
<reponame>JuliaFinMetriX/Copulas.jl<gh_stars>1-10 module TestCTree using Copulas using Base.Test ################## ## constructors ## ################## ## CTreePaths ##------------ paths = Array{Int, 1}[[1, 4], [1, 2, 3], [5, 6], [5, 7, 8]] tP = Copulas.CTreePaths(9, paths) tP1 = Copulas.CTreePaths(9, [1, 4], [...
[ 27, 7856, 261, 480, 29, 16980, 544, 18467, 9171, 380, 55, 14, 13379, 25283, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 6208, 4177, 631, 198, 198, 3500, 6955, 25283, 198, 3500, 7308, 13, 14402, 628, 198, 14468, 2235,...
2.258159
2,053
<reponame>baggepinnen/MatrixPencils.jl """ _sreduceB!(A::AbstractMatrix{T},E::AbstractMatrix{T},B::AbstractMatrix{T},Q::Union{AbstractMatrix{T},Nothing}, tol::Real; fast = true, withQ = true) -> ρ Reduce the `n x m` matrix `B` using an orthogonal or unitary similarity transformation `Q1` to ...
[ 27, 7856, 261, 480, 29, 21454, 469, 79, 3732, 268, 14, 46912, 25553, 2856, 82, 13, 20362, 198, 201, 198, 37811, 201, 198, 220, 220, 220, 4808, 82, 445, 7234, 33, 0, 7, 32, 3712, 23839, 46912, 90, 51, 5512, 36, 3712, 23839, 46912, ...
1.679307
22,810
<reponame>UnofficialJuliaMirrorSnapshots/AIBECS.jl-ace601d6-714c-11e9-04e5-89b7fad23838<gh_stars>0 using Documenter, AIBECS ENV["DATADEPS_ALWAYS_ACCEPT"] = true # Generate examples include("generate.jl") EXAMPLES_jl = [f for f in readdir(EXAMPLEDIR) if endswith(f, ".jl")] EXAMPLES_md = [replace(f, ".jl" => ".md") for...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 32, 9865, 2943, 50, 13, 20362, 12, 558, 41706, 67, 21, 12, 45722, 66, 12, 1157, 68, 24, 12, 3023, 68, 20, 12, 4531, 65, 22, 69, 324, 23721, 2548, 27...
2.251309
382
#!/usr/bin/env julia variants = ARGS[1] bed = ARGS[2] function read(file) if ismatch(r".gz$", file) # Gzipped .gz files f = GZip.open(file) lines = readlines(f) close(f) else f = open(file) lines = readlines(f) close(f) end return lines end function expand(locci) list = [] pos = sp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 25641, 1187, 796, 220, 220, 5923, 14313, 58, 16, 60, 198, 3077, 796, 5923, 14313, 58, 17, 60, 220, 198, 198, 8818, 1100, 7, 7753, 8, 198, 220, 220, 220, 611, 318, 15699, ...
2.024447
859
""" init_ls!(m::WSVarLmmModel; gniters::Integer = 5) Initialize parameters of a `WSVarLmmModel` object from least squares estimate. `m.β` is initialized to be `inv(sum(xi'xi)) * sum(xi'yi)`. `m.Σγ` is initialized to be `inv(sum(zi'zi⊗zi'zi)) * sum(zi'ri⊗zi'ri)`. `m.τ` is initialized to be `inv(sum(wi'wi)) * ...
[ 37811, 198, 220, 220, 220, 2315, 62, 7278, 0, 7, 76, 3712, 19416, 19852, 43, 3020, 17633, 26, 19967, 270, 364, 3712, 46541, 796, 642, 8, 198, 198, 24243, 1096, 10007, 286, 257, 4600, 19416, 19852, 43, 3020, 17633, 63, 2134, 422, 155...
1.957048
4,214
# Make an instance of a ChronAgeData object for nSamples nSamples = 4 smpl = NewChronAgeData(nSamples) smpl.Name = ("Sample 1", "Sample 2", "Sample 3", "Sample 4") # Et cetera smpl.Age .= [ 699.1, 708.8, 723.0, 754.0,] # Measured ages smpl.Age_sigma .= [ 3.0, 7.0, 5.0, 5.0,] # Measure...
[ 2, 6889, 281, 4554, 286, 257, 8750, 23396, 6601, 2134, 329, 299, 50, 12629, 198, 77, 50, 12629, 796, 604, 198, 5796, 489, 796, 968, 1925, 1313, 23396, 6601, 7, 77, 50, 12629, 8, 198, 5796, 489, 13, 5376, 220, 220, 220, 220, 220, ...
2.392742
1,240
<gh_stars>0 module Arblib include(joinpath(@__DIR__, "..", "deps", "deps.jl")) function __init__() check_deps() end export Arf, Arb, Acb import Base: isfinite, isinf, isinteger, isnan, isone, isreal, iszero include("macros.jl") include("arb_types.jl") include("types.jl") include("rounding.jl") include("precisi...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 943, 2436, 571, 198, 198, 17256, 7, 22179, 6978, 7, 31, 834, 34720, 834, 11, 366, 492, 1600, 366, 10378, 82, 1600, 366, 10378, 82, 13, 20362, 48774, 198, 198, 8818, 11593, 15003, 834, 3419, ...
2.538889
180
<filename>src/Lasem.jl module Lasem import Cairo: CairoContext # for rendering const liblasem = "liblasem-0.6.5.dylib" const libgobject = "libgobject-2.0.0.dylib" ################################################################################ # low-level wrapper for lasem functions immutable L...
[ 27, 34345, 29, 10677, 14, 46898, 368, 13, 20362, 198, 21412, 10123, 368, 628, 220, 220, 220, 1330, 23732, 25, 23732, 21947, 220, 1303, 329, 14837, 628, 220, 220, 220, 1500, 9195, 21921, 368, 796, 366, 8019, 21921, 368, 12, 15, 13, 2...
2.241703
1,386
# --- # title: 56. Merge Intervals # id: problem56 # author: <NAME> # date: 2020-10-31 # difficulty: Medium # categories: Array, Sort # link: <https://leetcode.com/problems/merge-intervals/description/> # hidden: true # --- # # Given an array of `intervals` where `intervals[i] = [starti, endi]`, merge all # overlappin...
[ 2, 11420, 198, 2, 3670, 25, 7265, 13, 39407, 4225, 12786, 198, 2, 4686, 25, 1917, 3980, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940, 12, 3132, 198, 2, 8722, 25, 13398, 198, 2, 9376, 25, 15690, 11, 33947, ...
2.265905
613
# File copied from SMC.jl """ ``` function scalar_reduce(args...) ``` Each individual iteration returns n scalars. The output is reduced to n vectors, where the i-th vector contains all of the i-th scalars from each iteration. The return type of reduce functions must be the same type as the tuple of arguments passed i...
[ 2, 9220, 18984, 422, 9447, 34, 13, 20362, 198, 37811, 198, 15506, 63, 198, 8818, 16578, 283, 62, 445, 7234, 7, 22046, 23029, 198, 15506, 63, 198, 10871, 1981, 24415, 5860, 299, 16578, 945, 13, 383, 5072, 318, 5322, 284, 299, 30104, ...
2.44193
1,679
<reponame>mzgubic/CachedCalls.jl module CachedCalls using FilePathsBase using FilePathsBase: / using JLSO export @cached_call, @hash_call export cachedcalls_dir const CACHEDCALLS_PATH = Ref{PosixPath}() """ @cached_call f(args; kwargs) Caches the result of `f(args; kwargs)` to disk and returns the result. The ...
[ 27, 7856, 261, 480, 29, 76, 89, 70, 549, 291, 14, 34, 2317, 34, 5691, 13, 20362, 198, 21412, 327, 2317, 34, 5691, 198, 198, 3500, 9220, 15235, 82, 14881, 198, 3500, 9220, 15235, 82, 14881, 25, 1220, 198, 3500, 449, 6561, 46, 198, ...
2.579461
1,743
raw_data = readlines("../inputs/day03.txt") num_bits = length(raw_data[1]) function line2ints(line) return map(x -> parse(Int, x), collect(line)) end function get_power_consumption(data) function get_gamma(average_vals) output_string = "" for val in average_vals if val < 0.5 ...
[ 198, 198, 1831, 62, 7890, 796, 1100, 6615, 7203, 40720, 15414, 82, 14, 820, 3070, 13, 14116, 4943, 198, 22510, 62, 9895, 796, 4129, 7, 1831, 62, 7890, 58, 16, 12962, 198, 198, 8818, 1627, 17, 29503, 7, 1370, 8, 198, 220, 220, 220,...
2.235688
1,345
## options.jl : stores estimator options # # A type that stores estimator options shared for all Estimators. # # This file is part of MultilevelEstimators.jl - A Julia toolbox for # Multilevel Monte Carlo Methods (c) <NAME>, 2019 # valid options default_options(::AbstractIndexSet, ::AbstractSampleMethod) = [:nb_of_war...
[ 2235, 3689, 13, 20362, 1058, 7000, 3959, 1352, 3689, 198, 2, 198, 2, 317, 2099, 326, 7000, 3959, 1352, 3689, 4888, 329, 477, 10062, 320, 2024, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 7854, 576, 626, 22362, 320, 2024, 13, 203...
1.596071
1,629
<gh_stars>1-10 f = open("jawiki-country.txt", "r") for line in readlines(f) if ismatch(r"\[\[Category:", line) print(line) end end
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 69, 796, 1280, 7203, 73, 707, 5580, 12, 19315, 13, 14116, 1600, 366, 81, 4943, 198, 198, 1640, 1627, 287, 1100, 6615, 7, 69, 8, 198, 220, 611, 318, 15699, 7, 81, 1, 59, 58, 59, 58, 2...
2.153846
65
<gh_stars>1-10 module Maracas include("test.jl") export @test, @test_throws, @test_broken, @test_skip, @test_warn, @test_nowarn export @testset export @describe, @it, @unit, @skip, MARACAS_SETTING export MaracasTestSet, DescribeTestSet, SpecTestSet, TestTestSet export set_test_style, set_title_style, set_spec_style, se...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 1526, 40263, 198, 17256, 7203, 9288, 13, 20362, 4943, 198, 39344, 2488, 9288, 11, 2488, 9288, 62, 400, 8516, 11, 2488, 9288, 62, 25826, 11, 2488, 9288, 62, 48267, 11, 2488, 9288, 62, ...
2.360528
1,667
<gh_stars>0 module LCMGL depsjl = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") isfile(depsjl) ? include(depsjl) : error("LCMGL not properly ", "installed. Please run\nPkg.build(\"LCMGL\")") import Base: unsafe_convert using Libdl export LCM, LCMGLClient, switch_buffer, begin_mode, end_mode, vertex, ...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 22228, 44, 8763, 198, 198, 10378, 82, 20362, 796, 4654, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, 366, 492, 1600, 366, 10378, 82, 1600, 366, 10378, 82, 13, 20362, 4943, 198, 4468, 5...
2.163593
2,494
using DynamicGrids, DynamicGridsInteract, Test, Colors, ColorSchemes, ImageMagick # life glider sims init = Bool[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0] test3 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 ...
[ 3500, 26977, 8642, 2340, 11, 26977, 8642, 2340, 9492, 529, 11, 6208, 11, 29792, 11, 5315, 27054, 6880, 11, 7412, 13436, 624, 198, 198, 2, 1204, 1278, 1304, 985, 82, 198, 198, 15003, 796, 220, 347, 970, 58, 15, 657, 657, 657, 657, ...
2.059856
1,253
<reponame>giannamars/DEBMicroTrait<filename>test/zhen_affinity_predictions.jl using DEBmicroTrait using CSV, DataFrames using Roots using Statistics using HypothesisTests df = CSV.read("/Users/glmarschmann/Data/Zhen/IsogenieGenomes.ecosysguilds.csv", DataFrame) ####################################################...
[ 27, 7856, 261, 480, 29, 18299, 7402, 945, 14, 7206, 12261, 2500, 51, 12907, 27, 34345, 29, 9288, 14, 46732, 62, 2001, 6269, 62, 28764, 9278, 13, 20362, 198, 3500, 5550, 33, 24055, 51, 12907, 198, 3500, 44189, 11, 6060, 35439, 198, 3...
2.108562
21,361
using Test using SafeTestsets @testset "shallow_water" begin @safetestset "entropy_conservation_1d" begin include("entropy_conservation_1d.jl") end end
[ 3500, 6208, 198, 3500, 19978, 51, 3558, 1039, 198, 198, 31, 9288, 2617, 366, 1477, 12154, 62, 7050, 1, 2221, 198, 220, 2488, 49585, 316, 395, 2617, 366, 298, 28338, 62, 5936, 13208, 62, 16, 67, 1, 2221, 2291, 7203, 298, 28338, 62, ...
2.818182
55
export DIM1, DIM2, DIM3, Bounds SVectorF{N} = SVector{N,Float} struct Dim{N} Dim{1}() = new() Dim{2}() = new() Dim{3}() = new() end const DIM1 = Dim{1}() const DIM2 = Dim{2}() const DIM3 = Dim{3}() struct Bounds{N,T} lower::SVector{N,T} upper::SVector{N,T} function Bounds( lower::SV...
[ 39344, 360, 3955, 16, 11, 360, 3955, 17, 11, 360, 3955, 18, 11, 347, 3733, 198, 198, 50, 38469, 37, 90, 45, 92, 796, 20546, 9250, 90, 45, 11, 43879, 92, 198, 198, 7249, 14048, 90, 45, 92, 198, 220, 220, 220, 14048, 90, 16, 92,...
2.249049
526
module ExtendedWrapper using JavaCall const AbstractKalmanFilter = @jimport org.hipparchus.filtering.kalman.AbstractKalmanFilter const Class = @jimport java.lang.Class const ExtendedKalmanFilter = @jimport org.hipparchus.filtering.kalman.extended.ExtendedKalmanFilter const JString = @jimport java.lang.String const Ma...
[ 21412, 24204, 36918, 2848, 198, 198, 3500, 7349, 14134, 198, 198, 9979, 27741, 41428, 805, 22417, 796, 2488, 73, 11748, 8745, 13, 71, 3974, 998, 385, 13, 10379, 20212, 13, 74, 282, 805, 13, 23839, 41428, 805, 22417, 198, 9979, 5016, 7...
3.203991
451
<reponame>JuliaAstrodynamics/Orekit.jl<filename>gen/HipparchusWrapper/DistributionWrapper/DiscreteWrapper/hypergeometric_distribution.jl function HypergeometricDistribution(arg0::jint, arg1::jint, arg2::jint) return HypergeometricDistribution((jint, jint, jint), arg0, arg1, arg2) end function cumulative_probabilit...
[ 27, 7856, 261, 480, 29, 16980, 544, 33751, 14892, 4989, 873, 14, 41543, 15813, 13, 20362, 27, 34345, 29, 5235, 14, 39, 3974, 998, 385, 36918, 2848, 14, 20344, 3890, 36918, 2848, 14, 15642, 8374, 36918, 2848, 14, 49229, 469, 16996, 62,...
2.903577
643
<reponame>wcwitt/JuLIP.jl # included from Potentials.jl # part of the module JuLIP.Potentials using JuLIP: JVec, JMat, neighbourlist using LinearAlgebra: I using JuLIP.Chemistry: atomic_number using NeighbourLists export ZeroPairPotential, ZBLPotential, LennardJones, lennardjones, Morse, morse # Fo...
[ 27, 7856, 261, 480, 29, 86, 66, 86, 715, 14, 33018, 43, 4061, 13, 20362, 198, 2, 3017, 422, 6902, 14817, 13, 20362, 198, 2, 636, 286, 262, 8265, 12585, 43, 4061, 13, 25396, 14817, 198, 198, 3500, 12585, 43, 4061, 25, 449, 53, 72...
2.135961
5,303
<gh_stars>1-10 const TrackedComponentArray{V, D, N, DA, A, Ax} = ReverseDiff.TrackedArray{V,D,N,ComponentArray{V,N,A,Ax},DA} maybe_tracked_array(val::AbstractArray, der, tape, inds, origin) = ReverseDiff.TrackedArray(val, der, tape) function maybe_tracked_array(val::Real, der, tape, inds, origin::AbstractVector) a...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 9979, 833, 6021, 21950, 19182, 90, 53, 11, 360, 11, 399, 11, 17051, 11, 317, 11, 12176, 92, 796, 31849, 28813, 13, 2898, 6021, 19182, 90, 53, 11, 35, 11, 45, 11, 21950, 19182, 90, 53, ...
2.24902
510
<filename>test/test_utils/ad_utils.jl<gh_stars>0 using Turing: gradient_logp_forward, gradient_logp_reverse using Test function test_ad(f, at = 0.5; rtol = 1e-8, atol = 1e-8) isarr = isa(at, AbstractArray) reverse = Tracker.data(Tracker.gradient(f, at)[1]) if isarr forward = ForwardDiff.gradient(f,...
[ 27, 34345, 29, 9288, 14, 9288, 62, 26791, 14, 324, 62, 26791, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 39141, 25, 31312, 62, 6404, 79, 62, 11813, 11, 31312, 62, 6404, 79, 62, 50188, 198, 3500, 6208, 198, 198, 8818, 1332, ...
2.186189
1,144
<gh_stars>1-10 using Discretizers import LPDM: default_action, next_actions, isterminal, bv_action_pool, adaptive_actions import POMDPs: rand, actions mutable struct LightDark2DLpdm <: AbstractLD2 # @with_kw mutable struct LightDark2DLpdm <: AbstractLD2 min_noise::Float64 min_noise_loc::Float64 Q::Matrix{F...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 8444, 1186, 11341, 198, 11748, 406, 5760, 44, 25, 4277, 62, 2673, 11, 1306, 62, 4658, 11, 318, 23705, 282, 11, 275, 85, 62, 2673, 62, 7742, 11, 29605, 62, 4658, 198, 11748, 350, 26...
1.961061
4,186
<reponame>JuliaGraphics/ColorSchemeTools.jl using Test, ColorSchemes, ColorSchemeTools, FileIO, Colors using ImageMagick, QuartzImageIO function run_all_tests() @testset "basic functions" begin # load existing scheme from ColorSchemes.jl hok = ColorSchemes.hokusai @test length(hok) == 32 ...
[ 27, 7856, 261, 480, 29, 16980, 544, 18172, 14, 10258, 27054, 1326, 33637, 13, 20362, 198, 3500, 6208, 11, 5315, 27054, 6880, 11, 5315, 27054, 1326, 33637, 11, 9220, 9399, 11, 29792, 198, 3500, 7412, 13436, 624, 11, 45976, 5159, 9399, ...
2.160629
2,926
function rm_count(deck) r = 0 m = 0 for elem in deck if elem.prints[1].rarity == 3 r += elem.amount elseif elem.prints[1].rarity == 4 m += elem.amount end end (r = r, m = m) end
[ 198, 8818, 42721, 62, 9127, 7, 35875, 8, 198, 220, 220, 220, 374, 796, 657, 198, 220, 220, 220, 285, 796, 657, 198, 220, 220, 220, 329, 9766, 76, 287, 6203, 198, 220, 220, 220, 220, 220, 220, 220, 611, 9766, 76, 13, 17190, 58, ...
1.789855
138
<reponame>astrorCoder/InterpHalo.jl<filename>src/example.jl using InterpHalo, Plots points = range(0, stop = 1, length = 201) orbits = range(0, stop = 1, length = 100) P = zeros(201,6,100) for (valE,indE) in enumerate(orbits) for (val,ind) in enumerate(points) P[val,:,valE] = intH(ind,indE,2) en...
[ 27, 7856, 261, 480, 29, 459, 1472, 34, 12342, 14, 9492, 79, 39, 7335, 13, 20362, 27, 34345, 29, 10677, 14, 20688, 13, 20362, 198, 3500, 4225, 79, 39, 7335, 11, 1345, 1747, 198, 198, 13033, 796, 2837, 7, 15, 11, 2245, 796, 352, 1...
2.017167
233
# Plot the Objective over the course of the solve using TrajOptSOCPs, Plots function plotObjective(obj::objectiveFunc, trajList) fList = [TrajOptSOCPs.fObjQP(obj, traj)[1] for traj in trajList] pltObj = plot(fList, markershape = :square) title!("Cost Function") ylabel!("Cost Function") xlabel!("...
[ 2, 28114, 262, 37092, 625, 262, 1781, 286, 262, 8494, 198, 198, 3500, 4759, 73, 27871, 50, 4503, 12016, 11, 1345, 1747, 628, 198, 8818, 7110, 10267, 425, 7, 26801, 3712, 15252, 425, 37, 19524, 11, 1291, 73, 8053, 8, 198, 220, 220, ...
2.568345
139
function unsafe_sizes(buff::Ptr{UInt8}) r = Lib.blosc_cbuffer_sizes(buff) return (r.nbytes, r.cbytes) end """ sizes(buff::Vector{UInt8}, offset = 1) Get information about a compressed buffer at offset `offset` (1-indexed), as Tuple with values: - the number of uncompressed bytes - the number of compress...
[ 8818, 21596, 62, 82, 4340, 7, 36873, 3712, 46745, 90, 52, 5317, 23, 30072, 198, 220, 220, 220, 374, 796, 7980, 13, 2436, 17500, 62, 21101, 13712, 62, 82, 4340, 7, 36873, 8, 198, 220, 220, 220, 1441, 357, 81, 13, 77, 33661, 11, 3...
2.743929
453
<reponame>KristofferC/TOML.jl Dict{String, Any}("1" => Dict{String, Any}("value" => "1", "type" => "integer"))
[ 27, 7856, 261, 480, 29, 40756, 47895, 34, 14, 51, 2662, 43, 13, 20362, 198, 35, 713, 90, 10100, 11, 4377, 92, 7203, 16, 1, 5218, 360, 713, 90, 10100, 11, 4377, 92, 7203, 8367, 1, 5218, 366, 16, 1600, 366, 4906, 1, 5218, 366, 4...
2.340426
47
<filename>src/DBFs.jl<gh_stars>10-100 #!/usr/bin/env julia module DBFs const DBF = Vector{Float32} export DBF using Base.Cartesian """ use segmentation to get binary image to save memory usage """ function compute_DBF(seg::Array{T,3}, obj_id::T) where T error("unimplemented") end """ compute_DBF( point...
[ 27, 34345, 29, 10677, 14, 11012, 42388, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 21412, 20137, 42388, 198, 198, 9979, 20137, 37, 796, 20650, 90, 43879, 2624, ...
2.396295
3,293
<reponame>jacob-alt-del/Tennis-Refactoring-Kata mutable struct TennisGame1 m_score1::Int m_score2::Int player1Name::String player2Name::String TennisGame1(player1Name, player2Name) = new(0, 0, player1Name, player2Name) end function Tenniskata.won_point(game::TennisGame1, playerName::String) if playerNa...
[ 27, 7856, 261, 480, 29, 30482, 672, 12, 2501, 12, 12381, 14, 51, 10679, 12, 8134, 529, 3255, 12, 42, 1045, 198, 76, 18187, 2878, 37213, 8777, 16, 198, 220, 220, 220, 285, 62, 26675, 16, 3712, 5317, 198, 197, 76, 62, 26675, 17, 3...
1.983627
794
<filename>test/runtests.jl using CFITSIO using Test using Aqua function tempfitsfile(fn) mktempdir() do dir filename = joinpath(dir, "temp.fits") fitsfile = fits_clobber_file(filename) fn(fitsfile) if fitsfile.ptr != C_NULL # write some data to file to avoid errors on c...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 18551, 29722, 9399, 198, 3500, 6208, 198, 3500, 24838, 198, 198, 8818, 20218, 21013, 7753, 7, 22184, 8, 198, 220, 220, 220, 33480, 29510, 15908, 3419, 466, 26672, 198, 220...
1.733401
14,850
<reponame>JuliaPackageMirrors/SliceSampler.jl # Density type that is useful across a variety of the sampling methods. # NB: The density computed by f need not be normalized. type Density f::Function end type DifferentiableDensity # maybe <: DifferentiableFunction ? f::Function gradient::Function end
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 11122, 501, 16305, 20053, 13, 20362, 198, 2, 360, 6377, 2099, 326, 318, 4465, 1973, 257, 4996, 286, 262, 19232, 5050, 13, 198, 2, 41354, 25, 383, 12109, 29231, 416, 277, 76...
3.494382
89
function dissipator!(dρ_L::Array{ComplexF64,2}, ρ::Array{ComplexF64,2}, γs::Vector{Array{ComplexF64,2}}, γTs::Vector{Array{ComplexF64,2}}, γSqs::Vector{Array{ComplexF64,2}}, A::Array{ComplexF64, 2}, B::Array{ComplexF64, 2}, ...
[ 8818, 32008, 1352, 0, 7, 67, 33643, 62, 43, 3712, 19182, 90, 5377, 11141, 37, 2414, 11, 17, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 223, 3712, 19182, 90, 5377, 11141, 37, 2414, 11, 17, ...
1.714204
7,026
#runs a regression on every firm function regressbynonprofit!(df::DataFrame; YField::Symbol = :lreturn, bmfield::Symbol = Symbol(:pred_, YField), XFields::Vector{Symbol} = [:lsp500ret], groupbyfield::Symbol = :ein, suppressintercept::Bool = false, XNames::Vector{Symbol} = [:intercept; XFields], YName:...
[ 628, 198, 198, 2, 48381, 257, 20683, 319, 790, 4081, 198, 8818, 50252, 1525, 13159, 9183, 0, 7, 7568, 3712, 6601, 19778, 26, 198, 220, 575, 15878, 3712, 13940, 23650, 796, 1058, 75, 7783, 11, 198, 220, 275, 76, 3245, 3712, 13940, 23...
2.400397
4,031
<reponame>UnofficialJuliaMirrorSnapshots/RegERMs.jl-d41b3cee-bfd5-59f4-ae46-2d539e075afd immutable RidgeReg <: RegERM X::Matrix # n x m matrix of n m-dimensional training examples y::Vector # 1 x n vector with training classes n::Int # number of training examples...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 8081, 1137, 10128, 13, 20362, 12, 67, 3901, 65, 18, 344, 68, 12, 65, 16344, 20, 12, 3270, 69, 19, 12, 3609, 3510, 12, 17, 67, 20, 2670, 68, 46396, 1...
2.320624
577
using Fleetdm using Test @testset "Fleetdm.jl" begin # Write your tests here. end
[ 3500, 20001, 36020, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 47669, 316, 36020, 13, 20362, 1, 2221, 198, 220, 220, 220, 1303, 19430, 534, 5254, 994, 13, 198, 437, 198 ]
2.71875
32
<reponame>cossio/OneHot.jl using OneHot using Base: tail, front X = OneHotArray(rand(1:4, 5), 4) for i = 1:size(X,2) @test OneHot.decode(X[:,i]) == X.c[i] end A = randn(3,4) @test A[:, X.c] == @inferred A * X @test A * X == A * Array(X) B = randn(3,3) @test_throws DimensionMismatch B * X @test X[:,1:3] isa One...
[ 27, 7856, 261, 480, 29, 66, 793, 952, 14, 3198, 21352, 13, 20362, 198, 3500, 1881, 21352, 198, 3500, 7308, 25, 7894, 11, 2166, 198, 198, 55, 796, 1881, 21352, 19182, 7, 25192, 7, 16, 25, 19, 11, 642, 828, 604, 8, 198, 198, 1640,...
2.038217
314
<filename>src/Storage/http.jl using HTTP """ HTTPStore A basic HTTP store without any credentials. The underlying data is supposed to be consolidated and only read operations are supported. This store is compatible to datasets being served through the [xpublish](https://xpublish.readthedocs.io/en/latest/) python ...
[ 27, 34345, 29, 10677, 14, 31425, 14, 4023, 13, 20362, 198, 3500, 14626, 198, 198, 37811, 198, 220, 220, 220, 14626, 22658, 198, 198, 32, 4096, 14626, 3650, 1231, 597, 18031, 13, 383, 10238, 1366, 318, 4385, 284, 307, 198, 5936, 10180,...
2.65045
555
<filename>src/ViscousFlow.jl module ViscousFlow #using DocStringExtensions using Reexport using UnPack @reexport using ImmersedLayers @reexport using GridUtilities export ViscousIncompressibleFlowProblem export setup_grid, viscousflow_system, setup_problem, surface_point_spacing #= Supporting functions =# setup_pr...
[ 27, 34345, 29, 10677, 14, 53, 2304, 516, 37535, 13, 20362, 198, 21412, 569, 2304, 516, 37535, 198, 198, 2, 3500, 14432, 10100, 11627, 5736, 198, 3500, 797, 39344, 198, 3500, 791, 11869, 198, 31, 631, 87, 634, 1262, 9543, 20204, 43, ...
2.292558
7,014
<filename>src/analytic_solution_lmax.jl # Functionalities for analytical Solution for lmax assuming we have a linear cost # function ℓ, a Ellispoidal (Convec) set Ω and linear Feedback gain K using LazySets """ get_Ellipsoid(P, α) Creates Ellipsoid `Ω := {x |x'Px ≤ α}` using LazySets""" function get_Elli...
[ 27, 34345, 29, 10677, 14, 38200, 13370, 62, 82, 2122, 62, 75, 9806, 13, 20362, 198, 2, 15553, 27969, 329, 30063, 28186, 329, 300, 9806, 13148, 356, 423, 257, 14174, 1575, 198, 2, 2163, 2343, 226, 241, 11, 257, 7122, 8802, 47502, 357...
1.788
1,500
<filename>test/ExternalDocstringsTests/src/ExternalDocstringsTests.jl<gh_stars>1-10 module ExternalDocstringsTests using ExternalDocstrings using ExternalDocstrings: transform_docstring using Test function f end baremodule Sub function f end end ExternalDocstrings.@define_docstrings function test_f() docstr = ...
[ 27, 34345, 29, 9288, 14, 41506, 23579, 37336, 51, 3558, 14, 10677, 14, 41506, 23579, 37336, 51, 3558, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 34579, 23579, 37336, 51, 3558, 198, 198, 3500, 34579, 23579, 37336, 198,...
2.592857
420
<filename>src/SimpleSolvers.jl module SimpleSolvers using Distances using ForwardDiff using LinearAlgebra using Printf import Base.minimum import Base.Callable include("utils.jl") export solve! export config, result, state, status export algorithm, objective export soluti...
[ 27, 34345, 29, 10677, 14, 26437, 36949, 690, 13, 20362, 198, 21412, 17427, 36949, 690, 628, 220, 220, 220, 1262, 4307, 1817, 198, 220, 220, 220, 1262, 19530, 28813, 198, 220, 220, 220, 1262, 44800, 2348, 29230, 198, 220, 220, 220, 126...
2.385154
1,428
using FunctionalCollections using JSON import FunctionalCollections: append export Node, node, instanceof, props const WEBIO_NODE_MIME = MIME"application/vnd.webio.node+json" Base.Multimedia.istextmime(::WEBIO_NODE_MIME) = true const WEBIO_APPLICATION_MIME = MIME"application/vnd.webio.application+html" Base.Multimed...
[ 3500, 44224, 5216, 26448, 198, 3500, 19449, 198, 198, 11748, 44224, 5216, 26448, 25, 24443, 198, 39344, 19081, 11, 10139, 11, 4554, 1659, 11, 25744, 198, 198, 9979, 12887, 3483, 46, 62, 45, 16820, 62, 44, 12789, 796, 337, 12789, 1, 31...
2.334988
2,821
<reponame>PetrKryslUCSD/FinEtoolsAcoustics.jl using FinEtools println("The interior sphere accelerates in the alternately in the positive and negative x-direction, generating positive pressure ahead of it, negative pressure behind. Time-dependent simulation. ") rho = 1.21*phun("kg/m^3");# mass density c = 343.0*phun(...
[ 27, 7856, 261, 480, 29, 47, 21879, 42, 563, 6649, 52, 7902, 35, 14, 18467, 36, 31391, 12832, 23968, 873, 13, 20362, 198, 3500, 4463, 36, 31391, 198, 198, 35235, 7203, 464, 11087, 16558, 8320, 689, 287, 262, 3983, 1286, 287, 262, 396...
2.144876
2,264
<reponame>danielzhaotongliu/MALTrendsWeb {"score_count": 42475, "timestamp": 1563108810.0, "score": 7.24} {"score_count": 42271, "timestamp": 1562142557.0, "score": 7.24} {"score_count": 41319, "timestamp": 1556466622.0, "score": 7.24} {"score_count": 41047, "timestamp": 1555037517.0, "score": 7.24} {"score_count": 409...
[ 27, 7856, 261, 480, 29, 67, 6321, 89, 3099, 313, 506, 4528, 84, 14, 44, 31429, 10920, 82, 13908, 198, 4895, 26675, 62, 9127, 1298, 48252, 2425, 11, 366, 16514, 27823, 1298, 1315, 5066, 940, 3459, 940, 13, 15, 11, 366, 26675, 1298, ...
2.373451
565
module BallroomSkatingSystem using Reexport @reexport using DataFrames using Statistics include("helper_functions.jl") include("skating_single_dance.jl") include("skating_combined.jl") export skating_single_dance, skating_combined end
[ 21412, 6932, 3823, 15739, 803, 11964, 198, 198, 3500, 797, 39344, 198, 31, 631, 87, 634, 1262, 6060, 35439, 198, 3500, 14370, 198, 198, 17256, 7203, 2978, 525, 62, 12543, 2733, 13, 20362, 4943, 198, 17256, 7203, 8135, 803, 62, 29762, ...
3.144737
76
<gh_stars>1-10 module ModelBasedCF # package code goes here using Persa using ProgressMeter using Statistics using LinearAlgebra: norm using Random: shuffle abstract type MatrixFactorization{T} <: Persa.Model{T} end include("irsvd.jl") include("rsvd.jl") include("train.jl") include("baseline.jl") include("random.jl...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 9104, 15001, 22495, 198, 198, 2, 5301, 2438, 2925, 994, 198, 3500, 9467, 64, 198, 3500, 18387, 44, 2357, 198, 3500, 14370, 198, 3500, 44800, 2348, 29230, 25, 2593, 198, 3500, 14534, 2...
3.008929
112
<filename>src/animation.jl abstract type FiniteLengthAnimation{T} end Base.Broadcast.broadcastable(f::FiniteLengthAnimation) = Ref(f) """ `Animation{T}` An Animation that contains a `Vector` of `Keyframe`s and a `Vector` of `Easing`s """ struct Animation{T} <: FiniteLengthAnimation{T} frames::Vector{Keyframe{T}}...
[ 27, 34345, 29, 10677, 14, 11227, 341, 13, 20362, 198, 397, 8709, 2099, 4463, 578, 24539, 39520, 90, 51, 92, 886, 198, 198, 14881, 13, 30507, 2701, 13, 36654, 2701, 540, 7, 69, 3712, 37, 9504, 24539, 39520, 8, 796, 6524, 7, 69, 8, ...
2.300467
2,353
""" mapをparalellで実行してidを各プロセスで表示する """ using Base.Iterators using Distributed @everywhere function miseru(x, y) @show x y myid() sleep(1) return x^2 + y end function main() N::Int64 = 8 # tuple -> list vmiseru = pmap(x -> miseru(x...), product(1:N, 1:N)) @show vmiseru ...
[ 37811, 201, 198, 8899, 31758, 1845, 282, 695, 30640, 22522, 253, 26193, 234, 22180, 28134, 312, 31758, 28938, 226, 30965, 16253, 47271, 8943, 30640, 26193, 101, 163, 97, 118, 33623, 25748, 201, 198, 37811, 201, 198, 201, 198, 3500, 7308, ...
1.896552
203
<reponame>rjdverbeek-tud/DDR2import.jl<gh_stars>0 @testset "Routes.jl" begin filename = "data\\test.routes" dc = DDR2import.Routes.read(filename) @test dc["ABESI8TLIME"].type == "DP" @test dc["ABDIL1ALFMD"].route[2].wp == "TUPOX" @test dc["ABDIL1ALFTZ"].route[3].location_type == "SP" @test dc["A...
[ 27, 7856, 261, 480, 29, 81, 73, 67, 332, 1350, 988, 12, 83, 463, 14, 35, 7707, 17, 11748, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 31, 9288, 2617, 366, 49, 448, 274, 13, 20362, 1, 2221, 198, 220, 220, 220, 29472, 796, 366, ...
2
180
<filename>src/exec.jl import BitIntegers: UInt256, @uint256_str import SHA: sha256 Ast = Dict{String, Any} abstract type AbstractTemplate end Scope = Dict{String, AbstractTemplate} struct Template <: AbstractTemplate scopes::Vector{Scope} end struct Selector id::Int64 name::String end struct Signal end st...
[ 27, 34345, 29, 10677, 14, 18558, 13, 20362, 198, 11748, 4722, 34500, 364, 25, 471, 5317, 11645, 11, 2488, 28611, 11645, 62, 2536, 198, 11748, 25630, 25, 427, 64, 11645, 198, 198, 33751, 796, 360, 713, 90, 10100, 11, 4377, 92, 198, 1...
2.13118
16,870
<reponame>UnofficialJuliaMirror/GitLab.jl-ec55e9df-579d-5e55-a10d-b795213e2edd ############## # Issue type # ############## type Issue <: GitLabType id::Nullable{Int} iid::Nullable{Int} project_id::Nullable{Int} title::Nullable{GitLabString} description::Nullable{GitLabString} state::Nullable{G...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 38, 270, 17822, 13, 20362, 12, 721, 2816, 68, 24, 7568, 12, 41734, 67, 12, 20, 68, 2816, 12, 64, 940, 67, 12, 65, 3720, 4309, 1485, 68, 17, 6048, 198, 7804, 4242,...
2.540373
805
<filename>src/TreeStructure.jl """ TreeStructure This defines the tree structure. A tree has a name, a list of parents, a list of states, list of probabilities, and a list of children. Name - a string representing the name of the tree. List of parents - shows the parent of each node in the tree. List of states - cont...
[ 27, 34345, 29, 10677, 14, 27660, 1273, 5620, 13, 20362, 198, 37811, 198, 197, 27660, 1273, 5620, 198, 198, 1212, 15738, 262, 5509, 4645, 13, 198, 32, 5509, 468, 257, 1438, 11, 257, 1351, 286, 3397, 11, 257, 1351, 286, 2585, 11, 1351...
2.031948
8,013
module FemtoCleaner # For interactive development using Revise using Base.Distributed using GitHub using GitHub: GitHubAPI, GitHubWebAPI, Checks using HTTP using Deprecations using CSTParser using Deprecations: isexpr using MbedTLS using JSON using AbstractTrees: children using Base: LibGit2 include("workqueue.jl") ...
[ 21412, 31149, 1462, 32657, 263, 198, 198, 2, 1114, 14333, 2478, 198, 3500, 5416, 786, 198, 198, 3500, 7308, 13, 20344, 6169, 198, 3500, 21722, 198, 3500, 21722, 25, 21722, 17614, 11, 21722, 13908, 17614, 11, 47719, 198, 3500, 14626, 198...
2.048462
10,338
<reponame>herysedra/covid19-mankaiza-clone2<gh_stars>0 push!(LOAD_PATH, joinpath(homedir(),"GitHub/KenyaCoV/src")) using Plots,Parameters,Distributions,DifferentialEquations,JLD2,DataFrames,StatsPlots,FileIO,MAT,RecursiveArrayTools import KenyaCoV using LinearAlgebra:eigen using Statistics: median, quantile """ Load a...
[ 27, 7856, 261, 480, 29, 372, 893, 276, 430, 14, 66, 709, 312, 1129, 12, 805, 4914, 23638, 12, 21018, 17, 27, 456, 62, 30783, 29, 15, 198, 14689, 0, 7, 35613, 62, 34219, 11, 4654, 6978, 7, 71, 12657, 343, 3419, 553, 38, 270, 16...
2.1
1,410