Dateien optimiert
This commit is contained in:
parent
8575268269
commit
e1c1f86235
4 changed files with 17 additions and 13 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@
|
|||
file/
|
||||
gpxlen.py
|
||||
quickest*
|
||||
config.py
|
||||
__pycache__
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
import json
|
||||
import sys
|
||||
from pprint import pprint
|
||||
from config import database
|
||||
|
||||
import MySQLdb
|
||||
|
||||
try:
|
||||
|
||||
db = MySQLdb.connect(host="localhost", # your host, usually localhost
|
||||
user="root", # your username
|
||||
passwd="Findus", # your password
|
||||
db="citybike") # name of the data base
|
||||
db = MySQLdb.connect(database["host"],
|
||||
database["user"],
|
||||
database["passwd"],
|
||||
database["db"])
|
||||
|
||||
cur = db.cursor()
|
||||
|
|
@ -6,12 +6,13 @@ import xml.dom.minidom
|
|||
from pprint import pprint
|
||||
import MySQLdb
|
||||
|
||||
from config import database
|
||||
from gpxlen import getTrackLength
|
||||
|
||||
db = MySQLdb.connect(host="localhost", # your host, usually localhost
|
||||
user="root", # your username
|
||||
passwd="Findus", # your password
|
||||
db="citybike") # name of the data base
|
||||
db = MySQLdb.connect(database["host"],
|
||||
database["user"],
|
||||
database["passwd"],
|
||||
database["db"])
|
||||
|
||||
cur = db.cursor()
|
||||
|
||||
|
|
10
nearest.py
10
nearest.py
|
@ -3,13 +3,13 @@
|
|||
import subprocess
|
||||
import json
|
||||
from pprint import pprint
|
||||
|
||||
from config import database
|
||||
import MySQLdb
|
||||
|
||||
db = MySQLdb.connect(host="localhost", # your host, usually localhost
|
||||
user="root", # your username
|
||||
passwd="Findus", # your password
|
||||
db="citybike") # name of the data base
|
||||
db = MySQLdb.connect(database["host"],
|
||||
database["user"],
|
||||
database["passwd"],
|
||||
database["db"])
|
||||
|
||||
cur = db.cursor()
|
||||
|
||||
|
|
Reference in a new issue