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
__author__ = "Mark Allan B. Meriales" | |
# based from http://www.pythoncentral.io/watermark-images-python-2x/ | |
# mine uses a picture as a watermark | |
# michaelphan add base_ratio for logo and better logo scale | |
from PIL import Image, ImageEnhance | |
def add_watermark(image_file, logo_file, opacity=1): | |
img = Image.open(image_file).convert('RGB') |
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 __future__ import print_function | |
import httplib2 | |
from apiclient import discovery | |
from django.core.exceptions import ObjectDoesNotExist | |
from django.http import HttpResponseRedirect | |
from oauth2client.client import flow_from_clientsecrets, OAuth2WebServerFlow | |
from oauth2client.contrib import xsrfutil | |
from oauth2client.contrib.django_util.storage import DjangoORMStorage |
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 zeep import Client | |
WSDL_URL = 'http://ws.eoddata.com/data.asmx?wsdl' | |
class Eoddata(): | |
''' | |
usage: | |
eod = Eoddata(username,password) | |
result = eod.send_request(action='Membership') |
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
0x00D15422268E29447c851a684594FD06fEab5F55 |
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 os | |
import time | |
import glob | |
import re | |
import socket | |
import imp | |
import sys | |
import traceback | |
import requests |
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
#!/bin/bash | |
DATETIME=`date +%y%m%d-%H_%M_%S` | |
SRC=$1 | |
DST=$2 | |
GIVENNAME=$3 | |
showhelp(){ | |
echo "\n\n############################################" | |
echo "# bkupscript.sh #" | |
echo "############################################" | |
echo "\nThis script will backup files/folders into a single compressed file and will store it in the current folder." |
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 shutil | |
import sys | |
import glob | |
import os | |
# Reorganizing chia plot on disk to free disk | |
# example python diskweap.py /media/plot1 | |
# will check moving all finish plot from disk6 to 1, 5 to 1, 4 to 1, 3 to 1, 2 to 1 then step to disk 2 => 6 to 2... | |
mount_path = sys.argv[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
#!/usr/bin/env bash | |
# auto clean and update new chia plots directory | |
# remove all plot directory in config.yaml | |
sed -i '/\ \ \-\ \/media\/.*$/d' ~/.chia/mainnet/config/config.yaml | |
# create tmp anchor - tmpdirectory | |
sed -i 's/\ \ plot_directories\:/\ \ plot_directories\:\n\ \ \- tmpdirectory/g' ~/.chia/mainnet/config/config.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
#!/bin/bash | |
# auto rename disk base on vendor and serial of the disk | |
# usage: . ./rdisk.sh /dev/sda | |
sudo apt-get install smartmontools -y > /dev/null | |
HOSTNAME=`hostname` | |
DISK_PATH=$1 | |
DISK_WORK_PATH=$DISK_PATH |
OlderNewer