Skip to content

Instantly share code, notes, and snippets.

View joaodaher's full-sized avatar

Joao Daher joaodaher

View GitHub Profile
from dataclasses import dataclass
from typing import Dict, Any
from urllib.parse import urlparse
import requests
from django.core.cache import cache
from rest_framework import status
from tenacity import retry, stop_after_delay, retry_if_exception_type
joaodaher /
Last active March 31, 2020 17:48
Pipfile to install_requires
import json
import os
from setuptools import find_packages, setup
def read(f):
return open(f, 'r', encoding='utf-8').read()
def parse_requirements():
joaodaher /
Last active September 25, 2018 16:46
Test all possible v1 endpoints from Content API, comparing staging and development environments
import requests
from dateutil.parser import parse
class DictDiffer(object):
Calculate the difference between two dictionaries as:
(1) items added
(2) items removed
(3) keys same in both but changed values
from datetime import datetime
def _ordinal(day):
1: 'st',
2: 'nd',
3: 'rd',
if day in [11, 12, 13]:

Fluxo de desenvolvimento



Cada commit nessa branch deve ser considerado pronto para deploy em produção (ContinuousIntegration-ready)

  • Branch off: -
  • Merge to: hotfix/
Run Docker daemon
brew install socat
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
In PyCharm, go to Preferences>Build,Execution>Docker and add a new:
API URL: tcp://localhost:2375
Certficates Folder: <empty>
Docker Compose Executable: /Applications/