Skip to content

Instantly share code, notes, and snippets.

View jpauwels's full-sized avatar

Johan Pauwels jpauwels

View GitHub Profile
@donwardpeng
donwardpeng / Links for TinyML.md
Last active August 24, 2023 20:20
Useful Links to Get Started with TinyML
@gene1wood
gene1wood / aws-lambda-relative-import-no-known-parent-package.md
Last active February 13, 2025 22:07
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
@david-macleod
david-macleod / bokeh_audio_player.py
Last active February 18, 2023 17:39 — forked from nathanielatom/bokeh_audio_player.py
Custom Bokeh Model for audio playback (not so useful on its own; meant to be integrated with plot interactions).
# Forked from nathanielatom, updated to work with typescript and bokeh==1.3.4
from bokeh.layouts import column, layout
from bokeh.models import CustomJS, Model, LayoutDOM
from bokeh.document import Document
from bokeh.models.widgets import Button, Slider, Toggle
from bokeh.core.properties import Instance, String
from bokeh.io import save, output_file, show
from bokeh.util.compiler import TypeScript
from fontawesome.fontawesome_icon import FontAwesomeIcon as Icon
# Requires https://github.com/bokeh/bokeh/tree/master/examples/custom/font-awesome
@mtorromeo
mtorromeo / asgitowsgi.py
Last active November 12, 2021 11:42
Adapter to run an ASGI application in a WSGI server
import asyncio
import sys
from http import HTTPStatus
RESPONSE_STATUS_TEXT = {
code: str(code) for code in range(100, 600)
}
RESPONSE_STATUS_TEXT.update({
@MIvanchev
MIvanchev / article.md
Last active January 18, 2025 11:09
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
@sgmonda
sgmonda / code-print.tex
Last active April 3, 2021 00:29
Simple LaTeX template to print beautiful black&white Javascript source code
\documentclass[a4paper, 12pt]{article}
\usepackage[letterpaper, margin=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{beramono}
\usepackage{listings}
\usepackage{xcolor}
\newcommand\realnumberstyle[1]{}
@mattpitkin
mattpitkin / README.md
Last active March 15, 2023 10:52
Singularity & Docker in jupyter

Use Singularity and Docker to run a kernel in a jupyter notebook

This is an extension to this post about creating a kernel in a Jupyter notebook that runs a Singularity container.

Download Singularity (see here).

Create a Singularity file, e.g., (making sure to install the ipykernel module in it):

Bootstrap: docker
@f0k
f0k / LICENSE
Last active January 15, 2023 22:32
STFT Benchmarks on CPU and GPU in Python
MIT License
Copyright (c) 2017 Jan Schlüter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active March 28, 2025 02:09
Partition, format, and mount a drive on Ubuntu