semvec/pypi-packages huggingface dataset:
django-green-grove 0.1.2
Collection of helpers to back up Django projects that use a Postgres database and a S3 bucket as media storage.
License: MIT
Keywords: django-green-grove

==================
django-green-grove
==================

Collection of helpers to back up Django projects that use a Postgres database and a S3 bucket as media storage.


Quickstart
----------

Install django-green-grove using pip::

    pip install django-green-grove


Add the following to your ``settings.py`` module::

    BACKUP_BUCKET_AWS_ACCESS_KEY_ID = ''
    BACKUP_BUCKET_AWS_SECRET_ACCESS_KEY = '
    BACKUP_BUCKET_BUCKET_NAME = ''
    BACKUP_BUCKET_LOCATION = ''


Backup Project
--------------

We suggest to use this management command as a cron tab::

    python manage.py backup_project


Tutorial
--------

This tutorial covers the steps that are needed to backup and restore a Django project that uses a Dokku hosting with a Postgres database and a S3 Bucket as media storage.

**Backup project**

1.  Connect to your server
2.  Connect to the docker container: ``dokku enter <project_name>``
3.  ``python manage.py backup_project``

**Restore from backup**

1.  Connect to your server
2.  Connect to the database: ``dokku postgres:connect db``
3.  Drop the database: ``DROP DATABASE <db_name>;``
4.  Recreate the database: ``CREATE DATABASE <db_name>;``
5.  Grant privileges: ``GRANT ALL PRIVILEGES ON DATABASE <db_name> to <username>;``
6.  Exit the postgres console and the session on the server
7.  Download the database dump file from the bucket to your local machine: ``s3cmd cp <path_of_dump_file> .``
8.  Move the dump file to the server: ``scp <path_of_dump_file> <server>``
9.  Connect to your server
10. Import the dump: ``cat <file_name> | sudo docker exec -i dokku.postgres.db psql -U <username> <db_name>``
11. Remove the media folder of your bucket (s3cmd or web interface)
12. Open up the terminal on your local machine
13. Copy the backup of the media folder back to the bucket:
    ``s3cmd cp --recursive  --acl-public s3://backups/<project_name>/<timestamp>/media/ s3://<project_name>/media/``


Trivia
------

This package is named after the fictional retirement community where Tony Soprano, Paulie Gualtieri, and other Mafiosi admit their mothers, in The Sopranos.


Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------
abrox 2.0.2
A tool for Approximate Bayesian Computation
License: MIT

![Logo](abrox/gui/icons/readme_logo.png)

# Approximate Bayes rocks!

`ABrox` is a python package for Approximate Bayesian Computation accompanied by a user-friendly graphical interface. 

## Features

* Model comparison via approximate Bayes factors
    + rejection
    + random forest
* Parameter inference
    + rejection
    + MCMC
 * Cross-validation

## Installation

Note that `ABrox`only works with Python 3.

`ABrox` can be installed via pip. Simply open a terminal and type:

```bash
pip install abrox
```

It might take a few seconds since there are several dependencies that you might have to install as well. 

### MacPorts

If you installed Python via MacPorts, the `abrox-gui` command after installation of `abrox` does not work.
You can alternatively start the GUI via (assuming Python version 3.5):

```bash
cd /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/abrox/gui/
python3.5 main.py
```

### Windows

Unfortunately, the installation under Windows is a bit cumbersome. We explain the relevant steps below.

If not already done, install a Python3 version from [here](https://www.python.org/).

Check the version of Python that is installed by typing `python` into the console.

![Python on Windows](abrox/gui/icons/python_windows2.png)

Now, install Visual Studio Build Tools from:

1. [here](http://landinghub.visualstudio.com/visual-cpp-build-tools)

Now visit the following page to install the Scipy wheel. Choose the link that fits
your Python version (see picture above). `cp` should be followed by the actual version (e.g. `cp36`) while
the last part of the link should match the bit-version (e.g. `win32`).  

2. [here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy)

After the installation, open a console in the directory the wheel has been downloaded into and type:

```bash
python -m pip install #name_of_the_whl_file
``` 

Repeat the same steps for the Numpy wheel:

3. [here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy)

Now, open a terminal and type:

```bash
python -m pip install abrox
```

You are now ready to use `ABrox`!

## ABrox using the GUI

After `ABrox` has been installed, you can start the user interface by typing `abrox-gui`.
We provide several templates in order to get more familiar with the GUI. 

## ABrox using Python

If you are more comfortable with plain Python, you can run your project once from the GUI and
continue working with the Python-file that has been generated in the output folder.

## Templates

We provide a few example project files so you can see how `ABrox` works ([here](https://github.com/mertensu/ABrox/tree/master/project_files)). 
Currently, we provide:

* Two-sample t-test
* Levene-Test

### Contributors

* [Ulf Mertens](http://www.psychologie.uni-heidelberg.de/ae/meth/team/mertens/)
* Stefan Radev