Skip to content

Instantly share code, notes, and snippets.

View djwesleyborges's full-sized avatar
🏠
Working from home

Wesley Borges djwesleyborges

🏠
Working from home
View GitHub Profile
@djwesleyborges
djwesleyborges / cron_django_task_script.py
Created August 29, 2018 19:13 — forked from clint74/cron_django_task_script.py
Run cron task in your Django environment
#!/home/andre/.virtualenvs/myproject/bin/python
import os
import sys
DEBUG = False
#DEBUG = True
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@Devligue
Devligue / RunAsAdmin.py
Last active August 11, 2024 14:21
Collection of Python code snippets usefull to deal with admin privilages on Windows
#!python
# coding: utf-8
# by GaryLee
# https://gist.github.com/GaryLee/d1cf2089c3a515691919
import sys
import ctypes
def run_as_admin(argv=None, debug=False):
@boniattirodrigo
boniattirodrigo / removerAcentosECaracteresEspeciais.py
Last active December 28, 2023 18:38
Remover acentos e caracteres especiais em Python
import unicodedata
import re
"""
A remoção de acentos foi baseada em uma resposta no Stack Overflow.
http://stackoverflow.com/a/517974/3464573
"""
def removerAcentosECaracteresEspeciais(palavra):