autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/
- 432 stars, 102 forks, 2950 monthly downloads at 2015-05-13
- GUI toolkit agnostic
enchant() | |
window.onload = () -> | |
game = new Game(320, 320) | |
game.fps = 24 | |
game.preload('chara1.gif') | |
# The images used in the game should be preloaded | |
game.onload = () -> | |
bear = new Sprite(32, 32); |
from urllib.request import Request, urlopen | |
import json | |
req = Request( | |
url='https://api.chucknorris.io/jokes/random', | |
headers={'User-Agent': 'Mozilla/5.0'} | |
) | |
resp = urlopen(req).read() | |
data = json.loads(resp.decode('utf-8')) |
#!/usr/bin/env python | |
import socket | |
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(0x0003)) | |
rawSocket.bind(("mon0", 0x0003)) | |
ap_list = set() | |
while True : | |
pkt = rawSocket.recvfrom(2048)[0] | |
if pkt[26] == "\x80" : | |
if pkt[36:42] not in ap_list and ord(pkt[63]) > 0: | |
ap_list.add(pkt[36:42]) |
{ | |
"BA": [ | |
{ | |
"modulo": 7.0, | |
"id_ibge": 2919207, | |
"nome": "Lauro de Freitas" | |
}, | |
{ | |
"modulo": 50.0, | |
"id_ibge": 2921500, |
autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/
#The context of this program is a course of an hour to journalists who know nothing about programming in a lab with Python 3 only. | |
import urllib.request | |
import json | |
def analisa_detalhe(cod): | |
url = 'http://educacao.dadosabertosbr.com/api/escola/' | |
resp = urllib.request.urlopen(url+str(cod)).read() | |
resp = json.loads(resp.decode('utf-8')) | |
if int(resp['salasExistentes']) > 1: | |
print ('Salas Existentes:', resp['salasExistentes']) |
from decimal import Decimal | |
from math import floor | |
def parcelas(valor, n, div=False, primeira=False): | |
formato = Decimal('0.00') | |
valor = Decimal(valor) | |
if div: | |
parcela = Decimal(floor(valor * 100 / n) / 100) | |
else: |
#!/usr/bin/env python3 | |
import os | |
import sys | |
try: | |
import usb.core | |
import usb.util | |
except ImportError: |
Solution: Ubuntu distros lower than 18.10
will not work in this laptop, as minimum kernal version required is 4.18
.
So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI
mode
raylib has been in development for more than six years now, it has been an adventure! I decided to resume how it was my personal experience working in this free and open source project for such a long time. Just note that the following article explains raylib from a personal point of view, independently of the technical aspects and focusing on the personal adventure; for technical details on raylib evolution, just check raylib history and raylib changelog.
Summer 2012 was ending, I had been working hard on my brand new startup emegeme for about 9 months, developing videogames. I was trying to find my blue-ocean, so, I developed and published two games for Windows Phone platform using the ama