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 datetime import datetime, timedelta | |
| import os | |
| def renameByDatestamp(path, hourAdjustment): | |
| """ | |
| Rename files in a path using the time-created stamp. Adjust name by adding | |
| an integer if files have non-unique timestamps. | |
| Ideal for renaming pictures and videos from multiple sources. |
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 smtplib | |
| def send_email(email, pw, subject, text): | |
| FROM = email | |
| TO = [email] | |
| try: | |
| message = """\From: %s\nTo: %s\nSubject: %s\n\n%s\n""" % (FROM, ", ".join(TO), subject, text) | |
| server = smtplib.SMTP("smtp.gmail.com", 587) # alternatively port 465 | |
| server.ehlo() |
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/python | |
| import os | |
| import re | |
| this_path = os.path.abspath(__file__) | |
| static_path = os.path.abspath(os.path.join(this_path, r'../../project/static')) | |
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
| ' Example function call: =BuildHTMLTable(A1:D5) | |
| Public Function BuildHTMLTable(rng As Range) As String | |
| ' Given a Range of Cells, build a Bootstrap HTML table, using the formatting | |
| ' specified in the Excel cells. If "header" is specified to equal true, assumes | |
| ' the first row in the table is a header row. | |
| Dim last_r As Long: last_r = rng.Cells(1, 1).Row | |
| Dim tds As New Collection | |
| Dim txt As String | |
| Dim isFirstRow As Boolean: isFirstRow = True |
NewerOlder