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
""" | |
This script does something and returns something | |
""" | |
__author__ = "" | |
__copyright__ = "" | |
__license__ = "" | |
__version__ = "0.1" | |
__maintainer__ = "" | |
__email__ = "@" |
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
sudo touch ~/.pgpass | |
echo 'host:5432:somedb:someuser:somepass' >> ~/.pgpass | |
sudo chmod 600 ~/.pgpass | |
sudo chown login_username:login_username .pgpass | |
export PGPASSFILE='/home/user/.pgpass' | |
pg_dump -U postgres -h localhost db_name -F c | gzip > /mnt/backup/bkp_name.gz |
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
#speeded up R quantile function | |
#code is based on the original quantile function {stats}: https://svn.r-project.org/R/trunk/src/library/stats/R/quantile.R | |
#This modifed function only supports the 'type 7' quantile algorithm | |
#The following features were removed (to increase perfomance) : | |
# - output quantile names | |
# - error handling such as check if x are factors, or if probs lie outside the [0-1] range | |
#this makes the speeded up function much more prone to errors, but at the same time faster: | |
# x <- runif(10000) |