content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
summary_callback(integrator) = false # when used as condition; never call the summary callback during the simulation
summary_callback(u, t, integrator) = u_modified!(integrator, false) # the summary callback does nothing when called accidentally
"""
SummaryCallback()
Create and return a callback that prints a h... | [
198,
49736,
62,
47423,
7,
18908,
12392,
8,
796,
3991,
1303,
618,
973,
355,
4006,
26,
1239,
869,
262,
10638,
23838,
1141,
262,
18640,
198,
49736,
62,
47423,
7,
84,
11,
256,
11,
4132,
12392,
8,
796,
334,
62,
41771,
0,
7,
18908,
1239... | 2.743822 | 2,428 |
"Supertype of lazy grids, defined in terms of other grids."
abstract type LazyGrid{T,N} <: AbstractGrid{T,N}
end
"Grid defined in terms of a single `supergrid`."
abstract type SimpleLazyGrid{T,N} <: AbstractGrid{T,N}
end
supergrid(g::SimpleLazyGrid) = g.grid
supergrid(g::SimpleLazyGrid, I...) = supergrid(g)[I...]
"... | [
198,
1,
12442,
4906,
286,
16931,
50000,
11,
5447,
287,
2846,
286,
584,
50000,
526,
198,
397,
8709,
2099,
406,
12582,
41339,
90,
51,
11,
45,
92,
1279,
25,
27741,
41339,
90,
51,
11,
45,
92,
198,
437,
198,
198,
1,
41339,
5447,
287,
... | 2.783133 | 166 |
<reponame>DANA-Laboratory/EMSOModelLibrary.jl
#-------------------------------------------------------------------
#* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
#*
#* This LIBRARY is free software; you can distribute it and/or modify
#* it under the therms of the ALSOC FREE LICENSE as available at
#* htt... | [
27,
7856,
261,
480,
29,
35,
31574,
12,
42230,
2870,
14,
39201,
2662,
375,
417,
23377,
13,
20362,
198,
2,
10097,
6329,
198,
2,
9,
41363,
46,
9104,
10074,
357,
3620,
43,
8,
15069,
357,
34,
8,
5472,
532,
4343,
27249,
4503,
13,
198,
... | 2.257996 | 2,345 |
struct LinearSystem <: AbstractEnv
A
B
end
function State(env::LinearSystem)
@unpack B = env
n = size(B)[1]
return function (x)
@assert length(x) == n
x
end
end
function Params(env::LinearSystem)
() -> nothing
end
function Dynamics!(env::LinearSystem)
@unpack A, B = en... | [
7249,
44800,
11964,
1279,
25,
27741,
4834,
85,
198,
220,
220,
220,
317,
198,
220,
220,
220,
347,
198,
437,
198,
198,
8818,
1812,
7,
24330,
3712,
14993,
451,
11964,
8,
198,
220,
220,
220,
2488,
403,
8002,
347,
796,
17365,
198,
220,
... | 2.126761 | 213 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 2.850225 | 888 |
<gh_stars>10-100
@testset "672.bulb-switcher-ii.jl" begin
@test flip_lights(0, 0) == 1
@test flip_lights(2, 1) == 3
@test flip_lights(2, 2) == 4
@test flip_lights(2, 3) == 4
end | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
31,
9288,
2617,
366,
43864,
13,
15065,
65,
12,
2032,
23640,
12,
4178,
13,
20362,
1,
2221,
198,
220,
220,
220,
2488,
9288,
14283,
62,
8091,
7,
15,
11,
657,
8,
6624,
352,
198,
220,
220,
... | 2.097826 | 92 |
<reponame>Michiel-VL/GCSPET.jl
export LB1, LB2, LB3, LB4, LB5, LB6
"""
compute_bound(LB, fpath)
Compute bound `LB` for the instance-file fpath
"""
function compute_bound(LB, fpath)
i = read(fpath, Instance)
return LB(i)
end
"""
compute_bounds(boundset, fpath)
Computes the bounds in `boundset` for ... | [
27,
7856,
261,
480,
29,
11180,
8207,
12,
47468,
14,
15916,
4303,
2767,
13,
20362,
198,
39344,
22199,
16,
11,
22199,
17,
11,
22199,
18,
11,
22199,
19,
11,
22199,
20,
11,
22199,
21,
628,
198,
37811,
198,
220,
220,
220,
24061,
62,
77... | 2.460484 | 1,240 |
pushfirst!(LOAD_PATH, joinpath(@__DIR__, ".."))
using Oceananigans
using Oceananigans.TimeSteppers: time_step!
using BenchmarkTools
N = 256
xy_grid = RegularRectilinearGrid(size = (N, N, 1), halo = (3, 3, 3), extent = (2Ο, 2Ο, 2Ο), topology = (Periodic, Periodic, Bounded))
xz_grid = RegularRectilinearGrid(size = (N,... | [
14689,
11085,
0,
7,
35613,
62,
34219,
11,
4654,
6978,
7,
31,
834,
34720,
834,
11,
366,
492,
48774,
198,
198,
3500,
10692,
272,
34090,
198,
3500,
10692,
272,
34090,
13,
7575,
7447,
11799,
25,
640,
62,
9662,
0,
198,
3500,
25187,
4102,... | 1.862637 | 728 |
<reponame>probcomp/GLRenderer.jl<filename>test/test_camera_pose_invariance.jl<gh_stars>1-10
# -*- coding: utf-8 -*-
import Revise
import GLRenderer
import PoseComposition
import Rotations
import FileIO
R = Rotations
P = PoseComposition
GL = GLRenderer
obj_path = joinpath(@__DIR__, "035_power_drill/textured_simple.obj... | [
27,
7856,
261,
480,
29,
1676,
65,
5589,
14,
8763,
49,
437,
11882,
13,
20362,
27,
34345,
29,
9288,
14,
9288,
62,
25695,
62,
3455,
62,
16340,
2743,
590,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
532,
9,
12,
19617,
... | 2.18705 | 556 |
<reponame>UnofficialJuliaMirror/ChainRulesCore.jl-d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4
#==
All differentials need to define + and *.
That happens here.
We just use @eval to define all the combinations for AbstractDifferential
subtypes, as we know the full set that might be encountered.
Thus we can avoid any ambiguitie... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
14,
35491,
37766,
14055,
13,
20362,
12,
67,
15277,
67,
17,
68,
21,
12,
65,
1731,
66,
12,
1157,
68,
24,
12,
64,
17,
64,
18,
12,
17,
64,
17,
3609,
17,
9945,
66,
344,
... | 2.497523 | 1,413 |
<gh_stars>100-1000
# # SEIR
#md # [](@__NBVIEWER_ROOT_URL__/models/SEIR.ipynb)
#
#md # !!! note "Overview"
#md # System type: Nonlinear system\
#md # State dimension: 7\
#md # Application domain: Epidemiology
#
# ## Model description
#
# The SEIR Mod... | [
27,
456,
62,
30783,
29,
3064,
12,
12825,
198,
2,
1303,
7946,
4663,
198,
2,
9132,
1303,
685,
0,
58,
16151,
5450,
1378,
9600,
13,
26662,
82,
13,
952,
14,
14774,
469,
14,
12860,
12,
46803,
1177,
263,
12,
41734,
26576,
13,
21370,
70,
... | 2.156279 | 1,075 |
using KernelEstimator
using Base.Test
# write your own tests here
include("testreg.jl")
| [
3500,
32169,
22362,
320,
1352,
198,
3500,
7308,
13,
14402,
198,
198,
2,
3551,
534,
898,
5254,
994,
198,
17256,
7203,
9288,
2301,
13,
20362,
4943,
198
] | 3.296296 | 27 |
<reponame>JuliaAtoms/EnergyExpressions.jl
"""
above_diagonal_loop(N, itersym, imax, args...)
Generate `N` Cartesian loops for the iteration variables
`itersym_{1:N}`, where `itersym_N β 1:imax`, `itersym_{N-1} β
itersym_N+1:imax`, etc, i.e. above the hyper-diagonal of the
`N`-dimensional hypercube with the side `i... | [
27,
7856,
261,
480,
29,
16980,
544,
2953,
3150,
14,
28925,
38839,
507,
13,
20362,
198,
37811,
198,
220,
220,
220,
2029,
62,
10989,
27923,
62,
26268,
7,
45,
11,
340,
364,
4948,
11,
545,
897,
11,
26498,
23029,
198,
198,
8645,
378,
4... | 2.297681 | 1,337 |
"""
sparsify(x, nnzrate)
Replace `AbstractMatrix` `x` with `SparseMatrixCSC` if at most `nnzrate` fraction of elements is non-zero.
```jldoctest
julia> n = ArrayNode([0 0; 0 0])
2Γ2 ArrayNode{Matrix{Int64}, Nothing}:
0 0
0 0
julia> Mill.mapdata(i -> sparsify(i, 0.05), n)
2Γ2 ArrayNode{SparseMatrixCSC{Int64, ... | [
37811,
198,
220,
220,
220,
599,
945,
1958,
7,
87,
11,
299,
27305,
4873,
8,
198,
198,
3041,
5372,
4600,
23839,
46912,
63,
4600,
87,
63,
351,
4600,
50,
29572,
46912,
34,
6173,
63,
611,
379,
749,
4600,
20471,
89,
4873,
63,
13390,
286... | 2.374315 | 3,831 |
# Rational approximations to generalized hypergeometric functions
# using Drummond's sequence transformation
# βFβ(;z)
function drummond0F0(z::T; kmax::Int = 10_000) where T
if norm(z) < eps(real(T))
return one(T)
end
ΞΆ = inv(z)
Nlo = ΞΆ
Dlo = ΞΆ
Tlo = Nlo/Dlo
Nhi = (2ΞΆ - 1)*Nlo + 2ΞΆ
... | [
2,
46863,
5561,
320,
602,
284,
38284,
8718,
469,
16996,
5499,
198,
2,
1262,
25331,
6327,
338,
8379,
13389,
198,
198,
2,
2343,
224,
222,
37,
158,
224,
222,
7,
26,
89,
8,
198,
8818,
13026,
6327,
15,
37,
15,
7,
89,
3712,
51,
26,
... | 1.443232 | 8,887 |
function CentralGravity(Body::T, PosRsph::Vector{Float64}) where {T <: abstractCelestialBody}
#This function computes the gravitational acceleration according to a Central
#field model. Gravitational acceleration written in V-frame
return g = [0, 0, mu(Body)/PosRsph[1]^2]
end
| [
8818,
5694,
38,
16995,
7,
25842,
3712,
51,
11,
18574,
31273,
746,
3712,
38469,
90,
43879,
2414,
30072,
810,
1391,
51,
1279,
25,
12531,
34,
417,
21711,
25842,
92,
198,
220,
1303,
1212,
2163,
552,
1769,
262,
29973,
20309,
1864,
284,
257... | 3.409639 | 83 |
function try_candidate(candidate::Candidate, truth::Candidate)
codes = fill(Wordle.PRESENT_NOWHERE, 5)
truth_letter_counts = LetterCounts(truth)
for (i, char) in enumerate(candidate.chars)
if char == truth.chars[i]
@assert truth_letter_counts[char] > 0
codes[i] = PRESENT_HE... | [
8818,
1949,
62,
46188,
20540,
7,
46188,
20540,
3712,
41572,
20540,
11,
3872,
3712,
41572,
20540,
8,
198,
220,
220,
220,
12416,
796,
6070,
7,
26449,
293,
13,
48296,
3525,
62,
45669,
39,
9338,
11,
642,
8,
628,
220,
220,
220,
3872,
62,... | 2.147059 | 306 |
function _bump(records::AbstractVector{R}, b::Int) where {T, R<:Record{T}}
new_records = Vector{R}(undef, length(records))
for (i, record) in enumerate(records)
new_record = Record{T}(record.chrom, record.first + b, record.last + b, record.value)
new_records[i] = new_record
end
retur... | [
8818,
4808,
65,
931,
7,
8344,
3669,
3712,
23839,
38469,
90,
49,
5512,
275,
3712,
5317,
8,
810,
1391,
51,
11,
371,
27,
25,
23739,
90,
51,
11709,
628,
220,
220,
220,
649,
62,
8344,
3669,
796,
20650,
90,
49,
92,
7,
917,
891,
11,
... | 2.575427 | 1,465 |
struct TwoDimSubspace end
function (tds::TwoDimSubspace)(state, B, Ξ)
isposdef(B) ||
error("Two-dimensional subspace method only works for positive definite B.")
p = similar(state.x)
p1 = βf = state.βf
p2 = inv(B) * βf
norm_βf = norm(βf)
norm_p2 = norm(p2)
prod = βf' * B * βf
i... | [
7249,
4930,
29271,
7004,
13200,
886,
198,
198,
8818,
357,
8671,
82,
3712,
7571,
29271,
7004,
13200,
5769,
5219,
11,
347,
11,
37455,
8,
198,
220,
220,
220,
318,
1930,
4299,
7,
33,
8,
8614,
220,
198,
220,
220,
220,
220,
220,
220,
22... | 1.707263 | 895 |
<reponame>jmgnve/Vann<filename>src/utils_calib.jl
"""
calib_wrapper(param, st_hydro, prec, epot, q_obs, q_sim)
Wrapper function required for calibrating hydrological routing model.
"""
function calib_wrapper(param, st_hydro, prec, epot, q_obs, q_sim, states_sim, warmup, force_states)
# As... | [
27,
7856,
261,
480,
29,
73,
76,
4593,
303,
14,
53,
1236,
27,
34345,
29,
10677,
14,
26791,
62,
9948,
571,
13,
20362,
198,
201,
198,
201,
198,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
220,
220,
220,
27417,
62,
48553,
7,
1714... | 2.139093 | 5,313 |
<reponame>pitmonticone/SeaPearl.jl<gh_stars>0
adj = [0 1 0 1;
1 0 1 0;
0 1 0 1;
1 0 1 0]
@testset "defaultstaterepresentation.jl" begin
@testset "DefaultStateRepresentation structure" begin
g = SeaPearl.CPLayerGraph()
nodeFeatures = [1.0f0 1.0f0; 2.0f0 2.0f0]
varia... | [
27,
7856,
261,
480,
29,
15544,
8691,
27981,
14,
37567,
46262,
75,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
41255,
796,
685,
15,
352,
657,
352,
26,
198,
220,
220,
220,
220,
220,
220,
352,
657,
352,
657,
26,
198,
220,
220,
220,... | 1.782239 | 3,761 |
<filename>old/random/benchmark_convertion.jl
using BenchmarkTools
using Yao
using LuxurySparse
Id = IMatrix{1<<16}()
Pm = pmrand(ComplexF64, 1<<16)
Dv = Diagonal(randn(ComplexF64, 1<<16))
bench = BenchmarkGroup()
bg = bench["To Sparse"] = BenchmarkGroup()
bg["permmatrix"] = @benchmarkable SparseMatrixCSC(Pm)
bg["ima... | [
27,
34345,
29,
727,
14,
25120,
14,
26968,
4102,
62,
1102,
1851,
295,
13,
20362,
198,
3500,
25187,
4102,
33637,
198,
198,
3500,
37826,
198,
3500,
17145,
1601,
50,
29572,
198,
198,
7390,
796,
8959,
265,
8609,
90,
16,
16791,
1433,
92,
... | 2.548023 | 177 |
<reponame>kyungminlee/LatticeTools.jl
export make_lattice, makelattice
export Lattice
export dimension
"""
Lattice{S, O}
Represent a lattice.
# Arguments
* `unitcell::UnitCell{S, O}`
* `hypercube::Hypercube`
* `bravais_coordinates::Vector{Vector{Int}}`
* `supercell::UnitCell{Tuple{S, Vector{Int}}, Tuple{O, Vect... | [
27,
7856,
261,
480,
29,
2584,
2150,
1084,
7197,
14,
43,
1078,
501,
33637,
13,
20362,
198,
39344,
787,
62,
75,
1078,
501,
11,
787,
75,
1078,
501,
198,
39344,
406,
1078,
501,
198,
39344,
15793,
628,
198,
37811,
198,
220,
220,
220,
4... | 2.485412 | 1,988 |
using DataStructures
import DataStructures: dequeue!, enqueue!
import Base: length, next, start, done
# struct HalfPath
# q::Queue{Int}
# HalfPath() = new(Queue(Int))
# end
HalfPath = Deque{Int}
enqueue!(p::HalfPath, x::Int) = push!(p, x)
dequeue!(p::HalfPath) = shift!(p)
struct Path
head::... | [
3500,
6060,
44909,
942,
201,
198,
11748,
6060,
44909,
942,
25,
390,
36560,
28265,
551,
36560,
0,
201,
198,
11748,
7308,
25,
4129,
11,
1306,
11,
923,
11,
1760,
201,
198,
201,
198,
2,
2878,
13139,
15235,
201,
198,
2,
220,
220,
220,
... | 2.190476 | 441 |
<filename>src/stencil.jl
abstract type Stencil end
###
struct Star <: Stencil end
const star = Star()
| [
27,
34345,
29,
10677,
14,
26400,
2856,
13,
20362,
198,
397,
8709,
2099,
520,
268,
2856,
886,
198,
198,
21017,
198,
7249,
2907,
1279,
25,
520,
268,
2856,
886,
198,
198,
9979,
3491,
796,
2907,
3419,
628,
198
] | 2.789474 | 38 |
# *****************************************************************************
# Written by <NAME>, <EMAIL>
# *****************************************************************************
# Copyright Γ£ 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Admin... | [
2,
41906,
17174,
4557,
35625,
201,
198,
2,
22503,
416,
1279,
20608,
22330,
1279,
27630,
4146,
29,
201,
198,
2,
41906,
17174,
4557,
35625,
201,
198,
2,
15069,
6184,
96,
1853,
11,
1578,
1829,
5070,
11,
355,
7997,
416,
262,
201,
198,
2... | 3.482993 | 1,029 |
<filename>perf/kernels/ard_perf.jl
include("kern_proc.jl")
d = 10
n = [50, 100, 500]
Ξ» = rand(d)
cov_procs = Array(Proc, 0)
push!(cov_procs, KernelTest(SEArd(Ξ», 1.0), d, GaussianProcesses.cov))
push!(cov_procs, KernelTest(Mat12Ard(Ξ», 1.0), d, GaussianProcesses.cov))
push!(cov_procs, KernelTest(Mat32Ard(Ξ», 1.0), d, G... | [
27,
34345,
29,
525,
69,
14,
74,
44930,
14,
446,
62,
525,
69,
13,
20362,
198,
17256,
7203,
74,
1142,
62,
36942,
13,
20362,
4943,
198,
198,
67,
796,
838,
198,
77,
796,
685,
1120,
11,
1802,
11,
5323,
60,
198,
198,
39377,
796,
43720... | 2.254941 | 506 |
struct LinearCombination{T, As} <: LinearMap{T}
maps::As
function LinearCombination{T, As}(maps::As) where {T, As}
N = length(maps)
sz = size(maps[1])
for n in 1:N
size(maps[n]) == sz || throw(DimensionMismatch("LinearCombination"))
promote_type(T, eltype(maps[n])... | [
7249,
44800,
20575,
1883,
90,
51,
11,
1081,
92,
1279,
25,
44800,
13912,
90,
51,
92,
198,
220,
220,
220,
8739,
3712,
1722,
198,
220,
220,
220,
2163,
44800,
20575,
1883,
90,
51,
11,
1081,
92,
7,
31803,
3712,
1722,
8,
810,
1391,
51,
... | 2.11912 | 2,636 |
<reponame>sptsarev/high-deg-polynomial-fitting
# Π Π΄Π°Π½Π½ΠΎΠΌ ΡΠ°ΠΉΠ»Π΅ ΡΠΎΠ±ΡΠ°Π½Ρ ΡΠ»ΡΠΆΠ΅Π±Π½ΡΠ΅ ΡΡΠ½ΠΊΡΠΈΠΈ, Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΡΠ΅ Π΄Π»Ρ:
# 1. ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ Π²Ρ
ΠΎΠ΄Π½ΡΡ
Π°ΡΠ³ΡΠΌΠ΅Π½ΡΠΎΠ² Π²ΡΠ·ΠΎΠ²Π° ΡΠΊΡΠΈΠΏΡΠ°;
# 2. ΡΡΠ΅Π½ΠΈΡ Π±ΠΎΠ»ΡΡΠΈΡ
ΡΠ°ΠΉΠ»ΠΎΠ² Π² Π·Π°Π΄Π°Π½Π½ΠΎΠΌ ΡΠΎΡΠΌΠ°ΡΠ΅ Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΡΠΌ ΠΏΡΠΎΠΏΡΡΠΊΠΎΠΌ Π·Π°ΠΊΠΎΠΌΠΌΠ΅Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ
ΠΈΠ»ΠΈ Π½Π΅Π½ΡΠΆΠ½ΡΡ
ΡΡΡΠΎΠΊ Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠ°;
# 3. Π²ΡΠ²ΠΎΠ΄ ΡΠΈΡΠ»Π° ΡΠΈΠΏΠ° Int Ρ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ΠΌ Π½Π΅ΠΎΠ±... | [
27,
7856,
261,
480,
29,
82,
457,
82,
533,
85,
14,
8929,
12,
13500,
12,
35428,
26601,
498,
12,
32232,
198,
2,
12466,
240,
12466,
112,
16142,
22177,
22177,
25443,
120,
220,
141,
226,
16142,
140,
117,
30143,
16843,
220,
21727,
25443,
1... | 1.380352 | 6,586 |
"""
(fx,ft)=fft3d(z)
Compute spatial (`fx`) and temporal (`ft`) Fourier spectra of field `z`.
"""
function fft3d(z)
nss = size(z); ns = nss[1]
if (length(nss)>=3)
nt=nss[3]
else
nt=1
end
ns2 = div(ns,2)
nt2 = div(nt,2)
if ((nt>1)&&(mod(nt,2... | [
37811,
198,
220,
220,
220,
357,
21373,
11,
701,
47505,
487,
83,
18,
67,
7,
89,
8,
198,
198,
7293,
1133,
21739,
357,
63,
21373,
63,
8,
290,
21964,
357,
63,
701,
63,
8,
34296,
5277,
5444,
430,
286,
2214,
4600,
89,
44646,
198,
3781... | 1.413517 | 873 |
"""
Multiply a matrix with its own adjoint, obtaining a symmetric/hermitian result where
relevant.
The only exported symbol is [`SELF`](@ref), use eg `SELF' * A`.
"""
module SymmetricProducts
using LinearAlgebra: Diagonal, Hermitian, Symmetric
import Base: show
import LinearAlgebra: adjoint, *
export SELF
struct S... | [
37811,
198,
15205,
541,
306,
257,
17593,
351,
663,
898,
9224,
1563,
11,
16727,
257,
23606,
19482,
14,
372,
2781,
666,
1255,
810,
198,
49659,
13,
198,
198,
464,
691,
29050,
6194,
318,
685,
63,
50,
37738,
63,
16151,
31,
5420,
828,
779... | 2.663424 | 514 |
## TODO: Eventually we want to move all these functions and their adjoints to NNlib.jl
# Normalization Implementation
@inline function update_statistics(x::AbstractArray{T, N},
running_mean::AbstractArray{T, N},
running_var::AbstractArray{T, N},
... | [
2235,
16926,
46,
25,
16178,
356,
765,
284,
1445,
477,
777,
5499,
290,
511,
9224,
1563,
82,
284,
399,
45,
8019,
13,
20362,
198,
198,
2,
14435,
1634,
46333,
198,
31,
45145,
2163,
4296,
62,
14269,
3969,
7,
87,
3712,
23839,
19182,
90,
... | 1.715242 | 7,617 |
<reponame>charleskawczynski/VariableTemplates.jl
export varsindex, varsindices
"""
varsindex(S, p::Symbol, [sp::Symbol...])
Return a range of indices corresponding to the property `p` and
(optionally) its subproperties `sp` based on the template type `S`.
# Examples
```julia-repl
julia> S = @vars(x::Float64, y::... | [
27,
7856,
261,
480,
29,
10641,
829,
74,
707,
26691,
40008,
14,
43015,
12966,
17041,
13,
20362,
198,
39344,
410,
945,
9630,
11,
410,
945,
521,
1063,
198,
198,
37811,
198,
220,
220,
220,
410,
945,
9630,
7,
50,
11,
279,
3712,
13940,
... | 2.155405 | 1,036 |
using Origin
using Test
@testset "Test for plain" begin
@origin (a=>0, b=>2) function test()
a = collect(0:10)
b = collect(1:5)
@test a[0] == 0
@test a[10] == 10
@test b[2] == 1
@test b[4] == 3
@test b[end] == 5
@test b[2:end] == [1, 2, 3, 4, 5]
@test b[a[5]] == 4
end
test()
end
@t... | [
3500,
19349,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
14402,
329,
8631,
1,
2221,
198,
31,
47103,
357,
64,
14804,
15,
11,
275,
14804,
17,
8,
2163,
1332,
3419,
198,
220,
220,
220,
257,
796,
2824,
7,
15,
25,
940,
8,
198,
220... | 2.041126 | 462 |
<reponame>adrhill/ExplainabilityMethods.jl<filename>test/test_heatmaps.jl
using ExplainableAI
# NOTE: Heatmapping assumes Flux's WHCN convention (width, height, color channels, batch size).
shape = (2, 2, 3, 1)
A = reshape(collect(Float32, 1:prod(shape)), shape)
shape = (2, 2, 3, 2)
batch = reshape(collect(Float32, 1... | [
27,
7856,
261,
480,
29,
41909,
12639,
14,
18438,
391,
1799,
46202,
13,
20362,
27,
34345,
29,
9288,
14,
9288,
62,
25080,
31803,
13,
20362,
198,
3500,
48605,
540,
20185,
198,
198,
2,
24550,
25,
12308,
76,
5912,
18533,
1610,
2821,
338,
... | 2.300766 | 522 |
facts("Containers") do
context("incorrect type creation") do
@fact_throws Exception Container("this"; volume="/a")
end
context("type creation") do
container = Container("this"; volume=("/this", "/a"), volume=("/that", "/b"))
context("standard") do
@fact container.image.name => "this"
@fac... | [
37473,
7203,
4264,
50221,
4943,
466,
198,
220,
4732,
7203,
1939,
47315,
2099,
6282,
4943,
466,
198,
220,
220,
220,
2488,
22584,
62,
400,
8516,
35528,
43101,
7203,
5661,
8172,
6115,
35922,
64,
4943,
198,
220,
886,
628,
220,
4732,
7203,
... | 2.367769 | 1,210 |
<reponame>Tuebel/MeasureTheory.jl
# Categorical distribution
# REFERENCES
# https://juliastats.org/Distributions.jl/stable/univariate/#Distributions.Categorical
# https://juliastats.org/Distributions.jl/stable/univariate/#Distributions.DiscreteNonParametric
export Categorical
@parameterized Categorical(p) βͺ Counting... | [
27,
7856,
261,
480,
29,
41392,
6667,
14,
47384,
464,
652,
13,
20362,
198,
2,
327,
2397,
12409,
6082,
198,
198,
2,
4526,
24302,
24181,
1546,
198,
2,
3740,
1378,
73,
32176,
459,
1381,
13,
2398,
14,
20344,
2455,
507,
13,
20362,
14,
3... | 2.725953 | 551 |
<reponame>frankwswang/QuMGAN.jl
using LinearAlgebra
using Yao
using Yao.Blocks
using QuAlgorithmZoo
using Statistics
#=
"""wavefunction through generator"""
function psiGen(qg::QuGAN)
regGen = copy(qg.reg0)
regGenStore = zero_state(0)
for i=1:2qg.dG ##each layer consists of 1 layer of rotation gates and 1 ... | [
27,
7856,
261,
480,
29,
8310,
962,
86,
2032,
648,
14,
4507,
20474,
1565,
13,
20362,
198,
3500,
44800,
2348,
29230,
198,
3500,
37826,
198,
3500,
37826,
13,
45356,
198,
3500,
2264,
2348,
42289,
57,
2238,
198,
3500,
14370,
198,
198,
2,
... | 2.028729 | 905 |
<gh_stars>10-100
using Test
using Distributed
using Sockets
using Suppressor
using JSON
using Syslogs
using Memento
using Memento.TestUtils
using TimeZones
using Dates
using Serialization
using Base.CoreLogging: global_logger, min_enabled_level
files = [
"records.jl",
"formatters.jl",
"handlers.jl",
"... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
3500,
6208,
198,
3500,
4307,
6169,
198,
3500,
311,
11603,
198,
3500,
8105,
44292,
198,
3500,
19449,
198,
3500,
311,
893,
6404,
82,
198,
3500,
337,
972,
78,
198,
3500,
337,
972,
78,
13,
1... | 2.442846 | 2,572 |
using PrettyTables
header = ["Return value" "DispatchedTuple" "DispatchedSet"
"" "(non-unique keys allowed)" "(unique keys only)"]
col1 = ["Type", "Unregistered key (without default)", "Unregistered key (with default)", "Duplicative key"]
DT = ["Tuple", "()", "(default,)", "all registered values"]
DTS = ["Value... | [
3500,
20090,
51,
2977,
198,
198,
25677,
796,
14631,
13615,
1988,
1,
366,
7279,
8071,
1740,
51,
29291,
1,
366,
7279,
8071,
1740,
7248,
1,
198,
220,
220,
220,
13538,
30629,
13159,
12,
34642,
8251,
3142,
16725,
30629,
34642,
8251,
691,
8... | 2.796512 | 172 |
using Base:Float64
# concrete result type -
struct VLResult{T}
value::T
end
abstract type VLAbstractAsset end
abstract type VLAbstractLattice end
mutable struct VLEquityAsset <: VLAbstractAsset
# data -
assetSymbol::String
purchasePricePerShare::Float64
numberOfShares::Int64
purchaseDate::Da... | [
3500,
7308,
25,
43879,
2414,
198,
198,
2,
10017,
1255,
2099,
532,
198,
7249,
569,
43,
23004,
90,
51,
92,
198,
220,
220,
220,
1988,
3712,
51,
198,
437,
198,
198,
397,
8709,
2099,
569,
43,
23839,
45869,
886,
198,
397,
8709,
2099,
56... | 2.692407 | 777 |
<gh_stars>10-100
module ThreeJS
import Patchwork
import Patchwork.Elem
using Colors
export outerdiv, initscene
include("render.jl")
include("properties.jl")
"Outer div to keep the three-js tag in."
function outerdiv(w::AbstractString="100%", h::AbstractString="600px")
Elem(:div, style=Dict(:width=>w, :height=>h... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
21412,
7683,
20120,
198,
198,
11748,
17106,
1818,
198,
11748,
17106,
1818,
13,
36,
10671,
198,
3500,
29792,
198,
198,
39344,
12076,
7146,
11,
287,
896,
66,
1734,
198,
198,
17256,
7203,
13287... | 2.534274 | 496 |
<filename>src/clang/core/AST/DeclGroup.jl
"""
struct DeclGroupRef <: Any
Hold a `clang::DeclGroupRef` opaque pointer.
"""
struct DeclGroupRef
ptr::CXDeclGroupRef
end
Base.unsafe_convert(::Type{CXDeclGroupRef}, x::DeclGroupRef) = x.ptr
Base.cconvert(::Type{CXDeclGroupRef}, x::DeclGroupRef) = x
| [
27,
34345,
29,
10677,
14,
565,
648,
14,
7295,
14,
11262,
14,
37835,
13247,
13,
20362,
198,
37811,
198,
220,
220,
220,
2878,
16691,
13247,
8134,
1279,
25,
4377,
198,
26807,
257,
4600,
565,
648,
3712,
37835,
13247,
8134,
63,
32191,
1756... | 2.589744 | 117 |
using Distributions
using Base.LinAlg.BLAS
abstract RBM
typealias Mat{T} AbstractArray{T, 2}
typealias Vec{T} AbstractArray{T, 1}
type BernoulliRBM <: RBM
W::Mat{Float64}
vbias::Vec{Float64}
hbias::Vec{Float64}
dW_prev::Mat{Float64}
momentum::Float64
function BernoulliRBM(n_vis::Int, n_hid::... | [
198,
3500,
46567,
507,
198,
3500,
7308,
13,
14993,
2348,
70,
13,
9148,
1921,
198,
198,
397,
8709,
371,
12261,
198,
198,
4906,
26011,
6550,
90,
51,
92,
27741,
19182,
90,
51,
11,
362,
92,
198,
4906,
26011,
38692,
90,
51,
92,
27741,
... | 1.923221 | 2,670 |
module Statulator
include("calculations.jl")
function input(prompt::AbstractString="")
print(prompt)
return chomp(readline())
end
function terminate(message::AbstractString="")
println(message)
exit()
end
q1 = input("Is this is a problem of sample proportions or means? [p/m] ")
if q1 != "p" && q1... | [
21412,
5133,
8927,
198,
198,
17256,
7203,
9948,
3129,
602,
13,
20362,
4943,
198,
198,
8818,
5128,
7,
16963,
457,
3712,
23839,
10100,
2625,
4943,
198,
220,
220,
220,
3601,
7,
16963,
457,
8,
198,
220,
220,
220,
1441,
442,
3361,
7,
961... | 2.101136 | 4,400 |
<reponame>Moelf/FHist.jl<filename>src/hist1d.jl<gh_stars>1-10
Base.lock(h::Hist1D) = lock(h.hlock)
Base.unlock(h::Hist1D) = unlock(h.hlock)
"""
sample(h::Hist1D, n::Int=1)
Sample a histogram's with weights equal to bin count, `n` times.
The sampled values are the bins' lower edges.
"""
function sample(h::Hist1D; ... | [
27,
7856,
261,
480,
29,
16632,
7046,
14,
37,
13749,
13,
20362,
27,
34345,
29,
10677,
14,
10034,
16,
67,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
14881,
13,
5354,
7,
71,
3712,
13749,
16,
35,
8,
796,
5793,
7,
71,
13,... | 2.341198 | 3,857 |
<reponame>exanauts/ExaPF.jl
# Verify solutions against matpower results
using Test
using ExaPF
using FiniteDiff
using ForwardDiff
using LinearAlgebra
using KernelAbstractions
@testset "RGM Optimal Power flow 9 bus case" begin
datafile = joinpath(INSTANCES_DIR, "case9.m")
nlp = ExaPF.ReducedSpaceEvaluator(data... | [
27,
7856,
261,
480,
29,
1069,
2271,
5500,
14,
3109,
64,
42668,
13,
20362,
198,
2,
49899,
8136,
1028,
2603,
6477,
2482,
198,
3500,
6208,
198,
3500,
1475,
64,
42668,
198,
3500,
4463,
578,
28813,
198,
3500,
19530,
28813,
198,
3500,
44800... | 2.129032 | 527 |
"""
cas_parse(str)
given a CAS number string, returns a tuple of 3 Int32 containing the CAS numbers, it performs no validation on the data
"""
function cas_parse(str)
a1,a2,a3 = split(str,'-')
n1 = parse(Int32,a1)
n2 = parse(Int16,a2)
n3 = parse(Int16,a3)
return (n1,n2,n3)
end
function uniqu... | [
198,
37811,
198,
220,
220,
220,
6124,
62,
29572,
7,
2536,
8,
198,
198,
35569,
257,
35106,
1271,
4731,
11,
5860,
257,
46545,
286,
513,
2558,
2624,
7268,
262,
35106,
3146,
11,
340,
17706,
645,
21201,
319,
262,
1366,
198,
198,
37811,
1... | 2.105109 | 2,740 |
<reponame>Zac12345/EconModel.jl
include("calculus.jl")
include("expralgebra.jl")
function parsefoc(foc1,vlist,dlist,plist)
foc=subs(addindex!(subs(foc1,plist)),dlist)
@assert foc.head==:vcat || foc.head==:vect
list = :([])
for i = 1:length(foc.args)
foc.args[i],list= getexpectation(foc.args[i],... | [
27,
7856,
261,
480,
29,
57,
330,
10163,
2231,
14,
36,
1102,
17633,
13,
20362,
198,
17256,
7203,
9948,
17576,
13,
20362,
4943,
198,
17256,
7203,
31937,
282,
29230,
13,
20362,
4943,
198,
198,
8818,
21136,
69,
420,
7,
69,
420,
16,
11,
... | 1.771883 | 1,508 |
using ContextExprRules
using Test
include("test_constraints.jl")
include("operators.jl")
include("test_utils.jl") | [
3500,
30532,
3109,
1050,
37766,
198,
3500,
6208,
198,
198,
17256,
7203,
9288,
62,
1102,
2536,
6003,
13,
20362,
4943,
198,
17256,
7203,
3575,
2024,
13,
20362,
4943,
198,
17256,
7203,
9288,
62,
26791,
13,
20362,
4943
] | 3.081081 | 37 |
_view(::Nothing, i) = nothing
_view(A::Fill{T,2,Axes}, i) where {T,Axes} = view(A, :, 1)
_view(A::AbstractMatrix, idx) = view(A, :, idx)
aggregate(aggr::typeof(+), X) = vec(sum(X, dims=2))
aggregate(aggr::typeof(-), X) = -vec(sum(X, dims=2))
aggregate(aggr::typeof(*), X) = vec(prod(X, dims=2))
aggregate(aggr::typeof(/... | [
62,
1177,
7,
3712,
18465,
11,
1312,
8,
796,
2147,
198,
62,
1177,
7,
32,
3712,
33762,
90,
51,
11,
17,
11,
31554,
274,
5512,
1312,
8,
810,
1391,
51,
11,
31554,
274,
92,
796,
1570,
7,
32,
11,
1058,
11,
352,
8,
198,
62,
1177,
7,... | 2.232694 | 1,199 |
<reponame>UnofficialJuliaMirror/ECC.jl-a99b485a-c5c8-540e-ab00-7a7265134077
using Documenter, ECC
makedocs(sitename="ECC",
doctest=true)
| [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
14,
2943,
34,
13,
20362,
12,
64,
2079,
65,
32642,
64,
12,
66,
20,
66,
23,
12,
35005,
68,
12,
397,
405,
12,
22,
64,
22,
22980,
1485,
1821,
3324,
198,
3500,
16854,
263,... | 1.934211 | 76 |
<gh_stars>1-10
using GraphKernels
using Test
@testset "GraphKernels.jl" begin
# Write your tests here.
end
| [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
29681,
42,
44930,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
37065,
42,
44930,
13,
20362,
1,
2221,
198,
220,
220,
220,
1303,
19430,
534,
5254,
994,
13,
198,
437,
198
] | 2.666667 | 42 |
<filename>NetProcess.jl
"""
This File is used to pre-calculate some network parameters
Transmission probabilities
S distributions
"""
include("src/Graph.jl")
include("src/Tools.jl")
include("src/Algorithm.jl")
include("src/Sampling.jl")
using StatsBase
using JSON
using JLD2 # store data
# Read Graph
buf = split(A... | [
27,
34345,
29,
7934,
18709,
13,
20362,
198,
37811,
198,
197,
1212,
9220,
318,
973,
284,
662,
12,
9948,
3129,
378,
617,
3127,
10007,
198,
197,
8291,
3411,
39522,
198,
197,
50,
24570,
198,
37811,
198,
198,
17256,
7203,
10677,
14,
37065,... | 2.436105 | 493 |
<gh_stars>1-10
#PcPcOnSq(k::Int,i::Int,j::Int) = pc_on_sq[k,Int((i+1)*(i)/2)+(j)] # bug
###PcPcOnSq(k::Int,i::Int,j::Int) = pc_on_sq[Int((i-1)*(i)/2)+(j-1)+1,k] # also have bugs
#########PcPcOnSq(k::Int,i::Int,j::Int) = pc_on_sq[div(((i-1)*i),2)+(j-1)+1,k]
# pc_on_sq[k][(i)*((i)+1)/2+(j)]
PcPcOnSq(k::Int,i::Int,j::Int)... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
47,
66,
47,
66,
2202,
50,
80,
7,
74,
3712,
5317,
11,
72,
3712,
5317,
11,
73,
3712,
5317,
8,
796,
40653,
62,
261,
62,
31166,
58,
74,
11,
5317,
19510,
72,
10,
16,
27493,
7,
72,
20... | 1.783078 | 9,455 |
using ModelConstructors, HDF5
regenerate_data = false
###################################################################
# Set Up Linear Model
###################################################################
function setup_linear_model(; regime_switching::Bool = false)
m = GenericModel()
# Set up linear... | [
3500,
9104,
42316,
669,
11,
5572,
37,
20,
198,
198,
2301,
877,
378,
62,
7890,
796,
3991,
198,
198,
29113,
29113,
21017,
198,
2,
5345,
3205,
44800,
9104,
198,
29113,
29113,
21017,
198,
198,
8818,
9058,
62,
29127,
62,
19849,
7,
26,
71... | 2.013797 | 3,334 |
<reponame>JuliDi/GenericInstruments.jl<filename>examples/HDO6054Ascope_example.jl
using GenericInstruments
GI = GenericInstruments
####################################
resmgr = GI.viOpenDefaultRM()
# Instantiate obj
scope1 = GI.SCOPE.INSTR(:HDO6054A, "USB0::0x05FF::0x1023::4066N51752::INSTR")
GI.SCOPE.connect!(resmgr... | [
27,
7856,
261,
480,
29,
16980,
72,
18683,
14,
46189,
818,
2536,
2886,
13,
20362,
27,
34345,
29,
1069,
12629,
14,
10227,
46,
1899,
4051,
32,
29982,
62,
20688,
13,
20362,
198,
3500,
42044,
818,
2536,
2886,
198,
18878,
796,
42044,
818,
... | 2.327083 | 960 |
<gh_stars>1-10
# # Image classification
#
# *See [`ImageClassification`](#) for complete documentation of its arguments.*
#
# Let's explore what you can do with the [`LearningMethod`](#) interface implemented. We're using
# [DLDatasets.jl](https://github.com/lorenzoh/DLDatasets.jl) to access *ImageNette*, a small
# ima... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
1303,
7412,
17923,
198,
2,
198,
2,
1635,
6214,
685,
63,
5159,
9487,
2649,
63,
16151,
2,
8,
329,
1844,
10314,
286,
663,
7159,
15885,
198,
2,
198,
2,
3914,
338,
7301,
644,
345,
460,
4... | 3.095679 | 648 |
<filename>src/errors.jl
struct InvalidSignatureError <: Exception
end
struct MalformedJWTError <: Exception
msg::String
end
struct NotSupportedJWTError <: Exception
msg::String
end
Base.showerror(io::IO, e::InvalidSignatureError) = print(io, "Signature verification failed.")
Base.showerror(io::IO, e::Malfor... | [
27,
34345,
29,
10677,
14,
48277,
13,
20362,
198,
198,
7249,
17665,
11712,
1300,
12331,
1279,
25,
35528,
198,
437,
198,
198,
7249,
4434,
12214,
41,
39386,
12331,
1279,
25,
35528,
198,
220,
220,
220,
31456,
3712,
10100,
198,
437,
198,
1... | 2.878049 | 164 |
using NetworkEpidemics
using LightGraphs
using Statistics
using Plots
using ColorSchemes
using Random
CorrectedMetapopulation(Ο::Real, mp::Metapopulation{SI}) = Metapopulation(mp.h, mp.D, SI(Ο*mp.dynamics.Ξ²))
CorrectedMetapopulation(Ο::Real, mp::Metapopulation{SIS}) = Metapopulation(mp.h, mp.D, SIS(Ο*mp.dynamics.Ξ², mp... | [
3500,
7311,
13807,
28913,
873,
198,
3500,
4401,
37065,
82,
198,
3500,
14370,
198,
3500,
1345,
1747,
198,
3500,
5315,
27054,
6880,
198,
3500,
14534,
198,
198,
42779,
276,
9171,
499,
404,
1741,
7,
139,
229,
3712,
15633,
11,
29034,
3712,
... | 1.883994 | 2,474 |
<filename>src/cpx_params.jl
# const CPX_INFBOUND = 1e20
# const CPX_STR_PARAM_MAX = 512
function get_param_type(env::Env, indx::Int)
ptype = Vector{Cint}(1)
stat = @cpx_ccall(getparamtype, Cint, (
Ptr{Void},
Cint,
Ptr{Cint}
),
... | [
27,
34345,
29,
10677,
14,
66,
8416,
62,
37266,
13,
20362,
198,
2,
1500,
16932,
55,
62,
1268,
26001,
15919,
796,
352,
68,
1238,
198,
2,
1500,
16932,
55,
62,
18601,
62,
27082,
2390,
62,
22921,
796,
22243,
198,
198,
8818,
651,
62,
17... | 1.966802 | 2,470 |
"""
Crude but more-or-less effective thing that prints out a struct (which may contain other structs) as
a markdown table.
"""
function to_md_table( f; exclude=[], depth=0 ) :: String
F = typeof(f)
@assert isstructtype( F )
names = fieldnames(F)
prinames = []
structnames = []
for n in names
... | [
37811,
198,
13916,
2507,
475,
517,
12,
273,
12,
1203,
4050,
1517,
326,
20842,
503,
257,
2878,
357,
4758,
743,
3994,
584,
2878,
82,
8,
355,
198,
64,
1317,
2902,
3084,
13,
220,
198,
37811,
198,
8818,
284,
62,
9132,
62,
11487,
7,
277... | 1.976035 | 459 |
########################################################################################
# Sampling from a solution
########################################################################################
"""Helper function to sample from our covariances, which often have a "cross" of zeros
For the 0-cov entries the ou... | [
29113,
29113,
14468,
7804,
198,
2,
3409,
11347,
422,
257,
4610,
198,
29113,
29113,
14468,
7804,
198,
37811,
47429,
2163,
284,
6291,
422,
674,
39849,
3699,
728,
11,
543,
1690,
423,
257,
366,
19692,
1,
286,
1976,
27498,
198,
1890,
262,
... | 2.396075 | 1,121 |
<filename>src/knnclassifier.jl<gh_stars>1-10
# This file is a part of TextClassification.jl
# License is Apache 2.0: https://www.apache.org/licenses/LICENSE-2.0.txt
export KnnClassifierConfig, KnnClassifierConfigSpace, KnnClassifier
using StatsBase: counts
import StatsBase: predict
@with_kw struct KnnClassifierConfi... | [
27,
34345,
29,
10677,
14,
15418,
77,
4871,
7483,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
770,
2393,
318,
257,
636,
286,
8255,
9487,
2649,
13,
20362,
198,
2,
13789,
318,
24843,
362,
13,
15,
25,
3740,
1378,
2503,
1... | 2.531613 | 775 |
wav = 5*randn(32,1);
new = onlineagc(wav); # deepcopy wav and then operate in-place
onlineagc!(wav) # in-place operation
# if the streaming wav is done. Just reset the online agc params by
setagc()
# also you can re-specify the params by
setagc(gain=1.0, maxvalue=0.6, minstep=-0.6)
| [
45137,
796,
642,
9,
25192,
77,
7,
2624,
11,
16,
1776,
198,
3605,
796,
2691,
363,
66,
7,
45137,
1776,
1303,
2769,
30073,
266,
615,
290,
788,
8076,
287,
12,
5372,
198,
25119,
363,
66,
0,
7,
45137,
8,
220,
220,
220,
220,
220,
220,
... | 2.575221 | 113 |
using Documenter
using DocThemeIndigo
using Literate
using Yao
using Yao: YaoBlocks, YaoArrayRegister, YaoBase, YaoSym
using YaoBase: BitBasis
using YaoBlocks: AD
using YaoBlocks: Optimise
function notebook_filter(str)
re = r"(?<!`)``(?!`)" # Two backquotes not preceded by nor followed by another
replace(str, re ... | [
3500,
16854,
263,
198,
3500,
14432,
47863,
5497,
14031,
198,
3500,
17667,
378,
198,
3500,
37826,
198,
3500,
37826,
25,
37826,
45356,
11,
37826,
19182,
38804,
11,
37826,
14881,
11,
37826,
43094,
198,
3500,
37826,
14881,
25,
4722,
15522,
27... | 2.442231 | 1,506 |
using Test
using ClimaCoupler: Clock, tick!, stop_time_exceeded
@testset "Clock" begin
time_info = (start = 0.0, dt = 0.5, stop = 2.0)
clock = Clock(time_info...)
tick!(clock)
@test clock.time == time_info.dt
while !stop_time_exceeded(clock)
tick!(clock)
end
@test clock.time == tim... | [
3500,
6208,
198,
3500,
1012,
8083,
34,
280,
20053,
25,
21328,
11,
4378,
28265,
2245,
62,
2435,
62,
1069,
2707,
276,
198,
198,
31,
9288,
2617,
366,
44758,
1,
2221,
198,
220,
220,
220,
640,
62,
10951,
796,
357,
9688,
796,
657,
13,
1... | 2.30137 | 146 |
# ---
# title: 1649. Create Sorted Array through Instructions
# id: problem1649
# author: <NAME>
# date: 2020-10-31
# difficulty: Hard
# categories: Binary Indexed Tree, Segment Tree, Ordered Map
# link: <https://leetcode.com/problems/create-sorted-array-through-instructions/description/>
# hidden: true
# ---
#
# Give... | [
2,
11420,
198,
2,
3670,
25,
1467,
2920,
13,
13610,
311,
9741,
15690,
832,
27759,
198,
2,
4686,
25,
1917,
1433,
2920,
198,
2,
1772,
25,
1279,
20608,
29,
198,
2,
3128,
25,
12131,
12,
940,
12,
3132,
198,
2,
8722,
25,
6912,
198,
2,
... | 2.245243 | 1,419 |
<reponame>mschauer/BridgeSPDE.jl
using Plots
using DelimitedFiles
using FileIO
pgfplotsx()
thetas = readdlm("thetas.txt")
p = plot(0:45, thetas, color=:black, ylims = [(0,2.5) (0, 9)], layout = (2,1), label=["\$\\theta_1\$" "\$\\theta_2\$"]);
vspan!(p, [[0,15] [0,15]],
color = :black, alpha = 0.15,
labe... | [
27,
7856,
261,
480,
29,
907,
354,
16261,
14,
37385,
4303,
7206,
13,
20362,
198,
3500,
1345,
1747,
198,
3500,
4216,
320,
863,
25876,
198,
3500,
9220,
9399,
198,
6024,
69,
489,
1747,
87,
3419,
198,
1169,
83,
292,
796,
1100,
25404,
76,... | 1.996622 | 296 |
<filename>problem_004.jl
using StringUtils
function main()
factors = Int64[]
max_product = -1
product = 0
for i = 999:-1:100
for j = 999:-1:100
product = i * j
if StringUtils.is_palindrome(string(product)) &&
product > max_product
max_produ... | [
27,
34345,
29,
45573,
62,
22914,
13,
20362,
198,
3500,
10903,
18274,
4487,
198,
198,
8818,
1388,
3419,
198,
220,
220,
220,
5087,
796,
2558,
2414,
21737,
198,
220,
220,
220,
3509,
62,
11167,
796,
532,
16,
198,
220,
220,
220,
1720,
79... | 2.085837 | 233 |
<gh_stars>1-10
# ============================================================================
# exported from MatrixProcessing on 10.09.2020
"""
get_pairwise_correlation_matrix(vectorized_video, tau_max=25)
Computes pairwise correlation of the input signals accordingly to the formula
presented in paper "Clique to... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
198,
2,
38093,
2559,
18604,
198,
2,
29050,
422,
24936,
18709,
278,
319,
838,
13,
2931,
13,
42334,
198,
37811,
198,
220,
220,
220,
651,
62,
24874,
3083,
62,
10215,
49501,
62,
6759,
8609,
7,... | 2.227183 | 1,523 |
<filename>src/MISDP_formulation.jl<gh_stars>1-10
"""
guesswork_MISDP(
p::AbstractVector{T},
ΟBs::AbstractVector{<:AbstractMatrix},
num_outcomes = size(ΟBs[1], 1)^2;
solver,
c = T.(1:length(p)),
verbose::Bool = true,
) where {T<:Number} -> NamedTuple
Computes an a... | [
27,
34345,
29,
10677,
14,
44,
1797,
6322,
62,
687,
1741,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
37811,
198,
220,
220,
220,
4724,
1818,
62,
44,
1797,
6322,
7,
198,
220,
220,
220,
220,
220,
220,
220,
279,
3712,
23839... | 2.209927 | 2,196 |
<filename>examples/hello-world/run.jl<gh_stars>1-10
using NodeCall
const http = require("http")
const hostname = "127.0.0.1"
const port = 3000
const server = http.createServer((req, res) -> begin
res.statusCode = 200
res.setHeader("Content-Type", "text/plain")
res.end("Hello, World!\n")
end)
server.list... | [
27,
34345,
29,
1069,
12629,
14,
31373,
12,
6894,
14,
5143,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
19081,
14134,
198,
198,
9979,
2638,
796,
2421,
7203,
4023,
4943,
198,
198,
9979,
2583,
3672,
796,
366,
16799,
13,
... | 2.650307 | 163 |
#=
$ docker-compose run --rm julia
julia> pwd()
julia> /work
julia> include("experiments/test/runtests.jl")
=#
using Test
using Glob
using Base.Threads
ignore_files = ["wav_example.md", "clang.md", "linear_regression.md"]
@testset "MyWorkflow.jl" begin
files = glob("*.md", joinpath(@__DIR__, "..", "notebook")) |... | [
2,
28,
198,
3,
36253,
12,
785,
3455,
1057,
1377,
26224,
474,
43640,
198,
73,
43640,
29,
279,
16993,
3419,
198,
73,
43640,
29,
1220,
1818,
198,
73,
43640,
29,
2291,
7203,
23100,
6800,
14,
9288,
14,
81,
2797,
3558,
13,
20362,
4943,
... | 2.366071 | 224 |
module TwodWrapper
using JavaCall
const AbstractRegion = @jimport org.hipparchus.geometry.partitioning.AbstractRegion
const AbstractSubHyperplane = @jimport org.hipparchus.geometry.partitioning.AbstractSubHyperplane
const BSPTree = @jimport org.hipparchus.geometry.partitioning.BSPTree
const BoundaryProjection = @jimp... | [
21412,
1815,
375,
36918,
2848,
198,
198,
3500,
7349,
14134,
198,
198,
9979,
27741,
47371,
796,
2488,
73,
11748,
8745,
13,
71,
3974,
998,
385,
13,
469,
15748,
13,
3911,
653,
278,
13,
23839,
47371,
198,
9979,
27741,
7004,
38197,
14382,
... | 3.110251 | 1,551 |
## a bare bones Test-Suite for some critical functions
#using Base.Test
using Test, Random, LinearAlgebra, DelimitedFiles
include("unit_test_consts.jl")
@testset "All Tests" begin
#Tests shrink/crossval other simpler helpers
@testset "Simple Helper Functions" begin
@test true
end
@testset "POAP Tests" begin
##... | [
2235,
220,
257,
6247,
11945,
6208,
12,
5606,
578,
329,
617,
4688,
5499,
198,
2,
3500,
7308,
13,
14402,
198,
3500,
6208,
11,
14534,
11,
44800,
2348,
29230,
11,
4216,
320,
863,
25876,
198,
17256,
7203,
20850,
62,
9288,
62,
1102,
6448,
... | 2.083333 | 2,100 |
<reponame>magerton/ShaleDrillingLikelihood.jl
module ShaleDrillingLikelihood_StateSpaceTest
using ShaleDrillingLikelihood
using Test
using ShaleDrillingLikelihood: state_space_vector,
actionspace,
state,
sprime,
state_if_never_drilled,
_nstates_per_D,
end_lrn,
end_ex0,
end_ex1,
_d... | [
27,
7856,
261,
480,
29,
19726,
29111,
14,
2484,
1000,
6187,
4509,
7594,
11935,
13,
20362,
198,
21412,
911,
1000,
6187,
4509,
7594,
11935,
62,
9012,
14106,
14402,
198,
198,
3500,
911,
1000,
6187,
4509,
7594,
11935,
198,
3500,
6208,
628,
... | 1.53475 | 5,036 |
module TestDocumentation
using Base.Test
using DataArrays
using DataFrames
println("\n Running documentation tests\n")
using TimeData
using Dates
fileName = joinpath(Pkg.dir("TimeData"), "data/logRet.csv")
tm = TimeData.readTimedata(fileName)[1:10, 1:4]
tm[Date(2012, 1, 4):Date(2012, 1, 10), 1:2]
tm[3:8, 2:3]
t... | [
198,
21412,
6208,
24941,
341,
198,
198,
3500,
7308,
13,
14402,
198,
3500,
6060,
3163,
20477,
198,
3500,
6060,
35439,
198,
198,
35235,
7203,
59,
77,
18162,
10314,
5254,
59,
77,
4943,
198,
198,
3500,
3862,
6601,
198,
3500,
44712,
198,
1... | 2.095095 | 999 |
using CvxCompress, Blosc, LinearAlgebra
Blosc.set_num_threads(4)
nz, nx = 2048, 4096
bz, bx = 32, 32
scl = 1e0
x = rand(Float32, nz, nx)
# CvxCompress
y = zeros(UInt32, nz*nx)
clength_cvx = CvxCompress.compress!(y, CvxCompressor((bz,bx),scl), x)
t_cvx_compress = @elapsed clength_cvx = CvxCompress.compress!(y, CvxCo... | [
3500,
327,
85,
87,
7293,
601,
11,
1086,
17500,
11,
44800,
2348,
29230,
198,
198,
3629,
17500,
13,
2617,
62,
22510,
62,
16663,
82,
7,
19,
8,
198,
198,
27305,
11,
299,
87,
796,
36117,
11,
42479,
198,
65,
89,
11,
275,
87,
796,
3933... | 1.912528 | 1,349 |
<reponame>pnavaro/JuliaSMAI2021<filename>src/04.HOODESolver.jl
# # HOODESolver.jl
#
# The objective of this Julia package is to valorize the recent developments carried out within [INRIA team MINGuS](https://team.inria.fr/mingus/) on Uniformly Accurate numerical methods (UA) for highly oscillating problems. We propose... | [
27,
7856,
261,
480,
29,
21999,
615,
12022,
14,
16980,
544,
50,
5673,
40,
1238,
2481,
27,
34345,
29,
10677,
14,
3023,
13,
39,
22808,
1546,
14375,
13,
20362,
198,
2,
1303,
367,
22808,
1546,
14375,
13,
20362,
198,
2,
220,
198,
2,
383... | 2.091757 | 1,929 |
<gh_stars>1-10
################################################################################
"""
extractSignalBin(edfDf::DataFrame, params::Dict)
# Description
Use `extractSignalBin` on EDF file per channel from shell arguments. Returns a dictionary with channel names as keys.
See also: [`extractFFT`](@ref)... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
29113,
29113,
14468,
198,
198,
37811,
628,
220,
220,
220,
7925,
11712,
282,
33,
259,
7,
276,
69,
35,
69,
3712,
6601,
19778,
11,
42287,
3712,
35,
713,
8,
198,
198,
2,
12489,
198,
11041,
4... | 2.802051 | 975 |
<filename>src/distUtils.jl
#######################
## Log PDF functions ##
#######################
function _logpdf(::D, x::V, ΞΈ...) where {D<:Normal,V<:AbstractVector{<:Real}}
(ΞΌ, Ο) = ΞΈ
return normlogpdf.(ΞΌ, Ο, x)
end
function _logpdf(::D, x::V, w::T) where {D<:Bernoulli,V<:AbstractVector{<:Real},T<:Real}
... | [
27,
34345,
29,
10677,
14,
17080,
18274,
4487,
13,
20362,
198,
14468,
4242,
21017,
198,
2235,
5972,
12960,
5499,
22492,
198,
14468,
4242,
21017,
198,
198,
8818,
4808,
6404,
12315,
7,
3712,
35,
11,
2124,
3712,
53,
11,
7377,
116,
23029,
... | 2.158463 | 2,499 |
@cache struct EulerCache{uType,rateType} <: OrdinaryDiffEqMutableCache
u::uType
uprev::uType
tmp::uType
k::rateType
fsalfirst::rateType
end
@cache struct SplitEulerCache{uType,rateType} <: OrdinaryDiffEqMutableCache
u::uType
uprev::uType
tmp::uType
k::rateType
fsalfirst::rateType
end
function alg_... | [
31,
23870,
2878,
412,
18173,
30562,
90,
84,
6030,
11,
4873,
6030,
92,
1279,
25,
14230,
3219,
28813,
36,
80,
44,
18187,
30562,
198,
220,
334,
3712,
84,
6030,
198,
220,
510,
18218,
3712,
84,
6030,
198,
220,
45218,
3712,
84,
6030,
198,... | 2.20298 | 7,986 |
using CircGeometry, Test
# error for too large vf
vf = 0.9
@test_throws ErrorException CircGeometry.check_vf(0.85)
# error for max iterations reached
vf = 0.79
n_bodies = 400
material = MaterialParameters(vf,n_bodies)
radius = 1.5
center = Point(-0.5,1.0)
outline = OutlineCircle(radius,center)
between_buffer = 100
@t... | [
3500,
7672,
10082,
15748,
11,
6208,
198,
198,
2,
4049,
329,
1165,
1588,
410,
69,
198,
85,
69,
796,
657,
13,
24,
198,
31,
9288,
62,
400,
8516,
13047,
16922,
7672,
10082,
15748,
13,
9122,
62,
85,
69,
7,
15,
13,
5332,
8,
198,
198,
... | 2.815068 | 146 |
<filename>test/primtive_cells.jl
# Primitive cells used for testing
# a=1 for fcc, cubic and bcc
cellfcc = [-0.5 0 0.5; 0 0.5 0.5; -0.5 0.5 0];
cellcubic = [1.0 0 0; 0 1.0 0; 0 0 1.0];
#cellbcc = [-0.5 0.5 0.5; 0.5 -0.5 0.5; 0.5 0.5 -0.5];
# Through some trial and error testing, I determed that the "bcc" cell used in ... | [
27,
34345,
29,
9288,
14,
19795,
83,
425,
62,
46342,
13,
20362,
198,
2,
11460,
1800,
4778,
973,
329,
4856,
198,
198,
2,
257,
28,
16,
329,
277,
535,
11,
27216,
290,
275,
535,
198,
3846,
69,
535,
796,
25915,
15,
13,
20,
657,
657,
... | 3.053191 | 470 |
<reponame>bovine3dom/julia-1<filename>exercises/reverse-string/reverse-string.jl
function myreverse(phrase)
end
| [
27,
7856,
261,
480,
29,
65,
709,
500,
18,
3438,
14,
73,
43640,
12,
16,
27,
34345,
29,
1069,
2798,
2696,
14,
50188,
12,
8841,
14,
50188,
12,
8841,
13,
20362,
198,
8818,
616,
50188,
7,
34675,
8,
198,
198,
437,
198
] | 2.690476 | 42 |
<reponame>tmptrash/jevo
#
# TODO: module description.
# TODO: describe generl approach of a module. mutations probabilities
# TODO: small-changes, code evaluation, energy & cloning
# TODO: describe linear quoted structure of the script we support
# TODO: describe functions and variables at the top of the code
# TODO: d... | [
27,
7856,
261,
480,
29,
17209,
20692,
1077,
14,
73,
1990,
78,
198,
2,
198,
2,
16926,
46,
25,
8265,
6764,
13,
198,
2,
16926,
46,
25,
6901,
1152,
75,
3164,
286,
257,
8265,
13,
23005,
39522,
198,
2,
16926,
46,
25,
1402,
12,
36653,
... | 2.780327 | 5,012 |
function sieve(limit)
end
| [
8818,
264,
12311,
7,
32374,
8,
198,
198,
437,
198
] | 2.7 | 10 |
<filename>examples/example_01_non_linear_truss.jl<gh_stars>10-100
using Printf, LinearAlgebra
using BenchmarkTools #, Statistics
using PyPlot, PyCall
using MAT
;
using AD4SM
;
mean(x) = sum(x)/length(x)
function replicateRVE(nodes_RVE, beams_RVE,
a1, a2, a3, N1, N2, N3)
nNodesRVE = length(nodes_RVE)
newnod... | [
27,
34345,
29,
1069,
12629,
14,
20688,
62,
486,
62,
13159,
62,
29127,
62,
2213,
1046,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
198,
3500,
12578,
69,
11,
44800,
2348,
29230,
198,
3500,
25187,
4102,
33637,
1303,
11,
1437... | 1.869421 | 4,840 |
"""
Generic interface for implementing inference algorithms.
An implementation of an algorithm should include the following:
1. A type specifying the algorithm and its parameters, derived from InferenceAlgorithm
2. A method of `run` function that produces results of inference. TODO: specify the format of this output
3.... | [
37811,
198,
46189,
7071,
329,
15427,
32278,
16113,
13,
198,
2025,
7822,
286,
281,
11862,
815,
2291,
262,
1708,
25,
198,
16,
13,
317,
2099,
31577,
262,
11862,
290,
663,
10007,
11,
10944,
422,
554,
4288,
2348,
42289,
198,
17,
13,
317,
... | 3.981061 | 264 |
using Test
using FFTW
using LinearAlgebra
using UAPIC
@testset "pic2d" begin
ntau = 16
kx = 0.50
ky = 1.0
dimx = 2Ο/kx
dimy = 2Ο/ky
nx = 128
ny = 64
tfinal = 1.0
t = 0.
xmin, xmax = 0.0, dimx
ymin, ymax = 0.0, dimy
mesh = Mesh( ... | [
3500,
6208,
198,
3500,
376,
9792,
54,
198,
3500,
44800,
2348,
29230,
198,
3500,
471,
2969,
2149,
198,
198,
31,
9288,
2617,
366,
16564,
17,
67,
1,
2221,
628,
220,
220,
220,
299,
83,
559,
796,
1467,
628,
220,
220,
220,
479,
87,
220,... | 1.854279 | 1,297 |
<reponame>vchuravy/ClangCompiler.jl
"""
struct FrontendOptions <: Any
Hold a pointer to a `clang::FrontendOptions` object.
"""
struct FrontendOptions
ptr::CXFrontendOptions
end
Base.unsafe_convert(::Type{CXFrontendOptions}, x::FrontendOptions) = x.ptr
Base.cconvert(::Type{CXFrontendOptions}, x::FrontendOptions... | [
27,
7856,
261,
480,
29,
85,
354,
333,
2830,
14,
2601,
648,
7293,
5329,
13,
20362,
198,
37811,
198,
220,
220,
220,
2878,
8880,
437,
29046,
1279,
25,
4377,
198,
26807,
257,
17562,
284,
257,
4600,
565,
648,
3712,
25886,
437,
29046,
63,... | 2.739496 | 119 |
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: kinesis_analytics_v2
using AWS.Compat
using AWS.UUIDs
"""
add_application_cloud_watch_logging_option(application_name, cloud_watch_logging_option)
add_application_cloud_watch_logging_option(application_name, cloud_watch_logging_op... | [
2,
770,
2393,
318,
8295,
12,
27568,
416,
30865,
9171,
14706,
13,
20362,
198,
3500,
30865,
198,
3500,
30865,
13,
12298,
5432,
712,
1063,
25,
479,
1127,
271,
62,
38200,
14094,
62,
85,
17,
198,
3500,
30865,
13,
40073,
198,
3500,
30865,
... | 2.839372 | 22,493 |
<reponame>UnofficialJuliaMirrorSnapshots/CUFFT.jl-a710fa0b-f7e1-5400-819b-039bf0891bbd<filename>test/runtests.jl
import CUDArt
import CUFFT
using Base.Test
CUDArt.devices(dev->CUDArt.capability(dev)[1] >= 2, nmax=1) do devlist
CUDArt.device(devlist[1])
# A simple 1d transform
n = 64
nc = div(n,2)+1
... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
43633,
5777,
51,
13,
20362,
12,
64,
43147,
13331,
15,
65,
12,
69,
22,
68,
16,
12,
4051,
405,
12,
23,
1129,
65,
12,
15,
2670,
19881,
2919,
6420,
11848,... | 1.78105 | 1,562 |
<filename>src/xkb.jl
"""
Keymap used to encode information regarding keyboard layout, and country and language codes.
A string representation can be obtained from a `Keymap` by using `String(keymap)`.
"""
mutable struct Keymap <: Handle
h::Ptr{xkb_keymap}
ctx::Ptr{xkb_context}
state::Ptr{xkb_state}
con... | [
27,
34345,
29,
10677,
14,
87,
32812,
13,
20362,
198,
37811,
198,
9218,
8899,
973,
284,
37773,
1321,
5115,
10586,
12461,
11,
290,
1499,
290,
3303,
12416,
13,
198,
198,
32,
4731,
10552,
460,
307,
6492,
422,
257,
4600,
9218,
8899,
63,
... | 2.472047 | 2,218 |
<reponame>DrChainsaw/ONNXmutable.jl<filename>src/deserialize/ops.jl
const sources = Dict{Symbol, Any}()
const actfuns = Dict{Symbol, Any}()
const rnnactfuns = Dict{Symbol, Any}() # Recurrent layers have activation functions as attributes and use different parameter names compared to their respective operations.
const a... | [
27,
7856,
261,
480,
29,
6187,
1925,
1299,
707,
14,
1340,
45,
55,
76,
18187,
13,
20362,
27,
34345,
29,
10677,
14,
8906,
48499,
1096,
14,
2840,
13,
20362,
198,
9979,
4237,
796,
360,
713,
90,
13940,
23650,
11,
4377,
92,
3419,
198,
99... | 2.470503 | 5,492 |
<gh_stars>10-100
# sinc interpolation operator
## helper module
module joSincInterp_etc
using SpecialFunctions
function kaiser_window(x,r,b)
return abs(x) <= r ? besseli(0,b*sqrt(1-(x/r)^2))/besseli(0,b) : 0.0
end
end
using .joSincInterp_etc
export joSincInterp
"""
julia> joSincInterp(xin,xout... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
2,
264,
1939,
39555,
341,
10088,
198,
198,
2235,
31904,
8265,
198,
21412,
2525,
50,
1939,
9492,
79,
62,
14784,
198,
220,
220,
220,
1262,
6093,
24629,
2733,
198,
220,
220,
220,
2163,
38387,... | 2.209677 | 806 |
using FSM
cn = Constants{Float64}()
ebm = EBM{Float64}(
am=1,
cm=1,
dm=1,
em=1,
hm=1,
)
Ta = 292.3
Ua = 5.0
Ps = 87360.0
SW = 100.0
LW = 100.0
RH = 100.0
Qs = qsat(true, Ps, Ta, cn)
Qa = (RH / 100.0) * Qs
surf_props(ebm, cn, Sf)
surf_exch(ebm, cn, Ta, Ua)
surf_ebal(ebm, cn, Ta, Qa, Ua, Ps, SW,... | [
3500,
376,
12310,
198,
198,
31522,
796,
4757,
1187,
90,
43879,
2414,
92,
3419,
198,
198,
1765,
76,
796,
412,
12261,
90,
43879,
2414,
92,
7,
198,
220,
220,
220,
716,
28,
16,
11,
198,
220,
220,
220,
12067,
28,
16,
11,
198,
220,
22... | 1.632022 | 356 |
#get cumulative distribution (discrete) from scaled/unnormalised probability distribution (discrete)
function pdist2cdist(pdist::AbstractVector{T}) where {T}
cdist = Vector{T}(undef,length(pdist))
cdist[1] = pdist[1]
@views for i β 2:length(pdist)
cdist[i] = cdist[i-1] + pdist[i]
end
K = 1/c... | [
2,
1136,
23818,
6082,
357,
15410,
8374,
8,
422,
27464,
14,
403,
11265,
1417,
12867,
6082,
357,
15410,
8374,
8,
198,
8818,
279,
17080,
17,
10210,
396,
7,
79,
17080,
3712,
23839,
38469,
90,
51,
30072,
810,
1391,
51,
92,
198,
220,
220,... | 2.170213 | 376 |
abstract type Combiner end
abstract type CorPol <: Combiner end
struct PCC <: Combiner end
struct PCC2 <: Combiner end
struct SNR_MAX <: Combiner end
struct EGC <: CorPol end
struct MRC_PSD <: CorPol
fs::Int
end
MRC_PSD() = MRC_PSD(10)
"""
get_weights(comb, x, ref)
Returns the weights for a section of the... | [
397,
8709,
2099,
14336,
7274,
886,
198,
397,
8709,
2099,
2744,
8017,
1279,
25,
14336,
7274,
886,
198,
198,
7249,
350,
4093,
1279,
25,
14336,
7274,
886,
198,
7249,
350,
4093,
17,
1279,
25,
14336,
7274,
886,
198,
7249,
11346,
49,
62,
... | 2.499517 | 1,035 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.