sha256
stringlengths
64
64
language
stringclasses
25 values
size
int32
1
210k
lines
int32
1
9.41k
content
stringlengths
1
200k
e4db7b1e822a42902ba833e5901a859558f6df753a5240f1e73652caf314defb
C/C++
4,104
184
#ifndef MODEL_H #define MODEL_H #include <opencv2/core/core.hpp> #include <QMetaType> #include <QString> #include <QColor> #include <QStringList> #include <QVector> #include <QPointF> #include <vector> #include <set> #include <unordered_map> #include <memory> #include <variant> #if QT_VERSION < QT_VERSION_CHECK(5, 14...
57cf6cd941b4a807bcbe69d3555bcefd0dca0ec77f459ad77dac07b491f063d5
C/C++
4,128
156
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_OBJECT_WR...
48984d51983920fdc40bf1d8e37286ea4268104eb5a03a8aae1efd4f06ed7b1d
C/C++
4,175
118
#ifndef UTILS_H #define UTILS_H #include <QReadWriteLock> #include <QString> #include <QHash> #include <QMetaType> #include <unordered_map> #include <functional> struct GuiMessage { // modeled after QMessageBox QString text; QString informativeText = {}; enum { INFO, WARNING, CRITICAL } type = CRITICAL; }; struct...
7aa8b6151a0c051f49dbcd021b2ddc1cea29c2b315e3294e5d29a65f6537e621
C/C++
4,244
144
#ifndef DATASET_H #define DATASET_H #include "utils.h" #include "model.h" #include "proteindb.h" #include <QObject> #include <QFlags> #include <QMap> #include <QList> #include <set> #include <map> #include <memory> namespace annotations { class Meanshift; } class QTextStream; // a configuration that describes proc...
38464aff388cfe528d3cfcafa0edc577626d08a9f69356aade7d6d97546e5d66
C/C++
4,250
121
/* 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 ...
e3f9dc7caa0d326b1917f8bf671a5a874da30d346854e8b17e2b3b59fde042f5
C/C++
4,253
121
/* 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 ...
ca3b19c13bdbefbd2477a9aad07302c6c46c181f7ac9e38e7274c9666d5e4f9f
C/C++
4,649
162
/* 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 ...
f24fe1a99fe9ffd3b9858bbaf72642fbcb82843cc809894272d54ab52045ee7c
C/C++
4,652
162
/* 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 ...
c62d395afec5a2df976e43790c4f8f8c516a8d1b5b29aea27304aba91c2dd261
C/C++
4,748
130
/* 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 ...
8e3090f0c7b769d97dcece2515cd4be8fd633c66440c66ef99fb6323da8b9905
C/C++
5,641
197
/* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Temporary manual alteration to test dcm_pet */ /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you don't have `vprintf' but do have...
f2987bc88debb99943db5c3c253b5dce02f81fee602564ce0987e22789b672d3
C/C++
5,703
198
/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* #undef HAVE_DOPR...
db8990e9fd1c1fef3a354f9e8ecb0830a41be9ac5f6754af520252f513c046b9
C/C++
5,772
166
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_JSON_H_ #...
f502353164d1538f8059c2cf999e55fa462e38cdb15ae97f94af0aaed51e58d2
C/C++
6,157
242
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_PERSISTEN...
488072b67cc400f0c59bd81cf3ee316a17b7bdb114ed2690a809792d930b4fd7
C/C++
6,249
130
/* Copyright (C) 2010 Washington University */ /* Copyright marker. Copyright will be inserted above. Do not remove */ /* ** Neuro Imaging Laboratory ** Mallinckrodt Institute of Radiology ** Washington University School of Medicine ** ** Last Update: $Author: $ ** Source File: $RCSfile: ...
e977374d90ea3abd0a160bb149607990c52b52ca58eed98c35060b4e4db5a9ac
C/C++
6,438
190
/* constants */ #define NGRAY 4096 /* number of gray levels */ #define DY 256 /* y displacement = no. cols */ #define DY2 512 /* y displacement = no. cols */ #define DZ 65536 /* z displacement = no. 2D pixels */ #define M 1.5 /* power coefficient */ #define SPAN 15 ...
a128293f1802bbe309c11e2764f2a5d1fad9c7dd90eea9dbf7d046da481f8195
C/C++
7,161
268
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_MAYBE_PRE...
828197e9f3353e32cd3b52454c51a27ac4188b4bb4e1c71a6e99ce0fb83b1bb9
C/C++
7,357
207
#include "mex.h" #include <math.h> #include <string.h> /* 3D Point Structure */ typedef struct { int x; int y; int z; } point3d; /* Chamfer Mask Structure */ typedef struct { int x; int y; int z; double v; } mask; /* Bucket Structure */ typedef struct { point3d *pt; int size; ...
e6e43f7698b8ea7129013f41f22cf2980f1205163ab8c8a196e36c38514c30c1
C/C++
7,890
260
/* 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 ...
09bcabcf7d99588c375545a7e6862374e717f5bdd7f6387b2c76377863b7817b
C/C++
7,943
263
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_IMPLEMENT...
e06ce2cde16826c454691f8f310c3562ddc0d560f132db2fe61b3cb6dd29f101
C/C++
8,102
305
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modi...
c37108a5fa254b57f839eae7d1e5c545d52aace6638a07acfac0e1cc0f165812
C/C++
8,170
272
/* 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 ...
3decf3cb7dda896b3429f02181cac77cecebe73ecc9dc1d11c3e726d276c35bf
C/C++
8,241
287
///////////////////////////////////////////////////////////////////////////// // Name: fams.h // Purpose: fast adaptive meanshift class and struct // Author: Ilan Shimshoni // Modified by: Bogdan Georgescu // Created: 08/14/2003 // Version: v0.1 //////////////////////////////////////////////////...
ee50ee4833335788c1c2ceff53be9eceb4b593e1244fe7a35a545d11e8be4dfc
C/C++
8,384
377
// Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include <torch/types.h> namespace detectron2 { #if defined(WITH_CUDA) || defined(WITH_HIP) int deform_conv_forward_cuda( at::Tensor input, at::Tensor weight, at::Tensor offset, at::Tensor output, at::Tensor columns, at::Tensor o...
11fbc38eb49cb6f3c142022c5b47bccc6a18047ad7d509af011feee48f02d7fd
C/C++
8,786
340
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_NEW_H_ #d...
9a641b1f32dddee57894f8d91989e0cbe2b9e90c997f4b1a89b02ee447644e0f
C/C++
9,907
264
// morphology.h : Handles generation and storage of neuron positions. #pragma once #include "defines.cuh" #include <ANN/ANN.h> #define GLM_FORCE_RADIANS #include <glm/glm.hpp> #include "regions_tree.h" //! Morphology is an abstract class that supports morphology generation //! and operations such as union, ...
8540cf5a4652ce8c1b3e9f98aa277c0920c7778f4356545b73df70547b684a0b
C/C++
11,339
392
// Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include <cassert> #include <cmath> #if defined(__CUDACC__) || __HCC__ == 1 || __HIP__ == 1 // Designates functions callable from the host (CPU) and the device (GPU) #define HOST_DEVICE __host__ __device__ #define HOST_DEVICE_INLINE HOST_DEVICE __forcei...
16ddb5f6548415e61921e254de27f5acc6e5a02a061ea65498b816904df39f44
C/C++
12,330
264
/* 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 ...
f9f95d9ed8373585614cf11d8efc8fc80a0910af5a88191cee2fec45ca558ca4
C/C++
12,333
264
/* 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 ...
e79a940c0641672fcc463d5eb73e1fa017e5b7b2c13ec1d492ed98efb0830001
C/C++
12,375
356
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_MAYBE_43_...
7ddff7c5e82c601a6cab39785be4fc84d2f3513e0c2e731a90f5c9f3eb9b2546
C/C++
15,054
430
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_IMPLEMENT...
2303a6f5ba881d000511cf698adffd8bd8c448ba8fece209b9d503825cdd95f0
C/C++
15,354
437
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_WEAK_H_ #...
38d1d686ba458e3af2da8874b31d69672648830f173fa0b6367a83f54442c90f
C/C++
17,085
520
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_CALLBACKS...
312004e83ea9cc142952b7673dbd8ad69318dcd933e0edef6f572479faecbdd6
C/C++
17,388
477
/* 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 ...
8c1a2088333301f5ea3cf6f8c8d4d33ff3efc506163d85d6c175517f7618da1f
C/C++
17,536
514
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors * * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md> ********************************************************************/ #ifndef NAN_CALLBACKS...
16791e20a155545543927100e6ba9953db9bd244890ad96415042294bab8de77
C/C++
24,514
710
/* 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 ...
2b7bbb89afb97150f53d1afbd27a6a0f0387db4dd3151a98c1da24072f820ee3
C/C++
25,481
512
/*------------------------------------------------------------------------------------------------*/ // Project: Amplifier Windows Library /*------------------------------------------------------------------------------------------------*/ // Purpose: Harware access library for the Brain Products amplifiers // Auth...
f7a019211d8c6124a93bdb68abb3a7551bacaebd560ff707b31d0934d0746861
C/C++
25,526
514
// Copyright (C) 2019 Brain Products GmbH /*------------------------------------------------------------------------------------------------*/ // Project: Amplifier Windows Library /*------------------------------------------------------------------------------------------------*/ // Purpose: Harware access library...
b47cb0b6f0fd8ef4238ca226a0d04a6745b1d37e8ef5ce645a5c1bc0c6d0bb74
C/C++
70,273
1,521
/*$Header: /data/petsun4/data1/src_solaris/nifti_4dfp/RCS/nifti1.h,v 1.2 2010/06/18 21:00:59 coalsont Exp $*/ /*$Log: nifti1.h,v $ * Revision 1.2 2010/06/18 21:00:59 coalsont * added define checks to avoid __attribute__ on non-gcc compilers * * Revision 1.1 2009/07/08 00:56:33 coalsont * Initial revision **...
13ac73280e04365a24efce9187d908ab9790595292635fe722a72bdeb8142845
C/C++
88,149
2,898
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2018 NAN contributors: * - Rod Vagg <https://github.com/rvagg> * - Benjamin Byholm <https://github.com/kkoopa> * - Trevor Norris <https://github.com/trevnorris> * - Nathan Rajl...
0433e22d3bc01602b359cdd42d24d17dffbcb86b691a626f3499bdf7c7c088a4
C/C++
94,998
1,704
/* 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 ...
52c179cc8d338c4186d645a87d2223f95eadfcad0284cf8f8003c2c5a18bd02a
C/C++
95,000
1,704
/* 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 ...
987c697291f07794cddf441a0d7b5fed718654912917d5d26052be65bc8de813
CUDA
622
26
// Copyright (c) Facebook, Inc. and its affiliates. #include <cuda_runtime_api.h> namespace detectron2 { int get_cudart_version() { // Not a ROCM platform: Either HIP is not used, or // it is used, but platform is not ROCM (i.e. it is CUDA) #if !defined(__HIP_PLATFORM_AMD__) return CUDART_VERSION; #else int versi...
a84cc2f9a04dbc2ba2accabd9b210bbc0877068ebe83a4808c477226b583676d
CUDA
1,965
66
#include "defines.cuh" #include <ctime> std::default_random_engine& RandomEngineFixedSeed(int seed) { // This random engine is seeded with the same value every time. // This means that randomness will be THE SAME between runs. static std::default_random_engine gen(seed); return gen; } std:...
896ea23f033cd45af459c45e8c6727be2edae3b9099a2f169bd6a2952f138d03
CUDA
4,454
130
// Copyright (c) Facebook, Inc. and its affiliates. #include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #include "box_iou_rotated_utils.h" namespace detectron2 { // 2D block with 32 * 16 = 512 threads per block const int BLOCK_DIM_X = 32; c...
8f14408b42307d21f338ab490307ed8fb87293e66d1fea8042ff4501c00f502e
CUDA
4,648
126
#include "electrode_net.cuh" inline __global__ void electrodes_measure_kernel ( int const N_regions, int const* regions, int const* region_offsets, Float* output, Float const* V, int* firing_per_region, int const* is_firing) { for (int tid = blockIdx.x * blockDim.x + threadI...
1176f9223426e87efd32eab0a5517932be1b05ea5add318460bdeac15fdf79b2
CUDA
4,859
145
// Copyright (c) Facebook, Inc. and its affiliates. #include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #ifdef WITH_CUDA #include "../box_iou_rotated/box_iou_rotated_utils.h" #endif // TODO avoid this when pytorch supports "same directory" hi...
6f9b4a1037f289403cbcb2af0eb351b2de69d4616cbcf01b9c6f8cecd2a5d2cd
CUDA
4,912
117
#include "mouse_cortex.cuh" //std::string MouseCortex::excitatory_conns_file_name = "isocortex_rho_1000_new.h5"; //std::string MouseCortex::conns_file_name = "Isocortex_hemisphere_675K_rho299_new.h5"; //std::string MouseCortex::inhibitory_conns_file_name = "Isocortex_hemisphere_675K_rho299_new.h5"; //int MouseCor...
2b56694ee58f2ffb74e38b58ccfe598e724f681987294bafab669cc07ec38ee0
CUDA
5,449
148
#include "coupling.cuh" Float AtomicCoupling::threshold = 0.01; AtomicCoupling::AtomicCoupling(int const N, AdjacencyList& list_, Float* downstream_inputs_, Float* neuron_outputs_) : list{}, downstream_inputs{ downstream_inputs_ }, neuron_outputs{ neuron_outputs_ }, is_firing(N, 0), firing_neurons(N, -1) { ...
6275ae03f9741aadb64c3d2ca86c9ef47ea75662c12d6819021481b57b650625
CUDA
8,868
265
#define _USE_MATH_DEFINES #include "network_factory.cuh" #include <unordered_set> AdjacencyList Network::ToAdjacencyList(Float*& Tcount, Float const* EI_INFO, Float ei_network, bool use_weights) const { // Generate coupling AdjacencyList list; list.indices = indices; list.offset_in_indices = offset_...
faa034abf9fe31405d01b4ba635e047bc78b327cc4e5f71e5372717fd499ef1a
CUDA
13,080
526
// Copyright (c) Facebook, Inc. and its affiliates. #include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <ATen/cuda/CUDAApplyUtils.cuh> // TODO make it in a common file #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + ...
477940208dce6e0aebc14a4035e8c9beb8c821217a9d75d8649c51201e9cccbd
CUDA
13,914
445
// Copyright (c) Facebook, Inc. and its affiliates. #include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <ATen/cuda/CUDAApplyUtils.cuh> // TODO make it in a common file #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + ...
ed26badc63412ae1b257bb19a09bb0f34aa5ce0a7691b77da8049816e260be1a
CUDA
19,318
403
#include "ephys.cuh" # define M_PI 3.14159265358979323846 /* pi */ Ephys::~Ephys() { for (Float*& dev_ptr : sim_vars_cpu) cudaFree(dev_ptr); } HHEphys::HHEphys(int const N_) : Ephys(N_, HH::leapfrog_dt) { using namespace HH; // Set up simulation variables. Stored in a str...
0a514d7ba944af3663386dd224fbc3698fc9a79474fb5b9bbda5e311de2f4eb2
CUDA
28,036
626
#include "mouse_cortex.cuh" #include <set> #include <glm/gtx/norm.hpp> #include <glm/gtc/type_ptr.hpp> #include "regions_tree.h" #include <iostream> #include <sstream> #include <string> #include <thrust/random.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/iterator/zip_iterator.h> #includ...
a10f559b9664f83de2da3096a07994f104c4cea4e36b18cd8b00fed039b32ed1
CUDA
31,785
1,223
// Copyright (c) Facebook, Inc. and its affiliates. // modified from // https://github.com/open-mmlab/mmdetection/blob/master/mmdet/ops/dcn/src/deform_conv_cuda.cpp // Original license: Apache 2.0 // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/defo...
22bffd1646514554fe7eb375e1687e40c1e8d652f544be57701cc7ee7364f147
CUDA
44,282
1,288
// Copyright (c) Facebook, Inc. and its affiliates. // modified from // https://github.com/open-mmlab/mmdetection/blob/master/mmdet/ops/dcn/src/deform_conv_cuda_kernel.cu // Original license: Apache 2.0 // clang-format off // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetect...
67c77321609f560a447e30bcf7f2593084e019d68dfcf8969b67ca78cb5e07df
Go
170
10
package settings import ( "fmt" "path/filepath" ) func executableForPid(pid int) (string, error) { return filepath.EvalSymlinks(fmt.Sprint("/proc/", pid, "/exe")) }
2bc078e3b8407d571890d59e73ea89c074f9a7fcfa23dbff65c7fd402df0a5f3
Go
220
10
package fastq var INVALID_SAMPLE_INDEX = []byte("X") const READ1_TYPE = "R1" const READ2_TYPE = "R2" const INTERLEAVED_READ_TYPE = "RA" const INDEX1_TYPE = "I1" const INDEX2_TYPE = "I2" const DUAL_INDEX_TYPE = "I1_I2"
a606b945d6b761f7e223f0c2659d772defb3eac451687e965c0b256177405ac3
Go
225
11
package collector func MakeFileSize(paths []string, isCount bool) ValueExtractor { // TODO panic("not implemented") } func MakeFileSizeFlag(flag string, isCount bool) ValueExtractor { // TODO panic("not implemented") }
930900ad96459406b58cd90f889ea711041e88de32e39ddc37568ed16041c83a
Go
435
17
package collector // #include <gnu/libc-version.h> import "C" import "context" type glibcExtractor struct{ simpleExtractor } func (glibcExtractor) MarshalJSON() ([]byte, error) { return []byte(`{"special":"glibc"}`), nil } // Start implements ValueExtractor. func (glibcExtractor) Start(_ context.Context, _ ValueCo...
bd72fc63c5165b62b2f8e031373abd83d95aa594ea0c9f8aabb8aca4202c4b95
Go
579
31
package collector import ( "context" "encoding/json" "os" ) type envExtractor struct { simpleExtractor varName string } func (e *envExtractor) MarshalJSON() ([]byte, error) { b, err := json.Marshal(e.varName) if err != nil { return nil, err } return append(append([]byte(`{"env":`), b...), '}'), nil } fun...
e8a4e4449bcb05d9347d2eb45489f4eca19dc297d9864d796073f6751f729834
Go
648
35
package converter import ( "encoding/json" "fmt" "github.com/10XDev/cellranger/lib/go/multi_csv" ) type Converter interface { json.Marshaler Convert(b []byte) ([]byte, error) } type multicsv struct{} func (multicsv) Convert(b []byte) ([]byte, error) { return multi_csv.ConvertMultiConfig(b) } // MarshalJSON ...
0b26f8dceb39169804a89586fec3f6e36ded2c80e78131abcbe73ef04e4ec04d
Go
687
29
package collector import "context" // MakeRecentCounter returns a ValueExtractor to count recent events // from the given group. func MakeRecentCounter(group string) ValueExtractor { return &recentCountExtractor{groupName: group} } type recentCountExtractor struct { simpleExtractor groupName string } func (recen...
6a4adffc6317742b140d33de16c1451e0c212ef0a3aba628acc6a1c688c872cf
Go
867
48
package collector import ( "context" "encoding/json" "golang.org/x/sys/unix" ) type rlimitCollector struct { simpleExtractor resource int hard bool } func (r *rlimitCollector) MarshalJSON() ([]byte, error) { return json.Marshal(struct { Res int `json:"rlimit"` Hard bool `json:"hard,omitempty"` }{ ...
7a79fa84b832800fd46ca931502f66593632512c0563f3d65698b87adb01f8f6
Go
1,076
42
// Copyright (c) 2024 10x Genomics, Inc. All rights reserved. // Command sitecheck generates a telemetry report about a system's capabilities. // // Use care when making changes here, to avoid collecting privacy-sensitive // information. // // Also, avoid making changes to the formatting of the output, as we have tool...
957d4c56e707afb08aef1f1a798b475f88f34b7242f730774d62187e2f4e8062
Go
1,192
59
package collector import ( "context" "encoding/json" "os" "strings" ) type flagExtractor struct { simpleExtractor flag string mro bool } func (f *flagExtractor) MarshalJSON() ([]byte, error) { b, err := json.Marshal(f.flag) if err != nil { return nil, err } if f.mro { return append(append([]byte(`{"m...
9158fef8db339939deb99b7867ce65d147478d7a6bbf2a3356b13b0cdd067fa3
Go
1,309
68
package fastq import ( "container/list" ) type OrderedMapElement struct { value interface{} key string } type OrderedMap struct { m map[string]*list.Element l list.List } func (m *OrderedMap) Init(size int) { m.l.Init() m.m = make(map[string]*list.Element, size) } func (self *OrderedMap) HasKey(key string...
6e37d18b0322c5a53b73b226e3f2f85cd5b58930a8ac62d50601721ff05e21a2
Go
1,737
65
// Package multi_csv allows conversion from multi config csv to json. // // It is implemented as a go binding to the rust code. package multi_csv /* long long convert_multi_config( char *buffer, unsigned long buf_len, const char *input, unsigned long input_len ); */ import "C" import ( "fmt" "runtime" "unsafe" ...
2c2ec71b19e590a5d6bc9a2a34a57d86d57dc85f2a4bffc4570518aedafcf764
Go
1,761
62
// https://play.golang.org/p/ZdFpbahgC1 // Go's `math/rand` package provides // [pseudorandom number](http://en.wikipedia.org/wiki/Pseudorandom_number_generator) // generation. //go run scripts/atomtest.go //81,87 //0.6645600532184904 //7.1885709359349015,7.123187485356329 //27,98 //5,87 //5,87 package main import "t...
20097e7f3ac0ce991f360201b5decae4bb2f7467ac78631476e9702d1cc19912
Go
1,884
91
package collector import ( "fmt" "regexp" "strings" ) type FileFilter interface { // We've only got two implementations of this // interface, and we want to keep them private to // this package, because to be efficient, they // have to be special-cased regardless. isJson() bool } type JsonPathFilter []string...
835ee4e739945bccfd511b778fbf83f2eb5c8ff7a78d94c323ff17da8f0a1b24
Go
1,920
86
package settings import ( "errors" "fmt" "io/fs" "os" "os/user" "path" "path/filepath" "time" ) // CacheDir returns the path to the directory containing previously // collected data. func CacheDir() (string, error) { c, err := os.UserCacheDir() if err != nil { // os.UserCacheDir can fail if $HOME isn't se...
4a26429c139504dc525432c551df57c54a60e6eb18aa7defaf5bff0ca549f0bb
Go
2,059
96
package config import ( "bytes" "encoding/json" "sort" ) // In a few places, for convenience we allow // either a list or a string, where we want the string // to be interpreted as a singleton list. type StringOrList []string func (sl *StringOrList) UnmarshalJSON(b []byte) error { if len(b) == 0 { *sl = nil ...
0e8542d7d96c5c88fb90cb069734b62e6f84bff84cbdbb960381544ee66f91be
Go
2,288
97
// Command telemetry_converter is used to convert from yaml to json. // // It will also validate the config file. // // The command does not accept any command-line flags. // It reads from stdin and writes to stdout. package main import ( "bytes" "encoding/json" "flag" "fmt" "io" "os" "strconv" "time" "githu...
47647d48b3eba810d0f0517addffc8f30bbbc9778c228e141e44301a93a2bba8
Go
2,821
90
package collector import ( "context" "encoding/json" "time" ) // This allows e.g. command line flags to be passed in to // the value extractor. type ValueContext interface { CommandLine() []string MroFlags() []string PipestanceDir() string Runtime() time.Duration MrpHasRun() bool Success() bool RecentCount(...
bace2891f81587ada4e0ee911ba2e7dddefb8563b140a6cd3c82ec6720f0cafc
Go
3,069
154
package collector import ( "bytes" "context" "encoding/json" "os" "path" "runtime/trace" ) func doCgroups(ctx context.Context, requests map[string][]cgroupRequest, mounts <-chan map[string]string) { defer trace.StartRegion(ctx, "doCgroups").End() groupFile, err := os.ReadFile("/proc/self/cgroup") if err != ...
2ec64a60466a8efd2091d8624b767f264fc87a2cf9a739363a5b754c5150ab7b
Go
3,092
124
package collector import ( "context" "io/fs" "golang.org/x/sys/unix" ) type fileResult struct { info fs.FileInfo fullPath string relPath string } type errorFile struct { path string content string } type cgroupRequest struct { result chan<- []byte names []string } // In order to facilitate havi...
e1d325aceb45388ce27fa72469c6a0cd839f1346c876e0315aab073989be652f
Go
3,103
98
package config import ( "time" ) type Config struct { ConfigVersion int `json:"config_version"` ConfigTime time.Time `json:"config_version_time"` Product string `json:"product"` Version string `json:"versio...
48f2156457fdde52f5e256008276a81efa9a1123aef154002d4a97be1bd1ae97
Go
3,166
131
// Package value_context parses the command line for the telemetry tool. // // The results are used to provide context for collection of telemetry // information. package value_context import ( "flag" "os" "strings" "sync" "time" "github.com/10XDev/cellranger/lib/go/telemetry/collector" "github.com/martian-lan...
3a974f85e571e8a6fb97e81239c626d9717028ef5b0689e1449151a216e3352e
Go
3,403
121
package collector import ( "context" "encoding/json" "fmt" "sort" "github.com/martian-lang/martian/martian/core" "github.com/martian-lang/martian/martian/syntax" ) // A collector that parses the _perf file and emits top N stage metrics. // // Reports the top 5 stages in terms of wall time (longest fork), RSS /...
7b973262f3adb25dcda132ca0e7a880ea4fe7087ee83435a14abad7d4dd021e4
Go
4,336
185
package collector import ( "bytes" "context" "fmt" "path" "regexp" "strings" "golang.org/x/sys/unix" ) func MakeSpecial(name string) (ValueExtractor, error) { switch name { case "glibc": return glibcExtractor{}, nil case "kernel": return kernelExtractor{}, nil case "subcommand": return new(subcomman...
d679683d6d227f974404e48252e248f7844c39a753a44fb630c0b64654a55247
Go
4,347
210
package collector import ( "bytes" "context" "io" "os" "path" "path/filepath" "strings" "github.com/google/shlex" ) type distroExtractor struct{ noBucketsExtractor } func (distroExtractor) MarshalJSON() ([]byte, error) { return []byte(`{"special":"distro"}`), nil } func (d *distroExtractor) Start(ctx cont...
40a7edfb3c0a18a795f9c98c311e67b33fc4a24c5b95c3fd8fc8348a379d83eb
Go
5,256
196
// Copyright (c) 2024 10x Genomics, Inc. All rights reserved. // Package sitecheck implements a function for generating sitecheck telemetry file. package sitecheck import ( "context" "fmt" "io" "os" "sort" "sync" "time" ) type siteCheckSection struct { // Title of the section, e.g. "System Information" Sect...
70d1e466402509031602bc62b30e431a870eaa663ecbc47461a87f0055acaa6a
Go
5,791
229
// Package event defines a telemetry event type and code for collecting them. package event import ( "context" "fmt" "io" "io/fs" "maps" "os" "runtime/trace" "sort" "sync" "github.com/10XDev/cellranger/lib/go/telemetry/collector" "github.com/10XDev/cellranger/lib/go/telemetry/config" ) type Event struct {...
d0450eb7fac2007f1631ac73bb752868e01d0b804f3a8ad205c9284c11789655
Go
7,100
269
package config import ( "errors" "fmt" "path" "strings" "unicode" "unicode/utf8" "github.com/10XDev/cellranger/lib/go/telemetry/collector" "github.com/10XDev/cellranger/lib/go/telemetry/converter" "golang.org/x/sys/unix" ) func getSpecialSource(name string) (ValueExtractor, error) { return collector.MakeSp...
75c20b1696ecfd61e15d3192456646d11bcebd6c4fb449587dae5291509c297b
Go
7,706
339
package collector import ( "bufio" "bytes" "context" "encoding/json" "os" "path" "runtime/trace" "strconv" "strings" "sync" "syscall" "golang.org/x/sys/unix" ) func doStatfs(ctx context.Context, p string, cs []chan<- unix.Statfs_t) { defer trace.StartRegion(ctx, "doStatfs").End() for _, c := range cs {...
74507888566a1fd3e96e92b74bdb5054901e2ab8e9a58b859b65369a6ad88ffc
Go
8,741
337
package settings import ( "bytes" "context" "crypto/sha256" "encoding/base64" "encoding/json" "errors" "fmt" "io" "net/http" "os" "path" "regexp" "runtime/trace" "strings" "sync" "time" "github.com/10XDev/cellranger/lib/go/telemetry/event" ) type eventPayload struct { content []byte product string...
c28ceeb56da73feb13ea1346bb61f78b054d68be2809fc5150257c44af42137f
Go
9,944
328
// Copyright (c) 2014 10X Genomics, Inc. All rights reserved. // Tenkit sample index demultiplexer. package main import ( "context" "encoding/json" "errors" "io" "log" "os" "runtime/pprof" "runtime/trace" "strconv" "github.com/10XDev/cellranger/lib/go/tenkit/fastq" docopt "github.com/martian-lang/docopt....
f4cba15762af8ae90abd46a1bae799494fd01e6ff34db29e7bf3280067254a52
Go
10,367
442
package fastq import ( "bufio" "fmt" "io" "log" "os" "os/exec" "path/filepath" "strings" "syscall" ) const GZIP_COMPRESSION_LEVEL = 6 func RC_NUCS(b byte) byte { switch b { case 'A': return 'T' case 'C': return 'G' case 'G': return 'C' case 'T': return 'A' case 'N': return 'N' } return 0 }...
9c7a1427158fcd1ba4dd568048de21952b59b0c2b9037054d60e82bb9cd8ad6d
Go
10,599
415
package config import ( "context" "crypto/sha256" "encoding/json" "errors" "fmt" "path/filepath" "strings" "sync" "time" "github.com/10XDev/cellranger/lib/go/telemetry/collector" ) type CompiledConfig struct { ConfigVersion int `json:"config_version"` ConfigTime time.Time `json:"config_time"` P...
9c2b9c95d6df3e8418ea0905ae00d87a8ef8b2b577ace28d79dfad0d20e3b538
Go
12,508
485
// Command telemetry collects and transmits usage statistics for the product. package main import ( "bytes" "context" "encoding/json" "errors" "flag" "fmt" "io" "io/fs" "os" "path" "regexp" "runtime/pprof" "runtime/trace" "sort" "strings" "time" "github.com/10XDev/cellranger/lib/go/telemetry/event" ...
af1dd89ef6b64fc365a3de983c4aaeb74090259da77d5a1ea1b52d1afbc583a9
Go
13,160
600
package config import ( "bytes" "cmp" "encoding/json" "errors" "fmt" "math" "regexp" "slices" "sort" "strconv" "strings" ) func nTrue(b ...bool) int { n := 0 for _, v := range b { if v { n++ } } return n } func (pc *BucketSpec) compile(name string) (Bucketizer, error) { // Ensure we have exact...
22ab77e24ded2fa8007068a8efacbb016c850d2bb1bb257adf9831edccccf9ac
Go
15,459
548
// Package settings provides global persisted settings access the telemetry. // // Logic for interacting with on-disk configuration and result files, // as well as remote URL endpoings, is all contained here. package settings import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "io/fs" "net/http" "o...
4a6392108670cdc92109565399da1eca33dee71f21b602d8bff6e2355ef1cdb4
Go
20,161
904
package collector import ( "archive/zip" "bufio" "bytes" "context" "encoding/json" "errors" "fmt" "io" "io/fs" "os" "path" "path/filepath" "regexp" "runtime/trace" "sort" "strings" "sync" "github.com/10XDev/cellranger/lib/go/telemetry/converter" ) var chunkDirNameRe = regexp.MustCompile( `^(?:(?:c...
ac47d29c6411ada38ea9caa63145acc4539774d65b01827072cdd47812b109ad
Go
25,409
993
// Copyright (c) 2024 10x Genomics, Inc. All rights reserved. package sitecheck import ( "bufio" "bytes" "context" "errors" "fmt" "os" "os/exec" "path" "path/filepath" "regexp" "runtime" "sort" "strconv" "strings" "syscall" "time" "golang.org/x/sys/unix" ) // #include <gnu/libc-version.h> import "C...
637f1a8558dbbc5e8d0153f5af9b8a0c0256e8717361dee65c2fb4b3755ec411
Java
645
27
package bar; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; import org.scijava.script.ScriptService; import org.scijava.service.AbstractService; import org.scijava.service.Service; import net.imagej.ImageJService; @Plugin(type = Service.class) public class BARService extends AbstractService ...
8102306bd7b2a66a7b9bb593eb9df3055bc79818373ff2e1febac5ccfa8162b7
Java
792
35
package bar; import net.imagej.ops.AbstractOp; import org.scijava.ItemIO; import org.scijava.plugin.Attr; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; @Plugin(type = BAR.GCD.class, name = BAR.GCD.NAME, attrs = { @Attr(name = "aliases", value = BAR.GCD.ALIASES) }) public class DefaultGCD ext...
0a35df952a2a12263ae5af9cacd60354d488ca809a75fdb4bef103f3885e9a3b
Java
1,054
38
/* * Based on code snippet from * http://java.sun.com/developer/technicalArticles/releases/data/ * * Copyright © 2008, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. */ import java.awt.image.BufferedImage; import java.awt.datatransfer.*; public class ImageSelec...
354fb40d39769910267c7cd64f4d6f52f44d1b0eb24550403841141fedf2a402
Java
1,443
57
package bar; import net.imagej.ops.AbstractNamespace; import net.imagej.ops.Namespace; import net.imagej.ops.Op; import net.imagej.ops.OpMethod; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; import org.scijava.script.ScriptService; @Plugin(type = Namespace.class) public class BAR extends Abs...
5f79bd09292fd22cfdda34d2c62effcffbaddd32fbddbf07d86e00b5041106ef
Java
1,759
41
import java.util.TimeZone; /** * * @author [email protected] */ public class time { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here long time1= (System.currentTimeMillis()); System....
ab78917f27dae86fb8480ab55078ff2e7ec048621377a76614e55a804ad89134
Java
2,472
84
/** * */ package org.janelia.saalfeldlab.transformhelpers; import java.nio.file.Files; import java.nio.file.Paths; import java.util.concurrent.Callable; import java.util.stream.Stream; import org.janelia.saalfeldlab.n5.hdf5.N5HDF5Reader; import org.janelia.saalfeldlab.n5.imglib2.N5DisplacementField; import ch.syst...
033138475c7d89352c28d87f860ed9588c1e31289c819487037501eac0c92c54
Java
3,241
110
/* * IJ BAR: https://github.com/tferr/Scripts * * 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 * (http://www.gnu.org/licenses/gpl.txt). * This program is distributed in the hope that it will...