content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<gh_stars>1-10 module Yota export grad, update!, @primitive, @grad include("core.jl") version() = v"0.1.0-2" end
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 575, 4265, 198, 198, 39344, 3915, 11, 4296, 28265, 2488, 19795, 1800, 11, 2488, 9744, 198, 198, 17256, 7203, 7295, 13, 20362, 4943, 198, 198, 9641, 3419, 796, 410, 1, 15, 13, 16, 13...
2.25
52
<gh_stars>0 # TODO overload print/show/display function to not display model and data struct jlModel m::Ptr{mjModel} qpos0::Array{mjtNum} qpos_spring::Array{mjtNum} body_parentid::Array{Cint} body_rootid::Array{Cint} body_weldid::Array{Cint} body_mocapid::Array{Cint} body_jntnum::Array{Cint} ...
[ 27, 456, 62, 30783, 29, 15, 198, 198, 2, 16926, 46, 31754, 3601, 14, 12860, 14, 13812, 2163, 284, 407, 3359, 2746, 290, 1366, 198, 198, 7249, 474, 75, 17633, 198, 220, 220, 285, 3712, 46745, 90, 76, 73, 17633, 92, 628, 220, 220, ...
1.634088
16,023
<filename>backend/anime_data/snapshots_25835.jl {"score": 8.4, "timestamp": 1581707228.0, "score_count": 94509} {"score": 8.4, "timestamp": 1579325618.0, "score_count": 93607} {"score": 8.4, "timestamp": 1578234501.0, "score_count": 93336} {"score": 8.4, "timestamp": 1574434062.0, "score_count": 91877} {"score": 8.41, ...
[ 27, 34345, 29, 1891, 437, 14, 272, 524, 62, 7890, 14, 45380, 20910, 62, 25600, 2327, 13, 20362, 198, 4895, 26675, 1298, 807, 13, 19, 11, 366, 16514, 27823, 1298, 24063, 1558, 2998, 23815, 13, 15, 11, 366, 26675, 62, 9127, 1298, 1004...
2.330349
21,892
__precompile__() module ReinforcementLearning using POMDPs using POMDPToolbox using Discretizers import POMDPs: isterminal, discount import POMDPs: action, actions, action_index, n_actions import POMDPs: states, state_index, n_states export isterminal, actions, step!, reset!, DiscretizedEnviron...
[ 834, 3866, 5589, 576, 834, 3419, 198, 21412, 22299, 13442, 41730, 198, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 25391, 3524, 198, 3500, 8444, 1186, 11341, 198, 198, 11748, 350, 2662, 6322, 82, 25, 318, 23705, 282, 1...
2.846715
137
function futuresdata(; inputpath::String = PARAM[:inputpath], futuresfile::String = PARAM[:capacity][:futuresfile], futuresfileext::String = PARAM[:capacity][:futuresfileext], ) futures = CSV.read("$inputpath\\$futuresfile.$futuresfileext") |> DataFrame select!(futures, PARAM[:capacity][:futurescolumns])...
[ 198, 198, 8818, 25650, 7890, 7, 26, 198, 220, 5128, 6978, 3712, 10100, 796, 29463, 2390, 58, 25, 15414, 6978, 4357, 198, 220, 25650, 7753, 3712, 10100, 796, 29463, 2390, 58, 25, 42404, 7131, 25, 69, 315, 942, 7753, 4357, 198, 220, 2...
2.870149
670
<reponame>stevengj/NodesAndModes.jl<gh_stars>10-100 function basis(elem::Quad, N, r, s) Np = convert(Int, (N + 1) * (N + 1)) sk = 1 V, Vr, Vs = ntuple(x->zeros(length(r), Np), 3) for j = 0:N P_j = jacobiP(s, 0, 0, j) for i = 0:N P_i = jacobiP(r, 0, 0, i) V[:, sk]...
[ 27, 7856, 261, 480, 29, 4169, 574, 70, 73, 14, 45, 4147, 1870, 44, 4147, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 198, 8818, 4308, 7, 68, 10671, 3712, 4507, 324, 11, 399, 11, 374, 11, 264, 8, 198, 220, 220, 220, ...
1.669659
557
# # This file is a part of MolecularGraph.jl # Licensed under the MIT License http://opensource.org/licenses/MIT # export PlainHyperGraph, plainhypergraph struct PlainHyperGraph <: OrderedHyperGraph incidences::Vector{Set{Int}} edges::Vector{Set{Int}} cache::Dict{Symbol,Any} end """ plainhy...
[ 2, 198, 2, 770, 2393, 318, 257, 636, 286, 38275, 37065, 13, 20362, 198, 2, 49962, 739, 262, 17168, 13789, 2638, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 198, 2, 198, 198, 39344, 198, 220, 220, 220, 28847, 38197, 37065,...
2.516245
831
function levendist1(s::AbstractString, t::AbstractString) ls, lt = length(s), length(t) if ls > lt s, t = t, s ls, lt = lt, ls end dist = collect(0:ls) for (ind2, chr2) in enumerate(t) newdist = Vector{Int}(ls+1) newdist[1] = ind2 for (ind1, chr1) in enumerate...
[ 8818, 23145, 437, 396, 16, 7, 82, 3712, 23839, 10100, 11, 256, 3712, 23839, 10100, 8, 198, 220, 220, 220, 43979, 11, 300, 83, 796, 4129, 7, 82, 828, 4129, 7, 83, 8, 198, 220, 220, 220, 611, 43979, 1875, 300, 83, 198, 220, 220, ...
1.762918
329
<filename>test/runtests.jl # Workaround for libz loading confusion. @static if Sys.islinux() using ImageMagick end using GtkObservables, Gtk.ShortNames, IntervalSets, Graphics, Colors, TestImages, FileIO, FixedPointNumbers, RoundingIntegers, Dates, Cairo, IdentityRanges using Test include("tools.jl") ...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 2, 5521, 14145, 329, 9195, 89, 11046, 10802, 13, 198, 31, 12708, 611, 311, 893, 13, 271, 23289, 3419, 198, 220, 220, 220, 1262, 7412, 13436, 624, 198, 437, 198, 198, 3500, 4...
2.096426
9,458
using Whirl using Profile using ProfileView Profile.init(delay = 1e-2) stepper = build(sod_shock_tube_builder(number_of_particles = 1000)) function profiling(n) for _ = 1:n step!(stepper, 1e-4) end end @profview profiling(1) @profview profiling(10000)
[ 3500, 854, 1901, 198, 3500, 13118, 198, 3500, 13118, 7680, 198, 198, 37046, 13, 15003, 7, 40850, 796, 352, 68, 12, 17, 8, 198, 198, 4169, 2848, 796, 1382, 7, 82, 375, 62, 39563, 62, 29302, 62, 38272, 7, 17618, 62, 1659, 62, 3911, ...
2.552381
105
# Weighted row-replication function replicate{T<:Real}(data::Matrix{T}, w::Vector{T}) num_samples, num_signals = size(data) length(w) == num_samples || throw(DimensionMismatch("Inconsistent array lengths.")) replicated = zeros(int(sum(w)), num_signals) j = 1 for i = 1:num_samples for...
[ 2, 14331, 276, 5752, 12, 35666, 3299, 198, 8818, 24340, 90, 51, 27, 25, 15633, 92, 7, 7890, 3712, 46912, 90, 51, 5512, 266, 3712, 38469, 90, 51, 30072, 198, 220, 220, 220, 997, 62, 82, 12629, 11, 997, 62, 12683, 874, 796, 2546, ...
2.115727
337
<filename>test/distanceMetr/MeansMahalinobisTest.jl using Revise, Parameters, Logging, Test using CUDA includet("C:\\GitHub\\GitHub\\NuclearMedEval\\src\\structs\\BasicStructs.jl") includet("C:\\GitHub\\GitHub\\NuclearMedEval\\src\\utils\\CUDAGpuUtils.jl") includet("C:\\GitHub\\GitHub\\NuclearMedEval\\src\\utils\\Itera...
[ 27, 34345, 29, 9288, 14, 30246, 9171, 81, 14, 5308, 504, 40936, 14414, 672, 271, 14402, 13, 20362, 198, 3500, 5416, 786, 11, 40117, 11, 5972, 2667, 11, 6208, 198, 3500, 29369, 5631, 198, 259, 758, 316, 7203, 34, 25, 6852, 38, 270, ...
2.26767
5,051
using ClickHouse: Column, chwrite, chread, read_col, VarUInt, parse_typestring, result_type using Dates using CategoricalArrays using UUIDs import Sockets using Sockets: IPv4, IPv6 using DecFP @testset "Parse type" begin r = parse_typestring("Int32") @test r.name == :Int32 @test_throws ErrorExcept...
[ 3500, 6914, 18102, 25, 29201, 11, 442, 13564, 11, 442, 961, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1100, 62, 4033, 11, 12372, 52, 5317, 11, 21136, 62, 28004, 395, 1806, 11, 1255, 62, 4906, 198, 3500, 44712, 198, 3500, 32...
2.29347
6,999
#function testNHHeldSuarezSphere using CGDycore OrdPoly = 4 OrdPolyZ=1 nz = 10 nPanel = 4 NF = 6 * nPanel * nPanel # Cache cache=CGDycore.Cache(OrdPoly, OrdPolyZ, nz, NF) # Physical parameters Param=CGDycore.PhysParameters(cache); # Grid Param.nPanel=nPanel; Param.H=30000; Param.Grid=CGDycore.CubedGrid(Param.nPane...
[ 2, 8818, 1332, 33863, 1544, 335, 5606, 19655, 38882, 198, 3500, 29925, 35, 88, 7295, 628, 198, 35422, 34220, 796, 604, 198, 35422, 34220, 57, 28, 16, 198, 27305, 796, 838, 198, 77, 26639, 796, 604, 198, 21870, 796, 718, 1635, 299, 2...
1.969889
2,524
#### Cauchy matrix export Cauchy """ [`Cauchy` matrix](http://en.wikipedia.org/wiki/Cauchy_matrix) ```julia Cauchy(x,y)[i,j]=1/(x[i]+y[j]) Cauchy(x)=Cauchy(x,x) cauchy(k::Number)=Cauchy(collect(1:k)) julia> Cauchy([1,2,3],[3,4,5]) 3x3 Cauchy{Int64}: 0.25 0.2 0.166667 0.2 0.166667 0.142857 0.16666...
[ 4242, 327, 559, 29658, 17593, 198, 198, 39344, 327, 559, 29658, 198, 37811, 198, 58, 63, 34, 559, 29658, 63, 17593, 16151, 4023, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 34, 559, 29658, 62, 6759, 8609, 8, 198, 15506, 63, 73, ...
1.858462
650
#Linear ARD Covariance Function """ LinArd <: Kernel ARD linear kernel (covariance) ```math k(x,x') = xᵀL⁻²x' ``` with length scale ``ℓ = (ℓ₁, ℓ₂, …)`` and ``L = diag(ℓ₁, ℓ₂, …)``. """ mutable struct LinArd{T<:Real} <: Kernel "Length scale" ℓ::Vector{T} "Priors for kernel parameters" priors::Array...
[ 2, 14993, 451, 5923, 35, 39751, 2743, 590, 15553, 198, 198, 37811, 198, 220, 220, 220, 5164, 3163, 67, 1279, 25, 32169, 198, 198, 9795, 14174, 9720, 357, 66, 709, 2743, 590, 8, 198, 15506, 63, 11018, 198, 74, 7, 87, 11, 87, 11537,...
1.994785
1,534
"Holds the tableau of an Specialised Partitioned Additive Runge-Kutta method for Variational systems." struct TableauVSPARKsecondary{DT <: Number} <: AbstractTableau{DT} name::Symbol o::Int s::Int r::Int ρ::Int q::CoefficientsSPARK{DT} p::CoefficientsSPARK{DT} q̃::CoefficientsSPARK{DT}...
[ 1, 39, 10119, 262, 3084, 559, 286, 281, 6093, 1417, 2142, 653, 276, 3060, 1800, 5660, 469, 12, 42, 315, 8326, 2446, 329, 15965, 864, 3341, 526, 198, 7249, 8655, 559, 53, 4303, 14175, 38238, 90, 24544, 1279, 25, 7913, 92, 1279, 25, ...
1.770077
6,637
<reponame>MohHizzani/NumNN.jl<gh_stars>1-10 using ProgressMeter using Random using LinearAlgebra include("layerForProp.jl") """ perform the chained forward propagation using recursive calls input: X := input of the forward propagation cLayer := output layer cnt := an internal counter used to cac...
[ 27, 7856, 261, 480, 29, 38443, 39, 6457, 3216, 14, 33111, 6144, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 3500, 18387, 44, 2357, 198, 3500, 14534, 198, 3500, 44800, 2348, 29230, 198, 198, 17256, 7203, 29289, 1890, 24...
1.952754
7,027
<reponame>GrantHecht/JuSwarm<gh_stars>1-10 using JuSwarm, Test, SafeTestsets @time begin @time @safetestset "Sphere Function" begin include("sphere_function_test.jl") end @time @safetestset "Rosenbrock Function" begin include("rosenbrock_function_test.jl") end @time @safetestset "Ackley Function" begin include("ackle...
[ 27, 7856, 261, 480, 29, 45431, 1544, 21474, 14, 33018, 10462, 1670, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 3500, 12585, 10462, 1670, 11, 6208, 11, 19978, 51, 3558, 1039, 198, 31, 2435, 2221, 198, 31, 2435, 2488, 49585, 316, ...
2.875
152
<gh_stars>0 module SqState const PROJECT_PATH = @__DIR__ include("read.jl") include("utils.jl") include("polynomial.jl") include("wigner.jl") end
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 311, 80, 9012, 628, 220, 220, 220, 1500, 21965, 23680, 62, 34219, 796, 2488, 834, 34720, 834, 628, 220, 220, 220, 2291, 7203, 961, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 26791, 13, ...
2.315068
73
<reponame>viniciuspiccoli/IL_simulations export pack_input # one il + protein + water function pack_input(data, pdb_dir::String, nil, nwater, sides) protein = data.protein cation = data.cation anion = data.anion lx = round(Int64,sides[1] / 2) ly = round(Int64,sides[2] / 2) lz = round(Int64,sides[3...
[ 27, 7856, 261, 480, 29, 7114, 291, 3754, 16564, 4033, 72, 14, 4146, 62, 14323, 5768, 198, 39344, 2353, 62, 15414, 198, 198, 2, 530, 4229, 1343, 7532, 1343, 1660, 220, 220, 198, 8818, 2353, 62, 15414, 7, 7890, 11, 279, 9945, 62, 15...
2.16941
2,491
<reponame>appleparan/Mise.jl """ extract_col_feats(df, cols) find mean, std, minimum, maximum in df[!, col] default value of columns are all numeric columns except date """ function extract_col_statvals(df::DataFrame, cols::Array{Symbol, 1}) syms = [] types = [] vals = [] for col in cols μ,...
[ 27, 7856, 261, 480, 29, 18040, 1845, 272, 14, 44, 786, 13, 20362, 198, 37811, 198, 220, 220, 220, 7925, 62, 4033, 62, 5036, 1381, 7, 7568, 11, 951, 82, 8, 198, 198, 19796, 1612, 11, 14367, 11, 5288, 11, 5415, 287, 47764, 58, 282...
2.147547
2,528
# This file is a part of project JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/NodeNumbering.jl/blob/master/LICENSE using Documenter using NodeNumbering makedocs( modules = [NodeNumbering], sitename = "NodeNumbering.jl", format = :html, pages = [ "Introduction" => "index.md"...
[ 2, 770, 2393, 318, 257, 636, 286, 1628, 22300, 37, 3620, 13, 198, 2, 13789, 318, 17168, 25, 766, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 37, 3620, 14, 19667, 15057, 278, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290,...
2.206522
184
#module ResNetModule export ResNet import Knet using Knet.Layers21: Conv, BatchNorm, Linear, Block, Add using Knet.Ops21: relu, pool, mean using Artifacts """ ResNet(; nblocks=(2,2,2,2), block=ResNetBottleneck, groups=1, bottleneck=1, classes=1000) ResNet(name::String; pretrained=true) Return a ResNet model...
[ 2, 21412, 1874, 7934, 26796, 198, 39344, 1874, 7934, 198, 198, 11748, 509, 3262, 198, 3500, 509, 3262, 13, 43, 6962, 2481, 25, 34872, 11, 347, 963, 35393, 11, 44800, 11, 9726, 11, 3060, 198, 3500, 509, 3262, 13, 41472, 2481, 25, 823...
2.452123
3,227
<reponame>crstnbr/LatPhysUnitcellLibrary.jl<filename>src/unitcells_3d/8_3_n.jl ################################################################################ # # (8,3)n # ################################################################################ # Implementation # - implementation 1 # - labels <: Any functi...
[ 27, 7856, 261, 480, 29, 6098, 301, 77, 1671, 14, 24220, 43215, 26453, 3846, 23377, 13, 20362, 27, 34345, 29, 10677, 14, 20850, 46342, 62, 18, 67, 14, 23, 62, 18, 62, 77, 13, 20362, 198, 29113, 29113, 14468, 198, 2, 198, 2, 220, ...
1.964948
4,479
# Gloriously inefficient ways of computing running & rolled quantities. function _naive_inception_reduce(T, f::Function, block::Block, min_window::Int) @assert min_window > 0 times = DateTime[] values = T[] buffer = value_type(block)[] for (i, (time, value)) in enumerate(block) # Push a new...
[ 2, 2671, 273, 6819, 30904, 2842, 286, 14492, 2491, 1222, 11686, 17794, 13, 198, 198, 8818, 4808, 2616, 425, 62, 924, 1159, 62, 445, 7234, 7, 51, 11, 277, 3712, 22203, 11, 2512, 3712, 12235, 11, 949, 62, 17497, 3712, 5317, 8, 198, ...
2.239076
5,630
<filename>experiments/2gaussianson1.jl using FewShotAnomalyDetection using Flux using MLDataPattern using FluxExtensions using Adapt using DataFrames using CSV import FewShotAnomalyDetection: loss, zparams include("experimentalutils.jl") include("vae.jl") inputDim = 1 hiddenDim = 100 latentDim = 1 numLayers = 2 nonli...
[ 27, 34345, 29, 23100, 6800, 14, 17, 4908, 1046, 1547, 261, 16, 13, 20362, 198, 3500, 20463, 28512, 2025, 24335, 11242, 3213, 198, 3500, 1610, 2821, 198, 3500, 10373, 6601, 47546, 198, 3500, 1610, 2821, 11627, 5736, 198, 3500, 30019, 198...
2.725686
401
<gh_stars>0 module AdventOfCode end
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 33732, 5189, 10669, 198, 198, 437, 198 ]
2.466667
15
<filename>julia/perf/perf_ngsim_env.jl using AutoEnvs function perf_ngsim_env_step(n_steps=20000) filepath = Pkg.dir("NGSIM", "data", "trajdata_i101_trajectories-0750am-0805am.txt") params = Dict( "trajectory_filepaths"=>[filepath], ) env = NGSIMEnv(params) action = [1.,0.] reset(env) ...
[ 27, 34345, 29, 73, 43640, 14, 525, 69, 14, 525, 69, 62, 782, 14323, 62, 24330, 13, 20362, 198, 3500, 11160, 4834, 14259, 198, 198, 8818, 23035, 62, 782, 14323, 62, 24330, 62, 9662, 7, 77, 62, 20214, 28, 2167, 405, 8, 198, 220, 2...
2.044807
491
@testset "970.powerful-integers.jl" begin @test powerful_integers(2, 3, 10) == Set([2, 3, 4, 5, 7, 9, 10]) @test powerful_integers(3, 5, 15) == Set([2, 4, 6, 8, 10, 14]) @test powerful_integers(1, 5, 15) == Set([2, 6]) @test powerful_integers(1, 1, 5) == Set([2]) end
[ 31, 9288, 2617, 366, 43587, 13, 44548, 12, 18908, 364, 13, 20362, 1, 2221, 198, 220, 220, 220, 2488, 9288, 3665, 62, 18908, 364, 7, 17, 11, 513, 11, 838, 8, 6624, 5345, 26933, 17, 11, 513, 11, 604, 11, 642, 11, 767, 11, 860, 1...
2.210938
128
<reponame>genkuroki/public<gh_stars>1-10 # --- # jupyter: # jupytext: # formats: ipynb,jl:hydrogen # text_representation: # extension: .jl # format_name: hydrogen # format_version: '1.3' # jupytext_version: 1.11.2 # kernelspec: # display_name: Julia 1.8.0-DEV # language: juli...
[ 27, 7856, 261, 480, 29, 5235, 74, 1434, 4106, 14, 11377, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 17519, 25, 209...
2.688867
1,006
using Plasmons using LinearAlgebra using HDF5 using Test using CUDA using Adapt CUDA.allowscalar(false) @testset "Plasmons.jl" begin @testset "fermidirac" begin @test Plasmons.fermidirac(0.52193; mu = 0.4, kT = 0.1) ≈ 0.228059661030488549677 @test Plasmons.fermidirac(2.0; mu = -0.8, kT = 0.13) ≈ 4...
[ 3500, 1345, 8597, 684, 198, 3500, 44800, 2348, 29230, 198, 3500, 5572, 37, 20, 198, 3500, 6208, 198, 3500, 29369, 5631, 198, 3500, 30019, 198, 198, 43633, 5631, 13, 12154, 1416, 282, 283, 7, 9562, 8, 198, 198, 31, 9288, 2617, 366, 3...
1.604288
5,130
<gh_stars>1-10 """ $(TYPEDEF) `PointMass` is a simple environment useful for trying out and debugging new algorithms. The task is simply to move a 2D point mass to a target position by applying x and y forces to the mass. # Spaces * **State: (13, )** * **Action: (2, )** * **Observation: (6, )** """ struct PointM...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 29568, 9936, 47, 1961, 25425, 8, 198, 198, 63, 12727, 20273, 63, 318, 257, 2829, 2858, 4465, 329, 2111, 503, 290, 28769, 649, 16113, 13, 383, 198, 35943, 318, 23...
2.291498
988
@inline apply(o::Sum, diags::Vector{Diagram{W}}) where {W<:Number} = sum(d.weight for d in diags) @inline apply(o::Prod, diags::Vector{Diagram{W}}) where {W<:Number} = prod(d.weight for d in diags) @inline apply(o::Sum, diag::Diagram{W}) where {W<:Number} = diag.weight @inline apply(o::Prod, diag::Diagram{W}) where {W<...
[ 31, 45145, 4174, 7, 78, 3712, 13065, 11, 2566, 3775, 3712, 38469, 90, 18683, 6713, 90, 54, 11709, 8, 810, 1391, 54, 27, 25, 15057, 92, 796, 2160, 7, 67, 13, 6551, 329, 288, 287, 2566, 3775, 8, 198, 31, 45145, 4174, 7, 78, 3712, ...
2.262418
1,067
<gh_stars>1-10 include("HyperRank.jl") include("Hyper-Evec-Centrality-master\\centrality.jl") include("Hyper-Evec-Centrality-master\\data_io.jl") """ `n_argmax` ========== Returns the indices of the top `n` maximal elements in descending order of array value. Arguments --------- - `A::Vector{T}`: A v...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 17256, 7203, 38197, 27520, 13, 20362, 4943, 201, 198, 17256, 7203, 38197, 12, 36, 35138, 12, 30645, 414, 12, 9866, 6852, 31463, 414, 13, 20362, 4943, 201, 198, 17256, 7203, 38197, 12, 36, 35...
2.517549
1,567
<reponame>djsegal/FusionSystems.jl<gh_stars>0 @coeff function K_BS(reactor::Reactor) K_b * K_n * K_T / (K_I^2) end
[ 27, 7856, 261, 480, 29, 28241, 325, 13528, 14, 37, 4241, 11964, 82, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 31, 1073, 14822, 2163, 509, 62, 4462, 7, 260, 11218, 3712, 3041, 11218, 8, 198, 220, 509, 62, 65, 1635, 509, 62, 77,...
1.95
60
<reponame>lrnv/Copulas.jl """ GumbelCopula{d,T} Fields: - θ::Real - parameter Constructor GumbelCopula(d, θ) The [Gumbel](https://en.wikipedia.org/wiki/Copula_(probability_theory)#Most_important_Archimedean_copulas) copula in dimension ``d`` is parameterized by ``\\theta \\in [1,\\infty)``. It i...
[ 27, 7856, 261, 480, 29, 14050, 48005, 14, 13379, 25283, 13, 20362, 198, 37811, 201, 198, 220, 220, 220, 402, 2178, 417, 13379, 4712, 90, 67, 11, 51, 92, 201, 198, 201, 198, 15878, 82, 25, 201, 198, 220, 532, 7377, 116, 3712, 15633...
1.918228
587
### A Pluto.jl notebook ### # v0.14.1 using Markdown using InteractiveUtils # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). macro bind(def, element) quote loc...
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1415, 13, 16, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 770, 32217, 20922, 3544, 2488, 21653, 329, 9427, 3458, 13, 1649, 2491, 428, 20922, ...
1.810221
11,408
<reponame>Crghilardi/ForestBiometrics.jl using ForestBiometrics using DelimitedFiles using Test using Plots datapath = joinpath(@__DIR__, "data") data = readdlm(joinpath(datapath,"StandExam_data.csv"),',',header=true) tl = Tree[] for i in eachrow(data[1]) push!(tl,Tree(i[7], i[8], i[6], i[9])) end stand = Stand...
[ 27, 7856, 261, 480, 29, 13916, 456, 346, 22490, 14, 34605, 23286, 908, 10466, 13, 20362, 198, 3500, 9115, 23286, 908, 10466, 198, 3500, 4216, 320, 863, 25876, 198, 3500, 6208, 198, 3500, 1345, 1747, 198, 198, 19608, 499, 776, 796, 465...
2.278281
442
module Interfaces export isinterfacetype, @interface, @implements, InterfaceImplementationError struct InterfaceImplementationError <: Exception msg::String end isinterfacetype(::Type{T}) where {T} = false isinterfacetype(::Type{Type{T}}) where {T} = isinterfacetype(T) function interface end struct Interface ...
[ 21412, 4225, 32186, 198, 198, 39344, 318, 3849, 38942, 2963, 431, 11, 2488, 39994, 11, 2488, 320, 1154, 902, 11, 26491, 3546, 32851, 12331, 198, 198, 7249, 26491, 3546, 32851, 12331, 1279, 25, 35528, 198, 220, 220, 220, 31456, 3712, 101...
2.229612
5,383
using Waterfall import Plots # This file generates a histogram for each step in the cascade. It shows how a step HEIGHT # depends on plotting order. include(joinpath(WATERFALL_DIR,"src","includes.jl")) include(joinpath(WATERFALL_DIR,"bin","io.jl")) nperm = 1000 x = define_permute(df[[1:11;15],:], nperm; kwargs...) d...
[ 3500, 5638, 7207, 198, 11748, 1345, 1747, 198, 198, 2, 770, 2393, 18616, 257, 1554, 21857, 329, 1123, 2239, 287, 262, 44847, 13, 632, 2523, 703, 257, 2239, 11179, 9947, 198, 2, 8338, 319, 29353, 1502, 13, 198, 17256, 7, 22179, 6978, ...
2.088933
506
using Pkg; Pkg.activate(@__DIR__) using MuJoCo mj_activate("/home/taylor/.mujoco/bin/mjkey.txt") # set location to MuJoCo key path using LyceumMuJoCo, LyceumMuJoCoViz using FiniteDiff using IterativeLQR using LinearAlgebra using Random # ## load MuJoCo model path = joinpath(@__DIR__, "../../../env/box/deps/block.xm...
[ 3500, 350, 10025, 26, 350, 10025, 13, 39022, 7, 31, 834, 34720, 834, 8, 198, 3500, 8252, 9908, 7222, 198, 76, 73, 62, 39022, 7203, 14, 11195, 14, 83, 7167, 11757, 76, 23577, 25634, 14, 8800, 14, 76, 73, 2539, 13, 14116, 4943, 1303...
1.83484
1,659
<reponame>JuliaTagBot/AdventOfCode.jl using Documenter, AdventOfCode makedocs(sitename="AdventOfCode.jl") deploydocs( repo = "github.com/SebRollen/AdventOfCode.jl.git", )
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 2782, 1151, 5189, 10669, 13, 20362, 198, 3500, 16854, 263, 11, 33732, 5189, 10669, 198, 198, 76, 4335, 420, 82, 7, 48937, 12453, 2625, 2782, 1151, 5189, 10669, 13, 20362, 4943, 198...
2.378378
74
using KernelDensity import Statistics.std function _defaultBandwidth(vs::Vector{Float64}) return std(vs)*1.06*length(vs)^(-1/5) end function _defaultBandwidth(xs::Vector{Float64}, ys::Vector{Float64}) @assert length(xs) == length(ys) len = length(xs) h1 = std(xs)*1.06*len^(-1/6) h2 = std(ys)*1.06*len^(-1/6)...
[ 3500, 32169, 35, 6377, 198, 11748, 14370, 13, 19282, 198, 198, 8818, 4808, 12286, 31407, 10394, 7, 14259, 3712, 38469, 90, 43879, 2414, 30072, 198, 220, 1441, 14367, 7, 14259, 27493, 16, 13, 3312, 9, 13664, 7, 14259, 8, 61, 32590, 16,...
2.631868
728
<reponame>UnofficialJuliaMirrorSnapshots/TypeStability.jl-73ec333a-e3df-5994-9c7a-5ef2077ce03e export check_function, check_method export StabilityReport, is_stable """ check_function(func, signatures, acceptable_instability=Dict()) Check that the function is stable under each of the given signatures. Return an...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 6030, 1273, 1799, 13, 20362, 12, 4790, 721, 20370, 64, 12, 68, 18, 7568, 12, 20, 42691, 12, 24, 66, 22, 64, 12, 20, 891, 1238, 3324, 344, 3070, 68, ...
2.270859
2,481
<reponame>lassepe/CUDA.jl @testset "memory" begin let a,b = Mem.info() # NOTE: actually testing this is pretty fragile on CI #=@test a == =# CUDA.available_memory() #=@test b == =# CUDA.total_memory() end # dummy data T = UInt32 N = 5 data = rand(T, N) nb = sizeof(data) # buffers are untyped, so we u...
[ 27, 7856, 261, 480, 29, 75, 21612, 431, 14, 43633, 5631, 13, 20362, 198, 31, 9288, 2617, 366, 31673, 1, 2221, 198, 198, 1616, 198, 220, 220, 220, 257, 11, 65, 796, 4942, 13, 10951, 3419, 198, 220, 220, 220, 1303, 24550, 25, 1682, ...
2.160313
4,223
<gh_stars>1-10 # This file is a part of Julia. License is MIT: https://julialang.org/license ## linalg.jl: Some generic Linear Algebra definitions # For better performance when input and output are the same array # See https://github.com/JuliaLang/julia/issues/8415#issuecomment-56608729 function generic_rmul!(X::Abst...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 2235, 300, 1292, 70, 13, 20362, 25, 2773, 14276, 44800, ...
2.157097
16,423
# This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: device_farm using AWS.Compat using AWS.UUIDs """ create_device_pool(name, project_arn, rules) create_device_pool(name, project_arn, rules, params::Dict{String,<:Any}) Creates a device pool. # Arguments - `name`: The device pool'...
[ 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 3335, 62, 43323, 198, 3500, 30865, 13, 40073, 198, 3500, 30865, 13, 52, 27586, 82, 198, 198, ...
2.668352
36,189
<reponame>IntelLabs/Latte.jl # Copyright (c) 2015, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list o...
[ 27, 7856, 261, 480, 29, 24123, 43, 8937, 14, 24220, 660, 13, 20362, 198, 2, 15069, 357, 66, 8, 1853, 11, 8180, 10501, 198, 2, 220, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613...
3.008216
852
<gh_stars>0 """ $(TYPEDEF) Simple in-memory data store with a specified data type and a specified key type. """ struct InMemoryDataStore{T, E <: AbstractBigDataEntry} <: AbstractDataStore{T} data::Dict{Symbol, T} entries::Dict{Symbol, E} end """ $(SIGNATURES) Create an in-memory store using a specific ...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 29568, 9936, 47, 1961, 25425, 8, 198, 26437, 287, 12, 31673, 1366, 3650, 351, 257, 7368, 1366, 2099, 290, 257, 7368, 1994, 2099, 13, 198, 37811, 198, 7249, 554, 30871, 6601...
2.785124
242
<gh_stars>0 """ CosineKernel() Cosine kernel. # Definition For inputs ``x, x' \\in \\mathbb{R}^d``, the cosine kernel is defined as ```math k(x, x') = \\cos(\\pi \\|x-x'\\|_2). ``` """ struct CosineKernel <: SimpleKernel end kappa(::CosineKernel, d::Real) = cospi(d) metric(::CosineKernel) = Euclidean() Base.s...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 10437, 500, 42, 7948, 3419, 198, 198, 36734, 500, 9720, 13, 198, 198, 2, 30396, 198, 198, 1890, 17311, 7559, 87, 11, 2124, 6, 26867, 259, 26867, 11018, 11848, 90, 49, 92,...
2.284848
165
""" Main module for `Helium.jl` -- a binary format writer and reader for matrix. Three functions are exported from this module for public use: - [`csv2he`](@ref). Convert a CSV file containing a matrix to the binary Helium format. - [`writehe`](@ref). Write matrix in Helium format. - [`readhe`](@ref). Read file in Heli...
[ 37811, 198, 13383, 8265, 329, 4600, 12621, 1505, 13, 20362, 63, 1377, 257, 13934, 5794, 6260, 290, 9173, 329, 17593, 13, 198, 12510, 5499, 389, 29050, 422, 428, 8265, 329, 1171, 779, 25, 198, 12, 685, 63, 40664, 17, 258, 63, 16151, ...
3.061135
229
# ------------------------------------------------------------------ # Licensed under the ISC License. See LICENSE in the project root. # ------------------------------------------------------------------ """ DomainView(domain, locations) Return a view of `domain` at `locations`. ### Notes This type implements ...
[ 2, 16529, 438, 198, 2, 49962, 739, 262, 3180, 34, 13789, 13, 4091, 38559, 24290, 287, 262, 1628, 6808, 13, 198, 2, 16529, 438, 198, 198, 37811, 198, 220, 220, 220, 20021, 7680, 7, 27830, 11, 7064, 8, 198, 198, 13615, 257, 1570, 28...
2.48
475
@init global hp = safe_pyimport("healpy") function θϕ_to_xy((θ,ϕ)) r = 2cos(θ/2) x = r*cos(ϕ) y = -r*sin(ϕ) x, y end function xy_to_θϕ((x,y)) r = sqrt(x^2+y^2) θ = 2*acos(r/2) ϕ = -atan(y,x) θ, ϕ end function healpix_to_flat(healpix_map::Vector{T}, ::Type{P}; rot=(0,0,0)) where {Ns...
[ 198, 31, 15003, 3298, 27673, 796, 3338, 62, 9078, 11748, 7203, 258, 282, 9078, 4943, 628, 198, 8818, 7377, 116, 139, 243, 62, 1462, 62, 5431, 19510, 138, 116, 11, 139, 243, 4008, 198, 220, 220, 220, 374, 796, 362, 6966, 7, 138, 11...
1.863736
910
<reponame>ajozefiak/julia<filename>base/stat.jl # This file is a part of Julia. License is MIT: https://julialang.org/license # filesystem operations export ctime, filemode, filesize, gperm, isblockdev, ischardev, isdir, isfifo, isfile, islink, ismount, ispath, isse...
[ 27, 7856, 261, 480, 29, 1228, 8590, 891, 32994, 14, 73, 43640, 27, 34345, 29, 8692, 14, 14269, 13, 20362, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085,...
2.259814
3,872
# most machines will be higher resolution than this, but we're playing it safe const RESOLUTION = 1000 # 1 μs = 1000 ns ############## # Parameters # ############## type Parameters seconds::Float64 samples::Int evals::Int overhead::Int gctrial::Bool gcsample::Bool time_tolerance::Float64 ...
[ 2, 749, 8217, 481, 307, 2440, 6323, 621, 428, 11, 475, 356, 821, 2712, 340, 3338, 198, 9979, 15731, 3535, 35354, 796, 8576, 1303, 352, 18919, 82, 796, 8576, 36545, 198, 198, 7804, 4242, 2235, 198, 2, 40117, 1303, 198, 7804, 4242, 22...
2.414244
1,376
# Various helper functions to calculate dimensions for operations include("dim_helpers/ConvDims.jl") include("dim_helpers/DenseConvDims.jl") include("dim_helpers/DepthwiseConvDims.jl") include("dim_helpers/PoolDims.jl") """ transpose_swapbatch(x::AbstractArray) Given an AbstractArray, swap its batch and channel ...
[ 2, 26386, 31904, 5499, 284, 15284, 15225, 329, 4560, 198, 17256, 7203, 27740, 62, 16794, 364, 14, 3103, 85, 35, 12078, 13, 20362, 4943, 198, 17256, 7203, 27740, 62, 16794, 364, 14, 35, 1072, 3103, 85, 35, 12078, 13, 20362, 4943, 198, ...
2.578975
1,874
<gh_stars>100-1000 # Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. using BinaryBuilder, Pkg name = "SDL2_mixer" version = v"2.0.4" # Collection of sources required to complete build sources = [ "http://www.libsdl.org/projects/S...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 5740, 326, 428, 4226, 460, 2453, 617, 3614, 3141, 12, 1370, 7159, 11, 1057, 198, 2, 4600, 73, 43640, 1382, 62, 18870, 21591, 13, 20362, 1377, 16794, 63, 284, 766, 257, 8748, 3275, 1...
2.525298
672
<reponame>caodi/julia<filename>base/sparse/cholmod.jl # This file is a part of Julia. License is MIT: https://julialang.org/license module CHOLMOD import Base: (*), convert, copy, eltype, get, getindex, show, size, IndexStyle, IndexLinear, IndexCartesian, ctranspose import Base.LinAlg: (\), A_mul_Bc, A_...
[ 27, 7856, 261, 480, 29, 6888, 23130, 14, 73, 43640, 27, 34345, 29, 8692, 14, 82, 29572, 14, 354, 349, 4666, 13, 20362, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2...
2.148653
28,886
<reponame>JuliaBinaryWrappers/Trilinos_jll.jl # Autogenerated wrapper script for Trilinos_jll for x86_64-w64-mingw32-libgfortran3-cxx03 export libamesos, libaztecoo, libbelos, libbelosepetra, libepetra, libepetraext, libifpack, libisorropia, libloca, liblocaepetra, liblocalapack, libnox, libnoxepetra, libnoxlapack, lib...
[ 27, 7856, 261, 480, 29, 16980, 544, 33, 3219, 36918, 11799, 14, 2898, 346, 11996, 62, 73, 297, 13, 20362, 198, 2, 5231, 519, 877, 515, 29908, 4226, 329, 833, 346, 11996, 62, 73, 297, 329, 2124, 4521, 62, 2414, 12, 86, 2414, 12, ...
2.046432
2,929
<reponame>oysteinsolheim/GraphNeuralNetworks.jl # An example of graph classification using Flux using Flux:onecold, onehotbatch using Flux.Losses: logitbinarycrossentropy using Flux.Data: DataLoader using GraphNeuralNetworks using MLDatasets: TUDataset using Statistics, Random using CUDA CUDA.allowscalar(false) funct...
[ 27, 7856, 261, 480, 29, 726, 4169, 1040, 349, 9096, 14, 37065, 8199, 1523, 7934, 5225, 13, 20362, 198, 2, 1052, 1672, 286, 4823, 17923, 198, 198, 3500, 1610, 2821, 198, 3500, 1610, 2821, 25, 505, 36673, 11, 530, 8940, 43501, 198, 35...
2.089474
1,710
# This file is a part of Julia. License is MIT: https://julialang.org/license ## low-level pcre2 interface ## module PCRE include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "pcre_h.jl")) # include($BUILDROOT/base/pcre_h.jl) const PCRE_LIB = "libpcre2-8" const JIT_STACK = Ref{Ptr{Void}}(C_NULL) const MATCH...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 2235, 1877, 12, 5715, 279, 7513, 17, 7071, 22492, 198, 198, 21412, 4217, 2200, 198, 198, 17256, 7, 8...
1.981308
3,210
<reponame>ma-laforge/CMDimCircuits.jl #demo_snp_rw.jl: sNp (Touchstone) file tests #------------------------------------------------------------------------------- using CMDimCircuits CMDimCircuits.@using_CData() #Get a demo display: include(CMDimCircuits.demoplotcfgscript) #Normally use something like: #CMDimData.@i...
[ 27, 7856, 261, 480, 29, 2611, 12, 5031, 30293, 14, 34, 12740, 320, 31560, 15379, 13, 20362, 198, 2, 9536, 78, 62, 16184, 79, 62, 31653, 13, 20362, 25, 264, 45, 79, 357, 35211, 6440, 8, 2393, 5254, 198, 2, 10097, 24305, 198, 198, ...
2.459704
1,216
<reponame>TimoLarson/julia # This file is a part of Julia. License is MIT: https://julialang.org/license """ MultiSelectMenu A menu that allows a user to select a multiple options from a list. # Sample Output ```julia julia> request(MultiSelectMenu(options)) Select the fruits you like: [press: d=done, a=all, n...
[ 27, 7856, 261, 480, 29, 14967, 78, 43, 12613, 14, 73, 43640, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 37811, 628, 220, 220, 220, 15237, ...
2.819751
1,448
module STMOZOO # execute your source file and export the module you made include("example.jl") export Example end # module
[ 21412, 3563, 11770, 57, 6684, 628, 198, 2, 12260, 534, 2723, 2393, 290, 10784, 262, 8265, 345, 925, 198, 17256, 7203, 20688, 13, 20362, 4943, 198, 39344, 17934, 198, 198, 437, 1303, 8265, 198 ]
3.705882
34
export dimension mutable struct ModAlgAss{S, T, V} base_ring::S action::Vector{T} dimension::Int M::AbstractAlgebra.FPModule{V} isirreducible::Int dimension_splitting_field::Int algebra::AlgAss{V} action_of_gens::Vector{T} action_of_basis::Vector{T} function ModAlgAss{S, T}(action::Vector{T}) wher...
[ 39344, 15793, 198, 198, 76, 18187, 2878, 3401, 2348, 70, 8021, 90, 50, 11, 309, 11, 569, 92, 198, 220, 2779, 62, 1806, 3712, 50, 198, 220, 2223, 3712, 38469, 90, 51, 92, 198, 220, 15793, 3712, 5317, 198, 220, 337, 3712, 23839, 234...
2.084882
1,991
<reponame>gdalle/PointProcesses.jl<filename>test/models.jl @testset verbose = true "Models" begin @testset "Poisson" begin mark_dist = Dists.Categorical([0.1, 0.3, 0.6]) pp = PoissonProcess(5.0, mark_dist) h = rand(pp, 0.0, 100.0) pp_est = fit(PoissonProcess{Dists.Categorical}, h) ...
[ 27, 7856, 261, 480, 29, 21287, 6765, 14, 12727, 18709, 274, 13, 20362, 27, 34345, 29, 9288, 14, 27530, 13, 20362, 198, 31, 9288, 2617, 15942, 577, 796, 2081, 366, 5841, 1424, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 18833...
2.14554
213
<reponame>dinarior/NearestNeighbors.jl # A BallTree (also called Metric tree) is a tree that is created # from successively splitting points into surrounding hyper spheres # which radius are determined from the given metric. # The tree uses the triangle inequality to prune the search space # when finding the neighbors ...
[ 27, 7856, 261, 480, 29, 67, 22050, 1504, 14, 8199, 12423, 46445, 32289, 13, 20362, 198, 2, 317, 6932, 27660, 357, 14508, 1444, 3395, 1173, 5509, 8, 318, 257, 5509, 326, 318, 2727, 198, 2, 422, 1943, 2280, 26021, 2173, 656, 7346, 871...
2.197446
4,072
<gh_stars>1-10 using Weber using Base.Test rng() = MersenneTwister(1983) @testset "Oddball Design" begin pattern = oddball_paradigm(identity,20,150,rng=rng()) @test sum(pattern) == 20 @test length(pattern) == 170 @test !any(pattern[2:end] .& (pattern[2:end] .== pattern[1:(end-1)])) @test any(pattern[3:end]...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 28137, 198, 3500, 7308, 13, 14402, 198, 198, 81, 782, 3419, 796, 337, 364, 29727, 5080, 1694, 7, 29279, 8, 628, 198, 31, 9288, 2617, 366, 46, 1860, 1894, 8495, 1, 2221, 198, 220, 3...
2.331671
401
using Test using MathOptInterface const MOI = MathOptInterface const MOIT = MathOptInterface.Test const MOIU = MathOptInterface.Utilities const MOIB = MathOptInterface.Bridges include("../utilities.jl") mock = MOIU.MockOptimizer(MOIU.Model{Float64}()) config = MOIT.TestConfig() bridged_mock = MOIB.Variable.RSOCtoSO...
[ 3500, 6208, 198, 198, 3500, 16320, 27871, 39317, 198, 9979, 13070, 40, 796, 16320, 27871, 39317, 198, 9979, 13070, 2043, 796, 16320, 27871, 39317, 13, 14402, 198, 9979, 13070, 44958, 796, 16320, 27871, 39317, 13, 18274, 2410, 198, 9979, 1...
2.030178
1,458
module SingleLayerQG export Problem, set_q!, updatevars!, energy, kinetic_energy, potential_energy, energy_dissipation, energy_work, energy_drag, enstrophy, enstrophy_dissipation, enstrophy_work, enstrophy_drag using CUDA, Reexport, DocStringExtensions @reexport using FourierFlows u...
[ 21412, 14206, 49925, 48, 38, 198, 198, 39344, 198, 220, 20647, 11, 198, 220, 900, 62, 80, 28265, 198, 220, 4296, 85, 945, 28265, 628, 220, 2568, 11, 198, 220, 37892, 62, 22554, 11, 198, 220, 2785, 62, 22554, 11, 198, 220, 2568, 62...
2.314881
8,689
# TODO: User supplied elemtype?? ValueInfoProto(name::String, inshape, elemtype=Float32) = ValueInfoProto( name=name, _type=TypeProto( tensor_type=TypeProto_Tensor(inshape, elemtype) ) ) TypeProto_Tensor(inshape, elemtype) = TypeProto_Tensor( elem_type=tp_tensor_elemtype(elemtype), shape=T...
[ 198, 2, 16926, 46, 25, 11787, 14275, 9766, 76, 4906, 3548, 198, 11395, 12360, 2964, 1462, 7, 3672, 3712, 10100, 11, 1035, 71, 1758, 11, 9766, 76, 4906, 28, 43879, 2624, 8, 796, 198, 11395, 12360, 2964, 1462, 7, 198, 220, 220, 220, ...
2.383006
1,577
""" $(TYPEDEF) A system of difference equations. # Fields $(FIELDS) # Example ``` using ModelingToolkit @parameters σ ρ β @variables t x(t) y(t) z(t) next_x(t) next_y(t) next_z(t) eqs = [next_x ~ σ*(y-x), next_y ~ x*(ρ-z)-y, next_z ~ x*y - β*z] de = DiscreteSystem(eqs,t,[x,y,z],[σ,ρ,β]) ``` """ str...
[ 37811, 198, 3, 7, 9936, 47, 1961, 25425, 8, 198, 198, 32, 1080, 286, 3580, 27490, 13, 198, 198, 2, 23948, 198, 3, 7, 11674, 3698, 5258, 8, 198, 198, 2, 17934, 198, 198, 15506, 63, 198, 3500, 9104, 278, 25391, 15813, 198, 198, 31...
2.178001
2,882
function WeightingOp(in,adj;w=1) return in.*w end function WeightingOp(m::AbstractString,d::AbstractString,adj;w="NULL") if (adj==true) d1,h1,e1 = SeisRead(d) d2,h2,e2 = SeisRead(w) SeisWrite(m,d1[:,:].*d2[:,:],h1,e1) else d1,h1,e1 = SeisRead(m) d2,h2,e2 = SeisRead(w) SeisWrite(d,d1[:,:].*d2[:,:],h1,...
[ 8818, 14331, 278, 18257, 7, 259, 11, 41255, 26, 86, 28, 16, 8, 628, 197, 7783, 287, 15885, 86, 198, 198, 437, 198, 198, 8818, 14331, 278, 18257, 7, 76, 3712, 23839, 10100, 11, 67, 3712, 23839, 10100, 11, 41255, 26, 86, 2625, 33991...
1.853125
320
export OfflinePolicy, JuliaRLTransition, gen_JuliaRL_dataset export calculate_CQL_loss, maximum_mean_discrepancy_loss struct JuliaRLTransition state action reward terminal next_state end Base.@kwdef struct OfflinePolicy{L,T} <: AbstractPolicy learner::L dataset::T continuous::Bool ...
[ 39344, 49749, 36727, 11, 22300, 7836, 8291, 653, 11, 2429, 62, 16980, 544, 7836, 62, 19608, 292, 316, 198, 198, 39344, 15284, 62, 34, 9711, 62, 22462, 11, 5415, 62, 32604, 62, 15410, 7856, 3883, 62, 22462, 198, 198, 7249, 22300, 7836,...
2.268692
2,140
println("F1) Tests of the semi-empirical computation of ADK rates.") @warn("\n\n !!! This example does not work properly at present !!! \n\n") # wa = 1
[ 198, 35235, 7203, 37, 16, 8, 30307, 286, 262, 10663, 12, 368, 4063, 605, 29964, 286, 5984, 42, 3965, 19570, 198, 198, 31, 40539, 7203, 59, 77, 59, 77, 220, 10185, 770, 1672, 857, 407, 670, 6105, 379, 1944, 220, 10185, 3467, 77, 59...
2.924528
53
export build_wire_coordinates, get_minimum_intersection_distance function build_wire_coordinates(wire_directions) path = [] current_x = 0 current_y = 0 dx = Dict('L'=> -1, 'R'=> 1, 'U'=> 0, 'D'=> 0) dy = Dict('L'=> 0, 'R'=> 0, 'U'=> 1, 'D'=> -1) for direction_instruction in wire_directions ...
[ 39344, 1382, 62, 21809, 62, 37652, 17540, 11, 651, 62, 39504, 62, 3849, 5458, 62, 30246, 628, 198, 8818, 1382, 62, 21809, 62, 37652, 17540, 7, 21809, 62, 12942, 507, 8, 198, 220, 220, 220, 3108, 796, 17635, 198, 220, 220, 220, 1459,...
2.366957
575
@testset "execution" begin ############################################################################################ dummy() = return @testset "@cuda" begin @test_throws UndefVarError @cuda undefined() @test_throws MethodError @cuda dummy(1) @testset "low-level interface" begin k = cufunction(dummy) k(...
[ 31, 9288, 2617, 366, 18558, 1009, 1, 2221, 198, 198, 29113, 29113, 14468, 7804, 4242, 198, 198, 67, 13513, 3419, 796, 1441, 198, 198, 31, 9288, 2617, 44212, 66, 15339, 1, 2221, 198, 198, 31, 9288, 62, 400, 8516, 13794, 891, 19852, 1...
2.176948
11,461
""" Provides functionality for working with HTTP headers in Genie. """ module Headers import Revise, HTTP import Genie """ set_headers!(req::HTTP.Request, res::HTTP.Response, app_response::HTTP.Response) :: HTTP.Response Configures the response headers. """ function set_headers!(req::HTTP.Request, res::HTTP.Resp...
[ 37811, 198, 15946, 1460, 11244, 329, 1762, 351, 14626, 24697, 287, 49405, 13, 198, 37811, 198, 21412, 7123, 364, 198, 198, 11748, 5416, 786, 11, 14626, 198, 11748, 49405, 198, 198, 37811, 198, 220, 220, 220, 900, 62, 50145, 0, 7, 4218...
2.509855
761
export interest, rate """ interest(amount, rate) Calculate interest from an ;amout; and interest rate of 'rate'. """ function interest(amount, rate) return amount * (1 + rate) end """ rate(amount, interest) Calculate interest rate based on an 'amount' and 'interest'. """ function rate(amount, intere...
[ 198, 198, 39344, 1393, 11, 2494, 198, 198, 37811, 198, 220, 220, 220, 1393, 7, 17287, 11, 2494, 8, 198, 198, 9771, 3129, 378, 1393, 422, 281, 2162, 321, 448, 26, 290, 1393, 2494, 286, 705, 4873, 4458, 198, 37811, 198, 8818, 1393, ...
2.976471
170
using LinearAlgebra struct ValueOne; end ValueOne() # Compute X <- a X + b I. function matfun_axpby!(X,a,b,Y::UniformScaling) m,n=size(X) if ~(a isa ValueOne) rmul!(X,a) end @inbounds for i=1:n X[i,i]+=(b isa ValueOne) ? 1 : b end end # Compute X <- a X + b Y. function matfun_axp...
[ 3500, 44800, 2348, 29230, 198, 198, 7249, 11052, 3198, 26, 886, 198, 11395, 3198, 3419, 198, 198, 2, 3082, 1133, 1395, 24293, 257, 1395, 1343, 275, 314, 13, 198, 8818, 2603, 12543, 62, 897, 79, 1525, 0, 7, 55, 11, 64, 11, 65, 11, ...
1.937326
1,436
<reponame>000Justin000/IsingLite.jl randspin() = [1,-1][rand(1:2)] # Generate a random spin spingrid(n::Int) = [randspin() for i in 1:n, j in 1:n] # Generate a random spin array magnetization(a::Array{Int, 2}) = mean(a) |> abs # Get magnetizations of the gr...
[ 27, 7856, 261, 480, 29, 830, 33229, 830, 14, 3792, 278, 43, 578, 13, 20362, 198, 81, 1746, 11635, 3419, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.082405
1,347
<filename>src/interpreter.jl """ runme(code::String = ",.", tapelen = 10000, a) The interpreter of the HackMoji language. # Arguments: - `code`: Your HackMoji code given as a string - `tapelen`: Your HackMoji memory given as number of bytes """ function runme(code::String=",.", tapelen=10000) data = fill(UInt...
[ 27, 34345, 29, 10677, 14, 3849, 3866, 353, 13, 20362, 198, 37811, 198, 220, 220, 220, 1057, 1326, 7, 8189, 3712, 10100, 796, 33172, 33283, 9814, 417, 268, 796, 33028, 11, 257, 8, 198, 198, 464, 28846, 286, 262, 18281, 16632, 7285, 3...
2.024643
771
<gh_stars>1-10 import Observables import AbstractPlotting q1 = Biquaternion(Quaternion(rand(4)), ℝ³(rand(3))) scene = AbstractPlotting.Scene() radius = rand() segments = rand(5:10) color = AbstractPlotting.RGBAf0(rand(4)...) transparency = false sphere = Sphere(q1, scene, radius = radi...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 11748, 19243, 2977, 198, 11748, 27741, 43328, 889, 628, 198, 80, 16, 796, 347, 1557, 9205, 295, 7, 4507, 9205, 295, 7, 25192, 7, 19, 36911, 2343, 226, 251, 126, 111, 7, 25192, 7, 18, 223...
2.247525
303
<gh_stars>0 """ elapsed_time(res, i) Elapsed time in seconds for i-th picture """ elapsed_time(res::ExpImgsResults, i)::Float64 = (Dates.Second(res.time[i] - res.exi.experiment_start)).value """ get_time_series(res::ExpImgsResults, tt) get_time_series(res::ExpImgsResults) tt in seconds since ex.exper...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 220, 220, 220, 42118, 62, 2435, 7, 411, 11, 1312, 8, 198, 198, 9527, 28361, 640, 287, 4201, 329, 1312, 12, 400, 4286, 198, 37811, 198, 417, 28361, 62, 2435, 7, 411, 3712, 16870, 3546, ...
2.033193
5,212
<reponame>UnofficialJuliaMirror/DistributedFactorGraphs.jl-b5cc3c7e-6572-11e9-2517-99fb8daf2f04<gh_stars>10-100 # mutable struct FileDFG # folderName::String # FileDFG(folderName::String)::FileDFG = new(foldername) # end
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 14, 20344, 6169, 41384, 37065, 82, 13, 20362, 12, 65, 20, 535, 18, 66, 22, 68, 12, 2996, 4761, 12, 1157, 68, 24, 12, 1495, 1558, 12, 2079, 21855, 23, 67, 1878, 17, 69...
2.254902
102
<reponame>sethaxen/StatsMakie.jl<filename>src/StatsMakie.jl<gh_stars>0 module StatsMakie using Observables using AbstractPlotting import AbstractPlotting: convert_arguments, used_attributes, plot!, combine, to_plotspec using AbstractPlotting: plottype, Plot, PlotFunc, to_tuple using AbstractPlotting: node_pairs, extre...
[ 27, 7856, 261, 480, 29, 2617, 71, 897, 268, 14, 29668, 44, 461, 494, 13, 20362, 27, 34345, 29, 10677, 14, 29668, 44, 461, 494, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 20595, 44, 461, 494, 198, 198, 3500, 19243, 2977, ...
3.071429
504
using Oceananigans.Solvers using Oceananigans.Operators using Oceananigans.ImmersedBoundaries: ImmersedBoundaryGrid, GridFittedBottom using Oceananigans.Architectures using Oceananigans.Grids: with_halo, isrectilinear using Oceananigans.Fields: Field, ZReducedField using Oceananigans.Architectures: device import Ocean...
[ 3500, 10692, 272, 34090, 13, 36949, 690, 198, 3500, 10692, 272, 34090, 13, 18843, 2024, 198, 3500, 10692, 272, 34090, 13, 24675, 20204, 49646, 3166, 25, 9543, 20204, 49646, 560, 41339, 11, 24846, 37, 2175, 34104, 198, 3500, 10692, 272, ...
1.787421
6,614
module TestAlign if VERSION >= v"0.5-" using Base.Test else using BaseTestNext const Test = BaseTestNext end using Bio using Bio.Seq using Bio.Align using TestFunctions # Generate a random valid alignment of a sequence of length n against a sequence # of length m. If `glob` is true, generate a global al...
[ 21412, 6208, 2348, 570, 198, 198, 361, 44156, 2849, 18189, 410, 1, 15, 13, 20, 21215, 198, 220, 220, 220, 1262, 7308, 13, 14402, 198, 17772, 198, 220, 220, 220, 1262, 7308, 14402, 10019, 198, 220, 220, 220, 1500, 6208, 796, 7308, 14...
1.765897
15,066
<filename>test/runtests.jl using Test using Symbolics using ForwardDiff using LinearAlgebra using SparseArrays using DirectTrajectoryOptimization const DTO = DirectTrajectoryOptimization include("objective.jl") include("dynamics.jl") include("constraints.jl") include("hessian_lagrangian.jl") include("solve.jl")
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 6208, 198, 3500, 41327, 19615, 198, 3500, 19530, 28813, 198, 3500, 44800, 2348, 29230, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 4128, 15721, 752, 652, 27871, 320, 163...
3.13
100
<filename>src/Normal.jl struct Normal{T} μ::T σ::T function Normal(m,s) μ,σ = promote(m,s) T = typeof(μ) new{T}(μ, σ) end end Normal(;μ,σ) = Normal(μ,σ) Base.show(io::IO, o::Normal) = print(io, "Normal(μ=$(o.μ), σ=$(o.σ))") struct NormalRegressor end function (o::NormalRegresso...
[ 27, 34345, 29, 10677, 14, 26447, 13, 20362, 198, 7249, 14435, 90, 51, 92, 198, 220, 220, 220, 18919, 3712, 51, 198, 220, 220, 220, 18074, 225, 3712, 51, 198, 220, 220, 220, 2163, 14435, 7, 76, 11, 82, 8, 198, 220, 220, 220, 220,...
2.020243
494
<filename>Journals/jl/NucleiCytoo_GradWaterTilesMerge.jl<gh_stars>10-100 InputFolder = './Images/NucleiCytoo/'; OutputFolder ='./Results/Images/NucleiCytoo/'; Fill = 1; Lbl = 1; @iA = '*C00*.tif'; @fxg_mGradWaterTiles [iA] > [L]; params.GaussianRadInt = 2; params.ExtendedMinThr = 2; /endf @fxm_lTilesMerge [L, iA] > ...
[ 27, 34345, 29, 41, 18408, 14, 20362, 14, 45, 14913, 72, 20418, 18820, 62, 42731, 19184, 51, 2915, 13102, 469, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 20560, 41092, 796, 705, 19571, 29398, 14, 45, 14913, 72, 20418, 188...
2.154185
227
<gh_stars>1-10 # This file is a part of Julia. License is MIT: https://julialang.org/license struct BatchProcessingError <: Exception data ex end """ pgenerate([::WorkerPool], f, c...) -> iterator Apply `f` to each element of `c` in parallel using available workers and tasks. For multiple collection arg...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2393, 318, 257, 636, 286, 22300, 13, 13789, 318, 17168, 25, 3740, 1378, 73, 377, 498, 648, 13, 2398, 14, 43085, 198, 198, 7249, 347, 963, 18709, 278, 12331, 1279, 25, 35528, 198, ...
2.504171
4,076
export flattened_tup_chain flattened_tup_chain(::Type{NamedTuple{(), Tuple{}}}; prefix = (Symbol(),)) = () flattened_tup_chain(::Type{T}; prefix = (Symbol(),)) where {T <: Real} = (prefix,) flattened_tup_chain(::Type{T}; prefix = (Symbol(),)) where {T <: SArray} = (prefix,) flattened_tup_chain( ::Type{T}; ...
[ 39344, 45096, 62, 83, 929, 62, 7983, 198, 198, 2704, 1078, 2945, 62, 83, 929, 62, 7983, 7, 3712, 6030, 90, 45, 2434, 51, 29291, 90, 22784, 309, 29291, 90, 11709, 19629, 21231, 796, 357, 13940, 23650, 22784, 4008, 796, 7499, 198, 270...
2.300226
443
<gh_stars>0 function add_ref_el(el::XMLElement, param::MyXMLElement) ref_el = new_element(name(param)) set_attribute(ref_el, bn.IDREF, get_id(param)) add_child(el, ref_el) end ################################################################################ ## Parameter ##################################...
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 751, 62, 5420, 62, 417, 7, 417, 3712, 37643, 2538, 1732, 11, 5772, 3712, 3666, 37643, 2538, 1732, 8, 198, 220, 220, 220, 1006, 62, 417, 796, 649, 62, 30854, 7, 3672, 7, 17143, 4008, 198, 22...
2.72955
2,714
function resume_simulation_from_file( input_file::String , output_file::String ; t_end::Float64 = 0.0 ) if(t_end == 0) println("ERROR: please specify a final time by setting 't_end' argument") return end p0 = Param( resume_simulation = :true, ...
[ 8818, 15294, 62, 14323, 1741, 62, 6738, 62, 7753, 7, 198, 220, 220, 220, 5128, 62, 7753, 3712, 10100, 220, 837, 220, 198, 220, 220, 220, 5072, 62, 7753, 3712, 10100, 2162, 220, 198, 220, 220, 220, 256, 62, 437, 3712, 43879, 2414, ...
1.964567
254
#import MAGMA using MAGMA #using MAGMA:gesvd! using MAGMA: MagmaAllVec, gesvd!, libmagma ### some JuliaGPU packages, maybe useful (who knows) using CUDAdrv using CUDAapi using CUDAnative using CuArrays # using Test, LinearAlgebra matrixToTest = rand(Float64, 2, 2) right_answer = svd(matrixToTest).S S = right_ans...
[ 2, 11748, 28263, 5673, 198, 3500, 28263, 5673, 198, 198, 2, 3500, 28263, 5673, 25, 3212, 20306, 0, 198, 3500, 28263, 5673, 25, 2944, 2611, 3237, 53, 721, 11, 308, 274, 20306, 28265, 9195, 19726, 2611, 628, 198, 198, 21017, 617, 22300,...
2.369565
230
<filename>test/FESpacesTests/SparseMatrixAssemblersTests.jl module SparseMatrixAssemblers using Test using Gridap.Arrays using Gridap.TensorValues using Gridap.ReferenceFEs using Gridap.Geometry using Gridap.Fields using Gridap.Algebra using SparseArrays using SparseMatricesCSR using Gridap.FESpaces using Gridap.CellD...
[ 27, 34345, 29, 9288, 14, 37, 1546, 43076, 51, 3558, 14, 50, 29572, 46912, 1722, 4428, 8116, 51, 3558, 13, 20362, 198, 21412, 1338, 17208, 46912, 1722, 4428, 8116, 198, 198, 3500, 6208, 198, 3500, 24846, 499, 13, 3163, 20477, 198, 3500...
2.276316
2,584
using PowerSystems using NLsolve const PSY = PowerSystems ############### Data Network ######################## include(joinpath(dirname(@__FILE__), "dynamic_test_data.jl")) include(joinpath(dirname(@__FILE__), "data_utils.jl")) ############### Data Network ######################## threebus_file_dir = joinpath(dirname...
[ 3500, 4333, 11964, 82, 198, 3500, 22879, 82, 6442, 198, 9979, 6599, 56, 796, 4333, 11964, 82, 198, 198, 7804, 4242, 21017, 6060, 7311, 1303, 14468, 4242, 21017, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, ...
2.336815
766
<gh_stars>0 """ Runs the atkinson94 algorithm and additionally plots the Stalactite text plot as described in the paper. Works for data with less than 100 points at the moment (since screen width of 80-120 is the standard). # References Atkinson, <NAME>. "Fast very robust methods for the detection of multiple outliers...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 10987, 82, 262, 379, 26030, 5824, 11862, 290, 36527, 21528, 262, 520, 282, 529, 578, 2420, 7110, 355, 3417, 287, 262, 3348, 13, 10933, 329, 1366, 351, 1342, 621, 1802, 2173, 379, 262, 258...
2.214286
840