This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android,time | |
droid = android.Android() | |
def getPos(waitTime=15): | |
droid.startLocating() | |
time.sleep(waitTime) | |
loc = droid.readLocation().result | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: iso-8859-15 -*- | |
#you must have python2.7 and wxPython | |
import wx | |
import sys | |
import hashlib | |
class MyFrame(wx.Frame): | |
def __init__(self, *args, **kwds): | |
kwds["style"] = wx.DEFAULT_FRAME_STYLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android | |
import time | |
droid = android.Android() | |
def main(): | |
droid.batteryStartMonitoring() | |
droid.dialogCreateSpinnerProgress("Loading...", "Refreshing informations", 100) | |
droid.dialogShow() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android | |
import time | |
droid = android.Android() | |
def readaccelerometer(read_time=1): | |
droid.startSensing(2) | |
time.sleep(read_time) | |
value = droid.sensorsReadAccelerometer().result | |
droid.stopSensing() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: latin-1 -*- | |
import android | |
import urllib2 | |
droid = android.Android() | |
def translate(to_translate, to_langage="auto", langage="auto"): | |
'''Return the translation using google translate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib import urlretrieve | |
from sys import stdout, argv | |
from time import time | |
from os import getcwd, path | |
import hashlib | |
class download: | |
def __init__(self, link, file_name='', checksum='md5'): | |
self.checksum = checksum.lower() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#not fully working atm | |
import os | |
import os.path | |
import math | |
import sys | |
def dir_size(dir): | |
total = 0 | |
for dirpath, dirnames, filenames in os.walk(dir): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mou@mou ~]$ sudo cat /etc/grub2.cfg | |
[sudo] password for mou: | |
# | |
# DO NOT EDIT THIS FILE | |
# | |
# It is automatically generated by grub2-mkconfig using templates | |
# from /etc/grub.d and settings from /etc/default/grub | |
# | |
### BEGIN /etc/grub.d/00_header ### |
NewerOlder