content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
using DelayNetPlots
using Test
@testset "DelayNetPlots.jl" begin
# Write your tests here.
end
| [
3500,
42698,
7934,
3646,
1747,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
13856,
323,
7934,
3646,
1747,
13,
20362,
1,
2221,
198,
220,
220,
220,
1303,
19430,
534,
5254,
994,
13,
198,
437,
198
] | 2.75 | 36 |
# This file is a part of Julia. License is MIT: https://julialang.org/license
# tests for codegen and optimizations
using Random
using InteractiveUtils
const opt_level = Base.JLOptions().opt_level
const coverage = (Base.JLOptions().code_coverage > 0) || (Base.JLOptions().malloc_log > 0)
const Iptr = sizeof(Int) == 8... | [
2,
770,
2393,
318,
257,
636,
286,
22300,
13,
13789,
318,
17168,
25,
3740,
1378,
73,
377,
498,
648,
13,
2398,
14,
43085,
198,
198,
2,
5254,
329,
2438,
5235,
290,
41446,
198,
198,
3500,
14534,
198,
3500,
21365,
18274,
4487,
198,
198,
... | 2.219807 | 6,947 |
export monodromy_solve,
MonodromyResult,
real_solutions,
is_success,
is_heuristic_stop,
nreal,
parameters,
verify_solution_completeness,
solution_completeness_witnesses
#####################
# Monodromy Options #
#####################
const monodromy_options_supported_keywords = [
... | [
39344,
937,
375,
50228,
62,
82,
6442,
11,
198,
220,
220,
220,
2892,
375,
50228,
23004,
11,
198,
220,
220,
220,
1103,
62,
82,
14191,
11,
198,
220,
220,
220,
318,
62,
13138,
11,
198,
220,
220,
220,
318,
62,
258,
27915,
62,
11338,
... | 2.336668 | 17,091 |
<gh_stars>1-10
using MOCNeutronTransport
using HDF5
@testset "XDMF" begin
@testset "c5g7 pin - triangles" begin
vtk_to_xdmf_type = Dict(
# triangle
5 => 4,
# triangle6
22 => 36,
# quadrilateral
9 => 5,
# quad8
2... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
337,
4503,
8199,
315,
1313,
8291,
634,
198,
3500,
5572,
37,
20,
198,
31,
9288,
2617,
366,
55,
23127,
37,
1,
2221,
198,
220,
220,
220,
2488,
9288,
2617,
366,
66,
20,
70,
22,
6757,
... | 1.56973 | 3,700 |
using Distributions, UncertainData
# Test all combinations of different types of uncertain values
M = MixtureModel([Normal(3, 0.2), Normal(2, 1)])
r1 = UncertainValue(Normal, rand(), rand())
r2 = UncertainValue(rand(M, 10000))
r3 = UncertainValue(Normal, rand(Normal(4, 3.2), 10000))
uvals = [r1; r2; r3]
n = 5
for u... | [
3500,
46567,
507,
11,
28304,
1425,
6601,
198,
198,
2,
6208,
477,
17790,
286,
1180,
3858,
286,
8627,
3815,
198,
44,
796,
337,
9602,
17633,
26933,
26447,
7,
18,
11,
657,
13,
17,
828,
14435,
7,
17,
11,
352,
8,
12962,
198,
198,
81,
... | 2.194969 | 1,908 |
"""
`module JAC.LSjj` ... a submodel of JAC that contains methods and (numerical) values for performing the jj-LS transformation of atomic
levels; this transformation is mainly based on global data lists which are only accessible within this module.
"""
module LSjj
using Printf, ..Angul... | [
198,
37811,
198,
63,
21412,
449,
2246,
13,
6561,
41098,
63,
220,
2644,
257,
850,
19849,
286,
449,
2246,
326,
4909,
5050,
290,
357,
77,
6975,
605,
8,
3815,
329,
9489,
262,
474,
73,
12,
6561,
13389,
286,
17226,
198,
220,
220,
220,
2... | 1.525769 | 92,398 |
<reponame>rpmuller/MolecularIntegrals.jl<filename>src/HGPold.jl
# HGPold contains older implementations of the HGP recurrence relations.
# These are no longer tested or linked to, and are kept here for reference
# purposes only.
#
# These functions implement recursive versions of the integral code,
# hence the trailing... | [
27,
7856,
261,
480,
29,
48235,
724,
263,
14,
44,
2305,
10440,
34500,
30691,
13,
20362,
27,
34345,
29,
10677,
14,
39,
16960,
727,
13,
20362,
198,
2,
367,
16960,
727,
4909,
4697,
25504,
286,
262,
367,
16960,
664,
33928,
2316,
13,
198,... | 1.488015 | 27,075 |
<gh_stars>0
# Autogenerated wrapper script for wrfuser_jll for aarch64-linux-musl-libgfortran4
export WRFUser
using CompilerSupportLibraries_jll
JLLWrappers.@generate_wrapper_header("wrfuser")
JLLWrappers.@declare_library_product(WRFUser, "wrfuser.so")
function __init__()
JLLWrappers.@generate_init_header(Compiler... | [
27,
456,
62,
30783,
29,
15,
198,
2,
5231,
519,
877,
515,
29908,
4226,
329,
1319,
69,
7220,
62,
73,
297,
329,
257,
998,
2414,
12,
23289,
12,
14664,
75,
12,
8019,
70,
3319,
2596,
19,
198,
39344,
11342,
37,
12982,
198,
198,
3500,
3... | 2.30837 | 227 |
using Documenter
using Twinkle, Twinkle.FlexUI
makedocs(
sitename = "Twinkle.jl",
format = Documenter.HTML(
# prettyurls = get(ENV, "CI", nothing) == "true",
assets = [asset("assets/TwinkleJulia.png", class = :ico, islocal = true)],
),
modules = [Twinkle],
pages = [
"Home" ... | [
198,
3500,
16854,
263,
198,
3500,
1815,
19894,
11,
1815,
19894,
13,
37,
2588,
10080,
198,
198,
76,
4335,
420,
82,
7,
198,
220,
220,
220,
1650,
12453,
796,
366,
5080,
19894,
13,
20362,
1600,
198,
220,
220,
220,
5794,
796,
16854,
263,... | 2.485955 | 356 |
function SelectionSort(x::AbstractVector)
for i = 1:length(x)
min = i
for j = i+1:length(x)
if x[j] < x[min]
min = j
end
end
temp = x[i]
x[i] = x[min]
x[min] = temp
end
return x
end
| [
8818,
29538,
42758,
7,
87,
3712,
23839,
38469,
8,
198,
220,
220,
220,
329,
1312,
796,
352,
25,
13664,
7,
87,
8,
198,
220,
220,
220,
220,
220,
220,
220,
949,
796,
1312,
628,
220,
220,
220,
220,
220,
220,
220,
329,
474,
796,
1312,... | 1.637931 | 174 |
using MathOptInterface
const MOI = MathOptInterface
const MOIT = MathOptInterface.Test
const MOIU = MathOptInterface.Utilities
const MOIB = MathOptInterface.Bridges
using Test
# It needs to be called first to trigger the crash.
include("issue980.jl")
# Tests for solvers are located in MOI.Test.
include("dummy.jl")
... | [
3500,
16320,
27871,
39317,
198,
9979,
13070,
40,
796,
16320,
27871,
39317,
198,
9979,
13070,
2043,
796,
16320,
27871,
39317,
13,
14402,
198,
9979,
13070,
44958,
796,
16320,
27871,
39317,
13,
18274,
2410,
198,
9979,
13070,
9865,
796,
16320,
... | 2.789644 | 309 |
<reponame>wentasah/julia<filename>base/iostream.jl<gh_stars>1000+
# This file is a part of Julia. License is MIT: https://julialang.org/license
## IOStream
const sizeof_ios_t = Int(ccall(:jl_sizeof_ios_t, Cint, ()))
"""
IOStream
A buffered IO stream wrapping an OS file descriptor.
Mostly used to represent files... | [
27,
7856,
261,
480,
29,
19963,
292,
993,
14,
73,
43640,
27,
34345,
29,
8692,
14,
72,
455,
1476,
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,
7... | 2.255105 | 7,836 |
################################################################################
# Planar and Radial Flows #
# Ref: Variational Inference with Normalizing Flows, #
# <NAME>, <NAME>(2015) arXiv:1505.05770 #
####... | [
29113,
29113,
14468,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5224,
283,
290,
5325,
498,
1610,
1666,
220,
220,
220,
220,
220,
... | 2.171649 | 1,940 |
ah1_file = path*"/SampleFiles/AH/ah1.f"
ah1_fstr = path*"/SampleFiles/AH/ah1.*"
ahc_file = path*"/SampleFiles/AH/lhz.ah"
ah_resp = path*"/SampleFiles/AH/BRV.TSG.DS.lE21.resp"
ah2_file = path*"/SampleFiles/AH/ah2.f"
ah2_fstr = path*"/SampleFiles/AH/ah2.*"
printstyled(" AH (Ad Hoc)\n", color=:light_green)
print... | [
993,
16,
62,
7753,
220,
796,
3108,
9,
1,
14,
36674,
25876,
14,
18429,
14,
993,
16,
13,
69,
1,
198,
993,
16,
62,
69,
2536,
220,
796,
3108,
9,
1,
14,
36674,
25876,
14,
18429,
14,
993,
16,
15885,
1,
198,
993,
66,
62,
7753,
220,... | 2.003982 | 1,758 |
# ---
# title: 867. Transpose Matrix
# id: problem867
# author: <NAME>
# date: 2020-10-31
# difficulty: Easy
# categories: Array
# link: <https://leetcode.com/problems/transpose-matrix/description/>
# hidden: true
# ---
#
# Given a matrix `A`, return the transpose of `A`.
#
# The transpose of a matrix is the matrix f... | [
2,
11420,
198,
2,
3670,
25,
807,
3134,
13,
3602,
3455,
24936,
198,
2,
4686,
25,
1917,
23,
3134,
198,
2,
1772,
25,
1279,
20608,
29,
198,
2,
3128,
25,
12131,
12,
940,
12,
3132,
198,
2,
8722,
25,
16789,
198,
2,
9376,
25,
15690,
1... | 2.116114 | 422 |
<reponame>yakir12/Interpolations.jl
using Interpolations, Test
@testset "LinearTests" begin
front(r::AbstractUnitRange) = first(r):last(r)-1
front(r::AbstractRange) = range(first(r), step=step(r), length=length(r)-1)
for D in (Constant, Linear)
## 1D
a = rand(5)
knots = (range(1, s... | [
27,
7856,
261,
480,
29,
88,
461,
343,
1065,
14,
9492,
16104,
602,
13,
20362,
198,
3500,
4225,
16104,
602,
11,
6208,
198,
198,
31,
9288,
2617,
366,
14993,
451,
51,
3558,
1,
2221,
198,
220,
220,
220,
2166,
7,
81,
3712,
23839,
26453,... | 1.732958 | 1,599 |
struct Sobol <: GSAMethod
order::Vector{Int}
nboot::Int
conf_level::Float64
end
Sobol(; order = [0, 1], nboot = 1, conf_level = 0.95) = Sobol(order, nboot, conf_level)
mutable struct SobolResult{T1, T2, T3, T4}
S1::T1
S1_Conf_Int::T2
S2::T3
S2_Conf_Int::T4
ST::T1
ST_Conf_Int::T2
end... | [
7249,
36884,
349,
1279,
25,
26681,
2390,
316,
2065,
198,
220,
220,
220,
1502,
3712,
38469,
90,
5317,
92,
198,
220,
220,
220,
299,
18769,
3712,
5317,
198,
220,
220,
220,
1013,
62,
5715,
3712,
43879,
2414,
198,
437,
198,
50,
672,
349,... | 1.571156 | 5,242 |
<filename>latex/lagos_2021/notebooks/Comparison_analysis.jl
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: jl:percent
# text_representation:
# extension: .jl
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Ju... | [
27,
34345,
29,
17660,
87,
14,
30909,
418,
62,
1238,
2481,
14,
11295,
12106,
14,
50249,
1653,
62,
20930,
13,
20362,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,... | 2.193087 | 5,381 |
"""
Block and braile rendering of julia arrays, for terminal graphics.
"""
module UnicodeGraphics
export blockize, brailize, blockize!, brailize!
"""
brailize(a, cutoff=0)
Convert an array to a block unicode string, filling values above the cutoff point.
"""
blockize(a, cutoff=0) = blockize!(initblock(size(a)), ... | [
37811,
198,
12235,
290,
8290,
576,
14837,
286,
474,
43640,
26515,
11,
329,
12094,
9382,
13,
198,
37811,
198,
21412,
34371,
18172,
198,
198,
39344,
2512,
1096,
11,
8290,
346,
1096,
11,
2512,
1096,
28265,
8290,
346,
1096,
0,
198,
198,
3... | 2.128462 | 1,300 |
<filename>src/v06/run_pd_background_05.jl
function show_args(args)
@show args
end
include("run_pd_hyak.jl")
datafile = "../../data/T1_Spitzer_data.jld2"
#foutput = "T1_pd_MCMC_run_05.jld2"
foutput = string("T1_pd_MCMC_run_001_",show_args(ARGS)[1],".jld2")
numwalkers = 50
burnin = 1
thinning = 10
astep = 2.0
nsteps... | [
27,
34345,
29,
10677,
14,
85,
3312,
14,
5143,
62,
30094,
62,
25249,
62,
2713,
13,
20362,
628,
198,
8818,
905,
62,
22046,
7,
22046,
8,
198,
220,
2488,
12860,
26498,
198,
437,
198,
198,
17256,
7203,
5143,
62,
30094,
62,
12114,
461,
... | 2.205263 | 190 |
using Primes
# 1d Cooley-Tukey FFTs, using an FFTW-like (version 1) approach: automatic
# generation of fixed-size FFT kernels (with and without twiddle factors)
# which are combined to make arbitrary-size FFTs (plus generic base
# cases for large prime factors).
######################################################... | [
3500,
1736,
999,
198,
198,
2,
352,
67,
1766,
48437,
12,
47247,
2539,
376,
9792,
82,
11,
1262,
281,
376,
9792,
54,
12,
2339,
357,
9641,
352,
8,
3164,
25,
11353,
198,
2,
5270,
286,
5969,
12,
7857,
376,
9792,
50207,
357,
4480,
290,
... | 1.985882 | 11,475 |
<filename>test/rest.jl<gh_stars>100-1000
@testset "REST API" begin
@testset "Direct endpoint wrapper" begin
# Direct endpoint wrappers should return a Future.
f = get_channel_message(c, 123, 456)
@test f isa Future
# Since we don't have a valid token, we shouldn't get anything.
... | [
27,
34345,
29,
9288,
14,
2118,
13,
20362,
27,
456,
62,
30783,
29,
3064,
12,
12825,
198,
31,
9288,
2617,
366,
49,
6465,
7824,
1,
2221,
198,
220,
220,
220,
2488,
9288,
2617,
366,
13470,
36123,
29908,
1,
2221,
198,
220,
220,
220,
220... | 2.278128 | 1,111 |
<filename>Ahorn/triggers/spawnJellyTrigger.jl<gh_stars>0
module YetAnotherHelperSpawnJellyTrigger
using ..Ahorn, Maple
@mapdef Trigger "YetAnotherHelper/SpawnJellyTrigger" SpawnJellyTrigger(x::Integer, y::Integer, width::Integer=Maple.defaultTriggerWidth, height::Integer=Maple.defaultTriggerHeight, onlyOnce::Bool=tr... | [
27,
34345,
29,
10910,
1211,
14,
2213,
328,
5355,
14,
48183,
41,
6148,
48344,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
171,
119,
123,
21412,
6430,
6610,
47429,
49855,
41,
6148,
48344,
198,
198,
3500,
11485,
10910,
1211,
11,
21249,
... | 2.859649 | 171 |
<reponame>JuliaAstrodynamics/Orekit.jl
function TurnAroundRangeIonosphericDelayModifier(arg0::IonosphericModel, arg1::jdouble)
return TurnAroundRangeIonosphericDelayModifier((IonosphericModel, jdouble), arg0, arg1)
end
function get_parameters_drivers(obj::TurnAroundRangeIonosphericDelayModifier)
return jcall(o... | [
27,
7856,
261,
480,
29,
16980,
544,
33751,
14892,
4989,
873,
14,
41543,
15813,
13,
20362,
198,
8818,
6756,
24472,
17257,
40,
261,
2117,
15011,
13856,
323,
5841,
7483,
7,
853,
15,
3712,
40,
261,
2117,
15011,
17633,
11,
1822,
16,
3712,
... | 2.927778 | 180 |
mutable struct DecisionChannel{A <: AbstractArray} <: AbstractChannel{A}
decisions::Dict{Int,A}
cond_take::Condition
DecisionChannel(decisions::Dict{Int,A}) where A <: AbstractArray = new{A}(decisions, Condition())
end
function put!(channel::DecisionChannel, t, x)
channel.decisions[t] = copy(x)
not... | [
76,
18187,
2878,
26423,
29239,
90,
32,
1279,
25,
27741,
19182,
92,
1279,
25,
27741,
29239,
90,
32,
92,
198,
220,
220,
220,
5370,
3712,
35,
713,
90,
5317,
11,
32,
92,
198,
220,
220,
220,
1779,
62,
20657,
3712,
48362,
198,
220,
220,... | 2.750769 | 325 |
using DataFrames
"""
LabelEncoder()
LabelEncoder structure. `LE(label; count=false, decode=false)` Convert labels(like string) to class numbers(encode), and convert class numbers to labels(decode).
# Example
```jldoctest
julia> label = ["Apple", "Apple", "Pear", "Pear", "Lemon", "Apple", "Pear", "Lemon"]
8-elemen... | [
3500,
6060,
35439,
198,
198,
37811,
198,
220,
220,
220,
36052,
27195,
12342,
3419,
198,
33986,
27195,
12342,
4645,
13,
4600,
2538,
7,
18242,
26,
954,
28,
9562,
11,
36899,
28,
9562,
8,
63,
38240,
14722,
7,
2339,
4731,
8,
284,
1398,
3... | 1.879699 | 2,128 |
const DATA_SESSION = typedb.protocol.Session_Type.DATA
const SCHEMA_SESSION = typedb.protocol.Session_Type.SCHEMA
function dbconnect(f::Base.Callable, host::AbstractString, port::Int = 1729)
client = CoreClient(host)
try
f(client)
finally
# close(client)
end
end
function Base.open(
... | [
9979,
42865,
62,
50,
47621,
796,
25683,
65,
13,
11235,
4668,
13,
36044,
62,
6030,
13,
26947,
198,
9979,
22374,
27630,
62,
50,
47621,
796,
25683,
65,
13,
11235,
4668,
13,
36044,
62,
6030,
13,
50,
3398,
27630,
198,
198,
8818,
20613,
8... | 2.621505 | 465 |
<filename>src/rgbtypes.jl
# AbstractRGB
abstract type AbstractStorageRGB{T, fr, fg, fb, en} <: AbstractRGB{T} end
const AbstractRGB16{en} = Union{
AbstractStorageRGB{N0f8, 5, 6, 5, en},
AbstractStorageRGB{N0f8, 5, 5, 5, en},
AbstractStorageRGB{N0f8, 4, 4, 4, en}}
"""
RGB565LE
A 16-bit RGB type with... | [
27,
34345,
29,
10677,
14,
81,
22296,
19199,
13,
20362,
198,
198,
2,
27741,
36982,
198,
198,
397,
8709,
2099,
27741,
31425,
36982,
90,
51,
11,
1216,
11,
277,
70,
11,
277,
65,
11,
551,
92,
1279,
25,
27741,
36982,
90,
51,
92,
886,
... | 2.140742 | 4,526 |
function reset_seed(seed)
Random.seed!(seed)
end
function basetype_string(set::LazySet)
return string(basetype(set))
end
function flatten_dyn(dyn)
return dyn.A(), dyn.b()
end
function flatten_dyn(dyn::AffDyn)
return dyn.A, dyn.b
end
function flatten_Interval(I)
I = convert(Interval, I)
retur... | [
8818,
13259,
62,
28826,
7,
28826,
8,
198,
220,
220,
220,
14534,
13,
28826,
0,
7,
28826,
8,
198,
437,
198,
198,
8818,
1615,
2963,
431,
62,
8841,
7,
2617,
3712,
43,
12582,
7248,
8,
198,
220,
220,
220,
1441,
4731,
7,
12093,
2963,
4... | 2.19612 | 2,371 |
export TimelessInstantModel
"""
abstract type TimelessInstantModel{I,O} <: InstantModel{I,O}
An InstantModel in which the sfunc made does not depend on time.
Must implement a version of `make_initial` that does not take the current time as argument.
Note that `make_initial` can be defined to take keyword argume... | [
198,
198,
39344,
5045,
5321,
49933,
17633,
198,
198,
37811,
198,
220,
220,
220,
12531,
2099,
5045,
5321,
49933,
17633,
90,
40,
11,
46,
92,
1279,
25,
24470,
17633,
90,
40,
11,
46,
92,
198,
198,
2025,
24470,
17633,
287,
543,
262,
264,... | 3.425806 | 155 |
# -*- coding: utf-8 -*-
# + {}
module Transformations
import Base: ∘, show, convert, promote, one, zero, inv, *, ^, -
using SemanticModels
using SemanticModels.ExprModels.Parsers
export Transformation, ConcatTransformation, Product, Pow
postwalk(f, x) = walk(x, x -> postwalk(f, x), f)
abstract type Transformation ... | [
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
1343,
23884,
198,
21412,
26981,
602,
198,
11748,
7308,
25,
18872,
246,
11,
905,
11,
10385,
11,
7719,
11,
530,
11,
6632,
11,
800,
11,
1635,
11,
10563,
11,
532... | 2.682179 | 881 |
function init_pseudo_observable_mappings!(m::Model1002)
pseudo_names = [:y_t, :y_f_t, :NaturalRate, :π_t, :OutputGap, :ExAnteRealRate, :LongRunInflation,
:MarginalCost, :Wages, :FlexibleWages, :Hours, :FlexibleHours, :z_t,
:Expected10YearRateGap, :NominalFFR, :Expected10Year... | [
8818,
2315,
62,
7752,
12003,
62,
672,
3168,
540,
62,
76,
39242,
0,
7,
76,
3712,
17633,
3064,
17,
8,
628,
220,
220,
220,
24543,
62,
14933,
796,
685,
25,
88,
62,
83,
11,
1058,
88,
62,
69,
62,
83,
11,
1058,
35364,
32184,
11,
1058... | 2.240853 | 2,815 |
using Test
using MPI: mpiexec
# run tests on Travis CI in parallel
const TRIXI_TEST = get(ENV, "TRIXI_TEST", "all")
const TRIXI_MPI_NPROCS = clamp(Sys.CPU_THREADS, 2, 3)
const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3)
@time @testset "Trixi.jl tests" begin
# This is placed first since tests error out otherwise... | [
3500,
6208,
198,
3500,
4904,
40,
25,
285,
21749,
87,
721,
198,
198,
2,
1057,
5254,
319,
19804,
14514,
287,
10730,
198,
9979,
37679,
55,
40,
62,
51,
6465,
796,
651,
7,
1677,
53,
11,
366,
5446,
10426,
40,
62,
51,
6465,
1600,
366,
... | 2.352427 | 1,030 |
# This file is a part of Julia. License is MIT: https://julialang.org/license
module TestAdjointTranspose
using Test, LinearAlgebra, SparseArrays
@testset "Adjoint and Transpose inner constructor basics" begin
intvec, intmat = [1, 2], [1 2; 3 4]
# Adjoint/Transpose eltype must match the type of the Adjoint/T... | [
2,
770,
2393,
318,
257,
636,
286,
22300,
13,
13789,
318,
17168,
25,
3740,
1378,
73,
377,
498,
648,
13,
2398,
14,
43085,
198,
198,
21412,
6208,
2782,
73,
1563,
8291,
3455,
198,
198,
3500,
6208,
11,
44800,
2348,
29230,
11,
1338,
17208... | 2.431054 | 12,604 |
# # Creating supercells with pymatgen
#
# The [Pymatgen](https://pymatgen.org/) python library allows to setup
# solid-state calculations using a flexible set of classes as well as an API
# to an online data base of structures. Its `Structure` and `Lattice`
# objects are directly supported by the DFTK `load_atoms` and ... | [
2,
1303,
30481,
2208,
46342,
351,
279,
4948,
265,
5235,
198,
2,
198,
2,
383,
685,
47,
4948,
265,
5235,
16151,
5450,
1378,
79,
4948,
265,
5235,
13,
2398,
34729,
21015,
5888,
3578,
284,
9058,
198,
2,
4735,
12,
5219,
16765,
1262,
257,
... | 2.831094 | 521 |
<reponame>jayren3996/FiniteGroups.jl<filename>src/ProjReps.jl
export proj_reps, cover_group, check_proj_coeff
"""
proj_reps(g, coeff, p; R, tol)
Calculate the projective representation of `g` with coefficients `coeff`.
Inputs:
-------
g : Finite group object.
coeff : Coefficients represented by an integer mat... | [
27,
7856,
261,
480,
29,
33708,
918,
28771,
21,
14,
37,
9504,
38,
14459,
13,
20362,
27,
34345,
29,
10677,
14,
2964,
73,
6207,
82,
13,
20362,
198,
39344,
386,
73,
62,
260,
862,
11,
3002,
62,
8094,
11,
2198,
62,
1676,
73,
62,
1073,... | 2.187707 | 2,115 |
<reponame>UnofficialJuliaMirror/CategoricalArrays.jl-324d7699-5711-5eae-9e2f-1d82baa6b597
function buildindex(invindex::Dict{S, R}) where {S, R <: Integer}
index = Vector{S}(undef, length(invindex))
for (v, i) in invindex
index[i] = v
end
return index
end
function buildinvindex(index::Vector{T}... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
14,
34,
2397,
12409,
3163,
20477,
13,
20362,
12,
33916,
67,
4304,
2079,
12,
3553,
1157,
12,
20,
68,
3609,
12,
24,
68,
17,
69,
12,
16,
67,
6469,
7012,
64,
21,
65,
4323... | 2.210526 | 570 |
function _JBox(
cornerpoint1::Point,
cornerpoint2::Point,
color,
action::Symbol,
vertices::Bool,
)
sethue(color)
verts = box(cornerpoint1, cornerpoint2, action, vertices = vertices)
return verts[2]
end
function _JBox(points::Array, color, action::Symbol, vertices::Bool)
sethue(color)... | [
8818,
4808,
41,
14253,
7,
198,
220,
220,
220,
5228,
4122,
16,
3712,
12727,
11,
198,
220,
220,
220,
5228,
4122,
17,
3712,
12727,
11,
198,
220,
220,
220,
3124,
11,
198,
220,
220,
220,
2223,
3712,
13940,
23650,
11,
198,
220,
220,
220... | 2.567873 | 1,326 |
<reponame>UnofficialJuliaMirror/LowRankModels.jl-15d4e49f-4837-5ea3-a885-5b28bfa376dc
using DataFrames, LowRankModels
# boolean example with only entries greater than threshold t observed
# ie, censored data
# example with only entries greater than threshold t observed
m,n,k,ktrue = 100,100,1,1
A = rand(m,ktrue)*rand(... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
14,
20535,
27520,
5841,
1424,
13,
20362,
12,
1314,
67,
19,
68,
2920,
69,
12,
2780,
2718,
12,
20,
18213,
18,
12,
64,
44230,
12,
20,
65,
2078,
65,
13331,
32128,
17896,
19... | 2.333882 | 608 |
<filename>test/ignore.jl
s = """
declared_elsewhere
"""
msgs = lintstr(s, LintContext("none", ignore=[LintIgnore(:E321, "declared_elsewhere")]))
@test isempty(msgs)
| [
27,
34345,
29,
9288,
14,
46430,
13,
20362,
198,
82,
796,
37227,
198,
32446,
1144,
62,
17772,
3003,
198,
37811,
198,
907,
14542,
796,
300,
600,
2536,
7,
82,
11,
406,
600,
21947,
7203,
23108,
1600,
8856,
41888,
43,
600,
32916,
382,
7,... | 2.5 | 66 |
using BinaryBuilder, Pkg.Artifacts
include("../common.jl")
name = "MegaRust"
version = v"1.18.3"
sources = [
# TODO: Switch to musl once https://github.com/rust-lang/rustup.rs/pull/1882 is released
"https://static.rust-lang.org/rustup/archive/$(version)/x86_64-unknown-linux-gnu/rustup-init" =>
"a46fe6719... | [
3500,
45755,
32875,
11,
350,
10025,
13,
8001,
37199,
198,
198,
17256,
7203,
40720,
11321,
13,
20362,
4943,
198,
198,
3672,
796,
366,
43471,
49444,
1,
198,
9641,
796,
410,
1,
16,
13,
1507,
13,
18,
1,
198,
198,
82,
2203,
796,
685,
1... | 2.549172 | 2,054 |
<filename>src/Ditherings.jl<gh_stars>0
module Ditherings
using Images
export Quantise
export ZeroOne
export ZeroOne_PerChannel
export FloydSteinbergDither4Sample
export FloydSteinbergDither12Sample
function Quantise(pixel)
shift = 4
scale = 255.0
r = Int64.(round(scale * (red(pixel) )))>>shift
g = I... | [
27,
34345,
29,
10677,
14,
35,
1555,
654,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
198,
21412,
360,
1555,
654,
198,
198,
3500,
5382,
198,
39344,
16972,
786,
198,
39344,
12169,
3198,
198,
39344,
12169,
3198,
62,
5990,
29239,
198,
3... | 1.862876 | 2,392 |
using JuMP, Cbc
"""
kantorovich_distance(ν, μ)
Calculate the kantorovich distance between two probability distributions.
Thanks to this [hero] (https://stla.github.io/stlapblog/posts/KantorovichWithJulia.html)
```jldoctest
julia> mu = [1/7, 2/7, 4/7];
julia> nu = [1/4, 1/4, 1/2];
julia> kantorovich_distance(mu,... | [
3500,
12585,
7378,
11,
327,
15630,
198,
198,
37811,
198,
220,
220,
220,
479,
415,
273,
18198,
62,
30246,
7,
26180,
11,
18919,
8,
198,
198,
9771,
3129,
378,
262,
479,
415,
273,
18198,
5253,
1022,
734,
12867,
24570,
13,
198,
198,
9690... | 2.078717 | 343 |
# Autogenerated wrapper script for MMseqs2_jll for powerpc64le-linux-gnu-cxx03
export mmseqs
using CompilerSupportLibraries_jll
using Zlib_jll
using Bzip2_jll
JLLWrappers.@generate_wrapper_header("MMseqs2")
JLLWrappers.@declare_executable_product(mmseqs)
function __init__()
JLLWrappers.@generate_init_header(Compil... | [
2,
5231,
519,
877,
515,
29908,
4226,
329,
20806,
41068,
82,
17,
62,
73,
297,
329,
1176,
14751,
2414,
293,
12,
23289,
12,
41791,
12,
66,
5324,
3070,
198,
39344,
8085,
41068,
82,
198,
198,
3500,
3082,
5329,
15514,
43,
11127,
62,
73,
... | 2.33945 | 218 |
module SIWPD
export
siwpd,
makesiwpdtree
using
Wavelets
using
..Utils,
..DWT
"""
siwpd(x, wt[, L=maxtransformlevels(x), d=L])
Computes the Shift-Invariant Wavelet Packet Decomposition originally developed
by Cohen, Raz & Malah on the vector `x` using the discrete wavelet filter `wt`
for ... | [
21412,
25861,
54,
5760,
198,
39344,
220,
220,
198,
220,
220,
220,
264,
14246,
30094,
11,
198,
220,
220,
220,
1838,
14246,
30094,
21048,
198,
198,
3500,
220,
198,
220,
220,
220,
17084,
5289,
198,
198,
3500,
220,
198,
220,
220,
220,
1... | 2.050847 | 2,242 |
<gh_stars>1-10
# Some passes for assigning node affinity.
#
# This applies heuristics to nodes like `Broadcast` and `Result` to schedule them in more
# sensible locations
# A follower node is one that should be scheduled as soon as possible
const FOLLOWERS = [
"Result",
"Sum",
"Add",
"Subtract",
"M... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
2773,
8318,
329,
38875,
10139,
28430,
13,
198,
2,
198,
2,
770,
8991,
339,
333,
3969,
284,
13760,
588,
4600,
30507,
2701,
63,
290,
4600,
23004,
63,
284,
7269,
606,
287,
517,
198,
2,
20... | 2.701981 | 1,161 |
<gh_stars>1-10
# TODO: add projected boundary condition for grid estimator?
function isboundarycondition(bc, method::String)
if method == "grid"
bc ∈ ["circular", "random"]
elseif method ∈ ["triangulation"]
bc ∈ ["circular", "random"]
else
error("method $method not defined")
end... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
198,
2,
16926,
46,
25,
751,
13301,
18645,
4006,
329,
10706,
3959,
1352,
30,
198,
8818,
318,
7784,
560,
31448,
7,
15630,
11,
2446,
3712,
10100,
8,
198,
220,
220,
220,
611,
2446,
6624,
366,
... | 2.612903 | 124 |
packages = [
let (name, version) = split(line)
(name, VersionNumber(version))
end
for line in split(strip(read("REQUIRE", String)), '\n')[2:end]
]
for (name, version) in packages
info("Pkg.add($name)")
Pkg.add(name) # to make the following work
end
names = map(first, packages)
info("Pkg.fr... | [
43789,
796,
685,
198,
220,
220,
220,
1309,
357,
3672,
11,
2196,
8,
796,
6626,
7,
1370,
8,
198,
220,
220,
220,
220,
220,
220,
220,
357,
3672,
11,
10628,
15057,
7,
9641,
4008,
198,
220,
220,
220,
886,
198,
220,
220,
220,
329,
1627... | 2.478088 | 251 |
<reponame>ianshmean/PackageCompiler.jl<gh_stars>0
module PackageCompiler
using Base: active_project
using Libdl: Libdl
using Pkg: Pkg
using LazyArtifacts
using UUIDs: UUID, uuid1
export create_sysimage, create_app, create_library, audit_app, restore_default_sysimage
include("juliaconfig.jl")
const NATIVE_CPU_TARGET... | [
27,
7856,
261,
480,
29,
1547,
71,
32604,
14,
27813,
7293,
5329,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
21412,
15717,
7293,
5329,
198,
198,
3500,
7308,
25,
4075,
62,
16302,
198,
3500,
7980,
25404,
25,
7980,
25404,
198,
3500,
350... | 2.278388 | 19,577 |
<gh_stars>0
###
### mappedarray
###
function MappedArrays.mappedarray(f, data::NamedDimsArray{L}) where {L}
return NamedDimsArray{L}(mappedarray(f, parent(data)))
end
function MappedArrays.mappedarray(::Type{T}, data::NamedDimsArray{L}) where {T,L}
return NamedDimsArray{L}(mappedarray(T, parent(data)))
end
... | [
27,
456,
62,
30783,
29,
15,
628,
198,
21017,
198,
21017,
27661,
18747,
198,
21017,
198,
8818,
337,
6320,
3163,
20477,
13,
76,
6320,
18747,
7,
69,
11,
1366,
3712,
45,
2434,
35,
12078,
19182,
90,
43,
30072,
810,
1391,
43,
92,
198,
2... | 2.257949 | 4,749 |
<filename>data/z-list.jl
include("loaders.jl")
export ir_load_brainweb_t1_256
| [
27,
34345,
29,
7890,
14,
89,
12,
4868,
13,
20362,
198,
17256,
7203,
2220,
364,
13,
20362,
4943,
198,
198,
39344,
4173,
62,
2220,
62,
27825,
12384,
62,
83,
16,
62,
11645,
198
] | 2.393939 | 33 |
<filename>src/defaultattributes.jl
function default_attributes(::Type{LAxis})
Attributes(
xlabel = "x label",
ylabel = "y label",
title = "Title",
titlefont = "DejaVu Sans",
titlesize = 30f0,
titlegap = 10f0,
titlevisible = true,
titlealign = :center,
... | [
27,
34345,
29,
10677,
14,
12286,
1078,
7657,
13,
20362,
198,
8818,
4277,
62,
1078,
7657,
7,
3712,
6030,
90,
13534,
87,
271,
30072,
198,
220,
220,
220,
49213,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
18242,
796,
366,
87,
61... | 1.957942 | 4,684 |
#=move_user_drop.jl - > drops the piece at the coordinates
given. accepts 4 command line argument,<filename> => database <piece> => piece
<xtarget> => xTarget <ytarget> => yTarget
=#
#include("square.jl")
include("dParse.jl")
module move_user_drop
#using ST
using SQLite
function drop(database,pieceToDrop,xTarget,yTarg... | [
2,
28,
21084,
62,
7220,
62,
14781,
13,
20362,
532,
1875,
10532,
262,
3704,
379,
262,
22715,
198,
35569,
13,
18178,
604,
3141,
1627,
4578,
11,
27,
34345,
29,
5218,
6831,
1279,
12239,
29,
5218,
3704,
198,
27,
742,
7641,
29,
5218,
2124... | 2.747994 | 623 |
import Compat: ∘ # FIXME remove in v0.6
using ArgCheck
using Parameters
export crra_u, CrraUtility, crra_u′
"""
CRRA/isoelastic utility, with risk aversion parameter `σ`.
"""
@inline function crra_u(c, σ)
omσ = one(σ) - σ
omσ == zero(omσ) ? log(c) : (c^omσ - 1)/omσ
end
"""
CRRA/isoelastic util... | [
11748,
3082,
265,
25,
18872,
246,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
44855,
11682,
4781,
287,
410,
15,
13,
21,
198,
3500,
20559,
9787,
198,
3500,
40117,
198,
198,
39344,
1067,
430,
62,
... | 2.476048 | 334 |
<gh_stars>0
include("./helpers.jl")
include("./WorkspaceManager.jl")
include("./RichOutput.jl")
include("./React.jl")
include("./ExpressionExplorer.jl")
include("./Dynamic.jl")
include("./MethodSignatures.jl")
include("./Notebook.jl")
include("./Configuration.jl")
include("./Analysis.jl")
include("./Firebasey.jl")
incl... | [
27,
456,
62,
30783,
29,
15,
198,
17256,
7,
1911,
14,
16794,
364,
13,
20362,
4943,
198,
17256,
7,
1911,
14,
23044,
10223,
13511,
13,
20362,
4943,
198,
17256,
7,
1911,
14,
14868,
26410,
13,
20362,
4943,
198,
17256,
7,
1911,
14,
3041,
... | 3.036145 | 249 |
abstract type Kroki <: ShortCode end
function Base.show(io::IO, ::MIME"text/plain", kroki::Kroki)
print(io, kroki.text * "\n" * kroki(kroki.text, lowercase(String(nameof(typeof(kroki)))), "svg"))
end
function Base.show(io::IO, ::MIME"image/svg+xml", kroki::Kroki)
write(io, fetch_kroki(kroki.text, lowercase(St... | [
397,
8709,
2099,
30088,
4106,
1279,
25,
10073,
10669,
886,
198,
198,
8818,
7308,
13,
12860,
7,
952,
3712,
9399,
11,
7904,
44,
12789,
1,
5239,
14,
25638,
1600,
479,
305,
4106,
3712,
42,
305,
4106,
8,
198,
220,
220,
220,
3601,
7,
95... | 2.447964 | 442 |
mutable struct MatrixNetwork{T}
n::Int64 # number of columns/rows
rp::Vector{Int64} # row pointers
ci::Vector{Int64} # column indices
vals::Vector{T} # corresponding values
end
function MatrixNetwork(A::SparseMatrixCSC{T,Int64}) where T
At = copy(A')
return MatrixNetwork(size(At,2),At.colptr,At... | [
76,
18187,
2878,
24936,
26245,
90,
51,
92,
198,
220,
220,
220,
299,
3712,
5317,
2414,
1303,
1271,
286,
15180,
14,
8516,
198,
220,
220,
220,
374,
79,
3712,
38469,
90,
5317,
2414,
92,
1303,
5752,
32007,
198,
220,
220,
220,
269,
72,
... | 2.390698 | 2,795 |
struct Colors
RED::ST0
GREEN::ST1
BLUE::ST2
end
RED = auto()
GREEN = auto()
BLUE = auto()
struct Permissions
R::ST0
W::ST1
X::ST2
end
R = 1
W = 2
X = 16
| [
198,
7249,
29792,
198,
220,
220,
220,
23848,
3712,
2257,
15,
198,
220,
220,
220,
47606,
3712,
2257,
16,
198,
220,
220,
220,
9878,
8924,
3712,
2257,
17,
198,
437,
198,
198,
22083,
796,
8295,
3419,
198,
43016,
796,
8295,
3419,
198,
91... | 1.978022 | 91 |
<gh_stars>10-100
# testing discretization procedures
# example is based on <NAME> "Orthogonal Polynomials: Computation and Approximation"
# examples 2.36
using PolyChaos, Test, StaticArrays
import LinearAlgebra: norm
nodes = [40, 80, 160, 320]
tol = 1e-14
@testset "Stieltjes procedure" begin
for n in nodes
... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
2,
4856,
1221,
1186,
1634,
9021,
198,
2,
1672,
318,
1912,
319,
1279,
20608,
29,
366,
5574,
400,
519,
20996,
12280,
26601,
8231,
25,
22476,
341,
290,
2034,
13907,
18991,
1,
198,
2,
6096,
... | 2.189964 | 558 |
<reponame>theogf/Distributions.jl<filename>src/univariate/continuous/inversegaussian.jl<gh_stars>0
"""
InverseGaussian(μ,λ)
The *inverse Gaussian distribution* with mean `μ` and shape `λ` has probability density function
```math
f(x; \\mu, \\lambda) = \\sqrt{\\frac{\\lambda}{2\\pi x^3}}
\\exp\\!\\left(\\frac{-\\l... | [
27,
7856,
261,
480,
29,
1169,
519,
69,
14,
20344,
2455,
507,
13,
20362,
27,
34345,
29,
10677,
14,
403,
42524,
14,
18487,
5623,
14,
259,
4399,
4908,
31562,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
37811,
198,
220,
220,
220,
554,... | 2.19161 | 2,646 |
<reponame>jw3126/PhaseSpaceIO<filename>src/common.jl<gh_stars>1-10
export ParticleType
export photon, electron, positron, neutron, proton
@enum ParticleType photon=1 electron=2 positron=3 neutron=4 proton=5
for pt in instances(ParticleType)
fname = Symbol("is", pt)
@eval $fname(p) = p.typ == $pt
eval(Expr... | [
27,
7856,
261,
480,
29,
73,
86,
18,
19420,
14,
35645,
14106,
9399,
27,
34345,
29,
10677,
14,
11321,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
39344,
2142,
1548,
6030,
198,
39344,
48190,
11,
11538,
11,
46436,
1313,
11,
4... | 2.073501 | 517 |
<reponame>matthieugomez/PDEModels.jl
using EconPDEs, Distributions
Base.@kwdef mutable struct DiTellaModel
# Utility Function
γ::Float64 = 5.0
ψ::Float64 = 1.5
ρ::Float64 = 0.05
τ::Float64 = 0.4
# Technology
A::Float64 = 200.0
σ::Float64 = 0.03
# MoralHazard
ϕ::Float64 = 0.2
# Idiosyncratic
... | [
27,
7856,
261,
480,
29,
6759,
400,
494,
1018,
30010,
14,
5760,
3620,
375,
1424,
13,
20362,
198,
3500,
412,
1102,
5760,
23041,
11,
46567,
507,
198,
198,
14881,
13,
31,
46265,
4299,
4517,
540,
2878,
6031,
51,
12627,
17633,
198,
220,
1... | 1.696223 | 1,827 |
# export test_adjacency, test_laplacian, test_accessors, test_arithmetic, test_other
using ArnoldiMethod
@testset "Graph matrices" begin
function converttest(T::Type, var)
@test typeof(T(var)) == T
end
function constructors(mat)
adjmat = CombinatorialAdjacency(mat)
stochmat = Stoch... | [
2,
10784,
1332,
62,
324,
30482,
1387,
11,
1332,
62,
5031,
489,
330,
666,
11,
1332,
62,
15526,
669,
11,
1332,
62,
283,
29848,
11,
1332,
62,
847,
198,
3500,
21418,
72,
17410,
198,
198,
31,
9288,
2617,
366,
37065,
2603,
45977,
1,
222... | 2.088744 | 4,282 |
# Autogenerated wrapper script for libpolymake_julia_jll for i686-linux-gnu-cxx03-julia_version+1.7.0
export appsjson, libpolymake_julia, polymake_run_script, type_translator
using CompilerSupportLibraries_jll
using FLINT_jll
using TOPCOM_jll
using lib4ti2_jll
using libcxxwrap_julia_jll
using polymake_jll
JLLWrappers.... | [
2,
5231,
519,
877,
515,
29908,
4226,
329,
9195,
35428,
15883,
62,
73,
43640,
62,
73,
297,
329,
1312,
33808,
12,
23289,
12,
41791,
12,
66,
5324,
3070,
12,
73,
43640,
62,
9641,
10,
16,
13,
22,
13,
15,
198,
39344,
6725,
17752,
11,
... | 2.299824 | 567 |
#!/usr/bin/env julia
# rfweights create weights for RainFARM downscaling
# RainFARM
# Stochastic downscaling following
# D'Onofrio et al. 2014, J of Hydrometeorology 15 , 830-843 and
# Rebora et. al 2006, JHM 7, 724
# Includes orographic corrections
# Implementation in Julia language
# Copyright (c) 2016, <NAME> ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
474,
43640,
198,
198,
2,
374,
69,
43775,
2251,
19590,
329,
10301,
37,
33456,
866,
1416,
4272,
198,
198,
2,
10301,
37,
33456,
220,
198,
2,
520,
5374,
3477,
866,
1416,
4272,
1708,
220,
198,
2,
3... | 2.075356 | 1,964 |
<reponame>baajur/Mocha.jl
export split_dims
# Split the dimension of a ND-tensor into 3 parts:
# (dim_pre, dim_mid, dim_post)
function split_dims{T}(tensor::T, dim::Int)
dims = size(tensor)
dim_pre ::Int = prod(dims[1:dim-1])
dim_mid ::Int = dims[dim]
dim_post ::Int = prod(dims[dim+1:end])
(dim_pre, dim... | [
27,
7856,
261,
480,
29,
7012,
1228,
333,
14,
44,
5374,
64,
13,
20362,
198,
39344,
6626,
62,
67,
12078,
198,
198,
2,
27758,
262,
15793,
286,
257,
25524,
12,
83,
22854,
656,
513,
3354,
25,
198,
2,
220,
220,
357,
27740,
62,
3866,
1... | 2.222222 | 153 |
using AirfoilDatabase
using Test
@testset "query" begin
sd7003 = query_airfoil("7003")
@test length(sd7003) == 1
@test sd7003[1].name == "SD7003"
sc2 = query_airfoil("NASA SC2")
@test length(sc2) > 1
end
@testset "NACA" begin
n0012 = query_airfoil("N0012")
@test length(n0012) == 1
x = ... | [
3500,
3701,
6513,
346,
38105,
198,
3500,
6208,
198,
31,
9288,
2617,
366,
22766,
1,
2221,
198,
220,
220,
220,
45647,
9879,
18,
796,
12405,
62,
958,
6513,
346,
7203,
9879,
18,
4943,
198,
220,
220,
220,
2488,
9288,
4129,
7,
21282,
9879... | 1.882927 | 410 |
push!(LOAD_PATH, joinpath(@__DIR__, "..")) # add Oceananigans to environment stack
using Documenter
using DocumenterCitations
using Literate
using Plots # to avoid capturing precompilation output by Literate
using Oceananigans
using Oceananigans.Operators
using Oceananigans.Grids
using Oceananigans.Diagnostics
using... | [
14689,
0,
7,
35613,
62,
34219,
11,
4654,
6978,
7,
31,
834,
34720,
834,
11,
366,
492,
48774,
1303,
751,
10692,
272,
34090,
284,
2858,
8931,
198,
198,
3500,
16854,
263,
198,
3500,
16854,
263,
34,
20597,
198,
3500,
17667,
378,
198,
350... | 2.603569 | 2,578 |
# See documentation for JProxy for infomation
# TODO argtypefor(J.classforlegalname("[I")) returns Array{JavaCall.java_lang,1}
# use sigtypes[class] to get primitive type
#
# TODO -- types' keys should probably be strings, not symbols
#
#
# TODO switch from method.dynArgTypes to method.argTypes to allow full Jul... | [
2,
4091,
10314,
329,
449,
44148,
329,
1167,
296,
341,
198,
198,
2,
16926,
46,
1822,
4906,
1640,
7,
41,
13,
4871,
1640,
18011,
3672,
7203,
58,
40,
48774,
5860,
15690,
90,
29584,
14134,
13,
12355,
62,
17204,
11,
16,
92,
198,
2,
220,... | 2.382653 | 25,284 |
using RoadRunner
using Test
ant_str = """
S1 -> S2; k1*S1;
k1 = 0.1; S1 = 10; S2 = 2.5
"""
rr = RoadRunner.loada(ant_str)
@testset "compartment" begin
@test RoadRunner.getNumberOfCompartments(rr) == 1
end
@testset "reaction" begin
@test RoadRunner.getNumberOfReactions(rr) == 1
@test RoadRunner.... | [
3500,
5567,
49493,
198,
3500,
6208,
628,
198,
415,
62,
2536,
796,
37227,
198,
220,
220,
220,
311,
16,
4613,
311,
17,
26,
479,
16,
9,
50,
16,
26,
198,
220,
220,
220,
479,
16,
796,
657,
13,
16,
26,
311,
16,
796,
838,
26,
311,
... | 2.54703 | 404 |
<reponame>kozvojtex/JsonGrinder.jl
using Documenter
using JsonGrinder
DocMeta.setdocmeta!(JsonGrinder, :DocTestSetup, :(using JsonGrinder); recursive=true)
# for running only doctests
# doctest(JsonGrinder)
makedocs(
sitename = "JsonGrinder.jl",
# doctest = false,
format = Documenter.HTML(si... | [
27,
7856,
261,
480,
29,
7204,
89,
13038,
73,
16886,
14,
41,
1559,
8642,
5540,
13,
20362,
198,
3500,
16854,
263,
198,
3500,
449,
1559,
8642,
5540,
198,
198,
23579,
48526,
13,
2617,
15390,
28961,
0,
7,
41,
1559,
8642,
5540,
11,
1058,
... | 1.886239 | 545 |
#
# This file is a part of MolecularGraph.jl
# Licensed under the MIT License http://opensource.org/licenses/MIT
#
@testset "graph.plainhypergraph" begin
g = plainhypergraph(6, [Set([1, 2, 3, 4]), Set([1, 4, 5]), Set([6])])
@test issetequal(neighbors(g, 4)[2], [1, 4, 5])
@test issetequal(getedge(g, 1), 1:4... | [
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,
31,
9288,
2617,
366,
34960,
13,
25638,
49229,
... | 2.302326 | 473 |
function member_attr(node::Node, attr)
attr == "name" && haskey(node, "alias") && return node["name"] # special handling for aliases
val = findfirst(".//$attr", node)
isnothing(val) && error("Attribute $attr not found in node\n$node")
val.content
end
function resolve_aliases!(collection::Dict, nodes)
... | [
8818,
2888,
62,
35226,
7,
17440,
3712,
19667,
11,
708,
81,
8,
198,
220,
220,
220,
708,
81,
6624,
366,
3672,
1,
11405,
468,
2539,
7,
17440,
11,
366,
26011,
4943,
11405,
1441,
10139,
14692,
3672,
8973,
1303,
2041,
9041,
329,
47217,
19... | 2.443396 | 1,590 |
<filename>test/assets/card/julia/notebook_1.jl
# ---
# notebook: true
# ---
| [
27,
34345,
29,
9288,
14,
19668,
14,
9517,
14,
73,
43640,
14,
11295,
2070,
62,
16,
13,
20362,
198,
2,
11420,
198,
2,
20922,
25,
2081,
198,
2,
11420,
198
] | 2.533333 | 30 |
module ESS
# These methods have been deprecated / moved
macro current_module()
return VERSION >= v"0.7-" ? :(@__MODULE__) : :(current_module())
end
parse = VERSION >= v"0.7-" ? Base.Meta.parse : Base.parse
function_module = VERSION >= v"0.7-" ? Base.parentmodule : Base.function_module
function all_help_topics()
... | [
21412,
412,
5432,
198,
198,
2,
2312,
5050,
423,
587,
39224,
1220,
3888,
198,
20285,
305,
1459,
62,
21412,
3419,
198,
220,
220,
220,
1441,
44156,
2849,
18189,
410,
1,
15,
13,
22,
21215,
5633,
36147,
31,
834,
33365,
24212,
834,
8,
105... | 2.139118 | 1,452 |
using StatsBase
using BenchmarkTools
using Random
# Types and basic methods
include("EventType.jl")
include("ObjectType.jl")
include("NeighbourObjType.jl")
include("UniverseType.jl")
# Functions
include("Event.jl")
include("Universe.jl")
include("NeighbourObj.jl")
include("BoundaryCondition.jl")
if boundaryConditio... | [
3500,
20595,
14881,
198,
3500,
25187,
4102,
33637,
198,
3500,
14534,
198,
198,
2,
24897,
290,
4096,
5050,
198,
17256,
7203,
9237,
6030,
13,
20362,
4943,
198,
17256,
7203,
10267,
6030,
13,
20362,
4943,
198,
17256,
7203,
46445,
6084,
49201,... | 2.754864 | 257 |
<reponame>JuliaDynamics/NonlinearDynamicsTextbook<filename>figure_generation/6/6.4.jl
# %% Using Cao's method to estimate embedding
using DrWatson
@quickactivate "NonlinearDynamicsTextbook"
include(srcdir("style.jl"))
using DynamicalSystems, PyPlot, Random
lo = Systems.lorenz([0, 10, 0.0])
tr = trajectory(lo, 1000; ... | [
27,
7856,
261,
480,
29,
16980,
544,
35,
4989,
873,
14,
15419,
29127,
35,
4989,
873,
8206,
2070,
27,
34345,
29,
26875,
62,
20158,
14,
21,
14,
21,
13,
19,
13,
20362,
198,
2,
43313,
8554,
34513,
338,
2446,
284,
8636,
11525,
12083,
19... | 2.276536 | 358 |
## Old site
cd("/home/danielc/Documentos/GitHub/Julia-Para-Economistas/Julia Para Economistas")
using JuDoc
serve()
## New site
cd("/home/danielc/Documentos/GitHub/Julia-Para-Economistas/Julia P Economistas F")
using Franklin
serve()
| [
2235,
5706,
2524,
198,
198,
10210,
7203,
14,
11195,
14,
67,
6321,
66,
14,
24941,
418,
14,
38,
270,
16066,
14,
16980,
544,
12,
47,
3301,
12,
28489,
37503,
14,
16980,
544,
2547,
64,
36619,
292,
4943,
198,
198,
3500,
12585,
23579,
198,... | 2.510417 | 96 |
function kernel_relativity(xi::SVector, xj::SVector{3,T}, pj::SVector{3,T}) where {T}
R = xi - xj
return R / sqrt(dot(R, R) + dot(pj, R)^2 + eps())^3
end
| [
8818,
9720,
62,
2411,
22055,
7,
29992,
3712,
50,
38469,
11,
2124,
73,
3712,
50,
38469,
90,
18,
11,
51,
5512,
279,
73,
3712,
50,
38469,
90,
18,
11,
51,
30072,
810,
1391,
51,
92,
198,
220,
220,
220,
371,
796,
2124,
72,
532,
2124,
... | 2 | 81 |
<reponame>iluvjava/Subspace_Projection_Method<filename>scratchpapers_2/dynamic_lanczos_tests.jl<gh_stars>0
include("dynamic_symtridiagonal.jl")
include("dynamic_lanczos.jl")
using LinearAlgebra, Plots
n = 32
m = 10
A = Diagonal(LinRange(1e-3, 1, n).^3)
il = DIL(A, ones(n), n, true)
ChangeVelocityTol!(il.dynamic_symtr... | [
27,
7856,
261,
480,
29,
346,
14795,
12355,
14,
7004,
13200,
62,
16775,
295,
62,
17410,
27,
34345,
29,
1416,
36722,
40491,
62,
17,
14,
67,
28995,
62,
75,
1192,
37925,
62,
41989,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
17256,
72... | 2.116923 | 325 |
type MixPC <: PairCop
cops::Array{PairCop, 1}
wgts::FloatVec
end
| [
4906,
15561,
5662,
1279,
25,
39645,
13379,
198,
220,
220,
220,
14073,
3712,
19182,
90,
47,
958,
13379,
11,
352,
92,
198,
220,
220,
220,
266,
70,
912,
3712,
43879,
53,
721,
198,
437,
198
] | 2.085714 | 35 |
<gh_stars>0
"""
The base abstract type for the collection of candidate solutions
in the population-based optimization methods.
"""
abstract type Population end
"""
The base abstract types for population that also stores the candidates
fitness.
`F` is the fitness type.
"""
abstract type PopulationWithFitness{F} <: Pop... | [
27,
456,
62,
30783,
29,
15,
198,
37811,
198,
464,
2779,
12531,
2099,
329,
262,
4947,
286,
4540,
8136,
198,
259,
262,
3265,
12,
3106,
23989,
5050,
13,
198,
37811,
198,
397,
8709,
2099,
20133,
886,
198,
198,
37811,
198,
464,
2779,
125... | 2.756089 | 2,833 |
"""
hadamarddev(data, rate; [frequency=false], [overlapping=true], [taus=Octave])
Calculates the hadamard deviation
#parameters:
* `<data>`: The data array to calculate the deviation from either as as phases or frequencies.
* `<rate>`: The rate of the data given.
* `[frequency]`: True if `data` contains frequency... | [
37811,
198,
18108,
321,
446,
7959,
7,
7890,
11,
2494,
26,
685,
35324,
28,
9562,
4357,
685,
2502,
75,
5912,
28,
7942,
4357,
685,
8326,
385,
28,
12349,
1015,
12962,
198,
9771,
3129,
689,
262,
550,
321,
446,
28833,
198,
198,
2,
17143,
... | 2.81075 | 893 |
function eigenfunction_plotdata(u::StandaloneVertexEigenfunction{T}) where {T}
v = u.vertex
orientation = ifelse(T == arb, u.orientation, u.parent(u.orientation) * u.parent(π))
θ = ifelse(T == arb, u.θ, u.parent(u.θ) * u.parent(π))
vertex = (Float64[u.vertex[1]], Float64[u.vertex[2]])
edges = begin... | [
8818,
304,
9324,
8818,
62,
29487,
7890,
7,
84,
3712,
1273,
7642,
505,
13414,
16886,
36,
9324,
8818,
90,
51,
30072,
810,
1391,
51,
92,
198,
220,
220,
220,
410,
796,
334,
13,
332,
16886,
198,
220,
220,
220,
12852,
796,
611,
17772,
7... | 2.018401 | 3,478 |
const GQE{C,V} = GenericQuadExpr{C,V}
const _VariableQuadExpr{C} = GenericQuadExpr{C, VariableRef}
const _DecisionQuadExpr{C} = GenericQuadExpr{C, DecisionRef}
const _KnownQuadExpr{C} = GenericQuadExpr{C, KnownRef}
const _VQE = _VariableQuadExpr{Float64}
const _DQE = _DecisionQuadExpr{Float64}
const _KQE = _KnownQuadEx... | [
9979,
402,
48,
36,
90,
34,
11,
53,
92,
796,
42044,
4507,
324,
3109,
1050,
90,
34,
11,
53,
92,
198,
9979,
4808,
43015,
4507,
324,
3109,
1050,
90,
34,
92,
796,
42044,
4507,
324,
3109,
1050,
90,
34,
11,
35748,
8134,
92,
198,
9979,
... | 2.093752 | 14,517 |
function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
eltypes = (N0f8, N0f16, Float32, Float64) # eltypes of parametric colors
pctypes = (Gray, RGB, AGray, GrayA, ARGB, RGBA) # parametric colors
cctypes = (Gray24, AGray32, RGB24, ARGB32) # non-parametric col... | [
8818,
4808,
3866,
5589,
576,
62,
3419,
198,
220,
220,
220,
269,
13345,
7,
25,
20362,
62,
8612,
803,
62,
22915,
11,
327,
600,
11,
32865,
6624,
352,
8614,
1441,
2147,
198,
220,
220,
220,
1288,
19199,
796,
357,
45,
15,
69,
23,
11,
... | 1.836193 | 1,282 |
using Pkg; pkg"registry add General https://github.com/legend-exp/LegendJuliaRegistry.git"
| [
3500,
350,
10025,
26,
279,
10025,
1,
2301,
4592,
751,
3611,
3740,
1378,
12567,
13,
785,
14,
1455,
437,
12,
11201,
14,
21351,
16980,
544,
8081,
4592,
13,
18300,
1,
198
] | 2.935484 | 31 |
"""
Exponential(θ)
The *Exponential distribution* with scale parameter `θ` has probability density function
```math
f(x; \\theta) = \\frac{1}{\\theta} e^{-\\frac{x}{\\theta}}, \\quad x > 0
```
```julia
Exponential() # Exponential distribution with unit scale, i.e. Exponential(1)
Exponential(b) # Exponen... | [
37811,
198,
220,
220,
220,
5518,
35470,
7,
138,
116,
8,
198,
198,
464,
1635,
16870,
35470,
6082,
9,
351,
5046,
11507,
4600,
138,
116,
63,
468,
12867,
12109,
2163,
198,
198,
15506,
63,
11018,
198,
69,
7,
87,
26,
26867,
1169,
8326,
... | 2.34241 | 1,469 |
<reponame>yalwan-sage/AWS.jl
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: lookoutequipment
using AWS.Compat
using AWS.UUIDs
"""
create_dataset(client_token, dataset_name, dataset_schema)
create_dataset(client_token, dataset_name, dataset_schema, params::Dict{String,<:Any})
... | [
27,
7856,
261,
480,
29,
88,
282,
8149,
12,
82,
496,
14,
12298,
50,
13,
20362,
198,
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,
40497,
... | 2.703057 | 13,410 |
<reponame>SkyWorld117/Dianoia.jl
module Adam
using LoopVectorization
function fit(;model::Any, input_data::Array{Float32}, output_data::Array{Float32}, loss_function::Any, monitor::Any, α::Float64=0.001, epochs::Int64=20, batch::Real=32, β₁::Float64=0.9, β₂::Float64=0.999, ϵ::Float64=1e-8)
model.initia... | [
27,
7856,
261,
480,
29,
22308,
10603,
17657,
14,
35,
10115,
544,
13,
20362,
198,
21412,
7244,
198,
220,
220,
220,
1262,
26304,
38469,
1634,
628,
220,
220,
220,
2163,
4197,
7,
26,
19849,
3712,
7149,
11,
5128,
62,
7890,
3712,
19182,
9... | 1.975871 | 746 |
include(joinpath("..", "quadruped.jl"))
# test kinematics
q = rand(nq)
@assert norm(kinematics_1(model, q, body = :torso, mode = :ee) - [q[1] + model.l_torso * sin(q[3]); q[2] - model.l_torso * cos(q[3])]) ≈ 0.0
@assert norm(kinematics_1(model, q, body = :torso, mode = :com) - [q[1] + model.d_torso * sin(q[3]); q[2]... | [
17256,
7,
22179,
6978,
7203,
492,
1600,
366,
47003,
622,
9124,
13,
20362,
48774,
628,
198,
2,
1332,
479,
7749,
23372,
198,
80,
796,
43720,
7,
77,
80,
8,
198,
198,
31,
30493,
2593,
7,
5116,
368,
23372,
62,
16,
7,
19849,
11,
10662,
... | 2.003941 | 3,299 |
config = MOI.Test.TestConfig()
# The test does not check the solution so we just set zeros.
optimize!(mock) = MOIU.mock_optimize!(mock, zeros(MOI.get(mock, MOI.NumberOfVariables())))
for mock in mocks(optimize!)
Tests.sosdemo9_test(mock, config)
end
| [
11250,
796,
13070,
40,
13,
14402,
13,
14402,
16934,
3419,
198,
2,
383,
1332,
857,
407,
2198,
262,
4610,
523,
356,
655,
900,
1976,
27498,
13,
198,
40085,
1096,
0,
7,
76,
735,
8,
796,
13070,
44958,
13,
76,
735,
62,
40085,
1096,
0,
... | 2.54 | 100 |
<gh_stars>1-10
function constraint_elimination(p :: Phs)
# Given a constrained Phs with N state variables
# and Nconst constraints lambda:
# Xdot = J GradH + B u + G lambda
# y = B' GradH + D u
# 0 = G' GradH
# this function finds an e... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
8818,
32315,
62,
417,
320,
1883,
7,
79,
7904,
1380,
82,
8,
198,
197,
2,
11259,
257,
31070,
1380,
82,
351,
399,
1181,
9633,
198,
197,
2,
220,
220,
220,
220,
290,
399,
9979,
17778,
37456,
... | 1.985722 | 1,751 |
# Autogenerated wrapper script for Spot_julia_jll for x86_64-w64-mingw32-cxx11
export autcross, autfilt, dstar2tgba, genaut, genltl, libbddx, libspot, libspot_julia, libspotgen, libspotltsmin, ltl2tgba, ltl2tgta, ltlcross, ltldo, ltlfilt, ltlgrind, ltlsynt, randaut, randltl
using libcxxwrap_julia_jll
JLLWrappers.@gene... | [
2,
5231,
519,
877,
515,
29908,
4226,
329,
15899,
62,
73,
43640,
62,
73,
297,
329,
2124,
4521,
62,
2414,
12,
86,
2414,
12,
2229,
86,
2624,
12,
66,
5324,
1157,
198,
39344,
1960,
19692,
11,
1960,
69,
2326,
11,
288,
7364,
17,
25297,
... | 2.031774 | 1,731 |
using DifferentialEquations
using Plots
# Parameters
const f = 2.0 # depensation in piscivores (B)
const m = 0.01 # yr⁻¹ natural piscivore mortality
const a = 0.37 # B recruitment assymptote (shape parameter)
const r = 8.7 # mg⋅m⁻²⋅d⁻¹ maximum recycling of P
const q = 8 # Or 2, steepness coefficient of R
const k = 90 ... | [
3500,
20615,
498,
23588,
602,
198,
3500,
1345,
1747,
198,
198,
2,
40117,
198,
9979,
277,
796,
362,
13,
15,
1303,
1207,
25742,
287,
279,
2304,
452,
2850,
357,
33,
8,
198,
9979,
285,
796,
657,
13,
486,
1303,
42635,
46256,
119,
126,
... | 2.077008 | 909 |
include("adaptive_parameters.jl")
include("center_of_mass.jl")
mutable struct ECA <: AbstractParameters
η_max::Float64
K::Int
N::Int
N_init::Int
p_exploit::Float64
p_bin::Float64
p_cr::Array{Float64}
ε::Float64
adaptive::Bool
resize_population::Bool
end
"""
ECA(;
η_... | [
17256,
7203,
42552,
425,
62,
17143,
7307,
13,
20362,
4943,
198,
17256,
7203,
16159,
62,
1659,
62,
22208,
13,
20362,
4943,
198,
198,
76,
18187,
2878,
412,
8141,
1279,
25,
27741,
48944,
198,
220,
220,
220,
7377,
115,
62,
9806,
3712,
438... | 2.136721 | 3,050 |
module MagnusNudecker
using LinearAlgebra
function selection_matrix(m::Int)
cd = round(Int, m*(m+1)/2)
rd = m*m
D = zeros(Int, rd, cd)
@inbounds for j = 1:m
for i = 1:j
r_ij = round(Int, (j*j-j)/2 + i)
h_ij = round(Int, m*(j-1) + i)
h_ji = round(Int, m*(i-1... | [
21412,
35451,
45,
2507,
15280,
198,
198,
3500,
44800,
2348,
29230,
198,
198,
8818,
6356,
62,
6759,
8609,
7,
76,
3712,
5317,
8,
198,
220,
220,
220,
22927,
796,
2835,
7,
5317,
11,
285,
9,
7,
76,
10,
16,
20679,
17,
8,
198,
220,
220... | 1.604579 | 961 |
using QuasiArrays, LazyArrays, ArrayLayouts, Base64, Test
import QuasiArrays: QuasiLazyLayout, QuasiArrayApplyStyle, LazyQuasiMatrix, LazyQuasiArrayStyle
import LazyArrays: MulStyle, ApplyStyle
struct MyQuasiLazyMatrix <: LazyQuasiMatrix{Float64}
A::QuasiArray
end
Base.axes(A::MyQuasiLazyMatrix) = axes(A.A)
Base.... | [
3500,
2264,
17053,
3163,
20477,
11,
406,
12582,
3163,
20477,
11,
15690,
23763,
5269,
11,
7308,
2414,
11,
6208,
198,
11748,
2264,
17053,
3163,
20477,
25,
2264,
17053,
43,
12582,
32517,
11,
2264,
17053,
19182,
44836,
21466,
11,
406,
12582,
... | 1.722986 | 3,054 |
"""creates outflow variables specified in data"""
function variable_inflow(sp, data::Dict)
@variables(sp, begin
inflow[r=1:data["hydro"]["nHyd"]]
end)
end
# TODO: add data["hydro"]["Hydrogenerators"][r]["min_turn"] as penalized constraint
"""creates outflow variables specified in data"""
function vari... | [
37811,
20123,
274,
503,
11125,
9633,
7368,
287,
1366,
37811,
198,
8818,
7885,
62,
259,
11125,
7,
2777,
11,
1366,
3712,
35,
713,
8,
198,
220,
220,
220,
2488,
25641,
2977,
7,
2777,
11,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
1... | 2.529204 | 565 |
<reponame>DilumAluthge/BenchmarkCI.jl
module TestUpdating
using Test
using BenchmarkCI: GitUtils
function setup_dummy_user()
run(`git config user.email "<EMAIL>"`)
run(`git config user.name DUMMY`)
end
function init_random_repo(dir, branch)
mkpath(dir)
cd(dir) do
run(`git init .`)
set... | [
27,
7856,
261,
480,
29,
35,
346,
388,
2348,
1071,
469,
14,
44199,
4102,
25690,
13,
20362,
198,
21412,
6208,
4933,
38734,
198,
198,
3500,
6208,
198,
3500,
25187,
4102,
25690,
25,
15151,
18274,
4487,
198,
198,
8818,
9058,
62,
67,
13513,... | 1.978108 | 1,279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.