Skip to content

Instantly share code, notes, and snippets.

@IceN9ne
IceN9ne / nitpick.toml
Last active September 4, 2021 04:07 — forked from wakemaster39/nitpick.toml
nitpick configuration for python
["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"
@IceN9ne
IceN9ne / fibonacci.cpp
Created March 23, 2017 21:07
Insane fibonacci generator
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;
}
@IceN9ne
IceN9ne / nodes_test.cpp
Created March 21, 2017 06:33
A Genetic Programming test data structure
#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>
@IceN9ne
IceN9ne / convert.rb
Created February 19, 2017 20:11
kvc to json
require 'json'
def kvc_to_hash(filename)
config = {}
network = nil
File.foreach(filename) do |line|
case line
when /^#/
when /^\[(.*)\]$/