content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
suml2loss(yhat, y) = sum((yhat .- y).^2)
sumabsloss(yhat, y) = sum(abs.(yhat .- y))
l2loss(yhat, y) = mean((yhat .- y).^2)
absloss(yhat, y) = mean(abs.(yhat .- y))
mape(yhat, y, eps = 1.0) =
100.0 * mean(abs.(yhat .- (y .+ eps)) ./ abs.(y .+ eps))
| [
16345,
75,
17,
22462,
7,
88,
5183,
11,
331,
8,
796,
2160,
19510,
88,
5183,
764,
12,
331,
737,
61,
17,
8,
198,
16345,
397,
6649,
793,
7,
88,
5183,
11,
331,
8,
796,
2160,
7,
8937,
12195,
88,
5183,
764,
12,
331,
4008,
198,
75,
... | 1.839416 | 137 |
<reponame>OptimalDesignLab/PDESolver.jl<gh_stars>10-100
module Input
import MPI
using ODLCommonTools
using PETSc2
using Utils
export read_input, make_input, read_input_file, registerOptionsChecker,
printOpts
include("physics_specific.jl")
include("read_input.jl")
include("make_input.jl")
in... | [
27,
7856,
261,
480,
29,
27871,
4402,
23067,
17822,
14,
5760,
1546,
14375,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
21412,
23412,
628,
220,
1330,
4904,
40,
198,
220,
1262,
31245,
5639,
2002,
261,
33637,
198,
220,
1262,
... | 2.723404 | 141 |
# ------------------------------------------------------------------
# Copyright (c) 2018, <NAME> <<EMAIL>>
# Licensed under the ISC License. See LICENCE in the project root.
# ------------------------------------------------------------------
"""
Crimisini(tilesize)
Examplar-based inpainting based on confidence
... | [
2,
16529,
438,
198,
2,
15069,
357,
66,
8,
2864,
11,
1279,
20608,
29,
9959,
27630,
4146,
4211,
198,
2,
49962,
739,
262,
3180,
34,
13789,
13,
4091,
38559,
18310,
287,
262,
1628,
6808,
13,
198,
2,
16529,
438,
198,
198,
37811,
198,
22... | 2.395573 | 1,039 |
# ==================================
# FOM
#
# system type: continuous LTI system
# state dimension: 1006
# input dimension: 1
# ==================================
using ReachabilityBenchmarks, MathematicalSystems, LazySets, MAT
function fom_model()
file = matopen(@relpath "fom.mat")
# system matrix
A = f... | [
2,
46111,
28,
198,
2,
376,
2662,
198,
2,
198,
2,
1080,
2099,
25,
12948,
406,
25621,
1080,
198,
2,
1181,
15793,
25,
1802,
21,
198,
2,
5128,
15793,
25,
352,
198,
2,
46111,
28,
198,
3500,
25146,
1799,
44199,
14306,
11,
30535,
605,
... | 2.794393 | 214 |
<reponame>JuliaTagBot/DataBench.jl
# create an index for id6
# building an index is too time consuming
import Base.ht_keyindex
import Base.ht_keyindex2
function buildindex{T}(val::Vector{T})
index = Dict{T,Vector{Int64}}()
for (i,v) in enumerate(val)
dindex = ht_keyindex(index, v)
if dindex > 0
push!... | [
27,
7856,
261,
480,
29,
16980,
544,
24835,
20630,
14,
6601,
44199,
13,
20362,
198,
2,
2251,
281,
6376,
329,
4686,
21,
198,
2,
2615,
281,
6376,
318,
1165,
640,
18587,
198,
11748,
7308,
13,
4352,
62,
2539,
9630,
198,
11748,
7308,
13,
... | 2.188235 | 510 |
export StochEnKF, SeqStochEnKF
"""
$(TYPEDEF)
A structure for the stochastic ensemble Kalman filter (sEnKF)
References:
<NAME>. (1994). Sequential data assimilation with a nonlinear quasi‐geostrophic model using Monte Carlo methods to forecast error statistics. Journal of Geophysical Research: Oceans, 99(C5), 10143... | [
39344,
520,
5374,
4834,
42,
37,
11,
1001,
80,
1273,
5374,
4834,
42,
37,
198,
198,
37811,
198,
3,
7,
9936,
47,
1961,
25425,
8,
198,
198,
32,
4645,
329,
262,
3995,
354,
3477,
34549,
12612,
805,
8106,
357,
82,
4834,
42,
37,
8,
198,... | 2.054838 | 4,103 |
<reponame>singularitti/Yggdrasil
# build a single GAP binary which supports Julia 1.3 - 1.5
include("../common.jl")
platforms = configure(v"1.5", v"1.5.3")
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("GMP_jll", compat="6.1.2"),
Dependency("Readline_jll", ... | [
27,
7856,
261,
480,
29,
12215,
934,
715,
72,
14,
56,
1130,
7109,
292,
346,
198,
2,
1382,
257,
2060,
402,
2969,
13934,
543,
6971,
22300,
352,
13,
18,
532,
352,
13,
20,
198,
17256,
7203,
40720,
11321,
13,
20362,
4943,
198,
198,
2425... | 2.633065 | 248 |
using Documenter, DynClust
makedocs()
| [
3500,
16854,
263,
11,
39530,
2601,
436,
198,
198,
76,
4335,
420,
82,
3419,
198
] | 2.6 | 15 |
module chitchat
# package code goes here
export Trie, add_to_trie
include("trie.jl")
end # module
| [
21412,
442,
2007,
265,
198,
198,
2,
5301,
2438,
2925,
994,
198,
39344,
309,
5034,
11,
751,
62,
1462,
62,
83,
5034,
198,
198,
17256,
7203,
83,
5034,
13,
20362,
4943,
198,
198,
437,
1303,
8265,
198
] | 2.72973 | 37 |
function solve_poisson_cg( LF::LF3dGrid, rho::Array{Float64,1}, NiterMax::Int64;
verbose=false, TOL=5.e-10 )
Npoints = LF.Nx * LF.Ny * LF.Nz
#
phi = zeros( Float64, Npoints ) # XXX or use some starting guess
#
r = zeros( Float64, Npoints )
p = zeros( Float64, Npoints )... | [
8818,
8494,
62,
7501,
30927,
62,
66,
70,
7,
47629,
3712,
43,
37,
18,
67,
41339,
11,
374,
8873,
3712,
19182,
90,
43879,
2414,
11,
16,
5512,
399,
2676,
11518,
3712,
5317,
2414,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 1.747997 | 1,373 |
module StatisticalTests
# packages
using Printf
using DataAPI, DataFrames
using Distributions, Statistics, StatsBase, StatsModels, GLM
using Reexport
@reexport using StatsModels
const D = Distributions
# end packages
# imports
import Base: show
# import StatsBase: PValue, S... | [
21412,
34931,
51,
3558,
628,
220,
220,
220,
1303,
10392,
198,
220,
220,
220,
1262,
12578,
69,
198,
220,
220,
220,
1262,
6060,
17614,
11,
6060,
35439,
198,
220,
220,
220,
1262,
46567,
507,
11,
14370,
11,
20595,
14881,
11,
20595,
5841,
... | 2.663223 | 484 |
<reponame>kafisatz/DecisionTrees.jl<gh_stars>1-10
#=
#Bagging of multiple boosted trees
function bagged_boosted_tree(mappings::Array{Array{String,1},1},candMatWOMaxValues::Array{Array{Float64,1},1},sett::ModelSettings,actualNumerator::Array{Float64,1},denominator::Array{Float64,1},weight::Array{Float64,1}, numfeat... | [
27,
7856,
261,
480,
29,
74,
1878,
271,
27906,
14,
10707,
1166,
51,
6037,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
28,
220,
201,
198,
201,
198,
2,
33,
16406,
286,
3294,
29657,
7150,
201,
198,
8818,
6131,
2004,
62,
... | 2.740233 | 1,459 |
module ElectronDisplay
export electrondisplay
using Electron, Base64, Markdown
import IteratorInterfaceExtensions, TableTraits, TableShowUtils
struct ElectronDisplayType <: Base.AbstractDisplay end
electron_showable(m, x) =
m ∉ ("application/vnd.dataresource+json", "text/html", "text/markdown") &&
showable... | [
21412,
5903,
1313,
23114,
198,
198,
39344,
30880,
623,
271,
1759,
198,
198,
3500,
5903,
1313,
11,
7308,
2414,
11,
2940,
2902,
198,
198,
11748,
40806,
1352,
39317,
11627,
5736,
11,
8655,
15721,
896,
11,
8655,
15307,
18274,
4487,
198,
198... | 2.222324 | 5,456 |
<reponame>robertfeldt/FeldtLib.jl<filename>src/t.jl
beta = -0.14
x0 = nothing
time_limit = 10.0
d_pseudo = nothing
delta_treshold = 1e-10
verbose = true
max_degree = 5
num_bootstrap = 100
alpha = 0.20
# Get a regression problem with 2 covars, expand it and use a model with 1 active covar.
rp, y, errors = rando... | [
27,
7856,
261,
480,
29,
305,
4835,
16265,
83,
14,
14304,
335,
83,
25835,
13,
20362,
27,
34345,
29,
10677,
14,
83,
13,
20362,
198,
197,
31361,
796,
532,
15,
13,
1415,
198,
197,
87,
15,
796,
2147,
198,
197,
2435,
62,
32374,
796,
8... | 2.301402 | 856 |
angle(n::Int)::Int = 180(n-2) | [
9248,
7,
77,
3712,
5317,
2599,
25,
5317,
796,
11546,
7,
77,
12,
17,
8
] | 1.933333 | 15 |
"""
Line search method to apply once the direction is computed.
"""
abstract type LineSearchMethod end
struct Agnostic <: LineSearchMethod end
struct Backtracking <: LineSearchMethod end
struct Goldenratio <: LineSearchMethod end
struct Nonconvex <: LineSearchMethod end
struct Shortstep <: LineSearchMethod end
struct... | [
198,
37811,
198,
13949,
2989,
2446,
284,
4174,
1752,
262,
4571,
318,
29231,
13,
198,
37811,
198,
397,
8709,
2099,
6910,
18243,
17410,
886,
198,
198,
7249,
2449,
43758,
1279,
25,
6910,
18243,
17410,
886,
198,
7249,
5157,
36280,
1279,
25,... | 2.880435 | 368 |
<reponame>schmidDan/FeedbackNets.jl
module AbstractFeedbackNets
using ..Splitters
using ..Mergers
export AbstractFeedbackNet, splitnames, namesvalid
"""
AbstractFeedbackNet
Abstract base type for networks that include handling for feedback.
# Interface
Any subtype should support iteration (over its layers) in... | [
27,
7856,
261,
480,
29,
20601,
13602,
21174,
14,
18332,
1891,
45,
1039,
13,
20362,
198,
21412,
27741,
18332,
1891,
45,
1039,
198,
198,
3500,
11485,
41205,
1010,
198,
3500,
11485,
13102,
5355,
198,
198,
39344,
27741,
18332,
1891,
7934,
1... | 3.046512 | 473 |
{"score_count": 221819, "score": 7.46, "timestamp": 1579599009.0}
{"score_count": 201402, "score": 7.49, "timestamp": 1559908321.0}
{"score_count": 199376, "score": 7.49, "timestamp": 1557516689.0}
{"score_count": 197907, "score": 7.49, "timestamp": 1555968447.0}
{"score_count": 197907, "score": 7.49, "timestamp": 1555... | [
4895,
26675,
62,
9127,
1298,
2534,
1507,
1129,
11,
366,
26675,
1298,
767,
13,
3510,
11,
366,
16514,
27823,
1298,
1315,
41544,
2079,
28694,
13,
15,
92,
198,
4895,
26675,
62,
9127,
1298,
580,
32531,
11,
366,
26675,
1298,
767,
13,
2920,
... | 2.355626 | 942 |
<filename>src/classencoding.jl<gh_stars>1-10
export ClassEncoding, BinaryClassEncoding, MultinomialClassEncoding
export OneHotClassEncoding
export labelencode, labeldecode, groupindices
export nclasses, labels, classDistribution
import MLBase.labelencode
import MLBase.labeldecode
import MLBase.groupindices
import Base... | [
27,
34345,
29,
10677,
14,
4871,
12685,
7656,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
39344,
5016,
27195,
7656,
11,
45755,
9487,
27195,
7656,
11,
7854,
259,
49070,
9487,
27195,
7656,
198,
39344,
1881,
21352,
9487,
27195,
7... | 3.049521 | 2,504 |
<filename>test/geometry.jl
a1 = GeoLocation(-33.8308, 151.223, 0.0)
a2 = GeoLocation(-33.8293, 151.221, 0.0)
A = [a1, a2]
b1 = GeoLocation(-33.8294, 150.22, 0.0)
b2 = GeoLocation(-33.8301, 151.22, 0.0)
B = [b1, b2]
node_a1 = Node(1,a1,nothing)
node_a2 = Node(1,a2,nothing)
node_b1 = Node(1,b1,nothing)
node_b2 = Node(1,b... | [
27,
34345,
29,
9288,
14,
469,
15748,
13,
20362,
198,
64,
16,
796,
32960,
14749,
32590,
2091,
13,
23,
21495,
11,
25326,
13,
22047,
11,
657,
13,
15,
8,
198,
64,
17,
796,
32960,
14749,
32590,
2091,
13,
23,
31675,
11,
25326,
13,
26115... | 2.161122 | 1,533 |
##################################################
# Visualising TR Bilevel and data-collecting iteration tools
##################################################
module BilevelVisualise
using Printf
using FileIO
using Setfield
using ColorTypes: Gray
using ImageContrastAdjustment
import GR
using AlgTools.Util
using ... | [
29113,
14468,
2235,
198,
2,
15612,
1710,
7579,
347,
576,
626,
290,
1366,
12,
33327,
278,
24415,
4899,
198,
29113,
14468,
2235,
198,
198,
21412,
347,
576,
626,
36259,
786,
198,
198,
3500,
12578,
69,
198,
3500,
9220,
9399,
198,
3500,
53... | 1.969405 | 4,772 |
<filename>src/types/member.jl<gh_stars>1-10
export Member
"""
A [`Guild`](@ref) member.
More details [here](https://discordapp.com/developers/docs/resources/guild#guild-member-object).
"""
struct Member
user::Optional{User}
nick::OptionalNullable{String} # Not supposed to be nullable.
roles::Vector{Snowfl... | [
27,
34345,
29,
10677,
14,
19199,
14,
19522,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
39344,
10239,
198,
198,
37811,
198,
32,
685,
63,
38,
3547,
63,
16151,
31,
5420,
8,
2888,
13,
198,
5167,
3307,
685,
1456,
16151,
5450,... | 2.732955 | 176 |
<gh_stars>1-10
#
# This test code is released under the license conditions of
# TetGen.jl and Triangulate.jl
#
using Test
using SimplexGridFactory
using ExtendableGrids
using GridVisualize
using Triangulate
using TetGen
using LinearAlgebra
# Generated point numbers depend on floating point operations,
# so we don't in... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
198,
2,
770,
1332,
2438,
318,
2716,
739,
262,
5964,
3403,
286,
198,
2,
27351,
13746,
13,
20362,
290,
7563,
648,
5039,
13,
20362,
198,
2,
198,
3500,
6208,
198,
3500,
3184,
11141,
41339,
... | 1.864134 | 5,844 |
<reponame>Helmuthn/naumer_ICML_2022.jl<filename>PlotGeneration/DescentTrajectory/SurfacePlot.jl
using CSV
using LinearAlgebra: dot, I
using CairoMakie
const Σ = [1.0 0.1 0.1;
0.1 1.0 0.1;
0.1 0.1 1.0]
const v = [1.0/sqrt(3), 1.0/sqrt(3), 1.0/sqrt(3)]
const σ² = 1
const Σ2 = -0.95 * v * v'... | [
27,
7856,
261,
480,
29,
12621,
76,
1071,
77,
14,
2616,
6975,
62,
2149,
5805,
62,
1238,
1828,
13,
20362,
27,
34345,
29,
43328,
8645,
341,
14,
5960,
1087,
15721,
752,
652,
14,
14214,
2550,
43328,
13,
20362,
198,
3500,
44189,
198,
3500... | 1.884918 | 1,651 |
<filename>challenges/2022-04-26-dojo-anniversary-edition/julia/src/julia.jl
using Test
const TallPosition = CartesianIndex
const WidePosition = NTuple{2,CartesianIndex}
const BlockPosition = Union{TallPosition,WidePosition}
"Compare `WidePosition`s in an order-agnostic way"
function Base.:(==)(left::WidePosition, r... | [
27,
34345,
29,
36747,
34120,
14,
1238,
1828,
12,
3023,
12,
2075,
12,
4598,
7639,
12,
1236,
9023,
12,
28736,
14,
73,
43640,
14,
10677,
14,
73,
43640,
13,
20362,
198,
3500,
6208,
198,
198,
9979,
22676,
26545,
220,
796,
13690,
35610,
1... | 2.970484 | 4,811 |
struct RegularLatLonGrid{TX, TY, TZ, R, A} <: AbstractGrid{TX, TY, TZ}
# corrdinates at cell centers, unit: degree
xC::R
yC::R
# corrdinates at cell centers, unit: meter
zC::R
# corrdinates at cell faces, unit: degree
xF::R
yF::R
# corrdinates at cell faces, unit: meter
zF::R
... | [
7249,
23603,
24220,
43,
261,
41339,
90,
29551,
11,
24412,
11,
309,
57,
11,
371,
11,
317,
92,
1279,
25,
27741,
41339,
90,
29551,
11,
24412,
11,
309,
57,
92,
198,
220,
220,
220,
1303,
1162,
4372,
17540,
379,
2685,
10399,
11,
4326,
2... | 1.828074 | 2,757 |
# ---------------------------------
# PIECEWISE LINEAR UPPER ENVELOPE |
# ____________________ __________ |
# Author: <NAME> |
# Columbia University, 2020 |
# ---------------------------------
abstract type AbstractPiecewiseLinear{T} end
@inline Base.length(fun::AbstractPiecewiseLinear)=length(get_x(fun... | [
2,
20368,
12,
198,
2,
30434,
2943,
6217,
24352,
48920,
1503,
471,
10246,
1137,
12964,
18697,
32135,
930,
198,
2,
220,
4841,
1427,
220,
2602,
834,
930,
198,
2,
220,
220,
220,
6434,
25,
1279,
20608,
29,
220,
220,
220,
220,
220,
930,
... | 2.234978 | 6,324 |
# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.
struct VirtualMachineScaleSetVMsApi <: SwaggerApi
client::Swagger.Client
end
"""
Run command on a virtual machine in a VM scale set.
Param: resourceGroupName::String (requir... | [
2,
770,
2393,
373,
7560,
416,
262,
22300,
2451,
7928,
6127,
35986,
198,
2,
2141,
407,
13096,
428,
2393,
3264,
13,
3401,
1958,
262,
1509,
7928,
20855,
2427,
13,
198,
198,
7249,
15595,
37573,
29990,
7248,
53,
10128,
32,
14415,
1279,
25,... | 3.371975 | 785 |
struct ConvexTotalChunker{F}
f::F
end
struct ConvexTotalSplitter{F}
f::F
end
function pack_stripe(A::SparseMatrixCSC{Tv, Ti}, method::ConvexTotalChunker, args...) where {Tv, Ti}
@inbounds begin
(m, n) = size(A)
f = oracle_stripe(RandomHint(), method.f, A, args...)
ftr = CircularD... | [
7249,
1482,
303,
87,
14957,
1925,
21705,
90,
37,
92,
198,
220,
220,
220,
277,
3712,
37,
198,
437,
198,
198,
7249,
1482,
303,
87,
14957,
26568,
1967,
90,
37,
92,
198,
220,
220,
220,
277,
3712,
37,
198,
437,
198,
198,
8818,
2353,
... | 1.477856 | 5,374 |
<gh_stars>1-10
push!(LOAD_PATH, "../src/")
using Documenter, POMDPModelTools
mdfiles = filter(f -> first(f) != '.', readdir(joinpath(dirname(@__FILE__), "src")))
makedocs(
modules = [POMDPModelTools],
format = Documenter.HTML(),
sitename = "POMDPModelTools.jl",
expandfirst = ["index.md"],
pages =... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
14689,
0,
7,
35613,
62,
34219,
11,
366,
40720,
10677,
14,
4943,
198,
198,
3500,
16854,
263,
11,
350,
2662,
6322,
17633,
33637,
198,
198,
76,
7568,
2915,
796,
8106,
7,
69,
4613,
717,
7,
6... | 2.391753 | 194 |
### MHState
# MHState holds the internal state ("local variables") of the Metropolis-Hastings sampler
mutable struct MHState{S<:ValueSupport, F<:VariateForm} <: MHSamplerState{F}
proposal::Distribution{F, S} # Proposal distribution
pstate::ParameterState{S, F} # Parameter state used internally by MH
tune::MCTun... | [
21017,
20752,
9012,
198,
198,
2,
20752,
9012,
6622,
262,
5387,
1181,
5855,
12001,
9633,
4943,
286,
262,
3395,
25986,
12,
39,
459,
654,
6072,
20053,
198,
198,
76,
18187,
2878,
20752,
9012,
90,
50,
27,
25,
11395,
15514,
11,
376,
27,
2... | 2.88716 | 1,542 |
# Autogenerated wrapper script for RDKit_jll for aarch64-apple-darwin
export librdkitcffi
using FreeType2_jll
using boost_jll
using Zlib_jll
JLLWrappers.@generate_wrapper_header("RDKit")
JLLWrappers.@declare_library_product(librdkitcffi, "@rpath/librdkitcffi.1.dylib")
function __init__()
JLLWrappers.@generate_init... | [
2,
5231,
519,
877,
515,
29908,
4226,
329,
31475,
20827,
62,
73,
297,
329,
257,
998,
2414,
12,
18040,
12,
27455,
5404,
198,
39344,
300,
2889,
67,
15813,
66,
487,
72,
198,
198,
3500,
3232,
6030,
17,
62,
73,
297,
198,
3500,
5750,
62,... | 2.166023 | 259 |
<reponame>logankilpatrick/Franklin.jl
@testset "preprocess" begin
s = """
@def z = [1,2,3,
4,5,6]
"""
tokens = F.find_tokens(s, F.MD_TOKENS, F.MD_1C_TOKENS)
F.find_indented_blocks!(tokens, s)
@test tokens[1].name == :MD_DEF_OPEN
@test tokens[2].name == :LR_INDENT
@te... | [
27,
7856,
261,
480,
29,
6404,
962,
346,
29615,
14,
17439,
2815,
13,
20362,
198,
31,
9288,
2617,
366,
3866,
14681,
1,
2221,
198,
220,
220,
220,
264,
796,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
4299,
1976,
796,
685,
16... | 1.78596 | 1,453 |
<filename>test/wavelet.jl
using Synchrony, Base.Test
datadir = joinpath(Pkg.dir("Synchrony"), "test", "data")
# Test Morlet wavelet bases
#
# Reference implementation is from <NAME>., and <NAME>. “A
# Practical Guide to Wavelet Analysis.” Bulletin of the American
# Meteorological Society 79, no. 1 (1998): 61–78.
#
# O... | [
27,
34345,
29,
9288,
14,
19204,
1616,
13,
20362,
198,
3500,
16065,
11413,
88,
11,
7308,
13,
14402,
198,
19608,
324,
343,
796,
4654,
6978,
7,
47,
10025,
13,
15908,
7203,
50,
24871,
88,
12340,
366,
9288,
1600,
366,
7890,
4943,
198,
19... | 2.070045 | 1,342 |
<gh_stars>10-100
"""
$(TYPEDEF)
$(TYPEDFIELDS)
"""
struct RandIndex <: AbstractDistDelayed
upper::NestedInt
RandIndex(upper::Types.AbstractDelayed) = new(upper)
function RandIndex(upper::Int)
if upper < 1
throw(ArgumentError("upper will be used as index so must be greater than 0"))
... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
37811,
198,
3,
7,
9936,
47,
1961,
25425,
8,
198,
3,
7,
9936,
47,
1961,
11674,
3698,
5258,
8,
198,
198,
37811,
198,
7249,
8790,
15732,
1279,
25,
27741,
20344,
13856,
16548,
198,
220,
220,... | 2.374194 | 155 |
# one-body non-bonded potentials
function Singlea(xi, qi, ti, mu, eta, kappa)
u = 0.0;
return u;
end
# one-body bonded potentials
function Singleb(xi, qi, ti, mu, eta, kappa)
u = 0.0;
return u;
end
function ezbl(r,zi,zj)
pzbl = 0.23;
a0 = 0.46850;
c1 = 0.02817;
c2 = 0.28022;
c3 = ... | [
198,
2,
530,
12,
2618,
1729,
12,
65,
623,
276,
2785,
82,
220,
198,
8818,
14206,
64,
7,
29992,
11,
10662,
72,
11,
46668,
11,
38779,
11,
2123,
64,
11,
479,
20975,
8,
198,
220,
220,
220,
334,
796,
657,
13,
15,
26,
220,
220,
220,
... | 1.711992 | 1,993 |
<reponame>nandoconde/AbstractPlotting.jl
"""
barplot(x, y; kwargs...)
Plots a barplot; `y` defines the height. `x` and `y` should be 1 dimensional.
## Attributes
$(ATTRIBUTES)
"""
@recipe(BarPlot, x, y) do scene
Attributes(;
fillto = 0.0,
color = theme(scene, :color),
colormap = theme... | [
27,
7856,
261,
480,
29,
77,
392,
420,
14378,
14,
23839,
43328,
889,
13,
20362,
198,
37811,
198,
220,
220,
220,
2318,
29487,
7,
87,
11,
331,
26,
479,
86,
22046,
23029,
198,
198,
3646,
1747,
257,
2318,
29487,
26,
4600,
88,
63,
15738... | 2.18226 | 823 |
using Statistics
# Read in file of helper functions
# This file incluse: cleantext, countwords
include("../word_count_helpers.jl")
# Load the file names
dataLoc = "../../../data/word_count/";
fnames = dataLoc.*readdir(dataLoc)
# Create function for processing each file
function getwordcounts(fname)
# Read in fil... | [
3500,
14370,
198,
198,
2,
4149,
287,
2393,
286,
31904,
5499,
198,
2,
770,
2393,
13358,
1904,
25,
1190,
415,
2302,
11,
954,
10879,
198,
17256,
7203,
40720,
4775,
62,
9127,
62,
16794,
364,
13,
20362,
4943,
198,
198,
2,
8778,
262,
2393... | 3.044199 | 362 |
<reponame>lemauee/RoME.jl<gh_stars>10-100
import RoME
include(joinpath(pkgdir(RoME), "test", "runtests.jl"))
| [
27,
7856,
261,
480,
29,
293,
2611,
518,
68,
14,
15450,
11682,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
11748,
5564,
11682,
198,
17256,
7,
22179,
6978,
7,
35339,
15908,
7,
15450,
11682,
828,
366,
9288,
1600,
366,
81,
... | 2.22449 | 49 |
function findfst(ind::Array{Int}, idx::Int)
x = falses(length(ind))
for k in eachindex(ind)
if ind[k] == idx
x[k] = true
return x
end
end
end | [
8818,
1064,
69,
301,
7,
521,
3712,
19182,
90,
5317,
5512,
4686,
87,
3712,
5317,
8,
198,
220,
220,
220,
2124,
796,
27807,
274,
7,
13664,
7,
521,
4008,
198,
220,
220,
220,
329,
479,
287,
1123,
9630,
7,
521,
8,
198,
220,
220,
220,
... | 1.792793 | 111 |
##
# Ultraspherical
##
struct UltrasphericalWeight{T,Λ} <: AbstractJacobiWeight{T}
λ::Λ
end
UltrasphericalWeight{T}(λ) where T = UltrasphericalWeight{T,typeof(λ)}(λ)
UltrasphericalWeight(λ) = UltrasphericalWeight{float(typeof(λ)),typeof(λ)}(λ)
==(a::UltrasphericalWeight, b::UltrasphericalWeight) = a.λ == b.λ
... | [
628,
198,
2235,
198,
2,
46487,
5126,
37910,
198,
2235,
198,
198,
7249,
46487,
5126,
37910,
25844,
90,
51,
11,
138,
249,
92,
1279,
25,
27741,
28821,
13411,
25844,
90,
51,
92,
198,
220,
220,
220,
7377,
119,
3712,
138,
249,
198,
437,
... | 1.975132 | 3,418 |
<filename>src/Images.jl
VERSION >= v"0.4.0-dev+6521" && __precompile__()
module Images
import Base.Order: Ordering, ForwardOrdering, ReverseOrdering
import Base: ==, .==, +, -, *, /, .+, .-, .*, ./, .^, .<, .>
import Base: atan2, clamp, convert, copy, copy!, ctranspose, delete!, done, eltype,
fft, float3... | [
27,
34345,
29,
10677,
14,
29398,
13,
20362,
198,
43717,
18189,
410,
1,
15,
13,
19,
13,
15,
12,
7959,
10,
2996,
2481,
1,
11405,
11593,
3866,
5589,
576,
834,
3419,
198,
198,
21412,
5382,
198,
198,
11748,
7308,
13,
18743,
25,
8284,
2... | 2.223722 | 3,111 |
<filename>test/transformations/iau2006/iau2006_equinox.jl
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Description
# ==============================================================================
#
# Tests related to equinox-based IAU-2006 transformations.
#
# # # # # # # # # # ... | [
27,
34345,
29,
9288,
14,
35636,
602,
14,
544,
84,
13330,
14,
544,
84,
13330,
62,
4853,
259,
1140,
13,
20362,
198,
2,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1... | 1.9324 | 7,500 |
<gh_stars>10-100
using Pumas, PumasTutorials, CSV
data7BLQ = CSV.read("./tutorials/nca/data/single_dose_IVbolus_7BLQ.csv",missingstring="NA")
data7BLQ
data18BLQ = CSV.read("./tutorials/nca/data/single_dose_IVbolus_18BLQ.csv",missingstring="NA")
data18BLQ
timeu = u"hr"
concu = u"mg/L"
amtu = u"mg"
pop7 = read_n... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
198,
3500,
350,
388,
292,
11,
350,
388,
292,
51,
44917,
82,
11,
44189,
628,
198,
7890,
22,
9148,
48,
796,
44189,
13,
961,
7,
1911,
14,
83,
44917,
82,
14,
77,
6888,
14,
7890,
14,
2976... | 1.937266 | 1,068 |
import Base: ndims, size, getindex, reducedim
struct DomainBlocks{N} <: AbstractArray{ArrayDomain{N}, N}
start::NTuple{N, Int}
cumlength::Tuple
end
Base.@deprecate_binding BlockedDomains DomainBlocks
ndims(x::DomainBlocks{N}) where {N} = N
size(x::DomainBlocks) = map(length, x.cumlength)
function _getindex(x:... | [
11748,
7308,
25,
299,
67,
12078,
11,
2546,
11,
651,
9630,
11,
5322,
320,
198,
198,
7249,
20021,
45356,
90,
45,
92,
1279,
25,
27741,
19182,
90,
19182,
43961,
90,
45,
5512,
399,
92,
198,
220,
220,
220,
923,
3712,
11251,
29291,
90,
4... | 2.407832 | 1,047 |
# Julia wrappers around the NumPy API, as part of the PyCall package
#########################################################################
# Initialization (UGLY)
# Linking NumPy's C API from Julia requires some serious hackery,
# because NumPy does not export its symbols in the usual way for
# shared libraries. ... | [
2,
22300,
7917,
11799,
1088,
262,
31835,
20519,
7824,
11,
355,
636,
286,
262,
9485,
14134,
5301,
198,
198,
29113,
29113,
7804,
2,
198,
2,
20768,
1634,
357,
7340,
11319,
8,
198,
198,
2,
7502,
278,
31835,
20519,
338,
327,
7824,
422,
2... | 2.515854 | 3,406 |
################################################################################
# αAl₂O₃ #
################################################################################
export αAl₂O₃
"""
This code creates a symbolic representation of a Cauchy Eq... | [
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,
220,
220,
220,
220,
220,
220,
220,
220,
26367,
2348,
158,
224,
2... | 2.081452 | 1,019 |
"""
Either <: Augmentor.ArrayOperation
Description
--------------
Chooses between the given `operations` at random when applied.
This is particularly useful if one for example wants to first
either rotate the image 90 degree clockwise or anticlockwise (but
never both), and then apply some other operation(s) after... | [
37811,
198,
220,
220,
220,
15467,
1279,
25,
2447,
434,
273,
13,
19182,
32180,
198,
198,
11828,
198,
26171,
198,
198,
22164,
4629,
1022,
262,
1813,
4600,
3575,
602,
63,
379,
4738,
618,
5625,
13,
198,
1212,
318,
3573,
4465,
611,
530,
... | 2.582861 | 3,349 |
module AtomIO
using AtomsBase
using PyCall
using Unitful
export load_system, save_system
function load_system(file::AbstractString)
ase = pyimport_e("ase")
ispynull(ase) && error("Install ASE to load data from exteral files")
ase_atoms = pyimport("ase.io").read(file)
T = Float64
cell_julia = conv... | [
21412,
33102,
9399,
198,
3500,
1629,
3150,
14881,
198,
3500,
9485,
14134,
198,
3500,
11801,
913,
198,
198,
39344,
3440,
62,
10057,
11,
3613,
62,
10057,
198,
198,
8818,
3440,
62,
10057,
7,
7753,
3712,
23839,
10100,
8,
198,
220,
220,
22... | 2.475309 | 324 |
"""
Determines how to react to an exceeded rate limit.
- `ORL_THROW`: Throw a [`RateLimitedError`](@ref).
- `ORL_WAIT`: Block and wait for the rate limit to expire.
"""
@enum OnRateLimit ORL_THROW ORL_WAIT
"""
A generic rate limiter using the `[X-]RateLimit-Remaining` and `[X-]RateLimit-Reset` response headers.
The r... | [
37811,
198,
35,
13221,
274,
703,
284,
6324,
284,
281,
20672,
2494,
4179,
13,
198,
198,
12,
4600,
1581,
43,
62,
4221,
49,
3913,
63,
25,
22481,
257,
685,
63,
32184,
37214,
12331,
63,
16151,
31,
5420,
737,
198,
12,
4600,
1581,
43,
62... | 2.623246 | 499 |
<gh_stars>0
using SparseUtils
import SparseArrays
import SparseArrays: SparseMatrixCSC
#import SparseUtils: materialize
import SparseUtils: SparseMatrixCOO
import LinearAlgebra
using Serialization
using Test
let # typeof(sparse_array) = SparseMatrixCSC
sparse_array = open("sparse_array.dat", "r") do io
des... | [
27,
456,
62,
30783,
29,
15,
198,
3500,
1338,
17208,
18274,
4487,
198,
11748,
1338,
17208,
3163,
20477,
198,
11748,
1338,
17208,
3163,
20477,
25,
1338,
17208,
46912,
34,
6173,
198,
2,
11748,
1338,
17208,
18274,
4487,
25,
2587,
1096,
198,... | 2.16934 | 1,122 |
# Autogenerated wrapper script for LibUV_jll for x86_64-w64-mingw32
export libuv
JLLWrappers.@generate_wrapper_header("LibUV")
JLLWrappers.@declare_library_product(libuv, "libuv-2.dll")
function __init__()
JLLWrappers.@generate_init_header()
JLLWrappers.@init_library_product(
libuv,
"bin\\libuv... | [
2,
5231,
519,
877,
515,
29908,
4226,
329,
7980,
31667,
62,
73,
297,
329,
2124,
4521,
62,
2414,
12,
86,
2414,
12,
2229,
86,
2624,
198,
39344,
9195,
14795,
198,
198,
41,
3069,
36918,
11799,
13,
31,
8612,
378,
62,
48553,
62,
25677,
7... | 2.2 | 195 |
<filename>src/old/pdnode.jl
export PDNode
mutable struct PDNode
data
children::Vector{PDNode}
parent
end
PDNode(data) = PDNode(data, PDNode[], nothing)
function PDNode(data, children::Vector{PDNode})
node = PDNode(data, children, nothing)
push!(node, children...)
node
end
isroot(node::PDNode)... | [
27,
34345,
29,
10677,
14,
727,
14,
30094,
17440,
13,
20362,
198,
39344,
14340,
19667,
198,
198,
76,
18187,
2878,
14340,
19667,
198,
220,
220,
220,
1366,
198,
220,
220,
220,
1751,
3712,
38469,
90,
5760,
19667,
92,
198,
220,
220,
220,
... | 2.277254 | 743 |
#####################################################################################
# Neighborhood.jl Interface & convenience functions #
#####################################################################################
using Neighborhood, Distances
export WithinRange, NeighborNum... | [
29113,
29113,
14468,
4242,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37914,
13,
20362,
26491,
1222,
15607,
5499,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 2.877971 | 631 |
<reponame>Matt8898/julia-numerical<gh_stars>1-10
# Algorithm 2.6
# Newton's method for solving f(x) = x given an approximation
function bisect_approx(f, p0, tolerance, maxIter)
for i ∈ 1:maxIter
p1 = f(p0)
p2 = f(p1)
p = p0 - ((p1 - p0)^2)/(p2 - 2p1 + p0)
if abs(p - p0) < tolerance
return p
end
p0 = p
... | [
27,
7856,
261,
480,
29,
13448,
3459,
4089,
14,
73,
43640,
12,
77,
6975,
605,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
2,
978,
42289,
362,
13,
21,
198,
2,
17321,
338,
2446,
329,
18120,
277,
7,
87,
8,
796,
2124,
1813,
281,
4087... | 2.081731 | 208 |
<reponame>laurium-labs/GraphNeuralNetworks.jl
@testset "Operators" begin
@testset "intersect" begin
g = rand_graph(10, 20, graph_type=GRAPH_T)
@test intersect(g, g).num_edges == 20
end
end
| [
27,
7856,
261,
480,
29,
75,
2899,
1505,
12,
75,
8937,
14,
37065,
8199,
1523,
7934,
5225,
13,
20362,
198,
31,
9288,
2617,
366,
18843,
2024,
1,
2221,
198,
220,
220,
220,
2488,
9288,
2617,
366,
3849,
8831,
1,
2221,
198,
220,
220,
220... | 2.195876 | 97 |
<reponame>JuliaPackageMirrors/LatexPrint.jl<filename>test/runtests.jl<gh_stars>0
using Base.Test
using LatexPrint
@test latex_form(-5) == "-5"
@test latex_form(2.2) == "2.2"
@test latex_form("Hello") == "\\text{Hello}"
@test latex_form(-3//5) == "\\frac{-3}{5}"
@test latex_form(im) == "0+1i"
@test latex_form(1/0) == "... | [
27,
7856,
261,
480,
29,
16980,
544,
27813,
27453,
5965,
14,
26302,
87,
18557,
13,
20362,
27,
34345,
29,
9288,
14,
81,
2797,
3558,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
3500,
7308,
13,
14402,
198,
3500,
18319,
87,
18557,
198,
... | 2.247148 | 263 |
function solve_disc(model::State_Space_Form{T}, obj::State_Space_Objective{T}, tol::T, maxiters::S) where {T <: AbstractFloat, S <: Int}
nx = copy(model.nx)
ny = copy(model.ny)
beta = copy(obj.beta)
sigma = copy(model.sigma)
a = copy(model.a)
b = copy(model.b)
c = copy(model.c)
q = copy(obj.q)... | [
8818,
8494,
62,
15410,
7,
19849,
3712,
9012,
62,
14106,
62,
8479,
90,
51,
5512,
26181,
3712,
9012,
62,
14106,
62,
10267,
425,
90,
51,
5512,
284,
75,
3712,
51,
11,
3509,
270,
364,
3712,
50,
8,
810,
1391,
51,
1279,
25,
27741,
43879,... | 1.680832 | 3,271 |
using CombinedUncertainDiffEq
using CombinedUncertainDiffEq: Uniform, to_distribution, to_interval
using Test
@testset "Conversions" begin
i = 1..2
d = Uniform(1, 2)
# Individual
@test to_distribution(i) == d
@test to_distribution(d) == d
@test to_interval(i) == i
@test to_interval(d) == i... | [
3500,
32028,
3118,
39239,
28813,
36,
80,
198,
3500,
32028,
3118,
39239,
28813,
36,
80,
25,
35712,
11,
284,
62,
17080,
3890,
11,
284,
62,
3849,
2100,
198,
3500,
6208,
198,
198,
31,
9288,
2617,
366,
3103,
47178,
1,
2221,
198,
220,
220... | 2.468927 | 177 |
# ------------------------------------------------------------------------------------------------ #
# Windowing functions #
# ------------------------------------------------------------------------------------------------ #
function sliding... | [
2,
16529,
3880,
1303,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3... | 2.818636 | 601 |
<filename>test/inverse_hessian.jl
using ForwardDiff
using LinearAlgebra
using Optim
using Pathfinder
using Test
include("test_utils.jl")
function lbfgs_inverse_hessian_explicit(H₀, S, Y)
B = [H₀ * Y S]
R = triu(S'Y)
E = Diagonal(R)
D = [0*I -inv(R); -inv(R)' R' \ (E + Y' * H₀ * Y)/R]
return H₀ + B... | [
27,
34345,
29,
9288,
14,
259,
4399,
62,
33979,
666,
13,
20362,
198,
3500,
19530,
28813,
198,
3500,
44800,
2348,
29230,
198,
3500,
30011,
198,
3500,
37025,
198,
3500,
6208,
198,
198,
17256,
7203,
9288,
62,
26791,
13,
20362,
4943,
198,
... | 1.836039 | 1,848 |
<filename>test/Diagnostics/sin_init.jl<gh_stars>100-1000
function init_sin_test!(problem, bl, state, aux, localgeo, t)
(x, y, z) = localgeo.coord
FT = eltype(state)
param_set = parameter_set(bl)
z = FT(z)
_grav::FT = grav(param_set)
_MSLP::FT = MSLP(param_set)
# These constants are those ... | [
27,
34345,
29,
9288,
14,
18683,
4660,
34558,
14,
31369,
62,
15003,
13,
20362,
27,
456,
62,
30783,
29,
3064,
12,
12825,
198,
8818,
2315,
62,
31369,
62,
9288,
0,
7,
45573,
11,
698,
11,
1181,
11,
27506,
11,
1957,
469,
78,
11,
256,
... | 1.858469 | 862 |
mutable struct ConnectionException <: Exception
var::String
end
mutable struct QueryException <: Exception
var::String
end
mutable struct NotImplementedException <: Exception
var::String
end
mutable struct InvalidInputException <: Exception
var::String
end
Base.showerror(io::IO, e::ConnectionException)... | [
76,
18187,
2878,
26923,
16922,
1279,
25,
35528,
198,
220,
220,
220,
1401,
3712,
10100,
198,
437,
198,
76,
18187,
2878,
43301,
16922,
1279,
25,
35528,
198,
220,
220,
220,
1401,
3712,
10100,
198,
437,
198,
76,
18187,
2878,
1892,
3546,
1... | 2.977901 | 181 |
## Implementation of the algorithm described in: "Invariant approximation of the minimal robust positively invariant set" S.V.Rakovic
# Invariant approximations of the minimal robust positively invariant set for and2D systems
#TODO 1D-systems
using LinearAlgebra
using LazySets
using Polyhedra
using LazySets.Approximat... | [
2235,
46333,
286,
262,
11862,
3417,
287,
25,
366,
19904,
2743,
415,
40874,
286,
262,
10926,
12373,
19888,
25275,
415,
900,
1,
311,
13,
53,
13,
49,
461,
17215,
198,
2,
10001,
2743,
415,
5561,
320,
602,
286,
262,
10926,
12373,
19888,
... | 2.024109 | 2,945 |
<reponame>raphaelsaavedra/PowerSimulations.jl<gh_stars>0
function copper_plate(psi_container::PSIContainer, expression::Symbol, bus_count::Int)
time_steps = model_time_steps(psi_container)
remove_undef!(psi_container.expressions[expression])
constraint_val = JuMPConstraintArray(undef, time_steps)
assi... | [
27,
7856,
261,
480,
29,
1470,
64,
1424,
64,
9586,
430,
14,
13434,
8890,
5768,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
8818,
15317,
62,
6816,
7,
862,
72,
62,
34924,
3712,
3705,
2149,
756,
10613,
11,
5408,
3712,
13940,
23650,
11... | 2.448 | 250 |
<filename>src/Devices/Virtual/TxDAQController.jl
export TxDAQControllerParams, TxDAQController, controlTx
Base.@kwdef mutable struct TxDAQControllerParams <: DeviceParams
phaseAccuracy::Float64
amplitudeAccuracy::Float64
controlPause::Float64
maxControlSteps::Int64 = 20
correctCrossCoupling::Bool = false
end... | [
27,
34345,
29,
10677,
14,
13603,
1063,
14,
37725,
14,
46047,
46640,
22130,
13,
20362,
198,
39344,
309,
87,
46640,
22130,
10044,
4105,
11,
309,
87,
46640,
22130,
11,
1630,
46047,
198,
198,
14881,
13,
31,
46265,
4299,
4517,
540,
2878,
3... | 2.718234 | 2,967 |
type Token
form::Int
cat::Int
head::Int
end
function totokens(word_dict::IdDict)
end
function mmm()
traindata = readconll("")
testdata = readconll("")
word_dict = IdDict{String}()
end
type DepParser
word_dict::IdDict{String}
model
end
function DepParser()
end
function train(p... | [
4906,
29130,
198,
220,
220,
220,
1296,
3712,
5317,
198,
220,
220,
220,
3797,
3712,
5317,
198,
220,
220,
220,
1182,
3712,
5317,
198,
437,
198,
198,
8818,
2006,
482,
641,
7,
4775,
62,
11600,
3712,
7390,
35,
713,
8,
198,
198,
437,
19... | 1.964401 | 618 |
<reponame>pylat/ProximalAlgorithms.jl<filename>src/utilities/iterationtools.jl<gh_stars>1-10
module IterationTools
export halt, tee, sample, stopwatch, loop
using Base.Iterators
# Halting
struct HaltingIterable{I, F}
iter::I
fun::F
end
Base.IteratorSize(::Type{HaltingIterable{I, F}}) where {I, F} = Base.It... | [
27,
7856,
261,
480,
29,
79,
2645,
265,
14,
2964,
87,
4402,
2348,
7727,
907,
13,
20362,
27,
34345,
29,
10677,
14,
315,
2410,
14,
2676,
341,
31391,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
21412,
40806,
341,
33637,
198,
... | 2.599179 | 1,462 |
abstract SQLite3 <: DBI.DatabaseSystem
type SQLiteDatabaseHandle <: DBI.DatabaseHandle
ptr::Ptr{Void}
status::Cint
end
type SQLiteStatementHandle <: DBI.StatementHandle
db::SQLiteDatabaseHandle
ptr::Ptr{Void}
executed::Int
function SQLiteStatementHandle(
db::SQLiteDatabaseHandle,
... | [
397,
8709,
16363,
578,
18,
1279,
25,
360,
3483,
13,
38105,
11964,
198,
198,
4906,
16363,
578,
38105,
37508,
1279,
25,
360,
3483,
13,
38105,
37508,
198,
220,
220,
220,
50116,
3712,
46745,
90,
53,
1868,
92,
198,
220,
220,
220,
3722,
3... | 2.411392 | 158 |
<filename>TestingJulia/PoissonFast.jl<gh_stars>10-100
# Compares two methods for simulating a homogeneous Poisson point process,
# where the idea behind one method is faster than the other. In this code,
# the two methods are labelled A and B.
#
# Method A simulates all the Poisson ensembles randomly by first randomly
... | [
27,
34345,
29,
44154,
16980,
544,
14,
18833,
30927,
22968,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
2,
3082,
3565,
734,
5050,
329,
985,
8306,
257,
3488,
32269,
7695,
30927,
966,
1429,
11,
198,
2,
810,
262,
2126,
2157,
... | 2.910526 | 1,140 |
<reponame>jkozdon/clima-dycore.jl
module Atmo
export atmo
# To think about:
# - How to handle parameters for different case? Dictionaries?
# FIXME: Be consistent with tuple assignments (either with or without parens)
#
# FIXME: Add logging
# FIXME: Add link to https://github.com/paranumal/libparanumal here and in
#... | [
27,
7856,
261,
480,
29,
73,
7204,
89,
9099,
14,
565,
8083,
12,
9892,
7295,
13,
20362,
198,
21412,
1629,
5908,
198,
198,
39344,
379,
5908,
198,
198,
2,
1675,
892,
546,
25,
198,
2,
532,
1374,
284,
5412,
10007,
329,
1180,
1339,
30,
... | 1.694478 | 23,743 |
<gh_stars>1-10
module AlpaoInstall
using Libdl
path = get(ENV, "ALPAO_SDK_DLL", "libasdk."*dlext)
sym = :asdkInit
ptr1 = dlopen_e(path)
ptr2 = (ptr1 == C_NULL ? C_NULL : dlsym_e(ptr1, sym))
if ptr2 == C_NULL
error("\n\n", (ptr1 == C_NULL ? "Unable to load" :
"Symbol `$sym` not found in"),
... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
21412,
978,
79,
5488,
15798,
198,
198,
3500,
7980,
25404,
198,
198,
6978,
796,
651,
7,
1677,
53,
11,
366,
1847,
4537,
46,
62,
10305,
42,
62,
35,
3069,
1600,
366,
8019,
292,
34388,
526,
9... | 2.079365 | 378 |
using CayleyDickson
using Base.Test: @test, @test_throws
@test begin
a = CayleyDickson.randomBigInt()
b = CayleyDickson.randomBigInt()
l = Exo1Binion(Exo1Real(a, b))
r = Exo1Binion(a, 0, b, 0)
l == r
end
@test begin
a = CayleyDickson.randomBigFloat()
isreal(Exo1Binion(a))
end
@test begin
... | [
3500,
28335,
1636,
35,
46381,
198,
3500,
7308,
13,
14402,
25,
2488,
9288,
11,
2488,
9288,
62,
400,
8516,
198,
198,
31,
9288,
2221,
198,
220,
220,
220,
257,
796,
28335,
1636,
35,
46381,
13,
25120,
12804,
5317,
3419,
198,
220,
220,
22... | 1.987156 | 3,270 |
module Division
export thirt
const RESTS = [1, 10, 9, 12, 3, 4]
function thirt(n::Int64)::Int64
xi = n
while true
xi,xo = sum( p -> *(p...), zip( digits(xi), Iterators.cycle(RESTS) ) ), xi
if xi ≥ xo break end
end
xi
end
end | [
21412,
7458,
198,
220,
220,
220,
10784,
294,
2265,
198,
220,
220,
220,
1500,
15731,
4694,
796,
685,
16,
11,
838,
11,
860,
11,
1105,
11,
513,
11,
604,
60,
198,
220,
220,
220,
2163,
294,
2265,
7,
77,
3712,
5317,
2414,
2599,
25,
53... | 1.861635 | 159 |
<filename>src/global_constants.jl
const OCTAVIAN_NUM_TASKS = Ref(1)
_nthreads() = OCTAVIAN_NUM_TASKS[]
@generated function calc_factors(::Union{Val{nc},StaticInt{nc}} = num_cores()) where {nc}
t = Expr(:tuple)
for i ∈ nc:-1:1
d, r = divrem(nc, i)
iszero(r) && push!(t.args, (i, d))
end
... | [
27,
34345,
29,
10677,
14,
20541,
62,
9979,
1187,
13,
20362,
198,
198,
9979,
42256,
10116,
16868,
62,
41359,
62,
51,
1921,
27015,
796,
6524,
7,
16,
8,
198,
62,
77,
16663,
82,
3419,
796,
42256,
10116,
16868,
62,
41359,
62,
51,
1921,
... | 2.224983 | 1,449 |
@testset "Generating set search" begin
ss = RectSearchSpace(3, (0.0, 1.0))
@test BlackBoxOptim.calc_initial_step_size(ss) == (0.5 * (1.0 - 0.0))
ss = RectSearchSpace(3, (-1.2, 42.0))
@test BlackBoxOptim.calc_initial_step_size(ss, 0.80) == (0.80 * (42.0 + 1.2))
end
| [
31,
9288,
2617,
366,
8645,
803,
900,
2989,
1,
2221,
628,
220,
220,
220,
37786,
796,
48599,
18243,
14106,
7,
18,
11,
357,
15,
13,
15,
11,
352,
13,
15,
4008,
198,
220,
220,
220,
2488,
9288,
2619,
14253,
27871,
320,
13,
9948,
66,
6... | 2.102941 | 136 |
<reponame>wangl-cc/RecordedArray.jl<gh_stars>1-10
module RecordedArrays
using RecipesBase
using ResizingTools
using ResizingTools: AbstractRDArray, to_parentinds
using FunctionIndices
using ArrayInterface
using Static
# Clock
export DiscreteClock, ContinuousClock
export currenttime, limit, start, init!, increase!
# ... | [
27,
7856,
261,
480,
29,
47562,
75,
12,
535,
14,
23739,
276,
19182,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
21412,
50096,
3163,
20477,
198,
198,
3500,
44229,
14881,
198,
3500,
1874,
2890,
33637,
198,
3500,
1874,
2890,
33... | 3.224638 | 276 |
<filename>src/kepler_catalog.jl
## ExoplanetsSysSim/src/kepler_catalog.jl
## (c) 2015 <NAME>
#using ExoplanetsSysSim
using DataFrames
#using DataArrays
using CSV
#using JLD
#using JLD2
using FileIO
#if VERSION >= v"0.5-"
# import Compat: UTF8String, ASCIIString
#end
mutable struct KeplerPhysicalCatalog
target::Ar... | [
27,
34345,
29,
10677,
14,
365,
20053,
62,
9246,
11794,
13,
20362,
198,
2235,
1475,
46853,
1039,
44387,
8890,
14,
10677,
14,
365,
20053,
62,
9246,
11794,
13,
20362,
198,
2235,
357,
66,
8,
1853,
1279,
20608,
29,
198,
198,
2,
3500,
147... | 2.599178 | 7,053 |
type CompositeQueryResultItem
# A result item part of an overall set of result of a CompositeQuery
id::UUID.Uuid
typelabel::String
item::Container
containedobject::Any
hassource::Bool
sourceresultitem::CompositeQueryResultItem
storedvalues::Dict{String, Any}
isnew::Bool
function CompositeQueryResultItem(newi... | [
4906,
49355,
20746,
23004,
7449,
198,
197,
2,
317,
1255,
2378,
636,
286,
281,
4045,
900,
286,
1255,
286,
257,
49355,
20746,
198,
197,
312,
3712,
52,
27586,
13,
52,
27112,
198,
197,
28004,
417,
9608,
3712,
10100,
198,
197,
9186,
3712,
... | 3.045936 | 566 |
<gh_stars>0
mutable struct DummyGraph <: AbstractGraph end
mutable struct DummyDiGraph <: AbstractGraph end
mutable struct DummyEdge <: AbstractEdge end
@testset "Interface" begin
dummygraph = DummyGraph()
dummydigraph = DummyDiGraph()
dummyedge = DummyEdge()
@test_throws ErrorException is_directed(Du... | [
27,
456,
62,
30783,
29,
15,
198,
76,
18187,
2878,
360,
13513,
37065,
1279,
25,
27741,
37065,
886,
198,
76,
18187,
2878,
360,
13513,
18683,
37065,
1279,
25,
27741,
37065,
886,
198,
76,
18187,
2878,
360,
13513,
37021,
1279,
25,
27741,
3... | 2.529412 | 425 |
<filename>test/test_featurelayer.jl
using Test
import GDAL
import ArchGDAL; const AG = ArchGDAL
@testset "Testing FeatureLayer Methods" begin
AG.registerdrivers() do
AG.read("data/point.geojson") do dataset
AG.createcopy(dataset, "tmp/point.geojson") do tmpcopy
@test AG.nlayer(t... | [
27,
34345,
29,
9288,
14,
9288,
62,
30053,
29289,
13,
20362,
198,
3500,
6208,
198,
11748,
27044,
1847,
198,
11748,
5579,
45113,
1847,
26,
1500,
13077,
796,
5579,
45113,
1847,
198,
198,
31,
9288,
2617,
366,
44154,
27018,
49925,
25458,
1,
... | 2.239478 | 2,376 |
<filename>src/Elliptic.jl
"""
Elliptic{T <: Number} <: Construct{T}
An elliptic Cayley-Dickson construct as a pair.
Elliptic constructs use the elliptic multiplication operation.
Examples of elliptic Cayley-Dickson constructs are binions (complex numbers), quaternions,
octonions, and sedenions.
"""
struct Elliptic... | [
27,
34345,
29,
10677,
14,
30639,
10257,
291,
13,
20362,
198,
37811,
198,
220,
220,
220,
7122,
10257,
291,
90,
51,
1279,
25,
7913,
92,
1279,
25,
28407,
90,
51,
92,
198,
198,
2025,
48804,
291,
28335,
1636,
12,
35,
46381,
5678,
355,
... | 2.58491 | 4,705 |
@testset "Sorts" begin
sorts = [
BubbleSort!,
BucketSort!,
CountingSort!,
ExchangeSort!,
InsertionSort!,
MergeSort!,
QuickSort!,
SelectionSort!,
]
for f in sorts
x = [3,5,1,4,2]
f(x)
@test x == [1,2,3,4,5]
end
end
| [
31,
9288,
2617,
366,
50,
2096,
1,
2221,
198,
220,
220,
220,
10524,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
33691,
42758,
28265,
198,
220,
220,
220,
220,
220,
220,
220,
48353,
42758,
28265,
198,
220,
220,
220,
220,
220,
2... | 1.752747 | 182 |
<gh_stars>0
# # [Rising Thermal Bubble](@id EX-RTB-docs)
#
# In this example, we demonstrate the usage of the `ClimateMachine`
# [AtmosModel](@ref AtmosModel-docs) machinery to solve the fluid
# dynamics of a thermal perturbation in a neutrally stratified background state
# defined by its uniform potential temperature.... | [
27,
456,
62,
30783,
29,
15,
198,
2,
1303,
685,
49,
1710,
41590,
33691,
16151,
31,
312,
7788,
12,
14181,
33,
12,
31628,
8,
198,
2,
198,
2,
554,
428,
1672,
11,
356,
10176,
262,
8748,
286,
262,
4600,
37649,
37573,
63,
198,
2,
685,
... | 2.824917 | 5,723 |
<gh_stars>10-100
function status_string(status::Status, status_string::Ref{Cstring})
ccall((:hsa_status_string, "libhsa-runtime64"), Status, (Status, Ref{Cstring}), status, status_string)
end
function init()
ccall((:hsa_init, "libhsa-runtime64"), Status, ())
end
function shut_down()
ccall((:hsa_shut_down... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
198,
8818,
3722,
62,
8841,
7,
13376,
3712,
19580,
11,
3722,
62,
8841,
3712,
8134,
90,
34,
8841,
30072,
198,
220,
220,
220,
269,
13345,
19510,
25,
71,
11400,
62,
13376,
62,
8841,
11,
366,... | 2.716665 | 22,874 |
<reponame>sd109/QuantumOpticsBase.jl<gh_stars>0
"""
ManyBodyBasis(b, occupations)
Basis for a many body system.
The basis has to know the associated one-body basis `b` and which occupation states
should be included. The occupations_hash is used to speed up checking if two
many-body bases are equal.
"""
struct Man... | [
27,
7856,
261,
480,
29,
21282,
14454,
14,
24915,
388,
27871,
873,
14881,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
37811,
198,
220,
220,
220,
4650,
25842,
15522,
271,
7,
65,
11,
23308,
8,
198,
198,
15522,
271,
329,
257,
867,
176... | 2.131324 | 6,701 |
<reponame>UnofficialJuliaMirrorSnapshots/JFVM.jl-d32f81f0-000d-5c7c-8375-24efa40f8589
# ===============================
# Written by AAE
# TU Delft, Spring 2014
# simulkade.com
# Last edited: 30 December, 2014
# ===============================
# =====================================================================
# 2... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
41,
37,
15996,
13,
20362,
12,
67,
2624,
69,
6659,
69,
15,
12,
830,
67,
12,
20,
66,
22,
66,
12,
5999,
2425,
12,
1731,
891,
64,
1821,
69,
23,
44169,
... | 2.253431 | 2,332 |
import Base.LinAlg: axpy!
export svdvals_tr
"""
Matrix of the form
d1 a_1
d2 a_2
... ...
d_l a_l
d_l+1 e_l+1
... e_k-1
d_k
"""
type BrokenArrowBidiagonal{T} <: AbstractMatrix{T}
dv::Vector{T}
av::Vector{T}
ev::V... | [
11748,
7308,
13,
14993,
2348,
70,
25,
7877,
9078,
0,
198,
198,
39344,
264,
20306,
12786,
62,
2213,
198,
198,
37811,
198,
46912,
286,
262,
1296,
198,
288,
16,
220,
220,
220,
220,
220,
220,
220,
220,
220,
257,
62,
16,
198,
220,
220,... | 1.986164 | 6,288 |
<gh_stars>0
# gausslaguerre from FastGaussQuadrature [FastGaussQuadrature.jl - Gauss quadrature nodes and weights in Julia, <NAME>.", 2016, https://github.com/ajt60gaibb/FastGaussQuadrature.jl ] with some additional testing options
# (x,w) = gausslaguerre(n) returns n Gauss-Laguerre nodes and weights.
# (x,w) = gaussl... | [
27,
456,
62,
30783,
29,
15,
198,
2,
31986,
1046,
75,
11433,
263,
260,
422,
12549,
35389,
1046,
4507,
41909,
1300,
685,
22968,
35389,
1046,
4507,
41909,
1300,
13,
20362,
532,
12822,
1046,
15094,
81,
1300,
13760,
290,
19590,
287,
22300,
... | 1.739101 | 23,327 |
# This file is a part of SolidStateDetectors.jl, licensed under the MIT License (MIT).
__precompile__(true)
module SolidStateDetectors
using LinearAlgebra
using Random
using Statistics
using Adapt
using ArraysOfArrays
using FillArrays
using Formatting
using GPUArrays
using Interpolations
using Inter... | [
2,
770,
2393,
318,
257,
636,
286,
15831,
9012,
47504,
669,
13,
20362,
11,
11971,
739,
262,
17168,
13789,
357,
36393,
737,
201,
198,
201,
198,
834,
3866,
5589,
576,
834,
7,
7942,
8,
201,
198,
201,
198,
21412,
15831,
9012,
47504,
669,... | 2.747455 | 1,572 |
<gh_stars>1-10
function update_scope_conf!(scope_conf, scope::TDS2002B, refresh_cnt, base)
# Get Channel Volt per Div
#refresh_cnt==base*1 && (scope_conf.CH1_Volt_div = string(get_vertical_scale(scope, "CH1")))
#refresh_cnt==base*2 && (scope_conf.CH2_Volt_div = string(get_vertical_scale(scope, "CH2"... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
198,
8818,
4296,
62,
29982,
62,
10414,
0,
7,
29982,
62,
10414,
11,
8354,
3712,
51,
5258,
16942,
33,
11,
14976,
62,
66,
429,
11,
2779,
8,
197,
220,
198,
220,
220,
220,
220,
1303,
3497,
... | 2.248184 | 826 |
abstract type AbstractKernel{F,TT} end
struct Kernel{F,TT}
device::MtlDevice
mod::MtlLibrary
fun::MtlFunction
end
#launchKernel
##########################################
# Blocking call to a kernel
# Should implement somethjing better
mtlcall(f::MtlFunction, types::Tuple, args...; kwargs...) =
mtlca... | [
397,
8709,
2099,
27741,
42,
7948,
90,
37,
11,
15751,
92,
886,
198,
198,
7249,
32169,
90,
37,
11,
15751,
92,
198,
220,
220,
220,
3335,
3712,
44,
28781,
24728,
198,
220,
220,
220,
953,
3712,
44,
28781,
23377,
198,
220,
220,
220,
125... | 2.540164 | 1,581 |
###############################################################################
#
# Leaf fluorescence-related parameter set
#
###############################################################################
#= AbstractFluoModelParaSet type tree
---> FluoParaSet
=#
"""
abstract type AbstractFluoModelParaSet{FT}
Hier... | [
29113,
29113,
7804,
4242,
21017,
198,
2,
198,
2,
14697,
6562,
48699,
12,
5363,
11507,
900,
198,
2,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
28,
27741,
37,
2290,
78,
17633,
47,
3301,
7248,
2099,
5509,
198,
438,
3784,
1610,
20895,
... | 2.80597 | 402 |
<filename>src/helpers/ahorn_package_helper.jl
module PackageHelper
using JSON
export pkgpath, depotpath
export pkghash, pkghash_tree, pkghash_short
export latesthash, latesthash_tree
function print_error()
println(Base.stderr, "Update check failed")
for (exc, bt) in Base.catch_stack()
showerror(Base.... | [
27,
34345,
29,
10677,
14,
16794,
364,
14,
993,
1211,
62,
26495,
62,
2978,
525,
13,
20362,
198,
21412,
15717,
47429,
198,
198,
3500,
19449,
198,
198,
39344,
279,
10025,
6978,
11,
43369,
6978,
198,
39344,
279,
74,
456,
1077,
11,
279,
... | 2.088319 | 1,053 |
<gh_stars>0
function AbstractPlotting.plot!(
lscene::LScene, P::AbstractPlotting.PlotFunc,
attributes::AbstractPlotting.Attributes, args...;
kw_attributes...)
plot = AbstractPlotting.plot!(lscene.scene, P, attributes, args...; kw_attributes...)[end]
plot
end
protrusionnode(ls::LScene)... | [
27,
456,
62,
30783,
29,
15,
198,
8818,
27741,
43328,
889,
13,
29487,
0,
7,
198,
220,
220,
220,
220,
220,
220,
220,
300,
29734,
3712,
43,
36542,
11,
350,
3712,
23839,
43328,
889,
13,
43328,
37,
19524,
11,
198,
220,
220,
220,
220,
... | 2.690171 | 468 |
using Documenter
using Avatar
makedocs(
modules = [Avatar],
sitename = "Avatar.jl",
pages = [
"Home" => "index.md",
],
)
deploydocs(
repo = "github.com/laschuet/Avatar.jl.git",
target = "build",
)
| [
3500,
16854,
263,
198,
3500,
26703,
198,
198,
76,
4335,
420,
82,
7,
198,
220,
220,
220,
13103,
796,
685,
7355,
9459,
4357,
198,
220,
220,
220,
1650,
12453,
796,
366,
7355,
9459,
13,
20362,
1600,
198,
220,
220,
220,
5468,
796,
685,
... | 2.158879 | 107 |
<filename>src/DiffEqParamEstim.jl
module DiffEqParamEstim
using DiffEqBase, LsqFit, PenaltyFunctions,
RecursiveArrayTools, ForwardDiff, Calculus, Distributions,
LinearAlgebra, DiffEqSensitivity, Dierckx,
SciMLBase
import PreallocationTools
STANDARD_PROB_GENERATOR(prob,p) = remake(prob;u0=eltype(p).(p... | [
27,
34345,
29,
10677,
14,
28813,
36,
80,
22973,
22362,
320,
13,
20362,
198,
21412,
10631,
36,
80,
22973,
22362,
320,
198,
3500,
10631,
36,
80,
14881,
11,
406,
31166,
31805,
11,
41676,
24629,
2733,
11,
198,
220,
220,
220,
220,
220,
3... | 1.964687 | 623 |
@recipe function plot(lasso::LassoResult)
yguide --> "parameter"
xguide --> "lambda"
xflip --> true
lab := hcat(name_regressors(lasso.mdl)...)
(lasso.λ, lasso.β')
end
| [
31,
29102,
431,
2163,
7110,
7,
75,
28372,
3712,
43,
28372,
23004,
8,
198,
220,
220,
220,
331,
41311,
14610,
366,
17143,
2357,
1,
198,
220,
220,
220,
2124,
41311,
14610,
366,
50033,
1,
198,
220,
220,
220,
2124,
2704,
541,
14610,
2081... | 2.253012 | 83 |
<gh_stars>1-10
using Test, simgym
import simgym: leapfrog!
include("lineagetest.jl")
@test 1==1
testpos = [0.,0.]
testvel = [.0001,.0001]
cell = Cell[Cell(copy(testpos),copy(testvel),40,30)]
s = Simulation(cell,len_jones)
dt = .1
nsteps = 1
# this is what leapfrog SHOULD be doing
@. testpos += dt*testvel
leapfrog... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
6208,
11,
985,
1360,
76,
198,
11748,
985,
1360,
76,
25,
16470,
49956,
0,
198,
17256,
7203,
1370,
363,
316,
395,
13,
20362,
4943,
198,
198,
31,
9288,
352,
855,
16,
198,
198,
9288,
1... | 2.331169 | 154 |
<filename>example/stack.jl<gh_stars>1-10
import DataStructures
import StaticArrays
using BenchmarkTools
include("../src/soalight.jl")
include("../src/allocator.jl")
include("../src/stack.jl")
function testbase(n, p)
s = DataStructures.Stack{Tuple{Int, typeof(p)}}()
for j in 1:n[]
push!(s, (j, p))
... | [
27,
34345,
29,
20688,
14,
25558,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
11748,
6060,
44909,
942,
198,
11748,
36125,
3163,
20477,
198,
3500,
25187,
4102,
33637,
198,
198,
17256,
7203,
40720,
10677,
14,
568,
282,
432,
13,
... | 2.108883 | 698 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.