text stringlengths 3.08k 22k |
|---|
/**
* @file hpt_test.cpp
*
* Tests for the hyper-parameter tuning module.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. If not, see
* http://www.opensource.or... |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include "log/log_sink_file_backend.h"
#include "log/log_stacktrace.h"
#include "log/log_wrapper.h"
#include "std/thread.h"
#include "common/file_system.h"
#include "time/time_utility.h"
#include "algorit... |
/***************************************************************************
Copyright (c) 2020, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must ... |
/**
* \file PnlWznmEvtDetail.cpp
* job handler for job PnlWznmEvtDetail (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author <NAME> (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
#ifdef WZNMCMBD
#include <Wznmcmbd.h>
#else
#include <Wznmd.h>
#endif
#include "P... |
///
/// \class l1t::Stage1Layer2EtSumAlgorithmImpHI
///
/// \author: <NAME> (<EMAIL>)
///
/// Description: hardware emulation of et sum algorithm
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "L1Trigger/L1TCalorimeter/interface/Stage1Layer2EtSumAlgorithmImp.h"
#include "L1Trigger/L1TCalorimeter/in... |
/******************************************************************************
* Copyright (c) 2014, AllSeen Alliance. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyrigh... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "common.h"
#include "vidhrdw/generic.h"
unsigned char *gottl... |
#include <iostream>
#include "gtest/gtest.h"
#include "fixed.hpp"
#include "fixedsr.hpp"
/* Fixed point test cases */
TEST(fp_test_case, integer_precision_test) {
double expected = 1.0;
rndcmp::Fixed val = rndcmp::Fixed<std::int16_t, 8>(expected);
EXPECT_EQ(expected, static_cast<double>(val)) << "expect... |
#include <tiramisu/utils.h>
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <complex.h>
#include <time.h>
#include <stdbool.h>
#include <math.h>
/* index functions */
int index_2d(int a, int b, int length2) {
return b +length2*( a );
}
int index_3d(int a, int b, int c, int length2, int length3) {... |
// slang-embed.cpp
// This file implements a simple utility for taking an input file
// and embedding into a C++ source file as a `static const` array.
// For now this utility uses plain C stdlib functionality rather
// than depending on any of the utiltiies from the Slang project
// libraries.
//
#ifdef _MSC_VER
#pr... |
#include "lmfao.hpp"
/* * * * * * * * * * * * * * * * * * * * * * * * *
* Functions related to the global callback queue
* * * * * * * * * * * * * * * * * * * * * * * * */
/*
Three globals to allow for Ruby/C-thread communication:
- mutex & condition to synchronize access to callback_queue
- callback_queu... |
/*
Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the License.
This program is distributed i... |
#include "tests.h"
#include "server/server.h"
static void testReadWordM() {
const char* str = "the quick\tbrown fox\r\njumps\rover\v\vthe \tlazy\n dog";
const char* words[] = { "the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" };
for (const char** exp = words; *str; ++exp)
assertEqual(readWor... |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#include <atomic>
#include <memory>
#include <thread>
#in... |
// __BEGIN_LICENSE__
// Copyright (C) 2006-2011 United States Government as represented by
// the Administrator of the National Aeronautics and Space Administration.
// All Rights Reserved.
// __END_LICENSE__
#include <vw/Core/Log.h>
#include <vw/Camera/CAHVOREModel.h>
#include <fstream>
#include <boost/foreach.hpp>
... |
// Copyright 2015, <NAME> and the other displaz contributors.
// Use of this code is governed by the BSD-style license found in LICENSE.txt
#include "voxelizer.h"
#include "hcloud.h"
#include "logger.h"
#include "octreebuilder.h"
#include "pointdb.h"
void VoxelBrick::voxelizePoints(const V3f& lowerCorner, float bric... |
/* Copyright (C) 2011 Ion Torrent Systems, Inc. All Rights Reserved */
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <vector>
#include <iostream>
#include "IonVersion.h"
#include "LinuxCompat.h"
#include "Utils.h"
#i... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2016 <NAME>
*
* 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, ... |
#include <cl-util/table.h>
#include <cl-util/factory.h>
#include <cl-util/debug_stream.h>
#include <cl-util/float_cmp.h>
#include "HistVolumeTracker.h"
const string SYMBOL_FIELD_NAME = "symbol";
const string TOTAL_VOLUME_FIELD_NAME = "TOTAL(K shs)";
const int MIN_N_FIELDS = 6;
const int SHS_UNITS_OF_TOTAL_VOLUME_FIEL... |
#include "rct_ros_tools/data_set.h"
#include "rct_ros_tools/parameter_loaders.h"
#include "rct_image_tools/image_utils.h"
#include <yaml-cpp/yaml.h>
#include <ros/console.h>
#include <opencv2/highgui.hpp>
#include <fstream>
#include <sys/stat.h>
static std::string rootPath(const std::string& filename)
{
const aut... |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
/*
* Copyright (c) 2018 Trail of Bits, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
// SQLite3 matlab driver library.
//
// <NAME> 2012 <<EMAIL>>
#include <algorithm>
#if !_MSC_VER && !__clang__ && (__GNUC__ < 4 || \
(__GNUC__ == 4 && (__GNUC_MINOR__ <= 8)))
#include <boost/regex.hpp>
using boost::regex;
using boost::regex_replace;
#else
#include <regex>
#endif
#include <set>
#include <sqlite3mex... |
//
// Project: panoramachine
// File: Stitch.cpp
//
// Copyright (c) 2022 Miika 'Lehdari' Lehtimäki
// You may use, distribute and modify this code under the terms
// of the licence specified in file LICENSE which is distributed
// with this source code package.
//
#include <opencv2/imgproc.hpp>
#include <opencv2/high... |
#include "class.hpp"
#include "Extrapolate.hpp"
#include "Laplacian.cpp"
std::complex<ScalarType> J(0.0, 1.0);
using Eigen::internal::BandMatrix;
MSparse
EigenSolving::ComputeMatrix(){
EigenMatrix = BaseLaplacian::Laplacian;
size_t iter = 0;
for(size_t i=0; i<Nx; ++i)
for(size_t j=0; j<Ny; ++j){
... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Randomized malloc, for detecting memory-based non-determinisms in redex.
* To use, build redex-all-malloc-dbg, and then run... |
/*
* shmif.cpp
*
* Sound driver implementation.
*
* Portable Windows Library
*
* Copyright (c) 2009 <NAME>
*
*/
#define VERSION "shmif.cpp 0901"
//#define DGB_PRINT 1
#include "shmif.h"
#include "stdio.h" // NULL
#include "string.h" // NULL
#include "errno.h"
//#include <sys/types.h>
//#include <sys/... |
/* The smooth Class Library
* Copyright (C) 1998-2018 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of "The Artistic License, Version 2.0".
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WIT... |
#include "Graph.h"
#include <iostream>
#include <fstream>
using namespace MeshLib;
Graph::Graph(Mesh *mesh) {
m_mesh = mesh;
m_root = NULL;
}
Graph::~Graph() {
for (std::list<std::list<HalfEdge*>*>::iterator lhe = m_loops.begin(); lhe != m_loops.end(); lhe++) {
std::list<HalfEdge*> *l = *lhe;
de... |
/*
* Copyright (C) 2015 midnightBITS
*
* 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,
* modify, merge, pub... |
/******************************************************************************
** Copyright (c) 2017-2019, Intel Corporation **
** All rights reserved. **
** **
... |
/*******************************************************************************
* Copyright (C) 2007 by the members of PG 510, University of Dortmund: *
* <EMAIL> *
*
* <NAME>, <NAME>, <NAME>, <NAME>, *
* <NAME>, <NAME>, <NAME>, <NAME>, *
* ... |
/***************************************************
This is a library for our I2C LED Backpacks
Designed specifically to work with the Adafruit LED Matrix backpacks
----> http://www.adafruit.com/products/
----> http://www.adafruit.com/products/
These displays use I2C to communicate, 2 pins are required to
... |
#include "../util/util.hh"
extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#include <libavutil/channel_layout.h>
#include <libavutil/common.h>
#include <libavutil/imgutils.h>
#include <libavutil/mathematics.h>
#include <libavutil/samplefmt.h>
#include <stdbool... |
#include "HITRANStateReader.h"
int GetFieldStart(int field){
const int field_lengths[] = {2,1,12,10,10,5,5,10,4,8,15,15,15,15,6,12,1,7,7};
int start = 0;
for(int i = 0; i < field; i++){
start=start+field_lengths[i];
}
return start;
};
int GetFieldLength(int field){
const int field_lengths[] = {2,1,12... |
#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <sstream>
using namespace std;
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <random>
#include <GL/glew.h>
#include <utility.h>
std::vector<GLuint> program_list;
GLuint ... |
#include "query/where_checker.h"
#include "global.h"
#include <cassert>
#include <iostream>
using namespace std;
extern Global* global;
inline bool checkDate(int yy, int mm, int dd) {
if (yy < 1970 || yy > 9999)
return false;
if (mm < 1 || mm > 12)
return false;
if (dd < 1)
return... |
/*
* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the Licens... |
#include "pleg.h"
using namespace Pleg;
#include "drumlin/main_tao.hpp"
#include <glib.h>
#include <gst/gst.h>
#include <algorithm>
#include <memory>
#include <libgen.h>
using namespace std;
#include <boost/program_options.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/core/demangle.hpp>
using namespace boo... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#include "acpc_protocol.h"
#include "logging.h"
#include "match_state.h"
#include "split.h"
using std::string;
using std::vector;
static int MakeCard(int rank, int suit) {
return rank * 4 + suit;
}
// Card indices rang... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of condit... |
#pragma once
#include <boost/filesystem.hpp>
#include <set>
#include <boost/date_time.hpp>
#include <opencv2/imgcodecs.hpp>
#include "reader_util.hpp"
#include "reader_trading.hpp"
#include "mouse.hpp"
#include "wishlist.hpp"
using namespace reader;
void log_offerings(const image_recognition& recog, const std::v... |
/*
***************************************************************************************
MJM -2021-
This is a Sample application, designed to demonstrate the
graphical capability of the bitmap engine.
The chosen label format is a USPS shipping format.
---------------------------------------... |
#include "../Objects.h"
#include <codeanalysis\warnings.h>
#pragma warning( push )
#pragma warning ( disable : ALL_CODE_ANALYSIS_WARNINGS )
#include "../../../Lodepng/lodepng.h"
#pragma warning( pop )
void sur::Sprite::LoadHgineres(std::string_view path)
{
i32 x = 0, y = 0;
std::string Data... |
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2016 <NAME>
*
* 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 ... |
//---------------------------------------------------------------------------//
// Copyright (c) 2018-2021 <NAME> <<EMAIL>>
//
// MIT License
//
// 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 Soft... |
// smallpt, a Path Tracer by <NAME>, 2008
//
// Modified by <NAME>
// For the original code, see github.com/munificient/smallpt
// For the original license, see smallpt.LICENSE.txt
#include <math.h> // smallpt, a Path Tracer by <NAME>, 2008
#include <stdio.h> // Remove "-fopenmp" for g++ version < 4.2
#inc... |
// Copyright (c) 2011-2020 <NAME>
// See LICENSE and README
#include "parser.h"
#include <sstream>
#include <vector>
#include <cassert>
#include <cstdio>
#include <cstdlib>
static void print_command(const CommandArgument *args, int nargs);
static int symbol_to_number(CommandArgument *arg);
static int scan_number(Com... |
#include "sgfile.h"
#include "sgimage.h"
#include <QDataStream>
#include <QFile>
#include <QFileInfo>
enum {
SG_HEADER_SIZE = 680
};
class SgHeader {
public:
SgHeader(QDataStream *stream) {
*stream >> sg_filesize;
*stream >> version;
*stream >> unknown1;
*stream >> max_image_records;
*stream >> num_image... |
#include "telabrium/object3d.hpp"
Object3d::Object3d(glm::vec3 _pos, glm::vec3 _rot, glm::vec3 _scl) : position(_pos), scale(_scl) {
rotation = glm::quat(glm::radians(_rot));
}
Object3d::Object3d(Object3d* _parent, glm::vec3 _pos, glm::vec3 _rot, glm::vec3 _scl) : position(_pos), scale(_scl) {
parent = _parent;
ro... |
#include "store.hpp"
#include "session.hpp"
using namespace OUCH;
bool MemoryStore::set(const void* data, size_t len)
{
auto& m = _messages[getNextSenderMsgSeqNum()];
m.assign((char*)data, len);
return true;
}
void MemoryStore::get(int begin, int end, strvec_t& messages) const
{
messages.clear();
Messages... |
#include "Halide.h"
#include <fstream>
using namespace Halide;
using std::vector;
using std::pair;
// Solve a quadratic. Returns the real part of the roots only
std::pair<Expr, Expr> solve_quadratic(Expr a, Expr b, Expr c) {
Expr d = b*b - 4*a*c;
float eps = 1e-20f; // Avoid infinite derivatives at zero.
... |
/* Randomisation */
int basic_random_int(int max_rand){
return rand() % (max_rand+1);
}
float basic_random_float(){
return basic_random_int(1000)/1000;
}
float random_float(float min, float max){
random_device rd;
mt19937 gen(rd());
std::uniform_real_distribution<> dis(min, max);
retu... |
#include "ObjSceneWriter.h"
#include "SceneGraph.h"
#include "SceneDrawables.h"
#include "PolymorphicSceneNodeFunctionSet.h"
#include "IdPair.h"
#include "UTF8.h"
#include "NullOut.h"
#include <cnoid/stdx/filesystem>
#include <fmt/format.h>
#include <fstream>
#include <map>
#include <set>
#include <exception>
#include ... |
/* NG Harmonizer
* Author: <NAME>
* See LICENSE.txt for licensing information
*/
#include "toot-toot-modules.hpp"
#include "dsp/digital.hpp"
#include "dsp/ringbuffer.hpp"
#include "dsp/fft.hpp"
#define NUM_HARMONIES 4
#define HARMONY_KNOB_Y 130
#define HARMONY_IN_Y HARMONY_KNOB_Y + 50
#define HARMONY_OUT_Y HARMONY... |
///////////////////////////////////////////////////////////////////////////////////////////////
// \brief implementation file for equation of motion JAGP
//
//
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////
#include<complex>
#include<vector>
#include<utility>
#... |
extern "C" {
#include "bitwise_utils.h"
#include "mls_query.h"
}
#include "code_map.hpp"
#include <memory>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <bitset>
#include <unistd.h>
enum Error {
SUCCESS = 0,
ERROR_INVALID_ARGUMENT,
ERROR_OPENING_FILE,
ERROR_WRITING_FILE,
ERROR_... |
#include "marjoram/maybe.hpp"
#include "marjoram/nothing.hpp"
#include "gtest/gtest.h"
#include <memory>
using ma::Just;
using ma::Maybe;
using ma::Nothing;
TEST(Maybe, flatMap) {
auto five = Just(5);
auto msqInts = [](int i) { return Just(i * i); };
auto squared = five.flatMap(msqInts);
auto twiceSquared = f... |
#include <vector>
#include <iostream>
#include <cstring>
#include <fstream>
#include <random>
#include <string>
#include <array>
#include <cstdio>
#include <ospray/ospray.h>
struct Particle {
osp::vec3f pos;
float radius;
int atom_type;
Particle(float x, float y, float z, float radius, int type)
: pos(osp::vec3... |
#include "Resources.h"
#include "Log.h"
// Texture Resources
Texture* g_pRedMageTex = 0;
Texture* g_pBlueMageTex = 0;
Texture* g_pRedTileTex = 0;
Texture* g_pBlueTileTex = 0;
Texture* g_pRedCrackedTileTex = 0;
Texture* g_pBlueCrackedTileTex = 0;
Texture* g_pRedEmptyTileTex = 0;
Texture* g_pBlueEmptyTileTex = 0... |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include<unistd.h>
#define NORMAL_PSNR 35
static unsigned char *bufferyuv1 = NULL;
static unsigned char *bufferyuv2 = NULL;
static void print_help(const char* app)
{
printf("%s <options>\n", app);
printf(" -i raw yuv file by softwa... |
#include "cfourscf.hpp"
using namespace aquarius::task;
using namespace aquarius::input;
using namespace aquarius::tensor;
using namespace aquarius::op;
namespace aquarius
{
namespace scf
{
template <typename T>
CFOURSCF<T>::CFOURSCF(const string& name, Config& config)
: Task(name, config),
frozen_core(config.get<... |
#include <iostream>
#include <Eigen/Sparse>
#include <unordered_map>
#include <vector>
#include <string>
#include <set>
using namespace std;
using namespace Eigen;
struct Slot {
int id;
set<string> flows;
int exp_val;
int actual_val;
};
struct Switch {
unordered_map<int, Slot> slots;
void update_swi... |
/*
* check_datapage.cpp
*
* Copyright 2009-2012 Yahoo! Inc.
*
* 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 b... |
// Copyright (C) 2018 Xilinx Inc.
// All rights reserved.
// Author: sonals
#include <getopt.h>
#include <iostream>
#include <stdexcept>
#include <vector>
#include <string>
#include <cstring>
#include <sys/mman.h>
#include <time.h>
#include <uuid/uuid.h>
// driver includes
#include "ert.h"
// host_src includes
#incl... |
/*
* Created by AndiSwiss on 10.10.20
* https://github.com/AndiSwiss
*/
#include "string_in_out_testing.h"
#include <iostream>
#include <unistd.h>
#include <fstream>
#include <chrono>
string sub_path, in_name, out_name, expected_name; // Initialized in prepare_ide()
//int old_stdin; // Re-assigning back to... |
#include "stdafx.h"
#include "WriteMain.h"
extern HINSTANCE g_instance;
CWriteMain::CWriteMain(void)
{
this->file = INVALID_HANDLE_VALUE;
this->teeFile = INVALID_HANDLE_VALUE;
{
fs_path iniPath = GetModuleIniPath(g_instance);
this->writeBuffSize = GetPrivateProfileInt(L"SET", L"Size", 770048, iniPa... |
#include "General.h"
#include "MessageModule.h"
void Channel::init(int port, SDLNet_SocketSet f_sset)
{
sset = SDLNet_AllocSocketSet(1);
assert( sock = SDLNet_UDP_Open( port ) );
assert( SDLNet_UDP_AddSocket( sset, sock) != -1 );
assert( SDLNet_UDP_AddSocket(f_sset, sock) != -1 );
pck = NULL;
send_ready = 0;
}
... |
#include "Engine.h"
void PlayKotik()
{
PlaySoundA("Music/laba.wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);
PlaySoundA("Music/vapa.wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);
//PlaySoundA("Music/japan.wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);
}
void playDebug()
{
PlaySoundA("Musi... |
#include <iostream>
#include "City.h"
#include "UtilRandom.h"
#include "Utility.h"
#include "Vec2.h"
#include "Vec3.h"
#include "Pathfinding.h"
#include "PopulationMap.h"
#include "DiamondSquare.h"
#include "WaterData.h"
#include "PopulationQuadTree.h"
#include "RoadNetwork.h"
#include "MinorRoad.h"
#include "MajorR... |
//
// Created by zcj on 2020/5/5.
//
#include <unistd.h>
#include "ffmpeg_engine.h"
#include "log_util.h"
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
AVCodec *pCodex;
AVPacket *packet;
AVFrame *frame;
SwrContext *swrContext;
uint8_t *out_buffer;
int out_channel_nb;
int audio_stream_idx = -1;
//FFMPEG4.0 ... |
#include "stdafx.h"
#include "Snap.h"
#include "biasedrandomwalk.h"
#include <unordered_map>
#include <tuple>
#include <numeric>
#include <deque>
#define BIT_SET(a, b) ((a) |= (1ULL<<(b)))
#define BIT_CLEAR(a, b) ((a) &= ~(1ULL<<(b)))
//Preprocess alias sampling method
void GetNodeAlias(TFltV &PTblV, TIntVFltVPr &NT... |
/*
* first_follow_generator.cpp
*
* Created on: 19/4/2018
* Author: Murad
*/
#include <map>
#include <set>
#include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include "first_follow_generator.h"
using namespace std;
vector<set<string>> cycles;
set<string> cycle_d... |
#include "deform_conv_cuda.h"
#include <assert.h>
#include <cublas_v2.h>
#include <cuda_runtime.h>
#include <algorithm>
#include <chrono>
#include <cmath>
#include <iostream>
#include "amir_cuda_util/common_util.h"
void deformable_im2col(float *data_input, float *data_offset,
co... |
//
// Copyright (C) 2019-2019 markhc
//
// 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, modify, merge, publish... |
#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <set>
#include <iomanip>
#include <boost/program_options.hpp>
#include "string.hpp"
using namespace std;
using namespace std::filesystem;
using namespace boost::program_options;
typedef array<double, 3> vector3;
struct atom
{
boo... |
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
/**
* Copyright (C) Arm Limited 2013-2016. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "EventsXML.h"
#include "CapturedXML.h"
#include "L... |
#include "data_structures.h"
#include <boost/log/trivial.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
#include <chrono>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "defs.h"
using std::make_pair;
using std::make_shared;
using std::shared_ptr;
usin... |
#include <boost/serialization/binary_object.hpp>
#include <boost/serialization/list.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/vector.hpp>
template<class T>
const T& Blackboard::read(const T *component) {
return *component;
}
template<class ... |
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <iostream>
#include "validate.h"
#include "HMM.h"
using namespace sf;
Sprite pieces[32];
int piece_size = 56;
int n_pieces = 32;
bool turn = false;
bool gameOver = false;
bool hasMoved = true;
bool check = false;
Text winnerText;
Font font;
Position black... |
// Copyright (c) 2013-2018 <NAME>, <NAME>, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that
// the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of c... |
#include "MobileLoadingScreen.h"
#include <plugin.h>
#include "extensions\Screen.h"
#include "Settings.h"
MobileLoadingScreen MobileLoad;
void MobileLoadingScreen::InstallPatches() {
static float f_255 = 0.0f;
plugin::patch::SetPointer(0x590BA7 + 2, &f_255);
plugin::patch::SetInt(0x748B0E, 5);
... |
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2019 RDK Management
*
* 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 th... |
/****************************************************************************
Copyright (c) 2017-2018 <NAME> Co., Ltd.
http://www.cocos2d-x.org
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 Softw... |
#include <cassert>
#include <cstdio>
#include "math/math.cc"
#include "gfx/gfx.cc"
#include "network/network.cc"
#include "audio/audio.cc"
#include "simulation/interaction.cc"
#include "simulation/simulation.cc"
struct State {
// Game and render updates per second
uint64_t framerate = 60;
// Calculated availab... |
#include "libdqn.h"
#include "libFCQ.h"
#ifndef __IOSTREAM__
#define __IOSTREAM__
#include <iostream>
using namespace std;
#endif
Observation::Observation(): v(0), p(0) {}
Observation::Observation(const FixPoint& position, const FixPoint& velocity): p(position), v(velocity) {}
Observation& Observation::operator=(con... |
#include "LedFlow.h"
LedPinConfig LED_CONFIG_DEFAULT = {
LED_DEFAULT_VALUE, //start value
LED_DEFAULT_STEPDIR, //start direction
LED_DEFAULT_STEPUP,//step up offset
LED_DEFAULT_STEPDN,//step down offset
LED_PWM_MIN,//min value
LED_PWM_MAX,//max value
LED_DEFAULT_OSCILLATE,//oscillate
LED_DEFAULT_SMOOTH,//smooth
LED_... |
#include "presenter.h"
#include <string.h>
#include "opencv.hpp"
#include "../model/IPResolver.h"
#include "../camera/CameraFactory.h"
Presenter::Presenter(IView& view, TrackerFactory* t_factory, ConfigMgr* conf_mgr)
{
this->conf_mgr = conf_mgr;
state = conf_mgr->getConfig();
this->view = &view;
this->view->con... |
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <time.h>
#define gsize uint32_t // fall back is uint16_t
#define pilehalf 2147483648 // fall back is 32768
// globals
int bMinX; // bMinX : The bounding box in lower the X plane.
int bMinY; // ... |
/* uranus2.cpp: test program for Uranian satellite functions,
loading those functions from a DLL (compare to uranus1.cpp)
Copyright (C) 2010, Project Pluto
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 Fou... |
#include <iostream>
#include <thread>
#include <chrono>
#include <vector>
#include <Windows.h>
#include <cstdio>
std::wstring tetromino[7]{};
int nFieldWidth{ 12 };
int nFieldHeight{ 18 };
unsigned char *pField{ nullptr };
int nScreenWidth{ 120 }; // 80 | Actual: 120
int nScreenHeight{ 30 }; // 30 | Ac... |
#include "TGA.h"
#define WEIGTH 800
#define HEIGHT 600
#define N_ROTATE_DEGREE 10
#define PORCENT_SCALE 10
#define N_MOVE 0.1
bool keys[1024];
int indexSelectedObject = -1;
float cameraSpeed = 1.f;
float fov = 45.0f;
float pitchAngle = -30.f;
float yawAngle = -90.f;
float directionSpeed = 25.f;
vector<... |
#include <stdio.h>
#include "ali_api_core.h"
#include "ali_string_utils.h"
#include "ali_rds.h"
#include "json/value.h"
#include "json/reader.h"
using namespace aliyun;
namespace {
void Json2Type(const Json::Value& value, std::string* item);
void Json2Type(const Json::Value& value, RdsDescribeSlowLogsSQLSlowL... |
#include <algorithm>
#include <unordered_map>
#include <cassert>
#include "MeshProc/HalfEdge.h"
#include "BitSet.h"
#include "sanity.h"
namespace
{
using namespace mesh::half_edge;
static unsigned EdgeLoopLength(const Topology& mesh, unsigned halfEdge)
{
const unsigned heStart = halfEdge;
unsigned loopLength =... |
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define gc getchar_unlocked()
#define pc(x) putchar_unlocked(x)
template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&... |
#include "naobehavior.h"
#include "../rvdraw/rvdraw.h"
extern int agentBodyType;
/*
* Real game beaming.
* Filling params x y angle
*/
void NaoBehavior::beam( double& beamX, double& beamY, double& beamAngle ) {
beamX = -HALF_FIELD_X + worldModel->getUNum();
beamY = 0;
beamAngle = 0;
}
SkillType NaoBe... |
#include "Ncurses.h"
#include "../Location.h"
#include "../Configurations/Configuration.h"
float LoggerNcurses::mTimeEfold = 3;
LoggerNcurses::LoggerNcurses(Logger::Level iMaxLevel) : Logger(iMaxLevel) {
// Set up windows
initscr();
mWinConfig = newwin(0,30,0,0);
mWinProgress = newwin(10,0,0,30);
mWi... |
#include "gamelogic.h"
#include "gameObjects/dynamicentity.h"
#include "gameObjects/staticentity.h"
#include "gameObjects/enemy.h"
#include "dillinger.h"
#include <QDebug>
GameLogic::GameLogic(qreal step_time)
{
delta_t = step_time; // Physics timer
qreal frame_time = step_time * 1000.0; // Frame time in mil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.