- Prelude to Foundation
- Forward the Foundation
- Foundation
- The Psychohistorians
- Trantor (a planet)
- Hari Seldon
- The Encyclopedists
- First crisis, The Vault is opened
- The Mayors
- Terminus (a planet)
- Salvor Hardin
- Second crisis
- The Traders
- Askone (a planet)
- Limmar Ponyets
- Eskel Gorov
- The Merchant Princes
- Hober Mallow
- Foundation and Empire
- Part I: The General
- Search for Magicians
- The Magicians
- The Dead Hand
- The Emperor
- The War Begins
- The Favorite
- Bribery
- To Trantor
- On Trantor
- The War Ends
- Part II The Mule
- Bride and Groom
- Bayta and Turan
- Captain and Mayor
- Mayor Indbur
- Lieutenant and Clown
- The Mutant
- The Psychologist
- Conference
- The Visi-Sonor
- Fall of the Foundation
- Start of the Search
- Conspirator
- Interlude in Space
- Death on Neotrantor
- The Ruins of Trantor
- Convert
- Death of a Psychologist
- End of the Search
- Second Foundation
- Foundation's Edge
- Foundation and Earth
Wednesday, November 1, 2017
Foundation books
Friday, February 3, 2017
Centering an image horizontally and vertically in HTML5
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Logo</title>
</head>
<style>
img {
position: absolute;
top: 50%;
left: 50%;
width: 800px;
height: 800px;
margin-top: -400px; /* Half the height */
margin-left: -400px; /* Half the width */
}
</style>
<body>
<img src="Logo.png" />
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>Logo</title>
</head>
<style>
img {
position: absolute;
top: 50%;
left: 50%;
width: 800px;
height: 800px;
margin-top: -400px; /* Half the height */
margin-left: -400px; /* Half the width */
}
</style>
<body>
<img src="Logo.png" />
</body>
</html>
Wednesday, January 11, 2017
2017 Federal Holidays
Date | Holiday |
---|---|
Monday, January 2 | New Year’s Day |
Monday, January 16 | Birthday of Martin Luther King, Jr. |
Monday, February 20 | Washington’s Birthday |
Monday, May 29 | Memorial Day |
Tuesday, July 4 | Independence Day |
Monday, September 4 | Labor Day |
Monday, October 9 | Columbus Day |
Friday, November 10 | Veterans Day |
Thursday, November 23 | Thanksgiving Day |
Monday, December 25 | Christmas Day |
Taken from: https://www.opm.gov/policy-data-oversight/snow-dismissal-procedures/federal-holidays/#url=2017
Python BeautifulSoup Example
#!/usr/bin/python
from urllib import urlopen
from bs4 import BeautifulSoup
url = 'https://www.theice.com/marketdata/reports/icefutureseurope/BrentMarkers.shtml'
html = urlopen(url)
bsObj = BeautifulSoup(html.read())
# The markers are in a table, there are several tables on the page
# The Afternoon markers are in the table that follows a paragraph with
# the text ICE BRENT AFTERNOON MARKERS
# Find all the tables in the document
tables = bsObj.findAll('table', {'class':'table table-responsive table-data table-align-left'})
table_body = None
# Iterate over the tables looking at the previous paragraph
for table in tables:
p = table.find_previous('p')
# Check for the afternoon markers text
if p.get_text() == 'ICE BRENT AFTERNOON MARKERS':
print(p.get_text())
# Extract that table
table_body = table.find('tbody')
break
if table_body <> None:
# Get all the rows
rows = table_body.find_all('tr')
# Print each row
for row in rows:
cols = row.find_all('td')
print('%s %s %s' % (cols[0].text.strip(), cols[1].text.strip(), cols[2].text.strip()))
else:
print('No markers!')
raw_input('Press Enter to continue ...')
##END##
from urllib import urlopen
from bs4 import BeautifulSoup
url = 'https://www.theice.com/marketdata/reports/icefutureseurope/BrentMarkers.shtml'
html = urlopen(url)
bsObj = BeautifulSoup(html.read())
# The markers are in a table, there are several tables on the page
# The Afternoon markers are in the table that follows a paragraph with
# the text ICE BRENT AFTERNOON MARKERS
# Find all the tables in the document
tables = bsObj.findAll('table', {'class':'table table-responsive table-data table-align-left'})
table_body = None
# Iterate over the tables looking at the previous paragraph
for table in tables:
p = table.find_previous('p')
# Check for the afternoon markers text
if p.get_text() == 'ICE BRENT AFTERNOON MARKERS':
print(p.get_text())
# Extract that table
table_body = table.find('tbody')
break
if table_body <> None:
# Get all the rows
rows = table_body.find_all('tr')
# Print each row
for row in rows:
cols = row.find_all('td')
print('%s %s %s' % (cols[0].text.strip(), cols[1].text.strip(), cols[2].text.strip()))
else:
print('No markers!')
raw_input('Press Enter to continue ...')
##END##
Subscribe to:
Posts (Atom)