Gist para organizar links e referências que apresentei durante o encontro da Noite de Processing Montando uma Algorave com Python. Mais sobre o que faço pode ser visto aqui.
Precisamos ter instalado:
Gist para organizar links e referências que apresentei durante o encontro da Noite de Processing Montando uma Algorave com Python. Mais sobre o que faço pode ser visto aqui.
Precisamos ter instalado:
DISCLAIMER
Essa lista é completamente pessoal e todas as indicações, em geral, ficam em bairros próximos aos bairros que eu morei em São Paulo. E sim, com cercerteza devem haver outros restaurantes que você moradora de São Paulo acha que faltou na lista. Mas haja dinheiro pra ser crítico gastrônimico em São Paulo, né querida?
""" | |
$ python json_to_srt.py <json_filepath> <output_srt> | |
Reference: https://aws.amazon.com/blogs/machine-learning/create-video-subtitles-with-translation-using-machine-learning/ | |
""" | |
import sys | |
import json | |
def getPhrasesFromTranscript( ts ): |
" Author: Bernardo Fontes <falecomigo@bernardofontes.net> | |
" Website: http://www.bernardofontes.net | |
" This code is based on this one: http://www.cmdln.org/wp-content/uploads/2008/10/python_ipdb.vim | |
" I worked with refactoring and it simplifies a lot the remove breakpoint feature. | |
" To use this feature, you just need to copy and paste the content of this file at your .vimrc file! Enjoy! | |
python << EOF | |
import vim | |
import re | |
ipdb_breakpoint = 'import ipdb; ipdb.set_trace()' |
class NewTabAdminFileWidget(AdminFileWidget): | |
""" | |
This widget is an extensions from AdminFileWidget which is used with all | |
ImageFields and FileFields at admin forms. This widget follows the api defined | |
by django.forms.widgets.ClearableFileInput widget. | |
""" | |
def __init__(self, *args, **kwargs): | |
super(NewTabAdminFileWidget, self).__init__(*args, **kwargs) | |
template_with_initial_new_tab = ( |
# Trilha para vídeo Processing Community Day Brasil 2021 | |
# berin e vinícius | |
# niterói/lisboa - 14/02/2021 (domingo de carnaval) | |
Root.default = 'D' | |
Scale.default = 'minor' | |
Clock.set_time(0) | |
Clock.bpm = 120 | |
var.base = var([0, 4, 3, 2, 1], dur=[12, 9, 1, 1, 1]) | |
~d1 >> sinepad( |
# Author: Berin | |
# Sketches repo: https://github.com/berinhard/sketches | |
# requirements: pillow tqdm | |
import os | |
from multiprocessing import Pool | |
from PIL import Image, ImageOps | |
from pathlib import Path | |
from tqdm import tqdm | |
import shutil |
# Author: Berin | |
# Sketches repo: https://github.com/berinhard/sketches | |
largura = 900 | |
altura = 900 | |
tam_modulo = largura / 2 | |
def modulo(): | |
noStroke() | |
# quadrado para fundo branco | |
fill(230) |
var total = 5; | |
function new_image() { | |
var url = "https://thispersondoesnotexist.com/image"; | |
window.open(url,'_blank'); | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
from random import choice | |
PEQUENA, MEDIA, GRANDE, MARACANA = 200, 300, 600, 900 | |
NUM_FATIAS = [4, 8, 12, 16] | |
def polar_coordinate(x0, y0, r, angle): | |
x = x0 + r * cos(angle) | |
y = y0 + r * sin(angle) |