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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Remote Weather Data to HTML</title> | |
| <meta charset='utf-8' /> | |
| <style> | |
| body { | |
| font-family: sans-serif; | |
| } | |
| tr:nth-child(odd){ |
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
| quote|author|dob-dod|source|tags | |
| It is a capital mistake to theorize before one has data.|Sir Arthur Conan Doyle|1859-1930|Sherlock Holmes|data, theory | |
| When action grows unprofitable, gather information; when information grows unprofitable, sleep.|Ursula K. LeGuin|1929-2018|The Left Hand of Darkness|action, information, profit | |
| The problems are solved, not by giving new information, but by arranging what we have known since long.|Ludwig Wittgenstein|1889-1951|Philosophical Investigations|philosophy, information | |
| Opinion is usually something which people have when they lack comprehensive information.|Idries Shah|1924-1996|Reflections|opinion, information | |
| Logic takes care of itself; all we have to do is to look and see how it does it.|Ludwig Wittgenstein|1889-1951|Tractatus Logico-Philosophicus|philosophy, logic | |
| The world is all that is the case.|Ludwig Wittgenstein|1889-1951|Tractatus Logico-Philosophicus|philosophy, logic |
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 xmltodict | |
| import json | |
| with open("quotes.xml") as xml_file: | |
| data_dict = xmltodict.parse(xml_file.read()) | |
| json_data = json.dumps(data_dict, indent=2) | |
| print(json_data) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <quotes> | |
| <quote id="82" tags="science, wisdom"> | |
| <quote>Reality is that which, when you stop believing in it, doesn't go away.</quote> | |
| <source> | |
| <name>Phillip K Dick</name> | |
| <dob>1928</dob> | |
| <dod>1982</dod> | |
| <wplink>http://en.wikipedia.org/wiki/Philip_K._Dick</wplink> | |
| <wpimg>https://upload.wikimedia.org/wikipedia/commons/3/36/Philip_K_Dick_in_early_1960s_%28photo_by_Arthur_Knight%29_%28cropped%29.jpg</wpimg> |
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 pandas | |
| from sqlalchemy import * | |
| try: | |
| engine = create_engine("mysql+pymysql://{user}:{pw}@localhost/" | |
| .format(user="root", | |
| pw="")) | |
| DB_NAME = "booksdb" |
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
| publisher_id | publisher_name | |
|---|---|---|
| 1 | OUP Oxford | |
| 2 | Oneworld Publications |
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
| book_id_fk | class_id_fk | |
|---|---|---|
| 1 | 2 | |
| 1 | 7 | |
| 1 | 12 | |
| 2 | 2 | |
| 2 | 12 | |
| 2 | 10 | |
| 2 | 15 |
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
| class_id | class_name | |
|---|---|---|
| 1 | atheism | |
| 2 | anarchism | |
| 3 | anthropology | |
| 4 | anthology | |
| 5 | autobiography | |
| 6 | biography | |
| 7 | ethics | |
| 8 | feminism | |
| 9 | history |
NewerOlder