Skip to content

Instantly share code, notes, and snippets.

View jmdacruz's full-sized avatar

Marcelo Da Cruz Pinto jmdacruz

View GitHub Profile
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def allPossibleFBT(self, N: int) -> List[TreeNode]:
# ensure N is odd
@jmdacruz
jmdacruz / timed_cache.py
Last active July 26, 2022 13:40 — forked from Morreski/timed_cache.py
Python lru_cache with timeout
from datetime import datetime, timedelta
import functools
def timed_cache(**timedelta_kwargs):
def _wrapper(f):
maxsize = timedelta_kwargs.pop('maxsize', 128)
typed = timedelta_kwargs.pop('typed', False)
update_delta = timedelta(**timedelta_kwargs)
############## kodi CRASH LOG ###############
################ SYSTEM INFO ################
Date: Sat May 7 20:56:43 PDT 2016
kodi Options: --standalone -fs --lircdev /run/lirc/lircd
Arch: x86_64
Kernel: Linux 4.5.2 #1 SMP Tue Apr 26 18:03:30 CEST 2016
Release: OpenELEC devel-20160426180528-r22685-g65d4dac
############## END SYSTEM INFO ##############
@jmdacruz
jmdacruz / aplay -l
Last active January 5, 2016 06:40
OpenELEC devel-20160105070612-r21825-gc7acc67 running on Kangaroo (Intel Atom X5-Z8500)
aplay: device_list:268: no soundcards found...
@jmdacruz
jmdacruz / aplay -l
Created January 4, 2016 19:53
OpenELEC devel-20160104091551-r21696-gac9f6fb running on Kangaroo (Intel Atom X5-Z8500)
aplay: device_list:268: no soundcards found...
@jmdacruz
jmdacruz / aplay -l
Created January 4, 2016 05:48
OpenElec 6.0.0 running on Kangaroo (Intel Atom X5-Z8500)
aplay: device_list:268: no soundcards found...