Fonte: https://www.fontsquirrel.com/fonts/vt323
$ pip install pillow python-slugify
$ python pybr_certs.py nomes.txt
Fork do https://github.com/GabrielRF/EstudeiEmHarvardBot
from functools import reduce | |
def center(words): | |
max_length = reduce(lambda a, b: a if a > len(b) else len(b), words, 0) | |
words = [word if len(word) == max_length else '{}{}'.format(' ' * ((max_length - len(word)) // 2), word) for word in words] | |
for word in words: print(word) |
def hello_world(): | |
print('hello world') | |
hello_world() | |
if __name__ == '__main__': | |
print('dentro do if') | |
hello_world() |
# Código usado na palestra "Async que se faz - asyncio na prática" | |
# no TDC 2018 em Florianópolis | |
# Creative Commons Attribution 4.0 International license <https://creativecommons.org/licenses/by/4.0/> | |
import random | |
from time import sleep | |
from utils import UPDATE_AVG, sync_request | |
# Código usado na palestra "Async que se faz - asyncio na prática" | |
# no TDC 2018 em Florianópolis | |
# Creative Commons Attribution 4.0 International license <https://creativecommons.org/licenses/by/4.0/> | |
# requirements: termcolor | |
import random | |
import asyncio | |
from asyncio import sleep as async_sleep | |
from time import time, sleep as sync_sleep |
# Código usado na palestra "Async que se faz - asyncio na prática" | |
# no TDC 2018 em Florianópolis | |
# Creative Commons Attribution 4.0 International license <https://creativecommons.org/licenses/by/4.0/> | |
import asyncio | |
import random | |
from time import sleep | |
from utils import UPDATE_AVG, async_request, timeit |
import asyncio | |
import sys | |
from pathlib import Path | |
import discord | |
from PIL import Image | |
def gerar_imagem(): | |
imagens = [ |
Fonte: https://www.fontsquirrel.com/fonts/vt323
$ pip install pillow python-slugify
$ python pybr_certs.py nomes.txt
Fork do https://github.com/GabrielRF/EstudeiEmHarvardBot
function cut_and_concat () | |
{ | |
SOURCE=$PWD/$1 | |
OUTPUT=$PWD/$2 | |
OPENING=$PWD/$3 | |
START_AT=$4 | |
END_AT=$5 | |
TIMESTAMP=$(date +"%Y%m%d%H%M%S") |
import discord | |
from discord.ext import commands | |
from decouple import config | |
DISCORD_TOKEN = config("DISCORD_TOKEN") | |
bot = commands.Bot(command_prefix="pyne!", intents=discord.Intents.default()) |
import sys | |
import toml | |
from slugify import slugify | |
def load_config_file(): | |
try: | |
path = sys.argv[1] | |
except IndexError: |