Skip to content

Instantly share code, notes, and snippets.

View wilane's full-sized avatar

Ousmane Wilane wilane

View GitHub Profile
@wilane
wilane / check_iban.py
Created August 18, 2022 09:50 — forked from mperlet/check_iban.py
Python IBAN Checker
# Based on http://codereview.stackexchange.com/questions/135366/python-iban-validation
import string
def is_iban(unchecked_iban):
LETTERS = {ord(d): str(i) for i, d in enumerate(string.digits + string.ascii_uppercase)}
def _number_iban(iban):
@wilane
wilane / wanpipe-problems.md
Created January 12, 2016 10:16
Debian 8 (Jessie), linux-3.16.7-ckt11-1, Sangoma wanpipe-7.0.14 Failure

Observation

The wanpipe-7.0.14 package refused to compile against my kernel version 3.16.7-ckt11-1 and using DAHDI built from the contents of the repo:

apt-get install \
    libpri1.4 \
 asterisk-dahdi \
@wilane
wilane / django-tastypie_user-profile-field.py
Created August 21, 2012 12:29 — forked from colinsullivan/django-tastypie_user-profile-field.py
This is a django-tastypie resource field that incorporates the Django user profile into a model resource for a `User` transparently.
###
# This field is used on the user model to transparently add stuff from the
# user profile object into the user resource.
#
# Copyright (c) 2012 Colin Sullivan <colinsul [at] gmail.com>
# Licensed under the MIT License.
###
class UserProfileManyToManyField(fields.ManyToManyField):
###
# We will override the dehydrate method so when we're trying to dehydrate