content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
"""
solve!(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem, solver::AbstractRungeKuttaSolver) :: AbstractRungeKuttaSolution
returns the [`AbstractRungeKuttaSolution`](@ref) of an [`AbstractInitialValueProblem`](@ref).
"""
function NSDEBase.solve!(solution::AbstractRungeKuttaSolution, pro... | [
37811,
198,
220,
220,
220,
8494,
0,
7,
82,
2122,
3712,
23839,
10987,
469,
42,
315,
8326,
46344,
11,
1917,
3712,
23839,
24243,
11395,
40781,
11,
1540,
332,
3712,
23839,
10987,
469,
42,
315,
8326,
50,
14375,
8,
7904,
27741,
10987,
469,
... | 2.437333 | 750 |
function _gkp_global(g::AbstractGraph{T}) where T <: Integer
n = nv(g)
sinks = get_sinks(g)
sources = get_sources(g)
source_idx = falses(n)
source_idx[sources] .= true
visited = falses(n)
visited[sinks] .= true
w = 1 ./ indegree(g)
od = outdegree(g)
kp = zeros(n)
kp[sin... | [
198,
8818,
4808,
70,
74,
79,
62,
20541,
7,
70,
3712,
23839,
37065,
90,
51,
30072,
810,
309,
1279,
25,
34142,
198,
220,
220,
220,
299,
796,
299,
85,
7,
70,
8,
198,
220,
220,
220,
38614,
796,
651,
62,
82,
2973,
7,
70,
8,
198,
... | 1.869117 | 1,551 |
<gh_stars>0
func(x,y) = x*y
dfunc(x,y) = ForwardDiff.derivative(x->func(x,y),x) | [
27,
456,
62,
30783,
29,
15,
198,
20786,
7,
87,
11,
88,
8,
796,
2124,
9,
88,
198,
7568,
19524,
7,
87,
11,
88,
8,
796,
19530,
28813,
13,
1082,
452,
876,
7,
87,
3784,
20786,
7,
87,
11,
88,
828,
87,
8
] | 1.837209 | 43 |
<gh_stars>0
"""
$(TYPEDEF)
The solution to a `DataDrivenProblem` derived via a certain algorithm.
The solution is represented via an `AbstractBasis`, which makes it callable.
# Fields
$(FIELDS)
"""
struct DataDrivenSolution{R <: Union{AbstractBasis,Nothing} , S, P , A, O,M} <: AbstractDataDrivenSolution
"""Result... | [
27,
456,
62,
30783,
29,
15,
198,
37811,
198,
3,
7,
9936,
47,
1961,
25425,
8,
198,
198,
464,
4610,
284,
257,
4600,
6601,
20564,
574,
40781,
63,
10944,
2884,
257,
1728,
11862,
13,
198,
464,
4610,
318,
7997,
2884,
281,
4600,
23839,
1... | 2.155994 | 4,763 |
"""
get_distance(A::Int, B::Int,
nodes::Dict{Int,T} ,
vertices_to_nodes::Vector{Int}) where T<:Union{OpenStreetMapX.ENU,OpenStreetMapX.ECEF}
Auxiliary function - takes two vertices of graph and return the distance between them.
Used to compute straight line distance heuris... | [
37811,
198,
220,
220,
220,
651,
62,
30246,
7,
32,
3712,
5317,
11,
347,
3712,
5317,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13760,
3712,
35,
713,
90,
5317,
11,
51,
92,
837,
... | 1.997505 | 2,004 |
function nordsieck_adjust!(integrator, cache::T) where T
@unpack nextorder, order = cache
if nextorder != order
# TODO: optimize?
nordsieck_adjust_order!(cache, nextorder-order)
cache.order = cache.nextorder
cache.L = cache.order + 1
cache.n_wait = cache.L
end
nordsieck_rescale!(cache)
ret... | [
8818,
299,
3669,
494,
694,
62,
23032,
0,
7,
18908,
12392,
11,
12940,
3712,
51,
8,
810,
309,
198,
220,
2488,
403,
8002,
1306,
2875,
11,
1502,
796,
12940,
198,
220,
611,
1306,
2875,
14512,
1502,
198,
220,
220,
220,
1303,
16926,
46,
... | 2.109091 | 6,215 |
<reponame>baggepinnen/DiffEqParamEstim.jl<filename>src/kernels.jl
# Kernel definition is taken from here: https://en.wikipedia.org/wiki/Kernel_(statistics)#Kernel_functions_in_common_use
abstract type CollocationKernel end
struct EpanechnikovKernel <: CollocationKernel end
struct UniformKernel <: CollocationKernel end... | [
27,
7856,
261,
480,
29,
21454,
469,
79,
3732,
268,
14,
28813,
36,
80,
22973,
22362,
320,
13,
20362,
27,
34345,
29,
10677,
14,
74,
44930,
13,
20362,
198,
2,
32169,
6770,
318,
2077,
422,
994,
25,
3740,
1378,
268,
13,
31266,
13,
2398... | 2.346299 | 797 |
<gh_stars>10-100
# ALL TESTS THAT CONCERN UNITCELLS
# include
using LatticePhysics
using Base.Test
# begin the Unitcell testblock
lattice_testset = @testset "Lattices" begin
################################################################################
#
# TYPE DEFINITIONS OF OBJECT CLASSES IN JULIA
#
#########... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
2,
11096,
309,
1546,
4694,
14603,
39962,
28778,
4725,
2043,
5222,
3069,
50,
198,
198,
2,
2291,
198,
3500,
406,
1078,
501,
2725,
23154,
198,
3500,
7308,
13,
14402,
198,
198,
2,
2221,
262,
... | 2.162465 | 4,998 |
<filename>src/NEAT.jl
module NEAT
import Base.split
include("config.jl")
# track count of various global variables & holds refernce to the config
type Global
speciesCnt::Int64
chromosomeCnt::Int64
nodeCnt::Int64
innov_number::Int64
innovations::Dict{(Int64,Int64),Int64}
cf::Config
functio... | [
27,
34345,
29,
10677,
14,
12161,
1404,
13,
20362,
198,
21412,
10635,
1404,
198,
198,
11748,
7308,
13,
35312,
198,
198,
17256,
7203,
11250,
13,
20362,
4943,
198,
198,
2,
2610,
954,
286,
2972,
3298,
9633,
1222,
6622,
1006,
1142,
344,
28... | 2.628319 | 226 |
using Unitful
using HTTP
include("urlparser.jl")
const tunit = u"ms"
const tmul = Int(1u"s"/1tunit)
delta_t(a, b) = round((b - a) * tmul, 0)tunit
function go(count::Int)
urls = split(String(read("urls")), '\n')
t_start = time()
@time for rep... | [
3500,
11801,
913,
198,
198,
3500,
14626,
198,
198,
17256,
7203,
6371,
48610,
13,
20362,
4943,
198,
198,
9979,
6278,
270,
796,
334,
1,
907,
1,
198,
9979,
256,
76,
377,
796,
2558,
7,
16,
84,
1,
82,
1,
14,
16,
83,
20850,
8,
198,
... | 1.688953 | 688 |
#=
https://edu.swi-prolog.org/mod/assign/view.php?id=249
"""
Medical diagnosis
Develop an expert system for medical diagnosis.
Consider three diseases: flu, gastroenteritis and bronchitis.
A priori, flu has probability 0.3, gastroenteritis 0 0.2, and bronchitis 0.25.
If you have the flu, you may have... | [
2,
28,
628,
220,
3740,
1378,
15532,
13,
2032,
72,
12,
1676,
6404,
13,
2398,
14,
4666,
14,
562,
570,
14,
1177,
13,
10121,
30,
312,
28,
21626,
198,
220,
37227,
198,
220,
8366,
13669,
628,
220,
6013,
281,
5887,
1080,
329,
3315,
13669... | 2.609145 | 1,356 |
<reponame>MechGen3SO/ReactionMechanismSimulator.jl<filename>src/TestReactors.jl<gh_stars>10-100
using Test
using DiffEqBase
using Sundials
@testset "Test Reactors" begin
phaseDict = readinput("../src/testing/liquid_phase.rms")
spcs = phaseDict["phase"]["Species"]; #mechanism dictionaries index: phaseDict[phasename][... | [
27,
7856,
261,
480,
29,
28452,
13746,
18,
15821,
14,
3041,
2673,
28452,
48162,
8890,
8927,
13,
20362,
27,
34345,
29,
10677,
14,
14402,
3041,
529,
669,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
3500,
6208,
198,
3500,
106... | 2.262039 | 9,407 |
using DecisionMakingPolicies
using Test
import Zygote: gradient, pullback
@testset "Stateless Softmax Tests" begin
num_actions = 2
T = Float32
p = StatelessSoftmax(T, num_actions)
@test length(p.θ) == num_actions
@test eltype(p.θ) == T
@test size(p.θ) == (num_actions,)
a = rand(p())
... | [
3500,
26423,
23874,
47,
4160,
444,
198,
3500,
6208,
198,
198,
11748,
1168,
35641,
1258,
25,
31312,
11,
2834,
1891,
198,
198,
31,
9288,
2617,
366,
9012,
1203,
8297,
9806,
30307,
1,
2221,
198,
220,
220,
220,
997,
62,
4658,
796,
362,
1... | 1.844757 | 2,918 |
cd(@__DIR__) # changes the directory to the current directory, the default I guess is the HOME
using Pkg; Pkg.activate("."); Pkg.instantiate()
using OrdinaryDiffEq, ModelingToolkit, DiffEqOperators, DomainSets
@parameters t, x
@variables u(..)
Dt = Differential(t)
Dx = Differential(x)
Dxx = Differential(x)^2
# PDE
e... | [
10210,
7,
31,
834,
34720,
834,
8,
1303,
2458,
262,
8619,
284,
262,
1459,
8619,
11,
262,
4277,
314,
4724,
318,
262,
41779,
198,
3500,
350,
10025,
26,
350,
10025,
13,
39022,
7203,
526,
1776,
350,
10025,
13,
8625,
415,
9386,
3419,
198,... | 2.207407 | 540 |
#######################################################################################################################################################################################################
#
# Changes to the function
# General
# 2021-Dec-24: migrate the function from PkgUtility to NetcdfIO
# 2022-Jan... | [
29113,
29113,
29113,
29113,
29113,
29113,
4242,
21017,
198,
2,
198,
2,
19179,
284,
262,
2163,
198,
2,
3611,
198,
2,
220,
220,
220,
220,
33448,
12,
10707,
12,
1731,
25,
32492,
262,
2163,
422,
350,
10025,
18274,
879,
284,
3433,
66,
75... | 2.72115 | 2,435 |
__precompile__(true)
"""
Main module for `Documenter.jl` -- a documentation generation package for Julia.
Two functions are exported from this module for public use:
- [`makedocs`](@ref). Generates documentation from docstrings and templated markdown files.
- [`deploydocs`](@ref). Deploys generated documentation fro... | [
834,
3866,
5589,
576,
834,
7,
7942,
8,
198,
198,
37811,
198,
13383,
8265,
329,
4600,
24941,
263,
13,
20362,
63,
1377,
257,
10314,
5270,
5301,
329,
22300,
13,
198,
198,
7571,
5499,
389,
29050,
422,
428,
8265,
329,
1171,
779,
25,
198,... | 2.402522 | 7,771 |
using DynamicEnergyBudgets, Unitful, Test
using DynamicEnergyBudgets: rate_formula, half_saturation
@testset "Half saturation curve" begin
mx = 10.0
half = 5.0
x = 5.0
@test half_saturation(mx, half, x) == 5.0
# Maximum
x = 100000000000000000000000000.0
@test half_saturation(mx, half, x) ... | [
3500,
26977,
28925,
33,
463,
11407,
11,
11801,
913,
11,
6208,
198,
198,
3500,
26977,
28925,
33,
463,
11407,
25,
2494,
62,
687,
4712,
11,
2063,
62,
82,
36921,
198,
198,
31,
9288,
2617,
366,
31305,
36275,
12133,
1,
2221,
198,
220,
220... | 1.747656 | 1,173 |
<reponame>mjirik/LarSurf.jl
using Distributed
if nprocs() == 1
addprocs(3)
end
function surface_extraction(iterator)
localvar = 2.5
block_func = function (elm)
# hypothetical (expensive) operation with elm
# (in my code this is solving a block)
localvar * elm
end
pmap(block_func, iterator)
end... | [
27,
7856,
261,
480,
29,
76,
73,
343,
1134,
14,
43,
283,
14214,
69,
13,
20362,
198,
3500,
4307,
6169,
198,
361,
299,
1676,
6359,
3419,
6624,
352,
198,
220,
220,
220,
751,
1676,
6359,
7,
18,
8,
198,
437,
198,
198,
8818,
4417,
62,
... | 2.569343 | 137 |
module BCMFBPTests
using BinaryCommitteeMachineFBP
using Test
using GZip
const N = 21
const K = 5
const α = 0.1
const kw = Dict(:randfact=>0.1, :seed=>135, :max_iters=>1, :damping=>0.5, :quiet=>false);
patternsfile = "patterns.txt.gz"
fps = [Scoping(0:0.1:10, 21), PseudoReinforcement(0:0.01:1), FreeScoping([(atanh(... | [
21412,
11843,
44,
26001,
11571,
3558,
198,
198,
3500,
45755,
6935,
2979,
37573,
37,
20866,
198,
3500,
6208,
198,
3500,
402,
41729,
198,
198,
9979,
399,
796,
2310,
198,
9979,
509,
796,
642,
198,
9979,
26367,
796,
657,
13,
16,
198,
9979... | 1.990854 | 1,640 |
# This file is a part of Julia. License is MIT: https://julialang.org/license
module TypeTrees
##
# Generate a text graphic of Julia modules type tree
##
struct Binding
mod::Module
sym::Symbol
end
Binding(tn::TypeName) = Binding(tn.module, tn.name)
Base.isless(a::Binding, b::Binding) = isless(a.sym, b.sym)
#... | [
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,
5994,
51,
6037,
198,
2235,
198,
2,
2980,
378,
257,
2420,
13028,
286,
22300,
13103,
2099,
5509,
... | 2.017159 | 2,506 |
<filename>src/local_sensitivity/steadystate_adjoint.jl
struct SteadyStateAdjointSensitivityFunction{C<:AdjointDiffCache,Alg<:SteadyStateAdjoint,uType,SType,fType<:ODEFunction,CV,λType,VJPType} <: SensitivityFunction
diffcache::C
sensealg::Alg
discrete::Bool
y::uType
sol::SType
f::fType
colorvec::CV
λ::... | [
27,
34345,
29,
10677,
14,
12001,
62,
82,
40545,
14,
28044,
88,
5219,
62,
41255,
1563,
13,
20362,
198,
198,
7249,
45445,
88,
9012,
2782,
73,
1563,
50,
40545,
22203,
90,
34,
27,
25,
2782,
73,
1563,
28813,
30562,
11,
2348,
70,
27,
25... | 2.3319 | 1,163 |
<reponame>leonardoassumpcao/VariationalInequality.jl
mutable struct VIPData
F::Array{JuMP.NonlinearExpression,1}
var::Array{VariableRef,1}
relation::Dict{VariableRef, JuMP.NonlinearExpression}
end
function VIPModel(optimizer=Ipopt.Optimizer)
m = JuMP.Model(with_optimizer(optimizer, max_cpu_time=60.0,... | [
27,
7856,
261,
480,
29,
38970,
13109,
562,
931,
66,
5488,
14,
23907,
864,
40,
710,
13237,
13,
20362,
198,
198,
76,
18187,
2878,
24791,
6601,
198,
220,
220,
220,
376,
3712,
19182,
90,
33018,
7378,
13,
15419,
29127,
16870,
2234,
11,
1... | 2.634227 | 2,127 |
<filename>src/miditrack.jl<gh_stars>0
#=
Track chunks begin with four bytes spelling out "MTrk", followed by the length
in bytes of the track (see readvariablelength in util.jl), followed by a sequence
of events.
=#
type MIDITrack
events::Array{TrackEvent, 1}
MIDITrack() = new(TrackEvent[])
MIDITrack(event... | [
27,
34345,
29,
10677,
14,
13602,
270,
39638,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
2,
28,
198,
24802,
22716,
2221,
351,
1440,
9881,
24993,
503,
366,
44,
2898,
74,
1600,
3940,
416,
262,
4129,
198,
259,
9881,
286,
262,
2610,
3... | 2.381466 | 2,320 |
<filename>src/services/codeguruprofiler.jl
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: codeguruprofiler
using AWS.Compat
using AWS.UUIDs
"""
add_notification_channels(channels, profiling_group_name)
add_notification_channels(channels, profiling_group_name, params::Dict{Stri... | [
27,
34345,
29,
10677,
14,
30416,
14,
8189,
45073,
929,
305,
69,
5329,
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,
2438,
... | 2.812966 | 16,366 |
module Blox
using ArrayViews
export view
include("blockvector.jl")
end # module
| [
21412,
1086,
1140,
198,
198,
3500,
15690,
7680,
82,
198,
198,
39344,
1570,
198,
198,
17256,
7203,
9967,
31364,
13,
20362,
4943,
198,
198,
437,
1303,
8265,
198
] | 3 | 28 |
<reponame>c42f/LanguageServer.jl<filename>test/test_document.jl<gh_stars>1-10
s1 = """
123456
abcde
ABCDEFG
"""
d1 = Document("untitled", s1, false)
@test get_text(d1) == s1
@test get_offset(d1, 0, 4) == 4
@test get_offset(d1, 1, 2) == 9
@test get_line_offsets(d1) == [0, 7, 13, 21]
@test get_position_at(d1, 1) == (0, 1... | [
27,
7856,
261,
480,
29,
66,
3682,
69,
14,
32065,
10697,
13,
20362,
27,
34345,
29,
9288,
14,
9288,
62,
22897,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
82,
16,
796,
37227,
198,
10163,
29228,
198,
39305,
2934,
198,
24694,... | 2.327906 | 2,211 |
# # Modal analysis of acoustic medium in a rigid box
# Source code: [`rigid_box_tut.jl`](rigid_box_tut.jl)
# ## Description
# Example from Boundary element acoustics: Fundamentals and computer codes, TW
# Wu, page 123. Internal resonance problem. Reference frequencies: 90.7895,
# 181.579, 215.625, 233.959, 272.368, ... | [
2,
1303,
3401,
282,
3781,
286,
26071,
7090,
287,
257,
20831,
3091,
198,
198,
2,
8090,
2438,
25,
685,
63,
4359,
312,
62,
3524,
62,
83,
315,
13,
20362,
63,
16151,
4359,
312,
62,
3524,
62,
83,
315,
13,
20362,
8,
198,
198,
2,
22492,... | 2.875297 | 842 |
function hgf_url_template(repo_id, revision, filename)
global ENDPOINT
return "$(ENDPOINT[])/$(repo_id)/resolve/$(revision)/$(filename)"
end
abstract type REPO end
struct DATASET_REPO <: REPO end
struct SPACE_REPO <: REPO end
const REPO_TYPE = Union{REPO, Nothing}
is_valid_repo(::REPO_TYPE) = true
is_valid_r... | [
8818,
289,
70,
69,
62,
6371,
62,
28243,
7,
260,
7501,
62,
312,
11,
18440,
11,
29472,
8,
198,
220,
220,
220,
3298,
12964,
6322,
46,
12394,
198,
220,
220,
220,
1441,
17971,
7,
1677,
6322,
46,
12394,
58,
12962,
32624,
7,
260,
7501,
... | 2.446476 | 2,625 |
<reponame>rikhuijzer/LazyArrays.jl<filename>src/LazyArrays.jl
module LazyArrays
# Use README as the docstring of the module:
@doc read(joinpath(dirname(@__DIR__), "README.md"), String) LazyArrays
using Base, Base.Broadcast, LinearAlgebra, FillArrays, StaticArrays, ArrayLayouts, MatrixFactorizations, SparseArrays
impo... | [
27,
7856,
261,
480,
29,
12602,
13415,
2926,
9107,
14,
43,
12582,
3163,
20477,
13,
20362,
27,
34345,
29,
10677,
14,
43,
12582,
3163,
20477,
13,
20362,
198,
21412,
406,
12582,
3163,
20477,
198,
198,
2,
5765,
20832,
11682,
355,
262,
2205... | 2.367896 | 2,006 |
<gh_stars>0
# XML nodes
abstract type AbstractXMLNode end
#### Types of attributes
const XML_ATTRIBUTE_CDATA = 1
const XML_ATTRIBUTE_ID = 2
const XML_ATTRIBUTE_IDREF = 3
const XML_ATTRIBUTE_IDREFS = 4
const XML_ATTRIBUTE_ENTITY = 5
const XML_ATTRIBUTE_ENTITIES = 6
const XML_ATTRIBUTE_NMTOKEN = 7
const XML_ATTRIBUTE_... | [
27,
456,
62,
30783,
29,
15,
198,
2,
23735,
13760,
198,
198,
397,
8709,
2099,
27741,
55,
5805,
19667,
886,
198,
198,
4242,
24897,
286,
12608,
198,
198,
9979,
23735,
62,
1404,
5446,
9865,
37780,
62,
8610,
13563,
796,
352,
198,
9979,
2... | 2.393043 | 3,852 |
let
using Random
Random.seed!(0)
p = 3
n = 12
Ut = randn(p,n)
Vt = randn(p,n)
x = randn(n)
A = egrss.full(Ut,Vt)
yref = A*x
y = egrss.symv(Ut,Vt,x);
@test ( isapprox(y,yref) )
end
| [
1616,
198,
220,
220,
220,
1262,
14534,
198,
220,
220,
220,
14534,
13,
28826,
0,
7,
15,
8,
198,
220,
220,
220,
279,
796,
513,
198,
220,
220,
220,
299,
796,
1105,
198,
220,
220,
220,
7273,
796,
43720,
77,
7,
79,
11,
77,
8,
198,
... | 1.635036 | 137 |
using Test
using LinearAlgebra
using StaticArrays
using ArnoldiMethod: swap11!, swap12!, swap21!, swap22!, rotate_right!, eigenvalues,
sylvsystem, CompletePivoting
# These tests are only necessary in real arithmetic, but why not do complex for completeness
@testset "Reordering the Schur form 1 ↔ ... | [
3500,
6208,
198,
3500,
44800,
2348,
29230,
198,
3500,
36125,
3163,
20477,
198,
3500,
21418,
72,
17410,
25,
16075,
1157,
28265,
16075,
1065,
28265,
16075,
2481,
28265,
16075,
1828,
28265,
23064,
62,
3506,
28265,
304,
9324,
27160,
11,
198,
... | 2.038729 | 3,744 |
<filename>test/solvers/fastGradientMethod/fgm_colddelta.jl
using BlockArrays
using ControlSystems
using LinearAlgebra
using PredictiveControl
using Test
# Setup the problem using a test case from Richter's paper
n = 4
m = 2
N = 5
A = [ 0.7 -0.1 0.0 0.0;
0.2 -0.5 0.1 0.0;
0.0 0.1 0.1 0.0;
0.5 ... | [
27,
34345,
29,
9288,
14,
34453,
690,
14,
7217,
42731,
1153,
17410,
14,
69,
39870,
62,
36673,
67,
12514,
13,
20362,
198,
3500,
9726,
3163,
20477,
198,
3500,
6779,
11964,
82,
198,
3500,
44800,
2348,
29230,
198,
3500,
14322,
45279,
15988,
... | 1.819149 | 564 |
@testset "accumulation.jl" begin
@testset "is_inplaceable_destination" begin
is_inplaceable_destination = ChainRulesCore.is_inplaceable_destination
@test is_inplaceable_destination([1, 2, 3, 4])
@test !is_inplaceable_destination(1:4)
@test is_inplaceable_destination(Diagonal([1, 2,... | [
31,
9288,
2617,
366,
4134,
388,
1741,
13,
20362,
1,
2221,
198,
220,
220,
220,
2488,
9288,
2617,
366,
271,
62,
259,
5372,
540,
62,
16520,
1883,
1,
2221,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
259,
5372,
540,
62,
16520,
... | 1.887906 | 3,051 |
<filename>src/agent/random.jl
using Random
struct RandomAgent{T}
actions::T
end
start!(agent::RandomAgent, env_s_tp1, rng::AbstractRNG=Random.GLOBAL_RNG) = rand(rng, agent.actions)
step!(agent::RandomAgent, env_s_tp1, r, terminal, rng::AbstractRNG=Random.GLOBAL_RNG) = rand(rng, agent.actions)
| [
27,
34345,
29,
10677,
14,
25781,
14,
25120,
13,
20362,
628,
198,
3500,
14534,
198,
198,
7249,
14534,
36772,
90,
51,
92,
198,
220,
220,
220,
4028,
3712,
51,
198,
437,
198,
9688,
0,
7,
25781,
3712,
29531,
36772,
11,
17365,
62,
82,
6... | 2.516667 | 120 |
<reponame>UnofficialJuliaMirrorSnapshots/AbstractLogic.jl-bd85187e-0531-4a3e-9fea-713204a818a2
function ALrange(userinput; verbose=true)
inputpass = string(replace(userinput, r"^(range)[\\:\\-\\ ]*"=>"")) |> strip
(inputpass == "") && (inputpass = join(string.(replset.keys),","))
for v in strip.(split(inp... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
23839,
11187,
291,
13,
20362,
12,
17457,
5332,
23451,
68,
12,
2713,
3132,
12,
19,
64,
18,
68,
12,
24,
5036,
64,
12,
50055,
18638,
64,
23,
1507,
64,
17... | 2.342342 | 222 |
<gh_stars>100-1000
"""
resolve_dependency!(dag::ExprDAG, node::ExprNode, options)
Build the DAG, resolve dependency.
"""
function resolve_dependency! end
resolve_dependency!(dag::ExprDAG, node::ExprNode, options) = dag
function resolve_dependency!(dag::ExprDAG, node::ExprNode{FunctionProto}, options)
cursor =... | [
27,
456,
62,
30783,
29,
3064,
12,
12825,
198,
37811,
198,
220,
220,
220,
10568,
62,
45841,
1387,
0,
7,
67,
363,
3712,
3109,
1050,
35,
4760,
11,
10139,
3712,
3109,
1050,
19667,
11,
3689,
8,
198,
15580,
262,
360,
4760,
11,
10568,
20... | 2.262519 | 3,375 |
# test core language features
# basic type relationships
@test Int8 <: Integer
@test Int32 <: Integer
@test (Int8,Int8) <: (Integer,Integer)
@test !(AbstractArray{Float64,2} <: AbstractArray{Number,2})
@test !(AbstractArray{Float64,1} <: AbstractArray{Float64,2})
@test (Integer,Integer...) <: (Integer,Real...)
@test (... | [
2,
1332,
4755,
3303,
3033,
198,
198,
2,
4096,
2099,
6958,
198,
31,
9288,
2558,
23,
1279,
25,
34142,
198,
31,
9288,
2558,
2624,
1279,
25,
34142,
198,
31,
9288,
357,
5317,
23,
11,
5317,
23,
8,
1279,
25,
357,
46541,
11,
46541,
8,
1... | 2.060664 | 16,847 |
using Test
using NeXLMatrixCorrection
include("xpp.jl")
include("citzaf.jl")
include("riveros.jl")
include("iterate.jl")
include("xppu.jl")
include("aspure.jl")
| [
3500,
6208,
198,
3500,
3169,
32457,
46912,
43267,
198,
198,
17256,
7203,
87,
381,
13,
20362,
4943,
198,
17256,
7203,
66,
4224,
1878,
13,
20362,
4943,
198,
17256,
7203,
38291,
418,
13,
20362,
4943,
198,
17256,
7203,
2676,
378,
13,
20362,... | 2.7 | 60 |
# *********************************************************************************
# REopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions a... | [
2,
41906,
17174,
8412,
9,
198,
2,
4526,
8738,
11,
15069,
357,
66,
8,
13130,
12,
42334,
11,
10302,
329,
45276,
6682,
11,
11419,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
... | 2.660848 | 1,604 |
<reponame>TSGut/MultivariateOrthogonalPolynomials.jl
using ApproxFun, MultivariateOrthogonalPolynomials, Plots, BlockArrays
import MultivariateOrthogonalPolynomials: Vec, DirichletTriangle
# Neumann
d = Triangle()
S = DirichletTriangle{1,1,1}(d)
Dx = Derivative(S,[1,0])
Dy = Derivative(S,[0,1])
B₁ = I : S → Lege... | [
27,
7856,
261,
480,
29,
4694,
38,
315,
14,
15205,
42524,
5574,
400,
519,
20996,
34220,
26601,
8231,
13,
20362,
198,
3500,
2034,
13907,
24629,
11,
7854,
42524,
5574,
400,
519,
20996,
34220,
26601,
8231,
11,
1345,
1747,
11,
9726,
3163,
... | 1.784191 | 797 |
using MyExample
using Test
@testset "MyExample.jl" begin
@test my_f(2, 1) == 7
@test my_f(2, 3) == 13
@test new_f(1, 2) == 0.5
end
| [
3500,
2011,
16281,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
3666,
16281,
13,
20362,
1,
2221,
198,
220,
220,
220,
2488,
9288,
616,
62,
69,
7,
17,
11,
352,
8,
6624,
767,
198,
220,
220,
220,
2488,
9288,
616,
62,
69,
7,
17,
... | 2.028169 | 71 |
<filename>src/DatasetStore/DatasetStore.jl
export DatasetStore, studydir, path, readonly, remove
include("Utils.jl")
abstract type DatasetStore end
# mandatory functions
@mustimplement studydir(::DatasetStore)
@mustimplement readonly(::DatasetStore)
# functions for writable store
@mustimplement Base.empty!(d::Datas... | [
27,
34345,
29,
10677,
14,
27354,
292,
316,
22658,
14,
27354,
292,
316,
22658,
13,
20362,
198,
39344,
16092,
292,
316,
22658,
11,
2050,
15908,
11,
3108,
11,
1100,
8807,
11,
4781,
198,
198,
17256,
7203,
18274,
4487,
13,
20362,
4943,
198... | 3.039604 | 202 |
<reponame>jtravs/Luna.jl
using Luna
import Luna.PhysData: wlfreq
import Logging
import FFTW
import NumericalIntegration: integrate, SimpsonEven
import LinearAlgebra: mul!, ldiv!
Logging.disable_logging(Logging.BelowMinLevel)
import PyPlot:pygui, plt
a = 225e-6
gas = :Ar
pres = 0.4
τfwhm = 30e-15
λ0 = 1800e-9
energy ... | [
27,
7856,
261,
480,
29,
73,
83,
4108,
82,
14,
43,
9613,
13,
20362,
198,
3500,
23694,
198,
11748,
23694,
13,
43215,
6601,
25,
266,
1652,
42180,
198,
11748,
5972,
2667,
198,
11748,
376,
9792,
54,
198,
11748,
399,
6975,
605,
34500,
135... | 1.915776 | 2,434 |
<reponame>JuliaDynamics/StateSpaceReconstruction.jl<gh_stars>1-10
import DelayEmbeddings: Dataset
"""
cembed(data::Dataset)
Returns an embedding consisting of a zero-lagged, unmodified version of `data`.
"""
function cembed(data::Dataset)
if size(data, 1) > size(data, 2)
#info("Treating each row as a ... | [
27,
7856,
261,
480,
29,
16980,
544,
35,
4989,
873,
14,
9012,
14106,
6690,
261,
15019,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
11748,
42698,
31567,
6048,
654,
25,
16092,
292,
316,
198,
198,
37811,
198,
220,
220,
220,
2... | 2.300672 | 1,041 |
export TR_step_computation
function TR_step_computation(h :: Float64,
g :: Float64,
dN :: Float64,
Δ :: Float64)
if h > 0.0
if g > 0.0
d = max(-Δ, dN)
else
d = min(dN, Δ)
end
else
if g > 0.0
d ... | [
39344,
7579,
62,
9662,
62,
785,
1996,
341,
198,
198,
8818,
7579,
62,
9662,
62,
785,
1996,
341,
7,
71,
7904,
48436,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 1.570833 | 240 |
<gh_stars>10-100
d1 = [1 => 4.2, 2 => 5.3]
d1 = {1 => 4.2, 2 => 5.3}
d2 = {"a"=>1, (2,3)=>true}
d3 = [:A => 100, :B => 200]
d3[:B] #> 200
# d3[:Z] #> ERROR: key not found: :Z
get(d3, :Z, 999) #> 999
in( (:Z, 999), d3) #> false
in( (:A, 100), d3) #> true
d3[:A] = 150 #> d3 is now [:A => 150, :B => 200]
d3[:C] = 300 #> ... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
67,
16,
796,
685,
16,
5218,
604,
13,
17,
11,
362,
5218,
642,
13,
18,
60,
198,
67,
16,
796,
1391,
16,
5218,
604,
13,
17,
11,
362,
5218,
642,
13,
18,
92,
198,
67,
17,
796,
19779,
6... | 2.118474 | 996 |
<reponame>vfonov/MriResearchTools.jl
"""
homodyne(mag, phase)
homodyne(mag, phase; dims, σ)
homodyne(I; kwargs...)
Performs homodyne filtering via division of complex complex smoothing.
"""
homodyne, homodyne!
homodyne(mag, phase; kwargs...) = homodyne(mag .* exp.(1im .* phase); kwargs...)
homodyne(... | [
27,
7856,
261,
480,
29,
85,
69,
261,
709,
14,
44,
380,
25104,
33637,
13,
20362,
198,
37811,
198,
220,
220,
220,
3488,
1118,
710,
7,
19726,
11,
7108,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
3488,
1118,
710,
7,
19726,
11,
... | 2.124197 | 467 |
<filename>examples/Symmetry reduction.jl
# # Symmetry reduction
#md # [](@__BINDER_ROOT_URL__/generated/Symmetry reduction.ipynb)
#md # [](@__NBVIEWER_ROOT_URL__/generated/Symmetry reduction.ipynb)
# **Adapted from**: [Sy... | [
27,
34345,
29,
1069,
12629,
14,
13940,
3020,
11973,
7741,
13,
20362,
198,
2,
1303,
1632,
3020,
11973,
7741,
198,
198,
2,
9132,
1303,
685,
0,
58,
16151,
5450,
1378,
1820,
65,
5540,
13,
2398,
14,
14774,
469,
62,
6404,
78,
13,
21370,
... | 2.369156 | 1,433 |
module CompressionStreams
using BufferedStreams
using Libz
export cstream
const MAGIC_TYPES = Dict(
UInt8[0x1f, 0x8b] => ZlibInflateInputStream
)
function cstream(filename::Union{ASCIIString, UTF8String})
bs = BufferedInputStream(open(filename))
return cstream(bs)
end
function cstream(io::IO)
bs ... | [
21412,
3082,
2234,
12124,
82,
198,
198,
3500,
8792,
1068,
12124,
82,
198,
3500,
7980,
89,
198,
198,
39344,
269,
5532,
198,
198,
9979,
28263,
2149,
62,
9936,
47,
1546,
796,
360,
713,
7,
198,
220,
220,
220,
471,
5317,
23,
58,
15,
87... | 2.420896 | 335 |
using ArgoData
using Test
@testset "ArgoData.jl" begin
# Write your own tests here.
end
| [
3500,
943,
2188,
6601,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
3163,
2188,
6601,
13,
20362,
1,
2221,
198,
220,
220,
220,
1303,
19430,
534,
898,
5254,
994,
13,
198,
437,
198
] | 2.735294 | 34 |
#=
# Cachesim example
=#
### If the Finch package has already been added, use this line #########
using Finch # Note: to add the package, first do: ]add "https://github.com/paralab/Finch.git"
### If not, use these four lines (working from the examples directory) ###
# if !@isdefined(Finch)
# include("../Finch.jl"... | [
2,
28,
198,
2,
327,
3694,
320,
1672,
198,
46249,
198,
198,
21017,
1002,
262,
45277,
5301,
468,
1541,
587,
2087,
11,
779,
428,
1627,
1303,
7804,
198,
3500,
45277,
1303,
5740,
25,
284,
751,
262,
5301,
11,
717,
466,
25,
2361,
2860,
3... | 2.81153 | 451 |
# Load required packages.
using CSVFiles, DataFrames, Mimi, MimiRICE2010, MimiNICE, Statistics
# Load helper functions and revenue recycling components being added to the NICE model.
include("helper_functions.jl")
include(joinpath("revenue_recycling_components", "nice_revenue_recycle_component_time_varying.jl"))
#--... | [
1303,
8778,
2672,
10392,
13,
198,
3500,
44189,
25876,
11,
6060,
35439,
11,
337,
25236,
11,
337,
25236,
49,
8476,
10333,
11,
337,
25236,
45,
8476,
11,
14370,
198,
198,
2,
8778,
31904,
5499,
290,
6426,
25914,
6805,
852,
2087,
284,
262,
... | 2.901674 | 1,434 |
module ImportKeysightBin
export importkeysightbin
@enum WaveformType begin
unknownwaveform = 0
normal = 1
peakdetect = 2
average = 3
logic = 6
end
@enum Unit begin
unknownunit = 0
volt = 1
second = 2
constant = 3
ampere = 4
decibel = 5
hertz = 6
end
@enum BufferType begin
unknowbuf = 0
float32 = 1
ma... | [
21412,
17267,
40729,
432,
33,
259,
198,
198,
39344,
1330,
13083,
432,
8800,
198,
198,
31,
44709,
17084,
687,
6030,
2221,
198,
197,
34680,
19204,
687,
796,
657,
198,
197,
11265,
796,
352,
198,
197,
36729,
15255,
478,
796,
362,
198,
197... | 2.248756 | 1,206 |
struct NewtonRaphson{CS, AD, DT, L} <: AbstractNewtonAlgorithm{CS,AD}
diff_type::DT
linsolve::L
end
function NewtonRaphson(;autodiff=true,chunk_size=12,diff_type=Val{:forward},linsolve=DEFAULT_LINSOLVE)
NewtonRaphson{chunk_size, autodiff, typeof(diff_type), typeof(linsolve)}(diff_type, linsolve)
end
mutab... | [
7249,
17321,
49,
6570,
1559,
90,
7902,
11,
5984,
11,
24311,
11,
406,
92,
1279,
25,
27741,
3791,
1122,
2348,
42289,
90,
7902,
11,
2885,
92,
198,
220,
220,
220,
814,
62,
4906,
3712,
24544,
198,
220,
220,
220,
300,
1040,
6442,
3712,
... | 2.120253 | 948 |
<filename>examples/3Scaling/3MatrixPerformance/MP2_SparseTEST.jl
using SparseArrays
n = 2 .^ [6 6 7 8 9 10 11 12 13 14 15 16 17 18]
K = 8
MaxGB = 2
MaxGF = 4 * 1.6
m = K .* n
sparse_gbytes = 9 * 8 * m ./ 1e9
sparse_flops = zeros(1,length(n))
sparse_gflops = zeros(1,length(n))
sparse_time = zeros(1,length(n))
for i... | [
27,
34345,
29,
1069,
12629,
14,
18,
3351,
4272,
14,
18,
46912,
32273,
14,
7378,
17,
62,
50,
29572,
51,
6465,
13,
20362,
198,
3500,
1338,
17208,
3163,
20477,
198,
198,
77,
796,
362,
764,
61,
685,
21,
718,
767,
807,
860,
838,
1367,
... | 2.025478 | 471 |
<filename>src/RIC2ECI.jl
function RIC2ECI3x3(RIC, r, v)
y = LinearAlgebra.cross(r, v)
r̂ = normalize(r)
ĉ = normalize(y)
î = LinearAlgebra.cross(ĉ, r̂)
rotate(RIC, r̂, î, ĉ)
end
@inline function combinecov(Σ₁, Σ₂, y, z)
Σ = Σ₁ + Σ₂
x = LinearAlgebra.cross(y, z)
a = Σ * x
Symmet... | [
27,
34345,
29,
10677,
14,
41132,
17,
2943,
40,
13,
20362,
198,
8818,
371,
2149,
17,
2943,
40,
18,
87,
18,
7,
41132,
11,
374,
11,
410,
8,
198,
220,
220,
220,
331,
796,
44800,
2348,
29230,
13,
19692,
7,
81,
11,
410,
8,
198,
220,... | 1.426905 | 1,286 |
<reponame>JuliaBinaryWrappers/GAP_pkg_io_jll.jl<filename>src/wrappers/x86_64-unknown-freebsd.jl
# Autogenerated wrapper script for GAP_pkg_io_jll for x86_64-unknown-freebsd
export io
using GAP_jll
using GAP_lib_jll
JLLWrappers.@generate_wrapper_header("GAP_pkg_io")
JLLWrappers.@declare_file_product(io)
function __init... | [
27,
7856,
261,
480,
29,
16980,
544,
33,
3219,
36918,
11799,
14,
38,
2969,
62,
35339,
62,
952,
62,
73,
297,
13,
20362,
27,
34345,
29,
10677,
14,
29988,
11799,
14,
87,
4521,
62,
2414,
12,
34680,
12,
5787,
1443,
67,
13,
20362,
198,
... | 2.170124 | 241 |
<filename>.buildkite/capture_tmpdir.jl
import Dates
import Pkg
import Tar
function my_exit(process::Base.Process)
wait(process)
@info(
"",
process.exitcode,
process.termsignal,
)
# Pass the exit code back up
if process.termsignal != 0
ccall(:raise, Cvoid, (Cint,), ... | [
27,
34345,
28401,
11249,
74,
578,
14,
27144,
495,
62,
22065,
15908,
13,
20362,
198,
11748,
44712,
198,
11748,
350,
10025,
198,
11748,
14110,
198,
198,
8818,
616,
62,
37023,
7,
14681,
3712,
14881,
13,
18709,
8,
198,
220,
220,
220,
4043... | 2.165888 | 1,712 |
if Sys.isunix()
cd(joinpath(dirname(@__FILE__), "src", "fdasrsf"))
suffix = Sys.isapple() ? "dylib" : "so"
run(`make clean`)
run(`make SUFFIX=$suffix`)
cd(joinpath(dirname(@__FILE__), "src", "gropt"))
run(`make clean`)
run(`make SUFFIX=$suffix`)
cd(joinpath(dirname(@__FILE__), "src", "fd... | [
361,
311,
893,
13,
271,
403,
844,
3419,
198,
220,
220,
220,
22927,
7,
22179,
6978,
7,
15908,
3672,
7,
31,
834,
25664,
834,
828,
366,
10677,
1600,
366,
16344,
292,
3808,
69,
48774,
198,
220,
220,
220,
35488,
796,
311,
893,
13,
271,... | 2.116641 | 643 |
<reponame>UnofficialJuliaMirrorSnapshots/HDF5.jl-f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f
include("build_Zlib.v1.2.11.jl")
include("build_HDF5.v1.10.5.jl")
| [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
39,
8068,
20,
13,
20362,
12,
69,
3134,
535,
65,
2598,
12,
68,
5066,
69,
12,
20,
66,
17,
69,
12,
4089,
17457,
12,
21,
17896,
15,
535,
66,
19,
7012,
... | 1.831325 | 83 |
<reponame>Moelf/EulerProject.jl
series = "
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
6222989342338030813533... | [
27,
7856,
261,
480,
29,
16632,
7046,
14,
36,
18173,
16775,
13,
20362,
198,
25076,
796,
366,
198,
4790,
21940,
1558,
2996,
25838,
20548,
21626,
17477,
1495,
16315,
3134,
2598,
2075,
3553,
38652,
1954,
2816,
27371,
1129,
2920,
2682,
198,
... | 2.265372 | 618 |
# actors.jl
using Rocket
struct StmActor <: Actor{String} end
Rocket.on_next!(actor::StmActor, data::String) = begin
if data == "READ_STMS"
stms = AppliAR.read_bank_statements("./bank.csv")
@show(stms)
subscribe!(from(stms), ar_actor)
end
end
Rocket.on_complete!(actor::StmActor) = @inf... | [
2,
10544,
13,
20362,
198,
198,
3500,
16920,
198,
198,
7249,
520,
76,
40277,
1279,
25,
27274,
90,
10100,
92,
886,
198,
50218,
13,
261,
62,
19545,
0,
7,
11218,
3712,
1273,
76,
40277,
11,
1366,
3712,
10100,
8,
796,
2221,
198,
220,
22... | 2.444887 | 753 |
draw(widget, area, buffer) = nothing
| [
19334,
7,
42655,
11,
1989,
11,
11876,
8,
796,
2147,
198
] | 3.363636 | 11 |
"""
get_edges(g,node_x,node_y)
g is a SimpleWeightedGraph, while node_x and node_y are
arrays containing the position of the nodes.
Return a DataFrame containing the edge information,
such as position, pairs and weights.
"""
function get_edges(g,node_x,node_y)
edges_p1 = []
edges_p2 = []
edges_w = Float64... | [
37811,
198,
1136,
62,
276,
3212,
7,
70,
11,
17440,
62,
87,
11,
17440,
62,
88,
8,
198,
70,
318,
257,
17427,
25844,
276,
37065,
11,
981,
10139,
62,
87,
290,
10139,
62,
88,
389,
198,
3258,
592,
7268,
262,
2292,
286,
262,
13760,
13,... | 1.854098 | 610 |
<filename>test/unit/line.jl
@testset "Get line" begin
table = init_log_table(
(id=:open_nodes, name="#Open"),
(id=:closed_nodes, name="#Closed", alignment=:right),
(id=:time, name="#Time", alignment=:left),
)
set_value!(table, :open_nodes, 10)
set_value!(table, :closed_nodes, 20... | [
27,
34345,
29,
9288,
14,
20850,
14,
1370,
13,
20362,
198,
31,
9288,
2617,
366,
3855,
1627,
1,
2221,
220,
198,
220,
220,
220,
3084,
796,
2315,
62,
6404,
62,
11487,
7,
198,
220,
220,
220,
220,
220,
220,
220,
357,
312,
28,
25,
9654... | 2.269904 | 1,256 |
using Symbolics, SymbolicUtils
function solve_newton(f, x, x₀; abstol=1e-8, maxiter=50)
xₙ = Float64(x₀)
fₙ₊₁ = x - f / Symbolics.derivative(f, x)
for i = 1:maxiter
xₙ₊₁ = substitute(fₙ₊₁, Dict(x => xₙ))
if abs(xₙ₊₁ - xₙ) < abstol
return xₙ₊₁
else
xₙ = xₙ₊₁... | [
198,
3500,
41327,
19615,
11,
41327,
4160,
18274,
4487,
198,
198,
8818,
8494,
62,
3605,
1122,
7,
69,
11,
2124,
11,
2124,
158,
224,
222,
26,
16552,
349,
28,
16,
68,
12,
23,
11,
3509,
2676,
28,
1120,
8,
198,
220,
220,
220,
2124,
15... | 1.639311 | 987 |
using NeuroCore
using Test
using Unitful
using CoordinateTransformations
using Documenter
using ColorTypes
#using NeuroCore: SPQuat, RotMatrix, quat2mat, mat2qua
using NeuroCore: s, Hz, °, T
using NeuroCore.FieldProperties
include("./ColorChannels/ColorChannels.jl")
include("./SpatialAPI/SpatialAPI.jl")
include("./... | [
3500,
13782,
14055,
198,
3500,
6208,
198,
3500,
11801,
913,
198,
3500,
22819,
4559,
41762,
602,
198,
3500,
16854,
263,
198,
3500,
5315,
31431,
198,
198,
2,
3500,
13782,
14055,
25,
6226,
4507,
265,
11,
18481,
46912,
11,
627,
265,
17,
6... | 2.056538 | 3,449 |
<filename>examples/alpha_spikes.jl<gh_stars>0
using ModelTES, Interpolations
type InterpolatedRIT{T} <: ModelTES.AbstractRIT
interpolator::T
end
T = collect((100:0.1:106)/1000)
slopes = ones(length(T)-1)
slopes[1:2]=0
# slopes[4:5]=1.1
slopes[17:20]=1.3
R = cumsum(slopes.*diff(T))
push!(R,R[end])
R*=0.01/R[end]
a=i... | [
27,
34345,
29,
1069,
12629,
14,
26591,
62,
2777,
7938,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
3500,
9104,
51,
1546,
11,
4225,
16104,
602,
198,
198,
4906,
4225,
16104,
515,
49,
2043,
90,
51,
92,
1279,
25,
9104,
51,
1546,
13,
... | 1.909091 | 836 |
<gh_stars>1-10
# one argument
@inline function eftSqr_inline{T<:StdFloat}(a::T)
hi = a * a
hi, fma(a, a, -hi)
end
@inline function eftIncr_inline{T<:StdFloat}(a::T)
b = one(T)
hi = a + b
t = hi - a
hi, ((a - (hi - t)) + (b - t))
end
@inline function eftDecr_inline{T<:StdFloat}(a::T)
b = o... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
530,
4578,
198,
198,
31,
45145,
2163,
304,
701,
50,
80,
81,
62,
45145,
90,
51,
27,
25,
1273,
67,
43879,
92,
7,
64,
3712,
51,
8,
198,
220,
220,
220,
23105,
796,
257,
1635,
257,
198... | 1.763262 | 1,263 |
<reponame>bischtob/MyGEMM
module TransposeNoPacking
using KernelAbstractions.Extras: @unroll
using SIMD: Vec, vload, vstore
using StaticArrays: MArray, MVector
using MyGEMM.Types: TilingParams
export multiply_transpose_no_packing!
"""
multiply_transpose_no_packing!(C, A, B, params)
Performs `C += A * B'` without ... | [
27,
7856,
261,
480,
29,
41907,
21474,
672,
14,
3666,
38,
3620,
44,
198,
21412,
3602,
3455,
2949,
47,
5430,
198,
198,
3500,
32169,
23839,
507,
13,
11627,
8847,
25,
2488,
403,
2487,
198,
3500,
23749,
35,
25,
38692,
11,
410,
2220,
11,
... | 2.063694 | 1,727 |
function destroy(band::AbstractRasterBand)
band.ptr = GDALRasterBand(C_NULL)
return band
end
function destroy(band::IRasterBand)
band.ptr = GDALRasterBand(C_NULL)
band.ownedby = Dataset()
return band
end
"""
blocksize(band::AbstractRasterBand)
Fetch the "natural" block size of this band.
GD... | [
198,
8818,
4117,
7,
3903,
3712,
23839,
49,
1603,
31407,
8,
198,
220,
220,
220,
4097,
13,
20692,
796,
27044,
1847,
49,
1603,
31407,
7,
34,
62,
33991,
8,
198,
220,
220,
220,
1441,
4097,
198,
437,
198,
198,
8818,
4117,
7,
3903,
3712,... | 3.033096 | 6,889 |
immutable Normal <: ContinuousUnivariateDistribution
mean::Float64
std::Float64
function Normal(mu::Real, sd::Real)
if sd > 0.0
new(float64(mu), float64(sd))
else
error("std must be positive")
end
end
end
Normal(mu::Real) = Normal(mu, 1.0)
Normal() = Normal(0.0, 1.0)
const G... | [
8608,
18187,
14435,
1279,
25,
45012,
3118,
42524,
20344,
3890,
198,
220,
220,
220,
1612,
3712,
43879,
2414,
198,
220,
220,
220,
14367,
3712,
43879,
2414,
198,
220,
220,
220,
2163,
14435,
7,
30300,
3712,
15633,
11,
45647,
3712,
15633,
8,... | 2.09611 | 437 |
<filename>src/DiffusionModels.jl
module DiffusionModels
using Parameters, Distributions
import Base: rand, get
export get, fpt, rand, ddm_fpt, ddm_rand
export AbstractDrift, ConstDrift, VarDrift
export AbstractSigma, ConstSigma, VarSigma
export AbstractBounds
export AbstractConstBounds, ConstSymBounds, ConstAsymBoun... | [
27,
34345,
29,
10677,
14,
28813,
4241,
5841,
1424,
13,
20362,
198,
21412,
10631,
4241,
5841,
1424,
198,
198,
3500,
40117,
11,
46567,
507,
198,
198,
11748,
7308,
25,
43720,
11,
651,
198,
198,
39344,
651,
11,
277,
457,
11,
43720,
11,
... | 3.155 | 200 |
module PaperAnalysis
using OceanWaveSpectralFitting, Optim, DSP
include("nonparametrics.jl")
const WindSea = JS_BWG_HNE_DL{0,40} # no aliasing and 40m water depth
"
movingaverage(vector, half_window_size)
Compute the moving average of a vector"
function movingaverage(vector::V... | [
21412,
14962,
32750,
198,
220,
220,
220,
1262,
10692,
39709,
49738,
1373,
37,
2535,
11,
30011,
11,
360,
4303,
198,
220,
220,
220,
2291,
7203,
13159,
17143,
316,
10466,
13,
20362,
4943,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1500... | 2.068802 | 1,686 |
using Distributions, Parameters, Random
import Distributions: pdf,logpdf,rand
export LBA,pdf,logpdf,rand
# See discussions at https://discourse.julialang.org/t/dynamichmc-reached-maximum-number-of-iterations/24721
############################################
# Model functions
###########... | [
3500,
46567,
507,
11,
40117,
11,
14534,
198,
11748,
46567,
507,
25,
37124,
11,
6404,
12315,
11,
25192,
198,
39344,
406,
4339,
11,
12315,
11,
6404,
12315,
11,
25192,
198,
198,
2,
220,
4091,
9984,
379,
3740,
1378,
15410,
9047,
13,
73,
... | 1.791566 | 1,660 |
#JuliaRL/src/A2C.jl
using ReinforcementLearning
using PyCall
using ReinforcementLearningEnvironments
using Random
using Flux
using TensorBoardLogger
using Dates
using Logging
using BSON
using Suppressor
include("./conf.jl")
include("./shared.jl")
"""
runA2Csave_dir, landing_factor=1, leg_first_bonus=0)
Trains t... | [
2,
16980,
544,
7836,
14,
10677,
14,
32,
17,
34,
13,
20362,
198,
198,
3500,
22299,
13442,
41730,
198,
3500,
9485,
14134,
198,
3500,
22299,
13442,
41730,
4834,
12103,
198,
3500,
14534,
198,
3500,
1610,
2821,
198,
3500,
309,
22854,
29828,
... | 1.993076 | 1,733 |
@testset "Kagome" begin
@test ndims(Kagome((10,5))) == 2
@testset "Constructors" begin
# test default BC
@test Kagome((10, 5)) == Kagome((10, 5), Periodic())
for B1 in [Periodic, Open, Helical]
@test (
Kagome((10, 5), B1())
== Kagome((10, 5... | [
198,
31,
9288,
2617,
366,
42,
363,
462,
1,
2221,
628,
220,
220,
220,
2488,
9288,
299,
67,
12078,
7,
42,
363,
462,
19510,
940,
11,
20,
22305,
6624,
362,
628,
220,
220,
220,
2488,
9288,
2617,
366,
42316,
669,
1,
2221,
198,
220,
22... | 2.014218 | 2,532 |
using PyPlot
using SpecialFunctions
using MittagLefflerFunctions
using OffsetArrays
function g(y)
x = (1+y) / (1-y)
return ( erfcx(x) - one(y) ) / x
end
function Eneg(a, x)
y = (x-1) / (x+1)
return 1 + x * chebyshev_sum(a, y)
end
nmax = 20
a = OffsetArray{Float64}(undef, 0:nmax)
M = 2nmax
chebyshev_c... | [
3500,
9485,
43328,
198,
3500,
6093,
24629,
2733,
198,
3500,
16627,
363,
3123,
487,
1754,
24629,
2733,
198,
3500,
3242,
2617,
3163,
20477,
198,
198,
8818,
308,
7,
88,
8,
198,
220,
220,
220,
2124,
796,
357,
16,
10,
88,
8,
1220,
357,
... | 2.019355 | 310 |
struct LTObsDist{M<:ObsModel}
distances::ClearDistances
model::M
end
obs_model(d::LTObsDist) = d.model
struct DESPOTEmu <: ObsModel
std::Float64
cdf::ReadingCDF
end
obs_type(::Type{DESPOTEmu}) = DMeas
gausscdf(mu, sigma, x) = (1+erf((x-mu)/(sigma*sqrt(2))))/2
function DESPOTEmu(f::Floor, std::Float... | [
7249,
406,
10468,
1443,
20344,
90,
44,
27,
25,
31310,
17633,
92,
198,
220,
220,
220,
18868,
3712,
19856,
20344,
1817,
198,
220,
220,
220,
2746,
3712,
44,
198,
437,
198,
198,
8158,
62,
19849,
7,
67,
3712,
43,
10468,
1443,
20344,
8,
... | 1.84718 | 1,649 |
<reponame>devmotion/Stheno.jl
import Base: print
# Base means.
print(io::IO, m::EmpiricalMean) = print(io, "EmpiricalMean")
# Base kenrels.
print(io::IO, k::ZeroKernel) = print(io, "0")
print(io::IO, k::ConstantKernel) = print(io, k.c)
print(io::IO, k::EmpiricalKernel) = print(io, "EmpiricalKernel")
# Composite Kern... | [
27,
7856,
261,
480,
29,
7959,
38714,
14,
1273,
831,
78,
13,
20362,
198,
11748,
7308,
25,
3601,
198,
198,
2,
7308,
1724,
13,
198,
4798,
7,
952,
3712,
9399,
11,
285,
3712,
36,
3149,
343,
605,
5308,
272,
8,
796,
3601,
7,
952,
11,
... | 2.057061 | 1,735 |
using SgdlDev
using Documenter
DocMeta.setdocmeta!(SgdlDev, :DocTestSetup, :(using SgdlDev); recursive=true)
makedocs(;
modules=[SgdlDev],
authors="<NAME> <<EMAIL>> and contributors",
repo="https://github.com/laurent-daniel/SgdlDev.jl/blob/{commit}{path}#{line}",
sitename="SgdlDev.jl",
format=Docu... | [
3500,
311,
21287,
75,
13603,
198,
3500,
16854,
263,
198,
198,
23579,
48526,
13,
2617,
15390,
28961,
0,
7,
50,
21287,
75,
13603,
11,
1058,
23579,
14402,
40786,
11,
36147,
3500,
311,
21287,
75,
13603,
1776,
45115,
28,
7942,
8,
198,
198,... | 2.16263 | 289 |
<gh_stars>0
# Multiple supresion using the parabolic Radon transform. Synthetic example.
using PyPlot, Seismic
close("all")
# 1- Make an ideal Radon Gather
source = Ricker()
ns = length(source)
np = 100
nt = 600
nw = nt
nh = 80
dt = 0.004
h = collect(linspace(0.0, 1000.0, nh))
p = collect(linspace(-0.04, 2.2, np))... | [
27,
456,
62,
30783,
29,
15,
198,
2,
20401,
7418,
411,
295,
1262,
262,
1582,
29304,
5325,
261,
6121,
13,
26375,
6587,
1672,
13,
198,
198,
3500,
9485,
43328,
11,
1001,
1042,
291,
198,
198,
19836,
7203,
439,
4943,
198,
198,
2,
352,
1... | 2.134402 | 811 |
# *****************************************************************************
# 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.360811 | 6,660 |
<reponame>usnistgov/Pope.jl<filename>scripts/noise_analysis.jl<gh_stars>1-10
#!/bin/bash
#=
JULIA="${JULIA:-julia}"
JULIA_CMD="${JULIA_CMD:-$JULIA --color=yes --startup-file=no}"
# below gets the directory name of the script, even if there is a symlink involved
# from https://stackoverflow.com/questions/59895/get-the-s... | [
27,
7856,
261,
480,
29,
385,
77,
396,
9567,
14,
46172,
13,
20362,
27,
34345,
29,
46521,
14,
3919,
786,
62,
20930,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
48443,
8800,
14,
41757,
198,
2,
28,
198,
41,
6239,
3539,
... | 2.472196 | 2,122 |
<reponame>maleadt/FastSplat.jl<filename>src/FastSplat.jl
module FastSplat
export @fastsplat
macro fastsplat(call)
@assert call.head == :call
f = call.args[1]
args = call.args[2:end]
# figure out which arguments are splats
splats = map(arg->isa(arg,Expr) && arg.head==:(...), args)
gen = defin... | [
27,
7856,
261,
480,
29,
22606,
324,
83,
14,
22968,
26568,
265,
13,
20362,
27,
34345,
29,
10677,
14,
22968,
26568,
265,
13,
20362,
198,
21412,
12549,
26568,
265,
198,
198,
39344,
2488,
69,
5773,
489,
265,
198,
198,
20285,
305,
3049,
... | 2.118812 | 1,010 |
# MIT license
# Copyright (c) Microsoft Corporation. All rights reserved.
# See LICENSE in the project root for full license information.
"""
BoundingBox{T<:Real}
Axis-aligned three-dimensional bounding box.
```julia
BoundingBox(xmin::T, xmax::T, ymin::T, ymax::T, zmin::T, zmax::T)
BoundingBox(s::Surface{T})
Bou... | [
2,
17168,
5964,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
4091,
38559,
24290,
287,
262,
1628,
6808,
329,
1336,
5964,
1321,
13,
198,
198,
37811,
198,
220,
220,
220,
347,
9969,
14253,
90,
51,
27,
25,... | 1.933364 | 6,543 |
using Distributed
using Test
using ParallelUtilities
import ParallelUtilities: ProductSplit, ProductSection, ZipSplit, zipsplit,
minimumelement, maximumelement, extremaelement, nelements, dropleading, indexinproduct,
extremadims, localindex, extrema_commonlastdim, whichproc, procrange_recast, whichproc_localindex,
geti... | [
3500,
4307,
6169,
198,
3500,
6208,
198,
3500,
42945,
18274,
2410,
198,
11748,
42945,
18274,
2410,
25,
8721,
41205,
11,
8721,
16375,
11,
38636,
41205,
11,
1976,
2419,
489,
270,
11,
198,
1084,
320,
2454,
1732,
11,
12991,
2454,
1732,
11,
... | 1.754948 | 10,712 |
<filename>src/ladder_graph.jl<gh_stars>0
export ladder_graph
"""
ladder_adj(w1, w2)
return true if words `w1` and `w2` have the same length
and differ in exactly one location.
"""
function ladder_adj(w1::String, w2::String)::Bool
if length(w1) != length(w2)
return false
end
c = collect(w1) .!=... | [
27,
34345,
29,
10677,
14,
9435,
1082,
62,
34960,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
39344,
18002,
62,
34960,
628,
198,
37811,
198,
220,
220,
220,
18002,
62,
41255,
7,
86,
16,
11,
266,
17,
8,
198,
7783,
2081,
611,
2456,
... | 2.081197 | 702 |
<filename>src/old/FeatureCreators/TileCoder.jl
# Module for tilecoding functionality
include("utilities/TileCoding.jl")
"""
TileCoder(num_tilings, num_tiles, num_features, num_ints)
Tile coder for coding all features together.
"""
mutable struct TileCoder <: AbstractFeatureCreator
# Main Arguments
num_til... | [
27,
34345,
29,
10677,
14,
727,
14,
38816,
16719,
669,
14,
35103,
34,
12342,
13,
20362,
198,
198,
2,
19937,
329,
17763,
66,
7656,
11244,
198,
17256,
7203,
315,
2410,
14,
35103,
34,
7656,
13,
20362,
4943,
198,
198,
37811,
198,
220,
22... | 2.377193 | 456 |
<reponame>csendranshi/Hackerrank-Codes
"""
Given an integer n = 4, the output should be
#
##
###
####
ref: https://www.hackerrank.com/challenges/staircase/problem
"""
function staircase(size = nothing,builder = nothing, pad_char = nothing)
"""
The method takes the size, builder and padding character of... | [
27,
7856,
261,
480,
29,
6359,
437,
26084,
5303,
14,
32833,
8056,
962,
12,
34,
4147,
198,
37811,
198,
15056,
281,
18253,
299,
796,
604,
11,
262,
5072,
815,
307,
628,
220,
220,
1303,
198,
220,
22492,
198,
44386,
198,
4242,
198,
198,
... | 3.014778 | 406 |
<reponame>Goysa2/ARCTR.jl
export TRARC
function TRARC(nlp :: AbstractNLPModel,
x₀ :: Array{Float64,1},
TR :: TrustRegion,
c :: Combi;
atol :: Float64 = 1e-8,
rtol :: Float64 = 1.0e-6,
max_eval :: Int = 50_000,
max_iter :: In... | [
27,
7856,
261,
480,
29,
38,
726,
11400,
17,
14,
1503,
4177,
49,
13,
20362,
198,
39344,
7579,
25793,
198,
8818,
7579,
25793,
7,
21283,
79,
7904,
27741,
45,
19930,
17633,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 1.831464 | 3,210 |
"""
function profile(
theta_init::Vector{Float64},
theta_num::Int,
loss_func::Function;
skip_optim::Bool = false,
theta_bounds::Vector{Tuple{Float64,Float64}} = fill((-Inf, Inf), length(theta_init)),
local_alg::Symbol = :LN_NELDERMEAD,
ftol_abs::Float64 = 1e... | [
198,
37811,
198,
220,
220,
220,
2163,
7034,
7,
198,
220,
220,
220,
220,
220,
220,
220,
262,
8326,
62,
15003,
3712,
38469,
90,
43879,
2414,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
262,
8326,
62,
22510,
3712,
5317,
11,
198,
22... | 2.115832 | 1,977 |
<reponame>DengYuelin/ConstrainedControl.jl
module ConstrainedControl
using ConstrainedDynamics
using ConstrainedDynamics: svcat, szeros
using LinearAlgebra
using StaticArrays
using Rotations
using Rotations: rotation_error
export PID,
LQR,
TrackingLQR,
ilqr
include(joinpath("util","util.jl"))
include(j... | [
27,
7856,
261,
480,
29,
35,
1516,
56,
2731,
259,
14,
3103,
2536,
1328,
15988,
13,
20362,
198,
21412,
1482,
2536,
1328,
15988,
198,
198,
3500,
1482,
2536,
1328,
35,
4989,
873,
198,
3500,
1482,
2536,
1328,
35,
4989,
873,
25,
38487,
92... | 2.790698 | 172 |
using Weave
using Test
s1= """
```julia
using NonExisting
```
```julia
x =
```
```julia;term=true
plot(x)
y = 10
print(y
```
"""
p1 = Weave.parse_doc(s1, "markdown")
doc = Weave.WeaveDoc("dummy1.jmd", p1, Dict())
doc1 = Weave.run(doc, doctype = "pandoc")
doc1.chunks[1].output
@test doc1.chunks[1].output == "Er... | [
3500,
775,
1015,
198,
3500,
6208,
198,
198,
82,
16,
28,
37227,
198,
198,
15506,
63,
73,
43640,
198,
3500,
8504,
3109,
9665,
198,
15506,
63,
198,
198,
15506,
63,
73,
43640,
198,
87,
796,
198,
15506,
63,
628,
198,
15506,
63,
73,
436... | 2.512605 | 595 |
<filename>docs/make.jl
using Documenter #, DocumenterLaTeX
using HMMGradients
makedocs(
sitename = "HMMGradients",
format = [Documenter.HTML()],#, DocumenterLaTeX.LaTeX()],
authors = "<NAME>",
modules = [HMMGradients],
pages = [
"Home" => "index.md",
"Theory and Notation" => "1_intr... | [
27,
34345,
29,
31628,
14,
15883,
13,
20362,
198,
3500,
16854,
263,
1303,
11,
16854,
263,
14772,
49568,
198,
3500,
367,
12038,
42731,
2334,
198,
198,
76,
4335,
420,
82,
7,
198,
220,
220,
220,
1650,
12453,
796,
366,
39,
12038,
42731,
... | 2.458472 | 301 |
# *****************************************************************************
# Written by <NAME>, <EMAIL>
# *****************************************************************************
# Copyright ã 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administr... | [
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,
1853,
11,
1578,
1829,
5070,
11,
355,
7997,
416,
262,
198,
2,
22998,
286,
262,
2... | 3.353279 | 1,220 |
<filename>src/password/lib.jl
module password
export check, check_strict, is_candidate, is_candidate_strict
using StatsBase
function check(first::Int, last::Int)
return count([is_candidate(pass) for pass in first:last])
end
function check_strict(first::Int, last::Int)
return count([is_candidate(pass) && is_... | [
27,
34345,
29,
10677,
14,
28712,
14,
8019,
13,
20362,
198,
21412,
9206,
198,
198,
39344,
2198,
11,
2198,
62,
301,
2012,
11,
318,
62,
46188,
20540,
11,
318,
62,
46188,
20540,
62,
301,
2012,
198,
198,
3500,
20595,
14881,
198,
198,
881... | 3.033333 | 360 |
import Robotlib: ad, adi
using Random
"""
Tn0, xi, et, er = calibLPOE(xin, Tn0in, Ta, q; maxiter=10, λ=1.0)
Performs kinematic calibration using the local POE formulation of kinematics.
- `Tn0` Nominal forward kinematics
- `xi` Twists
- `et` Translational errors as function of iteration of algorithm
- `er` Rotatio... | [
11748,
16071,
8019,
25,
512,
11,
512,
72,
198,
3500,
14534,
198,
37811,
198,
220,
220,
220,
309,
77,
15,
11,
2124,
72,
11,
2123,
11,
1931,
796,
27417,
43,
16402,
36,
7,
87,
259,
11,
309,
77,
15,
259,
11,
11940,
11,
10662,
26,
... | 1.669103 | 7,389 |
<filename>docs/make.jl
using Documenter, ObjectFile
makedocs(modules = [ObjectFile],
sitename = "ObjectFile.jl",
pages = [
"Home" => "index.md"
]
)
deploydocs(
repo = "github.com/staticfloat/ObjectFile.jl.git",
target = "build"
)
| [
27,
34345,
29,
31628,
14,
15883,
13,
20362,
198,
3500,
16854,
263,
11,
9515,
8979,
198,
198,
76,
4335,
420,
82,
7,
18170,
796,
685,
10267,
8979,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1650,
12453,
796,
366,
10267,
8979,
... | 2.146154 | 130 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.