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
| syntax on | |
| set ruler | |
| " tab -> 4 spaces | |
| filetype plugin indent on | |
| syntax enable | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab |
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 <iostream> | |
| #include <ratio> | |
| #include <libdivide.h> // -I/path/to/libdivide | |
| #include <bench.hpp> // -I/path/to/<https://github.com/talbii/bench.hpp> | |
| bool stock(std::uint64_t n) { | |
| std::uint64_t fact = 1u; | |
| for (auto i = 2u; i < n; ++i) |
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
| // compile: cpp -std=c++20 virtual.cpp -o virtual -O2 | |
| #include "bench.hpp/bench.hpp" // https://github.com/talbii/bench.hpp | |
| #include <ratio> | |
| #include <cstddef> | |
| #include <iostream> | |
| struct A { | |
| int x{}; | |
| virtual ~A() = default; |
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 random import choices | |
| #from secrets import choice # cryptographically secure version: | |
| #choices = lambda N : [choice(letters) for _ in range(N)] | |
| import string | |
| letters = string.ascii_letters + string.digits + string.punctuation | |
| password_gen = lambda N : ''.join(choices(letters, k=N)) |