Skip to content

Instantly share code, notes, and snippets.

View ronshilo's full-sized avatar

ron sh ronshilo

  • Tel Aviv, Israel
View GitHub Profile
@ronshilo
ronshilo / code.gs
Created May 15, 2023 11:12
google sheets e-mail reminder
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) {
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',
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
#/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/"
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()
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)
@ronshilo
ronshilo / SimpleHTTPServerWithUpload.py
Created January 13, 2018 12:26 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/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.
"""
@ronshilo
ronshilo / SimpleHTTPServerWithUpload.py
Created January 13, 2018 12:26 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/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.
"""