content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>timmyfaraday/MultiStateSystems.jl ################################################################################ # Copyright 2020, <NAME> # ################################################################################ # MultiStateSystems.jl ...
[ 27, 7856, 261, 480, 29, 16514, 1820, 16370, 43593, 14, 29800, 9012, 11964, 82, 13, 20362, 198, 29113, 29113, 14468, 198, 2, 220, 15069, 12131, 11, 1279, 20608, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.19
1,000
<filename>src/graphnodefeaturization.jl import ChemistryFeaturization: encode, encodable_elements, decode, output_shape, features using ChemistryFeaturization.Data using ChemistryFeaturization.ElementFeature using DataFrames const default_nbins = 10 """ GraphNodeFeaturization(atom_features, codecs) GraphNode...
[ 27, 34345, 29, 10677, 14, 34960, 77, 375, 22521, 2541, 1634, 13, 20362, 198, 11748, 27867, 14304, 2541, 1634, 25, 37773, 11, 2207, 375, 540, 62, 68, 3639, 11, 36899, 11, 5072, 62, 43358, 11, 3033, 198, 3500, 27867, 14304, 2541, 1634, ...
2.604685
2,092
<filename>test/ITensorNetworks/models.jl using ITensors using ITensorNetworkAD using ITensorNetworkAD.ITensorNetworks: Models @testset "test local hamiltonian builder" begin Nx = 2 Ny = 3 sites = siteinds("S=1/2", Ny, Nx) H = Models.mpo(Models.Model("tfim"), sites; h=1.0) H_local = Models.localham(Models.Mod...
[ 27, 34345, 29, 9288, 14, 2043, 22854, 7934, 5225, 14, 27530, 13, 20362, 198, 3500, 7283, 641, 669, 198, 3500, 7283, 22854, 26245, 2885, 198, 3500, 7283, 22854, 26245, 2885, 13, 2043, 22854, 7934, 5225, 25, 32329, 198, 198, 31, 9288, 2...
2.522843
197
<reponame>JuliaDiffEq/ArrayInterface.jl using ArrayInterface using ArrayInterfaceOffsetArrays using OffsetArrays using Static using Test A = zeros(3, 4, 5); O = OffsetArray(A, 3, 7, 10); Op = PermutedDimsArray(O,(3,1,2)); @test @inferred(ArrayInterface.offsets(O)) === (4, 8, 11) @test @inferred(ArrayInterface.offsets...
[ 27, 7856, 261, 480, 29, 16980, 544, 28813, 36, 80, 14, 19182, 39317, 13, 20362, 198, 198, 3500, 15690, 39317, 198, 3500, 15690, 39317, 34519, 3163, 20477, 198, 3500, 3242, 2617, 3163, 20477, 198, 3500, 36125, 198, 3500, 6208, 198, 198, ...
2.549068
805
""" Provides the [`render`](@ref) methods to write the documentation as HTML files (`MIME"text/html"`). # Page outline The [`HTMLWriter`](@ref) makes use of the page outline that is determined by the headings. It is assumed that if the very first block of a page is a level 1 heading, then it is intended as the page t...
[ 37811, 198, 15946, 1460, 262, 685, 63, 13287, 63, 16151, 31, 5420, 8, 5050, 284, 3551, 262, 10314, 355, 11532, 3696, 198, 7, 63, 44, 12789, 1, 5239, 14, 6494, 1, 63, 737, 198, 198, 2, 7873, 19001, 198, 198, 464, 685, 63, 28656, ...
2.480597
9,586
<reponame>adelinehillier/LearnConvection using LearnConvection using Plots default_modify_predictor_fn(x, 𝒟, time_index) = x modify_pred_fns = [ default_modify_predictor_fn, append_tke, partial_temp_profile(1:16), partial_temp_profile(17:32), ] f = append_tke problems = [ Slack("KPP"; ...
[ 27, 7856, 261, 480, 29, 324, 4470, 12639, 959, 14, 20238, 3103, 303, 596, 198, 198, 3500, 14365, 3103, 303, 596, 198, 3500, 1345, 1747, 198, 198, 12286, 62, 4666, 1958, 62, 79, 17407, 273, 62, 22184, 7, 87, 11, 220, 47728, 240, 25...
2.15545
1,679
# epsxc only version function XC_c_pw_E( Rhoe ) third = 1.0/3.0 pi34 = 0.6203504908994 rs = pi34/Rhoe^third a = 0.031091 a1 = 0.21370 b1 = 7.5957 b2 = 3.5876 b3 = 1.6382 b4 = 0.49294 # interpolation formula rs12 = sqrt(rs) rs32 = rs * rs12 rs2 = rs^2 om = ...
[ 2, 304, 862, 25306, 691, 2196, 198, 8818, 1395, 34, 62, 66, 62, 79, 86, 62, 36, 7, 10323, 2577, 1267, 628, 220, 220, 220, 2368, 796, 352, 13, 15, 14, 18, 13, 15, 198, 220, 220, 220, 31028, 2682, 796, 657, 13, 38850, 14877, 292...
1.774809
262
<reponame>phaverty/RleVectors.jl module TestUtils using Test using RLEVectors @testset begin # rep @test RLEVectors.rep([4, 5, 6], each = 2) == [4, 4, 5, 5, 6, 6] @test RLEVectors.rep([4, 5, 6], times = 2) == [4, 5, 6, 4, 5, 6] @test RLEVectors.rep([4, 5, 6], each = 3, times = 2) == [4, 4, ...
[ 27, 7856, 261, 480, 29, 7566, 8077, 14, 49, 293, 53, 478, 669, 13, 20362, 198, 21412, 6208, 18274, 4487, 198, 198, 3500, 6208, 198, 3500, 371, 2538, 53, 478, 669, 198, 198, 31, 9288, 2617, 2221, 628, 220, 220, 220, 1303, 1128, 198...
1.918981
864
<gh_stars>1-10 export headtohead using DataFrames, Chain, DataFrameMacros using Cascadia: nodeText using TableScraper: scrape_tables # using Infiltrator using Tables function headtohead(name1, name2; verbose=true) # get the front page front_page_url = "https://www.goratings.org/en/" front_page = scrape_ta...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 39344, 1182, 1462, 2256, 198, 198, 3500, 6060, 35439, 11, 21853, 11, 6060, 19778, 14155, 4951, 198, 3500, 327, 3372, 29523, 25, 10139, 8206, 198, 3500, 8655, 3351, 38545, 25, 42778, 62, 83, ...
2.213467
698
<reponame>pitmonticone/Impute.jl """ KNN(; kwargs...) Imputation using k-Nearest Neighbor algorithm. # Keyword Arguments * `k::Int`: number of nearest neighbors * `dist::MinkowskiMetric`: distance metric suppports by `NearestNeighbors.jl` (Euclidean, Chebyshev, Minkowski and Cityblock) * `threshold::AbstractFloat...
[ 27, 7856, 261, 480, 29, 15544, 8691, 27981, 14, 26950, 1133, 13, 20362, 198, 37811, 198, 220, 220, 220, 509, 6144, 7, 26, 479, 86, 22046, 23029, 198, 198, 3546, 1996, 341, 1262, 479, 12, 8199, 12423, 28708, 11862, 13, 198, 198, 2, ...
2.649083
1,308
<filename>examples/sprites/arrows3d.jl using GLVisualize, GeometryTypes, Reactive, GLAbstraction if !isdefined(:runtests) window = glscreen() timesignal = loop(linspace(0f0, 1f0, 360)) end description = """ Efficiently animated 3D unicode arrow field """ # let the visualization rotate later on rotation = map...
[ 27, 34345, 29, 1069, 12629, 14, 2777, 23156, 14, 6018, 82, 18, 67, 13, 20362, 198, 3500, 10188, 36259, 1096, 11, 2269, 15748, 31431, 11, 797, 5275, 11, 10188, 4826, 301, 7861, 198, 198, 361, 5145, 271, 23211, 7, 25, 81, 2797, 3558, ...
2.858621
290
module ControlBenchmarks ################################################################################ # Main exports from this package # # The individual benchmarks are exported at the top of their respective files. ################################################################################ export controlbenc...
[ 21412, 6779, 44199, 14306, 198, 198, 29113, 29113, 14468, 198, 2, 8774, 15319, 422, 428, 5301, 198, 2, 198, 2, 383, 1981, 31747, 389, 29050, 379, 262, 1353, 286, 511, 11756, 3696, 13, 198, 29113, 29113, 14468, 198, 39344, 1630, 26968, ...
4.030242
496
<filename>test/base.jl @testset "Base Extensions" begin bins = 0:0.1:1.0 @test nextpow2(bins) == 0:0.1:1.6 @test allequal([false]) # assume equality for length 1 arrays @test allequal([0.00, 0, 0im])# check for equivilancy across types end
[ 27, 34345, 29, 9288, 14, 8692, 13, 20362, 198, 31, 9288, 2617, 366, 14881, 49751, 1, 2221, 198, 198, 65, 1040, 796, 657, 25, 15, 13, 16, 25, 16, 13, 15, 198, 31, 9288, 1306, 79, 322, 17, 7, 65, 1040, 8, 6624, 657, 25, 15, 13...
2.525773
97
#!/usr/bin/julia function err() println("Usage: please input a number") end function even_odd(n) if (n % 2 == 0 ) return "Even" else return "Odd" end end try println(even_odd(parse(Int, ARGS[1]))) catch e err() end
[ 198, 2, 48443, 14629, 14, 8800, 14, 73, 43640, 198, 198, 8818, 11454, 3419, 220, 198, 220, 220, 44872, 7203, 28350, 25, 3387, 5128, 257, 1271, 4943, 198, 437, 198, 198, 8818, 772, 62, 5088, 7, 77, 8, 628, 220, 220, 220, 611, 357, ...
2.15
120
<reponame>irhum/CUDA.jl module APIUtils using ..CUDA using Libdl # helpers that facilitate working with CUDA APIs include("call.jl") include("enum.jl") end
[ 27, 7856, 261, 480, 29, 343, 17047, 14, 43633, 5631, 13, 20362, 198, 21412, 7824, 18274, 4487, 198, 198, 3500, 11485, 43633, 5631, 198, 198, 3500, 7980, 25404, 198, 198, 2, 49385, 326, 15570, 1762, 351, 29369, 5631, 23113, 198, 17256, ...
2.807018
57
<reponame>CiaranOMara/BigBed.jl # BigBed Overlap # ============== struct OverlapIterator reader::Reader chromid::UInt32 chromstart::UInt32 chromend::UInt32 end function Base.eltype(::Type{OverlapIterator}) return Record end function Base.IteratorSize(::Type{OverlapIterator}) return Base.SizeU...
[ 27, 7856, 261, 480, 29, 34, 12571, 272, 2662, 3301, 14, 12804, 45896, 13, 20362, 198, 2, 4403, 45896, 3827, 37796, 198, 2, 796, 25609, 28, 198, 198, 7249, 3827, 37796, 37787, 198, 220, 220, 220, 9173, 3712, 33634, 198, 220, 220, 220...
2.49955
1,111
import GreyDecision.GreyNumbers: GreyNumber import GreyDecision.Utility: makeminmax import GreyDecision.Electre: electre @testset "Electre with white numbers" begin tol = 0.00001 w = [0.110, 0.035, 0.379, 0.384, 0.002, 0.002, 0.010, 0.077] Amat = [ 100 92 10 2 80 70 95 80 8...
[ 11748, 13980, 10707, 1166, 13, 49141, 49601, 25, 13980, 15057, 198, 11748, 13980, 10707, 1166, 13, 18274, 879, 25, 787, 1084, 9806, 198, 11748, 13980, 10707, 1166, 13, 19453, 260, 25, 1742, 260, 198, 198, 31, 9288, 2617, 366, 19453, 260...
1.946012
815
# ENV["PYCALL_JL_RUNTIME_PYTHON"] = Sys.which("python") or '' #using PyCall using ElectronicStructure: Atom, Geometry, MolecularSpec, InteractionOperator, MolecularData # using ElectronicStructurePySCF: PySCF using QuantumOps: FermiSum """ qiskit_geometry_to_Geometry(geometry::Matrix) Convert a geometry sp...
[ 2, 12964, 53, 14692, 47, 44816, 7036, 62, 41, 43, 62, 49, 4944, 34694, 62, 47, 56, 4221, 1340, 8973, 796, 311, 893, 13, 4758, 7203, 29412, 4943, 393, 10148, 198, 198, 2, 3500, 9485, 14134, 198, 3500, 19508, 1273, 5620, 25, 33102, ...
2.454842
919
<filename>test/GridapTests/StokesTaylorHoodTests.jl<gh_stars>0 module StokesTaylorHoodTests using Test using Gridap import Gridap: ∇ using LinearAlgebra: tr, ⋅ # Using automatic differentiation u(x) = VectorValue( x[1]^2 + 2*x[2]^2, -x[1]^2 ) p(x) = x[1] + 3*x[2] f(x) = -Δ(u)(x) + ∇(p)(x) g(x) = (∇⋅u)(x) ∇u(x) = ∇(u...
[ 27, 34345, 29, 9288, 14, 41339, 499, 51, 3558, 14, 1273, 3369, 29907, 39, 702, 51, 3558, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21412, 520, 3369, 29907, 39, 702, 51, 3558, 198, 198, 3500, 6208, 198, 3500, 24846, 499, 198, 117...
1.845318
1,196
<gh_stars>0 module LIFNeuron export LIFStates, LIFParams, evolve, update_dc using ...Signals using Printf mutable struct LIFStates{T <: AbstractFloat} v::T t_refractory::T dc::T v_equilibrium::T end function gen_v_eqlbrm(dc::T, tau_refractory::T, v_steady::T) where {T <: AbstractFloat} dc * tau_re...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 406, 5064, 8199, 44372, 198, 39344, 406, 5064, 42237, 11, 406, 5064, 10044, 4105, 11, 18101, 11, 4296, 62, 17896, 198, 3500, 2644, 11712, 874, 198, 3500, 12578, 69, 198, 198, 76, 18187, 2878, ...
2.005489
1,093
<reponame>JuliaTagBot/SampleDistributions.jl<gh_stars>0 using Distributions using SampleDistributions using BenchmarkTools d = SampleDistribution(['a', 'a', 'b', 'c']) d2 = SampleDistribution([1, 1, 2, 3]) v = rand(Char['a', 'b', 'c', 'd'], 1000) D = SampleDistribution(v)
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 36674, 20344, 2455, 507, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 46567, 507, 198, 3500, 27565, 20344, 2455, 507, 198, 3500, 25187, 4102, 33637, 198, 198, 67, 796, 27565, ...
2.59434
106
<gh_stars>0 using POMDPs using POMCPOWRAVE using ProfileView using POMDPModels #= using Gallium breakpoint(Pkg.dir("POMCPOWRAVE", "src", "solver.jl"), 40) =# solver = POMCPOWRAVESolver(tree_queries=50_000, eps=0.01, c=10.0, enable_action_pw=false, ...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 8697, 3913, 3861, 6089, 198, 3500, 13118, 7680, 198, 3500, 350, 2662, 6322, 5841, 1424, 198, 198, 2, 28, 198, 3500, 7096, 1505, 198, 9032, 4122, 7, ...
1.971429
315
# Macro for checking arguments macro check_args(K, param, cond, desc=string(cond)) quote if !($(esc(cond))) throw(ArgumentError(string( $(string(K)), ": ", $(string(param)), " = ", $(esc(param)), " does not ", "satisfy the constraint ", $(string(desc)), "."))) ...
[ 2, 42755, 329, 10627, 7159, 198, 20285, 305, 2198, 62, 22046, 7, 42, 11, 5772, 11, 1779, 11, 1715, 28, 8841, 7, 17561, 4008, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 16763, 7, 3798, 7, 17561, ...
2.206128
359
""" Zeros(::Type{T}, shape...) where T return an all-zero-elements-array of type T which has shape `shape...` # Example julia> Zeros(Array{Float64}, 2, 5) 2×5 Array{Float64,2}: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 """ function Zeros(::Type{T}, shape...) where T return fill!(T(unde...
[ 37811, 198, 220, 220, 220, 1168, 27498, 7, 3712, 6030, 90, 51, 5512, 5485, 23029, 810, 309, 198, 7783, 281, 477, 12, 22570, 12, 68, 3639, 12, 18747, 286, 2099, 309, 543, 468, 5485, 4600, 43358, 986, 63, 198, 198, 2, 17934, 198, 22...
2.111632
3,198
using Tools using Documenter DocMeta.setdocmeta!(Tools, :DocTestSetup, :(using Tools); recursive=true) makedocs(; modules=[Tools], authors="KronosTheLate", repo="https://github.com/KronosTheLate/Tools.jl/blob/{commit}{path}#{line}", sitename="Tools.jl", format=Documenter.HTML(; prettyurls=...
[ 3500, 20003, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 33637, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 20003, 1776, 45115, 28, 7942, 8, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220...
2.271318
258
# OpenCV.jl tests (demos) ################################################################################################# export run_demo demos = [ "CreateImage", # "ImageConversion", # "Thresholding", # "LiveVideo", # "setVideoProperties", # "LiveVideoWithTrackbars...
[ 2, 4946, 33538, 13, 20362, 5254, 357, 9536, 418, 8, 198, 29113, 29113, 29113, 2, 198, 198, 39344, 1057, 62, 9536, 78, 198, 198, 9536, 418, 796, 685, 366, 16447, 5159, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 3...
2.341538
325
<reponame>kdayday/SIIPExamples.jl<gh_stars>0 # # Simulations with TAMU data and [PowerSimulations.jl](https://github.com/NREL/PowerSimulations.jl) # **Originally Contributed by**: <NAME> # ## Introduction # This is a basic simulation example using the [TAMU Cases](https://electricgrids.engr.tamu.edu/). # ## Depende...
[ 27, 7856, 261, 480, 29, 74, 820, 820, 14, 50, 3978, 47, 27730, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2, 1303, 3184, 5768, 351, 33112, 52, 1366, 290, 685, 13434, 8890, 5768, 13, 20362, 16151, 5450, 1378, 12567, 13, 785, 14, ...
2.919126
915
<filename>test/options.jl @testset "Options" begin cbc_optimizer = optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0) @test_logs (:error, r"Possible values are") Model(optimizer_with_attributes( CS.Optimizer, "lp_optimizer" => cbc_optimizer, "logging" => [], "traverse_stra...
[ 27, 34345, 29, 9288, 14, 25811, 13, 20362, 198, 31, 9288, 2617, 366, 29046, 1, 2221, 198, 220, 220, 220, 269, 15630, 62, 40085, 7509, 796, 6436, 7509, 62, 4480, 62, 1078, 7657, 7, 34, 15630, 13, 27871, 320, 7509, 11, 366, 6404, 49...
2.217949
156
<filename>src/api/model_IoK8sApiBatchV1beta1CronJob.jl # This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct IoK8sApiBatchV1beta1CronJob <: SwaggerModel apiVersion::Any # spec type: Union{ Nothing, String } # spe...
[ 27, 34345, 29, 10677, 14, 15042, 14, 19849, 62, 40, 78, 42, 23, 82, 32, 14415, 33, 963, 53, 16, 31361, 16, 34, 1313, 33308, 13, 20362, 198, 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13...
2.521495
1,070
<filename>src/fs_expansion.jl """ fs_expansion(x, u, v, L, T, n = i -> 2^-(1 + i/2)) Global recursion: find the value of the process on the dyadic points given by the first L Levels, `x` is a vector containing coordinates `u`,`v` initial and final point `T` length of the basis `n` is the normalization function...
[ 27, 34345, 29, 10677, 14, 9501, 62, 11201, 5487, 13, 20362, 198, 198, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 43458, 62, 11201, 5487, 7, 87, 11, 334, 11, 410, 11, 406, 11, 309, 11, 299, 796, 1312, 4613, 362, 61, 30420, 16...
1.89653
1,585
#= surface_test: - Julia version: 1.1.0 - Author: Jirik - Date: 2019-03-19 =# # using Revise using Test using Logging using SparseArrays using Distributed if nprocs() == 1 addprocs(3) end @everywhere using LarSurf # using Plasm # using LinearAlgebraicRepresentation # Lar = LinearAlgebraicRepresentation @testset "...
[ 2, 28, 198, 42029, 62, 9288, 25, 198, 12, 22300, 2196, 25, 352, 13, 16, 13, 15, 198, 12, 6434, 25, 449, 343, 1134, 198, 12, 7536, 25, 13130, 12, 3070, 12, 1129, 198, 46249, 198, 2, 1262, 5416, 786, 198, 3500, 6208, 198, 3500, ...
2.419954
431
3 #run reload("IBFS") Sim = IBFS.Simulation() Sim.configure() Sim.setup()
[ 18, 1303, 5143, 198, 198, 260, 2220, 7203, 9865, 10652, 4943, 198, 198, 8890, 796, 34782, 10652, 13, 8890, 1741, 3419, 198, 8890, 13, 11250, 495, 3419, 198, 8890, 13, 40406, 3419 ]
2.34375
32
<filename>hysynth/pwld/julia_bridge/plot_results.jl<gh_stars>1-10 using Plots, Polyhedra using LazySets: center, HalfSpace include("simplify_set.jl") include("analyze_sequence.jl") include("sample.jl") function create_plot(; layout=1) return plot(aspect_ratio=1, layout=layout) end function plot_results(x0::Abstr...
[ 27, 34345, 29, 71, 893, 2047, 400, 14, 79, 86, 335, 14, 73, 43640, 62, 9458, 14, 29487, 62, 43420, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 1345, 1747, 11, 12280, 704, 430, 198, 3500, 406, 12582, 50, 1039, 25, ...
1.927918
1,859
# Copyright (c) 2021 <NAME> # Copyright (c) 2000 <NAME> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
[ 2, 220, 220, 220, 15069, 357, 66, 8, 33448, 1279, 20608, 29, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 4751, 1279, 20608, 29, 198, 2, 198, 2, 220, 220, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, ...
2.656566
693
<filename>src/filters.jl<gh_stars>0 using DSP """ highlow_butterworth_filter(data,sampling_rate; low_pass=30, high_pass=1, bw_n_pole=5, offset=true) Applies a high and low-pass filter of butterworth design (n pole 5). For altering the threshold values for filters, change add keyword arguments low_pass for low pas...
[ 27, 34345, 29, 10677, 14, 10379, 1010, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 360, 4303, 198, 198, 37811, 198, 220, 220, 220, 1029, 9319, 62, 4360, 353, 9268, 62, 24455, 7, 7890, 11, 37687, 11347, 62, 4873, 26, 1877, 62...
2.650924
974
struct Animal name::String end sayname(a::Animal) = print("My name is $(a.name).") mydog = Animal("Tom") sayname(mydog)
[ 7249, 13792, 198, 220, 220, 220, 1438, 3712, 10100, 198, 437, 198, 198, 16706, 3672, 7, 64, 3712, 40002, 8, 796, 3601, 7203, 3666, 1438, 318, 29568, 64, 13, 3672, 8, 19570, 198, 198, 1820, 9703, 796, 13792, 7203, 13787, 4943, 198, 1...
2.54
50
<filename>test/runtests.jl using ChainRulesCore using FiniteDifferences using LinearAlgebra using Printf using Random using StaticArrays using Test # Test struct for `rand_tangent` and `difference`. struct Foo a::Float64 b::Int c::Any end @testset "FiniteDifferences" begin include("rand_tangent.jl") ...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 21853, 37766, 14055, 198, 3500, 4463, 578, 28813, 4972, 198, 3500, 44800, 2348, 29230, 198, 3500, 12578, 69, 198, 3500, 14534, 198, 3500, 36125, 3163, 20477, 198, 3500, 6208...
2.678571
168
const USE_GPU = false const VISUALIZE = true const BENCHMARK = false include("elastic_wave_3D.jl") elastic_wave_3D(128, 10.0)
[ 9979, 23210, 62, 33346, 796, 3991, 198, 9979, 50035, 25620, 35400, 796, 2081, 198, 9979, 44849, 3398, 44, 14175, 796, 3991, 198, 17256, 7203, 417, 3477, 62, 19204, 62, 18, 35, 13, 20362, 4943, 198, 198, 417, 3477, 62, 19204, 62, 18, ...
2.52
50
using NetworkModels using Documenter DocMeta.setdocmeta!(NetworkModels, :DocTestSetup, :(using NetworkModels); recursive=true) makedocs(; modules=[NetworkModels], authors="<NAME>, University of Namur", repo="https://github.com/csimal/NetworkModels.jl/blob/{commit}{path}#{line}", sitename="NetworkModel...
[ 3500, 7311, 5841, 1424, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 26245, 5841, 1424, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 7311, 5841, 1424, 1776, 45115, 28, 7942, 8, 198, 198, 76, 4335, 42...
2.400749
267
include("./imports.jl") @testset ExtendedTestSet "Normalize" begin @testset ExtendedTestSet "normalize" begin image = rand(Float32, 10, 10, 3) means = SVector{3}(rand(Float32, 1, 1, 3)) stds = SVector{3}(rand(Float32, 1, 1, 3)) @test denormalize(normalize(copy(image), means, stds)...
[ 17256, 7, 1911, 14, 320, 3742, 13, 20362, 4943, 628, 198, 198, 31, 9288, 2617, 24204, 14402, 7248, 366, 26447, 1096, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 24204, 14402, 7248, 366, 11265, 1096, 1, 2221, 198, 220, 220, 220, 2...
2.258946
1,537
using Pkg.Artifacts import ONNXNaiveNASflux.BaseOnnx: readproto, TensorProto import ONNXNaiveNASflux: CompGraphBuilder, extract using Downloads using Downloads: download const last_dl_time = Dict() function prepare_node_test(name, ninputs, noutputs) ahash = get_node_artifact(name, ninputs=ninputs, noutputs=noutp...
[ 3500, 350, 10025, 13, 8001, 37199, 198, 11748, 440, 6144, 55, 26705, 425, 18293, 69, 22564, 13, 14881, 2202, 77, 87, 25, 1100, 1676, 1462, 11, 309, 22854, 2964, 1462, 198, 11748, 440, 6144, 55, 26705, 425, 18293, 69, 22564, 25, 220, ...
2.282943
1,237
using CSV, StateSpaceModels, Plots, Dates # Load the Nile annual flow dataset nile = CSV.read("Nile.csv") # Convert data to an array of Float64 flow = Float64.(nile.Flow) # Plot the data p1 = plot(nile.Year, flow, label = "Annual flow", legend = :topright, color = :black) # Specify the state-space model model = loc...
[ 3500, 44189, 11, 1812, 14106, 5841, 1424, 11, 1345, 1747, 11, 44712, 198, 198, 2, 8778, 262, 38063, 5079, 5202, 27039, 198, 77, 576, 796, 44189, 13, 961, 7203, 45, 576, 13, 40664, 4943, 198, 198, 2, 38240, 1366, 284, 281, 7177, 286,...
2.627389
314
function step!(x,bkhs) nε = size(bkhs.D)[2] ε = rand(Normal(),nε) x .= bkhs.C*x + bkhs.D*ε return x end function timeseries(bkhs,n) m = size(bkhs.C)[1] # number of equations x = zeros(m) ts = zeros(n,m) for τ in 1:n ts[τ,:] = step!(x,bkhs) ...
[ 198, 198, 8818, 2239, 0, 7, 87, 11, 65, 74, 11994, 8, 198, 220, 220, 220, 220, 220, 220, 299, 30950, 796, 2546, 7, 65, 74, 11994, 13, 35, 38381, 17, 60, 198, 220, 220, 220, 220, 220, 220, 7377, 113, 220, 796, 43720, 7, 26447, ...
1.570755
424
<filename>src/tierra/organism/organism.jl using DataStructures: CircularBuffer using SHA mutable struct TierrianOrganism key::UInt64 a::UInt16 b::UInt16 c::UInt16 d::UInt16 stack::CircularBuffer{UInt16} ip::UInt16 error_flag::Bool start_address::UInt16 length::UInt16 ...
[ 27, 34345, 29, 10677, 14, 83, 16367, 14, 9971, 1042, 14, 9971, 1042, 13, 20362, 198, 3500, 6060, 44909, 942, 25, 7672, 934, 28632, 198, 3500, 25630, 198, 198, 76, 18187, 2878, 15917, 4484, 26121, 1042, 198, 220, 220, 220, 1994, 3712, ...
2.48
350
<reponame>jonathanBieler/JuliaWordsUtils.jl using JuliaWordsUtils using Test tostring(s,ij) = s[ij[1]:ij[2]] # write your own tests here @testset "select_word_backward" begin @test select_word_backward(3,"1234") == (1,3) @test select_word_backward(3,"1234",true) == (1,3) @test select_word_backward(10,"se...
[ 27, 7856, 261, 480, 29, 46286, 6696, 33, 8207, 263, 14, 16980, 544, 37117, 18274, 4487, 13, 20362, 198, 3500, 22300, 37117, 18274, 4487, 198, 3500, 6208, 198, 198, 83, 455, 1806, 7, 82, 11, 2926, 8, 796, 264, 58, 2926, 58, 16, 597...
2.197269
659
abstract type PointTriangulationPartition{D, T} <: AbstractTriangulationPartition{D, T} end abstract type PointTriangulationPartitionFull{D, T} <: AbstractTriangulationPartitionFull{D, T} end abstract type MutablePointTriangulationPartition{D, T} <: AbstractMutableTriangulationPartition{D, T} end abstract type Mutable...
[ 397, 8709, 2099, 6252, 14824, 648, 1741, 7841, 653, 90, 35, 11, 309, 92, 1279, 25, 27741, 14824, 648, 1741, 7841, 653, 90, 35, 11, 309, 92, 886, 198, 397, 8709, 2099, 6252, 14824, 648, 1741, 7841, 653, 13295, 90, 35, 11, 309, 92, ...
2.892473
837
<gh_stars>0 #= Transforms.jl: Author: <NAME> (<EMAIL>) Acknowledgements- Original source - https://github.com/fastai/fastai2/blob/master/fastai2/data/transforms.py Original documentation- https://github.com/fastai/fastai2/blob/master/nbs/05_data.transforms.ipynb Helper functions for processing data and basi...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 28, 198, 8291, 23914, 13, 20362, 25, 198, 198, 13838, 25, 1279, 20608, 29, 38155, 27630, 4146, 43734, 198, 198, 39482, 43547, 12, 198, 20556, 2723, 532, 198, 220, 220, 220, 3740, 1378, 12567, 13, ...
2.545691
6,161
m = Model(GLPK.Optimizer) @variable(m, x ≥ 0) lista = [] push!(lista,@expression(m, x-1)) push!(lista,@expression(m, x-2)) push!(lista,@expression(m, x-3))
[ 76, 796, 9104, 7, 8763, 40492, 13, 27871, 320, 7509, 8, 198, 198, 31, 45286, 7, 76, 11, 2124, 26870, 657, 8, 198, 198, 4868, 64, 796, 17635, 198, 198, 14689, 0, 7, 4868, 64, 11, 31, 38011, 7, 76, 11, 2124, 12, 16, 4008, 198, ...
2.038462
78
#!/usr/bin/env julia using RobotOS @rosimport geometry_msgs.msg: Point, Pose, Pose2D, PoseStamped, Vector3, Twist @rosimport std_srvs.srv: Empty, SetBool @rosimport nav_msgs.srv.GetPlan @rosimport gazebo_msgs.msg: ModelState, ModelStates @rosimport gazebo_msgs.srv: SetModelState, GetModelState, GetWorldProperties rost...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 3500, 16071, 2640, 198, 31, 4951, 11748, 22939, 62, 907, 14542, 13, 19662, 25, 6252, 11, 37557, 11, 37557, 17, 35, 11, 37557, 1273, 13322, 11, 20650, 18, 11, 44088, 198, 31, 495...
2.567682
1,411
module TestEduction using Test using Transducers @testset "composition" begin ed1 = eduction(Map(sin), 1:2) ed2 = eduction(Map(cos), ed1) ed3 = eduction(Map(tan), ed2) @test Transducer(ed1) === Map(sin) @test Transducer(ed2) === opcompose(Map(sin), Map(cos)) @test Transducer(ed3) === opcompose...
[ 21412, 6208, 36, 11124, 198, 198, 3500, 6208, 198, 3500, 3602, 41213, 198, 198, 31, 9288, 2617, 366, 785, 9150, 1, 2221, 198, 220, 220, 220, 1225, 16, 796, 1225, 8110, 7, 13912, 7, 31369, 828, 352, 25, 17, 8, 198, 220, 220, 220, ...
2.28
250
<gh_stars>1-10 #### Deprecate on 0.5 (to be removed on 0.6) function dim(d::MultivariateDistribution) Base.depwarn("dim(d::MultivariateDistribution) is deprecated. Please use length(d).", :dim) return length(d) end function binaryentropy(d::UnivariateDistribution) Base.depwarn("binaryentropy is deprecat...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 4242, 2129, 8344, 378, 319, 657, 13, 20, 357, 1462, 307, 4615, 319, 657, 13, 21, 8, 198, 198, 8818, 5391, 7, 67, 3712, 15205, 42524, 20344, 3890, 8, 198, 220, 220, 220, 7308, 13, ...
2.707581
277
const FIG_DIR = joinpath(WATERFALL_DIR,"fig") # Dimensions WIDTH = 800 HEIGHT = 400 BORDER = 10 TOP_BORDER = 20 BOTTOM_BORDER = 30 LEFT_BORDER = 70 RIGHT_BORDER = 20 SEP = 10 FONTSIZE = 18 VMAX = 22.5 VMIN = 16 # Names const SAMPLE_COL = :Sample const VALUE_COL = :Value # Colors const HEX_LOSS = parse(Luxor.Coloran...
[ 9979, 19697, 62, 34720, 796, 4654, 6978, 7, 54, 23261, 37, 7036, 62, 34720, 553, 5647, 4943, 198, 198, 2, 41265, 198, 54, 2389, 4221, 796, 10460, 198, 13909, 9947, 796, 7337, 198, 33, 12532, 1137, 796, 838, 198, 35222, 62, 33, 12532...
1.978745
988
<reponame>johnnychen94/FixedPointNumbers.jl import Base.@deprecate_binding function floattype(::Type{T}) where {T <: Real} Base.depwarn(""" In a future release, the fallback definition of `floattype` will throw a MethodError if it cannot return a type `<:AbstractFloat`. See the documentation on `fl...
[ 27, 7856, 261, 480, 29, 30686, 3281, 6607, 5824, 14, 13715, 12727, 49601, 13, 20362, 198, 11748, 7308, 13, 31, 10378, 8344, 378, 62, 30786, 198, 198, 8818, 12178, 4906, 7, 3712, 6030, 90, 51, 30072, 810, 1391, 51, 1279, 25, 6416, 92...
2.934211
152
<reponame>JuliaBinaryWrappers/GR_jll.jl<filename>src/GR_jll.jl<gh_stars>1-10 # Use baremodule to shave off a few KB from the serialized `.ji` file baremodule GR_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("GR") JLLWrappers.@generate_main_file("GR", UUID("d2c73de3-f751-5644...
[ 27, 7856, 261, 480, 29, 16980, 544, 33, 3219, 36918, 11799, 14, 10761, 62, 73, 297, 13, 20362, 27, 34345, 29, 10677, 14, 10761, 62, 73, 297, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 5765, 6247, 21412, 284, 34494, ...
2.388158
152
""" load(fpath::String; gamma::Union{Nothing,Float64}=nothing) Read a `.png` image from file at `fpath`. `gamma` can be used to override the automatic gamma correction, a value of 1.0 means no gamma correction. Returns a matrix. The result will be an 8 bit (N0f8) image if the source bit depth is <= 8 bits, 16 bit...
[ 37811, 198, 220, 220, 220, 3440, 7, 69, 6978, 3712, 10100, 26, 34236, 3712, 38176, 90, 18465, 11, 43879, 2414, 92, 28, 22366, 8, 198, 198, 5569, 257, 4600, 13, 11134, 63, 2939, 422, 2393, 379, 4600, 69, 6978, 44646, 4600, 28483, 261...
2.199252
6,153
<gh_stars>100-1000 name = "LLVM" llvm_full_version = v"9.0.1+4" libllvm_version = v"9.0.1+5" # Include common LLVM stuff include("../common.jl") build_tarballs(ARGS, configure_extraction(ARGS, llvm_full_version, name, libllvm_version)...; skip_audit=true)
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3672, 796, 366, 3069, 15996, 1, 198, 297, 14761, 62, 12853, 62, 9641, 796, 410, 1, 24, 13, 15, 13, 16, 10, 19, 1, 198, 8019, 297, 14761, 62, 9641, 796, 410, 1, 24, 13, 15, 13, 16...
2.401869
107
<gh_stars>0 # (a<1) & (a>0) # (β<1) & (β>0) # -a+β < 0 using NLopt using Revise function func(x, p) # simple linear func x*p[1] + p[2] end function cost(p, xvec, actual) # predicted pred = func.(xvec, (p,)) # cost sum((pred .- actual).^2) end function constraint1(p) p[1] - p[2] end fun...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 357, 64, 27, 16, 8, 1222, 357, 64, 29, 15, 8, 198, 2, 357, 26638, 27, 16, 8, 1222, 357, 26638, 29, 15, 8, 198, 2, 532, 64, 10, 26638, 1279, 657, 198, 198, 3500, 22879, 8738, 198, 3500, 5...
2.173494
415
<reponame>jalving/ModelGraphSolvers.jl<filename>src/DualDecomposition/optimizer.jl mutable struct DDOptimizer <: AbstractGraphOptimizer dd_model::DDModel end function DDOptimizer() end JuMP.optimize!(graph::ModelGraph,optimizer::DDOptimizer) = dual_decomposition_solve(graph,optimizer.args...;optimizer.kwargs...)...
[ 27, 7856, 261, 480, 29, 73, 282, 1075, 14, 17633, 37065, 36949, 690, 13, 20362, 27, 34345, 29, 10677, 14, 36248, 10707, 296, 9150, 14, 40085, 7509, 13, 20362, 198, 76, 18187, 2878, 360, 18227, 457, 320, 7509, 1279, 25, 27741, 37065, ...
2.767241
116
<reponame>RvSpectML/NeidSolarScripts.jl<gh_stars>0 ### A Pluto.jl notebook ### # v0.14.5 using Markdown using InteractiveUtils # ╔═╡ 723b4419-4413-431a-9a2b-5a501cbd2607 begin import Pkg; Pkg.activate(joinpath(homedir(),"Code","RvSpectMLEcoSystem","NeidSolarScripts")) begin using CSV, JLD2, FileIO using Data...
[ 27, 7856, 261, 480, 29, 49, 85, 49738, 5805, 14, 8199, 312, 38825, 7391, 82, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1415, 13, 20, 198, 198, 3500, 2940, 2902, ...
1.793837
6,393
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md include("vonmises.jl") # Elasticity problems abstract ElasticPlasticProblem <: AbstractProblem abstract PlaneStressElasticPlasticProblem <: ElasticPlasticProblem function get_unknown_fie...
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 37, 3620, 13, 198, 2, 13789, 318, 17168, 25, 766, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 37, 3620, 14, 16980, 544, 37, 3620, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, ...
1.904125
4,339
<reponame>benandow/UiRef module disambig export adagramDisambig using AdaGram GC.enable(false) vm, dict = load_model("model/model_output_full.out"); function adagramDisambig(target_word, context) counter = 0 maxval = 0.0 maxcnt = 0 arr = disambiguate(vm, dict, target_word, split(context)) for w in arr coun...
[ 27, 7856, 261, 480, 29, 11722, 392, 322, 14, 52, 72, 8134, 198, 21412, 595, 4131, 328, 198, 39344, 512, 6713, 7279, 4131, 328, 198, 198, 3500, 47395, 38, 859, 198, 198, 15916, 13, 21633, 7, 9562, 8, 198, 14761, 11, 8633, 796, 3440...
2.432749
171
<reponame>maccam912/adventofcode2018<gh_stars>0 using LightGraphs, SimpleWeightedGraphs const Y_INC = 16807 const X_INC = 48271 const DEPTH = 8103 const TARGET_X = 9 const TARGET_Y = 758 const WIDTH = TARGET_X*20 const HEIGHT = TARGET_Y+40 mutable struct Rescuer x::Int64 y::Int64 tool::String...
[ 27, 7856, 261, 480, 29, 76, 4134, 321, 24, 1065, 14, 324, 1151, 1659, 8189, 7908, 27, 456, 62, 30783, 29, 15, 198, 3500, 4401, 37065, 82, 11, 17427, 25844, 276, 37065, 82, 201, 198, 201, 198, 9979, 575, 62, 30158, 796, 1467, 36928...
1.64951
3,264
""" # Description Predict profile across all time steps for the true check. - if the problem is sequential, predict profiles from start to finish without the training, using only the initial profile as the initial condition. - if the problem is residual, predict profiles at each timestep using model-predicted ...
[ 198, 37811, 198, 2, 12489, 198, 47, 17407, 7034, 1973, 477, 640, 4831, 329, 262, 2081, 2198, 13, 198, 220, 220, 220, 532, 611, 262, 1917, 318, 35582, 11, 4331, 16545, 422, 923, 284, 5461, 1231, 262, 3047, 11, 1262, 691, 262, 4238, ...
2.153261
4,078
module Testing import ..NodalDG using Test @test_throws AssertionError NodalDG.Mesh1D([0, 1, 2], [[1 2]; [2 3]; [3 4]]) @test_throws AssertionError NodalDG.Mesh1D([0, 1, 2], [[0 1]; [1 2]]) let mesh = NodalDG.Mesh1D([0, 1, 2, 3],...
[ 21412, 23983, 198, 198, 11748, 11485, 45, 375, 282, 35, 38, 198, 198, 3500, 6208, 198, 198, 31, 9288, 62, 400, 8516, 2195, 861, 295, 12331, 399, 375, 282, 35, 38, 13, 37031, 16, 35, 26933, 15, 11, 352, 11, 362, 4357, 198, 220, 2...
1.71517
323
<gh_stars>1-10 module OutlierDetectionNeighbors using OutlierDetectionInterface using OutlierDetectionInterface:SCORE_UNSUPERVISED const OD = OutlierDetectionInterface import NearestNeighbors const NN = NearestNeighbors import Distances const DI = Distances include("utils.jl") inc...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 3806, 2505, 11242, 3213, 46445, 32289, 198, 220, 220, 220, 1262, 3806, 2505, 11242, 3213, 39317, 198, 220, 220, 220, 1262, 3806, 2505, 11242, 3213, 39317, 25, 6173, 6965, 62, 4944, 4033...
2.073986
419
# --- # title: 1467. Probability of a Two Boxes Having The Same Number of Distinct Balls # id: problem1467 # author: <NAME> # date: 2020-10-31 # difficulty: Hard # categories: Math, Backtracking # link: <https://leetcode.com/problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls/description/> # hi...
[ 2, 11420, 198, 2, 3670, 25, 1478, 3134, 13, 30873, 1799, 286, 257, 4930, 8315, 274, 11136, 383, 16766, 7913, 286, 4307, 4612, 39332, 198, 2, 4686, 25, 1917, 1415, 3134, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 1...
2.585593
1,291
<filename>docs/make.jl using Documenter using Unfold using DocStringExtensions using Plots gr() #unicodeplots() makedocs(sitename="Unfold.jl", root = joinpath(dirname(pathof(Unfold)), "..", "docs"), prettyurls = get(ENV, "CI", nothing) == "true", pages = [ "index.md", "L...
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 16854, 263, 198, 3500, 791, 11379, 198, 3500, 14432, 10100, 11627, 5736, 198, 3500, 1345, 1747, 198, 2164, 3419, 198, 2, 46903, 1098, 489, 1747, 3419, 198, 198, 76, 4335, 420, 82,...
2.149378
241
<reponame>mamta-borle/Respository_Mamta const WEAT_WORD_SETS = ( science_arts=( S=("science","technology","physics","chemistry","einstein","nasa","experiment","astronomy"), T=("poetry","art","shakespeare","dance","literature","novel","symphony","drama"), A=("male","man","boy","brother","he","him","his","son"), B=("fema...
[ 27, 7856, 261, 480, 29, 76, 321, 8326, 12, 2865, 293, 14, 4965, 1930, 37765, 62, 44, 321, 8326, 198, 9979, 12887, 1404, 62, 54, 12532, 62, 28480, 50, 796, 198, 7, 198, 16801, 62, 5889, 16193, 198, 50, 28, 7203, 16801, 2430, 45503,...
2.913907
453
@testset "Ewald Summation" begin function test_ewald_NaCl() lat_vecs = [1.0 0 0; 0 1.0 0; 0 0 1.0] b_vecs = [zeros(3)] latsize = [2, 2, 2] lattice = Sunny.Lattice(lat_vecs, b_vecs, latsize) sys = ChargeSystem(lattice) sys.sites .= reshape([1, -1, -1, 1, -...
[ 31, 9288, 2617, 366, 36, 21667, 5060, 76, 341, 1, 2221, 198, 198, 8818, 1332, 62, 413, 1940, 62, 26705, 2601, 3419, 198, 220, 220, 220, 3042, 62, 303, 6359, 796, 685, 16, 13, 15, 657, 220, 220, 657, 26, 198, 220, 220, 220, 220, ...
1.943005
3,088
facts("is_square_stochastic with sparse transition") do @fact is_square_stochastic(speye(10)) => true @fact is_square_stochastic([ speye(10) for _ = 1:3 ]) => true @fact is_square_stochastic([ 2*speye(10) for _ = 1:3 ]) => false end facts("square stochastic with Int transition") do @fact is_square_stoc...
[ 37473, 7203, 271, 62, 23415, 62, 301, 5374, 3477, 351, 29877, 6801, 4943, 466, 198, 220, 220, 220, 2488, 22584, 318, 62, 23415, 62, 301, 5374, 3477, 7, 4125, 5948, 7, 940, 4008, 5218, 2081, 198, 220, 220, 220, 2488, 22584, 318, 62, ...
2.265577
979
using GitHub, JSON, HTTP, MbedTLS using Dates, Test, Base64 using GitHub: Branch, name using GitHub.Checks include("ghtype_tests.jl") include("event_tests.jl") include("read_only_api_tests.jl") include("auth_tests.jl") @testset "SSH keygen" begin pubkey, privkey = GitHub.genkeys(keycomment="GitHub.jl") @test ...
[ 3500, 21722, 11, 19449, 11, 14626, 11, 337, 3077, 51, 6561, 198, 3500, 44712, 11, 6208, 11, 7308, 2414, 198, 3500, 21722, 25, 20551, 11, 1438, 198, 3500, 21722, 13, 7376, 4657, 198, 198, 17256, 7203, 456, 4906, 62, 41989, 13, 20362, ...
2.619048
147
<gh_stars>1-10 #all kernel functions are normalized such that their support radius is h @fastmath function pos(x::Float64)::Float64 return (x > 0.0 ? x : 0.0) end """ spline23(h::Float64, r::Float64)::Float64 Returns ``w(r)``, the value of a 2d cubic spline ``w`` with support radius `h`. Integrates to unity. "...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 439, 9720, 5499, 389, 39279, 884, 326, 511, 1104, 16874, 318, 289, 198, 198, 31, 7217, 11018, 2163, 1426, 7, 87, 3712, 43879, 2414, 2599, 25, 43879, 2414, 198, 197, 7783, 357, 87, 1875,...
2.123362
2,748
<gh_stars>0 using Pkg if lowercase(get(ENV, "CI", "false")) == "true" if Sys.islinux() let basepython = get(ENV, "PYTHON", "python3") envpath = joinpath(@__DIR__, "env") run(`virtualenv --python=$basepython $envpath`) # python = joinpath(envpath, "Scripts", "python.exe") python =...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 350, 10025, 198, 198, 361, 2793, 7442, 7, 1136, 7, 1677, 53, 11, 366, 25690, 1600, 366, 9562, 48774, 6624, 366, 7942, 1, 198, 220, 611, 311, 893, 13, 271, 23289, 3419, 198, 220, 220, 220, 1...
2.123894
226
module CreateTablePermissions import SearchLight.Migrations: create_table, column, primary_key, add_index, drop_table function up() create_table(:permissions) do [ primary_key() column(:name, :string, limit = 100) ] end add_index(:permissions, :name) end function down() drop_table(:permi...
[ 21412, 13610, 10962, 5990, 8481, 198, 198, 11748, 11140, 15047, 13, 44, 3692, 602, 25, 2251, 62, 11487, 11, 5721, 11, 4165, 62, 2539, 11, 751, 62, 9630, 11, 4268, 62, 11487, 198, 198, 8818, 510, 3419, 198, 220, 2251, 62, 11487, 7, ...
2.696
125
# LibFTD2XX.jl # # Library installation script based on BinaryProvider LibFoo.jl example using Libdl using BinaryProvider verbose = true prefix = joinpath(@__DIR__, "usr") if Sys.islinux() libnames = ["libftd2xx", "libftd2xx.1.4.4", "libftd2xx.so.1.4.8"] products = Product[LibraryProduct(joinpath(prefix, "r...
[ 2, 7980, 9792, 35, 17, 8051, 13, 20362, 198, 2, 198, 2, 10074, 9988, 4226, 1912, 319, 45755, 29495, 7980, 37, 2238, 13, 20362, 1672, 198, 198, 3500, 7980, 25404, 198, 3500, 45755, 29495, 198, 198, 19011, 577, 796, 2081, 198, 198, 40...
2.000592
1,690
<gh_stars>0 using Distributed addprocs(12, exeflags="--project") # create worker processes with current project activated @everywhere include("parallel_setup.jl") # simulated annealing parameters T₀ = 0.5 N = 68 Ns = 36 Nt = 10 tol = 1.0 # bounds and step length ub = repeat([1.0, repeat([0.5, 0.5, 1.0], 3)...], 6)...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 4307, 6169, 198, 198, 2860, 1676, 6359, 7, 1065, 11, 409, 891, 75, 3775, 2625, 438, 16302, 4943, 220, 220, 1303, 2251, 8383, 7767, 351, 1459, 1628, 13906, 198, 31, 16833, 3003, 2291, 7203, 1845...
2.168755
1,197
using Documenter, SparseRegression makedocs( format = Documenter.HTML(), sitename = "SparseRegression.jl", authors = "<NAME>", clean = true, pages = [ "index.md", "usage.md", "algorithms.md" ] ) deploydocs( repo = "github.com/joshday/SparseRegression.jl.git", )
[ 3500, 16854, 263, 11, 1338, 17208, 8081, 2234, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 5794, 796, 16854, 263, 13, 28656, 22784, 198, 220, 220, 220, 1650, 12453, 796, 366, 50, 29572, 8081, 2234, 13, 20362, 1600, 198, 220,...
2.134228
149
#using Pkg #Pkg.add("Flux") using Flux using Flux.Tracker # executable math f(x) = x^2+1 # f'(x) = 2x df(x) = gradient(f,x,nest=true)[1] # df is a tuple, [1] gets the first coordinate df(4) # f''(x) = 2 ddf(x) = gradient(df,x,nest=true)[1] ddf(0) h(x) = -cos(x)^cos(x) # h'(x) = tan(x)cos(x)^(cos(x)+1)(log...
[ 198, 198, 2, 3500, 350, 10025, 198, 2, 47, 10025, 13, 2860, 7203, 37, 22564, 4943, 198, 3500, 1610, 2821, 198, 198, 3500, 1610, 2821, 13, 35694, 198, 198, 2, 28883, 10688, 198, 69, 7, 87, 8, 796, 2124, 61, 17, 10, 16, 198, 198, ...
2.288647
828
getDays(resource,subcal) = (x->x.date[1]).(filter(day ->day.date in subcal,resource.calendar.workdays)) function buildJd(timeslots,subcal) timeslots |> @filter(_.dayID in keys(subcal) && !_.booked)|>@groupby(_.resourceID) |>@map((d = key(_),j = unique(map(x->x.dayID,_)))) |> NDSparse end function buildI(timeslot...
[ 198, 1136, 38770, 7, 31092, 11, 7266, 9948, 8, 796, 357, 87, 3784, 87, 13, 4475, 58, 16, 35944, 7, 24455, 7, 820, 4613, 820, 13, 4475, 287, 850, 9948, 11, 31092, 13, 9948, 9239, 13, 1818, 12545, 4008, 198, 198, 8818, 1382, 41, 6...
2.474189
1,356
<filename>examples/ml-100k/convert.jl using JLD using SparseArrays const n_user = 943 const n_item = 1682 R = spzeros(n_user, n_item) open("ml-100k/u.data", "r") do f for line in eachline(f) l = split(line, "\t") user, item, value = parse(Int, l[1]), parse(Int, l[2]), parse(Int, l[3]) R[u...
[ 27, 34345, 29, 1069, 12629, 14, 4029, 12, 3064, 74, 14, 1102, 1851, 13, 20362, 198, 3500, 449, 11163, 198, 3500, 1338, 17208, 3163, 20477, 198, 198, 9979, 299, 62, 7220, 796, 860, 3559, 198, 9979, 299, 62, 9186, 796, 1467, 6469, 198...
2.065217
184
<gh_stars>1-10 using Test using POMDPTesting using FiniteHorizonPOMDPs using POMDPs using POMDPModelTools import POMDPModels: SimpleGridWorld, BabyPOMDP import POMDPPolicies: FunctionPolicy import POMDPSimulators: stepthrough @testset "interface" begin @test HorizonLength(SimpleGridWorld()) == InfiniteHorizon() ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 6208, 198, 3500, 350, 2662, 6322, 44154, 198, 3500, 4463, 578, 27991, 8637, 47, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 17633, 33637, 198, 11748, 35...
2.907895
152
############################# ## The functions in this file may currently not work for some easy edge cases like K=constant. ## Use the monomial implementation in src/triVolterraMonomialKernel.jl for those cases instead ## and reserve this for non-trivial kernels. ############################# ## triVolterraEQ1FullKer...
[ 14468, 7804, 4242, 2, 198, 2235, 383, 5499, 287, 428, 2393, 743, 3058, 407, 670, 329, 617, 2562, 5743, 2663, 588, 509, 28, 9979, 415, 13, 198, 2235, 5765, 262, 937, 49070, 7822, 287, 12351, 14, 28461, 16598, 353, 430, 44, 6326, 498,...
1.875241
3,631
<filename>CairoMakie/src/precompiles.jl function get_obs(x::Attributes, visited, obs=Set()) if x in visited; return; else; push!(visited, x); end union!(obs, values(x)) return obs end function get_obs(x::Union{AbstractVector, Tuple}, visited, obs=Set()) if x in visited; return; else; push!(visit...
[ 27, 34345, 29, 34, 18131, 44, 461, 494, 14, 10677, 14, 3866, 5589, 2915, 13, 20362, 198, 8818, 651, 62, 8158, 7, 87, 3712, 29021, 11, 8672, 11, 10201, 28, 7248, 28955, 201, 198, 220, 220, 220, 611, 2124, 287, 8672, 26, 1441, 26, ...
2.24659
953
using ACE, LinearAlgebra, StaticArrays using ACE: evaluate using ACEtb using Random: shuffle # this should possibly go into the main ACEtb module, or possibly into # the hamiltonian assembly code function eval_bond(B, Rs, Zs, z0) r̂ = Rs[1] / norm(Rs[1]) o = Rs[1]/2 Rr = map( r_ -> (r = r_ - o; o + r - 2*dot...
[ 198, 3500, 40488, 11, 44800, 2348, 29230, 11, 36125, 3163, 20477, 198, 3500, 40488, 25, 13446, 198, 3500, 40488, 83, 65, 198, 3500, 14534, 25, 36273, 198, 198, 2, 428, 815, 5457, 467, 656, 262, 1388, 40488, 83, 65, 8265, 11, 393, 54...
2.000902
1,109
<reponame>UnofficialJuliaMirrorSnapshots/GeneralizedMetropolisHastings.jl-e04668b6-ddf2-5c09-b17b-50da0d2d0da2<gh_stars>0 module GeneralizedMetropolisHastings import PDMats import Distributions import Sundials import Base: ==, size, length, eltype, show, display, time, similar, copy!, copy import Base: mean, median, ...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 12218, 1143, 9171, 25986, 39, 459, 654, 13, 20362, 12, 68, 3023, 35809, 65, 21, 12, 1860, 69, 17, 12, 20, 66, 2931, 12, 65, 1558, 65, 12, 1120, 6814, ...
2.844156
1,001
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct ContainerServiceProperties <: SwaggerModel provisioningState::Any # spec type: Union{ Nothing, String } # spec name: provisioningState orchestratorProfile:...
[ 2, 770, 2393, 373, 7560, 416, 262, 22300, 2451, 7928, 6127, 35986, 198, 2, 2141, 407, 13096, 428, 2393, 3264, 13, 3401, 1958, 262, 1509, 7928, 20855, 2427, 13, 628, 198, 76, 18187, 2878, 43101, 16177, 2964, 18200, 1279, 25, 2451, 7928...
3.6901
1,394
""" Parse MTG section # Arguments - `f::IOStream`: A buffered IO stream to the mtg file, *e.g.* `f = open(file, "r")` - `classes::Array`: The class section data as returned by `parse_section!` - `description::Array`: The description section data as returned by `parse_section!` - `features::Array`: The features sectio...
[ 198, 37811, 198, 10044, 325, 19308, 38, 2665, 198, 198, 2, 20559, 2886, 198, 12, 4600, 69, 3712, 9399, 12124, 63, 25, 317, 6940, 1068, 24418, 4269, 284, 262, 285, 25297, 2393, 11, 1635, 68, 13, 70, 15885, 4600, 69, 796, 1280, 7, 7...
2.13264
5,677
<gh_stars>0 """ `PersistentArray{T,N}` wraps an Array{Node, N} to provide a versioned array interface. The Node type maintains a history of each element, so the complexity of each operation on the PersistentArray is dependent on the corresponding Node operation in relation to the number of stored versions. """ type Per...
[ 27, 456, 62, 30783, 29, 15, 198, 37811, 198, 63, 30946, 7609, 19182, 90, 51, 11, 45, 92, 63, 27521, 281, 15690, 90, 19667, 11, 399, 92, 284, 198, 15234, 485, 257, 2196, 276, 7177, 7071, 13, 383, 19081, 2099, 198, 76, 2913, 1299, ...
2.75644
1,281
<reponame>vnikoofard/Agents.jl<filename>src/deprecations.jl function ContinuousSpace( extent, spacing; kwargs..., ) @warn "Giving `spacing` as a positional argument to `ContinuousSpace` is "* "deprecated, provide it as a keyword instead." return ContinuousSpace(extend; spacing, kwargs...) end ...
[ 27, 7856, 261, 480, 29, 85, 77, 12125, 1659, 446, 14, 10262, 658, 13, 20362, 27, 34345, 29, 10677, 14, 10378, 8344, 602, 13, 20362, 198, 8818, 45012, 14106, 7, 198, 220, 220, 220, 6287, 11, 198, 220, 220, 220, 31050, 26, 198, 220,...
2.693314
688
<filename>src/JuliaInXL.jl #Copyright (c) 2015: Julia Computing Inc. All rights reserved. module JuliaInXL export xldate, parse_and_eval, jlsetvar #import Base.include_from_node1; export include_from_node1 using Reexport @reexport using JuliaWebAPI using Logging using Dates using ZMQ global const SECONDS_PER_MINUT...
[ 27, 34345, 29, 10677, 14, 16980, 544, 818, 32457, 13, 20362, 198, 2, 15269, 357, 66, 8, 1853, 25, 22300, 38589, 3457, 13, 1439, 2489, 10395, 13, 198, 21412, 22300, 818, 32457, 198, 198, 39344, 2124, 335, 378, 11, 21136, 62, 392, 62,...
2.704545
1,100
<reponame>Yoshinobu-Ishizaki/StatsWithJuliaBook using Random, Distributions, KernelDensity, Plots, LaTeXStrings; pyplot() Random.seed!(1) function pval(mu0,mu,sig,n) sample = rand(Normal(mu,sig),n) xBar = mean(sample) s = std(sample) tStat = (xBar-mu0) / (s/sqrt(n)) ccdf(TDist(n-1), tStat) ...
[ 27, 7856, 261, 480, 29, 56, 3768, 259, 672, 84, 12, 40, 1477, 528, 8182, 14, 29668, 3152, 16980, 544, 10482, 198, 3500, 14534, 11, 46567, 507, 11, 32169, 35, 6377, 11, 1345, 1747, 11, 4689, 49568, 13290, 654, 26, 12972, 29487, 3419,...
1.976277
548
# function query(key::AbstractString, fieldname="acronym") # rq = HTTP.request("GET", "http://api.brain-map.org/api/v2/data/SectionDataSet/query.json?criteria=products[id\$eq1],genes[$fieldname\$eq'$key']&include=genes,section_images") # end const planedict = Dict("coronal"=>1, "sagittal"=>2) function query_insit...
[ 2, 2163, 12405, 7, 2539, 3712, 23839, 10100, 11, 2214, 3672, 2625, 330, 1313, 4948, 4943, 198, 2, 220, 220, 220, 220, 374, 80, 796, 14626, 13, 25927, 7203, 18851, 1600, 366, 4023, 1378, 15042, 13, 27825, 12, 8899, 13, 2398, 14, 1504...
2.144728
2,978
<filename>src/OldModelExploration.jl module ModelExploration export Explore, Dim, Free using Catlab.CategoricalAlgebra """ A dimension implicitly specifies a metric space of structures, (or, think of it as a preorder if we don't care about distances) ordered by "complexity" in some context-dependent sense. We gener...
[ 27, 34345, 29, 10677, 14, 19620, 17633, 18438, 6944, 13, 20362, 198, 21412, 9104, 18438, 6944, 198, 39344, 41401, 11, 14048, 11, 3232, 198, 198, 3500, 5181, 23912, 13, 34, 2397, 12409, 2348, 29230, 628, 198, 198, 37811, 198, 32, 15793, ...
3.331169
616
<filename>examples/bez_multi_surf.jl # ? activate Splines import Pkg Pkg.activate("Splines") using PlotlyJS using Revise Revise.revise() using Splines @info "Computing" n, m = 8, 8 # cupula N1 = [ cat([0:n-1 zeros(n) 4 .* sin.(range(0, stop=π, length=n))], dims=2)', cat([zeros(m) 0:m-1 4 .* sin.(ra...
[ 27, 34345, 29, 1069, 12629, 14, 1350, 89, 62, 41684, 62, 11793, 69, 13, 20362, 198, 2, 5633, 15155, 13341, 1127, 198, 11748, 350, 10025, 198, 47, 10025, 13, 39022, 7203, 26568, 1127, 4943, 198, 198, 3500, 28114, 306, 20120, 198, 3500,...
1.851738
978
# Portions translated from SLICOT-Reference distribution # Copyright (c) 2002-2020 NICONET e.V. function run_mb03wd(datfile, io=stdout) NIN = 5 NOUT = 6 NMAX = 20 PMAX = 20 LDA1 = NMAX LDA2 = NMAX LDTAU = NMAX-1 LDZ1 = NMAX LDZ2 = NMAX LDZTA = NMAX LDWORK = max( NMAX, NMAX + ...
[ 2, 4347, 507, 14251, 422, 12419, 2149, 2394, 12, 26687, 6082, 198, 2, 15069, 357, 66, 8, 6244, 12, 42334, 45593, 1340, 2767, 304, 13, 53, 13, 198, 8818, 1057, 62, 2022, 3070, 16993, 7, 19608, 7753, 11, 33245, 28, 19282, 448, 8, 19...
1.75677
2,105
struct Node x::Float64 y::Float64 id::String end mutable struct Way id::String visible::Bool version::Int changeset::String timestamp::String user::String uid::String nodes::Array{Node} tags::Dict Way() = new() end mutable struct Relation id::String visible:...
[ 7249, 19081, 198, 220, 220, 220, 2124, 3712, 43879, 2414, 198, 220, 220, 220, 331, 3712, 43879, 2414, 198, 220, 220, 220, 4686, 3712, 10100, 198, 437, 198, 198, 76, 18187, 2878, 6378, 198, 220, 220, 220, 4686, 3712, 10100, 198, 220, ...
2.389163
203
<gh_stars>1-10 using LighthouseFlux using Documenter makedocs(; modules=[LighthouseFlux], sitename="LighthouseFlux", authors="Beacon Biosignals and other contributors", pages=["API Documentation" => "index.md"]) deploydocs(; repo="github.com/beacon-biosignals/LighthouseFlux.jl.git", devbranch="main"...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 406, 32303, 37, 22564, 198, 3500, 16854, 263, 198, 198, 76, 4335, 420, 82, 7, 26, 13103, 41888, 43, 32303, 37, 22564, 4357, 1650, 12453, 2625, 43, 32303, 37, 22564, 1600, 198, 220, 2...
2.661157
121
<gh_stars>0 function triangle_centrality1(A) T = mul(A, A', Semirings.PLUS_TIMES[Float64], mask=A) y = reduce(Monoids.PLUS_MONOID[Float64], T, dims=2) k = reduce(Monoids.PLUS_MONOID[Float64], y) return (3 * mul(A, y) - 2 * mul(T, y) .+ y) ./ k end function triangle_centrality2(A) T = mul(A, A', Sem...
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 22950, 62, 31463, 414, 16, 7, 32, 8, 198, 220, 220, 220, 309, 796, 35971, 7, 32, 11, 317, 3256, 12449, 343, 654, 13, 6489, 2937, 62, 51, 3955, 1546, 58, 43879, 2414, 4357, 9335, 28, 32, 8...
2.068966
290
<gh_stars>0 using LightGraphs, SimpleWeightedGraphs function bfs_depth(input_data, start_position, go_condition, stop_condition=(x->false)) status = zeros(Int32, size(input_data)...) queue::Array{NamedTuple{(:position, :depth),Tuple{CartesianIndex, Int32}},1} = [] if typeof(start_position) <: Tuple start_pos...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 4401, 37065, 82, 11, 17427, 25844, 276, 37065, 82, 198, 198, 8818, 275, 9501, 62, 18053, 7, 15414, 62, 7890, 11, 923, 62, 9150, 11, 467, 62, 31448, 11, 2245, 62, 31448, 16193, 87, 3784, 9562,...
2.560193
623
import .MCMCChains: AbstractChains, ChainDataFrame, sections using .DataFrames export from_mcmcchains const turing_key_map = Dict( "acceptance_rate" => "mean_tree_accept", "hamiltonian_energy" => "energy", "hamiltonian_energy_error" => "energy_error", "is_adapt" => "tune", "max_hamiltonian_energy_...
[ 11748, 764, 9655, 9655, 1925, 1299, 25, 27741, 1925, 1299, 11, 21853, 6601, 19778, 11, 9004, 198, 3500, 764, 6601, 35439, 198, 198, 39344, 422, 62, 76, 11215, 66, 38861, 198, 198, 9979, 256, 870, 62, 2539, 62, 8899, 796, 360, 713, 7...
2.441721
3,835