content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
# set random seed to promote repeatability in CI unit tests
using Random
Random.seed!(101)
for filename in (
"jop_convolve.jl",
"jop_envelope.jl",
"jop_filter.jl")
include(filename)
end
| [
2,
900,
4738,
9403,
284,
7719,
9585,
1799,
287,
14514,
4326,
5254,
198,
3500,
14534,
198,
29531,
13,
28826,
0,
7,
8784,
8,
198,
198,
1640,
29472,
287,
357,
198,
220,
220,
220,
220,
220,
220,
220,
366,
73,
404,
62,
42946,
6442,
13,... | 2.362637 | 91 |
module DEACpopulation
using Random;
const functionNames = ["randPop",
"flatPop",
"gaussPop",
"gaussPop2",
"gaussOne",
"gaussTwo",
"gaussThree"]
#Generate population functions
functio... | [
21412,
5550,
2246,
39748,
198,
3500,
14534,
26,
198,
9979,
2163,
36690,
796,
14631,
25192,
16979,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
38568,
1... | 2.280742 | 862 |
<reponame>HoBeZwe/BEAST.jl<filename>src/utils/polyeig.jl
export companion
function companion(Z)
T = eltype(Z)
K = size(Z,3)
@assert K > 1
M, N = size(Z)[1:2]
C = similar(Z, M*(K-1), N*(K-1))
fill!(C,0)
@assert M == N
Id = Matrix{T}(I, M, N)
for m in 2:K-1
n = m-1
... | [
27,
7856,
261,
480,
29,
28900,
3856,
57,
732,
14,
12473,
11262,
13,
20362,
27,
34345,
29,
10677,
14,
26791,
14,
35428,
68,
328,
13,
20362,
198,
39344,
15185,
198,
198,
8818,
15185,
7,
57,
8,
628,
220,
220,
220,
309,
796,
1288,
490... | 1.612179 | 312 |
<gh_stars>10-100
@testset "CrossValidation" begin
ω = [0.1, 0.1]
A = [0.5 0; 0 0.5]
B = [0.5 0; 0 0.5]
simulation = simulate_GAS_1_1(Normal, 0.0, ω, A, B, 1)
gas = ScoreDrivenModels.Model(1, 1, Normal, 0.0)
bac = cross_validation(gas, simulation, 10, 4985)
end | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
31,
9288,
2617,
366,
21544,
7762,
24765,
1,
2221,
198,
220,
220,
220,
18074,
231,
796,
685,
15,
13,
16,
11,
657,
13,
16,
60,
198,
220,
220,
220,
317,
796,
685,
15,
13,
20,
657,
26,
... | 1.958621 | 145 |
## Various methods for filtering and sorting Metadata
const CATEGORY_ORDER = [:module, :function, :method, :type, :typealias, :macro, :global]
"""
Filter Metadata based on categories or file source.
**Arguments**
* `docs` : main input
**Optional keyword arguments**
* `categories` : categories to include in the re... | [
2235,
26386,
5050,
329,
25431,
290,
29407,
3395,
14706,
198,
198,
9979,
327,
6158,
38,
15513,
62,
12532,
1137,
796,
685,
25,
21412,
11,
1058,
8818,
11,
1058,
24396,
11,
1058,
4906,
11,
1058,
4906,
26011,
11,
1058,
20285,
305,
11,
1058... | 2.731065 | 1,558 |
<reponame>corail-research/SeaPearlZoo<gh_stars>1-10
using SeaPearl
using SeaPearlExtras
using ReinforcementLearning
const RL = ReinforcementLearning
using Flux
using GeometricFlux
using JSON
using BSON: @load, @save
using Random
using Dates
# -------------------
# Generator
# -------------------
n_city = 21
grid_size ... | [
27,
7856,
261,
480,
29,
10215,
603,
12,
34033,
14,
37567,
46262,
75,
57,
2238,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
6896,
46262,
75,
198,
3500,
6896,
46262,
75,
11627,
8847,
198,
3500,
22299,
13442,
41730,
198,
9979,
4571... | 2.71231 | 1,446 |
<gh_stars>0
#! /usr/bin/julia
using TimeSeries
using HTTP
root="/home/jls/data/2020-Corona/raw/RKI/"
function download_rki(source)
r = HTTP.request("GET", source)
String(r.body)
end
function parse_rki(pattern,file)
m=match(pattern,file).match
all=collect(eachmatch(r">([\d\.]+)<",m))
confirmed=pars... | [
27,
456,
62,
30783,
29,
15,
198,
2,
0,
1220,
14629,
14,
8800,
14,
73,
43640,
198,
3500,
3862,
27996,
198,
3500,
14626,
198,
15763,
35922,
11195,
14,
73,
7278,
14,
7890,
14,
42334,
12,
10606,
4450,
14,
1831,
14,
49,
37845,
30487,
1... | 2.106599 | 788 |
export AR_model
"""
AR_model(df, y, grouping, d, link; penalized = penalized)
Form the autoregressive (AR(1)) model for intercept only regression with the specified base distribution (d) and link function (link).
# Arguments
- `df`: A named `DataFrame`
- `y`: Ouctcome variable name of interest, specified as a `Sy... | [
39344,
5923,
62,
19849,
198,
37811,
198,
220,
220,
220,
5923,
62,
19849,
7,
7568,
11,
331,
11,
36115,
11,
288,
11,
2792,
26,
23634,
1143,
796,
23634,
1143,
8,
198,
198,
8479,
262,
1960,
382,
19741,
357,
1503,
7,
16,
4008,
2746,
32... | 2.323197 | 2,565 |
module BigCombinatorics
using Combinatorics
export Fibonacci
export Factorial, DoubleFactorial, FallingFactorial, RisingFactorial
export Binomial, Catalan
export Derangements, MultiChoose, Multinomial
export Bell, Stirling1, Stirling2
export IntPartitions, IntPartitionsDistinct
export Euler, PowerSum
_master_table =... | [
21412,
4403,
20575,
20900,
873,
198,
198,
3500,
955,
8800,
1352,
873,
198,
198,
39344,
41566,
261,
44456,
198,
39344,
19020,
5132,
11,
11198,
29054,
5132,
11,
42914,
29054,
5132,
11,
17658,
29054,
5132,
198,
39344,
20828,
49070,
11,
31066... | 2.396846 | 4,566 |
<filename>src/utils.jl
"""
use_style(style::String)
use_style(style::Vector{String})
Use matplotlib style settings from a style specification `style`.
The style name of "default" is reserved for reverting back to the default style
settings.
ArviZ-specific styles are `["arviz-whitegrid", "arviz-darkgrid", "ar... | [
27,
34345,
29,
10677,
14,
26791,
13,
20362,
198,
37811,
198,
220,
220,
220,
779,
62,
7635,
7,
7635,
3712,
10100,
8,
198,
220,
220,
220,
779,
62,
7635,
7,
7635,
3712,
38469,
90,
10100,
30072,
198,
198,
11041,
2603,
29487,
8019,
3918,... | 2.535505 | 1,535 |
using Pkg
# change pwd
cd(joinpath(dirname(@__FILE__),".."))
# activate environment
Pkg.activate(pwd())
@info pwd()
using Pluto
Pluto.run() | [
3500,
350,
10025,
198,
2,
1487,
279,
16993,
220,
198,
10210,
7,
22179,
6978,
7,
15908,
3672,
7,
31,
834,
25664,
834,
27267,
492,
48774,
198,
2,
15155,
2858,
198,
47,
10025,
13,
39022,
7,
79,
16993,
28955,
198,
31,
10951,
279,
16993,... | 2.641509 | 53 |
<filename>examples/subplots.jl
include("line_scatter.jl")
function subplots1()
p1 = linescatter1()
p2 = linescatter2()
p = [p1 p2]
p
end
function subplots2()
p1 = linescatter1()
p2 = linescatter2()
p = [p1, p2]
p
end
function subplots3()
p1 = linescatter6()
p2 = linescatter2(... | [
27,
34345,
29,
1069,
12629,
14,
7266,
489,
1747,
13,
20362,
198,
17256,
7203,
1370,
62,
1416,
1436,
13,
20362,
4943,
198,
198,
8818,
850,
489,
1747,
16,
3419,
198,
220,
220,
220,
279,
16,
796,
3951,
66,
1436,
16,
3419,
198,
220,
2... | 2.044534 | 247 |
<reponame>Maelstrom6/CryptoTools.jl
using CryptoTools
using Test
using SafeTestsets
@testset "CryptoTools.jl" begin
@time @safetestset "Block Cipher" begin include("BlockCipher.jl") end
@time @safetestset "Stream Cipher" begin include("StreamCipher.jl") end
@time @safetestset "Secret Sharing" begin include... | [
27,
7856,
261,
480,
29,
44,
3010,
20282,
21,
14,
23919,
78,
33637,
13,
20362,
198,
3500,
36579,
33637,
198,
3500,
6208,
198,
3500,
19978,
51,
3558,
1039,
198,
198,
31,
9288,
2617,
366,
23919,
78,
33637,
13,
20362,
1,
2221,
198,
220,... | 2.932773 | 119 |
# * STO-NG
@doc raw"""
STO_NG(n, ℓ, α, c, R)
Slater-type orbital constructed from `N` primitive Gaussian-type
orbitals with principal quantum numbers `n`, angular momenta `ℓ`,
exponents `α`, and contraction coefficients `c`, all of which are
centred at `R` (which may be a scalar for linear molecules or an
`Abstra... | [
2,
1635,
3563,
46,
12,
10503,
198,
198,
31,
15390,
8246,
37811,
198,
220,
220,
220,
3563,
46,
62,
10503,
7,
77,
11,
2343,
226,
241,
11,
26367,
11,
269,
11,
371,
8,
198,
198,
11122,
729,
12,
4906,
32362,
12006,
422,
4600,
45,
63,... | 1.735462 | 5,417 |
module ArrayInterface
using Requires
using LinearAlgebra
using SparseArrays
function ismutable end
"""
ismutable(x::DataType)
Query whether a type is mutable or not, see
https://github.com/JuliaDiffEq/RecursiveArrayTools.jl/issues/19.
"""
Base.@pure ismutable(x::DataType) = x.mutable
ismutable(x) = ismutable(ty... | [
21412,
15690,
39317,
198,
198,
3500,
26848,
198,
3500,
44800,
2348,
29230,
198,
3500,
1338,
17208,
3163,
20477,
198,
198,
8818,
318,
76,
18187,
886,
198,
198,
37811,
198,
220,
220,
220,
318,
76,
18187,
7,
87,
3712,
6601,
6030,
8,
198,... | 2.394596 | 3,368 |
<filename>stdlib/LazyArtifacts/src/LazyArtifacts.jl<gh_stars>1000+
# This file is a part of Julia. License is MIT: https://julialang.org/license
module LazyArtifacts
# reexport the Artifacts API
using Artifacts: Artifacts,
artifact_exists, artifact_path, artifact_meta, artifact_hash,
select_downloadable... | [
27,
34345,
29,
19282,
8019,
14,
43,
12582,
8001,
37199,
14,
10677,
14,
43,
12582,
8001,
37199,
13,
20362,
27,
456,
62,
30783,
29,
12825,
10,
198,
2,
770,
2393,
318,
257,
636,
286,
22300,
13,
13789,
318,
17168,
25,
3740,
1378,
73,
... | 3.136364 | 198 |
<reponame>qhho/Rcl.jl
module Rcl
include(joinpath(@__DIR__, "..", "gen", "LibRcl.jl"))
# module internal
# include("internal.jl")
# end
#
using .LibRcl: RclError
export RclError
#
# module rcl
# include("base.jl")
# include("node_base.jl")
# end
#
# export rcl
# using .rcl: name, namespace
# export name, namespace
#... | [
27,
7856,
261,
480,
29,
80,
71,
8873,
14,
49,
565,
13,
20362,
198,
21412,
371,
565,
198,
198,
17256,
7,
22179,
6978,
7,
31,
834,
34720,
834,
11,
366,
492,
1600,
366,
5235,
1600,
366,
25835,
49,
565,
13,
20362,
48774,
198,
198,
2... | 3.080386 | 311 |
<reponame>mcabbott/Avalon.jl
using Yota
using Base.Iterators
using Statistics
using MLDataUtils
using Distributions
using CUDA
import NNlib
import NNlibCUDA
import ChainRulesCore: rrule, rrule_via_ad, NoTangent, ZeroTangent, @thunk, unthunk
using Tullio, KernelAbstractions, LoopVectorization, CUDAKernels
include("yot... | [
27,
7856,
261,
480,
29,
23209,
6485,
1252,
14,
32,
2100,
261,
13,
20362,
198,
3500,
575,
4265,
198,
3500,
7308,
13,
29993,
2024,
198,
3500,
14370,
198,
3500,
10373,
6601,
18274,
4487,
198,
3500,
46567,
507,
198,
3500,
29369,
5631,
198... | 2.826484 | 219 |
<reponame>JuliaBinaryWrappers/LERC_jll.jl
# Use baremodule to shave off a few KB from the serialized `.ji` file
baremodule LERC_jll
using Base
using Base: UUID
import JLLWrappers
JLLWrappers.@generate_main_file_header("LERC")
JLLWrappers.@generate_main_file("LERC", UUID("88015f11-f218-50d7-93a8-a6af411a945d"))
end # ... | [
27,
7856,
261,
480,
29,
16980,
544,
33,
3219,
36918,
11799,
14,
39878,
34,
62,
73,
297,
13,
20362,
198,
2,
5765,
6247,
21412,
284,
34494,
572,
257,
1178,
14204,
422,
262,
11389,
1143,
4600,
13,
7285,
63,
2393,
198,
49382,
21412,
406... | 2.434783 | 138 |
<reponame>joshbode/MbedTLS.jl
immutable mbedtls_mpi
s::Cint
n::Csize_t
p::Ptr{Cuint}
end
immutable mbedtls_rsa_context
ver::Cint
len::Csize_t
N::mbedtls_mpi
E::mbedtls_mpi
D::mbedtls_mpi
P::mbedtls_mpi
Q::mbedtls_mpi
# More fields follow, but omitted here, since they
# a... | [
27,
7856,
261,
480,
29,
73,
3768,
65,
1098,
14,
44,
3077,
51,
6561,
13,
20362,
198,
8608,
18187,
285,
3077,
83,
7278,
62,
3149,
72,
198,
220,
220,
220,
264,
3712,
34,
600,
198,
220,
220,
220,
299,
3712,
34,
7857,
62,
83,
198,
... | 1.993179 | 1,906 |
@unroll function max_step(cones::Tuple{Vararg{Cone}}, x)
maxim = typemin(Float64)
@unroll for cone in cones
val = max_step(cone, x)
if val > maxim
maxim = val
end
end
return maxim
end
function max_step(cone::POC{dim}, x) where dim
minim = typemax(Float64)
for i=cti(cone, 1):cti(cone,dim)
if x[i] < m... | [
31,
403,
2487,
2163,
3509,
62,
9662,
7,
1102,
274,
3712,
51,
29291,
90,
19852,
853,
90,
34,
505,
92,
5512,
2124,
8,
198,
197,
9806,
320,
796,
2170,
14857,
7,
43879,
2414,
8,
198,
197,
31,
403,
2487,
329,
27763,
287,
47314,
220,
... | 1.81741 | 942 |
## Packages
using ForwardDiff, LinearAlgebra, Plots
## Parameters
β = 0.99;
σ = 2;
γ = 1;
## Utility functions
u(x) = x^(1 - σ) / (1 - σ);
v(x) = x^(1 + 1/γ) / (1 + 1/γ);
U(c, n) = u(c) - v(n);
## Differentials
Uc(c) = ForwardDiff.derivative(u, c);
Ucc(c) = ForwardDiff.derivative(Uc, c);
Un(n) = -ForwardDiff.deriva... | [
2235,
6400,
1095,
198,
3500,
19530,
28813,
11,
44800,
2348,
29230,
11,
1345,
1747,
198,
198,
2235,
40117,
198,
26638,
796,
657,
13,
2079,
26,
198,
38392,
796,
362,
26,
198,
42063,
796,
352,
26,
198,
198,
2235,
34030,
5499,
198,
84,
... | 1.975654 | 1,643 |
<reponame>giadasp/ATA.jl<filename>src/build/add_constraints.jl<gh_stars>1-10
"""
add_constraints!(ata_model::AbstractModel; constraints_file = "constraints.csv", constraints_delim = ";")
# Description
Add categorical and sum constraints to the `ATA.AbstractModel` as specified in the `constraints_file`.
Alternat... | [
27,
7856,
261,
480,
29,
12397,
324,
5126,
14,
13563,
13,
20362,
27,
34345,
29,
10677,
14,
11249,
14,
2860,
62,
1102,
2536,
6003,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
628,
198,
37811,
198,
220,
220,
220,
751,
62,
1102,
... | 1.742481 | 4,256 |
# module Variant
export Variant, getChrom, getPos, getId, getRef, getAlt, getQual, getFilter, getInfo, getFormat
#Stores data for each variant
#type Variant
mutable struct Variant
CHROM::AbstractString
POS::Int64
ID::Array{AbstractString,1}
REF::AbstractString
ALT::Array{AbstractString,1}
#QU... | [
2,
8265,
38215,
198,
198,
39344,
38215,
11,
651,
1925,
398,
11,
651,
21604,
11,
651,
7390,
11,
651,
8134,
11,
651,
29161,
11,
651,
46181,
11,
651,
22417,
11,
651,
12360,
11,
651,
26227,
198,
198,
2,
1273,
2850,
1366,
329,
1123,
15... | 2.493631 | 314 |
<gh_stars>1-10
@inline UnsafeAtomics.load(x) = UnsafeAtomics.load(x, seq_cst)
@inline UnsafeAtomics.store!(x, v) = UnsafeAtomics.store!(x, v, seq_cst)
@inline UnsafeAtomics.cas!(x, cmp, new) = UnsafeAtomics.cas!(x, cmp, new, seq_cst, seq_cst)
@inline UnsafeAtomics.modify!(ptr, op, x) = UnsafeAtomics.modify!(ptr, op, x,... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
31,
45145,
791,
21230,
2953,
31994,
13,
2220,
7,
87,
8,
796,
791,
21230,
2953,
31994,
13,
2220,
7,
87,
11,
33756,
62,
66,
301,
8,
198,
31,
45145,
791,
21230,
2953,
31994,
13,
8095,
0,
... | 1.689951 | 3,035 |
<gh_stars>10-100
using Dolo
dolo_dir = Dolo.pkg_path
model = Dolo.yaml_import("examples/models/rbc_iid.yaml")
process = Dolo.MvNormal(0.001)
dp = Dolo.discretize(process)
@time sol = time_iteration(model, dp; verbose=true, maxit=5)
@time dd = Dolo.improved_time_iteration(model, dp, sol.dr; verbose=true)
iv... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
3500,
360,
14057,
198,
198,
67,
14057,
62,
15908,
796,
360,
14057,
13,
35339,
62,
6978,
198,
198,
19849,
796,
360,
14057,
13,
88,
43695,
62,
11748,
7203,
1069,
12629,
14,
27530,
14,
81,
... | 2.06746 | 252 |
<filename>test/performance/runtests_benchmark.jl<gh_stars>10-100
using Jute
runtests_dir = Jute.get_runtests_dir()
test_files = [joinpath(runtests_dir, "runtests_benchmark_testcases.jl")]
test_include_only = (ARGS[1] == "test_include_only")
run_options = Jute.build_run_options(options=Dict(:verbosity => 0))
t = tim... | [
27,
34345,
29,
9288,
14,
26585,
14,
81,
2797,
3558,
62,
26968,
4102,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
3500,
449,
1133,
198,
198,
81,
2797,
3558,
62,
15908,
796,
449,
1133,
13,
1136,
62,
81,
2797,
3558,
62,
... | 2.416309 | 233 |
## writer
type Writer
_cache::Dict
_partialCache::Dict
_loadPartial ## Function or nothing
end
Writer() = Writer(Dict(), Dict(), nothing)
function clearCache(w::Writer)
w._cache=Dict()
w._partialCache=Dict()
end
function compile(io::IO, w::Writer, template, tags)
# if haskey(w._cache, templat... | [
2235,
6260,
198,
198,
4906,
26606,
198,
220,
220,
220,
4808,
23870,
3712,
35,
713,
198,
220,
220,
220,
4808,
47172,
30562,
3712,
35,
713,
198,
220,
220,
220,
4808,
2220,
7841,
498,
22492,
15553,
393,
2147,
198,
437,
198,
198,
34379,
... | 2.612903 | 496 |
using DataFrames
using Glob
using BeNGS
function read_files(fasta_file, copynumber_file="")
templates = BeNGS.read_fasta_records(fasta_file)
template_df = DataFrame()
template_df[:timepoint] = [Symbol(split(s.name, "_")[1]) for s in templates]
template_df[:name] = [s.name for s in templates]
temp... | [
3500,
6060,
35439,
198,
3500,
40713,
198,
3500,
1355,
10503,
50,
628,
198,
8818,
1100,
62,
16624,
7,
7217,
64,
62,
7753,
11,
2243,
2047,
4494,
62,
7753,
2625,
4943,
198,
220,
220,
220,
24019,
796,
1355,
10503,
50,
13,
961,
62,
7217,... | 2.122905 | 1,432 |
ENV["OMP_NUM_THREADS"] = 4
export PardisoShift
struct PardisoShift
point::Float64
verbose::Bool
end
"""
PardisoShift(p::Number; verbose = false)
When used as the `point = PardisoShift(p)` keyword argument in `diagonalize`, it forces use
of the MKL Pardiso library for the shift-and-invert Lanczos method... | [
1677,
53,
14692,
2662,
47,
62,
41359,
62,
4221,
15675,
50,
8973,
796,
604,
198,
198,
39344,
350,
446,
26786,
33377,
198,
198,
7249,
350,
446,
26786,
33377,
198,
220,
220,
220,
966,
3712,
43879,
2414,
198,
220,
220,
220,
15942,
577,
... | 2.271984 | 978 |
<filename>src/LShapedSolvers.jl
__precompile__()
module LShapedSolvers
# Standard library
using LinearAlgebra
using SparseArrays
using Distributed
using Printf
# External libraries
using TraitDispatch
using Parameters
using JuMP
using StochasticPrograms
using MathProgBase
using RecipesBase
using ProgressMeter
using G... | [
27,
34345,
29,
10677,
14,
43,
2484,
5813,
36949,
690,
13,
20362,
198,
834,
3866,
5589,
576,
834,
3419,
198,
21412,
406,
2484,
5813,
36949,
690,
198,
198,
2,
8997,
5888,
198,
3500,
44800,
2348,
29230,
198,
3500,
1338,
17208,
3163,
2047... | 2.821577 | 482 |
using RNLA, Test, LinearAlgebra, SparseArrays
@testset "rrpca_test1" begin
m = 100
k = 10
n = 100
p = 0.1
L1 = rand(m, k) * rand(k, n)
S1 = sprandn(m, n, p)
A = L1 + S1 + rand(m, n)
L2, S2, E2 = rrpca(A)
@test norm(abs.(L1) - abs.(L2)) < sqrt(eps())
@test norm(abs.(S1) - abs.... | [
3500,
43112,
13534,
11,
6208,
11,
44800,
2348,
29230,
11,
1338,
17208,
3163,
20477,
198,
198,
31,
9288,
2617,
366,
21062,
79,
6888,
62,
9288,
16,
1,
2221,
198,
220,
220,
220,
285,
796,
1802,
198,
220,
220,
220,
479,
796,
838,
198,
... | 1.849462 | 186 |
#
# This file is a part of MolecularGraph.jl
# Licensed under the MIT License http://opensource.org/licenses/MIT
#
module MolecularGraph
export
MolecularGraphUtil,
MolecularGraphGeometry,
MolecularGraphModel
module MolecularGraphUtil
include("./util/meta.jl")
include("... | [
2,
198,
2,
770,
2393,
318,
257,
636,
286,
38275,
37065,
13,
20362,
198,
2,
49962,
739,
262,
17168,
13789,
2638,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
198,
2,
198,
198,
21412,
38275,
37065,
628,
220,
220,
220,
10784,... | 2.290441 | 1,088 |
"
MutationOperator represents the method that mutates the individuals selected to
create a new generation of individuals.
# Fields
- `_method::Function`: method used for mutation.
- `_probability::Float32`: probability of mutation.
- `_varArgs::Array{Any}`: arguments necessary for the mutation method.
"
struct Mutatio... | [
1,
198,
44,
7094,
18843,
1352,
6870,
262,
2446,
326,
4517,
689,
262,
3925,
6163,
284,
198,
17953,
257,
649,
5270,
286,
3925,
13,
198,
198,
2,
23948,
198,
12,
4600,
62,
24396,
3712,
22203,
63,
25,
2446,
973,
329,
15148,
13,
198,
12... | 2.757895 | 1,235 |
using Downloads
bathymetry_path = joinpath(@__DIR__, "bathymetry-360x150-latitude-75.0.jld2")
boundary_conditions_path = joinpath(@__DIR__, "boundary_conditions-1degree.jld2")
initial_condition_path = joinpath(@__DIR__, "initial_conditions-1degree.jld2")
# TODO: convert to DataDeps
download_bathymetry(path=bathymetr... | [
3500,
50093,
198,
198,
65,
10036,
41935,
62,
6978,
796,
4654,
6978,
7,
31,
834,
34720,
834,
11,
366,
65,
10036,
41935,
12,
15277,
87,
8628,
12,
15460,
3984,
12,
2425,
13,
15,
13,
73,
335,
17,
4943,
198,
7784,
560,
62,
17561,
1756,... | 2.559211 | 304 |
<reponame>Kiruse/Pia.jl
######################################################################
# Signals UTs
# -----
# Licensed under Apache License 2.0
module TestSignals
using Test
using Pia.Signals
@testset "Signals" begin
@testset "basic" begin
let signal = Signal()
@test !isset(signal)
... | [
27,
7856,
261,
480,
29,
42,
343,
1904,
14,
47,
544,
13,
20362,
198,
29113,
29113,
4242,
2235,
198,
2,
5865,
874,
19255,
82,
198,
2,
37404,
198,
2,
49962,
739,
24843,
13789,
362,
13,
15,
198,
21412,
6208,
11712,
874,
198,
3500,
620... | 2.091765 | 425 |
<filename>src/base_cached_networks.jl
# This file contains methods that are dispatched to when using neural networks
# with a preallocated cache (called CachedNetworks). Those are used to greatly
# improve performance, especially in
export cached, vectorize_gradient, weights, grad_cache
"""
NNCache{N}
The base a... | [
27,
34345,
29,
10677,
14,
8692,
62,
66,
2317,
62,
3262,
5225,
13,
20362,
198,
2,
770,
2393,
4909,
5050,
326,
389,
26562,
284,
618,
1262,
17019,
7686,
198,
2,
351,
257,
662,
439,
10533,
12940,
357,
7174,
327,
2317,
7934,
5225,
737,
... | 2.7359 | 2,234 |
<filename>src/structure.jl
import YAML
import LinearAlgebra
import Base.length
import IterTools: groupby
using Printf
using Formatting
struct Structure
lattice::Array{Float64,2}
species::Array{String}
fcoords::Array{Float64,2}
replicate::Array{Int16}
composition::Dict
function Structure(lattic... | [
27,
34345,
29,
10677,
14,
301,
5620,
13,
20362,
198,
11748,
575,
2390,
43,
198,
11748,
44800,
2348,
29230,
198,
11748,
7308,
13,
13664,
198,
11748,
40806,
33637,
25,
1448,
1525,
198,
3500,
12578,
69,
198,
3500,
18980,
889,
198,
198,
7... | 2.577394 | 1,389 |
using Gen
import Random
@gen function model()
if ({:z} ~ bernoulli(0.5))
m1 = ({:m1} ~ gamma(1, 1))
m2 = ({:m2} ~ gamma(1, 1))
else
m = ({:m} ~ gamma(1, 1))
(m1, m2) = (m, m)
end
{:y1} ~ normal(m1, 0.1)
{:y2} ~ normal(m2, 0.1)
end
@gen function mean_random_walk_prop... | [
3500,
5215,
198,
11748,
14534,
198,
198,
31,
5235,
2163,
2746,
3419,
198,
220,
220,
220,
611,
37913,
25,
89,
92,
5299,
275,
1142,
280,
15516,
7,
15,
13,
20,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
285,
16,
796,
37913,
25,
... | 1.820424 | 2,027 |
module psmp
export weibel_streaming
using Sobol
function uniform_6d(Np::Int, nskip=0,T=Float64)
x1n=Array{T}(Np)
x2n=Array{T}(Np)
x3n=Array{T}(Np)
v1n=Array{T}(Np)
v2n=Array{T}(Np)
v3n=Array{T}(Np)
sob = Sobol.SobolSeq(6)
Sobol.skip(sob, 4+nskip) # Skip some entries
for i=1:Np
x1n[i],x2n[i],x3... | [
21412,
26692,
3149,
198,
198,
39344,
356,
43837,
62,
5532,
278,
198,
3500,
36884,
349,
628,
198,
8818,
8187,
62,
21,
67,
7,
45,
79,
3712,
5317,
11,
299,
48267,
28,
15,
11,
51,
28,
43879,
2414,
8,
198,
220,
2124,
16,
77,
28,
1918... | 1.527971 | 4,165 |
"""
Render an inline R script, substituting invalid "\$" signs for Julia symbols
"""
function render(script::String)
symdict = OrderedDict{String,Any}()
local k = 0
local lastex = RParseError()
local line
local col
local c
if !isascii(script)
if !rcopy(reval("isTRUE(l10n_info()\$`UT... | [
37811,
198,
45819,
281,
26098,
371,
4226,
11,
21436,
15129,
12515,
37082,
3,
1,
5895,
329,
22300,
14354,
198,
37811,
198,
8818,
8543,
7,
12048,
3712,
10100,
8,
198,
220,
220,
220,
5659,
11600,
796,
14230,
1068,
35,
713,
90,
10100,
11,... | 1.894167 | 1,663 |
<filename>src/ClipData.jl
module ClipData
using CSV, Tables
using InteractiveUtils: clipboard
export cliptable, cliparray, mwetable, mwearray, @mwetable, @mwearray
"""
cliptable(; kwargs...)
Make a table from the clipboard. Returns
a `CSV.File`, which can then be transformed
into a `DataFrame` or other Tables.... | [
27,
34345,
29,
10677,
14,
2601,
541,
6601,
13,
20362,
198,
21412,
42512,
6601,
198,
198,
3500,
44189,
11,
33220,
198,
198,
3500,
21365,
18274,
4487,
25,
47999,
198,
198,
39344,
537,
10257,
540,
11,
10651,
18747,
11,
285,
86,
316,
540,... | 2.390898 | 3,428 |
<gh_stars>0
read_csv(path; kws...) = read_csv(path, DataFrame; kws...)
# function read_csv(path, sink::Type{<:AbstractMatrix{T}}; delim=nothing, kws...) where T
# x = delim === nothing ? readdlm(path, T; kws...) : readdlm(path, delim, T; kws...)
# return x
# end
function read_csv(path, sink::Type{A}; kws...) ... | [
27,
456,
62,
30783,
29,
15,
198,
961,
62,
40664,
7,
6978,
26,
479,
18504,
23029,
796,
1100,
62,
40664,
7,
6978,
11,
6060,
19778,
26,
479,
18504,
23029,
198,
198,
2,
2163,
1100,
62,
40664,
7,
6978,
11,
14595,
3712,
6030,
90,
27,
... | 2.393913 | 1,150 |
module TestDoctest
using StaticStorages
using Documenter: doctest
using Test
test_doctest() = doctest(StaticStorages, manual = false)
end # module
| [
21412,
6208,
5211,
310,
395,
198,
198,
3500,
36125,
1273,
273,
1095,
198,
3500,
16854,
263,
25,
10412,
395,
198,
3500,
6208,
198,
198,
9288,
62,
4598,
310,
395,
3419,
796,
10412,
395,
7,
45442,
1273,
273,
1095,
11,
10107,
796,
3991,
... | 3.02 | 50 |
<filename>src/TermInterface.jl
module TermInterface
"""
istree(x)
Returns `true` if `x` is a term. If true, `operation`, `arguments`
must also be defined for `x` appropriately.
"""
istree(x) = istree(typeof(x))
istree(x::Type{T}) where {T} = false
export istree
"""
symtype(x)
Returns the symbolic type of `x... | [
27,
34345,
29,
10677,
14,
40596,
39317,
13,
20362,
198,
21412,
35118,
39317,
198,
198,
37811,
198,
220,
220,
220,
318,
21048,
7,
87,
8,
198,
198,
35561,
4600,
7942,
63,
611,
4600,
87,
63,
318,
257,
3381,
13,
1002,
2081,
11,
4600,
... | 3.087184 | 1,147 |
# create a dictionary with all the possible models
function get_car_models(env::UrbanEnv, get_model::Function)
d = Dict{SVector{2, LaneTag}, DriverModel}()
#
r1 = SVector(LaneTag(1,1), LaneTag(2,1))
d[r1] = get_model(env, r1)
r2 = SVector(LaneTag(1,1), LaneTag(5,1))
d[r2] = get_model... | [
2,
2251,
257,
22155,
351,
477,
262,
1744,
4981,
201,
198,
8818,
651,
62,
7718,
62,
27530,
7,
24330,
3712,
46667,
4834,
85,
11,
651,
62,
19849,
3712,
22203,
8,
201,
198,
220,
220,
220,
288,
796,
360,
713,
90,
50,
38469,
90,
17,
1... | 1.994959 | 5,555 |
<reponame>soumitradev/TicTacToe
#= TicTacToe implementation in Julia
@author : soumitradev (<NAME>)
=#
# Create 3x3 board for TicTacToe
board = [[" ", " ", " "],
[" ", " ", " "],
[" ", " ", " "]];
# Define Player Characters for singleplayer
# Spelled wrong for (bad) comedic purposes (I know, very fu... | [
27,
7856,
261,
480,
29,
82,
280,
2781,
27585,
85,
14,
51,
291,
51,
330,
2514,
68,
198,
2,
28,
309,
291,
51,
330,
2514,
68,
7822,
287,
22300,
198,
31,
9800,
1058,
24049,
2781,
27585,
85,
38155,
20608,
43734,
198,
46249,
198,
198,
... | 2.423516 | 7,969 |
<reponame>modirshanechi/pub-xumodirshanechi2021-PlosCB<gh_stars>1-10
# The code to generate Fig 5
# The relevant statistics reported in the paper are calculated at the end of the
# file
using PyPlot
using SurNoR_2020
using Statistics
using MAT
using HypothesisTests
PyPlot.svg(true)
rcParams = PyPlot.PyDict(PyPlot.matp... | [
27,
7856,
261,
480,
29,
4666,
343,
1477,
1531,
11072,
14,
12984,
12,
87,
388,
375,
343,
1477,
1531,
11072,
1238,
2481,
12,
3646,
418,
23199,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
383,
2438,
284,
7716,
12138,
642,
198,
2,
... | 2.276709 | 8,471 |
<filename>test/test_macros.jl
@testset "OpenCL.Macros" begin
@testset "OpenCL.Macros version platform" begin
for platform in cl.platforms()
version = cl.opencl_version(platform)
v11 = cl.@min_v11? platform true : false
v12 = cl.@min_v12? platform true : false
... | [
27,
34345,
29,
9288,
14,
9288,
62,
20285,
4951,
13,
20362,
198,
31,
9288,
2617,
366,
11505,
5097,
13,
14155,
4951,
1,
2221,
198,
220,
220,
220,
2488,
9288,
2617,
366,
11505,
5097,
13,
14155,
4951,
2196,
3859,
1,
2221,
198,
220,
220,... | 1.701022 | 1,174 |
rgpcentury = "([1-9][0-9]?)\\. (Jahrh|Jh)"
rgx1qcentury = Regex("(1\\.|erstes) Viertel (des )?" * rgpcentury, "i")
rgx2qcentury = Regex("(2\\.|zweites) Viertel (des )?" * rgpcentury, "i")
rgx3qcentury = Regex("(3\\.|drittes) Viertel (des )?" * rgpcentury, "i")
rgx4qcentury = Regex("(4\\.|viertes) Viertel (des )?" * rg... | [
198,
81,
31197,
14792,
796,
366,
26933,
16,
12,
24,
7131,
15,
12,
24,
60,
10091,
6852,
13,
357,
41,
993,
17179,
91,
41,
71,
16725,
198,
41345,
87,
16,
80,
14792,
796,
797,
25636,
7203,
7,
16,
6852,
13,
91,
263,
301,
274,
8,
16... | 2.080214 | 374 |
# *****************************************************************************
# Written by <NAME>, <EMAIL>
# *****************************************************************************
# Copyright ã ``2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Adminis... | [
2,
41906,
17174,
4557,
35625,
198,
2,
22503,
416,
1279,
20608,
22330,
1279,
27630,
4146,
29,
198,
2,
41906,
17174,
4557,
35625,
198,
2,
15069,
6184,
96,
7559,
4626,
11,
1578,
1829,
5070,
11,
355,
7997,
416,
262,
198,
2,
22998,
286,
... | 2.449176 | 7,280 |
<reponame>mleprovost/QROMP.jl<filename>src/wrapper.jl
export greedysolver
function greedysolver(algo::String, ψ::AbstractMatrix{T}, u::AbstractVector{T}; invert::Bool=true, verbose::Bool = true, ϵrel::Float64 = 1e-1, maxterms::Int64=typemax(Int64)) where {T}
if algo ∈ ["pivotedqr", "pivot"]
return pivote... | [
27,
7856,
261,
480,
29,
76,
293,
15234,
455,
14,
48,
33676,
47,
13,
20362,
27,
34345,
29,
10677,
14,
48553,
13,
20362,
198,
198,
39344,
25474,
893,
14375,
628,
198,
8818,
25474,
893,
14375,
7,
282,
2188,
3712,
10100,
11,
18074,
230,... | 2.283276 | 293 |
<gh_stars>0
# Literals treated as constants
function Base.convert(::Type{Expression}, n::Number)
if !(typeof(n) <: Expression)
return Constant(n)
else
return n
end
end
# Register functions and handle literals
macro register(sig)
splitsig = splitdef(:($sig = nothing))
name = splitsig... | [
27,
456,
62,
30783,
29,
15,
198,
2,
17667,
874,
5716,
355,
38491,
198,
8818,
7308,
13,
1102,
1851,
7,
3712,
6030,
90,
16870,
2234,
5512,
299,
3712,
15057,
8,
198,
220,
220,
220,
611,
5145,
7,
4906,
1659,
7,
77,
8,
1279,
25,
4198... | 2.409756 | 615 |
module SummitCheckpoint
using ..Ahorn, Maple
const placements = Ahorn.PlacementDict(
"Summit Checkpoint" => Ahorn.EntityPlacement(
Maple.Checkpoint
)
)
baseSprite = "scenery/summitcheckpoints/base02.png"
function Ahorn.selection(entity::Maple.Checkpoint)
x, y = Ahorn.position(entity)
return... | [
21412,
20014,
9787,
4122,
198,
198,
3500,
11485,
10910,
1211,
11,
21249,
198,
198,
9979,
21957,
3196,
796,
7900,
1211,
13,
3646,
5592,
35,
713,
7,
198,
220,
220,
220,
366,
13065,
2781,
6822,
4122,
1,
5218,
7900,
1211,
13,
32398,
3646,... | 2.546632 | 386 |
<filename>test/runtests.jl
using Test, DispatchedTuples
struct Foo end
struct Bar end
struct FooBar end
#####
##### DispatchedTuple's
#####
@testset "DispatchedTuples - base behavior" begin
dt = DispatchedTuple(((Foo(), 1), (Bar(), 2)))
@test dispatch(dt, Foo()) == (1,)
@test dispatch(dt, Bar()) == (2,)
... | [
27,
34345,
29,
9288,
14,
81,
2797,
3558,
13,
20362,
198,
3500,
6208,
11,
3167,
8071,
1740,
47247,
2374,
198,
198,
7249,
36080,
886,
198,
7249,
2409,
886,
198,
7249,
36080,
10374,
886,
198,
198,
4242,
2,
198,
4242,
2,
3167,
8071,
174... | 2.279441 | 2,505 |
<filename>benchmark/bench_equilibria.jl
module BenchEquilibria
using BenchmarkTools
using LatticeBoltzmann
import LatticeBoltzmann: equilibrium, equilibrium!
suite = BenchmarkGroup()
function initialize_benchmark(q = D2Q9(), τ = 1.0, scale = 2)
benchmark_problem = LatticeBoltzmann.TGV(q, τ, scale)
LatticeB... | [
27,
34345,
29,
26968,
4102,
14,
26968,
62,
4853,
22282,
7496,
13,
20362,
198,
21412,
25187,
23588,
22282,
7496,
198,
198,
3500,
25187,
4102,
33637,
198,
3500,
406,
1078,
501,
33,
5978,
89,
9038,
198,
198,
11748,
406,
1078,
501,
33,
59... | 2.3125 | 464 |
# Use baremodule to shave off a few KB from the serialized `.ji` file
baremodule snappy_jll
using Base
using Base: UUID
import JLLWrappers
JLLWrappers.@generate_main_file_header("snappy")
JLLWrappers.@generate_main_file("snappy", UUID("fe1e1685-f7be-5f59-ac9f-4ca204017dfd"))
end # module snappy_jll
| [
2,
5765,
6247,
21412,
284,
34494,
572,
257,
1178,
14204,
422,
262,
11389,
1143,
4600,
13,
7285,
63,
2393,
198,
49382,
21412,
3013,
7774,
62,
73,
297,
198,
3500,
7308,
198,
3500,
7308,
25,
471,
27586,
198,
11748,
449,
3069,
36918,
1179... | 2.559322 | 118 |
<filename>src/graphOps.jl<gh_stars>0
"Convert the indices in a graph to 32-bit ints. This takes less storage, but does not speed up much"
shortIntGraph(a::SparseMatrixCSC) = SparseMatrixCSC{Float64,Int32}(convert(Int32,a.m), convert(Int32,a.n), convert(Array{Int32,1},a.colptr), convert(Array{Int32,1},a.rowval), a.nzv... | [
27,
34345,
29,
10677,
14,
34960,
41472,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
198,
1,
3103,
1851,
262,
36525,
287,
257,
4823,
284,
3933,
12,
2545,
493,
82,
13,
220,
770,
2753,
1342,
6143,
11,
475,
857,
407,
2866,
510,
881,
... | 2.332348 | 3,045 |
# MIT License
#
# Copyright (c) 2018 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
1279,
20608,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
... | 3.178439 | 538 |
<gh_stars>100-1000
"""
rand(::Type{DQMC}, m::Model, nslices::Int)
Draw random configuration.
"""
Base.rand(::Type{DQMC}, m::Model, nslices) = throw(MethodError(rand, (DQMC, m, nslices)))
"""
nflavors(model)
Returns the number of activer fermion flavors of a given Quantum Monte Carlo
model.
The size of the ... | [
27,
456,
62,
30783,
29,
3064,
12,
12825,
198,
37811,
198,
220,
220,
220,
43720,
7,
3712,
6030,
90,
35,
48,
9655,
5512,
285,
3712,
17633,
11,
36545,
677,
274,
3712,
5317,
8,
198,
198,
25302,
4738,
8398,
13,
198,
37811,
198,
14881,
... | 2.847249 | 1,054 |
<gh_stars>0
using ReproducePlotUtils
using Test
@testset "ReproducePlotUtils.jl" begin
# Write your tests here.
end
| [
27,
456,
62,
30783,
29,
15,
198,
3500,
36551,
344,
43328,
18274,
4487,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
6207,
2076,
344,
43328,
18274,
4487,
13,
20362,
1,
2221,
198,
220,
220,
220,
1303,
19430,
534,
5254,
994,
13,
198... | 2.688889 | 45 |
@testset "26.remove-duplicates-from-sorted-array.jl" begin
nums1 = [1, 1, 2]
@test remove_duplicates1!(nums1) == 2 && nums1[1: 2] == [1, 2]
nums2 = [0, 0, 1, 1, 1, 2, 2, 3, 3, 4]
@test remove_duplicates1!(nums2) == 5 && nums2[1: 5] == [0, 1, 2, 3, 4]
end
| [
31,
9288,
2617,
366,
2075,
13,
28956,
12,
646,
489,
16856,
12,
6738,
12,
82,
9741,
12,
18747,
13,
20362,
1,
2221,
198,
220,
220,
220,
997,
82,
16,
796,
685,
16,
11,
352,
11,
362,
60,
198,
220,
220,
220,
2488,
9288,
4781,
62,
6... | 1.868966 | 145 |
"""
ap_test_fm(re, factors)
CROSS-SECTIONAL TESTS USING THE FAMA-MACBETH REGRESSION
Fama-MacBeth standard errors do not include corrections for the fact that the betas are also estimated.
INPUTS
`re': T x N matrix of excess returns, where T is the number of periods for each test assets and N is the number of test as... | [
37811,
198,
499,
62,
9288,
62,
38353,
7,
260,
11,
5087,
8,
198,
198,
9419,
18420,
12,
50,
24565,
1847,
309,
1546,
4694,
1294,
2751,
3336,
376,
25087,
12,
44721,
33,
20702,
4526,
10761,
47621,
198,
198,
37,
1689,
12,
14155,
33,
2788,... | 2.584683 | 679 |
include("required.jl")
## Conditional arguments
# outcome = "rf"
# outcome = "bart"
# save_figures = true
# Make sure "outcome" is defined
if !(@isdefined outcome)
@warn "'outcome' not defined, must be either 'raw', 'bio', 'rf', or 'bart'"
elseif !(outcome in ["raw", "bio", "rf", "bart"])
@warn "'outcome' inv... | [
17256,
7203,
35827,
13,
20362,
4943,
198,
198,
2235,
9724,
1859,
7159,
198,
2,
8055,
796,
366,
41871,
1,
198,
2,
8055,
796,
366,
16575,
1,
198,
2,
3613,
62,
5647,
942,
796,
2081,
198,
198,
2,
6889,
1654,
366,
448,
2958,
1,
318,
... | 2.370168 | 2,742 |
{"score": 8.08, "score_count": 228189, "timestamp": 1582496547.0}
{"score": 8.08, "score_count": 228189, "timestamp": 1582165177.0}
{"score": 8.1, "score_count": 215647, "timestamp": 1575927522.0}
{"score": 8.12, "score_count": 201871, "timestamp": 1569423395.0}
{"score": 8.12, "score_count": 200980, "timestamp": 15689... | [
4895,
26675,
1298,
807,
13,
2919,
11,
366,
26675,
62,
9127,
1298,
29041,
23362,
11,
366,
16514,
27823,
1298,
24063,
21626,
2996,
2857,
13,
15,
92,
198,
4895,
26675,
1298,
807,
13,
2919,
11,
366,
26675,
62,
9127,
1298,
29041,
23362,
11... | 2.355115 | 21,945 |
<reponame>dhonza/Loudspeakers.jl<gh_stars>0
export record_response_ecasound, measure_response, measurement_info, calibrate_response, compute_ir
export table_measurement
export postprocess_response, postprocess_dir
function record_response_ecasound(fstimulus, fresponse; duration=2s)
durationsec = ustrip(Float32, u"... | [
27,
7856,
261,
480,
29,
67,
24130,
4496,
14,
43,
2778,
4125,
3979,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
39344,
1700,
62,
26209,
62,
721,
292,
633,
11,
3953,
62,
26209,
11,
15558,
62,
10951,
11,
33801,
378,
62,
26209,
11,
... | 2.440854 | 1,826 |
function nlp_cvx_105_013(
optimizer,
objective_tol,
primal_tol,
dual_tol,
termination_target = TERMINATION_TARGET_LOCAL,
primal_target = PRIMAL_TARGET_LOCAL,
)
model = Model(optimizer)
@variable(model, x, start = 0.1)
@variable(model, y)
@objective(model, Min, -x + y)
@NLco... | [
8818,
299,
34431,
62,
33967,
87,
62,
13348,
62,
30273,
7,
198,
220,
220,
220,
6436,
7509,
11,
198,
220,
220,
220,
9432,
62,
83,
349,
11,
198,
220,
220,
220,
43750,
62,
83,
349,
11,
198,
220,
220,
220,
10668,
62,
83,
349,
11,
1... | 2.238434 | 281 |
ENV["GKSwstype"]="100" #src
#md # # Who am I ?
#md #
#md # - My name is *<NAME>*
#md #
#md # - **Fortran 77 + PVM** : during my PhD 1998-2002 (Université du Havre)
#md #
#md # - **Fortran 90-2003 + OpenMP-MPI** : Engineer in Strasbourg (2003-2015) at IRMA
#md #
#md # - **Numpy + Cython, R + Rcpp** : Engineer in R... | [
1677,
53,
14692,
38,
42,
10462,
301,
2981,
8973,
2625,
3064,
1,
1303,
10677,
198,
198,
2,
9132,
1303,
1303,
5338,
716,
314,
5633,
198,
2,
9132,
1303,
198,
2,
9132,
1303,
220,
532,
2011,
1438,
318,
1635,
27,
20608,
29,
9,
198,
2,
... | 2.87164 | 1,488 |
struct RKParam <: EoSParam
a::PairParam{Float64}
b::PairParam{Float64}
Tc::SingleParam{Float64}
Pc::SingleParam{Float64}
Mw::SingleParam{Float64}
Tbarc::Float64 # Not sure if we want to allow this
end
abstract type RKModel <: ABCubicModel end
@newmodel RK RKModel RKParam
export RK
function RK(... | [
7249,
371,
42,
22973,
1279,
25,
412,
78,
4303,
41158,
198,
220,
220,
220,
257,
3712,
47,
958,
22973,
90,
43879,
2414,
92,
198,
220,
220,
220,
275,
3712,
47,
958,
22973,
90,
43879,
2414,
92,
198,
220,
220,
220,
309,
66,
3712,
28008... | 1.832916 | 1,197 |
@doc raw"""
Spinor(α,β)
Spinor(α,β) with Cayley-Klein parameters α and β.
Based on "Introduction to the Shinnar-Le Roux algorithm", <NAME> (1995).
A spinor is a way to represent 3D rotations, the underlying representation is a 2 X 2 complex unitary matrix (``\alpha,\beta\in\mathbb{C}``):
```math
R=\left[\begin{ar... | [
31,
15390,
8246,
37811,
198,
197,
4561,
259,
273,
7,
17394,
11,
26638,
8,
628,
198,
4561,
259,
273,
7,
17394,
11,
26638,
8,
351,
28335,
1636,
12,
42,
33663,
10007,
26367,
290,
27169,
13,
198,
198,
15001,
319,
366,
21906,
284,
262,
... | 2.019352 | 2,377 |
<filename>src/devices_models/devices/thermal_generation.jl
#! format: off
requires_initialization(::AbstractThermalFormulation) = false
requires_initialization(::AbstractThermalUnitCommitment) = true
requires_initialization(::ThermalStandardDispatch) = true
requires_initialization(::ThermalBasicCompactUnitCommitment) ... | [
27,
34345,
29,
10677,
14,
42034,
62,
27530,
14,
42034,
14,
490,
7617,
62,
20158,
13,
20362,
198,
2,
0,
5794,
25,
572,
198,
198,
47911,
62,
36733,
1634,
7,
3712,
23839,
35048,
7617,
8479,
1741,
8,
796,
3991,
198,
47911,
62,
36733,
... | 2.512349 | 20,933 |
__precompile__(true)
module VectorField
import Plots: quiver, quiver!
import LinearAlgebra: adjoint
export meshgrid, vectorfield, vectorfield!
function meshgrid(x, y)
x, y = float.(x), float.(y)
[repeat(x, inner=length(y))'; repeat(y, outer=length(x))']
end
function vectorfield(points, field::Function; arr... | [
834,
3866,
5589,
576,
834,
7,
7942,
8,
198,
198,
21412,
20650,
15878,
198,
198,
11748,
1345,
1747,
25,
627,
1428,
11,
627,
1428,
0,
198,
11748,
44800,
2348,
29230,
25,
9224,
1563,
198,
39344,
19609,
25928,
11,
15879,
3245,
11,
15879,
... | 2.401879 | 1,809 |
[RpcApi.SimpleOrganism(0x0000000000057cce,:(function (o::Creature.Organism,)
function func_420(var_419::Int16=-11171)
o.mem[var_419] = var_419
return var_419
end
local var_413::Int8 = -128
function func_286(var_284::Int16=2081,var_285::Int64=9145930075523767031)
... | [
58,
49,
14751,
32,
14415,
13,
26437,
26121,
1042,
7,
15,
87,
8269,
830,
3553,
66,
344,
11,
37498,
8818,
357,
78,
3712,
16719,
495,
13,
26121,
1042,
35751,
198,
220,
220,
220,
220,
220,
220,
220,
2163,
25439,
62,
27211,
7,
7785,
62... | 1.749396 | 33,531 |
function parse_rules(s)
rules = Dict{String,Vector{Tuple{String,Int}}}()
for line in readlines(IOBuffer(s))
outer, inners = split(line, " bags contain ")
if startswith(inners, "no other bags.")
continue
end
inners = string(inners)
inners = replace(inners, r"(b... | [
8818,
21136,
62,
38785,
7,
82,
8,
198,
220,
220,
220,
3173,
796,
360,
713,
90,
10100,
11,
38469,
90,
51,
29291,
90,
10100,
11,
5317,
42535,
3419,
198,
220,
220,
220,
329,
1627,
287,
1100,
6615,
7,
9399,
28632,
7,
82,
4008,
198,
... | 2.094136 | 648 |
<gh_stars>0
## Copyright (c) 2013 <NAME>
##
## This file is distributed under the 2-clause BSD License.
module Gaston
export closefigure, closeall, figure,
plot, plot!, histogram, imagesc, surf,
printfigure, set
import Base.show
# before doing anything else, verify gnuplot is present on this system
tr... | [
27,
456,
62,
30783,
29,
15,
198,
2235,
15069,
357,
66,
8,
2211,
1279,
20608,
29,
198,
2235,
198,
2235,
770,
2393,
318,
9387,
739,
262,
362,
12,
565,
682,
347,
10305,
13789,
13,
198,
198,
21412,
31486,
261,
198,
198,
39344,
1969,
2... | 2.854111 | 377 |
<reponame>EthanAnderes/VecchiaFactorization.jl
module VecchiaFactorization
import Base: size, getindex, permute!, invpermute!, parent, show, rand, randn
using LinearAlgebra # BLAS.set_num_threads(1)
import LinearAlgebra: mul!, lmul!, ldiv!, \, /, *, inv, pinv,
adjoint, transpose, Matrix, sqrt, Hermitian, Symmetric, ... | [
27,
7856,
261,
480,
29,
36,
14813,
1870,
68,
411,
14,
53,
721,
354,
544,
41384,
1634,
13,
20362,
198,
21412,
38692,
354,
544,
41384,
1634,
198,
198,
11748,
7308,
25,
2546,
11,
651,
9630,
11,
9943,
1133,
28265,
800,
16321,
1133,
2826... | 2.483801 | 1,389 |
<reponame>eford/EchelleTools.jl
const hpf_all_orders = 1:28
const hpf_flux_hdu = 2
const hpf_var_hdu = 5
const hpf_lambda_hdu = 8
const hpf_manifest_format = [
ManifestFormatEntry(:UTTimestamp,String, 4:26),
ManifestFormatEntry(:UTDate,String, 30:37),
ManifestFormatEn... | [
27,
7856,
261,
480,
29,
891,
585,
14,
36,
29232,
293,
33637,
13,
20362,
198,
9979,
27673,
69,
62,
439,
62,
6361,
796,
352,
25,
2078,
198,
9979,
27673,
69,
62,
69,
22564,
62,
71,
646,
796,
362,
198,
9979,
27673,
69,
62,
7785,
62,... | 1.872063 | 383 |
<gh_stars>1-10
# Copyright (c) 2021, <NAME>
# All rights reserved.
#
# Code provided under the license contained in the LICENSE file.
#
# This file depends upon the Sudoku module being defined first.
using Test
function block_permutations()
p_reference = Array{Int16}(undef,(4,4))
#p_reference[:] = [1,2,3,4, 3... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
15069,
357,
66,
8,
33448,
11,
1279,
20608,
29,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
6127,
2810,
739,
262,
5964,
7763,
287,
262,
38559,
24290,
2393,
13,
198,
2,
198,
2,
770... | 1.82807 | 855 |
<filename>Chapter 6/Queues.jl
module Queues
export Queue, enqueue!, dequeue!, peek
include("LinkedLists.jl")
using .LinkedLists
struct Queue{T}
list::LinkedList{T}
end
Queue(t::Type{T}) where {T} = Queue{T}(LinkedList{T}())
Queue{T}() where {T} = Queue{T}(LinkedList{T}())
Queue() = Queue{Any}(LinkedList{Any}())
... | [
27,
34345,
29,
14126,
718,
14,
15681,
947,
13,
20362,
198,
21412,
4670,
947,
198,
198,
39344,
4670,
518,
11,
551,
36560,
28265,
390,
36560,
28265,
27185,
198,
198,
17256,
7203,
11280,
276,
43,
1023,
13,
20362,
4943,
198,
3500,
764,
11... | 2.451902 | 447 |
<reponame>FridljDa/IndependentHypothesisWeighting.jl
StatsBase.@weights PriorityWeights
const DirectlyWeighted = Union{Bonferroni,BenjaminiHochberg}
#TODO: assumes weights sum to length(pvals)
function adjust(pvals, ws::Union{PriorityWeights,UnitWeights}, method::DirectlyWeighted)
weighted_pvals = copy(pvals)
... | [
27,
7856,
261,
480,
29,
37,
6058,
75,
73,
26531,
14,
40566,
49926,
313,
8497,
25844,
278,
13,
20362,
198,
29668,
14881,
13,
31,
43775,
34416,
1135,
2337,
628,
198,
9979,
4128,
306,
25844,
276,
796,
4479,
90,
20682,
2232,
1313,
72,
1... | 2.479381 | 194 |
<reponame>Gawatz/ULE_MPS_Trajectories<filename>SSE/exampleSSErun.jl
using Distributed
using exactQmodule
using Arpack
using PauliStrings
using MPOmodule
using finiteMPS
using FFTW
#@everywhere using ProgressMeter
@everywhere using DelimitedFiles
@everywhere include("finiteTDVP_SSE.jl")
#
# get frequency bins
#
functio... | [
27,
7856,
261,
480,
29,
38,
707,
27906,
14,
24212,
62,
44,
3705,
62,
15721,
752,
1749,
27,
34345,
29,
50,
5188,
14,
20688,
50,
5188,
5143,
13,
20362,
198,
3500,
4307,
6169,
198,
3500,
2748,
48,
21412,
198,
3500,
943,
8002,
198,
35... | 2.017922 | 3,850 |
using Test
@testset "CombinatorialMaps" begin
include("CombinatorialMaps.jl")
end
@testset "SimplicialSets" begin
include("SimplicialSets.jl")
end
@testset "ExteriorCalculus" begin
include("ExteriorCalculus.jl")
include("DiscreteExteriorCalculus.jl")
end
@testset "Meshes" begin
include("MeshInterop.jl")
... | [
3500,
6208,
198,
198,
31,
9288,
2617,
366,
20575,
20900,
498,
47010,
1,
2221,
198,
220,
2291,
7203,
20575,
20900,
498,
47010,
13,
20362,
4943,
198,
437,
198,
198,
31,
9288,
2617,
366,
8890,
489,
6652,
50,
1039,
1,
2221,
198,
220,
22... | 2.816 | 125 |
using MCMC
println(" Testing basic EmpMCTuner constructors...")
mctuners = [EmpMCTuner(0.85),
EmpMCTuner(0.85, adaptStep=50),
EmpMCTuner(0.85, maxStep=100),
EmpMCTuner(0.85, targetPath=0.75),
EmpMCTuner(0.85, verbose=true)]
println(" Testing that EmpMCTuner tuners works with all samplers...")
npars = ... | [
3500,
13122,
9655,
198,
198,
35235,
7203,
220,
220,
220,
23983,
4096,
2295,
79,
44,
4177,
38886,
5678,
669,
9313,
8,
198,
198,
76,
310,
403,
364,
796,
685,
36,
3149,
44,
4177,
38886,
7,
15,
13,
5332,
828,
198,
220,
2295,
79,
44,
... | 2.102564 | 351 |
<filename>src/datatablerow/utils.jl
# Rows grouping.
# Maps row contents to the indices of all the equal rows.
# Used by groupby(), join(), nonunique()
immutable RowGroupDict{T<:AbstractDataTable}
"source data table"
dt::T
"number of groups"
ngroups::Int
"row hashes"
rhashes::Vector{UInt}
"h... | [
27,
34345,
29,
10677,
14,
19608,
265,
397,
1754,
322,
14,
26791,
13,
20362,
198,
2,
371,
1666,
36115,
13,
198,
2,
20347,
5752,
10154,
284,
262,
36525,
286,
477,
262,
4961,
15274,
13,
198,
2,
16718,
416,
1448,
1525,
22784,
4654,
2278... | 2.211075 | 3,070 |
# Biryani -- A conversion and validation toolbox
# By: <NAME> <<EMAIL>>
#
# Copyright (C) 2015 <NAME>
# https://github.com/eraviart/Biryani.jl
#
# This file is part of Biryani.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | [
2,
347,
9045,
3216,
1377,
317,
11315,
290,
21201,
2891,
3524,
198,
2,
2750,
25,
1279,
20608,
29,
9959,
27630,
4146,
4211,
198,
2,
198,
2,
15069,
357,
34,
8,
1853,
1279,
20608,
29,
198,
2,
3740,
1378,
12567,
13,
785,
14,
263,
15820... | 2.702249 | 11,429 |
module mbObserve
export Observer, observe, unobserve, notify
type Observer
D::Dict{Any, Vector{Function}}
Observer() = new( Dict{Any, Vector{Function}}() )
end
function observe(cb::Function, O::Observer, s)
!haskey(O.D, s) && (O.D[s] = Function[])
push!(O.D[s], cb)
return Void
end
function unobserve(cb::Functio... | [
21412,
285,
65,
31310,
3760,
198,
39344,
27058,
11,
12414,
11,
41511,
2655,
303,
11,
19361,
198,
198,
4906,
27058,
198,
197,
35,
3712,
35,
713,
90,
7149,
11,
20650,
90,
22203,
11709,
198,
197,
31310,
18497,
3419,
796,
649,
7,
360,
7... | 2.558685 | 426 |
<filename>src/filters/threshold.jl
"""This filter returns the `match` result if the level in the `Event` is the same or more specific than the configured level and the onMismatch value otherwise.
For example, if the `ThresholdFilter` is configured with `Level.ERROR` and the `Event` contains `Level.DEBUG` then the `mism... | [
27,
34345,
29,
10677,
14,
10379,
1010,
14,
400,
10126,
13,
20362,
198,
37811,
1212,
8106,
5860,
262,
4600,
15699,
63,
1255,
611,
262,
1241,
287,
262,
4600,
9237,
63,
318,
262,
976,
393,
517,
2176,
621,
262,
17839,
1241,
290,
262,
31... | 2.831293 | 735 |
<reponame>andLaing/ATools<filename>src/raytracing.jl
using StatsBase
using LinearAlgebra
"""
Ray
Represents a ray, characterised by a starting point (p), and a direction (d).
From these, a unit vector, u can be computed.
# Fields
- `p::Vector{Float64}` : Starting point
- `d::Vector{Float64}` : Direction vector
- ... | [
27,
7856,
261,
480,
29,
392,
14772,
278,
14,
1404,
10141,
27,
34345,
29,
10677,
14,
2433,
2213,
4092,
13,
20362,
198,
3500,
20595,
14881,
198,
3500,
44800,
2348,
29230,
198,
198,
37811,
198,
197,
19591,
198,
198,
6207,
6629,
257,
2684... | 2.214286 | 840 |
import ColorSchemes: viridis, inferno, twilight, deep, matter, ice, algae, balance, curl
import Colors.hex
function plotly_cs(colorscheme; n_entries=11)
scale = LinRange(0, 1, n_entries)
colors = [get(colorscheme, s) for s in scale]
return [[s, hex(color)] for (s, color) in zip(scale, colors)]
end
functi... | [
11748,
5315,
27054,
6880,
25,
5709,
29207,
11,
1167,
24100,
11,
45493,
11,
2769,
11,
2300,
11,
4771,
11,
33773,
11,
220,
5236,
11,
29249,
198,
11748,
29792,
13,
33095,
198,
8818,
7110,
306,
62,
6359,
7,
4033,
26164,
1326,
26,
299,
6... | 2.026786 | 1,680 |
# The file test.mseed comes from an older IRIS libmseed, found by anowacki
# It has a more complicated structure than the test.mseed file in more recent
# versions of libmseed, which reads with no issues
printstyled("SEED submodule\n", color=:light_green)
using SeisIO.SEED
printstyled(" info dump\n", color=:light_gre... | [
2,
383,
2393,
1332,
13,
76,
28826,
2058,
422,
281,
4697,
14826,
1797,
9195,
76,
28826,
11,
1043,
416,
281,
322,
441,
72,
198,
2,
632,
468,
257,
517,
8253,
4645,
621,
262,
1332,
13,
76,
28826,
2393,
287,
517,
2274,
198,
2,
6300,
... | 2.019231 | 728 |
<reponame>alisiahkoohi/InvertibleNetworks.jl
# Conditional HINT network from Kruse et al. (2020)
# Author: <NAME>, <EMAIL>
# Date: January 2020
using InvertibleNetworks, LinearAlgebra, Test, Random
Random.seed!(11)
# Define network
nx = 64
ny = 64
n_in = 2
n_hidden = 4
batchsize = 2
L = 2
K = 2
# Multi-scale and sin... | [
27,
7856,
261,
480,
29,
27315,
9520,
7204,
1219,
72,
14,
818,
1851,
856,
7934,
5225,
13,
20362,
198,
2,
9724,
1859,
367,
12394,
3127,
422,
33909,
325,
2123,
435,
13,
357,
42334,
8,
198,
2,
6434,
25,
1279,
20608,
22330,
1279,
27630,
... | 1.900568 | 1,408 |
<gh_stars>1-10
# AUTO GENERATED FILE - DO NOT EDIT
export alert
"""
alert(;kwargs...)
alert(children::Any;kwargs...)
alert(children_maker::Function;kwargs...)
An Alert component.
Attract user attention with important static message. For more information, see: https://mantine.dev/core/alert/
Keyword argu... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
47044,
46,
24700,
1137,
11617,
45811,
532,
8410,
5626,
48483,
198,
198,
39344,
7995,
198,
198,
37811,
198,
220,
220,
220,
7995,
7,
26,
46265,
22046,
23029,
198,
220,
220,
220,
7995,
7,
... | 3.282744 | 481 |
function penalty_α(α, pen_α)
return - 0.5 * sum(α.*α) / pen_α^2
end
function penalty_params(model, pen_params)
return sum(sum([[penalize(model[j, k], pen_params[j][k]) for k in 1:size(model)[2]] for j in 1:size(model)[1]]))
end
# tmp = [[2. 1. 3. 1.], [2. 3. 4. 5.], [1. 2. 3. 4.]],
# [[2. 1. 3. 1.], [2... | [
8818,
7389,
62,
17394,
7,
17394,
11,
3112,
62,
17394,
8,
198,
220,
220,
220,
1441,
532,
657,
13,
20,
1635,
2160,
7,
17394,
15885,
17394,
8,
1220,
3112,
62,
17394,
61,
17,
198,
437,
198,
198,
8818,
7389,
62,
37266,
7,
19849,
11,
... | 2.023041 | 217 |
<filename>src/alias_arrays.jl
"""
CartesianAxes
Alias for LinearIndices where indices are subtypes of `AbstractAxis`.
## Examples
```jldoctest
julia> using AxisIndices
julia> cartaxes = CartesianAxes((Axis(2.0:5.0), Axis(1:4)));
julia> cartinds = CartesianIndices((1:4, 1:4));
julia> cartaxes[2, 2]
CartesianIn... | [
27,
34345,
29,
10677,
14,
26011,
62,
3258,
592,
13,
20362,
198,
198,
37811,
198,
220,
220,
220,
13690,
35610,
31554,
274,
198,
198,
40489,
329,
44800,
5497,
1063,
810,
36525,
389,
850,
19199,
286,
4600,
23839,
31554,
271,
44646,
198,
... | 2.488285 | 1,067 |
using Kash
using MinHash
using Test
using FASTX
using BioSequences
TESTPATH = joinpath(dirname(@__FILE__), "data", "test.fna")
## FastaIterator
@testset "FastaIterator" begin
function test_fastaiterator(one::FastaIterator{T}, two) where T
# FastaIterators mutate their output, so must copy
A = [cop... | [
3500,
20578,
198,
3500,
1855,
26257,
198,
3500,
6208,
198,
3500,
376,
11262,
55,
198,
3500,
16024,
44015,
3007,
198,
198,
51,
6465,
34219,
796,
4654,
6978,
7,
15908,
3672,
7,
31,
834,
25664,
834,
828,
366,
7890,
1600,
366,
9288,
13,
... | 2.054196 | 2,657 |
<reponame>jagot/Unwrap.jl
using PyCall
pygui(:qt)
using PyPlot
matplotlib[:rcdefaults]()
ion()
using Unwrap
x = linspace(-1,1,200)
y = x
r² = broadcast(+, x.^2, (y').^2)
z = exp(-r²)
φ = angle(exp(im*z*10π))
φ_old = copy(φ)
φ1 = unwrap2d(φ)
φ2 = unwrap2d(φ1) # Iterating improves result
function plot_map(args...;kwa... | [
27,
7856,
261,
480,
29,
73,
363,
313,
14,
3118,
37150,
13,
20362,
198,
3500,
9485,
14134,
198,
9078,
48317,
7,
25,
39568,
8,
198,
3500,
9485,
43328,
198,
6759,
29487,
8019,
58,
25,
6015,
12286,
82,
60,
3419,
198,
295,
3419,
198,
1... | 1.849582 | 718 |
<filename>src/utils.jl
function contraction_graph(As::ITensor...)
N = length(As)
# Make edges for the contracted indices
edge_index_list = Dict{Tuple{Int, Int}, Vector{Index}}()
for nodeᵢ in 1:N
Aᵢ = As[nodeᵢ]
for nodeⱼ in nodeᵢ:N
if nodeᵢ ≠ nodeⱼ
Aⱼ = As[nodeⱼ]
for indAⱼ in inds... | [
27,
34345,
29,
10677,
14,
26791,
13,
20362,
198,
198,
8818,
36246,
62,
34960,
7,
1722,
3712,
2043,
22854,
23029,
198,
220,
399,
796,
4129,
7,
1722,
8,
628,
220,
1303,
6889,
13015,
329,
262,
23407,
36525,
198,
220,
5743,
62,
9630,
62... | 2.146505 | 1,488 |
<gh_stars>1-10
using DifferentialEquations
using Distributions
using Plots
using DelimitedFiles
#-----------------------------------
#specify the signaling topology
#-----------------------------------
topology = [0 1 1
0 0 1
0 0 0]
nCell = size(topology, 1)
#-------------------------------... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
198,
3500,
20615,
498,
23588,
602,
198,
3500,
46567,
507,
198,
3500,
1345,
1747,
198,
3500,
4216,
320,
863,
25876,
198,
198,
2,
3880,
6329,
198,
2,
16684,
1958,
262,
22049,
1353,
1435,
198,
... | 2.007456 | 2,280 |
var_count = 0
function variables(::Type{T}; n::Int = 1, unique::Bool = true) where {T}
if unique
global var_count += n
varcnt = var_count
else
varcnt = n
end
if n == 1
return var(T, "ω$(varcnt)")
end
return [var(T, "ω$i") for i in varcnt-n+1:varcnt]
end
var(::Ty... | [
7785,
62,
9127,
796,
657,
198,
198,
8818,
9633,
7,
3712,
6030,
90,
51,
19629,
299,
3712,
5317,
796,
352,
11,
3748,
3712,
33,
970,
796,
2081,
8,
810,
1391,
51,
92,
198,
220,
220,
220,
611,
3748,
198,
220,
220,
220,
220,
220,
220,... | 1.945161 | 310 |
# descriptor
mutable struct DropoutDesc
ptr::Ptr{Nothing}
states::CuVector{UInt8}
end
Base.unsafe_convert(::Type{Ptr{Nothing}}, dd::DropoutDesc) = dd.ptr
function DropoutDesc(ρ::Real; seed::Integer=0)
d = [C_NULL]
s = Csize_t[0]
cudnnCreateDropoutDescriptor(d)
cudnnDropoutGetStatesSize(handle(), s)
sta... | [
2,
43087,
198,
198,
76,
18187,
2878,
14258,
448,
24564,
198,
220,
50116,
3712,
46745,
90,
18465,
92,
198,
220,
2585,
3712,
46141,
38469,
90,
52,
5317,
23,
92,
198,
437,
198,
198,
14881,
13,
13271,
8635,
62,
1102,
1851,
7,
3712,
6030... | 2.512931 | 232 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.