This file contains 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
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize |
This file contains 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
function YNABAccounts(accessToken, budgetId) { | |
const accounts = _getBudgetAccounts(accessToken, budgetId); | |
if(accounts == null) { | |
return null; | |
} | |
const columns = ["Name", "Type", "Budget", "Closed", "Balance"]; | |
const rows = accounts.map(function (acc) { | |
return [ |
This file contains 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
#### Rename all images in current directory according to the CreateDate date and time, adding a copy number with leading '-' if the file already exists (%-c), and preserving the original file extension (%e). | |
# Note the extra '%' necessary to escape the filename codes (%c and %e) in the date format string. | |
exiftool '-FileName<CreateDate' -d '%Y%m%d %H%M%S%%-c.%%e' . | |
#### Shift values of CreateDate by 2 years, 9 months and 14 days. 0 hours, minutes and seconds | |
exiftool "-CreateDate+=2:9:14 0:0:0" -m . | |
#### View all time info about a given file: | |
## System: | |
# FileModifyDate |
This file contains 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
docket_ids = downloader.get_ids_from_csv("EPA_water_dockets.csv", data_type="dockets") | |
for docket_id in my_dockets: | |
print(f"\n********************************\nSTARTING {docket_id}\n********************************") | |
downloader.gather_comments_by_docket(docket_id, csv_filename="EPA_water_comments.csv") |
This file contains 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
# get the comment headers for these criteria | |
params = {"filter[lastModifiedDate][ge]": "2017-01-01 00:00:00", # API for dockets doesn't have postedDate filter | |
"filter[lastModifiedDate][le]": "2020-12-31 23:59:59", # also, these times are in Eastern time zone | |
"filter[agencyId]": "EPA", | |
"filter[searchTerm]": "water"} | |
# this will download the headers 250 dockets at a time, and save the headers into a CSV | |
# (you could also save them into a SQLite database) | |
downloader.gather_headers("dockets", params, csv_filename="EPA_water_dockets.csv") |
This file contains 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
# download the comments | |
comment_ids = downloader.get_ids_from_csv("EPA_water_comments_header.csv", data_type="comments") | |
downloader.gather_details("comments", comment_ids, csv_filename="EPA_water_comments.csv") |
This file contains 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
for object_id in object_ids: # taken from EPA_water_documents.csv | |
params = {"filter[commentOnId]": object_id} | |
downloader.gather_headers("comments", params, csv_filename="EPA_water_comments_header.csv") |
This file contains 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
for docket_id in docket_ids: | |
params = {"filter[docketId]": docket_id} | |
downloader.gather_headers("documents", params, csv_filename="EPA_water_documents.csv") |
This file contains 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
downloader.gather_comments_by_docket("FDA-2021-N-0270", db_filename="my_database.db", csv_filename="my_csv.csv") |
This file contains 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
my_dockets = ["FDA-2009-N-0501", "EERE-2019-BT-STD-0036", "NHTSA-2019-0121"] | |
for docket_id in my_dockets: | |
print(f"\n********************************\nSTARTING {docket_id}\n********************************") | |
downloader.gather_comments_by_docket(docket_id, db_filename="my_database2.db") | |
print("\nDONE") |
NewerOlder