Skip to content

Instantly share code, notes, and snippets.

@connebs
connebs / ClassfulBlueprint.py
Last active April 7, 2021 14:01
Subclass of `flask_rest_api.Blueprint` that is compatible with `flask_classful`
from flask_rest_api import Blueprint
class ClassfulBlueprint(Blueprint):
"""A subclass of flask_rest_api.Blueprint that stores endpoint documentation
not using :meth: `Blueprint.route` but instead with :meth: `Blueprint.add_url_rule`.
Since :meth: `Blueprint.route` should never be used from a `ClassfulBlueprint`
instance, it throws an error if you try to call it.
"""
def __getattribute__(self, name):
if name in ['route']:
@sixtenbe
sixtenbe / analytic_wfm.py
Last active October 22, 2025 04:06 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See