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
(ns price-day | |
(:require [clj-http.client :as client] | |
[clojure.string :as s] | |
[clojure.core.async :as a :refer [>!! >! <! <!!]] | |
[environ.core :refer [env]] | |
[taoensso.timbre :as log] | |
[taoensso.carmine :as r] | |
[clojure.string :as str])) | |
(def redis-uri (or (env :redis-uri) "redis://localhost:6379")) |
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 python3 | |
import urllib.request | |
import smtplib | |
from email.mime.application import MIMEApplication | |
from email.mime.multipart import MIMEMultipart | |
from datetime import datetime, timedelta | |
KINDLE_ID = '[email protected]' | |
GMAIL_ID = '[email protected]' |
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 | |
from os import rename, walk | |
from os.path import join, splitext, basename | |
import exiftool | |
def get_files(dir): | |
files = [] | |
for d, _, fs in walk(dir): |
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
MButton:: | |
if (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200) | |
Send, ^w | |
else | |
Send, {MButton} | |
Return | |
RButton:: | |
if (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200) { | |
Send, {Browser_Back} |
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 logging | |
from collections import defaultdict | |
from dataclasses import dataclass | |
from multiprocessing import Pipe, Process, Queue | |
from multiprocessing.connection import Connection, wait | |
from os import cpu_count | |
from random import randint | |
from threading import Thread | |
from time import sleep | |
from typing import Any, Callable, DefaultDict, Dict, List, Optional, Set, TypeVar |
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
""" | |
Output: | |
### 2020-06-08 12:00 | |
Title and contents are here | |
### 2020-06-09 12:00 | |
Another title and contents are here | |
""" |
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 subprocess import call | |
from time import sleep | |
from selenium import webdriver | |
from pathlib import Path | |
DRIVER_PATH = 'C:/Users/y/AppData/Local/Google/Chrome/chromedriver.exe' | |
SOURCE_PATH = 'source' | |
BUILD_PATH = 'build' | |
INTERVAL = 1 |
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
exiftool "-FileName<CreateDate" -d "%Y%m%d %H%M%S.%%e" . | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext jpg ./ | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mov ./ | |
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mp4 ./ | |
# Regenerate broken movie files | |
# exiftool -time:all -a -G0:1 -s "20130607 190850.m4v" | |
# ffmpeg -i "20130607 190850.m4v" -acodec copy -vcodec copy -f mov "20130607 190850.mov" |
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
#SingleInstance | |
; get filename | |
SplitPath, A_ScriptName, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive | |
; convert text to number | |
minutes := OutNameNoExt, minutes += 0 | |
; set minutes 30 if the conversion above failed | |
if minutes is space |