This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json, requests | |
url = 'https://www.skoob.com.br/v1/bookcase/books/271088/shelf_id:1/page:1/limit:50/' | |
resp = requests.get(url) | |
if resp.status_code != 200: | |
raise Exception('Erro acessando URL', resp.status_code) | |
lista = json.loads(resp.text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def download(request, id): | |
arquivo = get_object_or_404(Arquivo, id_arquivo=id) | |
response = HttpResponse(FileWrapper(arquivo.file), content_type='application/zip') | |
response['Content-Disposition'] = 'attachment; filename={}'.format(os.path.basename(arquivo.file.name)) | |
return response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
XXX_DB_VOLUME='/opt/hospedagem/site_x/mysql_data' | |
XXX_SITE_VOLUME='/opt/hospedagem/site_x/site_data' | |
# Run Mysql | |
echo "Iniciando Mysql" | |
mydql_id=$(docker run --restart=on-failure:5 -d --name site_x_mysql -p 4001:3306 dockerfile/mysql) | |
sleep 2 | |
echo "Status ${mysql_id}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head data-gwd-animation-mode="quickMode"> | |
<link href="gwdpagedeck_style.css" data-version="1.1" data-exports-type="gwd-pagedeck" rel="stylesheet"> | |
<script data-source="custom.elements.min.js" type="text/javascript" src="custom.elements.min.js"></script> | |
<meta name="generator" content="Google Web Designer 1.1.3.1028"> | |
<meta name="template" content="Banner 2.0.16"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set laststatus=2 | |
set noshowmode | |
syntax enable,on | |
filetype plugin indent on | |
"Easier mapleader than the default "\" | |
let mapleader = "," |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
def cpf_checksum(cpf): | |
""" | |
CPF Checksum algorithm. | |
""" | |
if cpf in map(lambda x: str(x) * 11, range(0, 10)): | |
return False |