This file contains hidden or 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
FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04 | |
# avoid prompts from apt | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update -qq && \ | |
apt-get install -qq --yes --no-install-recommends \ | |
software-properties-common | |
# Set up locales properly |
This file contains hidden or 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
// Extra comments: | |
// - Check the copy-and-swap idiom, i.e., implement a swap method for your List and then use it | |
// for the copy and move operator: https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Copy-and-swap | |
// - Do not provide constructor or operator that takes non-const reference, see the rule or 0/3/5: | |
// https://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29 | |
// - There are a lot of utility functions in the C++ standard that could help you, in particular, | |
// check copy and copy_n: https://en.cppreference.com/w/cpp/algorithm/copy or equal_range | |
// https://en.cppreference.com/w/cpp/algorithm/equal_range | |
#include <stdexcept> |
This file contains hidden or 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 io | |
import pandas as pd | |
s = """something a b c d message month day year | |
one 1 2 3.0 4 NaN 10 10 2018 | |
two 5 6 NaN 8 world 10 16 2018 | |
three 9 10 11.0 12 foo 11 15 2018""" | |
print(pd.read_table(io.StringIO(s), sep=' ', parse_dates={'date': ['month', 'day', 'year']})) |
This file contains hidden or 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 <string> | |
#include <set> | |
#include <future> | |
#include <iostream> | |
#include <memory> | |
#include <fstream> | |
#include <chrono> | |
class InputReader { | |
public: |
This file contains hidden or 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 <array> | |
template<class T, size_t size, size_t... sizes> | |
struct MArr { | |
constexpr static std::size_t ndims = sizeof...(sizes) + 1; | |
typedef std::array<typename MArr<T, sizes...>::type, size> type; | |
std::array<MArr<T, sizes...>,size> data; |
This file contains hidden or 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 <array> | |
#include <functional> | |
#include <typeinfo> | |
#include <unordered_map> | |
#include <memory> | |
#include <utility> | |
#include <iostream> | |
#include <typeindex> | |
// std::apply |
NewerOlder