Skip to content

Instantly share code, notes, and snippets.

View MadWombat's full-sized avatar

Dmitriy Kropivnitskiy MadWombat

View GitHub Profile
[tool.poetry]
name = "Whatever"
version = "1.7.0"
description = "Whatever"
authors = ["Mad Wombat <noneed@nowhere.com"]
[tool.poetry.dependencies]
python = "^3.6"
Django = "=1.11.24"
djangorestframework = "=3.6.4"
class Tree:
def __init__(self, data=None, left=None, right=None):
self.data = data
self.left = left
self.right = right
def size(self):
size = 1
size = size + self.left.size() if self.left is not None else size
size = size + self.right.size() if self.right is not None else size
@MadWombat
MadWombat / Untitled.ipynb
Last active August 2, 2019 20:20
Silly Benchmarks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[tool.poetry]
name = "whatever"
version = "0.1.1"
description = ""
authors = ["Mad Wombat"]
[tool.poetry.dependencies]
python = "^3.6"
[tool.poetry.dev-dependencies]
@MadWombat
MadWombat / lib.rs
Last active June 20, 2018 21:10
N-Bonacci function in Rust
pub mod bonacci {
pub struct Bonacci {
base: usize,
window: Vec<u32>,
}
pub fn new(base: usize) -> Bonacci {
Bonacci { base: base, window: vec![] }
}
@MadWombat
MadWombat / Funky Numbers.ipynb
Last active July 20, 2017 18:47
Funky Curves
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def nope(self):
print(self)
class Test:
nope = nope
def yup(self):
print(self)
@MadWombat
MadWombat / Progress Bar.ipynb
Last active November 17, 2016 16:36
Basic python progress bar
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.