Avoid using "/" at the end of the directory paths as they would generate empty filename when used with functions like os.path.split() > > > import os > > > os . path . split ( '/tmp/foo' ) ( '/tmp' , 'foo' ) > > > os . path . split ( '/tmp/foo/' ) ( '/tmp/foo' , '' ) Reference: https://docs.python.org/2/library/os.path.html
When the regex being compiled in python which has multiple wild cards like plus or asterisks sequentially repeated, you will need to escape or else run into "multiple repeat error". This can happen with any of re module methods like search and sub etc, where the regex is compiled. > > > import re > > > re . compile ( " r++ " ) Traceback ( most recent call last ) : File " <stdin> " , line 1 , in < module > File " /usr/lib/python2.7/re.py " , line 190 , in compile return _compile ( pattern , flags ) File " /usr/lib/python2.7/re.py " , line 242 , in _compile raise error , v # invalid expression sre_constants . error : multiple repeat > > > re . compile ( " r** " ) Traceback ( most recent call last ) : File " <stdin> " , line 1 , in < module > File " /usr/lib/python2.7/re.py " , line 190 , in compile return _...
To enable nfs caching on ubuntu, sudo apt-get install cachefilesd sudo sed -i 's/nfs rw/nfs fsc,rw/' /etc/fstab service restart cachefilesd To use tmpfs instead of disk cache use this after making sure the runner has atleast 12G of memory, mount | grep fscache || mount -t tmpfs -o size=8192m tmpfs /fscache ls /fscache/disk0 || dd if=/dev/zero of=/fscache/disk0 bs=1M count=8191 sleep 15 ls /fscache/disk0 && echo 'y' | mkfs.ext4 /fscache/disk0 mount /fscache/disk0 /var/cache/fscache -t ext4 service cachefilesd restart
Comments