content
stringlengths
6
1.03M
input_ids
listlengths
4
535k
ratio_char_token
float64
0.68
8.61
token_count
int64
4
535k
using ApproxFun, LinearAlgebra, Plots # In this example, we solve the heat equation with left Neumann and # right Dirichlet boundary conditions. # To allow for a solution through matrix exponentiation, we approximate # the initial condition with a basis that automatically constructs # even and odd extensions on the le...
[ 3500, 2034, 13907, 24629, 11, 44800, 2348, 29230, 11, 1345, 1747, 198, 198, 2, 554, 428, 1672, 11, 356, 8494, 262, 4894, 16022, 351, 1364, 3169, 40062, 290, 198, 2, 826, 36202, 488, 1616, 18645, 3403, 13, 198, 2, 1675, 1249, 329, 25...
2.531479
683
struct MinDomainVariableSelection{TakeObjective} <: AbstractVariableSelection{TakeObjective} end MinDomainVariableSelection(;take_objective=true) = MinDomainVariableSelection{take_objective}() function (::MinDomainVariableSelection{false})(cpmodel::CPModel) selectedVar = nothing minSize = typemax(Int) ...
[ 7249, 1855, 43961, 43015, 4653, 1564, 90, 12322, 10267, 425, 92, 1279, 25, 27741, 43015, 4653, 1564, 90, 12322, 10267, 425, 92, 886, 201, 198, 201, 198, 9452, 43961, 43015, 4653, 1564, 7, 26, 20657, 62, 15252, 425, 28, 7942, 8, 796, ...
2.323462
439
<reponame>kogpsy/vpompd<filename>src/playground.jl using StatsFuns: logistic using Plots βs = [0, 0.2, 0.5, 0.8, 1.0, 1.2, 1.5, 2, 3, 5, 7, 8, 10, 20] plot([x -> logistic(β * x) for β in βs], -2, 2, alpha = 0.8, legend = :none, ylims = [0, 1])
[ 27, 7856, 261, 480, 29, 74, 519, 13764, 14, 36133, 3361, 67, 27, 34345, 29, 10677, 14, 1759, 2833, 13, 20362, 198, 3500, 20595, 37, 13271, 25, 2604, 2569, 198, 3500, 1345, 1747, 198, 198, 26638, 82, 796, 685, 15, 11, 657, 13, 17, ...
1.782051
156
<gh_stars>0 function HHG(f::TVF) where {TVF<:AbstractVector{<:AbstractFloat}} n = length(f) spec = fft(f) return abs.(spec) .^ 2 / n^2 end function HHGfreq(f::TVF, ncyc) where {TVF<:AbstractVector{<:AbstractFloat}} x = collect(range(1, length(f), length = length(f))) return x ./ ncyc end
[ 27, 456, 62, 30783, 29, 15, 198, 8818, 47138, 38, 7, 69, 3712, 6849, 37, 8, 810, 1391, 6849, 37, 27, 25, 23839, 38469, 90, 27, 25, 23839, 43879, 11709, 198, 220, 220, 220, 299, 796, 4129, 7, 69, 8, 198, 220, 220, 220, 1020, 79...
2.30597
134
<filename>src/integrators/rk/integrators_iprk.jl "Parameters for right-hand side function of implicit partitioned Runge-Kutta methods." mutable struct ParametersIPRK{DT, TT, D, S, ET <: NamedTuple} <: Parameters{DT,TT} equs::ET tab::PartitionedTableau{TT} Δt::TT t::TT q::Vector{DT} p::Vector{D...
[ 27, 34345, 29, 10677, 14, 18908, 18942, 14, 81, 74, 14, 18908, 18942, 62, 541, 81, 74, 13, 20362, 198, 198, 1, 48944, 329, 826, 12, 4993, 1735, 2163, 286, 16992, 18398, 276, 5660, 469, 12, 42, 315, 8326, 5050, 526, 198, 76, 18187,...
1.979626
4,810
abstract type AbstractTableauSplitting{T <: Real} <: AbstractTableau{T} end function get_splitting_coefficients(r, a::Vector{T}, b::Vector{T}) where {T} @assert length(a) == length(b) s = length(a) f = zeros(Int, 2r*s) c = zeros(T, 2r*s) for i in 1:s for j in 1:r f[(2i-2)*r...
[ 198, 397, 8709, 2099, 27741, 10962, 559, 26568, 2535, 90, 51, 1279, 25, 6416, 92, 1279, 25, 27741, 10962, 559, 90, 51, 92, 886, 198, 198, 8818, 651, 62, 22018, 2535, 62, 1073, 41945, 7, 81, 11, 257, 3712, 38469, 90, 51, 5512, 275,...
1.933577
3,282
t = Template(; user=me) pkg_dir = joinpath(t.dir, test_pkg) @testset "AppVeyor" begin @testset "Plugin creation" begin p = AppVeyor() @test isempty(p.gitignore) @test p.src == joinpath(PkgTemplates.DEFAULTS_DIR, "appveyor.yml") @test p.dest == ".appveyor.yml" @test p.badges ...
[ 83, 796, 37350, 7, 26, 2836, 28, 1326, 8, 198, 35339, 62, 15908, 796, 4654, 6978, 7, 83, 13, 15908, 11, 1332, 62, 35339, 8, 198, 198, 31, 9288, 2617, 366, 4677, 53, 2959, 273, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, ...
2.093002
1,086
<filename>docs/make.jl using Documenter using MPIMeasurements makedocs( sitename = "MPIMeasurements", authors = "<NAME> et al.", format = Documenter.HTML(prettyurls = false), modules = [MPIMeasurements], pages = [ "Home" => "index.md", "Manual" => Any[ "Guide" => "man/gu...
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 16854, 263, 198, 3500, 4904, 3955, 68, 5015, 902, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 1650, 12453, 796, 366, 7378, 3955, 68, 5015, 902, 1600, 198, 220, 220, 22...
1.947137
454
<reponame>ericphanson/GuessworkQuantumSideInfo.jl<filename>test/high_precision_tests/tests.jl using GuessworkQuantumSideInfo using SDPAFamily using Test using LinearAlgebra, GenericLinearAlgebra # Fix a compatibility problem LinearAlgebra.eigmin(A::Hermitian{Complex{BigFloat},Array{Complex{BigFloat},2}}) = minimum...
[ 27, 7856, 261, 480, 29, 35626, 746, 23103, 14, 8205, 408, 1818, 24915, 388, 24819, 12360, 13, 20362, 27, 34345, 29, 9288, 14, 8929, 62, 3866, 16005, 62, 41989, 14, 41989, 13, 20362, 198, 3500, 37571, 1818, 24915, 388, 24819, 12360, 19...
2.288321
548
<reponame>dominikkiese/PFFRGSolver.jl """ get_observable_timers() :: Nothing Test performance of current observable implementation by Fourier transforming test correlations on a few 2D and 3D lattices with 50 x 50 x 0 (2D) or 50 x 50 x 50 (3D) momenta. """ function get_observable_timers() :: Nothing # init ...
[ 27, 7856, 261, 480, 29, 3438, 259, 36073, 444, 68, 14, 47, 5777, 49, 14313, 14375, 13, 20362, 198, 37811, 198, 220, 220, 220, 651, 62, 672, 3168, 540, 62, 16514, 364, 3419, 7904, 10528, 220, 198, 198, 14402, 2854, 286, 1459, 42550, ...
2.102535
868
# FUNCTION recover_primal """Computes the Ridge regressor INPUT ℓ - LossFunction to use Y - Vector of observed responses Z - Matrix of observed features γ - Regularization parameter OUTPUT w - Optimal regressor""" function recover_primal(ℓ::Regression, Y, Z, γ...
[ 2, 29397, 4177, 2849, 8551, 62, 1050, 4402, 198, 37811, 7293, 1769, 262, 20614, 842, 44292, 198, 1268, 30076, 198, 220, 2343, 226, 241, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 22014, 22203, 284, 779, 198, 220, 575, 22...
2.182156
538
<filename>src/equations/euler.jl<gh_stars>0 struct Euler <: Equation end @declare_dofs Euler [:rhou, :rhov, :rho, :e] struct GaussianWaveeuler <: Scenario end struct Sod_shock_tube <: Scenario end function is_periodic_boundary(equation::Euler, scenario::GaussianWaveeuler) # GaussianWave scenario with periodic bo...
[ 27, 34345, 29, 10677, 14, 4853, 602, 14, 68, 18173, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 7249, 412, 18173, 1279, 25, 7889, 341, 886, 198, 31, 32446, 533, 62, 67, 1659, 82, 412, 18173, 685, 25, 81, 15710, 11, 1058, 17179, ...
2.147915
1,751
# file containing methods for requesting forecast simulations from GEOGloWS """ forecast_stats(parameters::AbstractDict{Symbol,<:Any}) returns statistics calculated from 51 forecast ensemble members. """ function forecast_stats(parameters::AbstractDict{Symbol,<:Any}) endpoint = "ForecastStats" r = _make_r...
[ 2, 2393, 7268, 5050, 329, 20623, 11092, 27785, 422, 402, 4720, 38, 5439, 19416, 198, 37811, 198, 220, 220, 220, 11092, 62, 34242, 7, 17143, 7307, 3712, 23839, 35, 713, 90, 13940, 23650, 11, 27, 25, 7149, 30072, 198, 198, 7783, 82, 7...
2.89991
5,565
import Base.LinAlg: A_mul_B!, At_mul_B, A_ldiv_B! import Tulip: Model, PrimalDualPoint """ solve(model, tol, verbose) Solve model m using an infeasible predictor-corrector Interior-Point algorithm. # Arguments - `model::Model`: the optimization model - `tol::Float64`: numerical tolerance - `verbose::In...
[ 11748, 7308, 13, 14993, 2348, 70, 25, 198, 220, 220, 220, 317, 62, 76, 377, 62, 33, 28265, 1629, 62, 76, 377, 62, 33, 11, 317, 62, 335, 452, 62, 33, 0, 198, 198, 11748, 30941, 541, 25, 198, 220, 220, 220, 9104, 11, 37712, 3624...
1.872774
6,681
<reponame>simonsobs/ps_py # # [Utilities (util.jl)](@id util) # Unlike every other file in the pipeline, this file is not intended to be run directly. # Instead, include this in other files. These utilities provide an interface to the Planck # data products, namely # 1. binning matrix # 2. beam ``W_{\ell}^{XY} = B_{\e...
[ 27, 7856, 261, 480, 29, 14323, 26666, 1443, 14, 862, 62, 9078, 198, 2, 1303, 685, 18274, 2410, 357, 22602, 13, 20362, 15437, 7, 31, 312, 7736, 8, 198, 2, 12101, 790, 584, 2393, 287, 262, 11523, 11, 428, 2393, 318, 407, 5292, 284, ...
2.280418
4,882
using Revise using AdFem using PyCall using LinearAlgebra using PyPlot using SparseArrays using MAT np = pyimport("numpy") λ = 2.0 μ = 0.5 η = 1/12 β = 1/4; γ = 1/2 a = b = 0.1 m = 10 n = 5 h = 0.01 NT = 20 Δt = 1/NT bdedge = [] for j = 1:n push!(bdedge, [(j-1)*(m+1)+m+1 j*(m+1)+m+1]) end bdedge = vcat(bdedge...)...
[ 3500, 5416, 786, 198, 3500, 1215, 37, 368, 198, 3500, 9485, 14134, 198, 3500, 44800, 2348, 29230, 198, 3500, 9485, 43328, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 36775, 198, 37659, 796, 12972, 11748, 7203, 77, 32152, 4943, 198, ...
1.679868
1,515
<reponame>itsdfish/Minesweeper.jl<filename>src/Game.jl """ Cell(;has_mine=false, flagged=false, revealed=false, mine_count=0, idx=(0,0)) Cell represents the state of a cell in Minesweeper - `has_mine`: true if cell contains a mine - `flagged`: true if cell has been flagged as having a mine - `revealed`: true if th...
[ 27, 7856, 261, 480, 29, 896, 7568, 680, 14, 44, 1127, 732, 5723, 13, 20362, 27, 34345, 29, 10677, 14, 8777, 13, 20362, 198, 37811, 198, 220, 220, 220, 12440, 7, 26, 10134, 62, 3810, 28, 9562, 11, 34060, 28, 9562, 11, 4602, 28, 9...
2.217022
3,889
<filename>bin/run_equilibration.jl #!/usr/bin/env julia using DelimitedFiles using WaterMeanMeanForce using ArgParse s = ArgParseSettings() s.autofix_names = true models = join(list_models(), ", ") integrators = join(list_integrators(), ", ") @add_arg_table! s begin "--model" metavar = "M" ran...
[ 27, 34345, 29, 8800, 14, 5143, 62, 4853, 22282, 1358, 13, 20362, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 3500, 4216, 320, 863, 25876, 198, 198, 3500, 5638, 5308, 272, 5308, 272, 10292, 198, 198, 3500, 20559, ...
1.981495
1,351
<reponame>langfzac/Limbdark.jl<filename>src/deprecated/integrate_transit_cubature.jl # This is code for computing a transit model and derivatives integrated over # a time step, giving the fluence in units of time (since # flux is normalized to unity). using Cubature include("transit_poly_struct.jl") # Now the versi...
[ 27, 7856, 261, 480, 29, 17204, 69, 49897, 14, 43, 14107, 21953, 13, 20362, 27, 34345, 29, 10677, 14, 10378, 31023, 14, 18908, 4873, 62, 7645, 270, 62, 66, 549, 1300, 13, 20362, 198, 2, 770, 318, 2438, 329, 14492, 257, 11168, 2746, ...
2.473203
765
<gh_stars>1-10 function update_gam!(i::Int, n::Int, j::Int, s::State, c::Constants, d::Data) k = s.lam[i][n] if k > 0 z = s.Z[j, k] logpriorVec = log.(s.eta[z][i, j, :]) loglikeVec = logpdf.(Normal.(mus(z, s, c, d), sqrt(s.sig2[i])), s.y_imputed[i][n, j]) logPostVec = logpriorVec .+ loglikeVec s...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 8818, 4296, 62, 28483, 0, 7, 72, 3712, 5317, 11, 299, 3712, 5317, 11, 474, 3712, 5317, 11, 264, 3712, 9012, 11, 269, 3712, 34184, 1187, 11, 288, 3712, 6601, 8, 198, 220, 479, 796, 264, ...
1.835404
322
using Documenter, Jets, LinearAlgebra, Random makedocs( sitename="Jets.jl", modules=[Jets], pages = [ "index.md", "reference.md" ] ) deploydocs( repo = "github.com/ChevronETC/Jets.jl.git" )
[ 3500, 16854, 263, 11, 14728, 11, 44800, 2348, 29230, 11, 14534, 198, 198, 76, 4335, 420, 82, 7, 198, 220, 220, 220, 1650, 12453, 2625, 41, 1039, 13, 20362, 1600, 198, 220, 220, 220, 13103, 41888, 41, 1039, 4357, 198, 220, 220, 220, ...
2.26087
92
module test_stdlib_statistics using Statistics, Test X = rand(5) @test cor(X, 2X) == 1.0 @test cov(X, 2X) - cov(X, X) == var(X) end # module test_stdlib_statistics
[ 21412, 1332, 62, 19282, 8019, 62, 14269, 3969, 198, 198, 3500, 14370, 11, 6208, 198, 198, 55, 796, 43720, 7, 20, 8, 198, 198, 31, 9288, 1162, 7, 55, 11, 362, 55, 8, 6624, 352, 13, 15, 198, 31, 9288, 39849, 7, 55, 11, 362, 55, ...
2.333333
72
# Dispatchable and non-dispatchable generators ## Expressions "Curtailed power of a non-dispatchable generator as the difference between its reference power and the generated power." function expression_gen_curtailment(pm::_PM.AbstractPowerModel; nw::Int=_PM.nw_id_default, report::Bool=true) pgcurt = _PM.var(pm,...
[ 2, 35934, 540, 290, 1729, 12, 6381, 17147, 540, 27298, 628, 198, 2235, 10604, 507, 198, 198, 1, 34, 3325, 6255, 1176, 286, 257, 1729, 12, 6381, 17147, 540, 17301, 355, 262, 3580, 1022, 663, 4941, 1176, 290, 262, 7560, 1176, 526, 198...
2.256849
292
# --- # title: 1545. Find Kth Bit in Nth Binary String # id: problem1545 # author: <NAME> # date: 2020-10-31 # difficulty: Medium # categories: String # link: <https://leetcode.com/problems/find-kth-bit-in-nth-binary-string/description/> # hidden: true # --- # # Given two positive integers `n` and `k`, the binary stri...
[ 2, 11420, 198, 2, 3670, 25, 1315, 2231, 13, 9938, 509, 400, 4722, 287, 399, 400, 45755, 10903, 198, 2, 4686, 25, 1917, 1314, 2231, 198, 2, 1772, 25, 1279, 20608, 29, 198, 2, 3128, 25, 12131, 12, 940, 12, 3132, 198, 2, 8722, 25, ...
2.064257
747
<filename>src/Helpers.jl """copy a FEFunction on a FE Space""" clone_fe_function(space,f)=FEFunction(space,copy(get_free_dof_values(f))) """ Given an arbitrary number of FEFunction arguments, returns a tuple with their corresponding free DoF Values """ function Gridap.get_free_dof_values(functions...) map(get_free...
[ 27, 34345, 29, 10677, 14, 12621, 19276, 13, 20362, 198, 37811, 30073, 257, 18630, 22203, 319, 257, 18630, 4687, 37811, 198, 21018, 62, 5036, 62, 8818, 7, 13200, 11, 69, 47505, 15112, 22203, 7, 13200, 11, 30073, 7, 1136, 62, 5787, 62, ...
2.129458
757
<reponame>kdyrhage/GenomicAnnotations.jl using GenomicAnnotations using BioSequences using Test @testset "GenomicAnnotations" begin @testset "GenBank parsing" begin s = " gene 1..1" @test GenBank.parseposition(s) == (:gene, Locus(1:1, '+')) s = " gene complemen...
[ 27, 7856, 261, 480, 29, 74, 67, 2417, 71, 496, 14, 13746, 10179, 2025, 30078, 13, 20362, 198, 3500, 5215, 10179, 2025, 30078, 198, 3500, 16024, 44015, 3007, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 13746, 10179, 2025, 30078, 1,...
1.961924
2,495
""" CHELSA{BioClim} <: RasterDataSource Data from CHELSA, currently only the `BioClim` layer is implemented. See: [chelsa-climate.org](https://chelsa-climate.org/) """ struct CHELSA{X} <: RasterDataSource end layers(::Type{CHELSA{BioClim}}) = 1:19 """ getraster(T::Type{CHELSA{BioClim}}, [layer::Integer]) =>...
[ 37811, 198, 220, 220, 220, 5870, 3698, 4090, 90, 42787, 34, 2475, 92, 1279, 25, 371, 1603, 6601, 7416, 198, 198, 6601, 422, 5870, 3698, 4090, 11, 3058, 691, 262, 4600, 42787, 34, 2475, 63, 7679, 318, 9177, 13, 198, 198, 6214, 25, ...
2.458537
615
if basename(pwd()) == "aoc" cd("2018/10") end using OffsetArrays mutable struct LightPoint position::CartesianIndex{2} velocity::CartesianIndex{2} end struct LightField points end function Base.size(lightfield::LightField) Tuple(-(reverse(extrema(getfield.(lightfield.points, :position)))...)) end...
[ 361, 1615, 12453, 7, 79, 16993, 28955, 6624, 366, 64, 420, 1, 198, 220, 220, 220, 22927, 7203, 7908, 14, 940, 4943, 198, 437, 198, 3500, 3242, 2617, 3163, 20477, 198, 198, 76, 18187, 2878, 4401, 12727, 198, 220, 220, 220, 2292, 3712...
2.526158
669
<filename>docs/make.jl using memoJuliaClassJa using Documenter ## Adopted from docs/make.jl in Documenter.jl # The DOCSARGS environment variable can be used to pass additional arguments to make.jl. # This is useful on CI, if you need to change the behavior of the build slightly but you # can not change the .travis.yml...
[ 27, 34345, 29, 31628, 14, 15883, 13, 20362, 198, 3500, 16155, 16980, 544, 9487, 33186, 198, 3500, 16854, 263, 198, 198, 2235, 1215, 45256, 422, 34165, 14, 15883, 13, 20362, 287, 16854, 263, 13, 20362, 198, 2, 383, 37760, 50, 1503, 143...
2.22659
865
<filename>test/solutions/test_functions.jl<gh_stars>1-10 function fx(t, x, fx) fx .= x end function fq(t, q, p, fq) fq .= q end function fp(t, q, p, fp) fp .= q.^2 end function fϕ(t, x, fϕ) fϕ .= 0 end function gx(t, x, λ, fx) fx .= x end function gq(t, q, p, λ, fλ) fλ .= q end function g...
[ 27, 34345, 29, 9288, 14, 82, 14191, 14, 9288, 62, 12543, 2733, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 198, 8818, 277, 87, 7, 83, 11, 2124, 11, 277, 87, 8, 198, 220, 220, 220, 277, 87, 764, 28, 2124, 198, 437, 1...
1.624
250
using CompilerOptions using Base.Test JLOptions()
[ 3500, 3082, 5329, 29046, 198, 3500, 7308, 13, 14402, 198, 198, 41, 21982, 8544, 3419, 198 ]
3.1875
16
<filename>src/datasets/ucr_datasets.jl<gh_stars>10-100 # using DelimitedFiles # const UCR_DATASETS = """ # 50words, # Adiac, # ArrowHead, # Beef, # BeetleFly, # BirdChicken, # CBF, # Car, # ChlorineConcentration, # CinC_ECG_torso, # Coffee, # Computers, # Cricket_X, # Cricket_Y, # Cricket_Z, # DiatomSizeReduction, # Di...
[ 27, 34345, 29, 10677, 14, 19608, 292, 1039, 14, 1229, 81, 62, 19608, 292, 1039, 13, 20362, 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 1262, 4216, 320, 863, 25876, 198, 2, 1500, 471, 9419, 62, 35, 1404, 1921, 32716, 796, 37227,...
2.472567
1,932
<reponame>mateuszbaran/FunManifolds.jl<gh_stars>1-10 """ CurveWarpingSRSFSpace(knots, quadweights = get_quad_weights(knots)) Space of SRSFs of curve warpings on knots `knots`. Points are represented by vectors in ambient space (ℝ^(N+1) if there are `N` knots). Given quadrature weights are used to compute inner pro...
[ 27, 7856, 261, 480, 29, 9830, 385, 89, 5657, 272, 14, 24629, 5124, 361, 10119, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 37811, 198, 220, 220, 220, 46300, 54, 5117, 278, 50, 6998, 37, 14106, 7, 74, 1662, 82, 11, 15094...
2.167429
3,936
<gh_stars>1-10 module CanvasWebIO using WebIO, JSExpr, Observables export Canvas, addmovable!, addclickable!, addstatic! mutable struct Canvas w::WebIO.Scope size::Array{Int64, 1} objects::Array{WebIO.Node, 1} getter::Dict id::String handler::Observables.Observable selection::Observables....
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 21412, 1680, 11017, 13908, 9399, 198, 198, 3500, 5313, 9399, 11, 26755, 3109, 1050, 11, 19243, 2977, 198, 198, 39344, 1680, 11017, 11, 751, 76, 21985, 28265, 751, 12976, 540, 28265, 751, 12708...
2.246895
4,026
<gh_stars>0 module Fatou using SyntaxTree,Reduce,LaTeXStrings,Requires,Base.Threads # This file is part of Fatou.jl. It is licensed under the MIT license # Copyright (C) 2017 <NAME> export fatou, juliafill, mandelbrot, newton, basin, plot """ Fatou.Define(E::Any; # primary map, (z, c) -> F ...
[ 27, 456, 62, 30783, 29, 15, 198, 21412, 12301, 280, 198, 3500, 26375, 897, 27660, 11, 7738, 7234, 11, 14772, 49568, 13290, 654, 11, 39618, 11, 14881, 13, 16818, 82, 198, 198, 2, 220, 220, 770, 2393, 318, 636, 286, 12301, 280, 13, ...
1.843708
6,699
<gh_stars>1-10 using Requests export PastebinClient, PastebinResponse, PasteKey, NEVER, TEN_M, HOUR, DAY, WEEK, TWO_WEEKS, MONTH, PUBLIC, UNLISTED, PRIVATE @enum Expiration NEVER=1 TEN_M=2 HOUR=3 DAY=4 WEEK=5 TWO_WEEKS=6 MONTH=7 @enum Access PUBLIC=0 UNLISTED=1 PRIVATE=2 immutable PastebinClient ...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 198, 3500, 9394, 3558, 198, 198, 39344, 198, 220, 220, 220, 29582, 11792, 11, 198, 220, 220, 220, 29582, 31077, 11, 198, 220, 220, 220, 23517, 9218, 11, 198, 220, 220, 220, 33602, 11, 309, 1677...
2.668763
477
using Weave using Flux using DataFrames, CSV using Binning using Random:shuffle! using BSON: @save, @load using Plots include("./trainModel.jl") filename = "./evalTemplate.jl" weave(filename; doctype="md2html", out_path=:pwd) weave(filename; doctype="github", out_path=:pwd)
[ 3500, 775, 1015, 198, 3500, 1610, 2821, 198, 3500, 6060, 35439, 11, 44189, 198, 3500, 20828, 768, 198, 3500, 14534, 25, 1477, 18137, 0, 198, 3500, 347, 11782, 25, 2488, 21928, 11, 2488, 2220, 198, 3500, 1345, 1747, 198, 17256, 7, 1911...
2.742574
101
<reponame>SamuelWiqvist/efficient_SDEMEM # load packages using CSV using Random """ set_up(;μ_θ_1::Real = -0.7, τ_θ_1::Real = 1.5, μ_θ_2::Real = 1.5, τ_θ_2::Real = 1.2, μ_θ_3::Real = -0.9, τ_θ_3::Real = 1.5, σ_ϵ::Real = 0.3, dt::Real=0.1, M::Int=5, N::Int=100) Returns ground-truth parameter values and simulated d...
[ 27, 7856, 261, 480, 29, 16305, 2731, 54, 25011, 85, 396, 14, 16814, 62, 10305, 3620, 3620, 198, 2, 3440, 10392, 198, 3500, 44189, 198, 3500, 14534, 198, 198, 37811, 198, 220, 220, 220, 900, 62, 929, 7, 26, 34703, 62, 138, 116, 62,...
1.664622
1,467
<filename>src/module.jl using Tokenize # ––––––––––––––– # Some file utils # ––––––––––––––– function readdir′(dir) try readdir(dir) catch e String[] end end isdir′(f) = try isdir(f) catch e false end isfile′(f) = try isfile(f) catch e false end files(dir) = @as x dir readdir′(x) map!(f->joinpath(di...
[ 27, 34345, 29, 10677, 14, 21412, 13, 20362, 198, 3500, 29130, 1096, 198, 198, 2, 784, 25608, 25608, 25608, 25608, 25608, 25608, 25608, 198, 2, 2773, 2393, 3384, 4487, 198, 2, 784, 25608, 25608, 25608, 25608, 25608, 25608, 25608, 198, 19...
2.377056
2,493
# This file is auto-generated by AWSMetadata.jl using AWS using AWS.AWSServices: fis using AWS.Compat using AWS.UUIDs """ create_experiment_template(actions, client_token, description, role_arn, stop_conditions) create_experiment_template(actions, client_token, description, role_arn, stop_conditions, params::D...
[ 2, 770, 2393, 318, 8295, 12, 27568, 416, 30865, 9171, 14706, 13, 20362, 198, 3500, 30865, 198, 3500, 30865, 13, 12298, 5432, 712, 1063, 25, 277, 271, 198, 3500, 30865, 13, 40073, 198, 3500, 30865, 13, 52, 27586, 82, 198, 198, 37811, ...
2.525315
5,787
<reponame>jpjones76/SeisIO.jl export fill_pbo! # https://www.unavco.org/data/strain-seismic/bsm-data/lib/docs/bottle_format.pdf bottle_chans = Dict{String, Tuple{String,String}}( "BatteryVolts" => ("ABV", "V"), "CalOffsetCH0G3" => ("AO0", "{unknown}"), "CalOffsetCH1G3" => ("AO1", "{unknown}"), "CalOffsetCH2G3...
[ 27, 7856, 261, 480, 29, 34523, 73, 1952, 4304, 14, 4653, 271, 9399, 13, 20362, 198, 39344, 6070, 62, 79, 2127, 0, 198, 198, 2, 3740, 1378, 2503, 13, 403, 615, 1073, 13, 2398, 14, 7890, 14, 2536, 391, 12, 325, 1042, 291, 14, 1443...
2.09189
2,503
module FisherPlot using LaTeXStrings using CairoMakie using Makie using Base: @kwdef function ellipseparameterization(a::Float64, b::Float64, θ::Float64) t = LinRange(0,2π, 200) x = Array(a .* sin.(θ) .* cos.(t) + b .* cos.(θ) .* sin.(t)) y = Array(a .* cos.(θ) .* cos.(t) - b .* sin.(θ) .* sin.(t)) re...
[ 21412, 14388, 43328, 198, 198, 3500, 4689, 49568, 13290, 654, 198, 3500, 23732, 44, 461, 494, 198, 3500, 15841, 494, 198, 3500, 7308, 25, 2488, 46265, 4299, 198, 198, 8818, 30004, 541, 325, 17143, 2357, 1634, 7, 64, 3712, 43879, 2414, ...
1.913136
3,281
<reponame>Wimmerer/SatisfiabilityInterface.jl struct BinaryRelation{O, S, T} x::S y::T end BinaryRelation{O}(x::X, y::Y) where {O,X,Y} = BinaryRelation{O,X,Y}(x, y) x = DiscreteVariable(:x, 1:5) y = DiscreteVariable(:y, 2:6) # BinaryRelation(==, x, y) # BinaryRelation(==, x, 1) # Use NodeVariables t...
[ 27, 7856, 261, 480, 29, 54, 8608, 11882, 14, 50, 17403, 12455, 39317, 13, 20362, 628, 628, 628, 198, 7249, 45755, 6892, 341, 90, 46, 11, 311, 11, 309, 92, 198, 220, 220, 220, 2124, 3712, 50, 198, 220, 220, 220, 331, 3712, 51, 22...
2.208495
4,638
<reponame>moeinkh88/FdeSolver.jl using Test using FdeSolver @testset "FdeSolver.jl" begin b = FdeSolver.greet() @test @isdefined(b) end
[ 27, 7856, 261, 480, 29, 76, 2577, 676, 71, 3459, 14, 37, 2934, 50, 14375, 13, 20362, 198, 3500, 6208, 198, 3500, 376, 2934, 50, 14375, 198, 198, 31, 9288, 2617, 366, 37, 2934, 50, 14375, 13, 20362, 1, 2221, 198, 220, 220, 220, 2...
2.101449
69
<reponame>clintonTE/CCA<gh_stars>0 struct Characteristic <: AbstractCharacteristic ws::WeightSpec Fξ::Symbol X::Dict{Symbol, Symbol} end #builds a characteristic object, which includes cross-sectional weights and #weight coefficients function Characteristic(ws::WeightSpec, Fξ::Symbol) Fw = Symbol(:w, ws.wei...
[ 27, 7856, 261, 480, 29, 37821, 9328, 14, 4093, 32, 27, 456, 62, 30783, 29, 15, 198, 198, 7249, 15684, 2569, 1279, 25, 27741, 27275, 2569, 198, 220, 266, 82, 3712, 25844, 22882, 198, 220, 376, 138, 122, 3712, 13940, 23650, 198, 220, ...
2.51602
1,186
# licor_split.jl # # Split Li-7200 TXT files into GHG archives # # <NAME> # Thünen Institut # Institut für Agrarklimaschutz # Junior Research Group NITROSPHERE # Julia 0.7 # 20.05.2014 # Last Edit: 12.04.2019 "# licor_split(source::String,destination::String;verbose::Bool=false) Split an Li-7200 text ...
[ 2, 3476, 273, 62, 35312, 13, 20362, 201, 198, 2, 201, 198, 2, 220, 220, 27758, 7455, 12, 22, 2167, 15326, 51, 3696, 656, 24739, 38, 22415, 201, 198, 2, 201, 198, 2, 1279, 20608, 29, 201, 198, 2, 536, 9116, 38572, 37931, 315, 201...
2.098745
3,028
function CircularFieldOfView(arg0::Vector3D, arg1::jdouble, arg2::jdouble) return CircularFieldOfView((Vector3D, jdouble, jdouble), arg0, arg1, arg2) end function get_center(obj::SmoothFieldOfView) return jcall(obj, "getCenter", Vector3D, ()) end function get_footprint(obj::SmoothFieldOfView, arg0::Transform,...
[ 8818, 7672, 934, 15878, 5189, 7680, 7, 853, 15, 3712, 38469, 18, 35, 11, 1822, 16, 3712, 73, 23352, 11, 1822, 17, 3712, 73, 23352, 8, 198, 220, 220, 220, 1441, 7672, 934, 15878, 5189, 7680, 19510, 38469, 18, 35, 11, 474, 23352, 11...
2.65
460
<reponame>rawrgrr/LSystems.jl<filename>examples/draw_dragon.jl using Cairo using LSystems c = CairoRGBSurface(485, 720); cr = CairoContext(c); save(cr); set_source_rgb(cr, 1.0, 1.0, 1.0); rectangle(cr, 0.0, 0.0, 485.0, 720.0); fill(cr); restore(cr); save(cr); x, y, a, d = 310., 560., 90, 15 set_line_width(cr, 1); ...
[ 27, 7856, 261, 480, 29, 1831, 81, 2164, 81, 14, 6561, 6781, 82, 13, 20362, 27, 34345, 29, 1069, 12629, 14, 19334, 62, 14844, 13, 20362, 198, 3500, 23732, 198, 3500, 406, 11964, 82, 198, 198, 66, 796, 23732, 48192, 4462, 333, 2550, ...
1.973948
499
<filename>src/convert.jl<gh_stars>1-10 ########### ## asArr ## ########### ## asArr: try conversion to Array, implicitly dealing with NAs ## ## using DataFrames, columns may be of different type and hence are ## possibly not compatible with each other as columns of an array function asArr{T}(da::DataArray{T, 1}, typ...
[ 27, 34345, 29, 10677, 14, 1102, 1851, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 7804, 21017, 198, 2235, 355, 3163, 81, 22492, 198, 7804, 21017, 198, 198, 2235, 355, 3163, 81, 25, 1949, 11315, 284, 15690, 11, 31821, 7219, ...
2.176447
2,454
# SINGLE NODE/CORE VERSION import Pkg; Pkg.instantiate() include("/users/yh31/scratch/projects/gigaword_64k/src/gigaword_64k.jl") const path_apw_dir = "/users/yh31/scratch/datasets/entity_linking/raw_data/gigaword/giga5/data/apw_eng" const path_intermed_data = "/users/yh31/scratch/datasets/entity_linking/raw_data/g...
[ 2, 311, 2751, 2538, 399, 16820, 14, 34, 6965, 44156, 2849, 198, 198, 11748, 350, 10025, 26, 350, 10025, 13, 8625, 415, 9386, 3419, 198, 198, 17256, 7203, 14, 18417, 14, 88, 71, 3132, 14, 1416, 36722, 14, 42068, 14, 70, 328, 707, 5...
2.274882
211
<gh_stars>1-10 # fundamental types (expanded below) # nodes in the AST that describe the grammar. all Matcher instances must be # mutable and have an attribute # name::Symbol # which is set automatically to the matcher type by the constructor. # (re-set to a more useful type inside with_names() - see names.jl) abs...
[ 27, 456, 62, 30783, 29, 16, 12, 940, 628, 198, 2, 7531, 3858, 357, 11201, 12249, 2174, 8, 198, 198, 2, 13760, 287, 262, 29273, 326, 6901, 262, 23491, 13, 220, 477, 6550, 2044, 10245, 1276, 307, 198, 2, 4517, 540, 290, 423, 281, ...
3.573007
1,267
<reponame>tomerarnon/julia-1 import Base: == mutable struct Point{T<:Number} x::T y::T end ==(p::Point, q::Point) = p.x == q.x && p.y == q.y @enum Heading NORTH=1 EAST=2 SOUTH=3 WEST=4 mutable struct Robot position::Point heading::Heading end function Robot(position::Tuple{T, T}, heading::Heading) ...
[ 27, 7856, 261, 480, 29, 83, 12057, 1501, 261, 14, 73, 43640, 12, 16, 198, 11748, 7308, 25, 6624, 198, 198, 76, 18187, 2878, 6252, 90, 51, 27, 25, 15057, 92, 198, 220, 220, 220, 2124, 3712, 51, 198, 220, 220, 220, 331, 3712, 51, ...
2.251534
489
# ================================================================================================ # Main API using FixedEffectModels @reexport using FixedEffectModels import StatsModels: width, apply_schema anova(trms::Vararg{TableRegressionModel{<: FixedEffectModel}}; test::Type{<: GoodnessOfFit} = FTest, ...
[ 2, 38093, 4770, 25609, 18604, 198, 2, 8774, 7824, 198, 198, 3500, 10832, 18610, 5841, 1424, 198, 31, 631, 87, 634, 1262, 10832, 18610, 5841, 1424, 198, 11748, 20595, 5841, 1424, 25, 9647, 11, 4174, 62, 15952, 2611, 198, 198, 40993, 7,...
2.387068
2,227
<reponame>ericphanson/Diagonalizations.jl using Diagonalizations, LinearAlgebra, PosDefManifold, Test # Method (1) real t, n, k=10, 20, 10 Xset = [genDataMatrix(t, n) for i = 1:k] Xfixed=randn(t, n)./1 for i=1:length(Xset) Xset[i]+=Xfixed end C1=Hermitian( mean((X'*X)/t for X∈Xset) ) C2=Hermitian( mean((X*X')/n for X∈...
[ 27, 7856, 261, 480, 29, 35626, 746, 23103, 14, 18683, 27923, 4582, 13, 20362, 198, 3500, 6031, 27923, 4582, 11, 44800, 2348, 29230, 11, 18574, 7469, 5124, 361, 727, 11, 6208, 198, 198, 2, 11789, 357, 16, 8, 1103, 198, 83, 11, 299, ...
1.949931
1,458
<reponame>lindahua/SparseExtensions.jl using SparseVectors using Base.Test import SparseVectors: exact_equal ### Data rnd_x0 = sprand(50, 0.6) rnd_x0f = full(rnd_x0) rnd_x1 = sprand(50, 0.7) * 4.0 rnd_x1f = full(rnd_x1) spv_x1 = SparseVector(8, [2, 5, 6], [1.25, -0.75, 3.5]) _x2 = SparseVector(8, [1, 2, 6, 7], [3....
[ 27, 7856, 261, 480, 29, 75, 521, 993, 6413, 14, 50, 29572, 11627, 5736, 13, 20362, 198, 3500, 1338, 17208, 53, 478, 669, 198, 3500, 7308, 13, 14402, 198, 198, 11748, 1338, 17208, 53, 478, 669, 25, 2748, 62, 40496, 198, 198, 21017, ...
1.919418
2,544
import accrue.cryptoerase.runtime.Condition; class C { int{L} x = 7; final int z = m(); static final Condition c = new Condition(); int m() { int y = ({L /c T}) 42; return y; } public static void main(String[] args) { C obj = new C(); obj.c.set(); } }
[ 11748, 697, 24508, 13, 29609, 78, 263, 589, 13, 43282, 13, 48362, 26, 198, 198, 4871, 327, 1391, 198, 220, 220, 220, 493, 90, 43, 92, 2124, 796, 767, 26, 198, 220, 220, 220, 2457, 493, 1976, 796, 285, 9783, 198, 220, 220, 220, 9...
2.309524
126
<gh_stars>10-100 using Static, Aqua using Test @testset "Static.jl" begin Aqua.test_all(Static) @testset "StaticInt" begin @test static(UInt(8)) === StaticInt(UInt(8)) === StaticInt{8}() @test iszero(StaticInt(0)) @test !iszero(StaticInt(1)) @test !isone(StaticInt(0)) @...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 3500, 36125, 11, 24838, 198, 3500, 6208, 198, 198, 31, 9288, 2617, 366, 45442, 13, 20362, 1, 2221, 198, 220, 220, 220, 24838, 13, 9288, 62, 439, 7, 45442, 8, 628, 220, 220, 220, 2488, ...
2.07922
7,132
<filename>BuddhaV2/genimg.jl<gh_stars>0 using JLD, Images function main(dim) points = load("./out/20k.jld", "points") img = zeros(RGB,dim,dim) for c in points z = c while abs(z) < 2 x = trunc(Int,(real(z) + 2)*dim/3); y = trunc(Int,(imag(z) + 1.5)*dim/3) 0<...
[ 27, 34345, 29, 33, 4185, 3099, 53, 17, 14, 5235, 9600, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 3500, 449, 11163, 11, 5382, 201, 198, 201, 198, 8818, 1388, 7, 27740, 8, 201, 198, 220, 220, 220, 2173, 796, 3440, 7, 1911, 14, ...
1.769784
278
<reponame>sonosole/Delta clear() @testset "check pooling op's gradient at single dim" begin for d in [1 2 3] for pool in [maximum minimum sum mean linearpool exppool] @testset "check $pool op's gradient at dim = $d" begin DIMS = d TYPE = Array{Float64}; ...
[ 27, 7856, 261, 480, 29, 1559, 418, 2305, 14, 42430, 198, 20063, 3419, 198, 31, 9288, 2617, 366, 9122, 5933, 278, 1034, 338, 31312, 379, 2060, 5391, 1, 2221, 198, 220, 220, 220, 329, 288, 287, 685, 16, 362, 513, 60, 198, 220, 220, ...
1.889543
2,209
# ==================================================================== # Load Different Logger # ==================================================================== """ load_logger_from_config(file_path::AbstractString)::TeeLogger Create a combined logger from a config file path. ### Note A combined logger is a ...
[ 2, 38093, 18604, 198, 2, 8778, 20615, 5972, 1362, 198, 2, 38093, 18604, 198, 37811, 198, 220, 220, 220, 3440, 62, 6404, 1362, 62, 6738, 62, 11250, 7, 7753, 62, 6978, 3712, 23839, 10100, 2599, 25, 51, 1453, 11187, 1362, 198, 198, 164...
2.877757
3,763
<filename>julia/make_regex.jl #= A port of my Perl/Java/Python MakeRegex in Julia. make_regex(words) generates a regex for words. It use a simple approach which combined common prefixes in generating the regex. Some examples: * words = ["a", "al", "all", "alla", "an", "ann", "anna", "annas",...
[ 27, 34345, 29, 73, 43640, 14, 15883, 62, 260, 25636, 13, 20362, 198, 2, 28, 198, 220, 220, 220, 317, 2493, 286, 616, 24316, 14, 29584, 14, 37906, 6889, 3041, 25636, 287, 22300, 13, 628, 220, 220, 220, 787, 62, 260, 25636, 7, 10879...
2.197158
2,815
<gh_stars>0 const olm_pomc_c = 1e5 # exploration parameter for MCTS const olm_pomc_iterations = 300 # exploration parameter for MCTS const olm_pomc_dt = 0.5 # exploration parameter for MCTS mutable struct PomcNode x::AbstractArray{Float64, 1} u::AbstractArray{Float64, 1} b::AbstractArray{Float64, 1} adv_x::Abs...
[ 27, 456, 62, 30783, 29, 15, 198, 9979, 25776, 76, 62, 79, 296, 66, 62, 66, 796, 352, 68, 20, 1303, 13936, 11507, 329, 337, 4177, 50, 198, 9979, 25776, 76, 62, 79, 296, 66, 62, 2676, 602, 796, 5867, 1303, 13936, 11507, 329, 337, ...
2.059293
3,255
<filename>O9/O9-praksis.jl # Question 1 function findset(x::DisjointSetNode) if (x !=x.p ) x.p = findset(x.p) end x.p end # Question 2 function link!(x,y) if (x.rank > y.rank) y.p=x else (x.p =y) if (x.rank == y.rank) y.rank = y.rank + 1 end end end fu...
[ 27, 34345, 29, 46, 24, 14, 46, 24, 12, 79, 430, 591, 271, 13, 20362, 198, 2, 18233, 352, 198, 8818, 1064, 2617, 7, 87, 3712, 7279, 73, 1563, 7248, 19667, 8, 198, 220, 220, 220, 611, 357, 87, 14512, 87, 13, 79, 1267, 198, 220, ...
1.817073
328
<reponame>astrieanna/GitHub.jl module GitHub import Base.show using Requests import JSON using HttpCommon abstract GitHubType abstract Owner <: GitHubType # types export User, Organization, Repo, Issue, HttpError, AuthError, StatsError # methods export authenticate, ...
[ 27, 7856, 261, 480, 29, 459, 5034, 7697, 14, 38, 270, 16066, 13, 20362, 198, 198, 21412, 21722, 198, 198, 11748, 7308, 13, 12860, 198, 198, 3500, 9394, 3558, 198, 11748, 19449, 198, 3500, 367, 29281, 17227, 628, 198, 397, 8709, 21722,...
2.158559
555
<filename>src/gridmodule/gridreader.jl<gh_stars>0 export readgrid if VERSION < v"0.4.0-dev+1419" stringtoint(s) = int(s); stringtofloat(s) = float(s); else stringtoint(s) = parse(Int64,s); stringtofloat(s) = parse(Float64,s); end """ **Summary:** ``` xyz,vert,pattr,ele,eattr,nd=function readgrid(fname::S...
[ 27, 34345, 29, 10677, 14, 25928, 21412, 14, 25928, 46862, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 39344, 1100, 25928, 198, 198, 361, 44156, 2849, 1279, 410, 1, 15, 13, 19, 13, 15, 12, 7959, 10, 1415, 1129, 1, 198, 220, 4731, ...
2.353837
1,772
""" 将三角切分的结果再进行切分 """ module Refine using ..Basics export split_triangle, refine_triangles, find_adjs_by_adjoint """ 将三角形重新切分成四个,可以用在直角三角形上 依旧保证出来的四个是直角三角形,且第一个角是直角 """ @generated function split_triangle(rtri::Basics.AbstractTriangle{T}) where T type2func = Dict( :COM => Triangle, :RT => RtT...
[ 37811, 198, 49546, 49011, 164, 100, 240, 26344, 229, 26344, 228, 21410, 163, 119, 241, 162, 252, 250, 37863, 235, 32573, 249, 26193, 234, 26344, 229, 26344, 228, 198, 37811, 198, 21412, 6524, 500, 198, 220, 220, 220, 220, 198, 3500, 1...
1.659613
2,221
<gh_stars>10-100 #!/usr/bin/env julia # Copyright 2018 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 2, 15069, 2864, 19764, 11421, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156...
3.187166
374
<filename>src/entities/summitbackgroundmanager.jl module SummitBackgroundManager using ..Ahorn, Maple const placements = Ahorn.PlacementDict( "Summit Background Manager" => Ahorn.EntityPlacement( Maple.SummitBackgroundManager ) ) function Ahorn.selection(entity::Maple.SummitBackgroundManager) x, ...
[ 27, 34345, 29, 10677, 14, 298, 871, 14, 16345, 2781, 25249, 37153, 13, 20362, 198, 21412, 20014, 21756, 13511, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, 19...
2.856459
209
########################################################################## # Copyright 2017 <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
[ 29113, 29113, 7804, 2235, 198, 2, 15069, 2177, 1279, 20608, 28401, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 26...
2.752702
3,886
module Criterion include("stats.jl") include("analysis.jl") include("types.jl") include("measurement.jl") include("environment.jl") include("run.jl") include("report.jl") end
[ 21412, 10056, 28019, 198, 198, 17256, 7203, 34242, 13, 20362, 4943, 198, 17256, 7203, 20930, 13, 20362, 4943, 198, 17256, 7203, 19199, 13, 20362, 4943, 198, 17256, 7203, 1326, 5015, 434, 13, 20362, 4943, 198, 17256, 7203, 38986, 13, 20362...
3.034483
58
#= *** rewrite for import purposes *** This is a resnet implementation by <NAME>uret (https://github.com/denizyuret/Knet.jl/blob/master/examples/resnet/resnet.jl) with minor changes: Copyright (c) 2015: <NAME>. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
[ 2, 28, 198, 8162, 28183, 329, 1330, 4959, 17202, 198, 198, 1212, 318, 257, 581, 3262, 7822, 416, 1279, 20608, 29, 495, 83, 357, 5450, 1378, 12567, 13, 785, 14, 6559, 528, 88, 495, 83, 14, 42, 3262, 13, 20362, 14, 2436, 672, 14, ...
2.179389
2,620
<filename>utils/install.jl<gh_stars>1-10 #!/usr/bin/env julia # Usage # # You can execute this file directly as long as the `julia` executable is # in your PATH and if you are on a Linux/macOS system. If `julia` is not in # your PATH or if you are on a Windows system, call Julia and explicitly # provide this file as a...
[ 27, 34345, 29, 26791, 14, 17350, 13, 20362, 27, 456, 62, 30783, 29, 16, 12, 940, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 474, 43640, 198, 198, 2, 29566, 198, 2, 198, 2, 921, 460, 12260, 428, 2393, 3264, 355, 890, 355, 262, 46...
2.857143
364
<gh_stars>10-100 # Energy function NbodyEnergy(u,Gm) """ Nbody problem Hamiltonian (Cartesian Coordinates) """ dim=2 nbody=length(Gm) @inbounds begin x = view(u,1:7) # x y = view(u,8:14) # y v = view(u,15:21) # x′ w = view(u,22:28) # y′ H=zero(eltype(u)) P=zero(eltype(u)) ...
[ 27, 456, 62, 30783, 29, 940, 12, 3064, 198, 198, 2, 6682, 198, 198, 8818, 399, 2618, 28925, 7, 84, 11, 38, 76, 8, 198, 37811, 198, 220, 220, 220, 220, 399, 2618, 1917, 11582, 666, 357, 43476, 35610, 22819, 17540, 8, 198, 37811, ...
1.580328
1,220
f (1)
[ 69, 357, 16, 8, 198 ]
1.2
5
<reponame>alenskorobogatova/ImPlot.jl # Histogram (Bar) plots # Vertical bars function PlotBars(label_id, x::AbstractArray{T1}, y::AbstractArray{T2}, args...) where {T1<:Real,T2<:Real} return PlotBars(label_id, promote(x, y)..., args...) end function PlotBars(values::AbstractArray{T}; count::Inte...
[ 27, 7856, 261, 480, 29, 282, 641, 74, 273, 672, 519, 265, 10071, 14, 3546, 43328, 13, 20362, 198, 2, 5590, 21857, 357, 10374, 8, 21528, 198, 2, 38937, 9210, 198, 8818, 28114, 33, 945, 7, 18242, 62, 312, 11, 2124, 3712, 23839, 1918...
2.263965
913
using RecipesBase export SeqPlot export TestPlot export rectangle_corners function rectangle_corners(x::Real,y::Real,w,h; anchor=:bottomright) if anchor == :botttomright [x,x+w,x+w,x], [y,y,y+h,y+h] elseif anchor == :center [x-w/2, x+w/2, x+w/2, x-w/2], [y-h/2, y-h/2, y+h/2, y+h/2] else ...
[ 3500, 44229, 14881, 198, 39344, 1001, 80, 43328, 198, 39344, 6208, 43328, 198, 39344, 35991, 62, 20772, 364, 198, 198, 8818, 35991, 62, 20772, 364, 7, 87, 3712, 15633, 11, 88, 3712, 15633, 11, 86, 11, 71, 26, 18021, 28, 25, 22487, 3...
1.892399
1,013
<filename>Chapter4/ex8.jl ## Exercise 4-8 ## Enter the code in this chapter in a notebook. ## 1. Draw a stack diagram that shows the state of the program while executing circle(🐢, radius). ## You can do the arithmetic by hand or add print statements to the code. println("Ans 1: ") println(" turtle --> Turtle") prin...
[ 27, 34345, 29, 14126, 19, 14, 1069, 23, 13, 20362, 198, 2235, 32900, 604, 12, 23, 198, 2235, 6062, 262, 2438, 287, 428, 6843, 287, 257, 20922, 13, 198, 198, 2235, 352, 13, 15315, 257, 8931, 16362, 326, 2523, 262, 1181, 286, 262, 1...
2.845092
652
include("ctqw/ctqw.jl") include("szegedy/szegedy.jl")
[ 17256, 7203, 310, 80, 86, 14, 310, 80, 86, 13, 20362, 4943, 198, 17256, 7203, 82, 89, 1533, 4716, 14, 82, 89, 1533, 4716, 13, 20362, 4943, 198 ]
1.928571
28
<filename>scripts/01_check_biomass_richness_shapes.jl ########## ########## # A check of the distribution of shapes of biomass and richness # in relevant paper ########## ########## # AUTHOR: <NAME> # DATE OF CREATION: 2021-05-17 ########## ########## # set up =========================================================...
[ 27, 34345, 29, 46521, 14, 486, 62, 9122, 62, 8482, 296, 562, 62, 7527, 1108, 62, 1477, 7916, 13, 20362, 198, 7804, 2235, 220, 198, 7804, 2235, 198, 2, 317, 2198, 286, 262, 6082, 286, 15268, 286, 42584, 290, 46792, 198, 2, 287, 598...
2.413299
2,722
######################################## ## File Name: control_types.jl ## Author: <NAME> (<EMAIL>) ## Date Created: 2020/05/12 ## Description: Control Type Definitions for SACBP ######################################## import Base.vec abstract type Control end struct PosControl{T<:Real} <: Control t::Float64 ...
[ 29113, 7804, 198, 2235, 9220, 6530, 25, 1630, 62, 19199, 13, 20362, 198, 2235, 6434, 25, 1279, 20608, 29, 38155, 27630, 4146, 43734, 198, 2235, 7536, 15622, 25, 12131, 14, 2713, 14, 1065, 198, 2235, 12489, 25, 6779, 5994, 45205, 329, ...
2.444906
481
<reponame>sdangelis/GenomePermutations.jl using GenomePermutations using GenomicFeatures using Documenter push!(LOAD_PATH,"../src/") DocMeta.setdocmeta!(GenomePermutations, :DocTestSetup, :(using GenomePermutations); recursive=true) makedocs(; modules=[GenomePermutations], authors="<NAME> <<EMAIL>> <<EMAIL>>"...
[ 27, 7856, 261, 480, 29, 21282, 8368, 271, 14, 13746, 462, 5990, 21973, 602, 13, 20362, 198, 3500, 5215, 462, 5990, 21973, 602, 198, 3500, 5215, 10179, 23595, 198, 3500, 16854, 263, 198, 198, 14689, 0, 7, 35613, 62, 34219, 553, 40720, ...
2.407407
324
# --- # title: 688. Knight Probability in Chessboard # id: problem688 # author: Indigo # date: 2021-06-29 # difficulty: Medium # categories: Dynamic Programming # link: <https://leetcode.com/problems/knight-probability-in-chessboard/description/> # hidden: true # --- # # On an `N`x`N` chessboard, a knight starts at th...
[ 2, 11420, 198, 2, 3670, 25, 718, 3459, 13, 6700, 30873, 1799, 287, 25774, 3526, 198, 2, 4686, 25, 1917, 34427, 198, 2, 1772, 25, 40673, 198, 2, 3128, 25, 33448, 12, 3312, 12, 1959, 198, 2, 8722, 25, 13398, 198, 2, 9376, 25, 2697...
2.464835
910
using Test using NCDatasets using DataStructures function example_file(i,array) fname = tempname() @debug "fname $fname" Dataset(fname,"c") do ds # Dimensions ds.dim["lon"] = size(array,1) ds.dim["lat"] = size(array,2) ds.dim["time"] = Inf # Declare variables ...
[ 3500, 6208, 198, 3500, 399, 8610, 265, 292, 1039, 198, 3500, 6060, 44909, 942, 198, 198, 8818, 1672, 62, 7753, 7, 72, 11, 18747, 8, 198, 220, 220, 220, 277, 3672, 796, 20218, 3672, 3419, 198, 220, 220, 220, 2488, 24442, 366, 69, 3...
2.107273
1,650
<filename>JuliaFactorial/BasicSwingFactorial.jl # Copyright <NAME>. License is MIT. module BasicSwingFactorial export SwingFactorial """ Return the factorial of ``n``. Implementation of the swing algorithm using no primes. An advanced version based on prime-factorization which is much faster is available as the prime...
[ 27, 34345, 29, 16980, 544, 29054, 5132, 14, 26416, 50, 5469, 29054, 5132, 13, 20362, 198, 2, 15069, 1279, 20608, 28401, 13789, 318, 17168, 13, 198, 198, 21412, 14392, 50, 5469, 29054, 5132, 198, 39344, 43650, 29054, 5132, 198, 198, 3781...
2.335894
1,432
#This script calculates the squeezing for different quadratures. using LinearAlgebra using Plots; pyplot() using NPZ using LaTeXStrings include("MagnusExpansion.jl") include("boson.jl") include("HarmonicCorrectionBoson.jl") """ Calculate the uncertainties on the x(θ) and y(θ) quadratures for a range imax values of θ ...
[ 2, 1212, 4226, 43707, 262, 40237, 329, 1180, 15094, 81, 6691, 13, 198, 3500, 44800, 2348, 29230, 198, 3500, 1345, 1747, 26, 12972, 29487, 3419, 198, 3500, 28498, 57, 198, 3500, 4689, 49568, 13290, 654, 198, 198, 17256, 7203, 48017, 385,...
2.059512
2,050
<filename>test/runtests.jl using LinearAlgebra, SparseArrays, Test using MultivariatePolynomials using SumOfSquares # Taken from JuMP/test/solvers.jl function try_import(name::Symbol) try @eval import $name return true catch e return false end end if try_import(:DynamicPolynomials...
[ 27, 34345, 29, 9288, 14, 81, 2797, 3558, 13, 20362, 198, 3500, 44800, 2348, 29230, 11, 1338, 17208, 3163, 20477, 11, 6208, 198, 198, 3500, 7854, 42524, 34220, 26601, 8231, 198, 3500, 5060, 5189, 22266, 3565, 198, 198, 2, 30222, 422, 1...
2.781081
370
<gh_stars>0 # ------------------------------------------------------------------ # Licensed under the MIT License. See LICENSE in the project root. # ------------------------------------------------------------------ """ DensityRatioWeighting(tdata, [vars]; [options]) Density ratio weights based on empirical dist...
[ 27, 456, 62, 30783, 29, 15, 198, 2, 16529, 438, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 287, 262, 1628, 6808, 13, 198, 2, 16529, 438, 198, 198, 37811, 198, 220, 220, 220, 360, 6377, 29665, 952, 25844, 278, 7...
2.951786
560
function eval_ast(interpstate::InterpState, mod, expr) interpstate.options.debug && @show :eval_ast mod expr try # ans = Core.eval(mod, expr) ans = @eval mod $expr interpstate.options.debug && @show :eval_ast ans return ans catch exception interpstate.options.debug &&...
[ 8818, 5418, 62, 459, 7, 3849, 79, 5219, 3712, 9492, 79, 9012, 11, 953, 11, 44052, 8, 198, 220, 220, 220, 987, 79, 5219, 13, 25811, 13, 24442, 11405, 2488, 12860, 1058, 18206, 62, 459, 953, 44052, 198, 220, 220, 220, 1949, 198, 220...
2.49515
4,639
module Apply export apply, offset_apply using Base: tail apply(f::F, a::Tuple{A,Vararg}, args...) where {F,A} = (f(a[1], args...), apply(f, tail(a), args...)...) apply(f::F, a::Tuple{A,Vararg}, b::Tuple{B,Vararg}, args...) where {F,A,B} = (f(a[1], b[1], args...), apply(f, tail(a), tail(b), args...)...) appl...
[ 21412, 27967, 198, 198, 39344, 4174, 11, 11677, 62, 39014, 198, 3500, 7308, 25, 7894, 198, 198, 39014, 7, 69, 3712, 37, 11, 257, 3712, 51, 29291, 90, 32, 11, 19852, 853, 5512, 26498, 23029, 810, 1391, 37, 11, 32, 92, 796, 220, 198...
2.412463
674
using Documenter, ICD10Utilities makedocs( sitename = "ICD-10 Utilities", modules=[ICD10Utilities], pages=[ "ICD-10" => "index.md", "icdo3.md", "icd10am.md", "icd10cm.md" ]) deploydocs( repo = "github.com/timbp/ICD10Utilities.jl.git", devbranch = "main", )
[ 3500, 16854, 263, 11, 314, 8610, 940, 18274, 2410, 198, 198, 76, 4335, 420, 82, 7, 198, 197, 1650, 12453, 796, 366, 2149, 35, 12, 940, 41086, 1600, 198, 197, 13103, 41888, 2149, 35, 940, 18274, 2410, 4357, 198, 220, 220, 5468, 41888...
2.020408
147
function ShortPeriodicsInterpolatedCoefficient(arg0::jint) return ShortPeriodicsInterpolatedCoefficient((jint,), arg0) end function add_grid_point(obj::ShortPeriodicsInterpolatedCoefficient, arg0::AbsoluteDate, arg1::Vector{jdouble}) return jcall(obj, "addGridPoint", void, (AbsoluteDate, Vector{jdouble}), arg0...
[ 8818, 10073, 5990, 2101, 873, 9492, 16104, 515, 34, 2577, 5632, 7, 853, 15, 3712, 73, 600, 8, 198, 220, 220, 220, 1441, 10073, 5990, 2101, 873, 9492, 16104, 515, 34, 2577, 5632, 19510, 73, 600, 11, 828, 1822, 15, 8, 198, 437, 198,...
2.895238
210
function cartesianmoveindex(direction) directiondict = Dict("UP" => (-1, 0), "DOWN" => (1, 0), "LEFT" => (0, -1), "RIGHT" => (0, 1)) return CartesianIndex(directiondict[direction]) end function swaptiles!(board, x, y) temp = board[x] board[x] = board[y] board[y] = temp end function moves(board)...
[ 8818, 6383, 35610, 21084, 9630, 7, 37295, 8, 198, 220, 220, 220, 4571, 11600, 796, 360, 713, 7203, 8577, 1, 5218, 13841, 16, 11, 657, 828, 366, 41925, 1, 5218, 357, 16, 11, 657, 828, 366, 2538, 9792, 1, 5218, 357, 15, 11, 532, 1...
2.452991
468
<filename>src/weierstrasspoints.jl ###################################################################### # weierstrasspoints.jl: Addition laws for projective points on Weierstrass curves ###################################################################### export infinity, projective_add, projective_scalar_mul ##...
[ 27, 34345, 29, 10677, 14, 732, 959, 2536, 562, 13033, 13, 20362, 198, 198, 29113, 29113, 4242, 2235, 198, 2, 356, 959, 2536, 562, 13033, 13, 20362, 25, 3060, 653, 3657, 329, 1628, 425, 2173, 319, 775, 959, 2536, 562, 23759, 198, 291...
2.340261
2,983
<gh_stars>0 ### A Pluto.jl notebook ### # v0.16.1 using Markdown using InteractiveUtils # ╔═╡ 6f9a94bd-dd28-4110-a7ca-0ed84e9c7c3f begin import Pkg # activate the shared project environment Pkg.activate(Base.current_project()) using Interpolations using Plots using Dierckx using GasChromatographySimulato...
[ 27, 456, 62, 30783, 29, 15, 198, 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1433, 13, 16, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 718, 69, 24,...
1.828211
12,527
# MGH problem 35 - Chebyquad function # # Source: # <NAME>, <NAME> and <NAME> # Testing Unconstrained Optimization Software # ACM Transactions on Mathematical Software, 7(1):17-41, 1981 # # <NAME>, Montreal, 05/2018. export mgh35 "Chebyquad function" function mgh35(m :: Int = 10, n :: Int = 10) if m < n ...
[ 2, 337, 17511, 1917, 3439, 532, 2580, 1525, 47003, 2163, 198, 2, 198, 2, 220, 220, 8090, 25, 198, 2, 220, 220, 1279, 20608, 22330, 1279, 20608, 29, 290, 1279, 20608, 29, 198, 2, 220, 220, 23983, 791, 1102, 2536, 1328, 30011, 1634, ...
2.13347
487
using MAT, JuMP, Ipopt include("../benchmark.jl") function read_lp2(dir, name) lp_data = matopen("$(dir)/$(name).mat") problem = read(lp_data,"Problem") A = problem["A"] b = problem["b"][:] c = problem["aux"]["c"][:] lb = problem["aux"]["lo"][:] ub = problem["aux"]["hi"][:] n = length(...
[ 3500, 36775, 11, 12585, 7378, 11, 314, 79, 8738, 198, 17256, 7203, 40720, 26968, 4102, 13, 20362, 4943, 198, 198, 8818, 1100, 62, 34431, 17, 7, 15908, 11, 1438, 8, 198, 220, 220, 220, 300, 79, 62, 7890, 796, 2603, 9654, 7203, 3, 7...
2.160508
866
<filename>src/genotypes.jl<gh_stars>0 import GZip """ function gt600() --- 1. Phase the genotypes with beagle 2. Convert results to array 3. """ function gt600() rst = joinpath(dat_dir, "run") fra = joinpath(dat_dir, "real/nofima/for_CMSEdit") Nₑ = 100 @info join(["", "Remove S...
[ 27, 34345, 29, 10677, 14, 5235, 13567, 13, 20362, 27, 456, 62, 30783, 29, 15, 198, 11748, 402, 41729, 198, 37811, 198, 220, 220, 220, 2163, 308, 83, 8054, 3419, 198, 6329, 198, 16, 13, 18983, 262, 2429, 13567, 351, 307, 19345, 198, ...
1.826291
1,065
<reponame>jekbradbury/ChainRules.jl ##### ##### `Thunk` ##### macro thunk(body) return :(Thunk(() -> $(esc(body)))) end struct Thunk{F} f::F end @inline (thunk::Thunk{F})() where {F} = (thunk.f)() ##### ##### `forward_chain` ##### forward_chain(args...) = materialize(_forward_chain(args...)) @inline _forw...
[ 27, 7856, 261, 480, 29, 73, 988, 1671, 324, 10711, 14, 35491, 37766, 13, 20362, 198, 4242, 2, 198, 4242, 2, 4600, 817, 2954, 63, 198, 4242, 2, 198, 198, 20285, 305, 294, 2954, 7, 2618, 8, 198, 220, 220, 220, 1441, 36147, 817, 29...
2.392351
706
<filename>src/SignalsAPI.jl module Signals using JSON, HTTP, Dates, TimeZones include("Utils.jl") include("BaseAPI.jl") export SignalsAPI, get_leaderboard, upload_predictions, submission_status, public_user_profile, daily_user_performances, daily_sub...
[ 27, 34345, 29, 10677, 14, 11712, 874, 17614, 13, 20362, 198, 21412, 5865, 874, 198, 220, 220, 198, 220, 1262, 19449, 11, 14626, 11, 44712, 11, 3862, 57, 1952, 198, 220, 220, 198, 220, 2291, 7203, 18274, 4487, 13, 20362, 4943, 198, 2...
2.334294
4,164
using GLVisualize, GeometryTypes, GLAbstraction using Colors, Reactive, FileIO if !isdefined(:runtests) window = glscreen() timesignal = bounce(linspace(0f0, 1f0, 360)) end description = """ Showing off the flexibility of the particle system by animating all kind of atributes for an arbitrary mesh as the parti...
[ 3500, 10188, 36259, 1096, 11, 2269, 15748, 31431, 11, 10188, 4826, 301, 7861, 198, 3500, 29792, 11, 797, 5275, 11, 9220, 9399, 198, 361, 5145, 271, 23211, 7, 25, 81, 2797, 3558, 8, 198, 220, 220, 220, 4324, 796, 1278, 9612, 3419, 19...
2.184783
552