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
import logging | |
logger = logging.getLogger(__name__) | |
def build_fibonacci_numbers(num): | |
""" Create the fibonacci numbers up to and including a given fibonacci number """ | |
if num <= 0: | |
raise ValueError('num must be greater than 0') |
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
-- Inspired by https://github.com/jasoncodes/dotfiles/blob/master/hammerspoon/control_escape.lua | |
-- You'll also have to install Karabiner Elements and map caps_lock to left_control there | |
len = function(t) | |
local length = 0 | |
for k, v in pairs(t) do | |
length = length + 1 | |
end | |
return length | |
end |