sha256
stringlengths
64
64
language
stringclasses
25 values
size
int32
1
210k
lines
int32
1
9.41k
content
stringlengths
1
200k
4e020592f2943e99e9bcc81800341b77fc10678f35079320563e39fe70268348
C
96,527
2,744
/* $Header: /data/petsun4/data1/src_solaris/dcm_pet/RCS/dcm_pet.c,v 1.26 2014/05/05 16:11:25 jon Exp jon $ */ /* Copyright (C) 2012 Washington University */ /* Copyright marker. Copyright will be inserted above. Do not remove */ /* ** Mallinckrodt Institute of Radiology ** Washington University Schoo...
a8752c7399701a47a297b8d60e55a3f69eb8a270e95741a08a5e12436478a5a9
C
103,203
3,131
/* Copyright (C) 1993, 1994, RSNA and Washington University The software and supporting documentation for the Radiological Society of North America (RSNA) 1993, 1994 Digital Imaging and Communications in Medicine (DICOM) Demonstration were developed at the ...
812a22201f0810fc200efc98c10f9b0f7fc34d7fe22235853657c965be8744d2
C
125,003
2,144
/* Copyright (C) 1993, 1994, RSNA and Washington University The software and supporting documentation for the Radiological Society of North America (RSNA) 1993, 1994 Digital Imaging and Communications in Medicine (DICOM) Demonstration were developed at the ...
2674bd30a0f7e9737c2140f75f8b73db7f46a9821cb80f48cd35aa0d28f8d5b3
C
125,005
2,144
/* Copyright (C) 1993, 1994, RSNA and Washington University The software and supporting documentation for the Radiological Society of North America (RSNA) 1993, 1994 Digital Imaging and Communications in Medicine (DICOM) Demonstration were developed at the ...
10afa78a2d42b0bca5736582178706ab0c01f90a761d2ca378b1584870c2f2d3
C
200,000
7,314
/*$Header: /data/petsun4/data1/src_solaris/dcm_dump_file/RCS/dcm.c,v 1.3 2012/12/05 01:46:48 avi Exp $*/ /*$Log: dcm.c,v $ * Revision 1.3 2012/12/05 01:46:48 avi * type casting to suppress compile warnings * * Revision 1.2 2008/07/24 06:49:05 avi * linux compatible resolution of prototypes for exit() and swa...
d940272d4052ee5f313dc7a7a1f479c43ff9fc21561c63bbce1267aff881d28b
C
200,000
7,363
/* Copyright (C) 1993, 1994, RSNA and Washington University The software and supporting documentation for the Radiological Society of North America (RSNA) 1993, 1994 Digital Imaging and Communications in Medicine (DICOM) Demonstration were developed at the ...
4ee5031294e8ba36c364905bd649ee8368469a275c9b3f4ad063f8f75ff6b765
C++
133
7
#include "graphicsscene.h" void GraphicsScene::setViewport(const QRectF &rect, qreal scale) { viewport = rect; vpScale = scale; }
0aff89113cccf35acd8b9063ab7bda591c934a2eee0a8bc49ac14f6ded838213
C++
180
11
/*#include<iostream.h> int main(){ cout << "hi\n"; }*/ #include <iostream> int main( int argc, char **argv ) { std::cout << "Hello World" << std::endl; return 0; }
184102290cd30918ccec72abf229bd1b6bddaa66ed7bf3960737c99ab6bb2cf2
C++
310
17
#include <iostream.h> int main() { int grade, sum, n, average; n = 0; sum = 0; while (n < 5) { cout << "Enter a grade" << endl; cin >> grade; sum = sum + grade; n++; } average = sum / 5; cout << "The average is " << average << endl; return 0; }
3e06c8a193b5004dd57fa1447c8c40f7c88af4eafcc947ae44291198f9aa7e05
C++
429
19
// Copyright (c) Facebook, Inc. and its affiliates. #include <torch/extension.h> #include "SwapAlign2Nat/SwapAlign2Nat.h" namespace tensormask { PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { m.def( "swap_align2nat_forward", &SwapAlign2Nat_forward, "SwapAlign2Nat_forward"); m.def( "swap_align...
3f6bc47df0cdfd96bce83ee8f6c95183e821f13856c575a43593f2397cb823a9
C++
454
19
#include <QApplication> #include "mainwindow.h" #include <string> int main(int argc, char* argv[]) { // determine the startup config file... const char* config_file = "actiCHamp.cfg"; for (int k=1;k<argc;k++) if (std::string(argv[k]) == "-c" || std::string(argv[k]) == "--config") config...
a52c5bc9262f44f939f41dc3c905dde29a647da1ab3208969c274a54d767d6de
C++
1,025
29
#include "geseca.h" #include "ScoreRuler.h" Rcpp::List gesecaCpp(const NumericMatrix & E, const NumericVector & inpScores, unsigned genesetSize, unsigned sampleSize, int seed, double eps){ std::vector<double> scores = as<std::vector<double> > (inpScores); std::vector<std::vector<float>...
36fb1328a2e415bc9e56607f9d275ce12122890d5a38edd247ac73175b93ae21
C++
1,090
39
// Copyright (c) Facebook, Inc. and its affiliates. #include "box_iou_rotated.h" #include "box_iou_rotated_utils.h" namespace detectron2 { template <typename T> void box_iou_rotated_cpu_kernel( const at::Tensor& boxes1, const at::Tensor& boxes2, at::Tensor& ious) { auto num_boxes1 = boxes1.size(0); au...
8942c6a050d415f464cc69a24c98c8fc113696ef0798031631b896aea9a6a9dd
C++
1,095
60
#if defined(__linux__) #include <sys/ioctl.h> #include <asm/ioctls.h> #include <asm/termbits.h> #include <linux/serial.h> // Uses the termios2 interface to set nonstandard baud rates int linuxSetCustomBaudRate(const int fd, const unsigned int baudrate) { struct termios2 t; if (ioctl(fd, TCGETS2, &t)) { ...
df752dad6df54961c935c78539f94c3c4e65582a25450a45b0c2ae3866b3061b
C++
1,228
43
#include "ScoreCalculation.h" double getVarianceEstimator(const std::vector<float> & elems){ double varHat = 0.0; for (double elem : elems){ varHat += elem * elem; } return varHat; } std::vector<float> getProfile(const std::vector<float> & E, const std::vector<u...
190a5fab82eb1490b194f5ac1b16d381b54f1cb997188719bfdcbd358102b49d
C++
1,545
65
#include "windowstate.h" #include "guistate.h" #include <QMenu> WindowState::WindowState(GuiState &global) : global(global) { /* let GuiState track our jobs */ jobMonitors.push_back(&global); /* prepare order items */ auto addOrderItem = [this] (QString name, QIcon icon, int id) { auto item = new QStandard...
f955b63441ec24ddee347a70ad40c4eb366c28a7d89027911ed9233c205a7681
C++
1,557
67
#include "graphicsview.h" #include "graphicsscene.h" #include <QWheelEvent> #include <cmath> GraphicsScene *GraphicsView::scene() const { return qobject_cast<GraphicsScene*>(QGraphicsView::scene()); } void GraphicsView::switchScene(GraphicsScene *newScene) { auto oldScene = scene(); if (oldScene) oldScene->hibe...
9a72b00d27351f1d0e14ca99f63db3f13fa216870592e0f916c61aeb9df08de3
C++
1,630
68
#include "viewer.h" #include "datahub.h" #include <QWidget> Viewer::Viewer(QWidget *widget, QObject *parent) : QObject(parent ? parent : widget), widget(widget) { } void Viewer::setWindowState(std::shared_ptr<WindowState> s) { if (windowState) { /* disconnect anything that might have been connected by us or i...
ee6d0281fff03ca06e6d2586f3113c7537004552fcabc6b215b61b16da082d3b
C++
1,630
46
#include "profilewindow.h" #include "plotactions.h" #include "profilechart.h" #include "windowstate.h" #include "dataset.h" #include "fileio.h" ProfileWindow::ProfileWindow(std::shared_ptr<WindowState> state, ProfileChart *source, QWidget *parent) : QMainWindow(parent), plotbar(new PlotActions(this)), char...
4fefebf030a756832d36f547f70e25abed6ccd0aa339cca0ee9414b7a4cb8362
C++
1,735
64
#include "distmat.h" #include "colors.h" #include <tbb/parallel_for.h> namespace distmat { cv::Mat1f computeMatrix(const std::vector<std::vector<double>> &features, Distance measure) { auto sidelen = features.size(); cv::Mat1f ret(sidelen, sidelen); /* amass all the combinations we need for filling a symmetric m...
2b6672992774f198dd9fed946c7308661de9ffc73b0c4c86c252f368924638fd
C++
1,772
62
#include "regions_tree.h" #include <fstream> #include <iostream> RegionsTree::RegionsTree(std::string json_path) { std::ifstream json_fl("../" + json_path); if (!json_fl) throw std::runtime_error("Failed to read in JSON region information from path: " + json_path); try { re...
90628adb34ef6dcf67e889ba7eb2d12071ef2d59ae1fcee161b7420777f84a4f
C++
1,893
82
#include <opencv2/core/core.hpp> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <iostream> #include <fstream> #include "fams.h" using namespace std; namespace seg_meanshift { bool FAMS::importPoints(const std::vector<std::vector<double>>& features, bool normalize) { // w_ and h_...
2065d410634fea3e061816f2a4296c23312007d334a476969d693c97a8143d2f
C++
1,912
75
#include "esCalculation.h" #include <algorithm> score_t calcES(const vector<int64_t> &ranks, const vector<int> &p, int64_t NS) { // p must be sorted int n = (int) ranks.size(); int k = (int) p.size(); score_t res{NS, 0, n - k, 0}; score_t cur{NS, 0, n - k, 0}; int last = -1; for (int pos : ...
9d9b70f6d8e45598613c15352d8a5d041f40eea81da9681fc744fbaea7de6ef3
C++
2,069
55
#include "fgseaMultilevel.h" #include "fgseaMultilevelSupplement.h" using namespace std; DataFrame fgseaMultilevelCpp(const NumericVector& enrichmentScores, const SEXP& ranks, int pathwaySize, int sampleSize, int seed,double eps, bo...
46d3a423ed2bd1ac8258081893e94e87d73554c3fdbafbc0fc1cf6c1c8500737
C++
2,266
82
#include "util.h" #include <vector> #include <random> #include <algorithm> // generate k numbers from [a, b] - closed interval // a should be non-negative, usually 0 or 1 std::vector<int> combination(const int &a, const int &b, const int &k, random_engine_t& rng) { // std::uniform_int_distribution<int> uni(a, b); ...
04c47952b30d58f0f1f8e8a17b13817ff8f730ce8cb062510eb8b74bc6791cb0
C++
2,307
75
// Copyright (c) Facebook, Inc. and its affiliates. #include "../box_iou_rotated/box_iou_rotated_utils.h" #include "nms_rotated.h" namespace detectron2 { template <typename scalar_t> at::Tensor nms_rotated_cpu_kernel( const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold) { // nms...
df9a19b151978d5dc09f61386ed173a2f8e3be779a1ce8c46f814460830aaaa4
C++
2,520
114
#include "heatmapview.h" #include "heatmapscene.h" #include <QKeyEvent> #include <QtDebug> HeatmapScene *HeatmapView::scene() const { return qobject_cast<HeatmapScene*>(QGraphicsView::scene()); } void HeatmapView::switchScene(HeatmapScene *newScene) { auto oldScene = scene(); if (oldScene) oldScene->hibernate(...
d76b0246f1672e1dc7cd594c5527da54f0936f9272b0979dbc6f1efbeb5959ca
C++
2,927
124
#include "annotations.h" #include "utils.h" #include "meanshift/fams.h" #include <QCollator> #include <iostream> namespace annotations { bool equal(const Annotations::Meta &a, const Annotations::Meta &b) { if (a.id != b.id) // compare stored meta only by id as it should be projectwide-unique return false; if (a...
15b32706536866f1ae22131ac6bd858ae263bad5abaf34074bffd65c24374ad2
C++
3,101
119
#include "datahub.h" #include "guistate.h" #include "utils.h" // for registering meta types #include "model.h" #include <QChartView> #include <QApplication> #include <QIcon> #include <QSurfaceFormat> #include <iostream> #if defined(QT_STATIC) && defined(_WIN32) # include <QtPlugin> Q_IMPORT_PLUGIN(QSvgIconPlugin) Q...
b595d3ab87335520bed1f17b0a8fe777f49771b618ac87de799f334e0fdb8beb
C++
3,179
121
// Copyright (c) Facebook, Inc. and its affiliates. #include <torch/extension.h> #include "ROIAlignRotated/ROIAlignRotated.h" #include "box_iou_rotated/box_iou_rotated.h" #include "cocoeval/cocoeval.h" #include "deformable/deform_conv.h" #include "nms_rotated/nms_rotated.h" namespace detectron2 { #if defined(WITH_CU...
3f6f4883975b0855565948690b22b9d2fc7294898278349383b9f17eb546c63c
C++
3,300
120
#include "spawndialog.h" #include "dataset.h" #include "../distmat/distmatscene.h" #include "../compute/features.h" #include <QPushButton> #include <QFontMetrics> SpawnDialog::SpawnDialog(Dataset::Ptr data, std::shared_ptr<WindowState> state, QWidget *parent) : QDialog(parent), data(data), state(state) { source_...
b47345fc86c238b4cacd577fc00baffd97a11777633a911570bc4659f41e54bc
C++
3,562
127
#include "components.h" #include "dataset.h" #include "features.h" #include <tbb/parallel_for.h> #include <cmath> namespace components { std::pair<size_t, size_t> gauss_cover(double mean, double sigma, size_t range, double factor) { auto allowance = factor*sigma; auto left = size_t(std::max(0., (mean - allowance))...
4c3aa1a5758d5d195941ddcbffcf2bc7590a246dd30836ad6ed8ace987ee4dd7
C++
3,570
116
#include "heatmaptab.h" #include "heatmapscene.h" #include "jobregistry.h" #include "../profiles/plotactions.h" #include <QMainWindow> HeatmapTab::HeatmapTab(QWidget *parent) : Viewer(new QMainWindow, parent) { setupUi(qobject_cast<QMainWindow*>(widget)); setupOrderUI(); auto capturePlot = PlotActions::create...
ff94ab545aeeb50720e2175023ec0ac8b4c0480f5458ff04a79cc4abe331fff7
C++
3,701
134
#include "jobstatus.h" #include "jobregistry.h" #include <QPainter> #include <QPaintEvent> #include <QSvgRenderer> #include <QTimer> #include <QToolTip> #include <QHBoxLayout> #include <QStyle> #include <QStyleOptionButton> #include <cmath> JobStatus::JobStatus(QWidget *parent) : QWidget(parent) { auto layout =...
5780371202098917e56f8b9af6468fc6208fcd18e832428e3be149dce68c1e6b
C++
3,742
118
#include "distmattab.h" #include "distmatscene.h" #include "jobregistry.h" #include "../profiles/plotactions.h" #include <QMainWindow> DistmatTab::DistmatTab(QWidget *parent) : Viewer(new QMainWindow, parent) { setupUi(qobject_cast<QMainWindow*>(widget)); setupOrderUI(); auto capturePlot = PlotActions::create...
efd7adc2b6b6b25f08f3875e3c7ff74a3341fb3f6fc19fc003ec06b36066912d
C++
4,076
142
#include <nan.h> #include "./poller.h" Poller::Poller(int fd) : AsyncResource("node-serialport:poller") { Nan::HandleScope scope; this->fd = fd; this->poll_handle = new uv_poll_t(); memset(this->poll_handle, 0, sizeof(uv_poll_t)); poll_handle->data = this; int status = uv_poll_init(uv_default_loop(), poll_...
88398841d6b075f51b7c6eaf9bef5560ee78d09762350ba6d3b4d2babc8464d5
C++
4,457
168
#include "bnmschart.h" #include "dataset.h" #include "../compute/colors.h" #include <QtCharts/QLineSeries> #include <QtCharts/QValueAxis> #include <QtCharts/QCategoryAxis> /* small, inset plot constructor */ BnmsChart::BnmsChart(Dataset::ConstPtr dataset, const std::vector<Components> &comps) : ProfileChart(datas...
1eacbdae46be913c7d24111b8743bde5d3af94d9257905179725855dd1ffb1ab
C++
4,546
170
#include "rangeselectitem.h" #include <QtCharts/QChart> #include <QBrush> #include <QPen> #include <QCursor> #include <QPainter> const auto LEFT = Qt::Edge::LeftEdge; const auto RIGHT = Qt::Edge::RightEdge; RangeSelectItem::RangeSelectItem(QtCharts::QChart *parent) : QGraphicsObject(parent) { setZValue(10); h...
4059565947ac86199173ac69a8d0f478c25407293516ca280f57650cafc902f0
C++
4,658
197
#include "chartview.h" #include "chart.h" #include <QOpenGLWidget> ChartView::ChartView(QWidget *parent) : QtCharts::QChartView(parent) { setRubberBand(QtCharts::QChartView::RectangleRubberBand); // TODO: issue #5 } Chart *ChartView::chart() { return qobject_cast<Chart*>(QChartView::chart()); } void ChartView:...
81e4cec6572553d911be3dd9a66b3835ad5cb7c1d02ebce2709c89625e8a3573
C++
4,767
157
#include "famscontrol.h" #include "jobregistry.h" #include "../compute/annotations.h" FAMSControl::FAMSControl(QWidget *parent) : Viewer(new QWidget, parent) { setupUi(widget); pruneButton->setDefaultAction(actionPruneClusters); stopButton->setVisible(false); connect(kSelect, qOverload<double>(&QDoubleSpinBo...
507b30c44a45afb8f26ff79b49b3b69309d2e593605c6c0fe60879b1bdca05b8
C++
5,008
176
#include "scattertab.h" #include "chart.h" #include "../compute/features.h" #include "../profiles/plotactions.h" #include <QMainWindow> ScatterTab::ScatterTab(QWidget *parent) : Viewer(new QMainWindow, parent) { setupUi(qobject_cast<QMainWindow*>(widget)); // setup toolbar auto anchor = actionCycleBackward; ...
94faac1ce9db89931904791bb2934ec8bb71584e7b4fe8f976ec67bf6b4229d4
C++
5,087
162
#include "hierarchy.h" #include "jobregistry.h" #include <queue> #include <unordered_set> namespace hierarchy { struct Pair { float distance; unsigned left, right; static float closer(const Pair& a, const Pair& b) { return a.distance > b.distance; } }; std::unique_ptr<HrClustering> agglomerative(const cv::Mat1f ...
a6fa98d9837595b023b0f976530cfdacc91da490b9d1b84895870fe26ca2878c
C++
5,159
159
#include "featweightstab.h" #include "featweightsscene.h" #include "../profiles/plotactions.h" #include <QMainWindow> FeatweightsTab::FeatweightsTab(QWidget *parent) : Viewer(new QMainWindow, parent) { setupUi(qobject_cast<QMainWindow*>(widget)); setupWeightingUI(); // plug-in score stuff toolBar->addSeparat...
cf318df96fb403ee4ee20d45758987f6674a8a76879eebff315f732d66e02ac5
C++
5,206
139
#include <iostream> #include <string> #include <algorithm> #include <set> #include <vector> #include <map> #include <fstream> using namespace std; int main() { freopen("roundRanks.txt", "r", stdin); int n; scanf("%d", &n); vector <int> rank_rounded(n); for (int i = 0; i < n; i++) { scanf("%d", &rank_rou...
9f8c8c0ce5918859a2a5d723469984a086f5374b2745d6bb4ab4a4bd5cfbac66
C++
5,317
196
#include "jobregistry.h" #include <QThread> #include <QMetaObject> #include <QtConcurrent> std::shared_ptr<JobRegistry> JobRegistry::get() { static auto instance = std::make_shared<JobRegistry>(); return instance; } void JobRegistry::run(const Task &task, const std::vector<QPointer<QObject>> &monitors) { pipeline...
3dc625fd9b09beaf85bfe16459683bb858ecfac0dac5d68eae80d6eb8d4a40d4
C++
5,379
189
#include "datahub.h" #include "proteindb.h" #include "dataset.h" #include "../storage/storage.h" #include <QThread> #include <QVector> #include <QFileInfo> #include <QDir> DataHub::DataHub(QObject *parent) : QObject(parent), storage(std::make_unique<Storage>(proteins)) { setupSignals(); } DataHub::~DataH...
836c5e3810abc7cf123e11ad75c0068b8865049f67309163de5cf458c621d45b
C++
5,383
193
#include "fams.h" #include <vector> #include <algorithm> #include <limits> #include <iostream> namespace seg_meanshift { FAMS::MergedMode::MergedMode(const FAMS::Mode &d, int m, int spm) : data(d.data.size()), members(m), spmembers(spm), valid(true) { for (size_t i = 0; i < data.size(); ++i) data[i] = d.da...
8c3c6021eea07f12ba8b82cbebc33c752083506dca99f5f17851d7dcca8250c9
C++
5,450
192
#include "referencechart.h" #include "dataset.h" #include "../compute/components.h" #include "../compute/colors.h" #include <QLegendMarker> #include <QLineSeries> #include <QAreaSeries> #include <QLogValueAxis> /* small, inset plot constructor */ ReferenceChart::ReferenceChart(Dataset::ConstPtr dataset, const std::ve...
cd78f2c68eeba81255e55a84ad0cad83d9895b1320d0a83a42569be383666364
C++
5,467
217
#include "storage.h" #include "dataset.h" #include <QIODevice> #include <QCborValue> #include <QCborArray> #include <QCborMap> #include <QCborStreamWriter> /* storage version, increase on breaking changes */ // Note that this is local to serialize const int storage_version = 2; /* minimum Belki release version that c...
47658559a751a682da8223441dcefa6a9c634b27c9ac9793eca278bcccd1cbf9
C++
5,571
172
#include "ScoreRuler.h" #include "util.h" #include "Rcpp.h" using namespace Rcpp; ScoreRuler::ScoreRuler(const std::vector<std::vector<float> > & inpE, unsigned inpSampleSize, unsigned inpGenesetSize): n(inpE.size()), m(inpE[0].size()), sampleSize(inpSampleSize), geneset...
93936cc8b5d9fba9f1e217fa401c74c2002b39c49091374aa25214fe39350b19
C++
5,791
215
#include "profiletab.h" #include "profilechart.h" #include "plotactions.h" #include <QMainWindow> #include <QStandardItemModel> #include <QAbstractProxyModel> #include <QCompleter> #include <QListWidget> #include <QMenu> #include <QCursor> #include <QShortcut> ProfileTab::ProfileTab(QWidget *parent) : Viewer(new ...
622f488390ab5f73e77a20f497c0d90809956882b610cfd499a466a21d52929c
C++
5,920
174
#include "fileio.h" #include <QFileDialog> #include <QMap> #include <QSvgGenerator> #include <QBuffer> //#include <QPrinter> // for PDF support #include <QPainter> #include <QGraphicsScene> #include <QGraphicsView> #include <QClipboard> #include <QMimeData> #include <QGuiApplication> QString FileIO::chooseFile(FileIO...
3a15b02fabd9bb6eef79278f4b2e83fd8f608309f2eee692ac0d01ec62bbcebc
C++
6,065
177
#include "dimred.h" #include <tapkee/tapkee.hpp> // includes Eigen #include <tapkee/callbacks/precomputed_callbacks.hpp> #include <tapkee/utils/logging.hpp> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> // for EMD #include <tbb/parallel_for.h> #include <map> #include <iostream> using namespace tapkee; n...
047fa52e36d2ae64b0bb2023a03090f70035340956f6ce6e6b1394e7f3345c95
C++
6,111
105
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <Rcpp.h> using namespace Rcpp; #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(...
a2ae810957b9f567d9c203ae3d34bd18a13f2b85e5c16e6c0a05dab7a9d4c8a2
C++
6,341
250
#include "proteindb.h" #include "../compute/annotations.h" #include "../compute/colors.h" #include <QTextStream> #include <QRegularExpression> ProteinDB::ProteinDB(QObject *parent) : QObject(parent) { colorset = Palette::iwanthue20; groupColorset = colorset; for (auto &c : groupColorset) c = c.lighter(130); ...
5c8efca16e7bed1d461e42c1e3352362a0838490aeeddf2ea103709b73b007df
C++
6,420
224
#include "dimredtab.h" #include "chart.h" #include "jobregistry.h" #include "../compute/features.h" #include "../profiles/plotactions.h" #include <QMainWindow> #include <QMenu> #include <QToolButton> DimredTab::DimredTab(QWidget *parent) : Viewer(new QMainWindow, parent) { setupUi(qobject_cast<QMainWindow*>(wid...
acf3f391c85247c5e3e1e3f833aea6be4eca8d71120d172ed6f34447ab5da526
C++
6,628
188
// Copyright (c) Facebook, Inc. and its affiliates. // @lint-ignore-every CLANGTIDY // This is an example code that demonstrates how to run inference // with a torchscript format Mask R-CNN model exported by ./export_model.py // using export method=tracing, caffe2_tracing & scripting. #include <opencv2/opencv.hpp> #in...
89f46303e8ee603e014566e6bbf3bdd84c6f5fa6dfb93f94703dd868b9ce2e12
C++
7,051
211
#include "storage.h" #include "dataset.h" #include "../compute/annotations.h" #include <QCborValue> #include <QCborArray> #include <QCborMap> #include <QCborStreamReader> #include <QFile> template<> Structure Storage::deserializeStructure<2>(const QCborMap &source, unsigned id) { auto unpackCluster = [] (const QCbor...
57007fc1ff45c8668824c238dea7a94f5ff4da5c859024922fad9f04c5ef686f
C++
7,106
235
#include "profilewidget.h" #include "profilechart.h" #include "profilewindow.h" #include "dataset.h" #include "windowstate.h" #include <QMenu> #include <QCursor> #include <QStringList> #include <QGuiApplication> #include <QClipboard> #include <random> ProfileWidget::ProfileWidget(QWidget *parent) : QWidget(parent...
79dc55b8d6bc6a7b4958f22b6f9044221dc673e8a806a5573f950510f2895825
C++
7,329
203
#include "plotactions.h" #include "profilechart.h" #include <QActionGroup> #include <QToolBar> #include <QToolButton> #include <QMenu> #include <QMainWindow> QAction* PlotActions::createAction(QObject *parent, QIcon icon, QString title, QString tooltip, bool isToggle, QString shortcut) { auto action = new QAction(ico...
cadcc0f3bbb114ae0a1f0f9cd98190409ee0c960d455da4c6b50dd958ca5c603
C++
7,413
240
#include "storage.h" #include "proteindb.h" #include "../compute/features.h" #include <QTextStream> #include <QRegularExpression> #include <QRegularExpressionMatch> Features::Ptr Storage::readSource(QTextStream in, const ReadConfig &config) { auto header = in.readLine().split("\t"); /* simple source files have fir...
9f387fb8551d510155450b3a4804e6192625dbec2069908fec436a91607d6a21
C++
7,586
274
#include "features.h" #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> // for calchist #include <tbb/parallel_for.h> #include <tbb/parallel_for_each.h> #include <tbb/parallel_reduce.h> namespace features { Features::Range range_of(const vec &source, float fraction) { if (source.empty()) return {}; Feat...
415d89d874c8de6129e7e952ce9e53c676c92396b87a50d81100225c17d38dc9
C++
7,851
291
#include "storage.h" #include "proteindb.h" #include <QFile> #include <QSaveFile> #include <QFileInfo> #include <QTextStream> #include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QRegularExpression> #include <QRegularExpressionMatch> Storage::Storage(ProteinDB &proteins, QObject *parent) ...
7f8f09c2c8e5c986babdafab6a12c260f7802cd92af92456db2d8922011d5d5b
C++
9,054
335
#include "heatmapscene.h" #include "windowstate.h" #include "../compute/colors.h" #include "../compute/features.h" #include <QPainter> #include <QGraphicsItem> #include <QGraphicsSceneHoverEvent> #include <QMenu> HeatmapScene::HeatmapScene(Dataset::Ptr data) : data(data) { auto d = data->peek<Dataset::Base>(); ...
551b7c99803e1d1815f27250d26b179db6dc83a630513bd2521c28b25b52f806
C++
9,681
365
///////////////////////////////////////////////////////////////////////////// // Name: fams.cpp // Purpose: fast adaptive meanshift implementation // Author: Ilan Shimshoni // Modified by: Bogdan Georgescu // Created: 08/14/2003 // Version: v0.1 //////////////////////////////////////////////////...
7858996fc483f657041b0aa75b10977e2869b4a0d5bd75f0e01c68fae279b433
C++
11,445
411
#include "featweightsscene.h" #include "../compute/colors.h" #include "../compute/features.h" #include <QPainter> #include <QGraphicsPixmapItem> #include <QGraphicsSceneMouseEvent> #include <QCursor> #include <QApplication> #include <opencv2/imgproc/imgproc.hpp> #include <tbb/parallel_for.h> #include <QDebug> Featw...
2e862acf8ddb8c1ce2f0e969c1e351a69e7b0dc3148fe1fe9199b1e28859e945
C++
11,535
359
#include "./darwin_list.h" #include <IOKit/IOKitLib.h> #include <IOKit/IOCFPlugIn.h> #include <IOKit/usb/IOUSBLib.h> #include <IOKit/serial/IOSerialKeys.h> #if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4) #include <sys/ioctl.h> #include <IOKit/serial/ioss.h> #endif #incl...
9b6c4f2e47744da1c44103c9909b2189b7393c8a9f559dbb1b0abe95c15c7c9d
C++
11,700
369
#include "guistate.h" #include "datahub.h" #include "fileio.h" #include "jobregistry.h" #include "../widgets/mainwindow.h" #include <QAbstractProxyModel> #include <QTimer> #include <QEvent> #include <QMenu> #include <QPushButton> #include <QMessageBox> #include <QWidgetAction> #include <QDesktopServices> #include <QGu...
276cda9739354b0294b9190a56f5a3b8d1ea35ed69fa198eb5b0d6d970d68d70
C++
11,771
421
#include "serialport_unix.h" #include "serialport.h" #include <sys/file.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <termios.h> #ifdef __APPLE__ #include <AvailabilityMacros.h> #include <sys/param.h> #endif #if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VER...
ff1c19947455c3287c9092d348a98a482cf3072609c0ccdb2633c4d03e775709
C++
11,870
381
#include "bnmstab.h" #include "bnmschart.h" #include "plotactions.h" #include "referencechart.h" #include "rangeselectitem.h" #include "datahub.h" // for splice #include "jobregistry.h" // for splice // stuff for loading components. will most-probably be moved elsewhere! #include "../compute/components.h" #include "fi...
88a6f84af7fb5827e443254f01e1662bc18c99c562c84b6307c13d96bdddafc6
C++
12,774
502
#include <Rcpp.h> using namespace Rcpp; #include <iostream> #include <vector> #include <algorithm> #include <cassert> #include <cmath> #include <limits> #include <random> #include <chrono> #include "util.h" using namespace std; const double eps = 1e-13; // not actually a segment tree, but a square root heuristic t...
4d7f711bddb3c0138f19d39e942d5b3435f3fd758bdda45c7c6badcf871f9c58
C++
13,427
486
#include "./serialport.h" #ifdef __APPLE__ #include "./darwin_list.h" #endif #ifdef WIN32 #define strncasecmp strnicmp #include "./serialport_win.h" #else #include "./poller.h" #endif v8::Local<v8::Value> getValueFromObject(v8::Local<v8::Object> options, std::string key) { v8::Local<v8::String> v8str = Nan...
4d95df11f69bded360ab7a0566d44fc05aa57a5967374486f12a4ffe65846ed3
C++
13,455
463
#include "distmatscene.h" #include "windowstate.h" #include <QPainter> #include <QGraphicsPixmapItem> #include <QGraphicsSceneMouseEvent> #include <QCursor> #include <QtDebug> DistmatScene::DistmatScene(Dataset::Ptr data, bool dialogMode) : dialogMode(dialogMode), data(data) { /* set scene rectangle */ q...
1fb33d33fdd1f1d761b00432d5dabbaad9bfad6b4d8c1290b387505883b88c1e
C++
14,889
573
#include "LibTalker.h" #include <iostream> LibTalker::LibTalker() { m_bUseFDA = false; m_bUseSim = false; m_bUseActiveShield = false; m_bUseTriggers = false; m_bUseSampleCtr = false; m_bExcludeTriggers = false; m_nRequestedEEGChannelCnt = 0; m_nRequestedAuxChannelCnt = 0; m_nDevNo = 0; m_nSampleSize = 0; m_...
1b1381eb11cfc40e16a095fd082b08a9eadb9188a718907d94fe4f4015b51ace
C++
14,899
507
#include "profilechart.h" #include "profilewindow.h" #include "datahub.h" #include "proteindb.h" #include "dataset.h" #include "../compute/features.h" #include <QLineSeries> #include <QAreaSeries> #include <QValueAxis> #include <QLogValueAxis> #include <QCategoryAxis> #include <QLegendMarker> #include <tbb/parallel_f...
c776f92004c61664996923e9029e0f63e5193eebe6b9b64bc08e837cb3fcb923
C++
15,059
476
#define _USE_MATH_DEFINES #include "morphology.h" #include <set> #include <glm/ext.hpp> #include <glm/gtx/norm.hpp> #include <glm/gtc/type_ptr.hpp> #include <unordered_map> using namespace H5; void Morphology::Union(Morphology* rhs) { std::cout << "Computing union of two morphologies..." << std::endl; ...
c2805a23a9f006787164db752a93a7658c10b3787ce47b47afb99e58ed3dc5a4
C++
15,240
556
#include "chart.h" #include "windowstate.h" #include <QAbstractAxis> #include <QScatterSeries> #include <QSplineSeries> #include <QValueAxis> #include <QLegendMarker> #include <QGraphicsScene> #include <QGraphicsSceneMouseEvent> #include <QPolygonF> #include <QHash> #include <QTimer> #include <QCursor> #include <QMenu...
a0f37afaa9a6c59d7844b33e562afe9d1c69761078ee061c1a6e581b8acb6f8e
C++
15,305
514
#include "dataset.h" #include "../compute/features.h" #include "../compute/dimred.h" #include "../compute/distmat.h" #include "../compute/annotations.h" #include "../compute/hierarchy.h" #include <QDataStream> #include <QTextStream> #include <QRegularExpression> #include <opencv2/core.hpp> #include <tbb/parallel_for....
04958a5c528abd2c7a2836abc1cab601d5637299540c76522b6a834acd9e6883
C++
16,043
522
// Copyright (c) Facebook, Inc. and its affiliates. #include <ATen/TensorUtils.h> #include "ROIAlignRotated.h" // Note: this implementation originates from the Caffe2 ROIAlignRotated Op // and PyTorch ROIAlign (non-rotated) Op implementations. // The key difference between this implementation and those ones is // we d...
59ff306c4fc51bba4371d2f1b387b070415b61da263c1bdafc414d762f08b706
C++
17,305
494
#include "fgseaMultilevelSupplement.h" #include <Rcpp.h> double getVarPerLevel(unsigned long k, unsigned long n){ return boost::math::trigamma(k) - boost::math::trigamma(n + 1); } pair<double, bool> calcLogCorrection(const vector<unsigned int> &probCorrector, long probCorrIndx...
561bbb50cde12f436d1ce7d19e55e7dee7016e27a18572881664652847d94ec4
C++
19,315
1,109
#include "colors.h" #include <opencv2/imgproc/imgproc.hpp> const QVector<QColor> Palette::tableau20({ {31, 119, 180}, {174, 199, 232}, {255, 127, 14}, {255, 187, 120}, {44, 160, 44}, {152, 223, 138}, {214, 39, 40}, {255, 152, 150}, {148, 103, 189}, {197, 176, 213}, {140, 86, 75}, {196, 156, 148}, {227, 119, 194},...
b0927765ab8418842a0dda996355a4ca55362714abcdac95463ca7e4ee2a34c5
C++
20,750
507
// Copyright (c) Facebook, Inc. and its affiliates. #include "cocoeval.h" #include <time.h> #include <algorithm> #include <cstdint> #include <numeric> using namespace pybind11::literals; namespace detectron2 { namespace COCOeval { // Sort detections from highest score to lowest, such that // detection_instances[det...
4a3e062878c8f1c77b556b8c58bf5ea6653637484f585dc496c9210a1ae077ca
C++
22,100
634
/*#define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> */ #include "mainwindow.h" #include "ui_mainwindow.h" #include "Amplifier_LIB.h" #include <QtCore/QtCore> #include <iostream> #include <sstream> #if _WIN64 #define BITDEPTH "64" #else #define BITDEPTH "32" #endif const int m_pnBaseSamplingRate...
5fb35df7c6d532c1c0f0d81e2c400aa34cc4cd45085750a1c9de377e4459240b
C++
28,847
486
// Predictive-coding-inspired Variational RNN // learning.cpp // Copyright © 2022 Hayato Idei. All rights reserved. // #include "network.hpp" #include <sys/time.h> //hyper-parameter for learning #define EPOCH 100000 // iteration of parameter update in training (set in the main function in error regression) #define...
ca52d097f5d018654440c3bc65cb53e1f8c11fce16ba4e03e06dcbe1f0978d4c
C++
30,586
855
#include "mainwindow.h" #include "spawndialog.h" #include "jobstatus.h" #include "famscontrol.h" #include "../profiles/profilewindow.h" #include "windowstate.h" #include "datahub.h" #include "fileio.h" #include "jobregistry.h" #include "../storage/storage.h" #include "../scatterplot/dimredtab.h" #include "../scatterp...
009a904e518778a392adf6201b9fbd9efca855e0c1f9cb2674351e85f856a53a
C++
31,125
953
#include "./serialport.h" #include "./serialport_win.h" #include <nan.h> #include <list> #include <vector> #include <string.h> #include <windows.h> #include <Setupapi.h> #include <initguid.h> #include <devpkey.h> #include <devguid.h> #pragma comment(lib, "setupapi.lib") #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(...
fe8f684457f51193d0cdf3c17b5bfb3f740966699c5476d59d30efa087ac64c6
C++
44,626
1,117
// Grab.cpp /* Note: Before getting started, Basler recommends reading the "Programmer's Guide" topic in the pylon C++ API documentation delivered with pylon. If you are upgrading to a higher major version of pylon, Basler also strongly recommends reading the "Migrating from Previous Versions" topic in ...
dafcbfbc0f2658457bc7487bfc552d418f8e1fb110af7bf66e6a7138e1b1e8db
C++
60,116
678
// Predictive-coding-inspired Variational RNN // error_regression.cpp // Copyright © 2022 Hayato Idei. All rights reserved. // #include "network.hpp" #include <sys/time.h> //hyper-parameter used in error regression #define TEST_SEQ_NUM 10 //sequence number of target data in error regression #define ADAM1 0.9 #defin...
bfbfebdccb5c6b5f268240af341f028b1d2306f205633ebc8a626d048c2ab05d
C/C++
120
3
#include "common-format.h" common_format* parse_common_format(char* root, char rec_open);//ONLY for reading, currently
6274adf5ce1c944f3e5826419659c6e90bb1d6e74b896498b23ccba0d87402ce
C/C++
230
7
#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_ #define PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_ int ToBaudConstant(int baudRate); int ToDataBitsConstant(int dataBits); #endif // PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_
3f82ac4c56824474522da293a0944568d6e605cc83ccbf08736d305fe74fb606
C/C++
310
13
#ifndef GESECA_H #define GESECA_H #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::plugins(cpp17)]] // [[Rcpp::export]] Rcpp::List gesecaCpp(const NumericMatrix & E, const NumericVector & inpScores, unsigned genesetSize, unsigned sampleSize, int seed, double eps); #endif // GESECA_H
c2875c3b09d1f2feaae39fd4ea0e3bc2ecc02028c498c2cf5ba99ee548c8aa56
C/C++
311
15
#ifndef HIERARCHY_H #define HIERARCHY_H #include "model.h" #include <memory> namespace hierarchy { std::unique_ptr<HrClustering> agglomerative(const cv::Mat1f &distances, const std::vector<ProteinId> &proteins); Annotations partition(const HrClustering &in, unsigned granularity); } #endif // HIERARCHY_H
9560999d6e88aac789656a92b6ac6d0e3d9a56fe6c351541e75142fb01657f37
C/C++
356
9
#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_LINUX_H_ #define PACKAGES_SERIALPORT_SRC_SERIALPORT_LINUX_H_ int linuxSetCustomBaudRate(const int fd, const unsigned int baudrate); int linuxGetSystemBaudRate(const int fd, int* const outbaud); int linuxSetLowLatencyMode(const int fd, const bool enable); #endif // PACKAGES_...
c3d8c10a6a86dbd0d65407177be87a7562de53fbf874f7fc61b60ee75dbf18b1
C/C++
376
11
/*$Header: /data/petsun4/data1/src_solaris/imglin/RCS/t4_sub.h,v 1.1 2009/09/09 05:53:40 avi Exp $*/ /*$Log: t4_sub.h,v $ * Revision 1.1 2009/09/09 05:53:40 avi * Initial revision **/ void t4_init_ (float *t4); int t4_read_ (char *t4file, float *t4); int iget_t4_scale_ (char *t4file, float *scale); void t4_list...
93beed0ccc9d7e47eb4c2b2f47043a48063d84cc1825469db72d52ee8e454f27
C/C++
406
23
#ifndef GRAPHICSSCENE_H #define GRAPHICSSCENE_H #include <QGraphicsScene> class GraphicsScene : public QGraphicsScene { Q_OBJECT public: virtual void setViewport(const QRectF &rect, qreal scale); virtual void hibernate() {} virtual void wakeup() {} protected: /* geometry of the current view, used to re-arran...
c1946d6e281372f1515a1fc154cd454cb2fbb65f684b1cbbd534d4096807608b
C/C++
421
22
#ifndef DIMRED_H #define DIMRED_H #include <QVector> #include <QMap> #include <QPointF> #include <vector> namespace dimred { struct Method { QString name; QString id; // first id of resulting method(s) QString description; }; QMap<QString, QVector<QPointF>> compute(QString method, const std::vector<std:...
57ef0cc68058a022872955708d2653b170d585f82d537538795979ec9c3db406
C/C++
431
9
/*$Header: /data/petsun4/data1/src_solaris/flip_4dfp/RCS/flip_4dfp.h,v 1.1 2010/08/19 23:33:52 avi Exp $*/ /*$Log: flip_4dfp.h,v $ * Revision 1.1 2010/08/19 23:33:52 avi * Initial revision **/ extern void flipx (float *imgf, int *pnx, int* pny, int *pnz); /* cflip.c */ extern void flipy (float *imgf, int *pnx, i...
6fa3097d3e4ea3797c26e30ed787f32ddf064ed6541c28ddc3efab672cef99ab
C/C++
496
15
/*$Header: /data/petsun4/data1/src_solaris/imglin/RCS/t4_io.h,v 1.2 2010/03/03 01:25:34 avi Exp $*/ /*$Log: t4_io.h,v $ * Revision 1.2 2010/03/03 01:25:34 avi * t4_write returns void * * Revision 1.1 2009/02/23 06:14:49 avi * Initial revision **/ int t4_read1 (FILE *fp, float *t4); void t4_init (float *t4...
eca24dfe71419bd08b61385385c510b07667d63a77bfc8d2b860985ef1887beb
C/C++
504
26
#ifndef PROFILEWINDOW_H #define PROFILEWINDOW_H #include "ui_profilewindow.h" #include <QMainWindow> #include <memory> class PlotActions; class ProfileChart; class WindowState; class ProfileWindow : public QMainWindow, private Ui::ProfileWindow { Q_OBJECT public: // note: we only accept MainWindows as parent ex...
4e08090e23aaf902ea39a6dbb3ef8bff0f0c5a29deda90cad53fd91c0ea084c2
C/C++
508
20
#ifndef DISTMAT_H #define DISTMAT_H #include "features.h" #include <QPixmap> #include <opencv2/core/core.hpp> #include <functional> #include <map> namespace distmat { using TranslateFun = std::function<cv::Point(int,int)>; cv::Mat1f computeMatrix(const std::vector<std::vector<double>> &features, Distance measure)...