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
require 'json' | |
def kvc_to_hash(filename) | |
config = {} | |
network = nil | |
File.foreach(filename) do |line| | |
case line | |
when /^#/ | |
when /^\[(.*)\]$/ |
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 <tuple> | |
template <typename T> | |
struct Node | |
{ | |
virtual T operator()(const std::tuple<T,T,T>& params) = 0; | |
}; | |
template <typename T, T(*f)(const std::tuple<T,T,T>&)> | |
struct TermNode : Node<T> |
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
auto fibonacciSequence(int maxValue) | |
{ | |
std::vector<int> seq; | |
for (int i{0}, j{1}; i <= maxValue; j ^= i ^= j ^= i += j) | |
seq.push_back(i); | |
return seq; | |
} |
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
["pyproject.toml".tool.poetry.dev-dependencies] | |
black = "^21.8b0" | |
flake8 = "^3.9.2" | |
flake8-bugbear = "^21.4.3" | |
flake8-comprehensions = "^3.6.1" | |
flake8-isort = "^4.0.0" | |
flake8-pytest-style = "^1.5.0" | |
isort = "^5.9.3" | |
mypy = "^0.910" | |
pre-commit = "^2.15.0" |