This document has been moved to https://selenium-python.readthedocs.org/en/latest/
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
| #This is the simplest code. I used headers from documentation and tried SO answers https://docs.python.org/3.4/howto/urllib2.html#headers | |
| import RPi.GPIO as GPIO | |
| import urllib2 | |
| GPIO.setwarnings(False) | |
| GPIO.setmode(GPIO.BOARD) | |
| GPIO.setup(3,GPIO.OUT) | |
| true = 1 | |
| while(true): | |
| try: | |
| response = urllib2.urlopen('http://mydomain.com/device1.php') |
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
| <?php | |
| $status1 = file_get_contents("device1.txt"); | |
| echo $status1; | |
| ?> |
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
| <?php | |
| /** | |
| * Example of password hashing and verification with password_hash and | |
| * password_verify | |
| * | |
| * This script is intended to be run from the command line | |
| * like so: 'php -f password_hash_example.php' | |
| * | |
| * @see http://stackoverflow.com/a/20809916/1134565 |
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
| /*Add cursor to the spans and labels*/ | |
| form .mycssdropdown li label, form .mycssdropdown li label span{ | |
| cursor:pointer; | |
| } | |
| /*By default, hide the spans*/ | |
| form .mycssdropdown li label span{ | |
| display:none; | |
| } |
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
| <html lang="en" class="version-d platform-desktop"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>WhatsApp Group Invite</title> | |
| <meta name="twitter:card" content="summary_large_image" /> | |
| <meta name="twitter:site" content="@whatsapp" /> | |
| <meta property="og:title" content="groupchat :)"/> | |
| <meta property="og:image" content="https://www.cdn.whatsapp.net/img/whatsapp-promo-simple.png"/> | |
| <meta property="og:site_name" content="WhatsApp.com"/> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> |
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 os | |
| import sys | |
| os.chdir('O:/python-code/gdrive_upload/') | |
| from pydrive.auth import GoogleAuth | |
| from pydrive.drive import GoogleDrive | |
| #print(os.getcwd()) | |
| try: |
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 paramiko | |
| host_name = "****" | |
| user_name = "****" | |
| password = "****" | |
| try: | |
| ssh_client = paramiko.SSHClient() | |
| ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| ssh_client.connect(hostname=host_name, port=22, username=user_name, password=password) |
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
| var data = JSON.stringify({ | |
| "method": "Authenticate", | |
| "params": { | |
| "database": "database", | |
| "userName": "[email protected]", | |
| "password": "password" | |
| } | |
| }); | |
| var xhr = new XMLHttpRequest(); |
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 datetime | |
| import pytz | |
| my_date = datetime.datetime.now(pytz.timezone('US/Pacific')) | |
| print(my_date) | |
| ''' | |
| for tz in pytz.all_timezones: | |
| print tz |
OlderNewer