Command | Sample | Description |
---|---|---|
pipe | - | Liga a saida de um comando na entrada de outro |
&& | cmd && cmd | Executa um comando logo após o outro |
cat | cat | Duplica o conteúdo digitado (ctrl+d = sair) |
cat | cat file.txt | Lê um arquivo (ctrl+d = sair) |
cat | cat > file.txt | Cria um arquivo com o conteúdo digitado (ctrl+d = sair) |
This file contains 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
# Shell script to create a complete Django project. | |
# This script require Python 3.x and pyenv | |
# Settings.py is config to Django 2.2.12 | |
# The project contains: | |
# Settings config | |
# Person model and form | |
# Person list and detail | |
# Person create, update and delete | |
# Admin config |
This file contains 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 urllib.request | |
import json | |
url = 'http://educacao.dadosabertosbr.com/api/escolas?nome=' | |
escola = 'embraer' | |
resp = urllib.request.urlopen(url+escola).read() | |
resp = json.loads(resp.decode('utf-8')) | |
for x in resp[1]: | |
print (x['nome']) | |
print ('Código:', x['cod']) | |
print (x['cidade'], x['estado']) |
This file contains 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
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |