http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html https://www.youtube.com/watch?v=_wiGpBQGCjU
Objetivo: colocar a primeira letra de cada palavra em maiúsculo, exceto em preposições 'da', 'de', 'di', 'do', 'du', 'para' ...
Texto: minicurso de python para mulheres
Resultado esperado: Minicurso de Python para Mulheres
def test_login_page(self): | |
""" | |
Test Login Page | |
""" | |
response = self.client.get(reverse("login")) | |
self.assertEqual(response.status_code, 200) | |
# Usuário não existe | |
response = self.client.post(reverse("login"), {'username': 'unknown', 'password': 'doesnotexist'}) | |
import io | |
import sys | |
class IteratorFile(io.TextIOBase): | |
""" given an iterator which yields strings, | |
return a file like object for reading those strings """ | |
def __init__(self, it): | |
self._it = it | |
self._f = io.StringIO() |
all: | |
python main.py ProcessFiles --local-scheduler | |
clean: | |
rm -rf tmp/ zip.filelist.* | |
This is the first step of my first attempt to learn canvas. I want to improve a piece a made a few weeks ago about the division of occupations. The d3.js version has so many DOM elements due to all the small bar charts that it is very slow. Therefore, I hope that a canvas version might improve things.
In this block I create a static circle pack layout that still uses a lot of D3 code, but eventually it is the canvas that draws it to the screen
I wrote a more extensive tutorial around what I learned while doing this project in my blog Learnings from a D3.js addict on starting with Canvas in which this can be seen as step 1. See the next version that has less D3 but less overall code as well
If you want to see the final result, with everything up and running in canvas look [here](http://www.visualcinnamon.com/occupation
# aecho.py | |
from socket import * | |
import asyncio | |
loop = asyncio.get_event_loop() | |
async def echo_server(address): | |
sock = socket(AF_INET, SOCK_STREAM) | |
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Script Send Mail Nagios (send_mail.py) | |
Copyrighted by Nilton OS <jniltinho at gmail.com> | |
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) | |
Version: 0.1 | |
Put this script in Nagios plugins folder |
redis: | |
image: redis | |
postgres: | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=sentry | |
- POSTGRES_USER=sentry | |
volumes: | |
- /var/lib/postgresql/data |