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
function sendEmailOnDate() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var startRow = 2; // Start checking for dates from row 2 | |
var numRows = sheet.getLastRow() - 1; // Number of rows to check | |
var dataRange = sheet.getRange(startRow, 2, numRows, 3); // Range of dates, email body, and number of days to check | |
var data = dataRange.getValues(); // Get values of the range | |
var today = new Date(); // Get current date | |
for (var i = 0; i < data.length; ++i) { |
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 penf_Lab.perflab | |
import perf_Lab.perfobjects | |
import perf_lab.perfutils | |
import perf_lab.config_util | |
from perf_Lab.perfobjects import Server, PerfStackTemplate | |
def get_bm_server_obj() -> Server: | |
server = Server(name='perf-bm-server', | |
image=perf_lab.config_util.BM_IMAGE_LL_UBUNTU_16, | |
flavor= 'server', |
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
NAME=qrm_server | |
DIST_DIR=${PWD}/dist | |
DEBUG_VERSION=debug | |
.PHONY: build check-local dist major _major minor _minor patch _patch debug | |
get_ver: | |
$(eval VERSION :=$(shell vmn show ${NAME})) | |
vmn show --verbose ${NAME} > ./qrm_server/ver.yaml |
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 python2.7 | |
""" | |
pip install piexif | |
pip install pillow | |
""" | |
import glob, os | |
from datetime import datetime | |
import piexif | |
path_to_base_folder = "/Users/ronsh/Downloads/photo_scan/all_pic/" |
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 importlib.util | |
spec = importlib.util.spec_from_file_location("core", "/Users/ronsh/Documents/GitHub/python/stam/core.py") | |
core = importlib.util.module_from_spec(spec) | |
spec.loader.exec_module(core) | |
mycore = core.Core() # type: CoreIfc | |
mycore.run() |
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
def get_logger(app_name:str = 'ron_test_app'): | |
fmt = '[%(asctime)s] [%(module)s] [%(levelname)s] %(message)s' | |
logger = logging.getLogger() | |
logger.setLevel(logging.DEBUG) | |
date = datetime.now() | |
log_file_dir_path ="/tmp/var/log/{}/{}/".format(app_name, date.strftime('%Y/%m-%d')) | |
log_file_name = '{}-{}.txt'.format(app_name, date.strftime('%Y%m%d-%H-%M-%S')) | |
pathlib.Path(log_file_dir_path).mkdir(parents=True, exist_ok=True) | |
fh = logging.FileHandler(log_file_dir_path+log_file_name) | |
fh.setLevel(logging.DEBUG) |
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 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
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 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |