content stringlengths 6 1.03M | input_ids listlengths 4 535k | ratio_char_token float64 0.68 8.61 | token_count int64 4 535k |
|---|---|---|---|
p = pwd()
cd(Pkg.dir("RNGTest/deps/"))
run(`make`)
cd(p) | [
79,
796,
279,
16993,
3419,
198,
10210,
7,
47,
10025,
13,
15908,
7203,
49,
10503,
14402,
14,
10378,
82,
30487,
4008,
198,
5143,
7,
63,
15883,
63,
8,
198,
10210,
7,
79,
8
] | 1.69697 | 33 |
<reponame>JuliaImages/ImagesMeta.jl<filename>src/deprecations.jl
# have to import this or @deprecate doesn't work
import Base: getindex, setindex!, delete!, haskey, get, copy!, getproperty, setproperty!
@deprecate(ImageMeta(data::AbstractArray{T,N}, props::AbstractDict{String,Any}) where {T,N},
ImageMeta(da... | [
27,
7856,
261,
480,
29,
16980,
544,
29398,
14,
29398,
48526,
13,
20362,
27,
34345,
29,
10677,
14,
10378,
8344,
602,
13,
20362,
198,
2,
423,
284,
1330,
428,
393,
2488,
10378,
8344,
378,
1595,
470,
670,
198,
11748,
7308,
25,
651,
9630... | 2.52381 | 735 |
<gh_stars>10-100
using Distributions, PlotRecipes, Statistics
# Order of variables in function does not matter (since cor(y,x) = cor(x,y))
function correlation_ttest(y,x; h0=0.0)
n = length(y)
v = n - 2
X = [ones(n) x]
b = inv(X'X)*X'y
res = y .- X*b
s2 = sum(res.^2)/v
vb = s2.*in... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
3500,
46567,
507,
11,
28114,
6690,
18636,
11,
14370,
201,
198,
201,
198,
2,
8284,
286,
9633,
287,
2163,
857,
407,
2300,
357,
20777,
1162,
7,
88,
11,
87,
8,
796,
1162,
7,
87,
11,
88,
... | 1.900151 | 661 |
<filename>src/requires.jl
isgpu(x) = false
function __init__()
@require CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" begin
@info "DeconvOptim.jl: CUDA.jl is loaded, so include GPU functionality"
gpu_or_cpu(x) = CUDA.CuArray
isgpu(x::CUDA.CuArray) = true
# prevent slow sca... | [
27,
34345,
29,
10677,
14,
47911,
13,
20362,
198,
198,
271,
46999,
7,
87,
8,
796,
3991,
198,
198,
8818,
11593,
15003,
834,
3419,
198,
220,
220,
220,
2488,
46115,
29369,
5631,
796,
366,
2713,
1983,
3104,
891,
12,
4310,
1954,
12,
3553,... | 2.187179 | 390 |
@ghdef mutable struct Team
name::Union{String, Nothing}
description::Union{String, Nothing}
privacy::Union{String, Nothing}
permission::Union{String, Nothing}
slug::Union{String, Nothing}
id::Union{Int, Nothing}
end
namefield(t::Team) = t.id
@api_default function members(api::GitHubAPI, team;... | [
31,
456,
4299,
4517,
540,
2878,
4816,
198,
220,
220,
220,
1438,
3712,
38176,
90,
10100,
11,
10528,
92,
198,
220,
220,
220,
6764,
3712,
38176,
90,
10100,
11,
10528,
92,
198,
220,
220,
220,
6782,
3712,
38176,
90,
10100,
11,
10528,
92,... | 2.787402 | 254 |
<filename>test/test_dscribe_soap.jl<gh_stars>1-10
@testset "Testing DScribe SOAP Descriptor with dc Si." begin
@info("Testing DScribe SOAP Descriptor for dc Si.")
using DescriptorZoo, JuLIP, Test
at = bulk(:Si, cubic=true)
desc = dscribe_soap(at, 6.5, n_max=4, l_max=4)
soap_ref = [0.47285277, 1.7203233, -1.6327636, 4.... | [
27,
34345,
29,
9288,
14,
9288,
62,
67,
12522,
62,
568,
499,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
31,
9288,
2617,
366,
44154,
360,
3351,
4892,
12809,
2969,
2935,
6519,
273,
351,
30736,
15638,
526,
2221,
198,
31,
109... | 1.895288 | 573 |
"""
PathGraph{T<:Integer}
A path graph, with each node linked to the previous and next one.
"""
struct PathGraph{T<:Integer} <: LG.AbstractGraph{T}
nv::T
function PathGraph{T}(nv::T) where {T<:Integer}
_nv = nv >= 0 ? T(nv) : zero(T)
new{T}(_nv)
end
end
PathGraph(nv::T) where {T<:Inte... | [
198,
37811,
198,
220,
220,
220,
10644,
37065,
90,
51,
27,
25,
46541,
92,
198,
198,
32,
3108,
4823,
11,
351,
1123,
10139,
6692,
284,
262,
2180,
290,
1306,
530,
13,
198,
37811,
198,
7249,
10644,
37065,
90,
51,
27,
25,
46541,
92,
127... | 2.282776 | 1,167 |
# Use baremodule to shave off a few KB from the serialized `.ji` file
baremodule SpineRuntimes_jll
using Base
using Base: UUID
import JLLWrappers
JLLWrappers.@generate_main_file_header("SpineRuntimes")
JLLWrappers.@generate_main_file("SpineRuntimes", UUID("3050c3ad-8159-57fb-bf12-a7300def513b"))
end # module SpineRun... | [
2,
5765,
6247,
21412,
284,
34494,
572,
257,
1178,
14204,
422,
262,
11389,
1143,
4600,
13,
7285,
63,
2393,
198,
49382,
21412,
1338,
500,
49,
2797,
999,
62,
73,
297,
198,
3500,
7308,
198,
3500,
7308,
25,
471,
27586,
198,
11748,
449,
3... | 2.598425 | 127 |
<gh_stars>0
nsteps = 5
nvilli = 8
rphotons = 0:10
###Test creation of photonsequence
photons = photonsequence(rphotons,nsteps)
nphotons = sum(datavalues(photons))
@test numvalues(photons) == nsteps
@test all(minimum(rphotons) .<= datavalues(photons) .<= maximum(rphotons))
###Test utility functions
@test GMHPhotoRecep... | [
27,
456,
62,
30783,
29,
15,
198,
77,
20214,
796,
642,
198,
77,
41082,
72,
796,
807,
198,
81,
38611,
684,
796,
657,
25,
940,
198,
198,
21017,
14402,
6282,
286,
2825,
40819,
594,
198,
38611,
684,
796,
2825,
40819,
594,
7,
81,
38611,... | 2.109503 | 4,283 |
function RungeKuttaExplicit!(V,dt,Fcn,CG,Param)
RK=Param.RK;
fV=Param.fV
Vn=Param.Vn
Vn .= V
for iStage=1:RK.nStage
V .= Vn;
for jStage=1:iStage-1
@views V .= V .+ dt*RK.ARKE[iStage,jStage] .* fV[:,:,:,jStage];
end
Fcn(view(fV,:,:,:,iStage),V,CG,Param);
end
V .= Vn;
for iStage=1:RK.nStage
@views V .= V .... | [
8818,
5660,
469,
42,
315,
8326,
18438,
3628,
0,
7,
53,
11,
28664,
11,
37,
31522,
11,
39816,
11,
22973,
8,
198,
49,
42,
28,
22973,
13,
49,
42,
26,
198,
69,
53,
28,
22973,
13,
69,
53,
198,
53,
77,
28,
22973,
13,
53,
77,
198,
... | 1.778846 | 208 |
# Copyright 2017 <NAME>
# See accompanying license file.
module Zonotopes
#===============================================================================
Basic types
===============================================================================#
"""
Zonotope(c, gi)
A zonotope with given center and genera... | [
2,
15069,
2177,
1279,
20608,
29,
198,
2,
4091,
19249,
5964,
2393,
13,
198,
198,
21412,
1168,
261,
313,
13920,
220,
198,
198,
2,
23926,
25609,
18604,
198,
26416,
3858,
198,
23926,
25609,
18604,
2,
198,
198,
37811,
198,
220,
220,
220,
... | 2.626572 | 1,272 |
module RocketFunctionActorTest
using Test
using Rocket
@testset "FunctionActor" begin
println("Testing: actor FunctionActor")
@testset begin
source = from([ 1, 2, 3 ])
values = Int[]
actor = (t::Int) -> push!(values, t)
subscribe!(source, actor)
@test values == [ 1... | [
21412,
16920,
22203,
40277,
14402,
198,
198,
3500,
6208,
198,
3500,
16920,
198,
198,
31,
9288,
2617,
366,
22203,
40277,
1,
2221,
628,
220,
220,
220,
44872,
7203,
44154,
25,
8674,
15553,
40277,
4943,
628,
220,
220,
220,
2488,
9288,
2617,... | 2.348361 | 244 |
#this example is modified from https://numericalenvironmental.wordpress.com/2018/05/26/a-steady-state-variably-saturated-flow-model-in-vertical-cross-section-a-finite-difference-approach-using-julia/
import NLsolve
import NonlinearEquations
import PyPlot
import Random
import Zygote
include("utilities.jl")
include("inp... | [
2,
5661,
1672,
318,
9518,
422,
3740,
1378,
77,
6975,
605,
38986,
282,
13,
40346,
13,
785,
14,
7908,
14,
2713,
14,
2075,
14,
64,
12,
28044,
88,
12,
5219,
12,
25641,
1346,
12,
82,
30192,
12,
11125,
12,
19849,
12,
259,
12,
1851,
60... | 2.217571 | 2,174 |
<gh_stars>0
#!/usr/bin/env julia
# del2z <<EMAIL>>
module IndexController
using Genie.Renderer
using Genie.Router
function index()
html!(:index, :index)
end
end
| [
27,
456,
62,
30783,
29,
15,
198,
2,
48443,
14629,
14,
8800,
14,
24330,
474,
43640,
198,
2,
1619,
17,
89,
9959,
27630,
4146,
4211,
198,
198,
21412,
12901,
22130,
198,
198,
3500,
49405,
13,
49,
437,
11882,
198,
3500,
49405,
13,
49,
... | 2.485294 | 68 |
struct Bounds{T}
min_val::T
max_val::T
end
function population_bounds(flip::Flip{Int64}, plan::Plan{Int64}, bounds::Bounds{Int64})::Bool
@inbounds return (plan.district_populations[flip.old_assignment] - flip.population >= bounds.min_val &&
plan.district_populations[flip.new_assignmen... | [
7249,
347,
3733,
90,
51,
92,
198,
220,
220,
220,
949,
62,
2100,
3712,
51,
198,
220,
220,
220,
3509,
62,
2100,
3712,
51,
198,
437,
198,
198,
8818,
3265,
62,
65,
3733,
7,
2704,
541,
3712,
7414,
541,
90,
5317,
2414,
5512,
1410,
371... | 1.916955 | 867 |
module AxisSets
using AutoHashEquals
using AxisKeys
using FeatureTransforms
using Impute
using NamedDims
using OrderedCollections
using ReadOnlyArrays
using Impute: DeclareMissings, Filter, Imputor, Validator
export KeyedDataset
# There's a few places calling `only` is convenient, even for older Julia releases
if V... | [
21412,
38349,
50,
1039,
198,
198,
3500,
11160,
26257,
23588,
874,
198,
3500,
38349,
40729,
198,
3500,
27018,
8291,
23914,
198,
3500,
9855,
1133,
198,
3500,
34441,
35,
12078,
198,
3500,
14230,
1068,
5216,
26448,
198,
3500,
4149,
10049,
316... | 2.71517 | 323 |
<filename>src/resynthesizer.jl
#=
The "Resynthesizer" algorithm for texture transfer in images.
Copyright 2021 <NAME>
Original algorithm by <NAME>.
=#
#=
This project is an exercise in translating and refactoring algorithms.
Code derived from https://github.com/bootchk/resynthesizer.git, written in C.
Specifically ... | [
27,
34345,
29,
10677,
14,
33000,
429,
956,
7509,
13,
20362,
198,
198,
2,
28,
198,
464,
366,
4965,
33567,
956,
7509,
1,
11862,
329,
11743,
4351,
287,
4263,
13,
198,
198,
15269,
33448,
1279,
20608,
29,
198,
198,
20556,
11862,
416,
127... | 3.735585 | 1,717 |
using CovarianceEstimation
using Statistics
using LinearAlgebra
using Test
using Random
using DelimitedFiles
using StatsBase
include("ref_lw_lshrink.jl")
include("ref_lw_nlshrink.jl")
include("legacy.jl")
Random.seed!(1234)
const CE = CovarianceEstimation
const X = randn(3, 8)
const Z = [2 -1 2; -1 2 -1; -1 -1 -... | [
3500,
39751,
2743,
590,
22362,
18991,
198,
3500,
14370,
198,
3500,
44800,
2348,
29230,
198,
3500,
6208,
198,
3500,
14534,
198,
3500,
4216,
320,
863,
25876,
198,
3500,
20595,
14881,
198,
198,
17256,
7203,
5420,
62,
75,
86,
62,
75,
36007,... | 2.188312 | 924 |
<reponame>UnofficialJuliaMirrorSnapshots/DynamicPolynomials.jl-7c1d4256-1411-5781-91ec-d7bc3513ac07<filename>test/runtests.jl
using DynamicPolynomials
using MultivariatePolynomials
using Test
using LinearAlgebra
include("mono.jl")
include("poly.jl")
include("comp.jl")
# TODO move to MultivariatePolynomials.jl
@testse... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
44090,
34220,
26601,
8231,
13,
20362,
12,
22,
66,
16,
67,
19,
11645,
12,
1415,
1157,
12,
3553,
6659,
12,
6420,
721,
12,
67,
22,
15630,
2327,
1485,
330,
... | 2.492754 | 414 |
module PLEXOSUtils
import EzXML: Document, eachelement, namespace, Node, nodecontent, parsexml
import InfoZIP: Archive, open_zip
export open_plexoszip, PLEXOSSolutionDataset, PLEXOSSolutionDatasetSummary
struct PLEXOSTable
name::String
fieldname::Symbol
fieldtype::Symbol
loadorder::Int
identifie... | [
21412,
350,
2538,
55,
2640,
18274,
4487,
198,
198,
11748,
21034,
55,
5805,
25,
16854,
11,
304,
4891,
1732,
11,
25745,
11,
19081,
11,
18666,
721,
38564,
11,
1582,
8044,
4029,
198,
11748,
14151,
57,
4061,
25,
20816,
11,
1280,
62,
13344,... | 2.340303 | 1,387 |
using BinaryProvider # requires BinaryProvider 0.3.0 or later
function compile(libname, tarball_url, hash; prefix=BinaryProvider.global_prefix, verbose=false)
# download to tarball_path
tarball_path = joinpath(prefix, "downloads", libname)
download_verify(tarball_url, hash, tarball_path; force=true, verbo... | [
3500,
45755,
29495,
1303,
4433,
45755,
29495,
657,
13,
18,
13,
15,
393,
1568,
628,
198,
8818,
17632,
7,
8019,
3672,
11,
13422,
1894,
62,
6371,
11,
12234,
26,
21231,
28,
33,
3219,
29495,
13,
20541,
62,
40290,
11,
15942,
577,
28,
9562... | 2.526603 | 733 |
<gh_stars>10-100
module LogBench
using MicroLogging
struct TrivialLogger <: AbstractLogger; end
MicroLogging.min_enabled_level(::TrivialLogger) = MicroLogging.Warn
MicroLogging.shouldlog(::TrivialLogger, level, a...) = level >= MicroLogging.Error
MicroLogging.handle_message(::TrivialLogger, a...; kws...) = println(a... | [
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
21412,
5972,
44199,
198,
198,
3500,
4527,
11187,
2667,
198,
198,
7249,
7563,
85,
498,
11187,
1362,
1279,
25,
27741,
11187,
1362,
26,
886,
198,
198,
13031,
11187,
2667,
13,
1084,
62,
25616,
... | 2.798872 | 1,064 |
<filename>tcm_code/tcm_predictHALOMNL.jl
function tcm_predictHALOMNL(N, u, alpha_val, assortments)
M = size(assortments,1)
v = zeros(size(assortments))
for m = 1 : M
v[m,N] = 1.0
for p in 1:N-1
if (assortments[m,p] > 0)
v[m,p] = exp(u[p] + dot( (1 - assortments[m,1:N-1]), alpha_val[:, p] ) )
end
en... | [
27,
34345,
29,
83,
11215,
62,
8189,
14,
83,
11215,
62,
79,
17407,
39,
1847,
2662,
32572,
13,
20362,
198,
8818,
256,
11215,
62,
79,
17407,
39,
1847,
2662,
32572,
7,
45,
11,
334,
11,
17130,
62,
2100,
11,
840,
419,
902,
8,
198,
197... | 1.820388 | 206 |
using MacroTools
export render, setdisplay, unsetdisplay, getdisplay, current_input, Media, @media, media,
@render
VERSION < v"0.5-" && const supertype = super
# Some type system utils
distance(S, T) =
!(S <: T) ? Inf :
S == T ? 0. :
1 + distance(supertype(S), T)
nearest(T, U, V) =
distance(T, U) <... | [
3500,
42755,
33637,
198,
198,
39344,
8543,
11,
900,
13812,
11,
555,
2617,
13812,
11,
651,
13812,
11,
1459,
62,
15414,
11,
6343,
11,
2488,
11431,
11,
2056,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
13287,
198,
198,
43717,
127... | 2.887451 | 1,546 |
# Motion parameter utilities
export derivative1d_linop, derivative1d_motionpars_linop, interpolation1d_linop, interpolation1d_motionpars_linop
function derivative1d_linop(t::AbstractVector{T}, order::Integer) where {T<:Real}
(order != 1) && (order != 2) && error("Order not supported (only 1 or 2)")
nt = lengt... | [
2,
20843,
11507,
20081,
198,
198,
39344,
27255,
16,
67,
62,
2815,
404,
11,
27255,
16,
67,
62,
38714,
79,
945,
62,
2815,
404,
11,
39555,
341,
16,
67,
62,
2815,
404,
11,
39555,
341,
16,
67,
62,
38714,
79,
945,
62,
2815,
404,
198,
... | 1.804009 | 1,796 |
module BlocksTests
using Gridap.TensorValues
using Gridap.Arrays
using Gridap.Fields
using Gridap.Fields: ArrayBlock, MockFieldArray, MockField, BroadcastingFieldOpMap, BlockMap
using Test
using FillArrays
using LinearAlgebra
#using Gridap.ReferenceFEs
b = ArrayBlock([Int[],[1,2,3,4]],Bool[0,1])
@test length(b) == 2
... | [
21412,
35111,
51,
3558,
198,
198,
3500,
24846,
499,
13,
51,
22854,
40161,
198,
3500,
24846,
499,
13,
3163,
20477,
198,
3500,
24846,
499,
13,
15878,
82,
198,
3500,
24846,
499,
13,
15878,
82,
25,
15690,
12235,
11,
44123,
15878,
19182,
1... | 2.0299 | 3,311 |
<filename>src/impl/utils.jl
TypeTuple{N} = NTuple{N, Type}
astupleoftypes(x::TypeTuple) = x
astupleoftypes(::Type{T}) where {T <: Tuple} = Tuple(T.parameters)
@inline foldlargs(op, x) = x
@inline foldlargs(op, x1, x2, xs...) =
foldlargs(op,
@return_if_reduced(op(x1, x2)),
xs...)
@inli... | [
27,
34345,
29,
10677,
14,
23928,
14,
26791,
13,
20362,
198,
6030,
51,
29291,
90,
45,
92,
796,
24563,
29291,
90,
45,
11,
5994,
92,
198,
198,
459,
29291,
11205,
9497,
7,
87,
3712,
6030,
51,
29291,
8,
796,
2124,
198,
459,
29291,
1120... | 2.123995 | 871 |
# ------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------... | [
2,
220,
16529,
22369,
438,
198,
2,
220,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
220,
49962,
739,
262,
17168,
13789,
357,
36393,
737,
4091,
38559,
24290,
287,
262,
29924,
6808,
329,
5964,
1321,
13,
198,
2,
... | 2.593846 | 2,275 |
## vec
vec(a::Ones{T}) where T = Ones{T}(length(a))
vec(a::Zeros{T}) where T = Zeros{T}(length(a))
vec(a::Fill{T}) where T = Fill{T}(a.value,length(a))
## Transpose/Adjoint
# cannot do this for vectors since that would destroy scalar dot product
transpose(a::Ones{T,2}) where T = Ones{T}(reverse(a.axes))
adjoint(a::... | [
2235,
43030,
198,
198,
35138,
7,
64,
3712,
2202,
274,
90,
51,
30072,
810,
309,
796,
32606,
90,
51,
92,
7,
13664,
7,
64,
4008,
198,
35138,
7,
64,
3712,
57,
27498,
90,
51,
30072,
810,
309,
796,
1168,
27498,
90,
51,
92,
7,
13664,
... | 2.222222 | 3,726 |
<gh_stars>1-10
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Core: LineInfoNode
if false
import Base: Base, @show
else
macro show(s)
return :(println(stdout, $(QuoteNode(s)), " = ", $(esc(s))))
end
end
include("compiler/ssair/basicblock.jl")
include("compiler... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
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,
3500,
7231,
25,
6910,
12360,
19667,
198,
198,
361,
3991,
... | 2.571429 | 252 |
# This file was generated, do not modify it. # hide
fit!(stand)
w = transform(stand, v)
@show round.(w, digits=2)
@show mean(w)
@show std(w) | [
2,
770,
2393,
373,
7560,
11,
466,
407,
13096,
340,
13,
1303,
7808,
198,
11147,
0,
7,
1481,
8,
198,
86,
796,
6121,
7,
1481,
11,
410,
8,
198,
31,
12860,
2835,
12195,
86,
11,
19561,
28,
17,
8,
198,
31,
12860,
1612,
7,
86,
8,
19... | 2.641509 | 53 |
# Routines for SPN evaluation and sampling
export
logpdf,
rand
"""
(spn::SumProductNetwork)(x::AbstractVector{<:Real})
(spn::SumProductNetwork)(x...)
Evaluates the sum-product network at a given instantiation `x` of the variables.
Summed-out variables are represented as `NaN`s.
# Parameters
- `x`:... | [
2,
39602,
1127,
329,
6226,
45,
12660,
290,
19232,
198,
198,
39344,
198,
220,
220,
220,
2604,
12315,
11,
220,
198,
220,
220,
220,
43720,
198,
198,
37811,
198,
220,
220,
220,
357,
2777,
77,
3712,
13065,
15667,
26245,
5769,
87,
3712,
2... | 2.306617 | 4,866 |
# ------------------------------------------------------------------
# Licensed under the ISC License. See LICENSE in the project root.
# ------------------------------------------------------------------
"""
filter(pred, sdata)
Retain all locations in spatial data `sdata` according to
a predicate function `pred`... | [
2,
16529,
438,
198,
2,
49962,
739,
262,
3180,
34,
13789,
13,
4091,
38559,
24290,
287,
262,
1628,
6808,
13,
198,
2,
16529,
438,
198,
198,
37811,
198,
220,
220,
220,
8106,
7,
28764,
11,
264,
7890,
8,
198,
198,
9781,
391,
477,
7064,
... | 3.315068 | 219 |
module Dispersal
# Use the README as the module docs
@doc read(joinpath(dirname(@__DIR__), "README.md"), String) Dispersal
using ConstructionBase,
Colors,
Dates,
DimensionalData,
Distributed,
Distributions,
DocStringExtensions,
FieldDefaults,
FieldDocTables,
FieldM... | [
21412,
3167,
19276,
282,
198,
2,
5765,
262,
20832,
11682,
355,
262,
8265,
34165,
198,
31,
15390,
1100,
7,
22179,
6978,
7,
15908,
3672,
7,
31,
834,
34720,
834,
828,
366,
15675,
11682,
13,
9132,
12340,
10903,
8,
3167,
19276,
282,
198,
... | 2.873729 | 1,180 |
"""
ДАНО: Где-то на неограниченном со всех сторон поле и без внутренних перегородок имеется единственный маркер. Робот - в произвольной клетке поля.
РЕЗУЛЬТАТ: Робот - в клетке с тем маркером.
"""
function detective!(r)
steps=1
side=Nord
while ismarker(r)==false
for a in 1:2
detective!(... | [
37811,
198,
140,
242,
140,
238,
140,
251,
140,
252,
25,
12466,
241,
43666,
16843,
12,
20375,
15166,
12466,
121,
16142,
12466,
121,
16843,
25443,
111,
21169,
16142,
22177,
18849,
141,
229,
16843,
22177,
22177,
25443,
120,
220,
21727,
15166... | 1.431507 | 438 |
# Tilting (addition with affine function)
"""
Tilt(f::ProximableFunction, a::AbstractArray, b::Real)
Given function `f`, returns `g(x) = f(x) + <a,x> + b`.
"""
immutable Tilt{T <: ProximableFunction, S <: AbstractArray, R <: Real} <: ProximableFunction
f::T
a::S
b::R
end
Tilt{T <: ProximableFunction, S <: A... | [
2,
40422,
889,
357,
2860,
653,
351,
1527,
500,
2163,
8,
198,
198,
37811,
198,
220,
309,
2326,
7,
69,
3712,
2964,
87,
320,
540,
22203,
11,
257,
3712,
23839,
19182,
11,
275,
3712,
15633,
8,
198,
198,
15056,
2163,
4600,
69,
47671,
58... | 2.103189 | 533 |
# Author: <NAME>, <EMAIL>
# Date: July 2020
export setup_model, parse_commandline, setup_geom
export example_src_geometry, example_rec_geometry, example_model, example_info
"""
Simple 2D model setup used for the tests.
"""
function smooth(v, sigma=3)
v0 = 1f0 .* v
for i=-sigma:sigma
i != 0 && (v0[:,... | [
2,
6434,
25,
1279,
20608,
22330,
1279,
27630,
4146,
29,
198,
2,
7536,
25,
2901,
12131,
198,
198,
39344,
9058,
62,
19849,
11,
21136,
62,
21812,
1370,
11,
9058,
62,
469,
296,
198,
39344,
1672,
62,
10677,
62,
469,
15748,
11,
1672,
62,
... | 2.092042 | 2,086 |
### A Pluto.jl notebook ###
# v0.16.0
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
loc... | [
21017,
317,
32217,
13,
20362,
20922,
44386,
198,
2,
410,
15,
13,
1433,
13,
15,
198,
198,
3500,
2940,
2902,
198,
3500,
21365,
18274,
4487,
198,
198,
2,
770,
32217,
20922,
3544,
2488,
21653,
329,
9427,
3458,
13,
1649,
2491,
428,
20922,
... | 1.947747 | 13,358 |
<filename>test/runtests.jl<gh_stars>1-10
using Test, YaoFlux
using Yao, Flux
using FiniteDifferences
using LinearAlgebra: norm
using Random
nonzero = xs -> findall(x -> abs2(x) > ϵ, reshape(xs, length(xs)))
ϵ = 1e-7
@testset "Circuit model" begin
circ = chain(3, put(1 => H), cnot(1, 2), cnot(1, 3), put(2 => Rx(0.... | [
27,
34345,
29,
9288,
14,
81,
2797,
3558,
13,
20362,
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
6208,
11,
37826,
37,
22564,
198,
3500,
37826,
11,
1610,
2821,
198,
3500,
4463,
578,
28813,
4972,
198,
3500,
44800,
2348,
29230,
25,
... | 2.122592 | 571 |
push!(LOAD_PATH, joinpath(@__DIR__, "../src/"))
using Documenter, HELICS, DocumenterMarkdown
cp(joinpath(@__DIR__, "../README.md"), joinpath(@__DIR__, "./src/index.md"), force=true, follow_symlinks=true)
makedocs(
sitename="HELICS Julia documentation",
format = Markdown()
)
deploydocs(
... | [
14689,
0,
7,
35613,
62,
34219,
11,
4654,
6978,
7,
31,
834,
34720,
834,
11,
366,
40720,
10677,
30487,
4008,
198,
3500,
16854,
263,
11,
36255,
19505,
11,
16854,
263,
9704,
2902,
198,
198,
13155,
7,
22179,
6978,
7,
31,
834,
34720,
834,... | 1.887671 | 365 |
lines = open("bitmasks.txt") do f
readlines(f)
end
memory = zeros(Int64, 100000)
zeromask = nothing
onemask = nothing
for l in lines
global memory, zeromask, onemask
if startswith(l, "mask = ")
mask = match(r"[10X]+", l).match
onemask = parse(Int, replace(mask, "X" => "0"); base = 2)
... | [
6615,
796,
1280,
7203,
2545,
5356,
591,
13,
14116,
4943,
466,
277,
198,
220,
220,
220,
1100,
6615,
7,
69,
8,
198,
437,
198,
198,
31673,
796,
1976,
27498,
7,
5317,
2414,
11,
1802,
830,
8,
198,
9107,
296,
2093,
796,
2147,
198,
261,
... | 2.083981 | 643 |
<filename>0007/sin as a vector.jl
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,jl:hydrogen
# text_representation:
# extension: .jl
# format_name: hydrogen
# format_version: '1.3'
# jupytext_version: 1.11.2
# kernelspec:
# display_name: Julia 1.8.0-DEV
# ... | [
27,
34345,
29,
830,
22,
14,
31369,
355,
257,
15879,
13,
20362,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
22... | 1.971171 | 555 |
using PlotlyJS, DataFrames, CSV
function table1()
values = [
"Salaries" 1200000 1300000 1300000 1400000
"Office" 20000 20000 20000 20000
"Merchandise" 80000 70000 120000 90000
"Legal" 2000 2000 2000 2000
"TOTAL" 12120000 130902000 131222000 14102000
]
trace = table(... | [
3500,
28114,
306,
20120,
11,
6060,
35439,
11,
44189,
198,
198,
8818,
3084,
16,
3419,
198,
220,
220,
220,
3815,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
366,
19221,
3166,
1,
1105,
20483,
1511,
20483,
1511,
20483,
1478,
20483,
... | 2.023145 | 1,469 |
# ============================================================
# I/O Methods
# ============================================================
export load_data, load_model, save_model
"""
load_data(file; mode = :csv, dlm = " ")
Load dataset from file
"""
function load_data(file; mode = :csv, dlm = nothing)
if m... | [
2,
46111,
4770,
2559,
18604,
198,
2,
314,
14,
46,
25458,
198,
2,
46111,
4770,
2559,
18604,
198,
198,
39344,
3440,
62,
7890,
11,
3440,
62,
19849,
11,
3613,
62,
19849,
198,
198,
37811,
198,
220,
220,
220,
3440,
62,
7890,
7,
7753,
26... | 2.472393 | 489 |
function test_kernels()
N = rand(50:200)
M = rand(50:200)
dim = rand(5:10)
Xtrain = rand(N, dim)
ytrain = rand(N) .>= 0.75
Xtest = rand(M, dim)
ytest = rand(N) .>= 0.75
kernels = [LinearKernel(),
SquaredExponentialKernel(),
RationalQuadraticKernel()]
... | [
8818,
1332,
62,
74,
44930,
3419,
628,
220,
220,
220,
399,
220,
220,
796,
43720,
7,
1120,
25,
2167,
8,
198,
220,
220,
220,
337,
220,
220,
796,
43720,
7,
1120,
25,
2167,
8,
198,
220,
220,
220,
5391,
796,
43720,
7,
20,
25,
940,
8... | 2.283092 | 1,798 |
using ThreeBodyTB
using Plots
#setup chosen Plots backend, i recommend pyplot
#pyplot()
#gr()
#make the crystal object
#here we choose Sc P rocksalt
types=["Sc", "P"];
#positions, crystal units
pos = [0 0 0 ; 0.5000000000 0.5000000000 0.5000000000]
#lattice vectors, in Angstrom units currently
A=[ [4.7 4.7 0]; [... | [
3500,
7683,
25842,
22737,
198,
3500,
1345,
1747,
198,
198,
2,
40406,
7147,
1345,
1747,
30203,
11,
1312,
4313,
12972,
29487,
198,
2,
9078,
29487,
3419,
198,
2,
2164,
3419,
628,
198,
2,
15883,
262,
15121,
2134,
198,
2,
1456,
356,
3853,
... | 2.77512 | 418 |
################################################################################
#
# IMPLEMENTATIONS OF DIFFERENT LATTICE MODIFICATION FUNCTIONS
# (MOST OF THEM ALSO WORK FOR UNITCELLS)
#
# STRUCTURE OF THE FILE
#
# 1) CONNECTIONS ADDING REMOVING
# - Add a new connection
# - remove connections (base... | [
29113,
29113,
14468,
198,
2,
198,
2,
220,
220,
30023,
2538,
10979,
18421,
3963,
360,
5064,
24302,
3525,
406,
17139,
8476,
19164,
30643,
6234,
29397,
4177,
11053,
198,
2,
220,
220,
357,
44,
10892,
3963,
44788,
35912,
30936,
7473,
4725,
2... | 2.462126 | 19,367 |
<gh_stars>1-10
using Weave
cd("D:/animated-adventure-in-mathematics/")
documentsListRaw = ["ElementaryFnTrans",
"ConicalCurvesNContours",
"ParametricSurfaces",
"RandomPts",
"TrigFnNTransformations"]
documentInList = documentsListRaw.* "/" .* documentsListRaw.*".jmd"
formats = ["github",
... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
775,
1015,
201,
198,
201,
198,
10210,
7203,
35,
14079,
11227,
515,
12,
324,
5388,
12,
259,
12,
6759,
10024,
873,
14,
4943,
201,
198,
201,
198,
201,
198,
15390,
2886,
8053,
27369,
796... | 2.019753 | 405 |
using FEMfunctions
using LinearAlgebra
using SparseArrays
include("twodStokes.jl")
@test twodStokes(25)<1e-10
| [
3500,
376,
3620,
12543,
2733,
198,
198,
3500,
44800,
2348,
29230,
198,
3500,
1338,
17208,
3163,
20477,
198,
198,
17256,
7203,
4246,
375,
1273,
3369,
13,
20362,
4943,
198,
198,
31,
9288,
665,
375,
1273,
3369,
7,
1495,
8,
27,
16,
68,
... | 2.511111 | 45 |
<filename>parasite.jl
# Functions for getting parasitic assist from using other people's results.
if !isdefined(Main, :Response)
include("core.jl")
end
"""
readResponses(filename)
Read responses from a file. Each line should be one of:
* a letter-coded response (b=black, y=yellow, g=green),
* a commen... | [
27,
34345,
29,
1845,
292,
578,
13,
20362,
198,
2,
40480,
329,
1972,
49238,
3342,
422,
1262,
584,
661,
338,
2482,
13,
201,
198,
201,
198,
361,
5145,
271,
23211,
7,
13383,
11,
1058,
31077,
8,
201,
198,
17256,
7203,
7295,
13,
20362,
... | 2.61246 | 947 |
using OrdinaryDiffEq, ParameterizedFunctions, ODE, ODEInterfaceDiffEq, LSODA,
Sundials, DiffEqDevTools
f = @ode_def LotkaVolterra begin
dx = a*x - b*x*y
dy = -c*y + d*x*y
end a b c d
p = [1.5,1.0,3.0,1.0]
prob = ODEProblem(f,[1.0;1.0],(0.0,10.0),p)
abstols = 1.0 ./ 10.0 .^ (6:13)
reltols = 1.0 ./ 10.0 .^ ... | [
198,
3500,
14230,
3219,
28813,
36,
80,
11,
25139,
2357,
1143,
24629,
2733,
11,
440,
7206,
11,
440,
7206,
39317,
28813,
36,
80,
11,
30948,
3727,
32,
11,
198,
220,
220,
220,
220,
220,
3309,
8231,
11,
10631,
36,
80,
13603,
33637,
198,
... | 1.867673 | 1,126 |
<gh_stars>0
using ArgParse
s = ArgParseSettings()
@add_arg_table s begin
"--part2"
help = "Do part 2"
action = :store_true
"--test"
help = "Run test data"
action = :store_true
end
parsed_args = parse_args(ARGS, s)
test_suffix = parsed_args["test"] ? "_test" : ""
input = readlines("input/day_16$... | [
27,
456,
62,
30783,
29,
15,
198,
3500,
20559,
10044,
325,
198,
82,
796,
20559,
10044,
325,
26232,
3419,
198,
31,
2860,
62,
853,
62,
11487,
264,
2221,
198,
220,
220,
220,
366,
438,
3911,
17,
1,
198,
220,
220,
220,
1037,
796,
366,
... | 2.000423 | 2,363 |
#
# Copyright (c) 2021 <NAME>, <NAME>, <NAME>
# Licensed under the MIT license. See LICENSE file in the project root for details.
#
using FMI
# our simulation setup
t_start = 0.0
t_stop = 8.0
# this FMU runs under Windows/Linux
pathToFMU = joinpath(dirname(@__FILE__), "../model/OpenModelica/v1.17.0/SpringFrictionPen... | [
2,
198,
2,
15069,
357,
66,
8,
33448,
1279,
20608,
22330,
1279,
20608,
22330,
1279,
20608,
29,
198,
2,
49962,
739,
262,
17168,
5964,
13,
4091,
38559,
24290,
2393,
287,
262,
1628,
6808,
329,
3307,
13,
198,
2,
198,
198,
3500,
376,
8895... | 2.788018 | 434 |
<reponame>lucaferranti/RevisedAffineArithmetic.jl<gh_stars>0
module RevisedAffineArithmetic
using FastRounding, IntervalArithmetic, StaticArrays
import Base: +, -, *, /, ==, convert, promote_rule
import IntervalArithmetic: ±
export RevisedAffineForm, ±, @rafvars, @affinize
include("affineform.jl")
include("arithmet... | [
27,
7856,
261,
480,
29,
75,
1229,
34659,
5250,
72,
14,
18009,
1417,
35191,
500,
3163,
29848,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
21412,
31492,
35191,
500,
3163,
29848,
198,
198,
3500,
12549,
49,
9969,
11,
4225,
2100,
3163,
2... | 2.877863 | 131 |
using RoME
using Test
using Statistics
## MWE Pose2Point2 from #388
@testset "basic Pose2Point2 test" begin
fg = initfg()
addVariable!(fg, :x1, Pose2)
addVariable!(fg, :l1, Point2)
addFactor!(fg, [:x1], PriorPose2(MvNormal([0.,0, 0], [0.01, 0.01, 0.01])))
addFactor!(fg, [:x1; :l1], Pose2Point2(... | [
3500,
5564,
11682,
198,
3500,
6208,
198,
3500,
14370,
198,
198,
2235,
337,
8845,
37557,
17,
12727,
17,
422,
1303,
30460,
198,
31,
9288,
2617,
366,
35487,
37557,
17,
12727,
17,
1332,
1,
2221,
628,
220,
220,
220,
277,
70,
796,
2315,
4... | 2.072664 | 289 |
<gh_stars>1-10
using Test
using Distributed
using KronLinInv
# get all the functions
include("test_suite.jl")
nwor = nworkers()
@testset "Tests " begin
println("\n Number of workers available: $nwor")
println()
printstyled("Testing 2D example \n", bold=true,color=:cyan)
@test test2D()
print... | [
27,
456,
62,
30783,
29,
16,
12,
940,
628,
198,
3500,
6208,
198,
3500,
4307,
6169,
198,
3500,
44732,
14993,
19904,
628,
198,
2,
651,
477,
262,
5499,
198,
17256,
7203,
9288,
62,
2385,
578,
13,
20362,
4943,
628,
198,
47516,
273,
796,
... | 2.616352 | 159 |
#-------------------------------------------------------------------------------
# Types representing the ply data model
"""
plyname(data)
Return the name that `data` is associated with when serialized in a ply file
"""
function plyname
end
const PropNameList = Union{AbstractVector,Tuple}
#---------------------... | [
2,
10097,
24305,
198,
2,
24897,
10200,
262,
35960,
1366,
2746,
198,
198,
37811,
198,
220,
220,
220,
35960,
3672,
7,
7890,
8,
198,
198,
13615,
262,
1438,
326,
4600,
7890,
63,
318,
3917,
351,
618,
11389,
1143,
287,
257,
35960,
2393,
1... | 2.896623 | 2,428 |
<filename>src/utilities.jl
"""
Get the latest VersionNumber for base_path/Versions.toml
"""
function _get_latest_version(base_path::AbstractString)
versions_file_path = joinpath(base_path, "Versions.toml")
if isfile(versions_file_path)
versions_content = parsefile(versions_file_path)
versions =... | [
27,
34345,
29,
10677,
14,
315,
2410,
13,
20362,
198,
37811,
198,
3855,
262,
3452,
10628,
15057,
329,
2779,
62,
6978,
14,
45150,
13,
39532,
75,
198,
37811,
198,
8818,
4808,
1136,
62,
42861,
62,
9641,
7,
8692,
62,
6978,
3712,
23839,
1... | 2.565432 | 1,620 |
<filename>test/runtests_example02.jl
using Test, GeneticAlgorithm
STRING_TO_FIND = "hello"
function createGeneExample()
return rand(STRING_TO_FIND)
end
function fitnessExample(ind)
allDifferent = filter(((a,b),) -> a != b, collect(zip(STRING_TO_FIND, ind)))
return length(allDifferent)
end
@test join(r... | [
27,
34345,
29,
9288,
14,
81,
2797,
3558,
62,
20688,
2999,
13,
20362,
198,
3500,
6208,
11,
42295,
2348,
42289,
198,
198,
18601,
2751,
62,
10468,
62,
37,
12115,
796,
366,
31373,
1,
198,
198,
8818,
2251,
39358,
16281,
3419,
220,
198,
2... | 2.781457 | 151 |
# -----------------------------------------------------
# Precompute relevant 1-D basis elements
# -----------------------------------------------------
# Efficiency criticality: MED
# Computation done once, but is done upon import
# This could be improved
KMAX = 5
LMAX = 10
precomputed_diffs = Dict{NTuple{4, Int}, ... | [
2,
20368,
19351,
12,
198,
2,
3771,
5589,
1133,
5981,
352,
12,
35,
4308,
4847,
198,
2,
20368,
19351,
12,
198,
198,
2,
45728,
4688,
414,
25,
26112,
198,
2,
22476,
341,
1760,
1752,
11,
475,
318,
1760,
2402,
1330,
198,
2,
770,
714,
... | 2.656566 | 297 |
<reponame>ptelang/opencv_contrib<gh_stars>10-100
function IOU(boxA, boxB)
xA = max(boxA[1], boxB[1])
yA = max(boxA[2], boxB[2])
xB = min(boxA[3], boxB[3])
yB = min(boxA[4], boxB[4])
interArea = max(0, xB - xA + 1) * max(0, yB - yA + 1)
boxAArea = (boxA[3] - boxA[1] + 1) * (boxA[4] - boxA[2] + 1)
boxBArea = (boxB... | [
27,
7856,
261,
480,
29,
457,
417,
648,
14,
9654,
33967,
62,
3642,
822,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
8818,
314,
2606,
7,
3524,
32,
11,
3091,
33,
8,
198,
197,
87,
32,
796,
3509,
7,
3524,
32,
58,
16,
4357,
3091,
... | 2.093146 | 569 |
## Handler for reading outputs of crowdsource processing on DECaPS
module decam
export inject_rename #
export read_decam #
export read_crowdsource #
export load_psfmodel_cs #
export save_fxn #
export get_catnames #
export proc_ccd
export proc_all
export decam_dir
using CloudCovErr
using PyCall
using FITSIO
import I... | [
2235,
32412,
329,
3555,
23862,
286,
4315,
10459,
7587,
319,
27196,
64,
3705,
198,
21412,
875,
321,
198,
198,
39344,
8677,
62,
918,
480,
1303,
198,
39344,
1100,
62,
12501,
321,
1303,
198,
39344,
1100,
62,
66,
3986,
10459,
1303,
198,
39... | 2.357095 | 9,006 |
<reponame>AndyGreenwell/VectorCalculus.jl
module VectorCalculus
export grad, divergence, curl
function gradhelper(f)
s = size(f,1)
if s == 1
g = zeros(f)
elseif s == 2
f1 = f[1,:] # Extracts the first "row" from all dimensions.
f2 = f[2,:]
n = length(f1)
... | [
27,
7856,
261,
480,
29,
35314,
13719,
4053,
14,
38469,
9771,
17576,
13,
20362,
198,
21412,
20650,
9771,
17576,
198,
198,
39344,
3915,
11,
43366,
11,
29249,
198,
198,
8818,
3915,
2978,
525,
7,
69,
8,
198,
220,
220,
220,
264,
796,
254... | 1.624286 | 4,200 |
# overview over all variables used
meteo_UT # unixtime meteodata
meteo_DT # datetime meteodata
SWd # shortwave radiation downwards
WS # wind strength
WD # wind direction
WDstdv # standard deviation of wind direction
Temp # temperature at the peak
RH # relative humidity at the peak
TEMPstation
RHstation
PR... | [
2,
16700,
625,
477,
9633,
973,
220,
198,
198,
4164,
68,
78,
62,
3843,
197,
2,
555,
6346,
524,
47091,
375,
1045,
198,
4164,
68,
78,
62,
24544,
197,
2,
4818,
8079,
47091,
375,
1045,
198,
17887,
67,
197,
197,
2,
1790,
19204,
11881,
... | 2.642082 | 461 |
<reponame>ranjanan/FMI.jl
#
# Copyright (c) 2021 <NAME>, <NAME>, <NAME>
# Licensed under the MIT license. See LICENSE file in the project root for details.
#
t_start = 0.0
t_stop = 8.0
pathToFMU = joinpath(dirname(@__FILE__), "..", "model", ENV["EXPORTINGTOOL"], "SpringFrictionPendulum1D.fmu")
myFMU = fmiLoad(pathTo... | [
27,
7856,
261,
480,
29,
2596,
13881,
272,
14,
37,
8895,
13,
20362,
198,
2,
198,
2,
15069,
357,
66,
8,
33448,
1279,
20608,
22330,
1279,
20608,
22330,
1279,
20608,
29,
198,
2,
49962,
739,
262,
17168,
5964,
13,
4091,
38559,
24290,
2393... | 2.400463 | 432 |
# Domain and action grounding
include("action.jl")
include("domain.jl")
include("interface.jl")
include("available.jl")
include("execute.jl")
include("transition.jl")
include("utils.jl")
| [
2,
20021,
290,
2223,
48459,
198,
198,
17256,
7203,
2673,
13,
20362,
4943,
198,
17256,
7203,
27830,
13,
20362,
4943,
198,
17256,
7203,
39994,
13,
20362,
4943,
198,
17256,
7203,
15182,
13,
20362,
4943,
198,
17256,
7203,
41049,
13,
20362,
... | 3.298246 | 57 |
include("test_scalar_ref.jl")
include("test_scalar_ewise.jl")
include("test_scalar_special.jl")
include("test_scalar_reduc.jl")
include("test_scalar_hybrid.jl")
| [
198,
17256,
7203,
9288,
62,
1416,
282,
283,
62,
5420,
13,
20362,
4943,
198,
17256,
7203,
9288,
62,
1416,
282,
283,
62,
413,
786,
13,
20362,
4943,
198,
17256,
7203,
9288,
62,
1416,
282,
283,
62,
20887,
13,
20362,
4943,
198,
17256,
72... | 2.347826 | 69 |
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
name = "OsiBuilder"
version = v"0.107.9"
# Collection of sources required to build OsiBuilder
sources = [
"https://github.com/coin-or/Osi/archive/releases/0.10... | [
2,
5740,
326,
428,
4226,
460,
2453,
617,
3614,
3141,
12,
1370,
7159,
11,
1057,
198,
2,
4600,
73,
43640,
1382,
62,
18870,
21591,
13,
20362,
1377,
16794,
63,
284,
766,
257,
8748,
3275,
13,
198,
3500,
45755,
32875,
198,
198,
3672,
796,... | 2.433566 | 1,430 |
<reponame>UnofficialJuliaMirrorSnapshots/NetalignMeasures.jl-929bd66a-55f3-5ff7-97f4-6857e71d06b8<gh_stars>0
export alnfillrandom, alnfillrandom!, aln2perm
# Given an alignment f from set V1 to V2, that does not
# map all points in V1, map the rest of the points randomly
alnfillrandom(f::AbstractVector{<:Integer}, n::I... | [
27,
7856,
261,
480,
29,
3118,
16841,
16980,
544,
27453,
1472,
43826,
20910,
14,
7934,
31494,
5308,
13846,
13,
20362,
12,
24,
1959,
17457,
2791,
64,
12,
2816,
69,
18,
12,
20,
487,
22,
12,
5607,
69,
19,
12,
3104,
3553,
68,
4869,
67,... | 1.950382 | 524 |
using Documenter, DifferentialEvolution
makedocs(
sitename="DifferentialEvolution.jl", modules = [DifferentialEvolution])
| [
3500,
16854,
263,
11,
20615,
498,
15200,
2122,
198,
198,
76,
4335,
420,
82,
7,
198,
220,
220,
220,
1650,
12453,
2625,
40341,
498,
15200,
2122,
13,
20362,
1600,
13103,
796,
685,
40341,
498,
15200,
2122,
12962,
198
] | 3.342105 | 38 |
"""
VizData{C}
Struct storing a configuration of the visualization parameters. Available parameters are:
# Line styles (`::String`)
- `trajdash`
- `jobdash`
- `safetydash`
# Linewidths
- `trajlinewidth::Float64`
- `jobboxlinewidth::Float64`
# Colors
- `trajcolor::Vector{C}` (one color per crane)
- `safetycolo... | [
198,
37811,
198,
220,
220,
220,
36339,
6601,
90,
34,
92,
198,
198,
44909,
23069,
257,
8398,
286,
262,
32704,
10007,
13,
14898,
10007,
389,
25,
198,
198,
2,
6910,
12186,
357,
63,
3712,
10100,
63,
8,
198,
12,
4600,
9535,
73,
42460,
... | 2.104153 | 3,130 |
"""
AdjacentBernoulliDispersal
The realized amount of biomass i -> j is drawn
from a `Distrubtion` D.
The expected value of the distribution is set to be
E[D] = B_i * k_{ij}
"""
struct AdjacentBernoulliDispersal{R,W,N,P<:Float64} <: SetNeighborhoodRule{R,W}
neighborhood::N
probability::P... | [
37811,
198,
220,
220,
220,
1215,
73,
12643,
23927,
280,
15516,
7279,
19276,
282,
628,
220,
220,
220,
383,
6939,
2033,
286,
42584,
1312,
4613,
474,
318,
7428,
198,
220,
220,
220,
422,
257,
4600,
20344,
25089,
5378,
63,
360,
13,
628,
... | 2.390219 | 961 |
<gh_stars>0
#=
ogm_ls.jl
OGM with a MM line search
2019-03-16, <NAME>, University of Michigan
=#
export ogm_ls
using LinearAlgebra: I, norm, dot
"""
(x,out) = ogm_ls(B, gradf, curvf, x0; niter=?, ninner=?, fun=?)
OGM with a line search; Drori&Taylor @arxiv 1803.05676;
to minimize a general "inverse problem" co... | [
27,
456,
62,
30783,
29,
15,
198,
2,
28,
198,
519,
76,
62,
7278,
13,
20362,
198,
7730,
44,
351,
257,
20806,
1627,
2989,
198,
23344,
12,
3070,
12,
1433,
11,
1279,
20608,
22330,
2059,
286,
7055,
198,
46249,
198,
198,
39344,
267,
3987... | 2.178749 | 1,807 |
<reponame>alisafaya/SHA-RNN.jl
# download and extract data if data/ directory does not exist
if !isfile("enwik8")
enwik8 = download("http://www.mattmahoney.net/dc/enwik8.zip");
run(`unzip $enwik8`)
rm(enwik8)
end
if isfile("train.txt")
println("Tokenized enwik8 already exists - skipping processing")
el... | [
27,
7856,
261,
480,
29,
27315,
1878,
11729,
14,
37596,
12,
49,
6144,
13,
20362,
198,
2,
4321,
290,
7925,
1366,
611,
1366,
14,
8619,
857,
407,
2152,
198,
361,
5145,
4468,
576,
7203,
268,
20763,
23,
4943,
198,
220,
220,
220,
551,
20... | 2.262548 | 518 |
# This file is a part of SimilaritySearch.jl
using Dates
"""
abstract type NeighborhoodReduction end
Overrides `Base.reduce(::NeighborhoodReduction, res::KnnResult, index::SearchGraph)` to postprocess `res` using some criteria.
Called from `find_neighborhood`, and returns a new KnnResult struct (perhaps a co... | [
2,
770,
2393,
318,
257,
636,
286,
11014,
414,
18243,
13,
20362,
198,
198,
3500,
44712,
198,
198,
37811,
198,
220,
220,
220,
12531,
2099,
37914,
7738,
8110,
886,
198,
220,
220,
220,
220,
198,
5886,
81,
1460,
4600,
14881,
13,
445,
723... | 3.223104 | 1,134 |
<reponame>vavrines/KitML.jl<filename>example/sn1d.jl
using KitBase, KitBase.FastGaussQuadrature
using ProgressMeter, Plots
begin
# case
matter = "photon"
case = "linesource"
space = "1d1f1v"
nSpecies = 1
flux = "kfvs"
collision = "bgk"
interpOrder = 2
limiter = "vanleer"
boundar... | [
27,
7856,
261,
480,
29,
85,
615,
81,
1127,
14,
20827,
5805,
13,
20362,
27,
34345,
29,
20688,
14,
16184,
16,
67,
13,
20362,
198,
3500,
10897,
14881,
11,
10897,
14881,
13,
22968,
35389,
1046,
4507,
41909,
1300,
198,
3500,
18387,
44,
2... | 1.785171 | 2,104 |
<gh_stars>1-10
using AdaOPS
using Test
using POMDPs
using POMDPModels
using POMDPSimulators
using Random
using POMDPModelTools
using ParticleFilters
using BeliefUpdaters
using StaticArrays
using POMDPPolicies
using Plots
ENV["GKSwstype"] = "100"
theme(:mute)
# include("baby_sanity_check.jl")
include("independent_boun... | [
27,
456,
62,
30783,
29,
16,
12,
940,
198,
3500,
47395,
30737,
198,
3500,
6208,
198,
198,
3500,
350,
2662,
6322,
82,
198,
3500,
350,
2662,
6322,
5841,
1424,
198,
3500,
350,
2662,
35,
3705,
320,
24325,
198,
3500,
14534,
198,
3500,
350... | 2.227249 | 1,901 |
#=
This file is auto-generated. Do not edit.
=#
"""
mutable struct LoadZone <: AggregationTopology
name::String
maxactivepower::Float64
maxreactivepower::Float64
services::Vector{Service}
forecasts::InfrastructureSystems.Forecasts
internal::InfrastructureSystemsIntern... | [
2,
28,
198,
1212,
2393,
318,
8295,
12,
27568,
13,
2141,
407,
4370,
13,
198,
46249,
198,
37811,
198,
220,
220,
220,
4517,
540,
2878,
8778,
26961,
1279,
25,
19015,
43068,
9126,
1435,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
3712,... | 3.160057 | 706 |
## Residual Constrained Alternating Minimization
# Function Definitions
function AltMinChol{ET<:Number}(b::AbstractArray{ET}, r::Int, K::Int)
# Performs RCAM on a single matricised monochromatic slice
# Calls: minFrobQR
# Generate L0
m,n = size(b)
L = collect(ET, randn(m,r))
indi = (1:max(m,n))::Unit... | [
2235,
1874,
312,
723,
1482,
2536,
1328,
13243,
803,
1855,
320,
1634,
198,
2,
15553,
45205,
198,
198,
8818,
12344,
9452,
1925,
349,
90,
2767,
27,
25,
15057,
92,
7,
65,
3712,
23839,
19182,
90,
2767,
5512,
374,
3712,
5317,
11,
509,
371... | 1.889207 | 1,047 |
<filename>timings.jl
using YAML
using Logging
using ArgParse
include("src/network.jl")
include("src/plot.jl")
argtable = ArgParseSettings()
@add_arg_table argtable begin
"--seed"
arg_type = Int
default = 0
"--log"
arg_type = String
default = "timings.log"
"--plot"
arg_type = String
... | [
27,
34345,
29,
16514,
654,
13,
20362,
198,
3500,
575,
2390,
43,
198,
3500,
5972,
2667,
198,
3500,
20559,
10044,
325,
198,
198,
17256,
7203,
10677,
14,
27349,
13,
20362,
4943,
198,
17256,
7203,
10677,
14,
29487,
13,
20362,
4943,
198,
1... | 1.973721 | 723 |
<filename>src/Map/NumberField.jl
type NfToNfMor <: Map{AnticNumberField, AnticNumberField}
header::MapHeader{AnticNumberField, AnticNumberField}
prim_img::nf_elem
function NfToNfMor()
z = new()
z.header = MapHeader()
return r
end
function NfToNfMor(K::AnticNumberField, L::AnticNumberField, y:... | [
27,
34345,
29,
10677,
14,
13912,
14,
15057,
15878,
13,
20362,
198,
198,
4906,
399,
69,
2514,
45,
69,
20044,
1279,
25,
9347,
90,
13217,
291,
15057,
15878,
11,
3738,
291,
15057,
15878,
92,
198,
220,
13639,
3712,
13912,
39681,
90,
13217,... | 1.950255 | 3,337 |
<filename>benchmarks/benchmark.jl<gh_stars>0
using Distributed
if haskey(ENV, "BENCHMARK_PROCS")
const np, nt = parse.(Ref(Int), split(ENV["BENCHMARK_PROCS"], ":"))
for i in workers()
addprocs(np; exeflags="-t $nt")
end
else
const np = 2
const nt = 1
end
if haskey(ENV, "BENCHMARK_REMOTES")
... | [
27,
34345,
29,
26968,
14306,
14,
26968,
4102,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
3500,
4307,
6169,
198,
361,
468,
2539,
7,
1677,
53,
11,
366,
33,
1677,
3398,
44,
14175,
62,
4805,
4503,
50,
4943,
198,
220,
220,
220,
1500,
... | 1.895151 | 6,104 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .jl
# format_name: light
# format_version: '1.3'
# jupytext_version: 1.0.5
# kernelspec:
# display_name: Julia 1.4.2
# language: julia
# name: julia-1.4
# ---
# ### MRI reconstruction demo
# Single-coil under-s... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
20362,
198,
2,
220,
220,
220,
220,... | 2.183597 | 4,548 |
<reponame>JuliaGeodynamics/GeoParams.jl
module Conductivity
# This implements different methods to specify conductivity of rocks
#
# If you want to add a new method here, feel free to do so.
# Remember to also export the function name in GeoParams.jl (in addition to here)
using Parameters, LaTeXStrings, Unitful
usin... | [
27,
7856,
261,
480,
29,
16980,
544,
10082,
44124,
14,
10082,
78,
10044,
4105,
13,
20362,
198,
21412,
28579,
3458,
198,
198,
2,
770,
23986,
1180,
5050,
284,
11986,
3189,
3458,
286,
12586,
198,
2,
198,
2,
1002,
345,
765,
284,
751,
257... | 2.229334 | 6,484 |
function assignStructure(df, tmArr)
nrows = size(df, 1)
df.element = repeat([""], nrows)
df.structMap = zeros(nrows)
df.resNum = 1:nrows
init = 1
for region in tmArr
df.element[collect(region)] .= "tm"
df.structMap[collect(region)] .= init
init += 1
end
init = 0.5... | [
8818,
8333,
1273,
5620,
7,
7568,
11,
256,
76,
3163,
81,
8,
198,
197,
77,
8516,
796,
2546,
7,
7568,
11,
352,
8,
198,
220,
220,
220,
47764,
13,
30854,
796,
9585,
7,
14692,
33116,
299,
8516,
8,
198,
220,
220,
220,
47764,
13,
7249,
... | 2.025352 | 355 |
<filename>test/query/expression_operations/rewrite_column_names.jl
module TestExpressionsRewriteColumnNames
import Test: @testset, @test
import Volcanito: rewrite_column_names, ColumnName
@testset "rewrite_column_names" begin
input = rewrite_column_names(
:(a + b),
:t,
Dict(ColumnName(:a, ... | [
27,
34345,
29,
9288,
14,
22766,
14,
38011,
62,
3575,
602,
14,
1809,
6525,
62,
28665,
62,
14933,
13,
20362,
198,
21412,
6208,
38839,
507,
30003,
6525,
39470,
36690,
198,
198,
11748,
6208,
25,
2488,
9288,
2617,
11,
2488,
9288,
198,
1174... | 2.50289 | 173 |
precompile(Tuple{typeof(REPL.LineEdit.activate), REPL.LineEdit.TextInterface, REPL.LineEdit.MIState, REPL.Terminals.AbstractTerminal, REPL.Terminals.TextTerminal})
precompile(Tuple{typeof(REPL.LineEdit.refresh_multi_line), REPL.Terminals.UnixTerminal, Any})
precompile(Tuple{typeof(Base.:(!=)), UInt64, UInt64})
precompi... | [
3866,
5589,
576,
7,
51,
29291,
90,
4906,
1659,
7,
2200,
6489,
13,
13949,
18378,
13,
39022,
828,
45285,
13,
13949,
18378,
13,
8206,
39317,
11,
45285,
13,
13949,
18378,
13,
8895,
9012,
11,
45285,
13,
44798,
874,
13,
23839,
44798,
282,
... | 2.497993 | 3,737 |
<gh_stars>0
###
### Alphabet
###
###
### Alphabets of biological symbols.
###
### This file is a part of BioJulia.
### License is MIT: https://github.com/BioJulia/BioSequences.jl/blob/master/LICENSE.md
"""
`Alphabet` is perhaps the most important type trait for biological sequences in
BioSequences.jl.
An `Alphabet` r... | [
27,
456,
62,
30783,
29,
15,
198,
21017,
198,
21017,
45695,
198,
21017,
198,
21017,
198,
21017,
39805,
397,
1039,
286,
10685,
14354,
13,
198,
21017,
198,
21017,
770,
2393,
318,
257,
636,
286,
16024,
16980,
544,
13,
198,
21017,
13789,
3... | 2.428114 | 3,123 |
__precompile__()
module Euler
include("Euler_.jl")
include("Euler_Primes.jl")
end
| [
834,
3866,
5589,
576,
834,
3419,
198,
198,
21412,
412,
18173,
198,
17256,
7203,
36,
18173,
44807,
20362,
4943,
198,
17256,
7203,
36,
18173,
62,
6836,
999,
13,
20362,
4943,
198,
437,
198
] | 2.515152 | 33 |
# Utils to lift LinearMaps to LinearMaps acting on larger vector spaces
import LinearMaps
import LinearAlgebra
struct LiftedMap{T,TI,TJ} <: LinearMap{T}
A::LinearMap{T}
I::TI
J::TJ
end
function LinearAlgebra.mul!(y::AbstractVector, L::LiftedMap, x::AbstractVector, α::Number, β::Number)
yI = view(y, L... | [
2,
7273,
4487,
284,
10303,
44800,
47010,
284,
44800,
47010,
7205,
319,
4025,
15879,
9029,
198,
11748,
44800,
47010,
198,
11748,
44800,
2348,
29230,
198,
198,
7249,
21073,
1513,
13912,
90,
51,
11,
25621,
11,
51,
41,
92,
1279,
25,
44800,
... | 2.301136 | 176 |
<reponame>jonniedie/ComposableDiffEqs
# function Base.:+(sys1::NLStateSpace, sys2::NLStateSpace)
# @assert(size(sys1) == size(sys2), "Systems have different shapes")
# @assert(sys1.Ts == sys2.Ts, "Sampling time mismatch")
#
# # f(x) = sys1.f(x[1:nstates(sys1)])
# end
function combine(f2::StateFunc... | [
27,
7856,
261,
480,
29,
46286,
77,
798,
494,
14,
5377,
1930,
540,
28813,
36,
48382,
198,
201,
198,
2,
2163,
7308,
11207,
33747,
17597,
16,
3712,
32572,
9012,
14106,
11,
25064,
17,
3712,
32572,
9012,
14106,
8,
201,
198,
2,
220,
220,
... | 2.099429 | 875 |
create(c::Client, ::Type{Overwrite}, ch::DiscordChannel, r::Role; kwargs...) = edit_channel_permissions(c, ch.id, r.id; kwargs..., type = OT_ROLE)
create(c::Client, ::Type{Overwrite}, ch::DiscordChannel, u::User; kwargs...) = edit_channel_permissions(c, ch.id, u.id; kwargs..., type = OT_MEMBER)
update(c::Client, o::Ov... | [
17953,
7,
66,
3712,
11792,
11,
7904,
6030,
90,
5886,
13564,
5512,
442,
3712,
15642,
585,
29239,
11,
374,
3712,
47445,
26,
479,
86,
22046,
23029,
796,
4370,
62,
17620,
62,
525,
8481,
7,
66,
11,
442,
13,
312,
11,
374,
13,
312,
26,
... | 2.591133 | 203 |
<reponame>daimeng0023/EDA.jl
function launch()
@static if Sys.isapple()
# OpenGL 3.2 + GLSL 150
glsl_version = 150
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 2)
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE) # 3... | [
27,
7856,
261,
480,
29,
67,
1385,
1516,
405,
1954,
14,
1961,
32,
13,
20362,
198,
8818,
4219,
3419,
628,
220,
220,
220,
2488,
12708,
611,
311,
893,
13,
271,
18040,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
30672,
513,
13,... | 1.813048 | 8,216 |
<reponame>emstoudenmire/ITensors.jl
const FermionSite = TagType"Fermion"
function siteinds(::FermionSite,
N::Int; kwargs...)
conserve_qns = get(kwargs,:conserve_qns,false)
conserve_nf = get(kwargs,:conserve_nf,conserve_qns)
conserve_parity = get(kwargs,:conserve_parity,conserve_qns)
if cons... | [
27,
7856,
261,
480,
29,
368,
301,
2778,
268,
47004,
14,
2043,
641,
669,
13,
20362,
198,
198,
9979,
376,
7780,
295,
29123,
796,
17467,
6030,
1,
37,
7780,
295,
1,
198,
198,
8818,
2524,
521,
82,
7,
3712,
37,
7780,
295,
29123,
11,
2... | 2.048726 | 903 |
<filename>src/static/code_stubs/julia/babylonian_square_roots.jl<gh_stars>10-100
function babylonian_sqrt(S)
# Your code goes here!
return 0
end
| [
27,
34345,
29,
10677,
14,
12708,
14,
8189,
62,
301,
23161,
14,
73,
43640,
14,
65,
397,
15158,
666,
62,
23415,
62,
19150,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
8818,
9289,
15158,
666,
62,
31166,
17034,
7,
50,
8,
... | 2.428571 | 63 |
<filename>src/keyword_register.jl<gh_stars>10-100
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/AbaqusReader.jl/blob/master/LICENSE
global __register__ = Set{String}()
"""
register_abaqus_keyword(keyword::String)
Add ABAQUS keyword `s` to register. That is, after registrati... | [
27,
34345,
29,
10677,
14,
2539,
4775,
62,
30238,
13,
20362,
27,
456,
62,
30783,
29,
940,
12,
3064,
198,
2,
770,
2393,
318,
257,
636,
286,
22300,
37,
3620,
13,
198,
2,
13789,
318,
17168,
25,
766,
3740,
1378,
12567,
13,
785,
14,
1... | 2.884 | 250 |
<reponame>amqdn/FastAI.jl
"""
savemethodmodel(path, method, model[; force = false])
Save a trained `model` along with a `method` to `path` for later inference.
Use [`loadmethodmodel`](#) for loading both back into a session. If `path`
already exists, only write to it if `force = true`.
If `model` weights are on ... | [
27,
7856,
261,
480,
29,
321,
80,
32656,
14,
22968,
20185,
13,
20362,
198,
198,
37811,
198,
220,
220,
220,
3613,
24396,
19849,
7,
6978,
11,
2446,
11,
2746,
58,
26,
2700,
796,
3991,
12962,
198,
198,
16928,
257,
8776,
4600,
19849,
63,
... | 2.888889 | 414 |
Base.promote_rule(::Type{XFloat16}, ::Type{XFloat32}) = XFloat32
Base.promote_rule(::Type{XFloat32}, ::Type{XFloat16}) = XFloat32
Base.promote_rule(::Type{XFloat16}, ::Type{Float16} ) = XFloat16
Base.promote_rule(::Type{XFloat16}, ::Type{Float32} ) = Float32
Base.promote_rule(::Type{XFloat16}, ::Type{Float64} ) = Floa... | [
14881,
13,
16963,
1258,
62,
25135,
7,
3712,
6030,
90,
55,
43879,
1433,
5512,
7904,
6030,
90,
55,
43879,
2624,
30072,
796,
1395,
43879,
2624,
198,
14881,
13,
16963,
1258,
62,
25135,
7,
3712,
6030,
90,
55,
43879,
2624,
5512,
7904,
6030,... | 2.423218 | 1,361 |
<filename>src/events.jl<gh_stars>0
export encode, decode
# Create a map from typebyte to the type definitions (not the actual types)
const MIDI_EVENTS_DEFS = Dict(
# MetaEvents
0x00 => (
type = :SequenceNumberEvent,
fields = ["number::Int"],
decode = :(ntoh.(reinterpret(UInt16, data))),... | [
27,
34345,
29,
10677,
14,
31534,
13,
20362,
27,
456,
62,
30783,
29,
15,
198,
39344,
37773,
11,
36899,
198,
198,
2,
13610,
257,
3975,
422,
2099,
26327,
284,
262,
2099,
17336,
357,
1662,
262,
4036,
3858,
8,
198,
9979,
33439,
62,
20114... | 2.588706 | 4,870 |
@testset "DemoSection" begin
root = joinpath("assets", "section")
# default section behavior
sec = DemoSection(joinpath(root, "default"))
@test sec.title == "Default"
@test sec.cards == []
subsec1, subsec2 = sec.subsections
@test subsec1.title == "Subsection 1"
@test subsec2.title == "S... | [
31,
9288,
2617,
366,
11522,
78,
16375,
1,
2221,
198,
220,
220,
220,
6808,
796,
4654,
6978,
7203,
19668,
1600,
366,
5458,
4943,
628,
220,
220,
220,
1303,
4277,
2665,
4069,
198,
220,
220,
220,
792,
796,
34588,
16375,
7,
22179,
6978,
7... | 2.544271 | 768 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.