Skip to content

Instantly share code, notes, and snippets.

View maluta's full-sized avatar

Tiago Maluta maluta

View GitHub Profile
#/usr/bin/python
'''
My best score in 'Swing Copters' was using this code... :/
https://play.google.com/store/apps/details?id=com.dotgears.swing&hl=en
** Tested only on LG Nexus 4 **
To run just copy this file and run on terminal
# monkeyrunner swing_copters.py
# maybe you saw the student making something like
type = 5
len = 4
#restore
from __builtin__ import type
from __builtin__ import len
type(5)
# <type 'int'>
/* Extension using Worldcup data */
/* JSON data http://worldcup.sfg.io */
/* by Tiago Maluta (@maluta) <[email protected]>, Jun 2014 */
new (function() {
var ext = this;
ext._shutdown = function() {};
ext._getStatus = function() {
{
"extensionName": "ScratcherControl",
"extensionPort": 50007,
"blockSpecs": [
["r", "Voice Command", "voice-command"],
["r", "Accelerometer X", "accelerometer-x"],
["r", "Accelerometer Y", "accelerometer-y"],
["r", "Accelerometer Z", "accelerometer-z"],
["r", "Brightness", "light-level"],
["b", "Start Button Pressed?", "start-button-pressed"],
---
# python 3
>>> print(42)
42
# python 2
>>> print 42
42
@maluta
maluta / main.py
Last active August 29, 2015 14:01
Kivy example
## Kivy contact and support:
# http://kivy.org/docs/contact.html
# Kivy on irc.freenode.net
#
## Kivy android build doc:
# http://kivy.org/docs/guide/packaging-android.html
#
## Python-for-android:
# https://github.com/kivy/python-for-android
# http://python-for-android.readthedocs.org/en/latest/
Setor de Legalizações e Rede Consular Estrangeira– SLRC
Ministério das Relações Exteriores – MRE
Esplanada dos Ministérios – Bloco H, Anexo I, Térreo
CEP: 70170-900, Brasília – DF
Ministério das Relações Exteriores - Escritório de Representação em São Paulo (ERESP)
Setor de Legalização de Documentos
Avenida das Nações Unidas, 11857, 4° andar
CEP 04578-908 São Paulo – SP
for info in listDirectory("c:\Users\\rafael\Music\Músicas\ ", [".mp3"]):
print ("\n".join(["%s=%s" % (k, v) for k, v in info.items()]))
print
@maluta
maluta / wa.py
Created January 28, 2014 05:03
I wanted to backup an Whatsapp previus conversation, from my old phone. It was instaled in a device CyanogenMon 2.3.x (+root) so I didn't have trouble to get msgstore.db. I personally don't know why it was store in plain-text but I need do what I have to do. I posting this just for very basic reference
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sqlite3 as lite
import sys
# found at /data/data/com.whatsapp/databases
con = lite.connect('msgstore.db')
'''