sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
9eb81c72a5e7bf268c71be8c79677f9ef5491524de765ac1a50fb4ea10a420f9
C++
1,831
75
#include <algorithm> #include "yaml-cpp/node/convert.h" namespace { // we're not gonna mess with the mess that is all the isupper/etc. functions bool IsLower(char ch) { return 'a' <= ch && ch <= 'z'; } bool IsUpper(char ch) { return 'A' <= ch && ch <= 'Z'; } char ToLower(char ch) { return IsUpper(ch) ? ch + 'a' - 'A'...
d44cb69e69246af90fc6c91c4b8c011a3729e6cc392b57fa2aecd2a10d6a7350
C++
1,831
65
/* * Bshouty Lung Model - Pulmonary Circulation Simulation * Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC * Copyright (c) 2011-2014 Adam Majer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
a0520097bffb32e4b6e8b0b1f8562849e3b76b7a828f0ee4655888cfa282d21f
C++
1,835
61
#include <vector> #include "caffe/sgd_solvers.hpp" namespace caffe { #ifndef CPU_ONLY template <typename Dtype> void nesterov_update_gpu(int N, Dtype* g, Dtype* h, Dtype momentum, Dtype local_rate); #endif template <typename Dtype> void NesterovSolver<Dtype>::ComputeUpdateValue(int param_id, Dtype rate) { con...
e80e96d329320d96c54b306e78259cb7ad6a72d19e56734f5ee365fd115d5db5
C++
1,848
57
/** * Copyright 2023 by XGBoost Contributors */ #include <gtest/gtest.h> #include <cstddef> // std::size_t #include <string> // std::to_string #include "../../../../src/tree/hist/sampler.h" // SampleGradient #include "../../../../src/tree/param.h" // TrainParam #include "xgboost/base.h" ...
58da400611462019b1ac42c5fb41bce8adb17529a3373973487291d2c6f73b66
C++
1,865
48
#include <CommandCaller.h> #include "NcbiTaxonomy.h" #include "Parameters.h" #include "DBWriter.h" #include "FileUtil.h" #include "Debug.h" #include "Util.h" #include "createtaxdb.sh.h" int createtaxdb(int argc, const char **argv, const Command& command) { Parameters& par = Parameters::getInstance(); par.parse...
b920e8b331827b1cff5523c778ad322a44faaab819081b771c368277191a5d57
C++
1,885
56
/****************************************************************** * * * Copyright by Joachim Saul <saul@gfz-potsdam.de> * * * ***********************************************...
a37b54a6348d90515c1cd90695d04459b78888bf1ddea4d8cbbf238b1860773a
C++
1,915
56
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #ifdef OPENMP #include <omp.h> #endif int doCompression(int argc, const char **argv, const Command& command, bool shouldCompress) { Parameters& par = Parameters::getInstance(); par.parseParameters(argc, argv, command, true,...
ee56d548232e21b65efd7cffbf7ae405ffbf3089d30eae959e0f9c5c493960ac
C++
1,918
81
/** * Copyright 2024, XGBoost Contributors */ #include "xgboost/collective/result.h" #include <filesystem> // for path #include <sstream> // for stringstream #include <stack> // for stack #include "xgboost/logging.h" namespace xgboost::collective { namespace detail { [[nodiscard]] std::string ResultImp...
1c02928c297e3a1ac838213556d85ade6b672a1039f5e7d8a9c8b5c23cdec20f
C++
1,930
59
/** * Copyright 2018-2023 by XGBoost Contributors */ #include <gtest/gtest.h> #include <xgboost/host_device_vector.h> #include <xgboost/task.h> // for ObjInfo #include <xgboost/tree_updater.h> #include <memory> #include <string> #include <vector> #include "../../../src/tree/param.h" // for TrainParam #include ".....
207da019fbc81a5d7629686392f7945351641bc34d814306fe3cb7464ca4d6a7
C++
1,942
72
/** * Copyright 2015-2023 by XGBoost Contributors * \file metric_registry.cc * \brief Registry of objective functions. */ #include <dmlc/registry.h> #include <xgboost/context.h> #include <xgboost/metric.h> #include "metric_common.h" namespace xgboost { template <typename MetricRegistry> Metric* CreateMetricImpl(c...
d98a59dd5cb5d64e504802494278a0019e12403e9537f0d5a905b4a8467fd068
C++
1,948
56
/** * Copyright 2018-2023, XGBoost Contributors */ #include <xgboost/objective.h> #include <xgboost/context.h> #include <limits> #include "../helpers.h" #include "test_hinge.h" #include "../../../src/common/linalg_op.h" namespace xgboost { void TestHingeObj(const Context* ctx) { std::unique_ptr<ObjFunction> obj{O...
948e11dc10584976dc7a65e1fb06ea4dd8deebf2e5f6660bd5242f144873d593
C++
1,950
89
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ #include "util...
6bed9996beb8c18e8b94f92494d0cd9f9afb79cc87ca44ae1101ea075a0144a2
C++
1,951
40
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
aa8cc8ac5267ce48cf05dd8484e472f20b8e8b5fb0c31c3811a99b68018e323b
C++
1,951
40
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
4898458c80ed420882085983deff39b10cc60263bafc5eac63989b7a403e710f
C++
1,970
62
#include "NcbiTaxonomy.h" #include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" #include "TaxonomyExpression.h" #ifdef OPENMP #include <omp.h> #endif int filtertaxdb(int argc, const char **argv, const Command& command) { Parameters& par = Parameters::getInstance(...
bb8c4a182344bbab7fedaf9227a2e866dba02f3d8f6374959d2b41b7ff5aed3e
C++
1,979
68
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * FFTWApi.cpp * * Code generation for function 'FFTWApi' * */ /* Include files */ #include "FFTWApi.h" #incl...
d530da208dcd8026e89b0581234b303457e6448ba4fea89dc16e8e4332d900fb
C++
1,983
51
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" int splitdb(int argc, const char **argv, const Command& command) { Parameters &par = Parameters::getInstance(); par.overrideParameterDescription(par.PARAM_SPLIT, "Split input into N equally distributed chun...
8af4575a82806cac7c60f8bd637752fc2b9c288e89f6dc73db338c5e58d53da8
C++
1,987
57
/** * Copyright 2020-2023, XGBoost Contributors */ #include "random.h" #include <algorithm> // for sort, max, copy #include <memory> // for shared_ptr #include "xgboost/host_device_vector.h" // for HostDeviceVector namespace xgboost::common { std::shared_ptr<HostDeviceVector<bst_feature_t>> ColumnSampler::Co...
6c39721e2bdfb87838fb6fbd9cbe8a9755b90d91325b14b21518a9e12df2244b
C++
1,988
80
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
bf5041792f130d8a3799e9d30d8cb693ad9f9e300a86416b2c5f802f727463a3
C++
2,019
55
#include "Parameters.h" #include "IndexReader.h" #include "Debug.h" #include "Util.h" int view(int argc, const char **argv, const Command& command) { Parameters& par = Parameters::getInstance(); par.parseParameters(argc, argv, command, false, 0, 0); std::vector<std::string> ids = Util::split(par.idList, ",...
00e05250f3a9be7b5723e8ae41ae55831e287de5717e202c1a0771c74dcc0330
C++
2,020
43
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
eb4413051c527ab53f1179389fffdb0104f485b6e6c554a55eaa36cf21e4b78e
C++
2,026
69
/* * Copyright 2015, Daehwan Kim <infphilo@gmail.com> * * This file is part of HISAT 2. * * HISAT 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option...
f95395a35dc6eca991403fd68abf543dd77b5ab9466de00c5cc4abd0400f671b
C++
2,033
82
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ #include "util...
617a7680902ce53b0d5c9ea08fa806b1065b93e5598eb27d5b65e7d76660fa5d
C++
2,039
54
#include "Parameters.h" #include "Matcher.h" #include "DBReader.h" #include "DBWriter.h" #include "Orf.h" #include "Debug.h" #include "Util.h" #ifdef OPENMP #include <omp.h> #endif int orftocontig(int argn, const char **argv, const Command& command) { Parameters& par = Parameters::getInstance(); par.parsePara...
0fbb7d56f6d6a31df88f4864de29a9c4f8c6ca11311318f62f6b023dcd388a0f
C++
2,045
64
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" #include "Matcher.h" #include "CompressedA3M.h" #ifdef OPENMP #include <omp.h> #endif int convertca3m(int argc, const char **argv, const Command &command) { Parameters &par = Parameters::getInstance(); par...
a590e2e470067fa8ec59eba30ea51b677e846d31e49157a58dce26afe9bf77db
C++
2,045
103
/*++ Module Name: Histogram.cpp Abstract: Cheezy histogram class Authors: Bill Bolosky, September, 2011 Environment: User mode service. This class is NOT thread safe. It's the caller's responsibility to ensure that at most one thread uses an instance at any time. Revision History: --...
022caa44f5c35edfac95fbfd2c80654e566e30ada262150f69333b6ad5e34422
C++
2,055
64
#include "Parameters.h" #include "FileUtil.h" #include "Debug.h" #include "Util.h" #include "CommandCaller.h" #include "map.sh.h" #include <cassert> void setMapWorkflowDefaults(Parameters *p) { p->compBiasCorrection = 0; p->maskMode = 0; p->covThr = 0.95; p->covMode = 2; p->seqIdThr = 0.9; p-...
df7e231fa2342e332f70007e77ad3c718cb9b903783abfc37ab58c9a1bd84150
C++
2,059
84
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * mean.cpp * * Code generation for function 'mean' * */ /* Include files */ #include "mean.h" #include "eml_...
48a1d05fa41e16ba60fc7285476af4c2e528621b5ca156696bed3e34c59d66ba
C++
2,076
71
/*! * Copyright 2018-2019 by Contributors */ #include <xgboost/linear_updater.h> #include <xgboost/gbm.h> #include "../helpers.h" #include "test_json_io.h" #include "../../../src/gbm/gblinear_model.h" #include "xgboost/base.h" namespace xgboost { TEST(Linear, Shotgun) { size_t constexpr kRows = 10; size_t cons...
b9dd23de63ced5c43d2794a9e5e918d64570676a5419f982b0536141707148c1
C++
2,084
70
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
c132af0870af7d4660f16d3a17620159532aaf2730e9c2010fe89235985abfe8
C++
2,087
70
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
0c552aacfe8ad0d356df48b7c4ec904461e7c050b09f31236e749bac361a9c42
C++
2,089
105
/*++ Module Name: SNAPCommand.cpp Abstract: Send a command to SNAP running daemon mode Authors: Matei Zaharia & Bill Bolosky, February, 2012 Environment: User mode service. Revision History: Adapted from cSNAP, which was in turn adapted from the scala prototype --*/ #include "stdafx.h" #include "Compat.h" #...
a44a8b77a43dcc9a29ceeb57ec5b3eba2c5c7bdd5b541b606ad0536369b25a4c
C++
2,091
69
/** * Copyright 2017-2024, XGBoost contributors */ #include "../../../src/common/compressed_iterator.h" #include "gtest/gtest.h" #include <algorithm> namespace xgboost::common { TEST(CompressedIterator, Size) { bst_idx_t n = 2048; { bst_idx_t n_symbols = 256; auto n_bytes = CompressedBufferWriter::Calcul...
2e07f815752a334f652ed95942cb5896aedd6b2f9bf9e515fb0d71724cc672ea
C++
2,100
75
/** * Copyright 2015-2024, XGBoost Contributors */ #include "common.h" #include <dmlc/thread_local.h> // for ThreadLocalStore #include <cmath> // for pow #include <cstdint> // for uint8_t #include <cstdio> // for snprintf, size_t #include <string> // for string #include <utility> // for pair #include "./...
dd185884c0b5301d400b58f12ebb36b1c8b326531597e531b40e44a6eeb0e943
C++
2,122
71
#include "flutter_window.h" #include <optional> #include "flutter/generated_plugin_registrant.h" FlutterWindow::FlutterWindow(const flutter::DartProject& project) : project_(project) {} FlutterWindow::~FlutterWindow() {} bool FlutterWindow::OnCreate() { if (!Win32Window::OnCreate()) { return false; } ...
6cda309b0155d2e0e9931cf7733472441c22c760659b5aa9d2561b1e5247b7d7
C++
2,142
60
#include "computation_cache.h" namespace miic { namespace computation { namespace detail { double CtermCache::getLogC(int n, int level) { if (n == 0 || level == 0) return 0; if (level <= kLevelLimit) { double res = log_c_(n - 1, level - 1); if (res != -1) return res; } if (level == 1) { log_c_(n -...
daee40c767bc8a51a4b945eed5da1006bcb660d3f63b030270261cddbf68dd8a
C++
2,145
69
#include <vector> #include "caffe/sgd_solvers.hpp" namespace caffe { #ifndef CPU_ONLY template <typename Dtype> void adagrad_update_gpu(int N, Dtype* g, Dtype* h, Dtype delta, Dtype local_rate); #endif template <typename Dtype> void AdaGradSolver<Dtype>::ComputeUpdateValue(int param_id, Dtype rate) { const ve...
c9f5f6c6e08815a2d7b279bd43a5207f7b2abf0bff072523669ca4710bccc081
C++
2,150
47
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
08c31eb060cb424f0a90a035ea91cd3333011222120e92e8a1deaff7e183558a
C++
2,177
58
/** * Copyright 2023-2024, XGBoost Contributors */ #include <gtest/gtest.h> #include <xgboost/json.h> // for Json #include <xgboost/tree_model.h> // for RegTree #include "../../../../src/common/categorical.h" // for CatBitField #include "../../../../src/tree/hist/expand_entry.h" namespace xgboost::tree { T...
ecc11563b693bd2b46c6c5d916cabcc1cbdc1d57448c8920b8d3671f2f91097d
C++
2,178
64
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" #include "FileUtil.h" #ifdef OPENMP #include <omp.h> #endif int reverseseq(int argn, const char **argv, const Command& command) { Parameters& par = Parameters::getInstance(); par.parseParameters(argn, argv...
b6e34fd3a67000f6318fd8b1390d441845c06fa9baa01efd611b780e96241ff3
C++
2,185
65
/** * Copyright 2024, XGBoost Contributors */ #include "test_column_split.h" #include <gtest/gtest.h> #include <xgboost/tree_model.h> // for RegTree #include <xgboost/tree_updater.h> // for TreeUpdater #include <vector> // for vector #include "../../../src/tree/param.h" // for TrainParam #include "../colle...
6da4cdd2ac322616bc29ccb24bf4e67fd2ae46715af91c98b4a842fff21c626a
C++
2,202
57
/** * Copyright 2022-2023 by XGBoost contributors */ #include "init_estimation.h" #include <memory> // unique_ptr #include "../common/stats.h" // Mean #include "../tree/fit_stump.h" // FitStump #include "xgboost/base.h" // GradientPair #include "xgboost/da...
2fa58f990956c5603cdf696e7b20053e60b7d85c53f118740ab0277284bcb56a
C++
2,208
62
/** * Copyright 2021-2024, XGBoost contributors */ #include <gtest/gtest.h> #include <xgboost/data.h> // for CSCPage, SortedCSCPage, SparsePage #include <memory> // for allocator, unique_ptr, __shared_ptr_ac... #include <string> // for char_traits, operator+, basic_string #include "../../../src/common/io.h" // ...
fa2e07cd2ee6bc25b4e9d23ba40bf1c34dfe6bdad3b713ec2a2af0ae844bcac9
C++
2,212
76
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * power.cpp * * Code generation for function 'power' * */ /* Include files */ #include "power.h" #include "e...
34acba4b90d7ab80ebcad8fbe8b45db7bd961d5670ee22eb4d8ffebe4d1b96f0
C++
2,227
77
// // main.cpp // forautocompl // // Created by Martin Steinegger on 26.11.12. // Copyright (c) 2012 -. All rights reserved. // #include <iostream> #include "Sequence.h" #include "Indexer.h" #include "ExtendedSubstitutionMatrix.h" #include "SubstitutionMatrix.h" #include "ReducedMatrix.h" const char* binary_name ...
cd5e38b8cfa8121c1661c236e2b53b8096ca07a40b8cdcd4a33d79bda90b7722
C++
2,228
67
// // main.cpp // forautocompl // // Created by Martin Steinegger on 26.11.12. // Copyright (c) 2012 -. All rights reserved. // #include "BaseMatrix.h" #include "ReducedMatrix.h" #include "SubstitutionMatrix.h" #include "Parameters.h" #include <iostream> const char* binary_name = "test_reducematrix"; DEFAULT_PARA...
7faed508dfd5eba33b6c9a1caf7c7608bbcdb5f1f39fcc9006f03101302f15da
C++
2,233
61
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" #ifdef OPENMP #include <omp.h> #endif int result2repseq(int argc, const char **argv, const Command &command) { Parameters &par = Parameters::getInstance(); par.parseParameters(argc, argv, command, true, 0,...
33a89320e4105b127fb2f5a62fc908881a6ca51c372e430d913627ded216071c
C++
2,254
65
#include <mex.h> #include <math.h> const double PI = 3.14159265358979323846; /* This function will replace imrotate(image,angle,'crop') for any 3 dims image, UINT8 class. Work ten times faster, tested on matlab 7, VC6. Compile it using the mex tools - mex fast_rotate.cpp. */ void mexFunction(int nlhs, mxArray *...
9138b125e5a4dbf8485998b13bfa39e788c1f3c214a132a74a7324747bde28bc
C++
2,268
68
// // Created by mad on 10/26/15. // #include <iostream> #include "SubstitutionMatrix.h" #include "Sequence.h" #include "Parameters.h" const char* binary_name = "test_compositionbias"; DEFAULT_PARAMETER_SINGLETON_INIT void calcLocalAaBiasCorrection(Sequence* seq, SubstitutionMatrix * m){ const int windowSize = ...
11f46e025d3cf671f363f1ab6a0b8bfc4f1baeca3721a193e3f0c967c840b2eb
C++
2,273
62
/* * Bshouty Lung Model - Pulmonary Circulation Simulation * Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC * Copyright (c) 2011-2014 Adam Majer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
13471fc9dcf65696e371e892b54461e48d98d1f2434cd2d23abdda238a9dc7c2
C++
2,280
62
#include "Parameters.h" #include "DBReader.h" #include "DBWriter.h" #include "Util.h" #include "Debug.h" #include "Sequence.h" #include "SubstitutionMatrix.h" #ifdef OPENMP #include <omp.h> #endif int profile2seq(int argc, const char **argv, const Command &command, bool consensus) { Parameters &par = Parameters::...
2221af389082635997b51fa7a9f5e8d747751f0509a4e7f105999a332e6e2bfe
C++
2,282
125
/*++ Module Name: GenericFile_Blob.cpp Abstract: Generic IO class for SNAP that can read from an in-memory blob. Authors: Bill Bolosky, March, 2014 Environment: User mode service. Revision History: --*/ #include "stdafx.h" #include "GenericFile_Blob.h" GenericFile_Blob::GenericFile_Blob(voi...
699cdbcd512ea131fdcce56894e51cd8577f46a6f0f0baf23779f0706cc1fd67
C++
2,283
81
/* * Bshouty Lung Model - Pulmonary Circulation Simulation * Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC * Copyright (c) 2011-2014 Adam Majer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
17bfa3962c5922c6e68c4e42c24262bdbce5f053b61f2b420c3b03dad50d407a
C++
2,304
80
/* * Copyright 2012, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
f18bc8d5317f95e36fd5d5d78919773d16378fdb778f57b55bd7933fa7136e05
C++
2,304
68
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
3201b6ccdd0b313180ab2cfd8d7996d2f423c71924e6bca9d0da612080914f2e
C++
2,308
77
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // ED1 arma::mat ED1(const arma::mat& x); RcppExport SEXP _SC3_ED1(SEXP xSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_...
d0987c22781fd28fb7b6f9631f7eb8bf35b8002aa58b274d5618b1ae15e4c671
C++
2,309
103
#include <RcppArmadillo.h> using namespace arma; //' Compute Euclidean distance matrix by rows //' //' Used in consmx function //' //' @param x A numeric matrix. // [[Rcpp::export]] arma::mat ED1(const arma::mat & x) { unsigned int outrows = x.n_rows, i = 0, j = 0; double d; mat out = zeros<mat>(outrows, outrows...
9a0d53880ad3a6f673f0979dccbe83757a9af897f76adb57625c35d5256dfae2
C++
2,321
77
#include <sstream> #include <fstream> #include "Parameters.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" int tsv2db(int argc, const char **argv, const Command& command) { Parameters &par = Parameters::getInstance(); par.parseParameters(argc, argv, command, true, 0, 0); Debug(Debug::INFO) ...
1c7f4ca8821b6d6765c2f38af057f6102159182988cc0de8e86d4f05debd36ac
C++
2,322
79
/* * Bshouty Lung Model - Pulmonary Circulation Simulation * Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC * Copyright (c) 2011-2014 Adam Majer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
1dba0d18fcfa59b71bed86e74cd9f5dac1a0d1c8f6b834f7c9433ab262e25bd2
C++
2,325
75
// // Created by mad on 12/14/15. // #include <new> #include <cstring> #include <sys/mman.h> #include "Debug.h" #include "Util.h" #include "SequenceLookup.h" SequenceLookup::SequenceLookup(size_t sequenceCount, size_t dataSize) : sequenceCount(sequenceCount), dataSize(dataSize), currentIndex(0), currentOffset(...
d56011e9f00e1a1d3b77dbe45f67bcba982d6a5a23719e50d94c5e0fc71aaed7
C++
2,328
72
/* * Copyright 2015, Daehwan Kim <infphilo@gmail.com> * * This file is part of HISAT 2. * * HISAT 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option...
8cfc476f92feb9f77b0b34c93b16d2e0525aa7bc88950a04bb4d2d086115b4d0
C++
2,339
73
/** * Copyright 2017-2024 by XGBoost contributors */ #include <xgboost/base.h> // Args #include <xgboost/context.h> // Context #include <xgboost/objective.h> // ObjFunction #include <xgboost/span.h> // Span #include <memory> // std::unique_ptr #include <vector> // std::vec...
b3fd3573b0e9fddf5b02a85de236174132787cd81cf0275c652d69e53c54aac9
C++
2,343
61
/** * Copyright 2024, XGBoost Contributors */ #include "test_extmem_quantile_dmatrix.h" // for TestExtMemQdmBasic #include <gtest/gtest.h> #include <xgboost/data.h> // for BatchParam #include <algorithm> // for equal #include "../../../src/common/column_matrix.h" // for ColumnMatrix #include "../../../src/data...
baf9f0f2b9686b6fd4e2b6ee6c59f3d2aad6f3d8eda0eea6e5238959d679be77
C++
2,347
67
#include "NucleotideMatrix.h" #include <cctype> #include <climits> NucleotideMatrix::NucleotideMatrix(const char* scoringMatrixFileName, float bitFactor, float scoreBias) : SubstitutionMatrix(scoringMatrixFileName, bitFactor, scoreBias) { setupLetterMapping(); reverseLookup = new int[alphabetSize]; ...
7d1825db715e7e31ef92f1a4dce5ff3901f38298b1e98c7cf44494ba1ed00c23
C++
2,348
68
#include <cmath> #include <vector> #include "caffe/layers/swish_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void SwishLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { NeuronLayer<Dtype>::LayerSetUp(bottom, top)...
e7eb3671cb9346142ee116f6d7a49f5527d2ff7719d5003f1cf8c4bc55d6f6b0
C++
2,354
88
/* * Copyright (C) 2019-2026 Matthias Klumpp <matthias@tenstral.net> * * Licensed under the GNU Lesser General Public License Version 3 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Founda...
cc12c89ad2cd806acabb535fe7aa94d764a7d703a78a856d0c42c32f219ef578
C++
2,357
70
#include "stdafx.h" #include "Compat.h" #include "TestLib.h" #include "ProbabilityDistance.h" // Test fixture for all the ProbabilityDistance tests struct ProbabilityDistanceTest { ProbabilityDistance dist; double prob; ProbabilityDistanceTest(): dist(0.1, 0.01, 0.2) {} }; TEST_F(ProbabilityDistance...
ceeba6e12046bfefc035a401d0444798db8665876c862412d36f3823b860c15d
C++
2,358
98
/*++ Module Name: Error.cpp Abstract: SNAP error-message writer Authors: Bill Bolosky, Feburary, 2014 Environment: User mode service. Revision History: --*/ #include "stdafx.h" #include "Compat.h" #include "Error.h" #include "AlignerOptions.h" #include "CommandProcessor.h" void WriteMessag...
dc0de54c0a2d835e2fa75d594b240bc57121a9c256250c344bb3571443567e74
C++
2,376
63
/** * Copyright 2023 by XGBoost Contributors */ #include "histogram.h" #include <cstddef> // for size_t #include <numeric> // for accumulate #include <utility> // for swap #include <vector> // for vector #include "../../common/transform_iterator.h" // for MakeIndexTransformIter #include "expand_entry.h" ...
651a5b2ce6bd410828fa4f6f2e561116589c0514d71d8da0f60da62c0b75d91d
C++
2,379
80
/* * Copyright 2018, Chanhee Park <parkchanhee@gmail.com> and Daehwan Kim <infphilo@gmail.com> * * This file is part of HISAT 2. * * HISAT 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either versio...
c917a4f68abe64812d6195225bb5cab337b4108dd608a1704a9ff939afe9a4cd
C++
2,393
62
#include "NucleotideMatrix.h" #include "SubstitutionMatrix.h" #include "tantan.h" #include "DBReader.h" #include "DBWriter.h" #include "Debug.h" #include "Util.h" #include "FileUtil.h" #include "Masker.h" #ifdef OPENMP #include <omp.h> #endif int masksequence(int argc, const char **argv, const Command& command) { ...
2acc28331538ba227d98235a876a099a9b6dab920b53719f718f3c80376362e4
C++
2,426
61
#include <cassert> #include "FileUtil.h" #include "CommandCaller.h" #include "Util.h" #include "Debug.h" #include "Parameters.h" #include "easyproteomesearch.sh.h" void setEasyproteomesearchDefaults(Parameters *p) { p->removeTmpFiles = true; p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID; ...
44462af2fa9dadb0623aec728e3b1ef82ed57c06f3dbf2459d632c7081324c50
C++
2,447
56
// Copyright 2006, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
94ce7ed61153b73cd1ee3a25075b6047170213d880b7bcee1f3da20a73acabc2
C++
2,462
63
#include "MultiParam.h" template<typename T> MultiParam<T>::MultiParam(const char *parametercstring) { values.first = T::max; values.second = T::max; if (strchr(parametercstring, ',') == NULL) { if (assign(parametercstring, values.second) == false) { values.first = values.second = T::ma...
4c4ec53fdfe56b403246a97056358c7e86a25ef071191f30f580eb183dc3f772
C++
2,468
91
#include "CommandCaller.h" #include "Util.h" #include "Debug.h" #include <strings.h> #include <cstdlib> #include <unistd.h> #include <sstream> #include <iostream> #ifdef OPENMP #include <omp.h> #endif CommandCaller::CommandCaller() { #ifdef OPENMP #if _OPENMP >= 201307 if(omp_get_proc_bind() != omp_proc_bind_fa...
083ef7c98d7d413ea2cb2befabad7e4540595dd8d34f9234edf56d454d6fa5b5
C++
2,488
72
/* * Bshouty Lung Model - Pulmonary Circulation Simulation * Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC * Copyright (c) 2011-2014 Adam Majer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
9464b46059dd6a0161c599c825dfb74c98e8f8fab3566a5f0bec5d79d870c206
C++
2,501
61
#include "ExpressionParser.h" #include <set> #include <cstddef> ExpressionParser::ExpressionParser(const char* expression) : ExpressionParser(expression, {}) { } ExpressionParser::ExpressionParser(const char* expression, const std::vector<te_variable>& lookup) { #define str2(s) #s #define str(s) str2(s) #define V(x) ...
4510e50aae816bfb323e2308d93551d3d99a87d3294713a6d288680ef0b0fb42
C++
2,502
79
/*! * Copyright 2018-2023 XGBoost contributors */ #include <xgboost/objective.h> #include <xgboost/context.h> #include "../../src/common/common.h" #include "../helpers.h" #include "test_multiclass_obj.h" namespace xgboost { void TestSoftmaxMultiClassObjGPair(const Context* ctx) { std::vector<std::pair<std::string...
d285d422b530d2e2c7ed5e526070ca4dbdd10c497066ad3a461173978e91e0b3
C++
2,514
74
// RayTrace_ScreenPos_X_MEX.c // // [x_pixels_left,x_pixels_right] = RayTrace_ScreenPos_X(zdist_fromScreen, ipd, viewdist, pix_per_cm, xpos_world) // // Calculate the horizontal screen position (in pixels) of a point distance xpos_world from the visual midline // and zdist_fromScreen in infront (-ve) or behind (+...
6e8af2c7b0a1aa51022de27421e5fe805d3189d6ac5c65ff8c8f6fc695d98c5d
C++
2,532
103
#include "yaml-cpp/emitterstyle.h" #include "yaml-cpp/eventhandler.h" #include "yaml-cpp/yaml.h" // IWYU pragma: keep #include <cstdlib> #include <fstream> #include <iostream> class NullEventHandler : public YAML::EventHandler { public: typedef YAML::Mark Mark; typedef YAML::anchor_t anchor_t; NullEventHandl...
f499018acf4ce3787b11204d7bee64530aaa6a61f7d6a6ba270f97d16c065f77
C++
2,556
77
#include "Sequence.h" #include "Indexer.h" #include "NucleotideMatrix.h" #include "BaseMatrix.h" #include "Parameters.h" #include "Orf.h" const char* binary_name = "test_kmernucl"; DEFAULT_PARAMETER_SINGLETON_INIT std::string kmerToSting(size_t idx, int size) { char output[32]; char nuclCode[4] = {'A','C','T'...
3913a60e5f6fd5aa1c25ece630e71af908505fb7cffa0e87b729dae74db4f1d8
C++
2,587
68
#include "Parameters.h" #include "FileUtil.h" #include "Debug.h" #include "Util.h" #include "DBReader.h" #include "CommandCaller.h" #include "multihitdb.sh.h" void setMultiHitDbWorkflowDefaults(Parameters *p) { p->orfMinLength = 30; } int multihitdb(int argc, const char **argv, const Command &command) { Para...
b947890a3d92b3a41fe86b972f782dc07934d11d3d8d0f5d1b7025e8345c4826
C++
2,587
51
// Copyright 2009, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
219c3c2ce28cf79e7fd09f3e8cf08b77b4ea2cf60a4f795e20f8249c8444017e
C++
2,593
54
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
806222170a2ed32bfcb02ac0f6fafbb6148562ef7039b880d660d27be0545ab1
C++
2,595
86
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ extern "C" { #...
db6d9fad7afa63ad8137b21043d60077624bdbfbfa0bb03245ac5eb5c748d254
C++
2,601
67
#include "FileUtil.h" #include "CommandCaller.h" #include "Util.h" #include "Debug.h" #include "Parameters.h" #include "rbh.sh.h" #include <cassert> void setRbhDefaults(Parameters *p) { p->compBiasCorrection = 0; p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID; p->maskMode = 0; p->orfSta...
417ec1687a4466b5acd76cda1550c8ead1a02bdd1d2f89835a932cb2b6145ea7
C++
2,603
76
#ifdef USE_HDF5 #include <vector> #include "hdf5.h" #include "hdf5_hl.h" #include "caffe/layers/hdf5_output_layer.hpp" #include "caffe/util/hdf5.hpp" namespace caffe { template <typename Dtype> void HDF5OutputLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { file_...
fcda041dcdb04069448ba46c8069250fcbecf5d92b30c7d773d4bf9504e80c6d
C++
2,603
93
/*! * Copyright 2021-2022 by XGBoost Contributors */ #include <gtest/gtest.h> #include <xgboost/json.h> #include <xgboost/learner.h> #include <limits> #include "../../../src/common/categorical.h" #include "../helpers.h" namespace xgboost { namespace common { TEST(Categorical, Decision) { // inf float a = std::...
68f87f6e3108a1cd8694a92e04b510e272d6b51f324f39a51ce1c44ca18ec36c
C++
2,622
63
// // Created by mad on 10/26/15. // #include <iostream> #include <cstring> #include <math.h> #include "tantan.h" #include "SubstitutionMatrix.h" #include "Sequence.h" #include "Parameters.h" const char* binary_name = "test_tantan"; DEFAULT_PARAMETER_SINGLETON_INIT int main (int, const char**) { const size_t kme...
b2d7acaedfbc6a301090a86de5663a1e0c9b0b1f5e86a0b57d20f866e68bfce3
C++
2,654
105
/*! * Copyright (c) by Contributors 2019 */ #include <gtest/gtest.h> #include <xgboost/base.h> #include <xgboost/parameter.h> enum class Foo : int { kBar = 0, kFrog = 1, kCat = 2, kDog = 3 }; DECLARE_FIELD_ENUM_CLASS(Foo); struct MyEnumParam : xgboost::XGBoostParameter<MyEnumParam> { Foo foo; int bar; DML...
4b3d196a33cbcfff65c32190a80dfabf51c4a2ed54c973e15eb9fb30b0d03790
C++
2,668
88
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
d078291af05244cbac622e0dc65c683715aabcc555cbd72e369c80f096986455
C++
2,688
105
// Copyright by Contributors #include "../../../src/tree/param.h" #include "../helpers.h" #include <gtest/gtest.h> TEST(Param, VectorIOStream) { std::vector<int> vals = {3, 2, 1}; std::stringstream ss; std::vector<int> vals_in; ss << vals; EXPECT_EQ(ss.str(), "(3,2,1)"); ss >> vals_in; EXPECT_EQ(vals_i...
d51293e908450536e81a8d1eb31572144a2850cc4a1e8f43fa651aaa7273cfc8
C++
2,696
66
#include <cassert> #include "FileUtil.h" #include "CommandCaller.h" #include "Util.h" #include "Debug.h" #include "Parameters.h" #include "easyproteomecluster.sh.h" void setEasyproteomeclusterDefaults(Parameters *p) { p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID; p->weightClusterCount = 1.0;...
aa035d083c7eacb4c07c98b2d7eba5d7672c7269778b23db01ff8d3c08c4ddfc
C++
2,702
70
/* coding=utf-8 * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. * * 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 * *...
240c22c54c2db25f830441d6ab97d5538720b6fb2e5bc76d63a2c18c62a5a867
C++
2,706
76
#include "handler_test.h" #include "specexamples.h" // IWYU pragma: keep #include "yaml-cpp/yaml.h" // IWYU pragma: keep #include "gmock/gmock.h" #include "gtest/gtest.h" using ::testing::_; #define EXPECT_THROW_PARSER_EXCEPTION(statement, message) \ ASSERT_THROW(statement, ParserException); \ t...
ed1f38aae93d51cfabc8094caee775b5111e481fe19a10e1af23d213a8ae4033
C++
2,712
87
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
a1b515bbd236f0401530c5069a25aebff534c5ffced4008668cbd5a83f7fb984
C++
2,741
58
#include <iostream> #include <list> #include <algorithm> #include <cmath> #include "Clustering.h" #include "DBReader.h" #include "DBWriter.h" const char* binary_name = "test_dbreader"; int main (int, const char**) { // DBReader test DBReader<DBKeyType> reader("dataLinear", "dataLinear.index", 1, 0); read...
d2b139adf2a30c853c9a71fadd6d477c9669a999f5c29d7c342aac129d050520
C++
2,744
94
#include "graphbuilderadapter.h" #include "yaml-cpp/contrib/graphbuilder.h" namespace YAML { struct Mark; int GraphBuilderAdapter::ContainerFrame::sequenceMarker; void GraphBuilderAdapter::OnNull(const Mark &mark, anchor_t anchor) { void *pParent = GetCurrentParent(); void *pNode = m_builder.NewNull(mark, pParen...
9bd6e0195e81a0f86deac77f7fb01487d9baf5368660b6425bf229e1fe9eeda3
C++
2,755
84
#include "Sequence.h" #include "Indexer.h" #include "ExtendedSubstitutionMatrix.h" #include "SubstitutionMatrix.h" #include "ReducedMatrix.h" #include "KmerGenerator.h" #include "BaseMatrix.h" #include "Timer.h" #include <iostream> #include <unistd.h> #include <string> const char* binary_name = "test_kmergeneratorper...
c8feb7957f017373059376ae258070edfaa50a3fa5c513b344313bd74401e246
C++
2,759
62
#include "Prefiltering.h" #include "Util.h" #include "Parameters.h" #include "MMseqsMPI.h" #include "DBReader.h" #include "Timer.h" #include "FileUtil.h" #ifdef OPENMP #include <omp.h> #endif int prefilter(int argc, const char **argv, const Command& command) { MMseqsMPI::init(argc, argv); Parameters& par = P...