- Learn enough Git to be dangerous! You should have an understanding of how to clone repositories, make commits, checkout branches, push branches to Github, pull / rebase changes from Github. Resources: Pro Git Book, Github Tutorial, Atlassian Git Tutorial. After years I'm still learning new Git tricks every now and then, it's always a good idea to have a solid understanding of how things work
- Create a Git repository on Github for the project (and find a cool name for it :P). You will regularly push commits to this repository, and we can use the issue tracker as some sort of todo list. Add a Readme written in Markdown and add a License for the project
- Read up about IRC. This is where you can find lots and lots of people that can help you, especially when it comes to technical or programming language related questions (be aware that some channels can be rough though). Either install an IRC client or use a web interface for it (probably easier). I hang out on the oftc and freenode IRC networks a
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 <utility> | |
#include <type_traits> | |
#include <iostream> | |
template <template <typename> class T, typename P, typename = void> | |
struct is_instantiable final : std::false_type {}; | |
template <template <typename> class T, typename P> | |
struct is_instantiable<T, P, decltype((void)(T<P>(0)))> final : std::true_type {}; |
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 <list> | |
#include <future> | |
#include <algorithm> | |
#include <iostream> | |
#include <initializer_list> | |
std::future<std::list<int>> intersect(std::future<std::list<int>> a, std::future<std::list<int>> b) { | |
return std::async([a = move(a), b = move(b)]() mutable { | |
std::list<int> cs; |
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 <cstdio> | |
template <typename T, typename U> | |
struct fnImpl; | |
template <typename T, typename U> | |
int fn(T, U) { | |
return fnImpl<T, U>::fn(); | |
} |
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 <boost/iostreams/device/mapped_file.hpp> | |
#include <type_traits> | |
#include <cstdint> | |
template <typename T> | |
auto jd(T x) { | |
static_assert(std::is_signed<T>() and std::is_integral<T>(), "signed integral"); | |
return static_cast<std::intmax_t>(x); |
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 <boost/coroutine/all.hpp> | |
#include <algorithm> | |
#include <iterator> | |
#include <type_traits> | |
#include <utility> | |
#include <cstdint> | |
#include <cstdio> | |
#include <cstdlib> |
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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import argparse, os | |
from mapbox import Static | |
def makeArguments(): | |
parser = argparse.ArgumentParser(description='Satellite images for (latitude, longitude) tuple', | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter) | |
parser.add_argument('--latitude', dest='latitude', type=float, help='Latitude') |
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 <cstdint> | |
#include <immintrin.h> | |
// Z-order via bit interleaving a and b as in: a[31]b[31]a[30]b[30]... | |
inline std::uint64_t zorder(std::uint32_t a, std::uint32_t b) { | |
return _pdep_u64(a, 0xaaaaaaaaaaaaaaaaULL) | _pdep_u64(b, 0x5555555555555555ULL); | |
} |
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
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2 FATAL_ERROR) | |
PROJECT(coroutine-asio VERSION 0.0.1 LANGUAGES CXX) | |
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -pedantic -Wold-style-cast -Wuninitialized -Wunreachable-code -Wstrict-overflow=3 -D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections") | |
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--gc-sections") | |
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmax-errors=1") |
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 <vector> | |
#include <iostream> | |
#include <iterator> | |
#include <boost/graph/compressed_sparse_row_graph.hpp> | |
#include <boost/graph/graph_traits.hpp> | |
#include <boost/graph/graph_utility.hpp> | |
#include <boost/graph/breadth_first_search.hpp> | |
#include <boost/coroutine/all.hpp> |