I hereby claim:
- I am herberthamaral on github.
- I am herberthamaral (https://keybase.io/herberthamaral) on keybase.
- I have a public key ASB1HmxiGMufY0PlmTyzmFkHKm6Z1Vz65loVAmN47-Y5zAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
echo "[xamarin]" > /etc/yum.repos.d/xamarin.repo | |
echo "name=Xamarin" >> /etc/yum.repos.d/xamarin.repo | |
echo "baseurl=http://download.mono-project.com/repo/centos/" >> /etc/yum.repos.d/xamarin.repo | |
echo "enabled=1" >> /etc/yum.repos.d/xamarin.repo | |
echo "gpgcheck=1" >> /etc/yum.repos.d/xamarin.repo | |
echo "gpgkey=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" >> /etc/yum.repos.d/xamarin.repo | |
yum update | |
yum install mono-complete |
import json | |
from werkzeug.wrappers import Request, Response | |
@Request.application | |
def application(request): | |
print('HEADERS:') | |
for header, value in request.headers.items(): | |
print('{header}: {value}'.format(header=header, value=value)) | |
print('CONTENT:') |
def troco(valor): | |
retorno = {50: 0, 25: 0, 10:0, 5: 0, 1: 0} | |
while valor >= 5: | |
if valor >= 50: | |
retorno[50] += 1 | |
valor = valor - 50 | |
elif valor >= 25: | |
retorno[25] = 1 | |
valor = valor - 25 | |
elif valor >= 10: |
import unittest | |
def fizzbuzz(num): | |
retorno = '' | |
if num == 0: | |
return retorno | |
if num % 3 == 0: |
#!/usr/bin/python | |
import django.core.handlers.wsgi | |
import os, signal, functools, time | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.wsgi | |
from tornado.options import options, define | |
try: | |
define("port", default=8888, help="run on the given port", type=int) |
import queue | |
import random | |
import threading | |
import time | |
def ouvir_microfone(fila_comandos: queue.Queue) -> None: | |
# Função produtora da fila | |
# Esta função simula alguém ditando comandos no microfone, colocando na | |
# fila de comandos o que foi dito. Gera um comando a cada 5 segundos. |
Algumas observações a respeito dos arquivos deste gist:
tests
e colocar todos os arquivos lá e utilizar o comando python -m unittest
como consta na documentação [1].""" | |
Simple script to get the citzen name by its CPF (Brazil's SSN) | |
""" | |
from BeautifulSoup import BeautifulSoup as bs | |
import requests | |
import urllib2 | |
with requests.session() as session: | |
url = 'http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/ConsultaPublica.asp' | |
response = session.get(url) |
import asyncio | |
from typing import AsyncGenerator, Dict | |
from fastapi import FastAPI | |
from nats.aio.client import Client as NATS | |
from nats.aio.client import Msg | |
from starlette.requests import Request | |
from starlette.responses import StreamingResponse | |
app = FastAPI() |