Skip to content

Instantly share code, notes, and snippets.

View pashri's full-sized avatar
🌍
Github has statuses?

Patrick Linton pashri

🌍
Github has statuses?
View GitHub Profile
@mdogo
mdogo / fibonacci_itertools.md
Last active October 22, 2022 12:10
Itertools examples with Fibonacci Sequence

By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. The recursive definition of the fibonacci number in Python is:

def fiboncci(n):
    if n == 0:
      return 0
    elif n == 1:
      return 1
 else
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / PythonLogo.ipynb
Last active April 7, 2024 18:40
Creating the Python Logo in Matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TinyPoro
TinyPoro / Parse multi form in Python
Last active November 28, 2020 16:35
Parse multi form in Python
def parse_multi_form(form):
data = {}
for url_k in form:
v = form[url_k]
ks = []
while url_k:
if '[' in url_k:
k, r = url_k.split('[', 1)
ks.append(k)
if r[0] == ']':
@gene1wood
gene1wood / aws-lambda-relative-import-no-known-parent-package.md
Last active August 20, 2025 06:59
Python relative imports in AWS Lambda fail with `attempted relative import with no known parent package`

Python relative imports in AWS Lambda fail with attempted relative import with no known parent package

The Problem

In AWS Lambda if I attempt an explicit relative import like this

.
├── lambda_file.py
└── example.py