- VScode files (they go in
.vscode/
) [[1]] [[2]]:lauch.json
: debugging configurations.taks.json
: create task to build the C/C++ project.c_cpp_properties.json
: settings related to IntelliSense.
.clang-format
: rules for how your code should be formatted, such as indentation, line length, spacing, and so on. It is based on a predefined style to base the formatting on (in my case, I use the [Google style][3]).- Simple
Makefile
for a basic build system template. - Instructions to analyze a C/C++ code performance.
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
class Job(): | |
def __init__(self, *args, **kwargs): | |
pass | |
def __call__(self, data): | |
raise NotImplementedError() | |
class Square(Job): | |
def __call__(self, data): | |
return [d * d for d in 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
val primes: Stream[Int] = 2 #:: Stream.from(3).filter { n => !primes.takeWhile(_ <= math.sqrt(n)).exists(n % _ == 0) } | |
def isPrime(n: Int) = primes.dropWhile(_ < n).head == n |