content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
<reponame>sdk2k01/Discord.jl<gh_stars>100-1000 @testset "JSON" begin io = IOBuffer() val, e = readjson(io) @test val === nothing @test e isa Empty io = IOBuffer("{bad]") val, e = readjson(io) @test val === nothing @test e !== nothing io = IOBuffer("[1,2,3]") val, e = readjson(i...
[ 27, 7856, 261, 480, 29, 21282, 74, 17, 74, 486, 14, 15642, 585, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 31, 9288, 2617, 366, 40386, 1, 2221, 198, 220, 220, 220, 33245, 796, 314, 9864, 13712, 3419, 198, 220, 220, ...
2.222989
435
<reponame>stefano-meschiari/ColorSchemes.jl<gh_stars>100-1000 # websafe colors # using Colors, ColorSchemes # cs = ColorScheme([parse(RGB{Float64}, "#$(string.([r,g,b], base=16)...)") for r in 0x0:3:0xf for g in 0x0:3:0xf for b in 0x0:3:0xf]) loadcolorscheme(:websafe, [ RGB{Float64}(0.0,0.0,0.0), RGB{F...
[ 27, 7856, 261, 480, 29, 301, 891, 5733, 12, 6880, 11072, 2743, 14, 10258, 27054, 6880, 13, 20362, 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 2639, 8635, 7577, 198, 2, 1262, 29792, 11, 5315, 27054, 6880, 198, 2, 50115, 796, 5...
1.369043
5,750
## Layer types """Union type for convolutional layers.""" const ConvLayer = Union{Conv} # TODO: DepthwiseConv, ConvTranspose, CrossCor """Union type for dropout layers.""" const DropoutLayer = Union{Dropout,typeof(Flux.dropout),AlphaDropout} """Union type for reshaping layers such as `flatten`.""" const ReshapingLaye...
[ 2235, 34398, 3858, 198, 37811, 38176, 2099, 329, 3063, 2122, 282, 11685, 526, 15931, 198, 9979, 34872, 49925, 796, 4479, 90, 3103, 85, 92, 1303, 16926, 46, 25, 36350, 3083, 3103, 85, 11, 34872, 8291, 3455, 11, 6372, 10606, 198, 198, 3...
3.36409
401
<reponame>UnofficialJuliaMirrorSnapshots/BayesNets.jl-ba4760a4-c768-5bed-964b-cf806dc591cb let # A → C ← B bn = BayesNet() push!(bn, StaticCPD(:a, Categorical([1.0,0.0]))) push!(bn, StaticCPD(:b, Categorical([0.0,1.0]))) push!(bn, CategoricalCPD{Bernoulli}(:c, [:a, :b], [2,2], [Bernoull...
[ 27, 7856, 261, 480, 29, 3118, 16841, 16980, 544, 27453, 1472, 43826, 20910, 14, 15262, 274, 45, 1039, 13, 20362, 12, 7012, 2857, 1899, 64, 19, 12, 66, 30610, 12, 20, 3077, 12, 24, 2414, 65, 12, 12993, 37988, 17896, 48952, 21101, 198...
1.755906
508
<gh_stars>0 using Roots using UUIDs using Observables using CSV using ScottishTaxBenefitModel using .BCCalcs using .Definitions using .ExampleHelpers using .FRSHouseholdGetter using .GeneralTaxComponents using .ModelHousehold using .Monitor using .Results using .Runner using .RunSettings using .SimplePovertyCounts: G...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 34341, 198, 198, 3500, 471, 27586, 82, 198, 3500, 19243, 2977, 198, 3500, 44189, 198, 198, 3500, 11905, 27017, 42166, 270, 17633, 198, 3500, 764, 2749, 9771, 6359, 198, 3500, 764, 7469, 50101, 19...
2.744444
990
<filename>src/collective_dephasing_model.jl using BlockDiagonalMatrices using SparseArrays using LinearAlgebra using TimerOutputs struct CollectiveDephasingModel <: Model params::ModelParameters Jx::SparseMatrixCSC Jy::SparseMatrixCSC Jz::SparseMatrixCSC Jx2::SparseMatrixCSC Jy2::SparseMatrixCS...
[ 27, 34345, 29, 10677, 14, 33327, 425, 62, 10378, 71, 2313, 62, 19849, 13, 20362, 198, 3500, 9726, 18683, 27923, 19044, 45977, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 44800, 2348, 29230, 198, 3500, 5045, 263, 26410, 82, 198, 198,...
2.106447
2,001
# 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 = "MPSolve" version = v"3.2.1" # Collection of sources required to complete build sources = [ GitSource("https://github.com/robol/MPSolve.git", "65be...
[ 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, 13, 198, 3500, 45755, 32875, 11, 350, 10025, 198,...
2.876574
397
<gh_stars>100-1000 using Unitful function unitful_testfunction(Vi) if Vi ≤ 0.0u"V" return 0.0u"V" elseif Vi ≥ 1.0u"V" return 1.0u"V" else return Vi end end register_primitive(unitful_testfunction) # must be outside testset @testset "Unitful" begin @info "Testing Unitful" ...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 3500, 11801, 913, 198, 8818, 4326, 913, 62, 9288, 8818, 7, 38432, 8, 198, 220, 220, 220, 611, 16049, 41305, 657, 13, 15, 84, 1, 53, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1441, ...
1.634221
976
module Audios using FileType TypeMidi = FileType.Types("mid", MIME("audio/midi")) TypeMp3 = FileType.Types("mp3", MIME("audio/mpeg")) TypeM4a = FileType.Types("m4a", MIME("audio/m4a")) TypeOgg = FileType.Types("ogg", MIME("audio/ogg")) TypeFlac = FileType.Types("flac", MIME("audio/x-flac")) TypeWav = FileType.Type...
[ 21412, 7591, 4267, 198, 198, 3500, 9220, 6030, 198, 6030, 44, 19830, 796, 9220, 6030, 13, 31431, 7203, 13602, 1600, 337, 12789, 7203, 24051, 14, 13602, 72, 48774, 198, 6030, 28861, 18, 220, 796, 9220, 6030, 13, 31431, 7203, 3149, 18, ...
2.036534
958
<reponame>bdhuddleston/DV3D.jl # fast robust geometric predicates # Converted into Julia from C # Original functions written by # <NAME> # School of Computer Science # Carnegie Mellon University # 5000 Forbes Avenue # Pittsburgh, Pennsylvania 15213-3891 # <EMAIL> using GeometryTypes """ original comment: /* W...
[ 27, 7856, 261, 480, 29, 17457, 71, 4185, 75, 19115, 14, 35, 53, 18, 35, 13, 20362, 198, 2, 3049, 12373, 38445, 2747, 16856, 198, 2, 43433, 656, 22300, 422, 327, 198, 2, 13745, 5499, 3194, 416, 198, 2, 220, 1279, 20608, 29, 198, ...
2.150148
4,389
<filename>public/.julia/v0.5/JuPOT/src/core/assetscollection.jl #= AssetsCollection ================ A container to hold all information regarding the collection of assests to be optimized Methods: ------- Author: <NAME>, <NAME>, <NAME> Date: 01/23/2016 =# type AssetsCollection{T1<:Real, T2<:Abstra...
[ 27, 34345, 29, 11377, 11757, 73, 43640, 14, 85, 15, 13, 20, 14, 33018, 47, 2394, 14, 10677, 14, 7295, 14, 19668, 43681, 13, 20362, 198, 2, 28, 198, 198, 8021, 1039, 36307, 198, 4770, 198, 220, 220, 220, 317, 9290, 284, 1745, 477, ...
2.559189
2,813
<reponame>jrklasen/trackRunning.jl """ `time_sec(run)` calculates the time in sec. """ function time_sec(run::Run) cumsum(diff(run.date) / Base.Dates.Millisecond(1000)) end """ `dist_m(run, smoothing = true, λ = 500.0)` estimation of the distance in meters. """ function dist_m(run::Run; smoothing::Bool...
[ 27, 7856, 261, 480, 29, 73, 81, 74, 21921, 268, 14, 11659, 28768, 13, 20362, 198, 37811, 198, 220, 220, 220, 4600, 2435, 62, 2363, 7, 5143, 8, 63, 43707, 262, 640, 287, 792, 13, 198, 37811, 198, 8818, 640, 62, 2363, 7, 5143, 371...
2.072973
740
<filename>src/02.VlasovAmpere.jl ENV["GKSwstype"]="100" #src # ## 1D1V Vlasov–Ampere system #md # #md # ```math #md # \\frac{\\partial f}{\\partial t} + \\upsilon \\frac{\\partial f}{\\partial x} - E(t,x) \\frac{\\partial f}{\\partial \\upsilon} = 0 #md # ``` #md # #md # ```math #md # \\frac{\\partial E}{\\partial t} ...
[ 27, 34345, 29, 10677, 14, 2999, 13, 53, 21921, 709, 5840, 431, 260, 13, 20362, 198, 1677, 53, 14692, 38, 42, 10462, 301, 2981, 8973, 2625, 3064, 1, 1303, 10677, 198, 198, 2, 22492, 352, 35, 16, 53, 569, 21921, 709, 1906, 5840, 431...
1.927621
2,404
import CLBLAS import OpenCL const cl = OpenCL const clblas = CLBLAS for platform in cl.platforms() if platform[:name] == "Portable Computing Language" warn("Portable Computing Language platform not yet supported") continue end for device in cl.devices(platform) @printf("==========...
[ 11748, 7852, 9148, 1921, 198, 11748, 4946, 5097, 198, 198, 9979, 537, 796, 4946, 5097, 198, 9979, 537, 2436, 292, 796, 7852, 9148, 1921, 198, 198, 1640, 3859, 287, 537, 13, 24254, 82, 3419, 198, 220, 220, 220, 611, 3859, 58, 25, 367...
2.565378
543
"Import filter from file" function readFilter(filename, skipstart = 2) saved = readdlm(filename,',', skipstart = skipstart) z1 = saved[1,:] + im*saved[2,:] a1 = saved[3,:] + im*saved[4,:] return z1,a1 end "Import weight function from file" function readWS(filename) saved = readdlm(filename,',') intv = saved[...
[ 1, 20939, 8106, 422, 2393, 1, 198, 8818, 1100, 22417, 7, 34345, 11, 14267, 9688, 796, 362, 8, 198, 197, 82, 9586, 796, 1100, 25404, 76, 7, 34345, 11, 3256, 3256, 14267, 9688, 796, 14267, 9688, 8, 198, 197, 89, 16, 220, 796, 7448, ...
2.437086
151
using VideoIO using ImageInTerminal ImageInTerminal.use_24bit() f=opencamera() img=read(f)
[ 3500, 7623, 9399, 198, 3500, 7412, 818, 44798, 282, 198, 198, 5159, 818, 44798, 282, 13, 1904, 62, 1731, 2545, 3419, 198, 69, 28, 9654, 25695, 3419, 198, 9600, 28, 961, 7, 69, 8, 628 ]
2.657143
35
module TSMLTypes using DataFrames export typerun export Transformer, TSLearner, fit!, transform! abstract type Transformer end abstract type TSLearner <: Transformer end function transform!(tr::Transformer, instances::T) where {T<:Union{Vector,Matrix,DataFrame}} error(typeof(tr)," not implemented yet: trans...
[ 21412, 26136, 5805, 31431, 198, 198, 3500, 6060, 35439, 198, 198, 39344, 1259, 525, 403, 198, 39344, 220, 197, 8291, 16354, 11, 198, 197, 197, 4694, 14961, 1008, 11, 198, 197, 197, 11147, 28265, 198, 197, 197, 35636, 0, 198, 198, 397,...
3.039326
178
<gh_stars>0 using Distributions, NLsolve, Statistics function effectsize(xs::AbstractVector, ys::AbstractVector) if length(xs) != length(ys) throw(ArgumentError("samples must have the same number of observations")) end n, m = length(xs), length(ys) x̄, ȳ = mean(xs), mean(ys) σx², σy² = var...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 46567, 507, 11, 22879, 82, 6442, 11, 14370, 198, 198, 8818, 3048, 1096, 7, 34223, 3712, 23839, 38469, 11, 331, 82, 3712, 23839, 38469, 8, 198, 220, 220, 220, 611, 4129, 7, 34223, 8, 14512, 41...
2.010274
876
<gh_stars>10-100 # Patches should allow using imported bindings in the body of the patch @testset "imported binding in body" begin @test_throws UndefVarError Minute @test isdefined(Dates, :Minute) using Dates: Minute, Hour myminute(x::Integer) = Minute(x) # Patches should work when referencing bin...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 3208, 2052, 815, 1249, 1262, 17392, 34111, 287, 262, 1767, 286, 262, 8529, 198, 31, 9288, 2617, 366, 320, 9213, 12765, 287, 1767, 1, 2221, 198, 220, 220, 220, 2488, 9288, 62, 400, 851...
2.910891
404
<gh_stars>1-10 using ParticleInCell using LinearAlgebra @testset "FDTD solver" begin dimx, dimy = 2π, 2π nx, ny = 128, 128 dt = 1e-4 nstep = 8 mesh = TwoDGrid(dimx, nx, dimy, ny) ex = zeros(nx+1, ny+1) ey = zeros(nx+1, ny+1) bz = zeros(nx+1, ny+1) jx = zeros(nx+1, ny+1) jy =...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 2142, 1548, 818, 28780, 198, 3500, 44800, 2348, 29230, 628, 198, 31, 9288, 2617, 366, 26009, 21016, 1540, 332, 1, 2221, 628, 220, 220, 220, 5391, 87, 11, 5391, 88, 796, 362, 46582, 1...
1.747738
884
doc= """ usage: stencil.jl <outputdir> <builddir> <refine> <scheme> <vtk> builddir path Directory to write discretization. outputdir path Directory to write output data to. refine int Level of grid refinement to use. refine = 0 (no grid ...
[ 15390, 28, 198, 37811, 198, 26060, 25, 220, 198, 26400, 2856, 13, 20362, 1279, 22915, 15908, 29, 1279, 11249, 15908, 29, 1279, 5420, 500, 29, 1279, 15952, 1326, 29, 1279, 85, 30488, 29, 628, 220, 220, 220, 220, 1382, 15908, 3108, 220,...
1.74736
3,598
using Compat, Dates, DSP, HDF5, Logging, Printf, SeisIO, Test using SeisIO.Quake, SeisIO.RandSeis, SeisIO.SeisHDF import Dates: DateTime, Hour, now import DelimitedFiles: readdlm import Random: rand, randperm, randstring import SeisIO: BUF, FDSN_sta_xml, auto_coords, code2typ, typ2code, bad_chars, checkbuf!, checkb...
[ 3500, 3082, 265, 11, 44712, 11, 360, 4303, 11, 5572, 37, 20, 11, 5972, 2667, 11, 12578, 69, 11, 1001, 271, 9399, 11, 6208, 198, 3500, 1001, 271, 9399, 13, 4507, 539, 11, 1001, 271, 9399, 13, 38918, 4653, 271, 11, 1001, 271, 9399, ...
2.06548
7,025
<reponame>JuliaTagBot/IntegralTransforms.jl using Base.Test #Better Julia practice: #Write your tests as runnable scripts - you should be able to play all the file and know what went wrong # write your own tests here @test 42 == 42
[ 27, 7856, 261, 480, 29, 16980, 544, 24835, 20630, 14, 34500, 1373, 8291, 23914, 13, 20362, 198, 3500, 7308, 13, 14402, 198, 198, 2, 28971, 22300, 3357, 25, 198, 2, 16594, 534, 5254, 355, 1057, 77, 540, 14750, 532, 345, 815, 307, 149...
3.477612
67
##### ##### `Mixer` ##### struct Mixer{N,T<:NTuple{N,AbstractSynthComponent}} <: AbstractSynthComponent inputs::T end Mixer(inputs::AbstractSynthComponent...) = Mixer(inputs) next!(m::Mixer) = sum(next!, m.inputs) Base.:+(inputs::AbstractSynthComponent...) = Mixer(inputs...) output_type(::Type{Mixer{N,T}}) wher...
[ 4242, 2, 198, 4242, 2, 4600, 35608, 263, 63, 198, 4242, 2, 198, 198, 7249, 15561, 263, 90, 45, 11, 51, 27, 25, 11251, 29291, 90, 45, 11, 23839, 29934, 400, 21950, 11709, 1279, 25, 27741, 29934, 400, 21950, 198, 220, 220, 220, 1731...
2.579505
283
"""Demo 3x7 test case""" y = [0.62 0.73 0.71 1.50 1.17 0.43 1.08 0.62 1.73 0.95 1.46 1.60 1.16 0.38 0.90 0.32 -0.48 0.95 1.08 0.02 0.40] function write_hpp(fname) open(fname, "w") do io println(io, "// automatically generated by `julia/test/demo3x7.jl`") println(io, "#pragma once") ...
[ 37811, 11522, 78, 513, 87, 22, 1332, 1339, 37811, 198, 88, 796, 685, 15, 13, 5237, 657, 13, 4790, 220, 657, 13, 4869, 352, 13, 1120, 352, 13, 1558, 657, 13, 3559, 352, 13, 2919, 198, 220, 220, 220, 220, 657, 13, 5237, 352, 13, ...
1.599589
487
struct SinkhornEpsilonScaling{A<:Sinkhorn,T<:Real} <: Sinkhorn alg::A factor::T steps::Int end function Base.show(io::IO, alg::SinkhornEpsilonScaling) return print( io, alg.alg, " with ε-scaling (steps: ", alg.steps, ", factor: ", alg.factor, ")" ) end """ SinkhornEpsilonScaling(algori...
[ 7249, 311, 676, 25311, 36, 862, 33576, 3351, 4272, 90, 32, 27, 25, 50, 676, 25311, 11, 51, 27, 25, 15633, 92, 1279, 25, 311, 676, 25311, 198, 220, 220, 220, 435, 70, 3712, 32, 198, 220, 220, 220, 5766, 3712, 51, 198, 220, 220, ...
2.263768
2,070
<filename>src/iterator.jl import Base: start, next, done, iteratorsize, iteratoreltype, eltype, length """ KalmanFilter(y, M) Kalman filter as iterator, iterating over `Gaussian`s representing the filtered distribution of `x`. Arguments `y` iterates over signal values. # Example ``` kf = KalmanFilter(Y, M) # es...
[ 27, 34345, 29, 10677, 14, 48727, 13, 20362, 198, 11748, 7308, 25, 923, 11, 1306, 11, 1760, 11, 11629, 2024, 1096, 11, 11629, 265, 382, 75, 4906, 11, 1288, 4906, 11, 4129, 198, 198, 37811, 198, 220, 220, 220, 12612, 805, 22417, 7, ...
2.291978
1,072
<filename>src/FeatureExtraction/utils.jl """ Parse fe variables """ function parse_fe_variables(fe_vars, expvars; depvar=nothing, is_pair=false) valid_vars = copy(expvars) if depvar != nothing append!(valid_vars, [depvar]) end selected_vars = [] if is_pair vars = [] if isa...
[ 27, 34345, 29, 10677, 14, 38816, 11627, 7861, 14, 26791, 13, 20362, 198, 37811, 198, 10044, 325, 730, 9633, 198, 37811, 198, 8818, 21136, 62, 5036, 62, 25641, 2977, 7, 5036, 62, 85, 945, 11, 1033, 85, 945, 26, 1207, 7785, 28, 22366,...
1.89799
4,578
function sidebar(session::Session, names::NamedTuple, colors::NamedTuple; port::Int = 3141) ############################################################# sortable legend Legend = DOM.div( id = "legend", class = "legend", map( group -> DOM.ul( id = group, DOM.h2( class = "legend-header", selecte...
[ 8818, 40217, 7, 29891, 3712, 36044, 11, 3891, 3712, 45, 2434, 51, 29291, 11, 7577, 3712, 45, 2434, 51, 29291, 26, 2493, 3712, 5317, 796, 513, 23756, 8, 628, 220, 220, 220, 1303, 29113, 14468, 7804, 4242, 3297, 540, 8177, 198, 220, 2...
1.886294
7,493
<reponame>attdona/Abaco.jl using Abaco using JSON3 using BenchmarkTools function nop(s, ne, name, value, inputs) end function onresult(ts, ne, name, value, inputs) @info "age [$ts]: scope: [$ne] $name = $value" end interval = 5 ages = 4 abaco = Abaco.init(nop, interval, ages) formula(abaco, "y = x1 + x2") func...
[ 27, 7856, 261, 480, 29, 1078, 67, 4450, 14, 4826, 10602, 13, 20362, 198, 3500, 2275, 10602, 198, 3500, 19449, 18, 198, 3500, 25187, 4102, 33637, 198, 198, 8818, 299, 404, 7, 82, 11, 497, 11, 1438, 11, 1988, 11, 17311, 8, 198, 437,...
2.103152
349
<filename>src/util/PeriodicCartesianIndices.jl module PeriodicIndexing export PeriodicCartesianIndices using Base: tail import Base: getindex, length, size, IndexStyle, IndexCartesian, in, iterate, mod, first, last mod_tuple(c::NTuple{N,Int}, size::NTuple{N,Int}) where N = ntuple(k->mod(c[k]-1,size[k])+1, ...
[ 27, 34345, 29, 10677, 14, 22602, 14, 5990, 2101, 291, 43476, 35610, 5497, 1063, 13, 20362, 198, 21412, 18581, 291, 15732, 278, 198, 198, 39344, 18581, 291, 43476, 35610, 5497, 1063, 198, 198, 3500, 7308, 25, 7894, 198, 198, 11748, 7308,...
2.334431
1,519
<filename>src/CanvasWebIO.jl module CanvasWebIO using WebIO, JSExpr export Canvas, addmovable!, addclickable!, addstatic! mutable struct Canvas w::Scope size movables::Array clickables::Array static::Array getter::Dict selected::String #actually just the field for the selection handle...
[ 27, 34345, 29, 10677, 14, 6090, 11017, 13908, 9399, 13, 20362, 198, 21412, 1680, 11017, 13908, 9399, 198, 198, 3500, 5313, 9399, 11, 26755, 3109, 1050, 198, 198, 39344, 1680, 11017, 11, 751, 76, 21985, 28265, 751, 12976, 540, 28265, 751...
2.07232
3,844
using PyCall torch = pyimport("torch") np = pyimport("numpy") """ Note: the below code is a minimal test of using `cvxpylayers` and `torch` to incorporate "differentiable convex programming". Unfortunately, differentiable convex programming seems not realised in pure Julia packages. """ """ Test for cvxpylayers """...
[ 3500, 9485, 14134, 198, 198, 13165, 354, 796, 12972, 11748, 7203, 13165, 354, 4943, 198, 37659, 796, 12972, 11748, 7203, 77, 32152, 4943, 198, 198, 37811, 198, 6425, 25, 262, 2174, 2438, 318, 257, 10926, 1332, 286, 1262, 4600, 33967, 42...
2.347066
801
function makeForcePlots3D() dirvec = readdir() if "forcePlots" in dirvec rm("forcePlots", recursive=true) end mkdir("forcePlots") mat, _ = DelimitedFiles.readdlm("resultsSummary", '\t', Float64, header=true) nspan = (length(mat[1,:]) - 4)/8 t = mat[:,1] len = length(t...
[ 8818, 787, 10292, 3646, 1747, 18, 35, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 26672, 35138, 796, 1100, 15908, 3419, 198, 220, 220, 220, 611, 366, 3174, 3646, 1747, 1, 287, 26672, 35138, 198, 220, 220, 220, 220, 220, 220, ...
1.758398
9,735
using MetaStrategist using Documenter DocMeta.setdocmeta!(MetaStrategist, :DocTestSetup, :(using MetaStrategist); recursive=true) makedocs(; modules=[MetaStrategist], authors="<NAME>", repo="https://github.com/JuliaConstraints/MetaStrategist.jl/blob/{commit}{path}#{line}", sitename="MetaStrategist.jl"...
[ 3500, 30277, 13290, 2397, 396, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 48526, 13290, 2397, 396, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 30277, 13290, 2397, 396, 1776, 45115, 28, 7942, 8, 198,...
2.35
280
<filename>src/old/ATP/ATP.jl using Catlab.WiringDiagrams using Catlab.Present using Catlab.Theories using Catlab.CategoricalAlgebra.CSets using Catlab.CategoricalAlgebra.StructuredCospans using Catlab.Present: translate_generator using Catlab.CategoricalAlgebra.FinSets using Catlab.Theories: attr, adom using Catlab.Cat...
[ 27, 34345, 29, 10677, 14, 727, 14, 1404, 47, 14, 1404, 47, 13, 20362, 198, 3500, 5181, 23912, 13, 54, 3428, 18683, 6713, 82, 198, 3500, 5181, 23912, 13, 34695, 198, 3500, 5181, 23912, 13, 464, 1749, 198, 3500, 5181, 23912, 13, 34, ...
2.153897
15,023
<gh_stars>100-1000 # GMM estimation for a sample from Chi^2(theta) # compare to two method of moments estimators (see chi2mm.m) using Econometrics, Random, LinearAlgebra, Distributions, Plots function main() n = 30 theta = 3.0 reps = 10000 results = zeros(reps) W = eye(2) y = zeros(n) # this is just a place holder to d...
[ 27, 456, 62, 30783, 29, 3064, 12, 12825, 198, 2, 6951, 44, 31850, 329, 257, 6291, 422, 21380, 61, 17, 7, 1169, 8326, 8, 198, 2, 8996, 284, 734, 2446, 286, 7188, 3959, 2024, 357, 3826, 33166, 17, 3020, 13, 76, 8, 198, 3500, 412, ...
2.517606
284
module HOOMD # Signal Revise.jl that this module should be tracked as a package __revise_mode__ = :eval # Dependecies using CUDA using DLPack using PyCall using StaticArrays DLExt = pyimport("hoomd.dlext") # Types struct ContextWrapper context::PyObject sysview::PyObject synchronize::PyObject fu...
[ 21412, 40115, 2662, 35, 628, 198, 2, 26484, 5416, 786, 13, 20362, 326, 428, 8265, 815, 307, 18283, 355, 257, 5301, 198, 834, 18218, 786, 62, 14171, 834, 796, 1058, 18206, 628, 198, 2, 37947, 721, 444, 198, 3500, 29369, 5631, 198, 35...
2.390495
1,557
# Hermitian lattices @attributes mutable struct HermLat{S, T, U, V, W} <: AbsLat{S} space::HermSpace{S, T, U, W} pmat::V gram::U rational_span::HermSpace{S, T, U, W} base_algebra::S involution::W automorphism_group_generators::Vector{U} automorphism_group_order::fmpz generators minimal_generators ...
[ 2, 2332, 2781, 666, 47240, 1063, 198, 31, 1078, 7657, 4517, 540, 2878, 18113, 24220, 90, 50, 11, 309, 11, 471, 11, 569, 11, 370, 92, 1279, 25, 13051, 24220, 90, 50, 92, 198, 220, 2272, 3712, 48523, 14106, 90, 50, 11, 309, 11, 47...
2.298969
194
<filename>src/economics/input_data/functions.jl ############################ Reads Data from Excel ######################## ################################################################################ #** function get_Cost_Data() ks=cost_ks() ks.FC_ac=5.8#fixed AC cost ks.FC_dc=29#fixed DC cost ks....
[ 27, 34345, 29, 10677, 14, 13926, 873, 14, 15414, 62, 7890, 14, 12543, 2733, 13, 20362, 198, 198, 14468, 7804, 4242, 4149, 82, 6060, 422, 24134, 1303, 14468, 4242, 21017, 198, 29113, 29113, 14468, 198, 2, 1174, 198, 8818, 651, 62, 1372...
2.050103
7,285
using PyPlot, Seismic dt = 0.002 fn = 1/(2*dt) # Ricker w1 = Ricker(dt=dt) nw = length(w1) nc = floor(Int, nw/2) t1 = dt*collect(-nc:1:nc) nf = 8*nextpow2(nw) df = 1/(nf*dt) f1 = df*collect(0:1:nf-1) wpad = cat(1,w1,zeros(nf-nw)) W1 = abs(fft(wpad)) W1 = W1/maximum(W1) # Ormsby w2 = Ormsby(dt=dt, f=[5.0, 10.0, 30.0,...
[ 3500, 9485, 43328, 11, 1001, 1042, 291, 198, 198, 28664, 796, 657, 13, 21601, 198, 22184, 796, 352, 29006, 17, 9, 28664, 8, 198, 198, 2, 8759, 263, 198, 86, 16, 796, 8759, 263, 7, 28664, 28, 28664, 8, 198, 47516, 796, 4129, 7, 8...
1.898449
709
<filename>MetaGen/scripts/test_gm.jl using Revise using MetaGen using Gen using Profile using StatProfilerHTML using GenRFS #Profile.init(; n = 10^4, delay = 1e-5) #GenRFS.modify_partition_ctx!(1000) #call it #@profilehtml gt_trace,_ = Gen.generate(metacog, (possible_objects,)) #@profilehtml gt_trace,_ = Gen.generat...
[ 27, 34345, 29, 48526, 13746, 14, 46521, 14, 9288, 62, 39870, 13, 20362, 198, 3500, 5416, 786, 198, 3500, 30277, 13746, 198, 3500, 5215, 198, 3500, 13118, 198, 3500, 5133, 15404, 5329, 28656, 198, 3500, 5215, 49, 10652, 198, 198, 2, 37...
2.547297
296
using Plots using DelimitedFiles include("options.jl") print("Plotting results using $blas_num_threads BLAS thread") blas_num_threads > 1 ? println("s") : println() println("Plotting results using $omp_num_threads OpenBLAS threads") println("Maximum DMRG bond dimension is set to $maxdim.") seperator = "#"^70 times...
[ 3500, 1345, 1747, 198, 3500, 4216, 320, 863, 25876, 198, 198, 17256, 7203, 25811, 13, 20362, 4943, 198, 198, 4798, 7203, 43328, 889, 2482, 1262, 720, 2436, 292, 62, 22510, 62, 16663, 82, 9878, 1921, 4704, 4943, 198, 2436, 292, 62, 225...
2.325377
796
<reponame>briochemc/Earth2014.jl module Earth2014 using DataDeps, NCDatasets function url_Earth2014(;res="5min") res == "1min" ? "http://ddfe.curtin.edu.au/models/Earth2014/data_1min/GMT/Earth2014.BED2014.1min.geod.grd" : res == "5min" ? "http://ddfe.curtin.edu.au/models/Earth2014/data_5min/GMT/Earth2014.BED2...
[ 27, 7856, 261, 480, 29, 65, 380, 18958, 66, 14, 22840, 4967, 13, 20362, 198, 21412, 3668, 4967, 198, 198, 3500, 6060, 12156, 82, 11, 399, 8610, 265, 292, 1039, 198, 198, 8818, 19016, 62, 22840, 4967, 7, 26, 411, 2625, 20, 1084, 49...
2.255396
1,112
<reponame>p2t2/Scruff.jl<filename>src/sfuncs/score/softscore.jl export SoftScore """ SoftScore(vs::Vector{I}, ss::Vector{Float64}) Return a `LogScore` of the log values in `ss` vector for the associated keys in `vs`. """ function SoftScore(vs::Vector{I}, ss::Vector{Float64}) where I return LogScore(vs, [log(...
[ 27, 7856, 261, 480, 29, 79, 17, 83, 17, 14, 3351, 30622, 13, 20362, 27, 34345, 29, 10677, 14, 82, 12543, 6359, 14, 26675, 14, 4215, 26675, 13, 20362, 198, 39344, 8297, 26595, 198, 198, 37811, 198, 220, 220, 220, 8297, 26595, 7, 14...
2.566964
224
using Polylogarithms using SpecialFunctions using Test using DataFrames, CSV import Base.MathConstants: π, pi, ℯ, e, γ, eulergamma, catalan, φ, golden include("test_defs.jl") include("../src/gamma_derivatives.jl") @testset "Derivatives of the gamma function at 1.0" begin @testset " throws errors" begin ...
[ 3500, 12280, 6404, 283, 342, 907, 198, 3500, 6093, 24629, 2733, 198, 3500, 6208, 198, 3500, 6060, 35439, 11, 44189, 198, 11748, 7308, 13, 37372, 34184, 1187, 25, 18074, 222, 11, 31028, 11, 2343, 226, 107, 11, 304, 11, 7377, 111, 11, ...
1.941772
395
<gh_stars>0 using GaussianProcesses using HDF5 # Load the possible parameter combinations # Points at which to create images parameters = readdlm("parameters.dat") drop_out = parameters[end, :] parameters = parameters[1:end-1, :] # Column headers # nu, mass, r_c, T_10, q, logM_gas, ksi, incl, PA = row d = 2 # dime...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 12822, 31562, 18709, 274, 198, 3500, 5572, 37, 20, 198, 198, 2, 8778, 262, 1744, 11507, 17790, 198, 198, 2, 11045, 379, 543, 284, 2251, 4263, 198, 17143, 7307, 796, 1100, 25404, 76, 7203, 17143...
2.295918
882
include("./Algos.jl") using .Algos using CSV using DataFrames using Plots MAP_NAME = "map2" TRAINING_EPS = 300000 EVALUATING_EPS = 100000 SAMPLING_RATE = 0.001 df = DataFrame(CSV.File("maps/$(MAP_NAME).csv")); tiles = Matrix(df); agent = Sarsa(tiles, learningRate = 0.1); y1 = train(agent, TRAINING_EPS, samplingRate =...
[ 17256, 7, 1911, 14, 2348, 70, 418, 13, 20362, 4943, 198, 3500, 764, 2348, 70, 418, 198, 3500, 44189, 198, 3500, 6060, 35439, 198, 3500, 1345, 1747, 198, 198, 33767, 62, 20608, 796, 366, 8899, 17, 1, 198, 51, 3861, 1268, 2751, 62, ...
2.431034
638
module ROC using ROCAnalysis, MLLabelUtils using StatsBase: sample export AbstractOP, ComplexOP, SimpleOP, findop, changeop!, simpleop, AbstractPerfMetric, TPr, FPr, TNr, FNr abstract type AbstractOP end """ Operating point object with additional information. """ mutable struct ComplexOP <: AbstractOP...
[ 21412, 371, 4503, 628, 197, 3500, 371, 4503, 32750, 11, 337, 3069, 9608, 18274, 4487, 198, 197, 3500, 20595, 14881, 25, 6291, 198, 197, 198, 197, 39344, 27741, 3185, 11, 19157, 3185, 11, 17427, 3185, 11, 1064, 404, 11, 1487, 404, 2826...
1.959743
7,303
<filename>src/triangulationestimators/delaunay_triangulations/DelaunayTriangulations.jl using Reexport @reexport module DelaunayTriangulations using Requires function __init__() @require Simplices="d5428e67-3037-59ba-9ab1-57a04f0a3b6a" begin include("AbstractDelaunayTriangulation.jl") ...
[ 27, 34345, 29, 10677, 14, 28461, 648, 1741, 395, 320, 2024, 14, 12381, 1942, 323, 62, 28461, 648, 5768, 14, 13856, 1942, 323, 14824, 648, 5768, 13, 20362, 198, 3500, 797, 39344, 198, 198, 31, 631, 87, 634, 8265, 4216, 1942, 323, 148...
2.513043
230
#!/usr/bin/env julia using Weber using Lazy: @> # see https://github.com/MikeInnes/Lazy.jl version = v"0.0.1" sid,skip = @read_args("Gap Detection ($version).") #=============================================================================== Experiment Settings =======================================================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 3500, 28137, 198, 3500, 406, 12582, 25, 2488, 29, 1303, 766, 3740, 1378, 12567, 13, 785, 14, 16073, 818, 2516, 14, 43, 12582, 13, 20362, 198, 198, 9641, 796, 410, 1, 15, ...
2.660455
1,932
using VCFTools using Test using VariantCallFormat using CodecZlib using DelimitedFiles # packages needed only for testing using Random using CSV using DataFrames using StatsBase using LinearAlgebra include("gtstats_test.jl") include("conformgt_test.jl") include("convert_test.jl") include("filter_test.jl") include("ai...
[ 3500, 26706, 9792, 10141, 198, 3500, 6208, 198, 3500, 38215, 14134, 26227, 198, 3500, 39298, 57, 8019, 198, 3500, 4216, 320, 863, 25876, 198, 198, 2, 10392, 2622, 691, 329, 4856, 198, 3500, 14534, 198, 3500, 44189, 198, 3500, 6060, 3543...
3.198198
111
<gh_stars>0 function process_likelihood_model(ρ_list::Vector,Eₘ_list::Vector) # Generate the A matrix used to calculate likelihoods # The A matrix depends on the input states and measurement operators dimsmatch(ρ_list,Eₘ_list) sum(abs,data(sum(Eₘ_list))-I)<1E-15 || throw(ArgumentError("Eₘ operat...
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 1429, 62, 2339, 11935, 62, 19849, 7, 33643, 62, 4868, 3712, 38469, 11, 36, 158, 224, 246, 62, 4868, 3712, 38469, 8, 198, 220, 220, 220, 1303, 2980, 378, 262, 317, 17593, 973, 284, 15284, 1495...
2.043169
2,108
<filename>tutorials/Tutorial_gridap_odes.jl<gh_stars>1-10 using Gridap using ForwardDiff using LinearAlgebra using Test using GridapODEs.ODETools using GridapODEs.TransientFETools using Gridap.FESpaces: get_algebraic_operator import Gridap: ∇ import GridapODEs.TransientFETools: ∂t ∂ θ = 0.2 u(x,t) = (1.0-x[1])*x[1]*(...
[ 27, 34345, 29, 83, 44917, 82, 14, 51, 44917, 62, 25928, 499, 62, 4147, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 24846, 499, 198, 3500, 19530, 28813, 198, 3500, 44800, 2348, 29230, 198, 3500, 6208, 198, 3500, 24846,...
1.931937
764
<gh_stars>10-100 using Base: @propagate_inbounds """ AugmentedKnots{T,k} <: AbstractVector{T} Pads from both sides a vector of B-spline breakpoints, making sure that the first and last values are repeated `k` times. """ struct AugmentedKnots{T, k, Breakpoints <: AbstractVector{T}} <: AbstractVector{T} Nt :: I...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 7308, 25, 2488, 22930, 37861, 62, 259, 65, 3733, 198, 198, 37811, 198, 220, 220, 220, 2447, 12061, 42, 1662, 82, 90, 51, 11, 74, 92, 1279, 25, 27741, 38469, 90, 51, 92, 198, 198,...
2.393189
1,292
<gh_stars>1-10 immutable TDist <: ContinuousUnivariateDistribution df::Float64 # non-integer degrees of freedom allowed function TDist(d::Real) if d > 0.0 new(float64(d)) else error("df must be positive") end end end @_jl_dist_1p TDist t function entropy(d::TDist) return ((d.df...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8608, 18187, 13320, 396, 1279, 25, 45012, 3118, 42524, 20344, 3890, 198, 220, 220, 220, 47764, 3712, 43879, 2414, 1303, 1729, 12, 41433, 7370, 286, 4925, 3142, 198, 220, 220, 220, 2163, 13320,...
1.869748
476
push!(LOAD_PATH,"../src/") using Firebase using Documenter DocMeta.setdocmeta!(Firebase, :DocTestSetup, :(using Firebase); recursive=true) makedocs(; modules=[Firebase], authors="<NAME>", repo="github.com/ashwani-rathee/Firebase.jl/blob/{commit}{path}#{line}", sitename="Firebase.jl", format=Docum...
[ 198, 14689, 0, 7, 35613, 62, 34219, 553, 40720, 10677, 14, 4943, 198, 3500, 3764, 8692, 198, 3500, 16854, 263, 198, 198, 23579, 48526, 13, 2617, 15390, 28961, 0, 7, 13543, 8692, 11, 1058, 23579, 14402, 40786, 11, 36147, 3500, 3764, 86...
2.286822
387
# Unit tests for unit_convention.jl import Unitful.𝐌, Unitful.𝐋, Unitful.𝐓, Unitful.𝚯 @testset "unit_convention.jl" begin @test Atomistic.MASS_UNIT == aunit(𝐌) @test Atomistic.LENGTH_UNIT == aunit(𝐋) @test Atomistic.ENERGY_UNIT == aunit(𝐌 * 𝐋^2 / 𝐓^2) @test Atomistic.TIME_UNIT == aunit(𝐓) ...
[ 2, 11801, 5254, 329, 4326, 62, 1102, 4018, 13, 20362, 198, 198, 11748, 11801, 913, 13, 47728, 238, 234, 11, 11801, 913, 13, 47728, 238, 233, 11, 11801, 913, 13, 47728, 238, 241, 11, 11801, 913, 13, 47728, 248, 107, 198, 198, 31, 9...
1.876068
468
export replace_lines """ replace_lines(path::AbstractString) replace_lines(file::File) replace_lines(dir::Dir) Replace part of the markdown file, which can be done an a per-line basis. For instance you cannot do this with code blocks but you can do this with bullets and section headings. """ replace_l...
[ 39344, 6330, 62, 6615, 198, 198, 37811, 198, 220, 220, 220, 6330, 62, 6615, 7, 6978, 3712, 23839, 10100, 8, 198, 220, 220, 220, 6330, 62, 6615, 7, 7753, 3712, 8979, 8, 198, 220, 220, 220, 6330, 62, 6615, 7, 15908, 3712, 35277, 8, ...
1.998447
644
@testset "1103.distribute-candies-to-people.jl" begin @test distribute_candies(7, 4) == [1, 2, 3, 1] @test distribute_candies(10, 3) == [5, 2, 3] @test distribute_candies(1958512, 40) == [ 49050, 49100, 49150, 49200, 49250, 49300, 49350, 49400,...
[ 31, 9288, 2617, 366, 11442, 18, 13, 17080, 4163, 12, 46188, 444, 12, 1462, 12, 15332, 13, 20362, 1, 2221, 198, 220, 220, 220, 2488, 9288, 14983, 62, 46188, 444, 7, 22, 11, 604, 8, 6624, 685, 16, 11, 362, 11, 513, 11, 352, 60, ...
1.493554
543
# Copyright 2018 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
[ 2, 15069, 2864, 1279, 20608, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
2.683386
7,536
module SailRoute include("uncertainty/discretization_error.jl") include("route/domain.jl") include("performance/polar.jl") include("route/shortest_path.jl") include("weather/load_weather.jl") end # module
[ 21412, 27783, 43401, 198, 198, 17256, 7203, 19524, 1425, 774, 14, 15410, 1186, 1634, 62, 18224, 13, 20362, 4943, 198, 17256, 7203, 38629, 14, 27830, 13, 20362, 4943, 198, 17256, 7203, 26585, 14, 79, 6192, 13, 20362, 4943, 198, 17256, 72...
3.089552
67
<gh_stars>0 include("../src/Cosmology.jl") using Cosmology using Base.Test function test_approx_eq_rtol(va, vb, rtol, astr, bstr) diff = maximum(abs(va - vb)) tol = rtol*max(maximum(abs(va)), maximum(abs(vb))) if diff > tol sdiff = string("|", astr, " - ", bstr, "| <= ", tol) error("asserti...
[ 27, 456, 62, 30783, 29, 15, 198, 17256, 7203, 40720, 10677, 14, 36734, 29126, 13, 20362, 4943, 198, 3500, 10437, 29126, 198, 3500, 7308, 13, 14402, 198, 198, 8818, 1332, 62, 1324, 13907, 62, 27363, 62, 17034, 349, 7, 6862, 11, 410, ...
1.97585
2,236
<reponame>SMG2S/SMG2S.jl using Smg2s, Test, SparseArrays @testset "Nilpotent Matrix" begin @testset "Nilp 1" begin @test NilpMat(Nilp(2,8)) * NilpMat(Nilp(2,8)) * NilpMat(Nilp(2,8)) == spzeros(8, 8) end @testset "Nilp 2" begin vec=[1; 1; 0; 1; 1; 1; 0] nilp = Nilp(vec, 8) @t...
[ 27, 7856, 261, 480, 29, 12310, 38, 17, 50, 14, 12310, 38, 17, 50, 13, 20362, 198, 3500, 2439, 70, 17, 82, 11, 6208, 11, 1338, 17208, 3163, 20477, 198, 198, 31, 9288, 2617, 366, 45, 346, 13059, 298, 24936, 1, 2221, 198, 220, 220,...
1.763218
435
<reponame>efmanu/SubspaceInference.jl #to plot uncertainities in neural networks function plot_predictive(data, trajectories, xs; μ=0, σ=0, title=["Plot"], legend = false) lt = length(trajectories) if lt < 1 throw("Err: No data") elseif lt == 1 μ = mean(trajectories["1"], dims=2) σ = std(trajectories["1"], d...
[ 27, 7856, 261, 480, 29, 891, 805, 84, 14, 7004, 13200, 818, 4288, 13, 20362, 198, 2, 1462, 7110, 8627, 871, 287, 17019, 7686, 198, 8818, 7110, 62, 79, 17407, 425, 7, 7890, 11, 20134, 1749, 11, 2124, 82, 26, 18919, 28, 15, 11, 18...
2.119469
3,842
<filename>src/radialmap/quantile.jl export center_std_diag!, center_std_off!, center_std! # Set ξ and σ for the diagonal entry, i.e. the last element of C function center_std_diag!(C::RadialMapComponent, X::AbstractMatrix{Float64}, γ::Float64) @get C (Nx, p) @assert (p>0 && γ >0.0) || (p==0 && γ>=0.0) "Error ...
[ 27, 34345, 29, 10677, 14, 6335, 498, 8899, 14, 40972, 576, 13, 20362, 198, 39344, 220, 3641, 62, 19282, 62, 10989, 363, 28265, 3641, 62, 19282, 62, 2364, 28265, 3641, 62, 19282, 0, 198, 198, 2, 5345, 7377, 122, 290, 18074, 225, 329,...
1.742832
4,534
<reponame>LCSB-BioCore/GigaScatter.jl """ mixableRaster(raster::Raster)::RasterMix Convert a raster into a form that is suitable for combining with other rasters. """ function mixableRaster(raster::Raster)::RasterMix colors = copy(raster[1:3, :, :]) colors[1, :, :] .*= raster[4, :, :] colors[2, :, :] ....
[ 27, 7856, 261, 480, 29, 5639, 16811, 12, 42787, 14055, 14, 38, 13827, 3351, 1436, 13, 20362, 198, 37811, 198, 220, 220, 220, 5022, 540, 49, 1603, 7, 81, 1603, 3712, 49, 1603, 2599, 25, 49, 1603, 35608, 198, 198, 3103, 1851, 257, 3...
1.975177
564
<filename>src/Fretboards.jl module Fretboards using ArgCheck: @argcheck using Crayons: Crayon using DocStringExtensions: FIELDS, SIGNATURES, TYPEDEF using OffsetArrays: OffsetMatrix using UnPack: @unpack include("pitch.jl") include("fretboard.jl") end # module
[ 27, 34345, 29, 10677, 14, 37, 1186, 12821, 13, 20362, 198, 21412, 376, 1186, 12821, 198, 198, 3500, 20559, 9787, 25, 2488, 853, 9122, 198, 3500, 327, 2433, 684, 25, 327, 2433, 261, 198, 3500, 14432, 10100, 11627, 5736, 25, 18930, 3698...
2.83871
93
<gh_stars>1-10 #= Copyright (c) 2018-2022 <NAME>, <NAME>, and contributors This Julia package Hypatia.jl is released under the MIT license; see LICENSE file in the root directory or at https://github.com/chriscoey/Hypatia.jl =# matrixcompletion_insts = [ [(k, d) for d in vcat(2, 5:5:max_d)] # includes compile run...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 28, 198, 15269, 357, 66, 8, 2864, 12, 1238, 1828, 1279, 20608, 22330, 1279, 20608, 22330, 290, 20420, 198, 198, 1212, 22300, 5301, 21209, 265, 544, 13, 20362, 318, 2716, 739, 262, 17168, ...
2.577093
227
# # Copyright (c) 2021 <NAME>, <NAME>, <NAME> # Licensed under the MIT license. See LICENSE file in the project root for details. # ################################## INSTALLATION #################################################### # (1) Enter Package Manager via ] # (2) Install FMI via add FMI ...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 1279, 20608, 22330, 1279, 20608, 22330, 1279, 20608, 29, 198, 2, 49962, 739, 262, 17168, 5964, 13, 4091, 38559, 24290, 2393, 287, 262, 1628, 6808, 329, 3307, 13, 198, 2, 198, 198, 29113, 2235, 40...
2.478762
1,907
using CurveProximityQueries using ConvexBodyProximityQueries using Test using LinearAlgebra using StaticArrays using IntervalArithmetic using Random: seed! using Unitful: nm, μm, mm, cm import CurveProximityQueries: differentiate, integrate @testset "CurveProximityQueries" begin @testset "Constructors" begin ...
[ 3500, 46300, 2964, 87, 18853, 4507, 10640, 198, 3500, 1482, 303, 87, 25842, 2964, 87, 18853, 4507, 10640, 198, 3500, 6208, 198, 3500, 44800, 2348, 29230, 198, 3500, 36125, 3163, 20477, 198, 3500, 4225, 2100, 3163, 29848, 198, 3500, 14534,...
1.930004
2,843
<reponame>blegat/PermutationGroups.jl<gh_stars>1-10 ############################################################ # Naive Vector&Dict implementation (as fast as manual loop), ############################################################ struct Orbit1{T, S} <: AbstractOrbit{T,S} elts::Vector{T} vals::Dict{T, S} en...
[ 27, 7856, 261, 480, 29, 903, 41268, 14, 5990, 76, 7094, 38, 14459, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 29113, 14468, 7804, 4242, 198, 2, 11013, 425, 20650, 5, 35, 713, 7822, 357, 292, 3049, 355, 10107, 9052, 828, ...
2.341625
603
function UniformRealDistribution() return UniformRealDistribution(()) end function UniformRealDistribution(arg0::jdouble, arg1::jdouble) return UniformRealDistribution((jdouble, jdouble), arg0, arg1) end function cumulative_probability(obj::UniformRealDistribution, arg0::jdouble) return jcall(obj, "cumula...
[ 8818, 35712, 15633, 20344, 3890, 3419, 198, 220, 220, 220, 1441, 35712, 15633, 20344, 3890, 7, 28955, 198, 437, 198, 198, 8818, 35712, 15633, 20344, 3890, 7, 853, 15, 3712, 73, 23352, 11, 1822, 16, 3712, 73, 23352, 8, 198, 220, 220, ...
2.990719
431
using ADCME using PyPlot using ProgressMeter using Statistics function f(x, σ) ε = randn(size(x)...) * σ return 10 * sin.(2π*x) + ε end batch_size = 32 noise = 1.0 X = reshape(LinRange(-0.5, 0.5, batch_size)|>Array, :, 1) y = f(X, noise) y_true = f(X, 0.0) close("all") scatter(X, y, marker="+", label="Trai...
[ 3500, 49169, 11682, 198, 3500, 9485, 43328, 220, 198, 3500, 18387, 44, 2357, 198, 3500, 14370, 198, 198, 8818, 277, 7, 87, 11, 18074, 225, 8, 198, 220, 220, 220, 7377, 113, 796, 43720, 77, 7, 7857, 7, 87, 8, 23029, 1635, 18074, 22...
2.013818
1,375
using MIToS.MSA using MIToS.Information const msa_long = read("../data/PF00089_aligned.fasta", FASTA) const msa_wide = read("../data/PF16957_aligned.fasta", FASTA) mip(msa) = APC!(mapcolpairfreq!(mutual_information, msa, Counts{Float64,2,GappedAlphabet}(ContingencyTable(Float64,Val{2},GappedAlphabet())))) mip(msa_lon...
[ 3500, 17168, 34049, 13, 44, 4090, 198, 3500, 17168, 34049, 13, 21918, 198, 198, 9979, 285, 11400, 62, 6511, 796, 1100, 7203, 40720, 7890, 14, 42668, 830, 4531, 62, 41634, 13, 7217, 64, 1600, 376, 1921, 5603, 8, 198, 9979, 285, 11400, ...
2.317949
195
function _clear_cache(network::AbstractGibbsNetwork, sol::Solution) i, j = node_from_index(network, length(first(sol.states))+1) if j != network.ncols return end delete!(memoize_cache(mps), (network, i)) delete!(memoize_cache(dressed_mps), (network, i)) delete!(memoize_cache(mpo), (network, i-1)) ...
[ 8818, 4808, 20063, 62, 23870, 7, 27349, 3712, 23839, 38, 571, 1443, 26245, 11, 1540, 3712, 46344, 8, 198, 220, 220, 220, 1312, 11, 474, 796, 10139, 62, 6738, 62, 9630, 7, 27349, 11, 4129, 7, 11085, 7, 34453, 13, 27219, 4008, 10, 1...
1.935856
4,942
# --- # title: 810. Chalkboard XOR Game # id: problem810 # author: <NAME> # date: 2020-10-31 # difficulty: Hard # categories: Math # link: <https://leetcode.com/problems/chalkboard-xor-game/description/> # hidden: true # --- # # We are given non-negative integers nums[i] which are written on a chalkboard. # Alice and ...
[ 2, 11420, 198, 2, 3670, 25, 807, 940, 13, 609, 971, 3526, 1395, 1581, 3776, 198, 2, 4686, 25, 1917, 40215, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940, 12, 3132, 198, 2, 8722, 25, 6912, 198, 2, 9376, 25...
2.872302
556
import Random import ALifeBenchmark using Test Random.seed!(1234) include("analysis/neutral_networks_test.jl") include("analysis/estimator_test.jl") include("geb/inputs_tests.jl") include("geb/actions_tests.jl") include("geb/network_tests.jl") include("geb/nodes_tests.jl") include("geb/rules_tests.jl") include("g...
[ 11748, 14534, 198, 198, 11748, 8355, 901, 44199, 4102, 198, 3500, 6208, 198, 198, 29531, 13, 28826, 0, 7, 1065, 2682, 8, 628, 198, 17256, 7203, 20930, 14, 29797, 62, 3262, 5225, 62, 9288, 13, 20362, 4943, 198, 17256, 7203, 20930, 14, ...
2.721649
194
<gh_stars>0 using Calculus using Gadfly using LaTeXStrings # for L"" strings using Compat using QuadGK using SpecialFunctions # WARNING: integrate(f,a,b) is deprecated, use (quadgk(f,a,b))[1] instead # f(x) = integrate(z -> besselj(1, z), 0.0, x) f(x) = QuadGK.quadgk(z -> besselj(1, z), 0.0, x)[1] function my_draw(f...
[ 27, 456, 62, 30783, 29, 15, 198, 3500, 2199, 17576, 198, 3500, 20925, 12254, 198, 3500, 4689, 49568, 13290, 654, 1303, 329, 406, 15931, 13042, 198, 3500, 3082, 265, 198, 3500, 20648, 38, 42, 198, 3500, 6093, 24629, 2733, 198, 198, 2, ...
2.047826
690
<reponame>khurrumsaleem/MOCNeutronTransport<gh_stars>0 # Bounding box # --------------------------------------------------------------------------------------------- # Bounding box of a vector of points function boundingbox(points::Vector{<:Point2D}) xmin = ymin = typemax(T) xmax = ymax = typemin(T) for i =...
[ 27, 7856, 261, 480, 29, 14636, 333, 45241, 1000, 368, 14, 44, 4503, 8199, 315, 1313, 8291, 634, 27, 456, 62, 30783, 29, 15, 198, 2, 347, 9969, 3091, 198, 2, 16529, 1783, 32501, 198, 2, 347, 9969, 3091, 286, 257, 15879, 286, 2173, ...
1.777122
2,710
module TestPyVirtualenv using PyVirtualenv: _leak, pycall_deps_jl, Py_IsInitialized, activate @static if VERSION < v"0.7.0-DEV.2005" using Base.Test else using Test end N = 10000 @testset "_leak(Cstring, ...)" begin for i in 1:N x = String(rand('A':'z', rand(1:1000))) y = Base.unsafe_str...
[ 21412, 6208, 20519, 37725, 24330, 198, 198, 3500, 9485, 37725, 24330, 25, 4808, 293, 461, 11, 12972, 13345, 62, 10378, 82, 62, 20362, 11, 9485, 62, 3792, 28500, 11, 15155, 198, 198, 31, 12708, 611, 44156, 2849, 1279, 410, 1, 15, 13, ...
2.11441
1,145
<gh_stars>10-100 # --- # title: 1669. Merge In Between Linked Lists # id: problem1669 # author: <NAME> # date: 2020-10-31 # difficulty: Medium # categories: Linked List # link: <https://leetcode.com/problems/merge-in-between-linked-lists/description/> # hidden: true # --- # # You are given two linked lists: `list1` an...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 11420, 198, 2, 3670, 25, 1467, 3388, 13, 39407, 554, 14307, 7502, 276, 44968, 198, 2, 4686, 25, 1917, 1433, 3388, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940...
2.364023
706
<filename>dialogs.jl function message(title::AbstractString, text::AbstractString) ccall((:IupMessage, "libiup"), Void, (AbstractString, AbstractString), title, text) end
[ 27, 34345, 29, 38969, 18463, 13, 20362, 198, 8818, 3275, 7, 7839, 3712, 23839, 10100, 11, 2420, 3712, 23839, 10100, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 40, 929, 12837, 11, 366, 8019, 72, 929, 12340, 18331, 11, 198, 220, 22...
2.890625
64
<filename>backend/anime_data/snapshots_5042.jl {"score_count": 46482, "score": 7.44, "timestamp": 1458050585.0} {"score_count": 43673, "score": 7.46, "timestamp": 1453815391.0} {"score_count": 40125, "score": 7.49, "timestamp": 1448615503.0} {"score_count": 104533, "score": 7.09, "timestamp": 1571753599.0} {"score_coun...
[ 27, 34345, 29, 1891, 437, 14, 272, 524, 62, 7890, 14, 45380, 20910, 62, 1120, 3682, 13, 20362, 198, 4895, 26675, 62, 9127, 1298, 604, 2414, 6469, 11, 366, 26675, 1298, 767, 13, 2598, 11, 366, 16514, 27823, 1298, 20299, 1795, 1120, 3...
2.336735
882
"Domain Specific Language for SEMs" module SEMLang # export @SEM, interpret, SEMSyntaxError export SEM using ..CausalCore: ExogenousVariable, EndogenousVariable struct SEMSyntaxError <: Exception msg end SEMSyntaxError() = SEMSyntaxError("") "Parse exogenous variable `line`" function parseexo(line) new_var = li...
[ 1, 43961, 17377, 15417, 329, 48603, 82, 1, 198, 21412, 48603, 43, 648, 198, 198, 2, 10784, 2488, 50, 3620, 11, 6179, 11, 48603, 13940, 41641, 12331, 198, 39344, 48603, 198, 3500, 11485, 24334, 6775, 14055, 25, 1475, 27897, 43015, 11, ...
2.583333
372
export Constant """ Constant(x) Constant sequence. Always returns `x`. """ struct Constant <: Sequence x end sample(seq::Constant, t::AbstractVector) = fill(seq.x, length(t))
[ 39344, 20217, 198, 198, 37811, 198, 220, 220, 220, 20217, 7, 87, 8, 198, 198, 3103, 18797, 8379, 13, 16622, 5860, 4600, 87, 44646, 198, 37811, 198, 7249, 20217, 1279, 25, 45835, 198, 220, 2124, 198, 437, 198, 198, 39873, 7, 41068, 3...
2.920635
63
<reponame>mleprovost/TransportBasedInference.jl # @testset "Verify log_pdf, grad_x_log_pdf and hess_x_log_pdf functions" begin # atol = 1e-8 # Ne = 50 # m = 10 # Blist = [ProHermiteBasis(8); PhyHermiteBasis(8); CstProHermiteBasis(8)]#; CstPhyHermiteBasis(8)]#; CstLinProHermiteBasis(8); CstLinPhyHermiteB...
[ 27, 7856, 261, 480, 29, 76, 293, 15234, 455, 14, 8291, 634, 15001, 818, 4288, 13, 20362, 198, 2, 2488, 9288, 2617, 366, 13414, 1958, 2604, 62, 12315, 11, 3915, 62, 87, 62, 6404, 62, 12315, 290, 339, 824, 62, 87, 62, 6404, 62, 12...
1.707772
8,158
""" plot(arg1::Array; kwargs...) reads (x,y) pairs from files [or standard input] and generates PostScript code that will plot lines, polygons, or symbols at those locations on a map. Full option list at [`psxy`](http://gmt.soest.hawaii.edu/doc/latest/psxy.html) Parameters ---------- - **A** : **straight_lines** : ...
[ 37811, 198, 29487, 7, 853, 16, 3712, 19182, 26, 479, 86, 22046, 23029, 198, 198, 40779, 357, 87, 11, 88, 8, 14729, 422, 3696, 685, 273, 3210, 5128, 60, 290, 18616, 2947, 7391, 2438, 326, 481, 7110, 3951, 11, 198, 35428, 70, 684, 1...
2.588406
4,140
include("h_file.jl") const EEPORT = 8000 function http_gatekeeper(req) if req.method == "GET" handle_file(req) # Add a Pragma header (should not be stripped by proxies)? # Or better, inject in document? else Response(501, "Unimplemented method on this server: $(req.method)") ...
[ 17256, 7203, 71, 62, 7753, 13, 20362, 4943, 198, 9979, 412, 8905, 9863, 796, 38055, 198, 198, 8818, 2638, 62, 10494, 13884, 7, 42180, 8, 198, 220, 220, 220, 611, 43089, 13, 24396, 6624, 366, 18851, 1, 198, 220, 220, 220, 220, 220, ...
2.621253
367
struct S a b c end
[ 7249, 311, 257, 275, 269, 886, 198 ]
2.714286
7
<reponame>wesselb/ConvCNP.jl export DataGenerator, UniformUnion, Sawtooth, BayesianConvNP, Mixture """ DataGenerator # Fields - `process`: Something that can be called at inputs `x` and a noise level `noise` and gives back a distribution that can be fed to `randn` to sample values corresponding to those i...
[ 27, 7856, 261, 480, 29, 86, 7878, 65, 14, 3103, 85, 34, 22182, 13, 20362, 198, 39344, 6060, 8645, 1352, 11, 35712, 38176, 11, 19882, 1462, 849, 11, 4696, 35610, 3103, 85, 22182, 11, 337, 9602, 198, 198, 37811, 198, 220, 220, 220, ...
2.462276
3,128
# import Base: # VersionNumber # VERSION = VersionNumber(0,0,1,("git",),(0005,)) # module version # end ## julia version info # Include build number if we've got at least some distance from a tag (e.g. a release) try build_number = GIT_VERSION_INFO.build_number != 0 ? "+$(GIT_VERSION_INFO.build_number)" : ""...
[ 2, 1330, 7308, 25, 198, 2, 220, 220, 220, 220, 10628, 15057, 198, 2, 44156, 2849, 796, 10628, 15057, 7, 15, 11, 15, 11, 16, 11, 7203, 18300, 1600, 828, 7, 830, 20, 11, 4008, 198, 2, 8265, 2196, 198, 2, 886, 628, 198, 2235, 474...
2.949438
178
<gh_stars>10-100 #================ Predictive Learning Models ================# @doc """ | Model Type | Model Name |\n |:---------- | ---------- |\n | Baseline | MeanBaseline |\n | Baseline | ClassBaseline |\n | Continuous | LinearRegression |\n | Continuous | LinearLeastSquare |\n | Categorica...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 4770, 198, 47, 17407, 425, 198, 220, 220, 220, 18252, 198, 220, 220, 220, 220, 220, 220, 220, 32329, 198, 4770, 2, 198, 31, 15390, 37227, 198, 91, 9104, 5994, 930, 9104, 6530, 930, ...
3.236443
461
<reponame>cesmix-mit/PotentialLearning.jl<filename>src/Potentials/GaN.jl """ GaN Potential See 10.1088/1361-648X/ab6cbe """ mutable struct GaN <: Potential lj_Ga_Ga::LennardJones lj_N_N::LennardJones bm_Ga_N::BornMayer c::Coulomb no_Ga::Int64 no_N::Int64 end function GaN(params::Dict) ...
[ 27, 7856, 261, 480, 29, 728, 19816, 12, 2781, 14, 25396, 1843, 41730, 13, 20362, 27, 34345, 29, 10677, 14, 25396, 14817, 14, 35389, 45, 13, 20362, 198, 37811, 198, 220, 220, 220, 12822, 45, 32480, 198, 198, 6214, 838, 13, 940, 3459,...
2.127986
586
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct SecurityRuleDirection <: SwaggerModel function SecurityRuleDirection(;) o = new() o end end # type SecurityRuleDirection const _property_...
[ 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, 4765, 31929, 35, 4154, 1279, 25, 2451, 7928, ...
3.320819
293
<reponame>JuliaPackageMirrors/NamedArrays.jl<gh_stars>0 ## (c) 2016 <NAME> ## Unit tests for ../src/arithmetic.jl ## This code is licensed under the MIT license ## See the file LICENSE.md in this distribution ## test arithmetic operations print("arithmetic, ") x = NamedArray(randn(5, 10)) @test (-x).array == -(x.ar...
[ 27, 7856, 261, 480, 29, 16980, 544, 27813, 27453, 5965, 14, 45, 2434, 3163, 20477, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 2235, 357, 66, 8, 1584, 1279, 20608, 29, 198, 198, 2235, 11801, 5254, 329, 11485, 14, 10677, 14, 283, 2...
2.178112
466
# x, y without type, this is a generic function function f(x, y) x + y end println(f(1, 2)) # 3 g = f # g is f println(g(1, 2)) function with_return() return "I have return" end println(with_return()) function hypot(x, y) x = abs(x) y = abs(y) if x > y r = y/x return x*sqrt(1+r*r)...
[ 2, 2124, 11, 331, 1231, 2099, 11, 428, 318, 257, 14276, 2163, 198, 8818, 277, 7, 87, 11, 331, 8, 198, 220, 220, 220, 2124, 1343, 331, 198, 437, 198, 198, 35235, 7, 69, 7, 16, 11, 362, 4008, 198, 2, 513, 198, 70, 796, 277, 13...
1.984127
252
<gh_stars>0 module Move_AllVisualObjects using Modia3D filename = joinpath(Modia3D.path, "objects", "fish", "SiameseTiger0.3ds") #filename = joinpath(Modia3D.path, "objects","engine", "crank", "crank.obj") #file = FileShape.convexFile(filename; scaleFactor=MVector{3,Float64}(4.0,4.0,4.0)) # Material for Visualiza...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 10028, 62, 3237, 36259, 10267, 82, 198, 198, 3500, 3401, 544, 18, 35, 628, 198, 198, 34345, 796, 4654, 6978, 7, 5841, 544, 18, 35, 13, 6978, 11, 366, 48205, 1600, 366, 11084, 1600, 366, 4280...
2.048124
1,226
function MCTS.estimate_value(est::BasicPOMCP.SolvedFORollout, bmdp::POMDPToolbox.GenerativeBeliefMDP, belief, d::Int64) sim = RolloutSimulator(est.rng, Nullable{Any}(), Nullable{Float64}(), Nullable(d)) return simulate(sim, ...
[ 8818, 337, 4177, 50, 13, 395, 1920, 62, 8367, 7, 395, 3712, 26416, 47, 2662, 8697, 13, 50, 5634, 13775, 692, 448, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.907718
596
<gh_stars>1-10 # This file is a part of ValueShapes.jl, licensed under the MIT License (MIT). using ValueShapes using Test @testset "functions" begin shape = NamedTupleShape( a = ArrayShape{Real}(3,2), b = ArrayShape{Real}(2) ) x_flat = rand(@inferred totalndof(shape)) x = @inferred ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 770, 2393, 318, 257, 636, 286, 11052, 2484, 7916, 13, 20362, 11, 11971, 739, 262, 17168, 13789, 357, 36393, 737, 198, 198, 3500, 11052, 2484, 7916, 198, 3500, 6208, 628, 198, 31, 9288, ...
2.316901
284