Skip to content

Instantly share code, notes, and snippets.

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

Renato Oliveira renatooliveira

🏠
Working from home
View GitHub Profile
@berinhard
berinhard / restaurantes_sp.md
Last active March 14, 2022 20:40
Meus Restaurantes <3 de SP

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?

LAMEN

Porque sim

@jashkenas
jashkenas / semantic-pedantic.md
Last active June 27, 2024 19:00
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@fmasanori
fmasanori / jogos.py
Last active October 30, 2022 00:00
World Cup in six lines of Python 3. Jogos da Copa do Mundo em cinco linhas de Python 3.
import requests
jogos = requests.get('http://worldcup.sfg.io/matches').json()
for jogo in jogos:
if jogo['status'] in ('completed', 'in progress'):
print (jogo['home_team']['country'], jogo['home_team']['goals'], 'x',
jogo['away_team']['country'], jogo['away_team']['goals'])
@fmasanori
fmasanori / Thanking_fb.py
Created January 29, 2014 20:49
Thanking my 500+ friends who wished me on my birthday on Facebook, by by Akshit Khurana
import requests
import json
AFTER = 1353233754
TOKEN = ' <insert token here> '
#by Akshit Khurana
def get_posts():
"""Returns dictionary of id, first names of people who posted on my wall
between start and end time"""
query = ("SELECT post_id, actor_id, message FROM stream WHERE "
@mjtamlyn
mjtamlyn / gcbv2.md
Last active April 12, 2019 18:55
Django generic class based views - version 2?

Django generic class based views - version 2?

Firstly, lets start with some full disclosure. I'm a big fan of class based views. Since they first came out, I've pretty much not written a functional view at all. I use the generic ones almost all the time, when they don't fit I build my own. I've written some websites with wonderfully complex heirarchy of composed features, using almost every individual mixin from Django and a few of my own. When I want to do some work on Django, my first port of call is normally the list of issues tagged as "generic views". I envisaged CCBV and then helped rewrite the official documentation. In