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
set datestr=%date:~10,4%-%date:~7,2%-%date:~4,2% | |
mysqldump --add-drop-database --all-databases -mstucka -p >e:\mysqldump-library%datestr%.sql | |
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
with open("statereport-geo.csv", 'w', newline='') as csvfile: | |
writer = csv.writer(csvfile) | |
headers = [] | |
for key in rows[0]: | |
headers.append(key) | |
writer.writerow(headers) | |
for row in rows: | |
targetrow = [] | |
for key in headers: | |
targetrow.append(row[key]) |
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 csv | |
import codecs | |
import cStringIO | |
def UnicodeDictReader(utf8_data, **kwargs): | |
csv_reader = csv.DictReader(utf8_data, **kwargs) | |
for row in csv_reader: | |
yield {unicode(key, 'utf-8'):unicode(value, 'utf-8') for key, value in row.iteritems()} | |
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
7-Zip | |
Acrobat Professional | |
Auslogics Disk Defrag | |
Bulk Rename Utility | |
Calibre | |
CCCleaner | |
Chrome | |
DBeaver | |
Dropbox | |
Firefox |
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
pep8 --max-line-length=200 %1 %2 %3 %4 %5 %6 %7 %8 | |
pyflakes %1 %2 %3 %4 %5 %6 %7 %8 |
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
pip install --force-reinstall --ignore-installed MySQL_python-1.2.5-cp27-none-win32.whl | |
pip install --force-reinstall --ignore-installed dataset selenium ipython==5.3.0 notebook==4.4.1 jupyter awesome-slugify | |
pip install pyquery slackclient requests geopy beautifulsoup4 tweepy pylint pyflakes csvkit pycodestyle | |
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
from PIL import Image | |
import os | |
folder = "./static/imgoriginals/" | |
print("Width\tHeight\tFilename") | |
for lead in os.listdir(folder): | |
filename = os.path.join(folder, lead) | |
im = Image.open(filename) | |
width, height = im.size | |
try: |
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
set pythonpath="c:\python27\python" | |
set nonapath="c:\Program Files\hugin\bin\nona.exe" | |
%pythonpath% generate.py -n %nonapath% -o %1 %1.jpg |
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
#!/usr/bin/env python | |
""" | |
This script will take a lat-long pair (e.g., "-80.123, 45.678") in the final column, and determine if any other lines are at that exactly named pair. If so, it scatters them around in a circle. | |
So if other points are adjacent or identical but differently named (-80.123 vs. -80.1230), this won't help much. It works for what it is, and it's not meant to do more. | |
Scattering distance right now is hard-coded (see "meters=100" around line 85). | |
This may use a lot of memory on large datasets, so you might want it to work off a database. I didn't. | |
""" |
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
# pip install python-documentcloud | |
from documentcloud import DocumentCloud | |
import creds | |
username = "[email protected]" | |
password = "somethingsneaky" | |
projectsought = "Cool set of documents" | |
client = DocumentCloud(username, password) | |
project = client.projects.get(title=projectsought) |