TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main| # zsh | |
| EMOJI=(๐ฉ ๐ฆ ๐ ๐ ๐จ ๐ ๐ญ ๐ฝ โ๏ธ ๐ฌ ๐ ๐ท ๐ผ ๐ถ ๐ธ ๐ง ๐ณ ๐ ๐ฃ ๐ป ๐ฎ ๐ฐ ๐ ๐พ ๐ ๐ช ๐ ๐ ๐ ๐ ๐ ) | |
| function random_emoji { | |
| echo -n "$EMOJI[$RANDOM%$#EMOJI+1]" | |
| } | |
| PROMPT="$(random_emoji) " | |
| RPROMPT='%c' |
| # zsh | |
| EMOJI=(๐ฉ ๐ฆ ๐ ๐ ๐จ ๐ ๐ญ ๐ฝ โ๏ธ ๐ฌ ๐ ๐ท ๐ผ ๐ถ ๐ธ ๐ง ๐ณ ๐ ๐ฃ ๐ป ๐ฎ ๐ฐ ๐ ๐พ ๐ ๐ช ๐ ๐ ๐ ๐ ๐ ) | |
| function random_emoji { | |
| echo -n "$EMOJI[$RANDOM%$#EMOJI+1]" | |
| } | |
| PROMPT="$(random_emoji) " | |
| RPROMPT='%c' |
| import urllib.request | |
| url = 'http://www.portaltransparencia.gov.br/copa2014/api/rest/empreendimento' | |
| resp = urllib.request.urlopen(url).read().decode('utf-8') | |
| total = 0 | |
| j = 0 | |
| while True: | |
| abre = '<valorTotalPrevisto>' | |
| fecha = '</valorTotalPrevisto>' | |
| j = resp.find(abre, j) | |
| if j == -1: |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def hello(): | |
| await asyncio.sleep(3) | |
| print('Hello!') | |
| if __name__ == '__main__': | |
| loop.run_until_complete(hello()) | |
| const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); | |
| const pixels = imageData.data; | |
| for (let i = 3, n = canvas.width * canvas.height * 4; i < n; i += 4) { | |
| pixels[i] = pixels[i] < 127? 0 : 255 | |
| } | |
| ctx.putImageData(imageData, 0, 0); |