This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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). | |
// | |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. See the AUTHORS file for names of contributors. | |
#if defined(OS_WIN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import multiprocessing as mp | |
from functools import partial | |
def _gen_df(per_chunk, step, out, i): | |
print("generating df " + str(i) + " with " + str(per_chunk) + " rows..") | |
start_time = np.datetime64('1990-01-01', 'ns') + np.timedelta64(i * per_chunk, step) | |
idx = np.array([(start_time + np.timedelta64(i, step)) | |
for i in range(per_chunk)]).astype('datetime64[ns]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
class session : public std::enable_shared_from_this<session> | |
{ | |
public: | |
explicit session(boost::asio::ip::tcp::socket && s) | |
: _socket{std::move(s)} | |
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
int main(int, char **) | |
{ | |
boost::asio::io_context context; | |
auto ip = boost::asio::ip::address::from_string("127.0.0.1"); | |
auto ep = boost::asio::ip::tcp::endpoint{ip, 8080}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
int main(int argc, char ** argv) | |
{ | |
try | |
{ | |
boost::asio::io_context io_context; | |
boost::asio::ip::udp::socket s{io_context, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
int main(int, char **) | |
{ | |
boost::asio::io_context context; | |
const boost::asio::ip::udp::endpoint ep{boost::asio::ip::udp::v4(), 8080}; | |
boost::asio::ip::udp::socket s{context, ep}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
int main(int argc, char ** argv) | |
{ | |
try | |
{ | |
boost::asio::io_context io_context; | |
boost::asio::ip::tcp::socket s{io_context}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/asio.hpp> | |
#include <iostream> | |
int main(int, char **) | |
{ | |
boost::asio::io_context context; | |
auto ip = boost::asio::ip::address::from_string("127.0.0.1"); | |
auto ep = boost::asio::ip::tcp::endpoint{ip, 666}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// chat_client.cpp | |
// ~~~~~~~~~~~~~~~ | |
// | |
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
// | |
// 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// chat_server.cpp | |
// ~~~~~~~~~~~~~~~ | |
// | |
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
// | |
// 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) | |
// |
NewerOlder