Detects audio level of the selected input device and displays a tray icon with the status.
PyAudio
"""Fixed Pendulum Simulation using PyMunk and Pyglet.""" | |
import pymunk | |
import pyglet | |
from pyglet.window import key | |
from pymunk import Vec2d | |
from pymunk.pyglet_util import DrawOptions | |
class Pendulum: |
/* Simple Pulley. */ | |
$fa = 1; | |
$fs = .4; | |
// Disk Dimensions | |
disk_r = 15; | |
disk_d = 10; | |
torus_center_r = disk_r + 4; | |
torus_tube_r = disk_d/2 + 2; |
#! /usr/bin/python | |
"""Example XMLRPC Client which will receive the file.""" | |
import xmlrpclib | |
import zlib | |
class CheckSumError(RuntimeError): | |
"""CheckSum does not match.""" |
Sodexo is a company that provides Meal Allowance for other companies employees, here in Brazil.
This tool scrapes the Sodexo website and provides the account transaction history in a CSV file.
The captcha is not bypassed. The image is displayed throgh ImageMagick and the user has to type the text.
Dependencies
#! /usr/bin/python | |
class Singleton(type): | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
if cls not in cls._instances: | |
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) | |
return cls._instances[cls] |
#! /usr/bin/python | |
import sys | |
import sqlite3 | |
conn = sqlite3.connect(':memory:') | |
c = conn.cursor() | |
# Create table |
#! /usr/bin/python | |
import re | |
import sys | |
import socket | |
def convert_multicast_ip_to_mac(ip_address): | |
"""Convert the Multicast IP to it's equivalent Multicast MAC. | |
Source info: https://technet.microsoft.com/en-us/library/cc957928.aspx |
#! /usr/bin/python | |
import re | |
import hmac | |
import base64 | |
# Key specified by 802.1Q-2011, table 13-1 | |
# Key is encoded in Base64 | |
MAGIC_KEY = 'E6wGpi5H/VH5XSuiQ80DRg==' |
#! /usr/bin/python3 | |
"""Scrape the correios website for package tracking.""" | |
import argparse | |
import http.client | |
import logging | |
import re | |
import requests | |
import sys |