Skip to content

Commit 586a199

Browse files
committed
creating folder Figs
1 parent 9e20888 commit 586a199

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+38
-36
lines changed

.gitignore

100644100755
File mode changed.

CourseAssignment.md

100644100755
File mode changed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

LICENSE

100644100755
File mode changed.

Notebooks/00_Miscellaneous_Formats.ipynb

100644100755
File mode changed.

Notebooks/01_SQLite.ipynb

100644100755
File mode changed.

Notebooks/01a_Spatial_SQLite.ipynb

100644100755
File mode changed.

Notebooks/02_PostgreSQL.ipynb

100644100755
File mode changed.

Notebooks/03_MySQL.ipynb

100644100755
+38-36
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 1,
14+
"execution_count": 2,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"!pip install -q -U pymysql"
19+
]
20+
},
21+
{
22+
"cell_type": "code",
23+
"execution_count": 6,
1524
"metadata": {},
1625
"outputs": [],
1726
"source": [
@@ -36,34 +45,37 @@
3645
},
3746
{
3847
"cell_type": "code",
39-
"execution_count": 2,
48+
"execution_count": 7,
4049
"metadata": {},
4150
"outputs": [
4251
{
4352
"name": "stdin",
4453
"output_type": "stream",
4554
"text": [
46-
" ········\n"
55+
" ·········\n"
4756
]
4857
}
4958
],
5059
"source": [
5160
"p = getpass.getpass()\n",
52-
"conn = pymysql.connect(host='localhost', port=3306, user='root', passwd = p) #passwd=password, db='mysql')\n",
61+
"conn = pymysql.connect(host='localhost', port=3306, user='root', passwd=p) #, db='mysql')\n",
5362
"cur = conn.cursor()"
5463
]
5564
},
5665
{
5766
"cell_type": "code",
58-
"execution_count": 3,
67+
"execution_count": 8,
5968
"metadata": {},
6069
"outputs": [
6170
{
6271
"name": "stdout",
6372
"output_type": "stream",
6473
"text": [
74+
"('Bercario',)\n",
75+
"('LearningSQL',)\n",
76+
"('Reuters',)\n",
6577
"('information_schema',)\n",
66-
"('example',)\n",
78+
"('matrix',)\n",
6779
"('mysql',)\n",
6880
"('performance_schema',)\n",
6981
"('sys',)\n"
@@ -73,36 +85,40 @@
7385
"source": [
7486
"cur.execute(\"show databases;\")\n",
7587
"for r in cur.fetchall():\n",
76-
" print(r)"
88+
" print(r)"
7789
]
7890
},
7991
{
8092
"cell_type": "code",
81-
"execution_count": 4,
93+
"execution_count": 12,
8294
"metadata": {},
8395
"outputs": [
8496
{
8597
"name": "stdout",
8698
"output_type": "stream",
8799
"text": [
88100
"('columns_priv',)\n",
101+
"('component',)\n",
89102
"('db',)\n",
103+
"('default_roles',)\n",
90104
"('engine_cost',)\n",
91-
"('event',)\n",
92105
"('func',)\n",
93106
"('general_log',)\n",
107+
"('global_grants',)\n",
94108
"('gtid_executed',)\n",
95109
"('help_category',)\n",
96110
"('help_keyword',)\n",
97111
"('help_relation',)\n",
98112
"('help_topic',)\n",
99113
"('innodb_index_stats',)\n",
100114
"('innodb_table_stats',)\n",
101-
"('ndb_binlog_index',)\n",
115+
"('password_history',)\n",
102116
"('plugin',)\n",
103-
"('proc',)\n",
104117
"('procs_priv',)\n",
105118
"('proxies_priv',)\n",
119+
"('replication_asynchronous_connection_failover',)\n",
120+
"('replication_asynchronous_connection_failover_managed',)\n",
121+
"('role_edges',)\n",
106122
"('server_cost',)\n",
107123
"('servers',)\n",
108124
"('slave_master_info',)\n",
@@ -123,49 +139,39 @@
123139
"cur.execute(\"use mysql;\")\n",
124140
"cur.execute(\"show tables;\")\n",
125141
"for r in cur.fetchall():\n",
126-
" print(r)"
142+
" print(r)"
127143
]
128144
},
129145
{
130146
"cell_type": "code",
131-
"execution_count": 5,
147+
"execution_count": 15,
132148
"metadata": {},
133149
"outputs": [
134150
{
135151
"name": "stdout",
136152
"output_type": "stream",
137153
"text": [
138-
"('my_new_table',)\n",
139154
"('my_table',)\n"
140155
]
141-
},
142-
{
143-
"name": "stderr",
144-
"output_type": "stream",
145-
"text": [
146-
"/home/rsouza/Documents/envs/python_env/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, \"Can't create database 'example'; database exists\")\n",
147-
" result = self._query(query)\n",
148-
"/home/rsouza/Documents/envs/python_env/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1050, \"Table 'my_table' already exists\")\n",
149-
" result = self._query(query)\n"
150-
]
151156
}
152157
],
153158
"source": [
154159
"cur.execute(\"CREATE DATABASE IF NOT EXISTS example;\")\n",
155160
"cur.execute(\"USE example;\")\n",
156161
"cur.execute('''CREATE TABLE IF NOT EXISTS my_table \n",
157-
" (text VARCHAR(200)\n",
158-
" DEFAULT NULL)\n",
162+
" (\n",
163+
" text VARCHAR(200) DEFAULT NULL\n",
164+
" )\n",
159165
" ENGINE=MyISAM DEFAULT CHARSET='utf8';''')\n",
160166
"\n",
161167
"cur.execute(\"show tables;\")\n",
162168
"for r in cur.fetchall():\n",
163-
" print(r)"
169+
" print(r)"
164170
]
165171
},
166172
{
167173
"cell_type": "code",
168-
"execution_count": 6,
174+
"execution_count": 16,
169175
"metadata": {},
170176
"outputs": [
171177
{
@@ -174,7 +180,7 @@
174180
"4"
175181
]
176182
},
177-
"execution_count": 6,
183+
"execution_count": 16,
178184
"metadata": {},
179185
"output_type": "execute_result"
180186
}
@@ -190,17 +196,13 @@
190196
},
191197
{
192198
"cell_type": "code",
193-
"execution_count": 7,
199+
"execution_count": 17,
194200
"metadata": {},
195201
"outputs": [
196202
{
197203
"name": "stdout",
198204
"output_type": "stream",
199205
"text": [
200-
"('It always seems impossible until its done.',)\n",
201-
"('In order to succeed, we must first believe that we can.',)\n",
202-
"('Life is 10% what happens to you and 90% how you react to it.',)\n",
203-
"('Start where you are. Use what you have. Do what you can.',)\n",
204206
"('It always seems impossible until its done.',)\n",
205207
"('In order to succeed, we must first believe that we can.',)\n",
206208
"('Life is 10% what happens to you and 90% how you react to it.',)\n",
@@ -211,7 +213,7 @@
211213
"source": [
212214
"cur.execute(\"SELECT * FROM example.my_table;\")# LIMIT 10;\")\n",
213215
"for r in cur.fetchall():\n",
214-
" print(r)"
216+
" print(r)"
215217
]
216218
},
217219
{
@@ -661,7 +663,7 @@
661663
"name": "python",
662664
"nbconvert_exporter": "python",
663665
"pygments_lexer": "ipython3",
664-
"version": "3.7.6"
666+
"version": "3.8.5"
665667
}
666668
},
667669
"nbformat": 4,

Notebooks/04_JupyterSQL.ipynb

100644100755
File mode changed.

Notebooks/05_SQLAlchemy.ipynb

100644100755
File mode changed.

Notebooks/06_Python_ODO.ipynb

100644100755
File mode changed.

Notebooks/07_MongoDB.ipynb

100644100755
File mode changed.

Notebooks/08_ElasticSearch.ipynb

100644100755
File mode changed.

Notebooks/09_Dolthub.ipynb

100644100755
File mode changed.

Notebooks/10_NetworkX.ipynb

100644100755
File mode changed.

Notebooks/10a_NetworkX_plot.ipynb

100644100755
File mode changed.

Notebooks/11_Cytoscape_Graph_Heroku.ipynb

100644100755
File mode changed.

Notebooks/12_SPARQL.ipynb

100644100755
File mode changed.

Notebooks/Example_SQLite_matrix.ipynb

100644100755
File mode changed.

Notebooks/Example_SQLite_search engine.ipynb

100644100755
File mode changed.

Notebooks/Exercises_SQLite.ipynb

100644100755
File mode changed.

README.md

100644100755
File mode changed.

SampleDBs/2013_ERCOT_Hourly_Load_Data.zip

100644100755
File mode changed.

SampleDBs/ACDH_CH_WG4_simplified.xls

100644100755
File mode changed.

SampleDBs/EssentialSQL.sqlite

100644100755
File mode changed.

SampleDBs/HousingPrices.csv

100644100755
File mode changed.

SampleDBs/HousingPrices.zip

100644100755
File mode changed.

SampleDBs/LearningSQLExample.sql

100644100755
File mode changed.

SampleDBs/RobertFrost_Poetry.pdf

100644100755
File mode changed.

SampleDBs/chinook.sqlite

100644100755
File mode changed.

SampleDBs/database-model.gif

100644100755
File mode changed.

SampleDBs/df_yummly.pkl.gzip

100644100755
File mode changed.

SampleDBs/dvdrental.zip

100644100755
File mode changed.

SampleDBs/euro_soccer_sqlite.zip

100644100755
File mode changed.

SampleDBs/european_mayors.csv

100644100755
File mode changed.

SampleDBs/fakedata.csv

100644100755
File mode changed.

SampleDBs/food.json

100644100755
File mode changed.

SampleDBs/hr.sqlite

100644100755
File mode changed.

SampleDBs/influences.csv

100644100755
File mode changed.

SampleDBs/matrix.sql

100644100755
File mode changed.

SampleDBs/mysqlsampledatabase.sql

100644100755
File mode changed.

SampleDBs/reuters.sql

100644100755
File mode changed.

SampleDBs/simple.yaml

100644100755
File mode changed.

SampleDBs/sqlite-sample-database-color.jpg

100644100755
File mode changed.

SampleDBs/t.sql

100644100755
File mode changed.

SampleDBs/test_db-master.zip

100644100755
File mode changed.

0 commit comments

Comments
 (0)