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 -xe | |
# | |
# sudo gem install fpm | |
# sudo apt-get install curl | |
# # Put this script in a folder called tomcat-packaging | |
# ./mkdeb.sh 7.0.40 | |
# ./mkdeb.sh 6.0.37 | |
# | |
VERSION=$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
""" a small example for finding intervals | |
""" | |
from pprint import pprint | |
# Data are sorted already by user and date | |
data = [ | |
[ 'user1', '2016/1', 1, 15 ], | |
[ 'user1', '2016/2', 1, 15 ], | |
[ 'user1', '2016/3', 1, 15 ], | |
[ 'user1', '2016/6', 1, 15 ], | |
[ 'user1', '2016/7', 1, 15 ], |
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 wrapt | |
@wrapt.decorator | |
def pass_through(wrapped, instance, args, kwargs): | |
print instance.attr | |
return wrapped(*args, **kwargs) | |
class Class(object): | |
attr = "Hi" |
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
''' | |
This module provides: | |
Thread class: Thread with terminate method. 7 | |
based on this: http://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread-in-python/15274929#15274929 | |
Exemples: see tests | |
''' | |
import threading | |
import ctypes | |
import time |