Skip to content

Instantly share code, notes, and snippets.

Avatar

Ousmane Wilane wilane

View GitHub Profile
@wilane
wilane / check_iban.py
Created Aug 18, 2022 — forked from mperlet/check_iban.py
Python IBAN Checker
View check_iban.py
# 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 Jan 12, 2016
Debian 8 (Jessie), linux-3.16.7-ckt11-1, Sangoma wanpipe-7.0.14 Failure
View wanpipe-problems.md

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 \
View keybase.md

Keybase proof

I hereby claim:

  • I am wilane on github.
  • I am wilane (https://keybase.io/wilane) on keybase.
  • I have a public key whose fingerprint is 80F0 9482 8728 5CD3 4AA8 9B38 CBF1 5790 DA88 50CB

To claim this, I am signing this object:

@wilane
wilane / django-tastypie_user-profile-field.py
Created Aug 21, 2012 — 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.
View django-tastypie_user-profile-field.py
###
# 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