This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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 -*- | |
| # Author: Rriver | |
| # Can you send the easter egg's result to us ? : ) | |
| import urllib,re,random | |
| qw = 'http://www.qpython.org/' | |
| html = urllib.urlopen(qw).read() | |
| reg = r'src="(.*?\.jpg)' | |
| imgre = re.compile(reg) | |
| imglist = re.findall(imgre,html) | |
| pics = [] |
This file contains hidden or 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 socket | |
| import fcntl | |
| import struct | |
| interfaces = [ | |
| b"eth0", | |
| b"eth1", | |
| b"eth2", | |
| b"wlan0", | |
| b"wlan1", |
This file contains hidden or 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.Manifest; | |
| import android.annotation.TargetApi; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| import android.os.Build; | |
| import android.support.annotation.NonNull; |
This file contains hidden or 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
| h1 { | |
| text-align:center; | |
| } | |
| p { | |
| background-color: rgba(255, 0, 0, 0.5); | |
| color: white; | |
| text-align: justify; | |
| } |
This file contains hidden or 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 time | |
| from androidhelper import Android | |
| droid = Android() | |
| droid.startLocating() | |
| locproviders = droid.locationProviders().result | |
| print("locproviders:"+repr(locproviders)) | |
| gpsprovider = droid.locationProviderEnabled('gps').result | |
| print("gpsprovider:"+repr(gpsprovider)) | |
| i = 0 |
This file contains hidden or 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 time | |
| from androidhelper import Android | |
| droid = Android() | |
| droid.batteryStartMonitoring() | |
| time.sleep(5) | |
| bdata = droid.readBatteryData() | |
| print(bdata.result) | |
| bstatus = droid.batteryGetStatus().result | |
| bhealth = droid.batteryGetHealth().result |
This file contains hidden or 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 time | |
| from androidhelper import Android | |
| droid = Android() | |
| ccount = droid.contactsGetCount().result | |
| print("contacts' number:"+str(ccount)) | |
| cids = droid.contactsGetIds().result | |
| print("contacts' list:"+str(cids)) |
This file contains hidden or 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 time | |
| from androidhelper import Android | |
| droid = Android() | |
| droid.startTrackingPhoneState() | |
| time.sleep(1) | |
| pstate = droid.readPhoneState().result | |
| print("phone state:"+str(pstate)) | |
| droid.stopTrackingPhoneState() |
This file contains hidden or 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 androidhelper import Android | |
| droid = Android() | |
| number = droid.dialogGetInput("Phone Number", "Input the phone number you want to send hello").result | |
| droid.smsSend(number,"hello") |
OlderNewer