content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>JamesKat94/HoJBot.jl const QUOTE_CACHE = Cache{String,Float64}(Minute(1)) finnhub_token() = get(ENV, "FINNHUB_TOKEN", "") function commander(c::Client, m::Message, ::Val{:ig}) @debug "ig_commander called" command = extract_command("ig", m.content) args = split(command) @debug "parse result"...
[ 27, 7856, 261, 480, 29, 14731, 25881, 5824, 14, 28900, 41, 20630, 13, 20362, 198, 9979, 19604, 23051, 62, 34, 2246, 13909, 796, 34088, 90, 10100, 11, 43879, 2414, 92, 7, 9452, 1133, 7, 16, 4008, 198, 198, 69, 3732, 40140, 62, 30001,...
2.521862
8,142
<gh_stars>10-100 function p53(data::Dict) # Setup basic dimensions of arrays # Parse & check FEdict data if :struc_el in keys(data) struc_el = data[:struc_el] else println("No fin_el type specified.") return end ndim = struc_el.ndim nst = struc_el.nst fin_el = struc_el.fin_el ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 8818, 279, 4310, 7, 7890, 3712, 35, 713, 8, 198, 220, 220, 198, 220, 1303, 31122, 4096, 15225, 286, 26515, 198, 220, 220, 198, 220, 1303, 2547, 325, 1222, 2198, 376, 7407, 713, 1366, 198...
2.008041
3,109
include("../src/read/read_datasets.jl") include("../src/utils.jl") include("../src/pq/PQ.jl"); include("../src/lsq_sparse/LSQ_SPGL1.jl"); include("../src/linscan/Linscan.jl"); function demo_lsq_sparse( dataset_name="SIFT1M", nread::Integer=Int(1e4)) # === Hyperparams === m = 7 # In LSQ we use m-1 codebo...
[ 17256, 7203, 40720, 10677, 14, 961, 14, 961, 62, 19608, 292, 1039, 13, 20362, 4943, 198, 17256, 7203, 40720, 10677, 14, 26791, 13, 20362, 4943, 198, 17256, 7203, 40720, 10677, 14, 79, 80, 14, 47, 48, 13, 20362, 15341, 198, 17256, 7203...
2.166935
1,240
""" Lasso(; alpha = 0.1, tol = 1e-4, mi = 1e+8) Lasso Regression structure. eEach parameters are as follows: - `alpha` : leaarning rate. - `tol` : Allowable error. - `mi` : Maximum number of learning. # Example ```jldoctest regression julia> model = Lasso() Lasso(Float64[], 0.1, 0.0001, 100000000) julia> fit!(mod...
[ 37811, 198, 220, 220, 220, 406, 28372, 7, 26, 17130, 796, 657, 13, 16, 11, 284, 75, 796, 352, 68, 12, 19, 11, 21504, 796, 352, 68, 10, 23, 8, 198, 43, 28372, 3310, 2234, 4645, 13, 304, 10871, 10007, 389, 355, 5679, 25, 198, 12...
1.918665
959
<reponame>SamuelWiqvist/efficient_SDEMEM<gh_stars>0 # script to run inference for the OU SDEMEM model using Pkg using LinearAlgebra using DataFrames # TODO # what to do w the adaptive tuning? # updated resources for sbatch scripts println("start run script") # load functions include(pwd()*"/src/SDEMEM OU process/ou...
[ 27, 7856, 261, 480, 29, 16305, 2731, 54, 25011, 85, 396, 14, 16814, 62, 10305, 3620, 3620, 27, 456, 62, 30783, 29, 15, 198, 2, 4226, 284, 1057, 32278, 329, 262, 47070, 9834, 3620, 3620, 2746, 198, 3500, 350, 10025, 198, 3500, 44800,...
1.377896
3,755
<filename>test/deabigdata.jl<gh_stars>1-10 # Tests for Big Data Radial DEA Models @testset "BigData RadialDEAModel" begin ## Test Radial DEA Models with FLS Book data X = [5 13; 16 12; 16 26; 17 15; 18 14; 23 6; 25 10; 27 22; 37 14; 42 25; 5 17] Y = [12; 14; 25; 26; 8; 9; 27; 30; 31; 26; 12] # Input o...
[ 27, 34345, 29, 9288, 14, 2934, 397, 328, 7890, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 30307, 329, 4403, 6060, 5325, 498, 28647, 32329, 198, 31, 9288, 2617, 366, 12804, 6601, 5325, 498, 7206, 2390, 375, 417, 1, 222...
1.669217
7,972
using IterativeSolvers using FactCheck using Base.Test # Type used in SOL test type Wrapper m::Int n::Int end Base.size(op::Wrapper, dim::Integer) = (dim == 1) ? op.m : (dim == 2) ? op.n : 1 Base.size(op::Wrapper) = (op.m, op.n) Base.eltype(op::Wrapper) = Int func...
[ 3500, 40806, 876, 36949, 690, 198, 3500, 19020, 9787, 198, 3500, 7308, 13, 14402, 628, 198, 198, 2, 5994, 973, 287, 36817, 1332, 198, 4906, 27323, 2848, 198, 220, 220, 220, 285, 3712, 5317, 198, 220, 220, 220, 299, 3712, 5317, 198, ...
1.811904
2,621
include("module.jl") using Logging Logging.global_logger(Logging.ConsoleLogger(Logging.Info)) F5_DETECTED_USELESS_NF = 0 F5_USELESS_NF = 0 F5_NF = 0 F5_BASIS_SIZE = 0 function zerof5() global F5_DETECTED_USELESS_NF global F5_USELESS_NF global F5_NF global F5_BASIS_SIZE F5_DETECTED_...
[ 198, 17256, 7203, 21412, 13, 20362, 4943, 198, 198, 3500, 5972, 2667, 198, 11187, 2667, 13, 20541, 62, 6404, 1362, 7, 11187, 2667, 13, 47581, 11187, 1362, 7, 11187, 2667, 13, 12360, 4008, 198, 198, 37, 20, 62, 35, 2767, 9782, 1961, ...
2.017011
3,586
@testset "rand" begin # Some arbitrary alignment x = iterdates() expected_times = _eval_fast(x).times @testset "scalar" begin n = rand(x) # calling multiple times should give different nodes, since we use a different rng. @test n != rand(x) # If we specify an explicit r...
[ 31, 9288, 2617, 366, 25192, 1, 2221, 198, 220, 220, 220, 1303, 2773, 14977, 19114, 198, 220, 220, 220, 2124, 796, 11629, 19581, 3419, 198, 220, 220, 220, 2938, 62, 22355, 796, 4808, 18206, 62, 7217, 7, 87, 737, 22355, 628, 220, 220,...
2.051429
875
### Run Simulation ### function initialize_sim_and_run(;m::MapData , routes_path::OrderedDict{Symbol, OrderedDict{Int64,Int64}} , routes_distances::OrderedDict{Symbol, OrderedDict{Int64,Float64}} , routes_types_both_dir::Dict{Symbol,Symbol} , orig_map_nodes_num::Int , when_to_run_people::Float64 = s...
[ 21017, 5660, 41798, 44386, 198, 8818, 41216, 62, 14323, 62, 392, 62, 5143, 7, 26, 76, 3712, 13912, 6601, 198, 197, 197, 197, 197, 11, 11926, 62, 6978, 3712, 35422, 1068, 35, 713, 90, 13940, 23650, 11, 14230, 1068, 35, 713, 90, 5317,...
2.252166
4,616
<gh_stars>0 devices = Dict{Symbol, DeviceModel}(:Generators => DeviceModel(PSY.ThermalStandard, ThermalDispatch), :Loads => DeviceModel(PSY.PowerLoad, StaticPowerLoad)) branches = Dict{Symbol, DeviceModel}(:L => DeviceModel(PSY.Line, StaticLineUnbounded)) services = Dict{Symbol, Ser...
[ 27, 456, 62, 30783, 29, 15, 198, 42034, 796, 360, 713, 90, 13940, 23650, 11, 16232, 17633, 92, 7, 25, 8645, 2024, 5218, 16232, 17633, 7, 3705, 56, 13, 35048, 7617, 23615, 11, 41590, 49354, 828, 198, 220, 220, 220, 220, 220, 220, 2...
2.700221
904
""" ZeroKernel() Create a kernel that always returning zero ``` κ(x,y) = 0.0 ``` The output type depends of `x` and `y` """ struct ZeroKernel <: SimpleKernel end kappa(κ::ZeroKernel, d::T) where {T<:Real} = zero(T) metric(::ZeroKernel) = Delta() Base.show(io::IO, ::ZeroKernel) = print(io, "Zero Kernel") "...
[ 37811, 198, 220, 220, 220, 12169, 42, 7948, 3419, 198, 198, 16447, 257, 9720, 326, 1464, 8024, 6632, 198, 15506, 63, 198, 220, 220, 220, 7377, 118, 7, 87, 11, 88, 8, 796, 657, 13, 15, 198, 15506, 63, 198, 464, 5072, 2099, 8338, ...
2.294347
513
<gh_stars>0 module SpikeTrains export SpikeTrain, draw_uncorrelated_spikes, draw_correlated_spikes, draw_coincident_spikes, length, iterate, convert, vcat, merge, make_exponentialShift, correlation_code, coincidence_code, plot_spike_trains using Distributions, Plots#, PlotRecipes struct SpikeTrain times::Vector...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 26309, 2898, 1299, 198, 198, 39344, 26309, 44077, 11, 3197, 62, 403, 10215, 5363, 62, 2777, 7938, 11, 3197, 62, 10215, 5363, 62, 2777, 7938, 11, 3197, 62, 1073, 1939, 738, 62, 2777, 7938, 11, ...
2.480526
3,723
# DBL_EPSILON - jest to dokładność dla liczb zmiennoprzecinkowych # dla Float64 jest to 2.2204460492503131e-16 DBL_EPSILON = 2.2204460492503131e-16 function DIFFSIGN(x, y) if (x <=0 && y >= 0) || (x >= 0 && y <= 0) return true else return false end end function fun(x) return 1 / (x - ...
[ 198, 2, 360, 9148, 62, 36, 3705, 4146, 1340, 532, 474, 395, 284, 466, 74, 41615, 324, 3919, 129, 249, 38325, 288, 5031, 3476, 14969, 1976, 11632, 1697, 404, 81, 89, 721, 676, 322, 88, 354, 198, 2, 288, 5031, 48436, 2414, 474, 395,...
1.624325
2,779
<reponame>ChevronETC/WaveFD using BenchmarkTools, Random, Statistics, WaveFD _nthreads = [2^i for i in 0:floor(Int,log2(Sys.CPU_THREADS))] if Sys.CPU_THREADS ∉ _nthreads push!(_nthreads, Sys.CPU_THREADS) end const SUITE = BenchmarkGroup() z0,y0,x0,dz,dy,dx,nt,dt = 0.0,0.0,0.0,10.0,10.0,10.0,3000,0.001 n_2D = (z...
[ 27, 7856, 261, 480, 29, 7376, 85, 1313, 2767, 34, 14, 39709, 26009, 198, 3500, 25187, 4102, 33637, 11, 14534, 11, 14370, 11, 17084, 26009, 198, 198, 62, 77, 16663, 82, 796, 685, 17, 61, 72, 329, 1312, 287, 657, 25, 28300, 7, 5317,...
1.962761
9,345
<filename>MakieCore/src/attributes.jl const Theme = Attributes Base.broadcastable(x::AbstractScene) = Ref(x) Base.broadcastable(x::AbstractPlot) = Ref(x) Base.broadcastable(x::Attributes) = Ref(x) # The rules that we use to convert values to a Observable in Attributes value_convert(x::Observables.AbstractObservable)...
[ 27, 34345, 29, 44, 461, 494, 14055, 14, 10677, 14, 1078, 7657, 13, 20362, 198, 198, 9979, 26729, 796, 49213, 198, 198, 14881, 13, 36654, 2701, 540, 7, 87, 3712, 23839, 36542, 8, 796, 6524, 7, 87, 8, 198, 14881, 13, 36654, 2701, 54...
2.542382
3,728
<filename>test/runtests.jl using NNLS using Test # import NonNegLeastSquares using PyCall using ECOS using JuMP using Random using LinearAlgebra import Libdl const pyopt = pyimport_conda("scipy.optimize", "scipy") macro wrappedallocs(expr) argnames = [gensym() for a in expr.args] quote function g($(...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 399, 45, 6561, 198, 3500, 6208, 198, 2, 1330, 8504, 32863, 3123, 459, 22266, 3565, 198, 3500, 9485, 14134, 198, 3500, 13182, 2640, 198, 3500, 12585, 7378, 198, 3500, 14534...
2.330275
218
<filename>src/Resource/ResourceManagementClient/model_DeploymentExtendedFilter.jl # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct DeploymentExtendedFilter <: SwaggerModel provisioningState::Any # spec type:...
[ 27, 34345, 29, 10677, 14, 26198, 14, 26198, 48032, 11792, 14, 19849, 62, 49322, 434, 11627, 1631, 22417, 13, 20362, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13,...
3.340136
441
<reponame>ianshmean/LibSerialPort.jl import Base: readline, readuntil export readline, readuntil #== Timeout versions of tbe base functions ==# """ readline(s::IO, timeout::T; keep::Bool=false) where {T<:Real} Like Base.readline, except times-out after `timeout` seconds. """ function readline(s::IO, timeout::T; ...
[ 27, 7856, 261, 480, 29, 1547, 71, 32604, 14, 25835, 32634, 13924, 13, 20362, 198, 11748, 7308, 25, 1100, 1370, 11, 1100, 28446, 198, 39344, 1100, 1370, 11, 1100, 28446, 198, 198, 2, 855, 198, 48031, 6300, 286, 256, 1350, 2779, 5499, ...
2.165493
852
<filename>src/constraints/chp_constraints.jl # ********************************************************************************* # REopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permi...
[ 27, 34345, 29, 10677, 14, 1102, 2536, 6003, 14, 354, 79, 62, 1102, 2536, 6003, 13, 20362, 198, 2, 41906, 17174, 8412, 9, 198, 2, 4526, 8738, 11, 15069, 357, 66, 8, 13130, 12, 42334, 11, 10302, 329, 45276, 6682, 11, 11419, 13, 198,...
2.163868
5,895
module ENN export TimedAutomata, TimePetriNets, Neurons include(joinpath("TimedAutomata/","TimedAutomata.jl")) include(joinpath("TimePetriNets/","TimePetriNets.jl")) include(joinpath("Neurons/","Neurons.jl")) end
[ 21412, 412, 6144, 198, 198, 39344, 5045, 276, 38062, 1045, 11, 3862, 25803, 380, 45, 1039, 11, 3169, 333, 684, 198, 198, 17256, 7, 22179, 6978, 7203, 14967, 276, 38062, 1045, 14, 2430, 14967, 276, 38062, 1045, 13, 20362, 48774, 198, 1...
2.654321
81
<gh_stars>0 using RecipesBase, Measures export InvMcmcSampler, McmcOutput struct InvMcmcSampler{T<:InvMcmcMove} move::T desired_samples::Int burn_in::Int lag::Int K::Int init::McmcInitialiser pointers::InteractionSequence{Int} function InvMcmcSampler( move::T; desired...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 44229, 14881, 11, 45040, 198, 39344, 10001, 9742, 23209, 16305, 20053, 11, 1982, 23209, 26410, 198, 198, 7249, 10001, 9742, 23209, 16305, 20053, 90, 51, 27, 25, 19904, 9742, 23209, 21774, 92, 198, ...
2.127139
2,454
using PFKernels using PFKernels.PowerSystem using PFKernels.ForwardDiff using LinearAlgebra AT = PFKernels.AT function mynorm(x) t1s{N} = ForwardDiff.Dual{Nothing,Float64, N} where N n = length(x) FT = t1s{n} V = Vector F = zeros(n) adF = V{FT}(undef, n) adx = V{FT}(undef, n) # Forward...
[ 3500, 350, 26236, 44930, 198, 3500, 350, 26236, 44930, 13, 13434, 11964, 198, 3500, 350, 26236, 44930, 13, 39746, 28813, 198, 3500, 44800, 2348, 29230, 198, 198, 1404, 796, 350, 26236, 44930, 13, 1404, 198, 198, 8818, 616, 27237, 7, 87,...
2.085153
458
<reponame>Giarcr0b/MVO_Tool # Copyright 2016, <NAME>, <NAME>, <NAME>, and contributors # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ##############################...
[ 27, 7856, 261, 480, 29, 33704, 5605, 81, 15, 65, 14, 44, 29516, 62, 25391, 198, 2, 220, 15069, 1584, 11, 1279, 20608, 22330, 1279, 20608, 22330, 1279, 20608, 22330, 290, 20420, 198, 2, 220, 770, 8090, 6127, 5178, 318, 2426, 284, 262...
2.23331
15,803
<gh_stars>10-100 ############################################################ ## joMatrix - extra functions # elements(jo) #elements(A::joAbstractDAparallelToggleOperator) = throw(joAbstractDAparallelToggleOperatorException("elements: pointless operation for joDAdistribute/joDAgather operations")) # hasinverse(jo) #...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 29113, 14468, 7804, 4242, 198, 2235, 2525, 46912, 532, 3131, 5499, 198, 198, 2, 4847, 7, 7639, 8, 198, 2, 68, 3639, 7, 32, 3712, 7639, 23839, 5631, 1845, 29363, 51, 20258, 18843, 1352, 8...
3.036765
136
matmul_sizes(s::Integer) = (s,s,s) matmul_sizes(m_k_n::Tuple{Vararg{<:Integer, 3}}) = m_k_n """ runbench(backend, TA, TB, TC; kwargs...) """ function runbench(backend::Symbol, ::Type{TA}, ::Type{TB}, ::Type{TC}; kwargs...) where {TA, TB, TC} return runbench(Val(backend), TA, TB, TC; kwargs......
[ 6759, 76, 377, 62, 82, 4340, 7, 82, 3712, 46541, 8, 796, 357, 82, 11, 82, 11, 82, 8, 198, 6759, 76, 377, 62, 82, 4340, 7, 76, 62, 74, 62, 77, 3712, 51, 29291, 90, 19852, 853, 90, 27, 25, 46541, 11, 513, 11709, 8, 796, 285,...
1.806538
1,499
# SPDX-License-Identifier: X11 # 2020-08-29 # Five Variables (100pt) println(findfirst(x -> x == 0, parse.(Int, split(readline(), " "))))
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 1395, 1157, 198, 2, 12131, 12, 2919, 12, 1959, 198, 2, 10579, 15965, 2977, 357, 3064, 457, 8, 198, 198, 35235, 7, 19796, 11085, 7, 87, 4613, 2124, 6624, 657, 11, 21136, 12195, 5317, 11...
2.622642
53
using Revise using ReversibleSeismic nx = 1000 ny = 1000 param = AcousticPropagatorParams(nx=nx, ny=ny, Rcoef=0.2, dx=20.0, dy=20.0, dt=0.05, nstep=100) c = 1000*ones(param.NX+2, param.NY+2) src = (param.NX÷2, param.NY÷2) srcv = Ricker(param, 100.0, 500.0) tu = solve(param, src, srcv, c) loss = sum(tu .^ 2) @ass...
[ 3500, 5416, 786, 198, 3500, 797, 37393, 4653, 1042, 291, 198, 198, 77, 87, 796, 8576, 198, 3281, 796, 8576, 198, 17143, 796, 4013, 21618, 24331, 363, 1352, 10044, 4105, 7, 77, 87, 28, 77, 87, 11, 299, 88, 28, 3281, 11, 198, 220, ...
1.892966
327
<gh_stars>0 #= JoiceTypeConstructorFunctions: - Julia version: 1.6 - Author: connorforsythe - Date: 2021-11-05 =# export ConstructModelInfo function checkModelInfo(Data::DataFrame, ChoiceColumn::Symbol, Parameters::Vector{Symbol}, ChoiceSetIDColumn::Symbol, RandomParameters::RandColsType=nothing, PanelIDColumn::Cols...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 28, 198, 41, 2942, 6030, 42316, 273, 24629, 2733, 25, 198, 12, 22300, 2196, 25, 352, 13, 21, 198, 12, 6434, 25, 369, 13099, 69, 669, 88, 1169, 198, 12, 7536, 25, 33448, 12, 1157, 12, 2713, 1...
2.941434
1,827
function BigFraction(arg0::BigInteger) return BigFraction((BigInteger,), arg0) end function BigFraction(arg0::BigInteger, arg1::BigInteger) return BigFraction((BigInteger, BigInteger), arg0, arg1) end function BigFraction(arg0::jdouble) return BigFraction((jdouble,), arg0) end function BigFraction(arg0::...
[ 8818, 4403, 37, 7861, 7, 853, 15, 3712, 12804, 46541, 8, 198, 220, 220, 220, 1441, 4403, 37, 7861, 19510, 12804, 46541, 11, 828, 1822, 15, 8, 198, 437, 198, 198, 8818, 4403, 37, 7861, 7, 853, 15, 3712, 12804, 46541, 11, 1822, 16, ...
2.605206
2,305
module QJuliaRegisters # Plain baseline registers const half2 = NTuple{2, VecElement{Float16}} const half4 = NTuple{4, VecElement{Float16}} # const float2 = NTuple{2, VecElement{Float32}} const float4 = NTuple{4, VecElement{Float32}} const float8 = NTuple{8, VecElement{Float32}} const float16 = NTuple{16, VecEle...
[ 21412, 1195, 16980, 544, 8081, 6223, 198, 198, 2, 28847, 14805, 28441, 198, 9979, 2063, 17, 796, 24563, 29291, 90, 17, 11, 38692, 20180, 90, 43879, 1433, 11709, 198, 9979, 2063, 19, 796, 24563, 29291, 90, 19, 11, 38692, 20180, 90, 438...
2.518229
1,536
<reponame>arnavgautam/Mimi.jl module TestParameterTypes using Mimi using Test import Mimi: external_params, external_param, TimestepMatrix, TimestepVector, ArrayModelParameter, ScalarModelParameter, FixedTimestep, build, import_params! # # Test that parameter type mismatches are caught # expr = :( @defco...
[ 27, 7856, 261, 480, 29, 1501, 615, 70, 2306, 321, 14, 44, 25236, 13, 20362, 198, 21412, 6208, 36301, 31431, 198, 198, 3500, 337, 25236, 198, 3500, 6208, 198, 198, 11748, 337, 25236, 25, 198, 220, 220, 220, 7097, 62, 37266, 11, 7097,...
2.494631
4,284
# ThomasFermi.jl # - Thomas Fermi Density Functional Theory # Marder is: "Condensed Mattery Physics", <NAME>, 2000. # Also very useful is <NAME>'s first DFT lecture, on the Thomas-Fermi method # http://www.home.uni-osnabrueck.de/apostnik/Lectures/DFT-1.pdf """ ThomasFermi_T(n) Thomas Fermi kinetic energy (T). F...
[ 2, 5658, 37, 7780, 72, 13, 20362, 198, 2, 220, 532, 5658, 376, 7780, 72, 360, 6377, 44224, 17003, 198, 198, 2, 337, 446, 263, 318, 25, 366, 25559, 15385, 337, 16296, 23123, 1600, 1279, 20608, 22330, 4751, 13, 220, 198, 198, 2, 441...
2.234405
2,116
using LowRankIntegrators, SparseArrays @testset "Burgers equation" begin n = 1000 # spatial discretization l = π # length of spatial domain Δx = l/n # step size x_range = Δx/2:Δx:l-Δx/2 # uniform grid # boundary conditions left(i) = i > 1 ? i - 1 : n right(i) = i < n ? i + 1 : 1 # di...
[ 3500, 7754, 27520, 34500, 18942, 11, 1338, 17208, 3163, 20477, 198, 198, 31, 9288, 2617, 366, 33, 3686, 364, 16022, 1, 2221, 198, 220, 220, 220, 299, 796, 8576, 1303, 21739, 1221, 1186, 1634, 628, 220, 220, 220, 300, 796, 18074, 222, ...
1.975713
947
@defcomp climatedynamics begin # Total radiative forcing radforc = Parameter(index=[time]) # Average global temperature temp = Variable(index=[time]) # lifetempconst lifetempconst = Parameter() # lifetemplin lifetemplin = Parameter() # lifetempqd lifetempqd = Parameter() ...
[ 171, 119, 123, 31, 4299, 5589, 5424, 515, 4989, 873, 2221, 198, 220, 220, 220, 1303, 7472, 19772, 876, 10833, 198, 220, 220, 220, 2511, 1640, 66, 796, 25139, 2357, 7, 9630, 41888, 2435, 12962, 628, 220, 220, 220, 1303, 13475, 3298, ...
2.15103
437
<filename>src/entities/seekerbarrier.jl module SeekerBarrier using ..Ahorn, Maple const placements = Ahorn.PlacementDict( "Seeker Barrier" => Ahorn.EntityPlacement( Maple.SeekerBarrier, "rectangle" ), ) Ahorn.minimumSize(entity::Maple.SeekerBarrier) = 8, 8 Ahorn.resizable(entity::Maple.Seeker...
[ 27, 34345, 29, 10677, 14, 298, 871, 14, 325, 28233, 5657, 5277, 13, 20362, 198, 21412, 1001, 28233, 10374, 5277, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, ...
2.429752
363
<reponame>richardreeve/Diversity.jl<gh_stars>10-100 using DataFrames using LinearAlgebra """ UniqueTypes A subtype of AbstractTypes where all individuals are completely distinct. This type is the simplest AbstractTypes subtype, which identifies all individuals as unique and completely distinct from each other. "...
[ 27, 7856, 261, 480, 29, 7527, 446, 631, 303, 14, 35, 1608, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 6060, 35439, 198, 3500, 44800, 2348, 29230, 198, 198, 37811, 198, 220, 220, 220, 30015, 31431, 198, 198, 32, 8...
2.617894
2,023
<filename>docs/make.jl using BRIKHEAD using Documenter makedocs(; modules=[BRIKHEAD], authors="<NAME> <<EMAIL>> and contributors", repo="https://github.com/notZaki/BRIKHEAD.jl/blob/{commit}{path}#L{line}", sitename="BRIKHEAD.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") =...
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 347, 7112, 42, 37682, 198, 3500, 16854, 263, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 33, 7112, 42, 37682, 4357, 198, 220, 220, 220, 7035, 2625, 2...
2.13253
249
<gh_stars>0 using IterativeSolvers using Base.Test @testset "SVD Lanczos" begin srand(1234567) #Thick restart methods @testset "Thick restart with method=$method" for method in (:ritz, :harmonic) for T in (Float32, Float64) @testset "Diagonal Matrix{$T}" begin n = 30 ns = 5 ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 40806, 876, 36949, 690, 198, 3500, 7308, 13, 14402, 198, 198, 31, 9288, 2617, 366, 50, 8898, 21534, 37925, 1, 2221, 198, 198, 82, 25192, 7, 10163, 2231, 3134, 8, 198, 198, 2, 817, 624, 15765,...
1.681579
1,520
<filename>src/problems/127.word-ladder.jl # --- # title: 127. Word Ladder # id: problem127 # author: AquaIndigo # date: 2020-11-07 # difficulty: Medium # categories: Breadth-first Search # link: <https://leetcode.com/problems/word-ladder/description/> # hidden: true # --- # # Given two words ( _beginWord_ and _endWord...
[ 27, 34345, 29, 10677, 14, 1676, 22143, 14, 16799, 13, 4775, 12, 9435, 1082, 13, 20362, 198, 2, 11420, 198, 2, 3670, 25, 18112, 13, 9678, 12862, 1082, 198, 2, 4686, 25, 1917, 16799, 198, 2, 1772, 25, 24838, 5497, 14031, 198, 2, 312...
2.013825
1,736
if basename(pwd()) == "aoc" cd("2019/6") end struct Planet name parent children end Planet(name) = Planet(name, nothing, Planet[]) function Base.getindex(planet::Planet, name::AbstractString) if planet.name == name planet else for child in planet.children result = c...
[ 361, 1615, 12453, 7, 79, 16993, 28955, 6624, 366, 64, 420, 1, 198, 220, 220, 220, 22927, 7203, 23344, 14, 21, 4943, 198, 437, 198, 198, 7249, 11397, 198, 220, 220, 220, 1438, 198, 220, 220, 220, 2560, 198, 220, 220, 220, 1751, 198...
2.491779
669
# Core types and definitions if VERSION < v"0.5.0-dev" macro pure(ex) esc(ex) end else using Base: @pure end const Symbols = Tuple{Symbol,Vararg{Symbol}} @doc """ Type-stable axis-specific indexing and identification with a parametric type. ### Type parameters ```julia immutable Axis{name,T} ``...
[ 2, 7231, 3858, 290, 17336, 198, 198, 361, 44156, 2849, 1279, 410, 1, 15, 13, 20, 13, 15, 12, 7959, 1, 198, 220, 220, 220, 15021, 5899, 7, 1069, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3671, 7, 1069, 8, 198, 220, 220, 220, ...
2.475142
9,132
<filename>test/runtests.jl # This file is a part of BAT.jl, licensed under the MIT License (MIT). using Test Test.@testset "Package BAT" begin include("utils/test_utils.jl") include("rngs/test_rngs.jl") include("distributions/test_distributions.jl") include("parameters/test_parameters.jl") include...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 2, 770, 2393, 318, 257, 636, 286, 37421, 13, 20362, 11, 11971, 739, 262, 17168, 13789, 357, 36393, 737, 198, 198, 3500, 6208, 198, 198, 14402, 13, 31, 9288, 2617, 366, 27813, ...
2.598985
197
<reponame>jmmshn/LeetCode.jl<filename>src/problems/23.merge-k-sorted-lists.jl # --- # title: 23. Merge k Sorted Lists # id: problem23 # author: Indigo # date: 2021-04-14 # difficulty: Hard # categories: Linked List, Divide and Conquer, Heap # link: <https://leetcode.com/problems/merge-k-sorted-lists/description/> # hid...
[ 27, 7856, 261, 480, 29, 73, 76, 907, 21116, 14, 3123, 316, 10669, 13, 20362, 27, 34345, 29, 10677, 14, 1676, 22143, 14, 1954, 13, 647, 469, 12, 74, 12, 82, 9741, 12, 20713, 13, 20362, 198, 2, 11420, 198, 2, 3670, 25, 2242, 13, ...
2.033105
876
using Plots using FFTW tan_taylor(x) = x+( x^3/3 )+( x^5*2/15.0 )+( x^7*17/315.0 )+( x^9*62/2835.0 )+( x^11*1382/155925.0 )+( x^13*21844/6081075.0 )+( x^15*929569/638512875.0 ); x = LinRange(-π/2+0.1, π/2-0.1, 1001); tanx_taylor = tan_taylor.(x); tanx_native = tan.(x); delta = tanx_native-tanx_taylor # Time domain...
[ 3500, 1345, 1747, 198, 3500, 376, 9792, 54, 198, 198, 38006, 62, 83, 7167, 7, 87, 8, 796, 2124, 33747, 2124, 61, 18, 14, 18, 1267, 33747, 2124, 61, 20, 9, 17, 14, 1314, 13, 15, 1267, 33747, 2124, 61, 22, 9, 1558, 14, 27936, 13...
1.965385
260
module Separators using Genie, Stipple, StippleUI, StippleUI.API import Genie.Renderer.Html: HTMLString, normal_element, template export separator function __init__() Genie.Renderer.Html.register_normal_element("q__separator", context = Genie.Renderer.Html) end function separator(args...; wrap::Function = Stipple...
[ 21412, 8621, 283, 2024, 198, 198, 3500, 49405, 11, 520, 18793, 11, 520, 18793, 10080, 11, 520, 18793, 10080, 13, 17614, 198, 11748, 49405, 13, 49, 437, 11882, 13, 39, 20369, 25, 11532, 10100, 11, 3487, 62, 30854, 11, 11055, 198, 198, ...
2.824675
154
<gh_stars>0 module PostgreSQLLoader using Octo.Repo: ExecuteResult # https://github.com/invenia/LibPQ.jl using LibPQ # v0.9.1 using .LibPQ.Tables const current = Dict{Symbol, Any}( :conn => nothing, ) current_conn() = current[:conn] # db_connect function db_connect(; kwargs...) if !isempty(kwargs) ...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 2947, 16694, 50, 48, 3069, 1170, 263, 198, 198, 3500, 2556, 78, 13, 6207, 78, 25, 8393, 1133, 23004, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 259, 574, 544, 14, 25835, 47, 48, 13, 2036...
2.372404
674
<filename>src/clibrary.jl struct Clibrary handle::Ptr{Cvoid} Clibrary(libName::Union{AbstractString, Nothing} = nothing, flags = Libdl.RTLD_LAZY | Libdl.RTLD_DEEPBIND | Libdl.RTLD_LOCAL) = new(Libdl.dlopen(libName === nothing ? _NullCString() : libName, flags)) end Base.close(lib::Clibrary) = Libdl.dlclose(lib.h...
[ 27, 34345, 29, 10677, 14, 565, 4115, 13, 20362, 628, 198, 7249, 1012, 4115, 198, 197, 28144, 3712, 46745, 90, 34, 19382, 92, 198, 197, 198, 197, 2601, 4115, 7, 8019, 5376, 3712, 38176, 90, 23839, 10100, 11, 10528, 92, 796, 2147, 11,...
2.865
200
""" LinearRegression() Classic regression model. This struct has no parameter. If you want to use polynomial model, use `Regression.make_design_matrix()`. see also: [`make_design_matrix`](@ref) # Example ```jldoctest regression julia> x = [ 16.862463771320925 68.10823385851712 15.382965696961577 65.431348...
[ 37811, 198, 220, 220, 220, 44800, 8081, 2234, 3419, 198, 39914, 20683, 2746, 13, 770, 2878, 468, 645, 11507, 13, 198, 1532, 345, 765, 284, 779, 745, 6213, 49070, 2746, 11, 779, 4600, 8081, 2234, 13, 15883, 62, 26124, 62, 6759, 8609, ...
2.277876
1,130
<reponame>MillironX/beefblup # beefblup # Julia package for performing single-variate BLUP to find beef cattle # breeding values # (C) 2021 <NAME> # Licensed under BSD-3-Clause License # cSpell:includeRegExp #.* # cSpell:includeRegExp ("""|''')[^\1]*\1 module BeefBLUP # Import the required packages using CSV using Da...
[ 27, 7856, 261, 480, 29, 22603, 1934, 55, 14, 1350, 891, 2436, 929, 198, 2, 12023, 2436, 929, 198, 2, 22300, 5301, 329, 9489, 2060, 12, 25641, 378, 9878, 8577, 284, 1064, 12023, 17025, 198, 2, 18954, 3815, 198, 2, 357, 34, 8, 33448...
2.434469
3,609
<gh_stars>1-10 """ Execution state that encapsulates synchronization primitives and resources bound to a command submission on the GPU. Resources bound to the related execution can be either freed or released (dereferenced) once the execution completes. The execution is assumed to be completed when the execution state...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 23002, 1009, 1181, 326, 32652, 15968, 42133, 2684, 20288, 290, 4133, 198, 7784, 284, 257, 3141, 14498, 319, 262, 11362, 13, 198, 198, 33236, 5421, 284, 262, 3519, 9706, 460, 307, ...
2.738017
1,523
function setupCommBuffers!(domain::Domain, edgeNodes::Int) function cache_align_real(n::Int64) n = Int32(n) (n + CACHE_COHERENCE_PAD_REAL%Int32 - one(Int32)) & ~(CACHE_COHERENCE_PAD_REAL%Int32 - one(Int32)) end @unpack_Domain domain # allocate a buffer large enough for nodal ghost data ...
[ 8818, 9058, 6935, 36474, 364, 0, 7, 27830, 3712, 43961, 11, 5743, 45, 4147, 3712, 5317, 8, 198, 220, 220, 220, 2163, 12940, 62, 31494, 62, 5305, 7, 77, 3712, 5317, 2414, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 2558, ...
2.11413
1,472
using ParallelAccelerator #ParallelAccelerator.ParallelIR.set_debug_level(3) @acc function find_chg(k,m,W,Wp) W_tmp = [abs(W[i,j] - Wp[i,j]) for i in 1:m, j in 1:k] s = [sum(W_tmp[:,j]) for j in 1:k] chg = maximum(s) end function main(m::Int, k::Int) W = Array{Float64}(m, k) Wp = Array{Float64}(m, k...
[ 3500, 42945, 12832, 7015, 1352, 198, 198, 2, 10044, 29363, 12832, 7015, 1352, 13, 10044, 29363, 4663, 13, 2617, 62, 24442, 62, 5715, 7, 18, 8, 198, 198, 31, 4134, 2163, 1064, 62, 354, 70, 7, 74, 11, 76, 11, 54, 11, 54, 79, 8, ...
1.850427
234
using Iconv using Test @test iconv("笨熊", "UTF-8", "GBK") == togbk("笨熊") == g"笨熊" @test iconv(g"笨熊", "GBK", "UTF-8") == toutf8(g"笨熊") == b"笨熊"
[ 3500, 26544, 85, 198, 3500, 6208, 198, 198, 31, 9288, 7196, 85, 7203, 163, 105, 101, 163, 228, 232, 1600, 366, 48504, 12, 23, 1600, 366, 4579, 42, 4943, 6624, 284, 22296, 74, 7203, 163, 105, 101, 163, 228, 232, 4943, 6624, 308, 1,...
1.42
100
<gh_stars>1-10 module GHWT_tf_1d include("utils.jl") using ..GraphSignal, ..GraphPartition, ..BasisSpecification, LinearAlgebra include("common.jl") export ghwt_tf_bestbasis, eghwt_bestbasis """ coeffdict = tf_init(dmatrix::Matrix{Float64},GP::GraphPart) Store the expanding coeffcients from matrix ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 24739, 39386, 62, 27110, 62, 16, 67, 201, 198, 201, 198, 17256, 7203, 26791, 13, 20362, 4943, 201, 198, 201, 198, 3500, 11485, 37065, 11712, 282, 11, 11485, 37065, 7841, 653, 11, 1148...
2.102084
5,613
using Test using StaticArrays using IntervalArithmetic # using Revise using HDGElasticity function allapprox(v1,v2) return all(v1 .≈ v2) end @test HDGElasticity.linear_map_slope(1.,2.,[1.,2.],[3.,4.]) ≈ [2.,2.] map = HDGElasticity.LineMap(0.,1.,[0.,0.],[1.,1.]) @test map.xiL ≈ 0.0 @test map.xiR ≈ 1.0 @test allap...
[ 3500, 6208, 198, 3500, 36125, 3163, 20477, 198, 3500, 4225, 2100, 3163, 29848, 198, 2, 1262, 5416, 786, 198, 3500, 5572, 8264, 75, 3477, 414, 198, 198, 8818, 477, 1324, 13907, 7, 85, 16, 11, 85, 17, 8, 198, 220, 220, 220, 1441, 47...
1.91922
1,795
<filename>src/direct/sparseblocks.jl<gh_stars>0 struct BlockIndices i1::UnitRange{Int} i2::UnitRange{Int} isdiag::Bool end # Remove isdiag field from comparison for dict Base.isequal(b1::BlockIndices, b2::BlockIndices) = b1.i1 == b2.i1 && b1.i2 == b2.i2 Base.hash(b::BlockIndices, h::UInt) = hash((b.i1, b....
[ 27, 34345, 29, 10677, 14, 12942, 14, 82, 29572, 27372, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 198, 7249, 9726, 5497, 1063, 198, 220, 220, 220, 1312, 16, 3712, 26453, 17257, 90, 5317, 92, 198, 220, 220, 220, 1312, 17, 3712, 26...
2.481544
4,172
using OffsetArrays using StaticArrays using DataStructures export pgbf, cgbf, contract, addbf!, PGBF, CGBF, build_basis,eri_fetcher, Shell, Basis export m2ao, shell_indices,nao """ PGBF(expn,xyz,I,J,K,norm) Create a primitive Gaussian basis function g(x,y,z) = norm * (x-x0)^I (y-y0)^J (z-z0)^K exp(-expn*r^2)...
[ 3500, 3242, 2617, 3163, 20477, 198, 3500, 36125, 3163, 20477, 198, 3500, 6060, 44909, 942, 198, 39344, 23241, 19881, 11, 269, 70, 19881, 11, 2775, 11, 751, 19881, 28265, 350, 4579, 37, 11, 327, 4579, 37, 11, 1382, 62, 12093, 271, 11, ...
1.779658
6,322
export Domain, SegmentDomain, tocanonical, fromcanonical, fromcanonicalD, ∂ export chebyshevpoints, fourierpoints, isambiguous, arclength export components, component, ncomponents # add indexing for all spaces, not just DirectSumSpace # mimicking scalar vs vector # prectype gives the precision, including for Vec...
[ 198, 198, 39344, 20021, 11, 1001, 5154, 43961, 11, 284, 49883, 605, 11, 422, 49883, 605, 11, 422, 49883, 605, 35, 11, 18872, 224, 198, 39344, 1125, 48209, 258, 85, 13033, 11, 46287, 5277, 13033, 11, 318, 4131, 29709, 11, 610, 565, 3...
2.579621
1,796
cluster = [1 1 1 1; 2 2 3 3; 4 4 5 5] X = Array(reshape(1:24, 2, 3, 4)) @testset "pool" begin @testset "GlobalPool" begin glb_cltr = [1 1 1 1; 1 1 1 1; 1 1 1 1] p = GlobalPool(:add, 3, 4) @test p(X) == sumpool(glb_cltr, X) end @testset "LocalPool" begin p = LocalPool(:add, ...
[ 565, 5819, 796, 685, 16, 352, 352, 352, 26, 362, 362, 513, 513, 26, 604, 604, 642, 642, 60, 198, 55, 796, 15690, 7, 3447, 1758, 7, 16, 25, 1731, 11, 362, 11, 513, 11, 604, 4008, 198, 198, 31, 9288, 2617, 366, 7742, 1, 2221, ...
1.737705
488
<reponame>lytemar/Julia-1.0-Programming-Cookbook blockvalid(x, v) = count(isequal(v), x) ≤ 1 function backtrack!(x) pos = findfirst(isequal(0), x) isa(pos, Nothing) && return true iloc = 3div(pos[1]-1, 3) .+ (1:3) jloc = 3div(pos[2]-1, 3) .+ (1:3) for k in 1:9 x[pos] = k blockvalid(...
[ 27, 7856, 261, 480, 29, 306, 11498, 283, 14, 16980, 544, 12, 16, 13, 15, 12, 15167, 2229, 12, 28937, 2070, 198, 9967, 12102, 7, 87, 11, 410, 8, 796, 954, 7, 786, 13255, 7, 85, 828, 2124, 8, 41305, 352, 198, 198, 8818, 736, 116...
2.002475
404
abstract type RegressionType end struct OLS robust::Bool function OLS(robust=true) new(robust) end end
[ 397, 8709, 2099, 3310, 2234, 6030, 886, 198, 198, 7249, 440, 6561, 198, 220, 220, 220, 12373, 3712, 33, 970, 628, 220, 220, 220, 2163, 440, 6561, 7, 22609, 436, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 7, 22609, ...
2.309091
55
geneCols = Dict{String,Symbol}( "aliases" => :GeneSymbolAlias, "symbol" => :OfficialGeneSymbol, "region" => :GeneRegion, "regionStart" => :GeneStart, "regionEnd" => :GeneEnd, "id" => :EnsemblGeneId, "version" => :EnsemblGeneVersion, "biotype" => :EnsemblGeneBiotype, "name" => :GeneName ); tr...
[ 198, 70, 1734, 5216, 82, 796, 360, 713, 90, 10100, 11, 13940, 23650, 92, 7, 198, 220, 220, 366, 7344, 1386, 1, 5218, 1058, 39358, 13940, 23650, 40489, 11, 198, 220, 220, 366, 1837, 23650, 1, 5218, 1058, 28529, 39358, 13940, 23650, 1...
2.120162
4,186
<gh_stars>10-100 using Documenter using MERAKit makedocs(sitename = "MERAKit.jl", modules = [MERAKit]) deploydocs(repo = "github.com/mhauru/MERAKit.jl.git")
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 16854, 263, 198, 3500, 34482, 10206, 270, 198, 198, 76, 4335, 420, 82, 7, 48937, 12453, 796, 366, 29296, 10206, 270, 13, 20362, 1600, 13103, 796, 685, 29296, 10206, 270, 12962, 198, ...
2.323529
68
<reponame>JuliaPackageMirrors/CoordinateTransformations.jl<filename>src/CoordinateTransformations.jl __precompile__() module CoordinateTransformations using StaticArrays using Rotations export RotMatrix, Quat, SpQuat, AngleAxis, RodriguesVec, RotX, RotY, RotZ, RotXY, RotYX, RotZX, RotXZ, RotYZ, RotZY, ...
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 7222, 45480, 41762, 602, 13, 20362, 27, 34345, 29, 10677, 14, 7222, 45480, 41762, 602, 13, 20362, 198, 834, 3866, 5589, 576, 834, 3419, 198, 198, 21412, 22819, 4559, 41762, 6...
3.057971
414
<reponame>matbesancon/Manopt.jl using Manifolds, Manopt, Test, ManifoldsBase using Random Random.seed!(42) # Test the additional manifold functions # @testset "Additional Manifold functions" begin @testset "mid point & reflect" begin M = Sphere(2) p = [1.0, 0.0, 0.0] q = [0.0, 1.0, 0.0] ...
[ 27, 7856, 261, 480, 29, 6759, 12636, 272, 1102, 14, 5124, 8738, 13, 20362, 198, 3500, 1869, 361, 10119, 11, 1869, 8738, 11, 6208, 11, 1869, 361, 10119, 14881, 198, 198, 3500, 14534, 198, 29531, 13, 28826, 0, 7, 3682, 8, 198, 2, 62...
1.702415
2,070
using Documenter push!(LOAD_PATH,"../src/") using BasesAndSamples makedocs( sitename = "BasesAndSamples.jl Documentation", format = Documenter.HTML(), modules = [BasesAndSamples] ) # Documenter can also automatically deploy documentation to gh-pages. # See "Hosting Documentation" and deploydocs() in the D...
[ 3500, 16854, 263, 198, 14689, 0, 7, 35613, 62, 34219, 553, 40720, 10677, 14, 4943, 198, 3500, 347, 1386, 1870, 50, 12629, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 1650, 12453, 796, 366, 33, 1386, 1870, 50, 12629, 13, 20...
2.954248
153
import GreyDecision.GreyNumbers: GreyNumber import GreyDecision.Utility: makeminmax import LinearAlgebra: det @testset "Transpose" begin x = [ GreyNumber(5.0) GreyNumber(3.0) GreyNumber(-2.0); GreyNumber(-8.0) GreyNumber(6.0) GreyNumber(1.0); GreyNumber(10.0) GreyNumber(7.0) GreyNumber(13....
[ 11748, 13980, 10707, 1166, 13, 49141, 49601, 25, 13980, 15057, 198, 11748, 13980, 10707, 1166, 13, 18274, 879, 25, 787, 1084, 9806, 198, 11748, 44800, 2348, 29230, 25, 1062, 628, 198, 31, 9288, 2617, 366, 8291, 3455, 1, 2221, 198, 220, ...
1.861702
940
<filename>benchmark/_archive/parameter_tuning.jl<gh_stars>1-10 include("../src/experiments/0_setup.jl") import DataFrames.DataFrame using DataFrames, CSV using FastGroupBy using Base.Threads K = 100 tries = vcat([Int(2^k-1) for k = 7:31], 3_000_000_000) for N in tries println(N) if N < 2_000_000 by = ...
[ 27, 34345, 29, 26968, 4102, 47835, 17474, 14, 17143, 2357, 62, 28286, 278, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 17256, 7203, 40720, 10677, 14, 23100, 6800, 14, 15, 62, 40406, 13, 20362, 4943, 198, 11748, 6060, 35439, ...
2.086672
1,373
using FedDCD include("./PrimalMethods.jl") include("./DualMethods.jl") # Softmax for mnist fileTrain = "data/mnist.scale" fileTest = "data/mnist.scale.t" λ = 1e-2 participationRate = 0.3 localLr = 1e-2 numRounds = 100 # - FedAvg μ = 0.0 RunFedAvgAndProx( fileTrain, fileTest, λ, μ, participationRat...
[ 3500, 10169, 35, 8610, 198, 17256, 7, 1911, 14, 23828, 282, 46202, 13, 20362, 4943, 198, 17256, 7, 1911, 14, 36248, 46202, 13, 20362, 4943, 198, 198, 2, 8297, 9806, 329, 285, 77, 396, 198, 7753, 44077, 796, 366, 7890, 14, 10295, 396...
1.887915
4,791
# # Recursive Fourier Propagation for BoostFractor # # V: 2019-08-06 # # <NAME> # export dancer, dance_intro, cheerleader """ Propagates the fields through the system * `amin`: Mimum (local) amplitude of a field, in order to be propagated * `nmax`: Maximum number of beam iteration steps, directly...
[ 2, 198, 2, 3311, 30753, 34296, 5277, 8772, 363, 341, 329, 19835, 37, 40450, 198, 2, 198, 2, 569, 25, 13130, 12, 2919, 12, 3312, 198, 2, 198, 2, 1279, 20608, 29, 198, 2, 198, 198, 39344, 38619, 11, 9280, 62, 600, 305, 11, 14042, ...
2.322375
7,361
<filename>0011/SCI/src/SCI.jl<gh_stars>1-10 """A scirntific module (calculate exp(x))""" module SCI abstract type AbstractProblem end struct Problem{T} <: AbstractProblem x::T end abstract type AbstractAlgorithm end struct Builtin <: AbstractAlgorithm end Base.@kwdef struct Taylor <: AbstractAlgorithm n::Int = 10 end...
[ 27, 34345, 29, 405, 1157, 14, 6173, 40, 14, 10677, 14, 6173, 40, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 32, 629, 343, 429, 811, 8265, 357, 9948, 3129, 378, 1033, 7, 87, 4008, 37811, 198, 21412, 6374, 40, 198...
2.632458
419
mutable struct Attribute name::Symbol value::String Attribute(name::Symbol) = new(name, "") end const NULL_ATTRIBUTE = Attribute(:NULL) mutable struct ChartType concreteName::String attributes::Vector{Attribute} ancestors::Vector{ChartType} ChartType(attributes::Vector{A}, ancestors::Vector{ChartType}=ChartType...
[ 76, 18187, 2878, 3460, 4163, 198, 197, 3672, 3712, 13940, 23650, 198, 197, 8367, 3712, 10100, 198, 197, 33682, 7, 3672, 3712, 13940, 23650, 8, 796, 649, 7, 3672, 11, 366, 4943, 198, 437, 198, 9979, 15697, 62, 1404, 5446, 9865, 37780, ...
2.539846
4,944
function _make_spectogram_gui() popupmenu_spect = Menu() popupmenu_spect_freq = MenuItem("Frequency Range") popupmenu_spect_win = MenuItem("Window Size") popupmenu_spect_overlap = MenuItem("Window Overlap") push!(popupmenu_spect,popupmenu_spect_freq) push!(popupmenu_spect,popupmenu_spect_win) ...
[ 198, 8818, 4808, 15883, 62, 4443, 21857, 62, 48317, 3419, 628, 220, 220, 220, 46207, 26272, 62, 4443, 796, 21860, 3419, 198, 220, 220, 220, 46207, 26272, 62, 4443, 62, 19503, 80, 796, 21860, 7449, 7203, 37, 28707, 13667, 4943, 198, 22...
1.949548
2,874
<reponame>CliMA/OceanModelComparison.jl<filename>unstable_bickley/periodic/Analysis.jl module Analysis using Oceananigans using JLD2 using Plots using Oceananigans.Grids using Oceananigans.Fields: offset_data import Oceananigans.Fields: Field Field(loc::Tuple, grid::AbstractGrid, raw_data::Array) = Field(loc, CPU(),...
[ 27, 7856, 261, 480, 29, 2601, 72, 5673, 14, 46607, 17633, 50249, 1653, 13, 20362, 27, 34345, 29, 403, 31284, 62, 65, 624, 1636, 14, 41007, 291, 14, 32750, 13, 20362, 198, 21412, 14691, 198, 198, 3500, 10692, 272, 34090, 198, 3500, 4...
2.555556
756
using BenchmarkTools BenchmarkTools.DEFAULT_PARAMETERS.samples = 100 function compute(file::String)::Int chars = Dict(Char(Int('A') + i) => i + 1 for i ∈ 0:25) return sum(i * chars[c] for (i, name) ∈ enumerate(sort(split(replace(file, "\"" => ""), ","))) for c ∈ name) end file = read("problems/0022/p022_names...
[ 3500, 25187, 4102, 33637, 198, 44199, 4102, 33637, 13, 7206, 38865, 62, 27082, 2390, 2767, 4877, 13, 82, 12629, 796, 1802, 198, 198, 8818, 24061, 7, 7753, 3712, 10100, 2599, 25, 5317, 198, 220, 220, 220, 34534, 796, 360, 713, 7, 12441...
2.533784
148
""" data_harvest(all=true, paper=false) Makes all the figures from the paper for the notebook. This function calls PlotData to make the figures one at a time. """ function data_harvest(all=true, paper=false) cvals = [.5, .99, 1] itvals = [10, 10, 30] level=5 for ic=1:3 figure(ic) PlotData(cvals[ic]; ptitle=~pap...
[ 37811, 198, 7890, 62, 9869, 4223, 7, 439, 28, 7942, 11, 3348, 28, 9562, 8, 198, 44, 1124, 477, 262, 5538, 422, 262, 3348, 329, 262, 20922, 13, 198, 1212, 2163, 3848, 28114, 6601, 284, 787, 262, 5538, 530, 379, 257, 640, 13, 198, ...
2.188984
1,053
export ft_getstatus function ft_getstatus(ft_handle::Culong) amountinrxqueue = Ref{Cuint}() amountintxqueue = Ref{Cuint}() eventstatus = Ref{Cuint}() ft_status = ccall((:FT_GetStatus, d2xx), Cuint, (Culong,Ref{Cuint},Ref{Cuint},Ref{Cuint}), ft_hand...
[ 39344, 10117, 62, 1136, 13376, 198, 198, 8818, 10117, 62, 1136, 13376, 7, 701, 62, 28144, 3712, 34, 377, 506, 8, 198, 220, 2033, 259, 40914, 36560, 796, 6524, 90, 34, 28611, 92, 3419, 198, 220, 2033, 600, 87, 36560, 796, 6524, 90, ...
2.154167
240
<reponame>BioTurboNick/LocalizationMicroscopy.jl<filename>src/plotlocalizations.jl """ localizationsplot(localizations::Vector{Localizations}, color::Symbol) localizationsplot(localizations::Vector{Vector{Localization}}, colors::Vector{Symbol}) Plot localizations by spatial coordinates. Assumes that the y-coor...
[ 27, 7856, 261, 480, 29, 42787, 17483, 2127, 23609, 14, 14565, 1634, 13031, 1416, 11081, 13, 20362, 27, 34345, 29, 10677, 14, 29487, 12001, 4582, 13, 20362, 198, 37811, 198, 220, 220, 220, 1957, 4582, 29487, 7, 12001, 4582, 3712, 38469, ...
2.977876
452
<reponame>JuliaGPU/VulkanAbstraction include("prewrap/bitmasks.jl") include("prewrap/types.jl") include("prewrap/handles.jl") include("prewrap/pointers.jl") include("prewrap/conversions.jl") include("prewrap/errors.jl") include("prewrap/spirv.jl")
[ 27, 7856, 261, 480, 29, 16980, 544, 33346, 14, 53, 31263, 4826, 301, 7861, 198, 17256, 7203, 79, 1809, 2416, 14, 2545, 5356, 591, 13, 20362, 4943, 198, 17256, 7203, 79, 1809, 2416, 14, 19199, 13, 20362, 4943, 198, 17256, 7203, 79, 1...
2.556701
97
<filename>src/streamers.jl struct StreamerInfo streamer dependencies end struct Streamers tkey::TKey refs::Dict{Int32, Any} elements::Vector{StreamerInfo} end Base.length(s::Streamers) = length(s.elements) function Base.show(io::IO, s::Streamers) for streamer_info in s.elements printl...
[ 27, 34345, 29, 10677, 14, 5532, 364, 13, 20362, 198, 7249, 13860, 263, 12360, 198, 220, 220, 220, 4269, 263, 198, 220, 220, 220, 20086, 198, 437, 198, 198, 7249, 13860, 364, 198, 220, 220, 220, 256, 2539, 3712, 51, 9218, 198, 220, ...
2.331488
7,768
<reponame>adolgert/comorbid.jl<gh_stars>0 using comorbid using Test @testset "comorbid.jl" begin @test isapprox(exact_burden_term([.1], [.8], [true]), [.08]) end
[ 27, 7856, 261, 480, 29, 324, 349, 70, 861, 14, 785, 273, 14065, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 401, 273, 14065, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 785, 273, 14065, 13, 20362, 1, 2221, 198, 220, 22...
2.168831
77
module mcrosssection1 using FinEtools using FinEtoolsFlexBeams.CrossSectionModule using Test function test() cs = CrossSectionModule.CrossSectionCircle(s -> 5.9910, s -> [0.0, 0.0, 1.0]) par = cs.parameters(0.0) for (c, r) in zip((par.A, par.J, par.I1, par.I2, par.I3), (112.75829799164978, 2023.564982469215...
[ 21412, 285, 19692, 5458, 16, 198, 3500, 4463, 36, 31391, 198, 3500, 4463, 36, 31391, 37, 2588, 3856, 4105, 13, 21544, 16375, 26796, 198, 3500, 6208, 198, 8818, 1332, 3419, 198, 220, 220, 220, 50115, 796, 6372, 16375, 26796, 13, 21544, ...
2.238095
861
<gh_stars>1-10 # ------------------------------------- # # Helper methods used in generated code # # ------------------------------------- # # inlined function to extract a single variable. If `x` is a vector then # extract a single element. If `x` is a Matrix then extract one column of the # matrix @inline _unpack_va...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 20368, 30934, 1303, 198, 2, 5053, 525, 5050, 973, 287, 7560, 2438, 1303, 198, 2, 20368, 30934, 1303, 198, 198, 2, 287, 10837, 2163, 284, 7925, 257, 2060, 7885, 13, 1002, 4600, 87, 63, ...
2.269814
4,088
#= # 5. Viscous flow about a moving body In this notebook we will demonstrate the simulation of a moving body. It is straightforward to set up a moving body. The main caveat is that the simulation is slower, because the integrator must update the operators continuously throughout the simulation. We will demonstrate th...
[ 2, 28, 198, 2, 642, 13, 569, 2304, 516, 5202, 546, 257, 3867, 1767, 198, 818, 428, 20922, 356, 481, 10176, 262, 18640, 286, 257, 3867, 1767, 13, 632, 318, 15836, 198, 1462, 900, 510, 257, 3867, 1767, 13, 383, 1388, 36531, 318, 326...
2.927759
1,495
<reponame>ettersi/TreeTensors.jl module TreeTensors importall Base using Tensors include("Trees.jl") include("ModeTrees.jl") # Tree tensor networks export TreeTensor typealias TensorDict{T} Dict{Tree,Tensor{T}} immutable TreeTensor{T} mtree::AbstractModeTree tensors::TensorDict{T} end (::Type{TreeTensor{T}}...
[ 27, 7856, 261, 480, 29, 316, 1010, 72, 14, 27660, 51, 641, 669, 13, 20362, 198, 21412, 12200, 51, 641, 669, 198, 198, 11748, 439, 7308, 198, 3500, 40280, 669, 198, 17256, 7203, 51, 6037, 13, 20362, 4943, 198, 17256, 7203, 19076, 51,...
1.924831
7,410
<gh_stars>1-10 function simple_lp(bridged) MOI.empty!(bridged) @test MOI.is_empty(bridged) # add 10 variables - only diagonal is relevant X = MOI.add_variables(bridged, 2) # add sdp constraints - only ensuring positivenesse of the diagonal vov = MOI.VectorOfVariables(X) c1 = MOI.add_cons...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 2829, 62, 34431, 7, 10236, 2004, 8, 628, 220, 220, 220, 13070, 40, 13, 28920, 0, 7, 10236, 2004, 8, 198, 220, 220, 220, 2488, 9288, 13070, 40, 13, 271, 62, 28920, 7, 10236, 2004, ...
2.02681
6,714
#= # MNIST We begin by importing the required packages. We load MNIST via the MLDatasets.jl package. =# import Makie import CairoMakie import MLDatasets import Flux import RestrictedBoltzmannMachines as RBMs import ConvolutionalRBMs as ConvRBMs using Statistics: mean, var, std using ValueHistories: MVHistory using Ra...
[ 2, 28, 198, 2, 29060, 8808, 198, 198, 1135, 2221, 416, 33332, 262, 2672, 10392, 13, 198, 1135, 3440, 29060, 8808, 2884, 262, 10373, 27354, 292, 1039, 13, 20362, 5301, 13, 198, 46249, 198, 198, 11748, 15841, 494, 198, 11748, 23732, 44,...
2.389574
1,784
<reponame>JuliaML/LearnBase.jl """ Return the gradient of the learnable parameters w.r.t. some objective """ function grad end function grad! end """ Proximal operator of a function (https://en.wikipedia.org/wiki/Proximal_operator) """ function prox end function prox! end """ Anything that takes an input and performs...
[ 27, 7856, 261, 480, 29, 16980, 544, 5805, 14, 20238, 14881, 13, 20362, 198, 37811, 198, 13615, 262, 31312, 286, 262, 2193, 540, 10007, 266, 13, 81, 13, 83, 13, 617, 9432, 198, 37811, 198, 8818, 3915, 886, 198, 8818, 3915, 0, 886, ...
2.843212
1,569
# should be your environment and have for nothing to do whith the speed_test cd("/Users/frank/.julia/dev/TypeDBClient_Speed") using Pkg Pkg.activate(".") using TypeDBClient using TypeDBClient: CoreSession, CoreClient using UUIDs g = TypeDBClient client = g.CoreClient("127.0.0.1",1729) Optional{T} = Union{Nothing,T} ...
[ 2, 815, 307, 534, 2858, 290, 423, 329, 2147, 284, 466, 348, 342, 262, 2866, 62, 9288, 198, 10210, 7203, 14, 14490, 14, 8310, 962, 11757, 73, 43640, 14, 7959, 14, 6030, 11012, 11792, 62, 22785, 4943, 198, 3500, 350, 10025, 198, 47, ...
2.68259
942
abstract type AbstractLearningUpdate end function update!(model, lu::T, opt, s_t::Array{Array{AF, 1}, 1}, a_t::Array{<:Integer, 1}, s_tp1::Array{Array{AF, 1}, 1}, r::Array{AF, 1}, terminal, ...
[ 198, 397, 8709, 2099, 27741, 41730, 10260, 886, 628, 198, 8818, 4296, 0, 7, 19849, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 84, 3712, 51, 11, 198, 220, 220, 220, 220, 220, 220...
1.932168
2,860
<filename>src/features.jl<gh_stars>1-10 function asymmetry(df, id, x, y) result = DataFrame(TrackID = Int[], len = Int[], asymmetry = Float64[]) @inbounds for n = minimum(df[!, id]):maximum(df[!, id]) m = extract(df, n, id, [x, y]) T = Matrix{Float64}(undef, 2, 2) mean_x = @views mean(m[...
[ 27, 34345, 29, 10677, 14, 40890, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 30372, 11973, 7, 7568, 11, 4686, 11, 2124, 11, 331, 8, 198, 220, 220, 220, 1255, 796, 6060, 19778, 7, 24802, 2389, 796, 2558, 58, 4357, ...
1.692609
1,786
<filename>src/StringAndArray/CombinationsOf2Arrays.jl """ generate_array( array_1::Array{Int64}, array_2::Array{Int64}, array_merged::Array{Int64}, i::Int64, j::Int64, k::Int64, l::Int64, size::Int64, flag::Bool, result::Array{Any,1} ...
[ 27, 34345, 29, 10677, 14, 10100, 1870, 19182, 14, 20575, 7352, 5189, 17, 3163, 20477, 13, 20362, 198, 37811, 198, 220, 220, 220, 7716, 62, 18747, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7177, 62, 16, 3712, 19182, 90, 5317, 2414, ...
1.892399
2,026
include("eggify.jl") using Metatheory.Library using Metatheory.EGraphs.Schedulers mult_t = commutative_monoid(:(*), 1) plus_t = commutative_monoid(:(+), 0) minus_t = @theory begin a - a => 0 a + (-b) => a - b end mulplus_t = @theory begin 0 * a => 0 a * 0 => 0 a * (b + c) == ((a * b) + (a * c)) a + (b...
[ 17256, 7203, 33856, 1958, 13, 20362, 4943, 198, 3500, 3395, 26221, 652, 13, 23377, 198, 3500, 3395, 26221, 652, 13, 7156, 1470, 82, 13, 50, 1740, 377, 364, 198, 198, 16680, 62, 83, 796, 725, 315, 876, 62, 2144, 1868, 7, 37498, 9, ...
2.235653
819
<filename>docs/make.jl using Documenter, StingerGraphs makedocs() deploydocs( julia = "nightly", repo = "github.com/stingergraph/StingerGraphs.jl.git" )
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 16854, 263, 11, 520, 3889, 37065, 82, 198, 198, 76, 4335, 420, 82, 3419, 198, 198, 2934, 1420, 31628, 7, 198, 220, 220, 220, 474, 43640, 796, 366, 3847, 306, 1600, 198, 220, 2...
2.362319
69
using RCall function load_R_library(libname) reval("library($libname)") end
[ 3500, 13987, 439, 198, 198, 8818, 3440, 62, 49, 62, 32016, 7, 8019, 3672, 8, 198, 220, 220, 220, 302, 2100, 7203, 32016, 16763, 8019, 3672, 8, 4943, 198, 437, 198 ]
2.612903
31
struct DBFGS{T1,T2,T3} <: QuasiNewton{T1} approx::T1 theta::T2 P::T3 end DBFGS(approx) = DBFGS(approx, 0.2, nothing) DBFGS(; inverse = true, theta = 0.2) = DBFGS(inverse ? Inverse() : Direct(), theta, nothing) hasprecon(::DBFGS{<:Any,<:Any,<:Nothing}) = NoPrecon() hasprecon(::DBFGS{<:Any,<:Any,<:Any}) = Has...
[ 7249, 20137, 37, 14313, 90, 51, 16, 11, 51, 17, 11, 51, 18, 92, 1279, 25, 2264, 17053, 3791, 1122, 90, 51, 16, 92, 198, 220, 220, 220, 5561, 3712, 51, 16, 198, 220, 220, 220, 262, 8326, 3712, 51, 17, 198, 220, 220, 220, 350, ...
1.850142
1,408
<reponame>rtwalker/StochasticPrograms.jl """ SynchronousExecution Functor object for using synchronous execution in a progressive-hedging algorithm (assuming multiple Julia cores are available). Create by supplying a [`Synchronous`](@ref) object through `execution` in the `ProgressiveHedgingSolver` factory functio...
[ 27, 7856, 261, 480, 29, 81, 4246, 20949, 14, 1273, 5374, 3477, 15167, 82, 13, 20362, 198, 37811, 198, 220, 220, 220, 16065, 11413, 516, 23002, 1009, 198, 198, 24629, 2715, 2134, 329, 1262, 18305, 516, 9706, 287, 257, 10393, 12, 704, ...
1.986287
2,917
<reponame>hervasa2/SolidStateDetectors.jl function simulate_waveforms( mcevents::TypedTables.Table, sim::Simulation{T}, output_dir::AbstractString, output_base_name::AbstractString = "generated_waveforms"; chunk_n_physics_events::In...
[ 27, 7856, 261, 480, 29, 372, 11017, 64, 17, 14, 46933, 9012, 47504, 669, 13, 20362, 198, 8818, 29308, 62, 19204, 23914, 7, 285, 344, 85, 658, 3712, 31467, 276, 51, 2977, 13, 10962, 11, 985, 3712, 8890, 1741, 90, 51, 5512, 198, 220...
1.951299
924
<filename>src/CoolPkg.jl module CoolPkg export add2 """ add2(a, b) Adds two numbers together... * `a`: A number * `b`: Another number """ add2(a, b) = a + b end
[ 27, 34345, 29, 10677, 14, 34530, 47, 10025, 13, 20362, 198, 21412, 15226, 47, 10025, 198, 198, 39344, 751, 17, 198, 198, 37811, 198, 220, 220, 220, 751, 17, 7, 64, 11, 275, 8, 220, 220, 220, 220, 198, 198, 46245, 734, 3146, 1978, ...
2.175
80