Skip to content

Instantly share code, notes, and snippets.

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

Angelo Andelnyr Sampaio Alves Andelnyr

🏠
Working from home
View GitHub Profile
@rougeth
rougeth / pybr20-foto-oficial.py
Created November 8, 2020 21:06
Script gerador da foto oficial da Python Brasil 2020
import asyncio
import sys
from pathlib import Path
import discord
from PIL import Image
def gerar_imagem():
imagens = [
@henriquebastos
henriquebastos / 00-detect-virtualenv-sitepackages.py
Last active October 17, 2022 04:22
IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs.
"""IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs.
IPython can detect virtualenv's path and injects it's site-packages dirs into sys.path.
But it can go wrong if IPython's python version differs from VIRTUAL_ENV's.
This module fixes it looking for the actual directories. We use only old stdlib
resources so it can work with as many Python versions as possible.
References:
http://stackoverflow.com/a/30650831/443564