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 datetime | |
import time | |
timelist = ["0800", "1700", "2400", "0233"] | |
def checkTime(): | |
global timelist | |
date = datetime.datetime.now() | |
date = str(date) | |
date = date.split(" ") |
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
# Run these commands on your linux computer. | |
#apt-get update | |
#apt-get install firefox | |
#pip3 install selenium==3.0.2 | |
#wget https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz -O /tmp/geckodriver.tar.gz && tar -C /opt -xzf /tmp/geckodriver.tar.gz && chmod 755 /opt/geckodriver && ln -fs /opt/geckodriver /usr/bin/geckodriver && ln -fs /opt/geckodriver /usr/local/bin/geckodriver | |
from selenium import webdriver | |
driver = webdriver.Firefox() | |
driver.get('http://google.com') | |
print driver.title |
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 urllib2 | |
import urllib | |
from bs4 import BeautifulSoup | |
def currentWeather(zipcode): | |
url = 'https://forecast.weather.gov/zipcity.php' | |
data = urllib.urlencode({'inputstring': str(zipcode)}) | |
req = urllib2.Request(url=url, data=data) | |
resp = urllib2.urlopen(req) |
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 pytz | |
print "<select name='timezone'>" | |
for i in pytz.all_timezones: | |
print "<option value='" + str(i) + "'>" + str(i) + "</option>" | |
print "</select>" |
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
<option value='Africa/Abidjan'>Africa/Abidjan</option> | |
<option value='Africa/Accra'>Africa/Accra</option> | |
<option value='Africa/Addis_Ababa'>Africa/Addis_Ababa</option> | |
<option value='Africa/Algiers'>Africa/Algiers</option> | |
<option value='Africa/Asmara'>Africa/Asmara</option> | |
<option value='Africa/Asmera'>Africa/Asmera</option> | |
<option value='Africa/Bamako'>Africa/Bamako</option> | |
<option value='Africa/Bangui'>Africa/Bangui</option> | |
<option value='Africa/Banjul'>Africa/Banjul</option> | |
<option value='Africa/Bissau'>Africa/Bissau</option> |
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 bs4 import BeautifulSoup | |
from six.moves import urllib | |
from selenium import webdriver | |
from selenium.webdriver.firefox.options import Options | |
import requests | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.ui import Select |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Title of the document</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<!-- jQuery library --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<!-- Latest compiled JavaScript --> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Modern Search Engine</title> | |
<style> | |
body, html {width: 100%; height: 100%; margin: 0px; background-color: #ffffff;} | |
.bar1, .bar2, .bar3, .bar4, .bar5, .bar6, .bar7, .bar8, .bar9 { | |
margin-left: -30px; | |
} |
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
https://www.calculator.net/rental-property-calculator.html?cprice=100000&cuseloan=yes&cdownpayment=20&cinterest=4.5&cloanterm=30&cothercost=3000&cneedrepair=yes&crepaircost=0&cafterrepairvalue=100000&ctax=1500&ctaxincrease=3&cinsurance=800&cinsuranceincrease=3&choa=0&choaincrease=3&cmaintenance=1000&cmaintenanceincrease=3&cother=200&cotherincrease=3&crent=1000&crentincrease=3&cotherincome=0&cotherincomeincrease=3&cvacancy=1&cmanagement=3&cknowsellprice=no&cappreciation=3&csellprice=200000&cholding=20&csellcost=8&printit=0&ctype=&x=78&y=31 |
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
<html> | |
<body> | |
<script> | |
var originmortgage = (6073 / 12); | |
var origininterest = (0.03 / 12); | |
var downpayment = 20000; | |
var totalcost = 100000; | |
var unpaidbalance = (totalcost - downpayment); | |
function getWoke(mortgage, interest) { | |
console.log(unpaidbalance); |
OlderNewer