Skip to content

Instantly share code, notes, and snippets.

View aod7br's full-sized avatar

Andre Dias aod7br

  • EnCirca
  • Rio de Janeiro
  • 05:01 (UTC -03:00)
  • LinkedIn in/andre-dias
View GitHub Profile
@aod7br
aod7br / debug.py
Last active July 31, 2023 13:57
combine debug, logging and exception handling in one @decorator
import logging
logging.basicConfig(level=logging.DEBUG)
def debug(func):
'''
@debug
def f(a,b,c=0):
raise Exception("Crashing")
return a+b+c
'''
Bluetooth/Pyjnius example
=========================
This was used to send some bytes to an arduino via bluetooth.
The app must have BLUETOOTH and BLUETOOTH_ADMIN permissions (well, i didn't
tested without BLUETOOTH_ADMIN, maybe it works.)
Connect your device to your phone, via the bluetooth menu. After the
pairing is done, you'll be able to use it in the app.
@aod7br
aod7br / gist:8944913
Created February 11, 2014 21:51
ipython notebook - superformula
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{