Skip to content

Instantly share code, notes, and snippets.

View dadoeyad's full-sized avatar

Eyad Tomeh dadoeyad

  • Madrid, Spain
View GitHub Profile
{
"mypy": true,
"test_command": "./manage.py test"
}
# Swipe notifications
input swipe 50 0 500 500
# turn wireless on
input tap 300 200
# unlock
input swipe 300 800 200 200
# go home
@dadoeyad
dadoeyad / convert_to_eastern_arabic_numerals.py
Last active September 6, 2019 09:40
Django filter to convert Arabic numbers to Eastern Arabic numbers
# -*- coding: utf-8 -*-
from django import template
register = template.Library()
@register.filter
def convert_to_eastern_arabic(value):
""" Converts an arabic numeral (ex. 5817) to Eastern Arabic (ex. ٥٨١٧) """
for c in value: