Pinned Loading
-
magic-bang.nvim
magic-bang.nvim PublicNeovim plugin written in pure Lua that automagically inserts a shebang line when needed
-
Make function of numpy array cacheable
Make function of numpy array cacheable 1# How to cache slow functions with `numpy.array` as function parameter on Python
23## TL;DR
45```python
-
Inherit property setter in python 3.7
Inherit property setter in python 3.7 1# Python `@property` inheritance *the right way*
23Given a `Parent` class with `value` property, `Child` can inherit and overload the property while accessing `Parent` property getter and setter.
45Although we could just reimplement the `Child.value` property logic completely without using `Parent.value` whatsover, this would violate the DRY principle and, more important, it wouldn't allow for proper multiple inheritance (as show in the example `property_inheritance.py` bellow).
-
Python static variable decorator for...
Python static variable decorator for functions 1# Source: https://stackoverflow.com/questions/279561/what-is-the-python-equivalent-of-static-variables-inside-a-function/279586#279586
23def static_vars(**kwargs):
4def decorate(func):
5for k in kwargs:
-
Instance cached_method for unhashabl...
Instance cached_method for unhashable self, type hinted, with optional parameters 1# Cached Method Decorator in Python
23This repository provides a Python decorator `@cached_method` that caches method results similar to `functools.lru_cache`, but with each instance having its own cache.
45## Overview
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.