sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
12d4fd8776450f4f3262ead324eb4956889710b34ff2a6c0fdc3eea8a62af3ae | C++ | 383 | 11 | #include "QtProgressMonitor.h"
void QtProgressMonitor::setProgress(const unsigned int& progress) {
ProgressMonitor::setProgress(progress);
emit progressChanged(100 * static_cast<float>(_progress) / static_cast<float>(_maxProgress));
}
void QtProgressMonitor::setStatus(const std::string& status) {
Progre... |
224ee766b6f9fce054cb2e67e8ddb6e6ed0de17fb054a3b8f93717d1a008c657 | C++ | 418 | 33 | #include "CmdMessenger.h"
CmdMessenger c = CmdMessenger(Serial, ',',';','/');
enum
{
double_ping,
double_pong,
};
void on_double_ping(void){
double value = c.readBinArg<double>();
c.sendBinCmd(double_pong, value);
}
void attach_callbacks()
{
c.attach(double_ping, on_double_ping);
}
void setup... |
ecc4f94b4335e056dfe5c4e83ae7ce6578fcfe7ff7b12f42272221c57a2f1048 | C++ | 464 | 19 | /* Send JSON and string messages over the serial port
* --------------------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "send.h"
void send_message(const char* topic, const char* payload) {
Serial.print(topic);
Serial.print("#");
Serial.println(payload);
}
void sen... |
3124d2fc43251d9a64391912fd776e159625eda96ecae110aa5c9044c5b270fd | C++ | 496 | 26 | #include "Repository.h"
#include <string>
#include <vector>
#include "AnnotationList.h"
Repository::Repository(const std::shared_ptr<AnnotationList>& list) :
_list(list),
_source("")
{}
Repository::~Repository() {
}
bool Repository::load() {
bool loadSucces = false;
if (_list) {
loadSucce... |
c59a68a5c190163e9315b90112e6d0bf9804bef435b34b29ea7b72be0d8f9897 | C++ | 498 | 18 | #include "MultiResolutionImageReader.h"
#include "MultiResolutionImage.h"
#include "core/filetools.h"
#include "MultiResolutionImageFactory.h"
using std::string;
MultiResolutionImageReader::MultiResolutionImageReader()
{
}
MultiResolutionImageReader::~MultiResolutionImageReader() {
}
MultiResolution... |
19fa154c2255e6c14c192388a613743cabc829fdfa03bdf58830f748c1057864 | C++ | 507 | 16 | #include "WorklistSourceInterface.h"
namespace ASAP
{
std::vector<std::string> WorklistSourceInterface::getRequiredParameterFields(void)
{
// Empty vector signifies that no additional fields are required. This method should be overriden
// if more information than just the location is required.
return ... |
5b465870de6bc25847d515f60f6013e0fbb5b6d5057a9b450008139f94cc1b60 | C++ | 524 | 24 | #include "UnitTest++/UnitTest++.h"
#include "FRST.h"
#include "TestData.h"
#ifdef WIN32
#include <windows.h>
#include <tchar.h>
#include <shellapi.h>
#endif
#include <iostream>
using namespace UnitTest;
using namespace std;
using namespace cv;
namespace {
#ifdef WIN32
static void reportTimeLapsed(... |
9f11f88d1cccdd64e1f09dfd441a78f4224a4296fcc3512f781d00b7ee075513 | C++ | 539 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
a786e6b5365b7d857f242f179b8dd1ec2bc3f855050fd7b7fa506205bff1d633 | C++ | 539 | 19 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
b81c8a408c1850ebcf0475e99737dc93763a5a8031ac3f574120e65bcb1f91df | C++ | 539 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
28e0dd077323dec097f71034693c0c73a5a3d2f9fdb0a17d98581c00d8c895d1 | C++ | 540 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
6406eaffa7797b8338208d254b4c989b8c031be35443acf3281c83274653d0f3 | C++ | 543 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
6c4ef859b9bcd0e4909fb52f1e30ac14eba51ed2f97ab7c568e7dff72b74d772 | C++ | 544 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
e70ad028599c867aa3eef464ae581af777cccd72d6e7f0f22f0b6d66dcda1988 | C++ | 545 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
878e79cdd85e1cfbbe752c8298629fd7dd2f4e94eebcc273f551cef38c850a82 | C++ | 546 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
94c66dba869039768161667343d47375c894a91cf3135f05558b63622c9ae15b | C++ | 546 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
2a5471c12c71844b095436440ccfa2161cc84e65e19c8ba56128289c449f862a | C++ | 547 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
5721fe6395d82cf516c8fabe2052c2fd4c5c33208af71ac8ff9dc39ce9859b0c | C++ | 547 | 19 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
72715d3df72b90b6d1ea4152b5e2314578fc9047221e5129b8e455092a9b45da | C++ | 547 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
c5a2c813b2543e914624d2781b6abbea7485e6b0c731908a051338c42c0786e1 | C++ | 547 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
d9cdc1a4f9cf5858739ce2f7fc0e2956969ce36d6777d1242c65af16ec360532 | C++ | 547 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
fbc0204f30f73c41d15b17148d29eac9008238e32a78d7eeca0e216e44d9623a | C++ | 547 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
102718edaa860308b91325b097317ceaba5dde77be3d251c68a34471935e287d | C++ | 549 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
60099a3f934546223b4655a38b4cb94ceb07b50cfe7f381dd16bc4a9ad16198f | C++ | 550 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
8109b79cc8c9a76293df90baf8c28b99373348850f7e6bac9767fc3df55735b8 | C++ | 550 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
29d58a0c4a00a8bf9df3882c543af68e00870f28428e4db76d317fbb09707533 | C++ | 552 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
5af4ae7d60caeb44cd036074956bc0f9ede00eb63197e513377fb3234a1dc6bd | C++ | 552 | 18 | // (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
c7d061232be11ada7dd4fe6b12baf1586d6020f17598f4e4f595e6e3dd6d061d | C++ | 587 | 17 | /*******************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Anton Holmgren, Martin Rosvall
This file is part of the Infomap software package.
See file LICENSE_GPLv3.txt for full license details.
... |
85c768f393634138d3edec9fa389b23382752f71e24454fd6f61ce75c3b96a6d | C++ | 592 | 41 | #include "CmdMessenger.h"
CmdMessenger c = CmdMessenger(Serial, ',',';','/');
enum
{
double_ping, // expects three doubles
double_pong, // returns three doubles
};
void on_double_ping(void){
int i;
double value;
c.sendCmdStart(double_pong);
for (i = 0; i < 3; i++){
v... |
9363888d97d292ecb310b97f8fba187847befbc6e114a05120e991c10c2b3bf5 | C++ | 608 | 21 | // Copyright Vladimir Prus 2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_PROGRAM_OPTIONS_SOURCE
#include <boost/program_options/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namesp... |
9eb60a6210cd3ebd626f9db9cf812ce089a37e2b111f2d5e96dbc04aa168287d | C++ | 651 | 26 | #include "LIFImageFactory.h"
#include "LIFImage.h"
const LIFImageFactory LIFImageFactory::registerThis;
LIFImageFactory::LIFImageFactory() : MultiResolutionImageFactory("Leica LIF", { "lif" }, 0) {
}
MultiResolutionImage* LIFImageFactory::readImage(const std::string& fileName) const {
LIFImage* img = new ... |
6452dd2abfbcfe7bf96cb143d63578ee5edfe2719ce6bebee878624baf5d7b9f | C++ | 653 | 26 | #include "VSIImageFactory.h"
#include "VSIImage.h"
const VSIImageFactory VSIImageFactory::registerThis;
VSIImageFactory::VSIImageFactory() : MultiResolutionImageFactory("Olympus VSI", { "vsi" }, 0) {
}
MultiResolutionImage* VSIImageFactory::readImage(const std::string& fileName) const {
VSIImage* img = ne... |
18f2cc5b0b33a1bea47e0274797659645a3ce2a0a04b509d22a0596c9a2db650 | C++ | 683 | 23 | #include "QtAnnotationGroup.h"
#include "annotation/AnnotationGroup.h"
#include <QDataStream>
QtAnnotationGroup::QtAnnotationGroup(const std::shared_ptr<AnnotationGroup>& group, QObject *parent) :
QObject(parent),
_annotationGroup(group)
{
}
std::shared_ptr<AnnotationGroup> QtAnnotationGroup::getAnnotationG... |
e48103a59014814862851912a446b68f9063d6ad9e77e6342521df195c8923f2 | C++ | 698 | 26 | #include "OpenJP2ImageFactory.h"
#include "OpenJP2Image.h"
const OpenJP2ImageFactory OpenJP2ImageFactory::registerThis;
OpenJP2ImageFactory::OpenJP2ImageFactory() : MultiResolutionImageFactory("ASAP JP2", { "jp2"}, 1) {
}
MultiResolutionImage* OpenJP2ImageFactory::readImage(const std::string& fileName) const... |
d289dcbc34cc3aa93033b51142c58dc4859efa0786cd3fef2cc5dbb4149e2c87 | C++ | 729 | 27 | #include "GUI/WorklistWindow.h"
#include "GUI/CompositeWindow.h"
#include <QtWidgets/QApplication>
#include "ASAP/ASAP_Window.h"
using namespace ASAP;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// Creates the composite window, that'll hold all other required tabs
CompositeWindow ... |
be04ff3db297f630e2234c7566c42083fd0c2bc0e06a6983bb3294de7f683b92 | C++ | 732 | 24 | // (C) Copyright Gennadiy Rozental 2006-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
007c90bd205200f41a18f3aabaa82f471b2175a4bc82f0f8bf95590b3f00b180 | C++ | 751 | 29 | #include "TIFFImageFactory.h"
#include "TIFFImage.h"
#include "tiffio.h"
const TIFFImageFactory TIFFImageFactory::registerThis;
TIFFImageFactory::TIFFImageFactory() : MultiResolutionImageFactory("ASAP TIF", {"tif", "tiff"}, 0) {
TIFFSetWarningHandler(NULL);
TIFFSetErrorHandler(NULL);
}
MultiResolution... |
1bc02c50c7d3c591ba7468411de2510b9e9e278b3d82c0031ae145ba0bbaa3a3 | C++ | 791 | 28 | #include "CmdLineProgressMonitor.h"
#include "ProgressDisplay.hpp"
CmdLineProgressMonitor::CmdLineProgressMonitor() : ProgressMonitor(), disp(NULL)
{
}
CmdLineProgressMonitor::~CmdLineProgressMonitor() {
if (disp) {
delete disp;
disp = NULL;
}
}
void CmdLineProgressMonitor::setProgress(cons... |
87d595bf50c11f9a1c7fb6e4347f17801ee4c73c429fcf96080cb16a47a8e8ba | C++ | 805 | 54 | #include "thread.hh"
#include <stdio.h>
#include <string.h>
pthread_mutex_t Thread::_file_mutex;
void
Thread::static_initialize()
{
pthread_mutex_init(&_file_mutex, NULL);
}
void
Thread::static_uninitialize()
{
pthread_mutex_destroy(&_file_mutex);
}
Thread::Thread()
{
}
Thread::~Thread()
{
}
int
Thread::creat... |
9f9b7b0630ec4c2370193e7ef02dda1c7ddf46fb462a31c4bff251f272ea7506 | C++ | 807 | 47 | #include "CmdMessenger.h"
/* Basic test code for sending multiple values back and forth with a * format. */
CmdMessenger c = CmdMessenger(Serial, ',',';','/');
enum
{
multi_ping, // expects some number of longs
multi_pong, // expects some number of longs
};
void on_multi_ping(void){
int... |
2e9fa7b035bb5ba3fe891b5d731c1d4a0155a1e9b5f082393f2a76fcf8b8f259 | C++ | 811 | 29 | #include "OpenSlideImageFactory.h"
#include "OpenSlideImage.h"
OpenSlideImageFactory::OpenSlideImageFactory() : MultiResolutionImageFactory("OpenSlide Formats", { "svs", "tif", "tiff", "mrxs", "vms", "vmu", "ndpi", "scn", "svslide", "bif" }, 1) {
}
MultiResolutionImage* OpenSlideImageFactory::readImage(const st... |
8c065fc79b458a2ff7df350213ad0fa7e798442066dcb402284983b5426d8187 | C++ | 839 | 26 | /*******************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Anton Holmgren, Martin Rosvall
This file is part of the Infomap software package.
See file LICENSE_GPLv3.txt for full license details.
... |
fb7531966c4b3af3012f347e4184248885e49795b164f6877dc8b0cf7967b52b | C++ | 862 | 30 | #include <Python.h>
#include <torch/script.h>
#include <pybind11/pybind11.h>
namespace py = pybind11;
#include "cpu/relabel_cpu.h"
#ifdef _WIN32
PyMODINIT_FUNC PyInit__relabel(void) { return NULL; }
#endif
std::tuple<torch::Tensor, torch::Tensor, torch::optional<torch::Tensor>,
torch::Tensor>
relabel_one_h... |
743bc876e1f89fadc0c50da0dffd2bc59522b2df67406e2dbdebeaa487fd86c8 | C++ | 864 | 32 | #include "igraph_error.h"
#include "defs.hh"
/*
Copyright (c) 2003-2021 Tommi Junttila
Released under the GNU Lesser General Public License version 3.
This file is part of bliss.
bliss is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as pu... |
b7c1153b298137931c91f053d6d57319ca2e082ae48254fa6750c6007467f411 | C++ | 864 | 36 | #include "DICOMImageFactory.h"
#include "DICOMImage.h"
#include "dcmtk/dcmjpeg/djdecode.h"
DICOMImageFactory::DICOMImageFactory() : MultiResolutionImageFactory("DICOM Formats", { "dcm" }, 2) {
DJDecoderRegistration::registerCodecs();
}
DICOMImageFactory::~DICOMImageFactory()
{
DJDecoderRegistration:... |
25e92f703bee8ebeb75181ae8f0e64f76059827c57dc483331e5539fa95c9631 | C++ | 873 | 31 | #include "Infomap-igraph-interface.h"
namespace infomap
{
void igraphToInfomapNetwork(infomap::Network& network, const igraph_t* graph,
const igraph_vector_t *e_weights, const igraph_vector_t *v_weights)
{
unsigned int numNodes = static_cast<unsigned int>(igraph_vcount(graph));
unsigned int numLinks = static_cast<u... |
9e1b30f20866beaa19b43da92719b480e17fd271494c79c0f9de87b5f4472988 | C++ | 889 | 44 | /*
* BSD 3-Clause License
*
* Copyright (c) 2016-2021, UniFrac development team.
* All rights reserved.
*
* See LICENSE file for more details
*/
#include "stripemap.h"
using namespace su;
StripeMap::StripeMap(uint32_t _n_samples)
: stripe_map()
, n_samples(_n_samples)
{
n_stripes = (n_samples + 1) / 2;
... |
0fb0e55a6f3973b257758ef72e9ebb7b9740cbba3b49143dd1f857ef103108f1 | C++ | 969 | 46 | /* Abstract class for a hardware interface
* ---------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "Interface.h"
#include "send.h"
Interface::Interface(const char* type, const char* name)
: name(name)
, type(type) {
}
char* Interface::get_type() {
return type;
}
c... |
db55eac10ce995cfd2b8cec9c03fbb4156608c2a68149f606fd43d30f4547c96 | C++ | 1,038 | 32 | // Copyright (c) 2021 PaddlePaddle Authors. 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
//
// Unless requir... |
f989abed28b9ba657d7714c257561cd2b48fd09062cc3817f5fc0008c1e79238 | C++ | 1,045 | 49 | #include "ProgressMonitor.h"
#include <iostream>
ProgressMonitor::ProgressMonitor() : _status(""), _progress(0), _maxProgress(100)
{
}
ProgressMonitor::~ProgressMonitor() {
}
void ProgressMonitor::setProgress(const unsigned int& progress) {
if (progress > _maxProgress) {
_progress = _maxProgres... |
06ba580acf8ef55f938b9da0baceb8a7aee5d1cf7a3814d80be42b2ca69cdf2e | C++ | 1,071 | 32 | #include "SplineAnnotationTool.h"
#include <QAction>
#include <QPixmap>
#include <QIcon>
#include <QApplication>
#include <QStyleHints>
#include "AnnotationWorkstationExtensionPlugin.h"
#include "../PathologyViewer.h"
SplineAnnotationTool::SplineAnnotationTool(AnnotationWorkstationExtensionPlugin* annotationP... |
0df387ef0510e1407a3c9049a4f4a8cbb2661429646cf5f51098b7800c7102c4 | C++ | 1,088 | 45 | /* Interface for a single digital output pin
* -----------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "LineInterface.h"
#include "send.h"
LineInterface::LineInterface(JsonVariant conf)
: ToggleInterface("line", strdup(conf["name"])) {
if (!conf.containsKey("pin")) {
... |
0f522dbbbf9b547687659b30af000857e36a57c7bb3e4086659d2e33e47fe672 | C++ | 1,103 | 51 | #include "AnnotationBase.h"
#include "AnnotationGroup.h"
#include "psimpl.h"
#include <limits>
AnnotationBase::AnnotationBase() :
_name(""),
_color("#F4FA58"),
_modified(true)
{
}
AnnotationBase::~AnnotationBase() {
}
std::string AnnotationBase::getColor() const {
return _color;
}
void An... |
ceb5a5661b47440067e88860def814f7a764480bad4767ff19fe2d693f5e21f0 | C++ | 1,130 | 39 |
#include <torch/extension.h>
#include <defs.h>
torch::Tensor match_template(torch::Tensor array, torch::Tensor temp, TMMethod method) {
CHECK_INPUT(array);
CHECK_INPUT(temp);
CHECK4D(array);
CHECK3D(temp);
return match_template_cuda(array, temp, method);
}
torch::Tensor ccl(torch::Tensor array) ... |
6b1527af7534f49de5033094474acb82243de6d4209047ab57e69c57b36dff8f | C++ | 1,140 | 51 | #include "ImageSource.h"
using namespace pathology;
ImageSource::ImageSource() :
_spacing(),
_samplesPerPixel(0),
_colorType(ColorType::InvalidColorType),
_dataType(DataType::InvalidDataType),
_isValid(false)
{
}
ImageSource::~ImageSource() {
}
void ImageSource::swap(ImageSource& first, Im... |
690bc43139f336fbe504a2d825544b01bb2bc78640bd7d14f70c3aa923830f15 | C++ | 1,141 | 47 | #include "PanTool.h"
#include <QAction>
#include <QApplication>
#include <QStyleHints>
#include "../PathologyViewer.h"
void PanTool::mouseMoveEvent(QMouseEvent *event) {
if (_viewer) {
if (_viewer->isPanning()) {
_viewer->pan(event->pos());
event->accept();
}
}
}
void PanTool::m... |
c7f944fa3397c7dadf735269ae78bb3e36b275dec6699633313a5cc028f023cc | C++ | 1,166 | 45 | #include <Python.h>
#include <torch/script.h>
#include <pybind11/pybind11.h>
#ifdef WITH_CUDA
#include "cuda/sync_cuda.h"
#endif
#ifdef _WIN32
PyMODINIT_FUNC PyInit__async(void) { return NULL; }
#endif
void synchronize() {
#ifdef WITH_CUDA
synchronize_cuda();
#else
AT_ERROR("Not compiled with CUDA support");
#en... |
f48c9b6f4da7efa50507fb6f8ca64f06d5145bdcd88876f4e3a0a808bae9be12 | C++ | 1,184 | 35 | // Copyright (c) 2021 PaddlePaddle Authors. 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
//
// Unless requir... |
792dc624b30106d065e141f2abc1f8e961a557c333b1c182e4a82a8aca4d885b | C++ | 1,210 | 37 | /**
* Copyright (c) 2020 CCS/GMRV/URJC/UPM.
*
* Authors: Juan P. Brito <juanpedro.brito@upm.es>
* Juan Jose Garcia Cantero <juanjose.garcia@urjc.es>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 3.0 a... |
0afb7ffe2cb04941842456a3cc93461e1add907fcf9bde46b699ac0efa2e119d | C++ | 1,212 | 39 | /**********************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Martin Rosvall
For more information, see <http://www.mapequation.org>
This file is part of Infomap software package.
Infomap s... |
6c3e40dfbd9e679fea3e99d45cf5e1b3000946f5e231e410ecbbc29d9e5a22c8 | C++ | 1,213 | 34 | #include "Infomap.h"
namespace infomap {
Infomap *NewInfomap(const char *flags) { return new Infomap(flags); };
void DestroyInfomap(Infomap *im) { im->~Infomap(); };
void InfomapAddLink(Infomap *im, unsigned int sourceId, unsigned int targetId, double weight) {
im->addLink(sourceId, targetId, we... |
1111bbe6d256e0ba40e99d5061952214aee74b5c2989267ad8d0cd7468366d41 | C++ | 1,287 | 51 | // Copyright Vladimir Prus 2002-2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
/* The simplest usage of the library.
*/
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#incl... |
b7dc3cef8672c93467c80b5e5aa9335a8ab99497fd88e805a7579eb88d7e2d8b | C++ | 1,301 | 47 | #include "UnitTest++/UnitTest++.h"
#include "UnitTest++/XmlTestReporter.h"
#include "UnitTest++/TestReporterStdout.h"
#include "TestData.h"
#include <iostream>
#include <fstream>
#include "config/ASAPMacros.h"
using namespace std;
int main(int argc, char* argv[])
{
std::cout << "TestRunner v" << ASAP_VE... |
87e7b8da410edc813570d827bfc40bcc83d0905f7eb649203226d1a4b5600b60 | C++ | 1,322 | 58 | /*
* BipartiteClusterReader.cpp
*
* Created on: 25 maj 2015
* Author: Daniel
*/
#include "BipartiteClusterReader.h"
#include <sstream>
#include "convert.h"
#ifdef NS_INFOMAP
namespace infomap
{
#endif
/**
* Read bipartite cluster data, where node id:s are prefixed
* by 'n' for ordinary nodes and 'f' fo... |
585050c3a069ca4850ccef16604b012a4d41371a1c2f13d086e110ee54d605e3 | C++ | 1,323 | 63 | #include <memory>
#include "FilterBase.h"
#include "core/ProgressMonitor.h"
FilterBase::FilterBase() : _cancel(false), _running(false) {
}
FilterBase::~FilterBase()
{
};
FilterBase::FilterBase(const FilterBase& other) : _monitor(other._monitor), _cancel(other._cancel) {
}
FilterBase& FilterBase::ope... |
9aa6cbf793146e06756cfd36032dff60e1af0a20bbc5264e838bba6d101745af | C++ | 1,329 | 45 | #include <cstdio>
#include <cstring>
#include <cstdlib>
#define cimg_display 0
#include "CImg.h"
#include <sys/time.h>
#include <ctime>
#include "bilateral_filter_cpu.h"
#include "utils.h"
using T = double;
int main(int argc, char **argv) {
if (argc < 5) {
printf("Usage: ./test_bilateral_cpu <input file> ... |
5d38f74f74034cdcdca3e01a64ee2e2e9b7e4221741bb4d86b47e444f5a9716e | C++ | 1,338 | 43 | #include "DotAnnotationTool.h"
#include "DotQtAnnotation.h"
#include <QAction>
#include <QApplication>
#include <QStyleHints>
#include "../PathologyViewer.h"
#include "AnnotationWorkstationExtensionPlugin.h"
#include "core/Point.h"
DotAnnotationTool::DotAnnotationTool(AnnotationWorkstationExtensionPlugin* ann... |
fb01ec60fa6268f33b499d6ef3882ae5326beafa2e781175c8947f71d9edf8b9 | C++ | 1,346 | 58 | /**
* @file prpack_utils.cpp
* An assortment of utility functions for reporting errors, checking time,
* and working with vectors.
*/
#include "prpack_utils.h"
#ifdef PRPACK_IGRAPH_SUPPORT
#include "igraph_error.h"
#else
#include <iostream>
#endif
#include <string>
using namespace prpack;
using namespace std;
#... |
ef66f2ced28693bc9c20fe871f845e47bc9b8d3a90001ce3fe5e4b86cd4a6177 | C++ | 1,355 | 53 | // Copyright Vladimir Prus 2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_PROGRAM_OPTIONS_SOURCE
#include <boost/program_options/config.hpp>
#include <boost/program_options/positional_optio... |
a4abee4c95429addedbaf36413cfd5c72cdcd06f9f0fb7fd0961aa637afe9819 | C++ | 1,456 | 59 | /* Interface for the EVNICE feeder library
* ---------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "FeederInterface.h"
FeederInterface::FeederInterface(JsonObject conf)
: Interface("feeder", strdup(conf["name"].as<const char*>())) {
if (!conf.containsKey("pins")) {
... |
10ac5139691454deb7e2d8af940d54e143375f47a602c0a5a1a43dd86145ed35 | C++ | 1,501 | 60 | #include <vector>
#include "utils.hh"
/* Allow using 'and' instead of '&&' with MSVC */
#if _MSC_VER
#include <ciso646>
#endif
/*
Copyright (c) 2003-2021 Tommi Junttila
Released under the GNU Lesser General Public License version 3.
This file is part of bliss.
bliss is free software: you can redistribute it... |
613b2fc7bf4ca4250befd01184b3356fe4f7f7bc568587822e4b9f93a5dc0149 | C++ | 1,522 | 17 | #include <string>
#include <map>
#include <array>
#include "PathologyEnums.h"
namespace pathology {
std::map<std::string, LUT> DefaultColorLookupTables =
{
{ std::string("Background"), { {0, 1}, { { 0, 0, 0, 255 }, { 255, 255, 255, 255 } }, true } },
{ std::string("Normal"), { {0, 1}, { { 0, 0,... |
ddff2fbc25f2f049dbe8b7c19bfcb0c3d787cb44656072e307bdcdeb9be09ead | C++ | 1,525 | 49 | #include "PointSetAnnotationTool.h"
#include "QtAnnotation.h"
#include "AnnotationWorkstationExtensionPlugin.h"
#include <QAction>
#include <QPen>
#include <QGraphicsLineItem>
#include <QGraphicsItem>
#include <QApplication>
#include <QStyleHints>
#include "PointSetQtAnnotation.h"
#include "annotation/Annotat... |
6064c99f3b30427beb39d6ceb3a508d73b187d5feb443b5484587ad48b3f0416 | C++ | 1,535 | 68 | /* Arduino library for controlling a fish feeder (EVNICE EV200GW or similar).
* --------------------------------------------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "Arduino.h"
#include "Feeder.h"
Feeder::Feeder(int motor1, int motor2, int motor3, int motor4) :
ste... |
6a6dcba31a88b7c503db03c590f95f769deaa13299306ad0f3ab4477836b623d | C++ | 1,535 | 65 | /* Interface for Dallas Temperature devices such as DS18B20
* --------------------------------------------------------
* @author Tal Eisenberg <eisental@gmail.com>
*/
#include "send.h"
#include "DallasTemperatureInterface.h"
DallasTemperatureInterface::DallasTemperatureInterface(JsonVariant conf)
: Interface("da... |
d7740a4f24b3983289328cd0a6b061b212cac607032d05f95e0f4fb80b9d6bef | C++ | 1,567 | 51 | /*
igraph library.
Copyright (C) 2022-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
2ac585864555ed7a4b8976ccb1d955c85a6d1fb987d9d8f1143843758fd4b769 | C++ | 1,600 | 46 | // Copyright (c) 2021 PaddlePaddle Authors. 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
//
// Unless requir... |
e02516d21a84b68d2050ad23a31858b1cbe6f945ac3d0344e9138f71d4610e77 | C++ | 1,649 | 54 | /*
igraph library.
Copyright (C) 2021-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
700923b88cad0495551585c2e1d39245ba853cf76a7e39fc777d7b4a44016e90 | C++ | 1,708 | 55 | /**********************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Martin Rosvall
For more information, see <http://www.mapequation.org>
This file is part of Infomap software package.
Infomap... |
c3e6ac984b109d54a00ae724d40fdc8ea4fa4b100e06974043c32988557879d3 | C++ | 1,732 | 58 | /*
igraph library.
Copyright (C) 2022-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
fda4a742baa07ef9e48e426f8dfa37425c35f02eb00c4c5152bcf9e042621552 | C++ | 1,774 | 74 | // Copyright Vladimir Prus 2002-2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#if defined(_WIN32)
#include <string>
#include <vector>
#include <cctype>
#include <iostream>
#include <stdlib.h>
using name... |
fa1ab6e824459adf0b047909259defc8914c3ad09e17d19511fdb2b727889284 | C++ | 1,775 | 71 | #include "AnnotationService.h"
#include "AnnotationList.h"
#include "XmlRepository.h"
#include "NDPARepository.h"
#include "ImageScopeRepository.h"
AnnotationService::AnnotationService() :
_list(NULL),
_repo(NULL)
{
_list = std::make_shared<AnnotationList>();
}
AnnotationService::~AnnotationService... |
0829da9bfd9a29b55778db324073baee5d332f3355c9946773d86b1997c0c09a | C++ | 1,776 | 72 | /*
*
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
... |
b407e7ee65f26eee18df2e3b0565fd8bc157bd4fe0e7427595c79e12c594e53d | C++ | 1,783 | 50 | /*******************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Anton Holmgren, Martin Rosvall
This file is part of the Infomap software package.
See file LICENSE_GPLv3.txt for full license details.
... |
ea012dc8a6ef4a7b54741278c511b96e54c9bcfffe0ace8324bcfa64226faad7 | C++ | 1,783 | 68 | #include "ZoomTool.h"
#include <QAction>
#include <QApplication>
#include <QStyleHints>
#include "../PathologyViewer.h"
#include <iostream>
ZoomTool::ZoomTool() :
_zooming(false),
_accumZoom(0),
_prevZoomPoint(QPoint(0, 0))
{
}
void ZoomTool::mouseMoveEvent(QMouseEvent *event) {
if (_viewer && _zoomi... |
5cbcf2e620c70cf84212fa28a078cd1fb6fa720c82e6fb5f839d96ef8dbf70a1 | C++ | 1,794 | 61 | /*
igraph library.
Copyright (C) 2021-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
a3513690e3b9ada1a4d2abc6e926d9f542b8ec3b0a51c157aa70e9829f44fb8b | C++ | 1,795 | 43 | /*
igraph library.
Copyright (C) 2025 The igraph development team <igraph@igraph.org>
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 the Free Software
Foundation; either version 2 of the License, or (at your option) an... |
ae86277b1820c1ecd3dc61658f32949c354283241e915ff5b80428cc77fecf9e | C++ | 1,808 | 59 | #include <cstdio>
#include <cstring>
#include <cstdlib>
#define cimg_display 0
#include "CImg.h"
#include <ctime>
#include "utils.h"
#include "bilateral_filter_gpu.h"
int main(int argc, char **argv) {
if (argc < 5) {
printf("Usage: ./test_bilateral_gpu <image file> <output file> <spatial standard deviation> <col... |
86b95573fcffef68e62c147bebd4d83882535717275cbeeed07b9e635b0583e9 | C++ | 1,809 | 61 | /*
igraph library.
Copyright (C) 2021-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
81bc19857a4dee045e81d16c9a68c38dd40723778d6582659aaff9080d30963a | C++ | 1,829 | 61 | /*
igraph library.
Copyright (C) 2021-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
a5ecdbaff2d690c8f1fa5f8838d22b7913d1f9c428335b5ac61bcdebbee6fc34 | C++ | 1,838 | 63 | // Copyright Vladimir Prus 2002-2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
/** This example shows how to support custom options syntax.
It's possible to install 'custom_parser'. It will be invoke... |
f8027bf93c924a7d100eccf8e790119bf0e9e6797ed544763e2cbae09ced6e36 | C++ | 1,840 | 68 | // [[Rcpp::depends(RcppArmadillo)]]
# include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
// [[Rcpp::export]]
double CovRegOptim2C(NumericVector phi, const arma::mat& epsilon,
const arma::sp_mat& corMat_base1,
const arma::sp_mat& corMat_base2) {
double p... |
a3b81655814858f6ad465b0a6e166c70d3974f7c35f39beaa98d3bd07ed1bfa2 | C++ | 1,841 | 83 | /**
* Copyright (c) 2020 CCS/GMRV/URJC/UPM.
*
* Authors: Juan P. Brito <juanpedro.brito@upm.es>
* Juan Jose Garcia Cantero <juanjose.garcia@urjc.es>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 3.0 as publi... |
85431fc76b863d886e97218a3f23221a9c923ee66f04ab7157211d5ef1994495 | C++ | 1,848 | 56 | /*
igraph library.
Copyright (C) 2021-2022 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
e84fbae009a8ac978c4fca674d132a79d581527129b21cafb01831f04dcec28f | C++ | 1,872 | 54 | /**********************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Martin Rosvall
For more information, see <http://www.mapequation.org>
This file is part of Infomap software package.
Infomap s... |
e5fe2fe178d2eea1dd93807c302cbce82343a6a99b8fd7d290a17dcc88e3b64d | C++ | 1,898 | 56 | /*
igraph library.
Copyright (C) 2021-2024 The igraph development team
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... |
495ed785596d93f15aa9760ece648eedf6fd586ed53de2e1c3eff383299a5082 | C++ | 1,910 | 60 | // Copyright (c) 2022 PaddlePaddle Authors. 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
//
// Unless required... |
2e21a4962e35624958e0c1a04d9cb12508e75f5f155882d6a64c7bd151505f3c | C++ | 1,930 | 59 | #include "DotQtAnnotation.h"
#include "annotation/Annotation.h"
#include <QPainter>
#include <QStyleOptionGraphicsItem>
DotQtAnnotation::DotQtAnnotation(const std::shared_ptr<Annotation>& annotation, QObject *parent, float scale) :
QtAnnotation(annotation, parent, scale),
_rectSize(5.),
_rectColor(QColo... |
4d6030c0aa99b705a2d984f27d71c18ccca6fbe19047d8a07f0511eb2d273d09 | C++ | 1,945 | 62 | // Copyright (c) 2022 PaddlePaddle Authors. 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
//
// Unless required... |
bb582c6f20ab44b77ee920b31f5c9d539b8c350fb0db3775f8a68649569322cd | C++ | 1,958 | 64 | /**
* Copyright (c) 2020 CCS/GMRV/URJC/UPM.
*
* Authors: Juan P. Brito <juanpedro.brito@upm.es>
* Juan Jose Garcia Cantero <juanjose.garcia@urjc.es>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 3.0 as publi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.