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
#! /bin/bash | |
SCRIPT=("mongod") | |
PID=$(ps aux | grep -v grep | grep $SCRIPT | awk '{print $2}') | |
if [[ -z "$PID" ]] | |
then | |
nohup /opt/mongo30/mongodb/bin/mongod --dbpath /var/lib/mongodb/ --storageEngine wiredTiger --port 27017 & | |
else |
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
from lxml import html | |
import requests | |
from bs4 import BeautifulSoup | |
import xlsxwriter | |
import re | |
from slimit import ast | |
from slimit.parser import Parser | |
from slimit.visitors import nodevisitor | |
from datetime import datetime |
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
from PIL import Image,ImageDraw, ImageFont, ImageEnhance | |
def image_watermark(request,image_id): | |
photo = Photo.objects.get(pk=image_id) | |
basewidth = 640 | |
watermark = Image.open('{0}/{1}'.format(settings.MEDIA_ROOT,'art1.png')) | |
img = Image.open(photo.photo.file) | |
wpercent = (basewidth/float(img.size[0])) | |
hsize = int((float(wpercent)*float(img.size[1]))) | |
img = img.resize((basewidth,hsize),Image.ANTIALIAS) |
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
$scope.substr = function(string, start, end) { | |
return string.substr(start, end); | |
} | |
$scope.split = function(string, nb) { | |
var array = string.split(','); | |
return array[nb]; | |
} | |
/* |