semvec/pypi-packages huggingface dataset:
rescape-region 0.2.37
Geospatial region support for Rescape projects

=====
Rescape-Region
=====

A Django app to support limiting users by geographic region

Quick start
-----------

1. Add "rescape-region" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'rescape-region',
    ]

2. Include the polls URLconf in your project urls.py like this::

    path('rescape-region/', include('regional.urls')),

3. Run `python manage.py migrate` to create the rescape-region models.

## Installation

Create a virtual environment using
```bash
mkdir ~/.virtualenvs
python3 -m venv ~/.virtualenvs/rescape-region
Activate it
source ~/.virtualenvs/rescape-region/bin/activate
```

#### Install requirements
Install requirements with latest versions
```bash
# pur tries to use python 2, so use pip-upgrade instead
pur -r requirements.txt && $VIRTUAL_ENV/bin/pip3 install --no-cache-dir  --upgrade -r requirements.txt
```

Add the following to the bottom $VIRTUAL_ENV/bin/activate to setup the PYTHONPATH.
Replace the path with your code directory

```bash
export RESCAPE_REGION_BASE_DIR=/Users/andy/code/rescape-region
export RESCAPE_REGION_PROJECT_DIR=$RESCAPE_REGION_BASE_DIR/rescape-region
export PYTHONPATH=.:$RESCAPE_REGION_BASE_DIR:$RESCAPE_REGION_PROJECT_DIR
```

## Build

Update the version in setup.py
Run to generate build:
Update the version with bumpversion, which can't seem to look it up itself but updates setup.py

install wheel and bumpversion if needed
```
pip3 install wheel
pip3 install bumpversion
```

```bash
git commit . -m "Version update" && git push
bumpversion --current-version {look in setup.py} patch setup.py
python3 setup.py clean sdist bdist_wheel
```

To distribute to pypi site:
Upload package:

```bash
twine upload dist/*
```

All at once:
```bash
git commit . -m "Version update" && git push && bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/*
# Without commit
bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/*
```

For setup of testpypi see ~/.pypirc or create one according to the testpypi docs:
e.g.:
[distutils]
index-servers=
    pypi
    testpypi

[testpypi]
repository: https://test.pypi.org/legacy/
username: your username for pypi.org

## Running tests
Create a postgres database rescape_region
# Login to psql:
CREATE DATABASE rescape_region;
CREATE USER test_user WITH PASSWORD 'test';
GRANT ALL PRIVILEGES ON DATABASE rescape_region to test_user;
# Give Superuser permission to create test databasees
ALTER ROLE test_user SUPERUSER;

# Migrate the database
./manage migrate

# Create a Django user test with pw testpass
 ./manage.py createsuperuser
 # or
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('test', 'test@nowhere.man', 'testpass')" | ./manage.py shell
multimorbidity-hypergraphs 0.3.5
A toolbox for large scale data analysis using hypergraphs
Requires Python: >=3.5

# Hypergraphs for Multimorbidity Research

[![Tests](https://github.com/jim-rafferty/multimorbidity_hypergraphs/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/jim-rafferty/multimorbidity_hypergraphs/actions/workflows/python-package-conda.yml) 
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5285008.svg)](https://doi.org/10.5281/zenodo.5285008)

This is a collection of tools for constructing and analysing hypergraphs from 
data. Hypergraphs are very general and powerful objects for data analysis which 
connect nodes and edges. As for binary graphs, nodes can conect to any number of 
edges but in a hypergraph, edges can connect to any number of nodes which leads
to some very useful features! 

This set of tools is for the analysis of large scale data with hypergraphs, 
i.e, a specialist
toolkit that will focus on a small number of specific features. If you 
are looking for a general tool kit for hypergraphs including visualisation, check 
out hypernetx (https://github.com/pnnl/HyperNetX). 

A publication describing what this code does can be found here: https://www.sciencedirect.com/science/article/pii/S1532046421002458

Install using pip: `pip install multimorbidity-hypergraphs`

To import: `import multimorbidity_hypergraphs as hgt`

Run tests using `pytest` in the top directory.
Redj-Captcha 1.1.8
Django / Rest Framework Captcha
Requires Python: >=3

# Redj Captcha
Django / Rest Framework captcha
Safe, flexible and easy to use

## Getting Started

> in `setting.py`:

```
INSTALLED_APPS = [
    ...
    'redjcaptcha',
]
```

in terminal `python manage.py migrate`

> in `urls.py` :

```
from django.urls import path, include

urlpatterns = [
    ...
    path('', include('redjcaptcha.urls')),
]
```
and check check `http://localhost:8000/captcha`

> check Captcha (django):
```
from redjcaptcha.setup import checkCaptcha

check = checkCaptcha(captcha_key, captcha_value)
if check==False:
    return 'inValid'
```
or use `fullCheckCaptcha` for check `ip` and `User-agent`
```
from redjcaptcha.setup import fullCheckCaptcha

check = fullCheckCaptcha(request)
if check==False:
    return 'inValid'
```

> check Captcha (rest_framework):
```
from rest_framework import serializers
from redjcaptcha.setup import checkCaptcha

class CaptchaSerializer(serializers.Serializer):
    captcha_key = serializers.CharField()
    captcha_value = serializers.CharField()

    def validate(self, data):
        check = checkCaptcha(data['captcha_key'], data['captcha_value'])
        if check==False:
            print('\n=====> Captcha faild')
            raise Exception()

        print('\n=====> Captcha success')
        return check
```

>if use `Redj Log` pakeg:
```
from redjcaptcha import redjlog

redjlog.fullCheckCaptcha(request)
```

> change default setting:
```
from redjcaptcha.setup import init

init(
    size=6, => count of word
    debug=True, => disable captcha
    font_size=50, => font size
    timeout=6000, => expire captcha after 6000s
    type="str-int", => type of captcha : int | str | str-int
    image_height=70, => image height
    image_weight=180, => image weight
    text_color="random", => text color (defualt random)
    pre_request_inVmin= 10, => max request in 5 minits
    background_color="#fff" => background image or #00000040
)
```
phcli 4.0.0
pharbers dag scheduler config
Requires Python: >=2.7

# phDagCommand
Pharbers Python 工具集合

## 打包和发布方式
```androiddatabinding
# pipy 打包发布方式
1. 修改 phcli/define_value.py 中 CLI_CLIENT_VERSION 的版本号 
2. 修改 file/ph_max_auto/phDagJob-*.tmp 中的 install_phcli 版本号
   并将 file/ph_max_auto/phDagJob-*.tmp 上传到 s3://ph-platform/*/template/python/phcli/maxauto/ 下
3. 修改 phcli/ph_max_auto/define_value.py 中新的模板文件版本

4. 打包
$ rm -rf build/ dist/
$ python setup.py sdist bdist_egg bdist_wheel

5. 上传
发布 pypi 
$ python -m twine upload dist/*
将生成的 dist/phcli-XXX-py3.8.egg 添加到 s3://ph-platform/*/jobs/python/phcli/common/ 下
```

## 清洗打包流程
```
# zip 打包方式(scala 调用方式)
$ python setup.py sdist --formats=zip
```

## 安装方式
```androiddatabinding
$ pip install phcli
```

## 使用方法
```androiddatabinding
> phcli -h
```

# 更新文档
## 2.2.1    2021/1/29
1. 紧急修复 bug，在 .ipynb 中无法读取 ~/.profile 中的环境变量

## 2.2.0    2021/1/25
1. 新增 recall 召回功能，可撤回 publish 的 dag。``phcli maxauto recall --name dag_name``

## 2.1.0    2021/1/22
1. Jupyter Spark Session 更语义化的 App Name
2. 对 Jupyter R 的支持
3. 修复了 phcli maxauto dag 后，无法取参的问题

## 2.0.4
1. 修复 jupyter dag 时 timeout 参数的 bug
2. 修复 preset.write_asset 的 bug

## 2.0.3
1. phcli maxauto create 新增 option [--timeout]，指定 job 运行的超时时间（min），默认为 60 min。

## 2.0.0
1. 之前的 phcli maxauto --cmd XXX --option 改为 phcli maxauto XXX --option
2. phcli maxauto 新增两个 option，[--ide] 可选 c9(默认)，jupyter。[--runtime] 可选 python3(默认)，r。
3. phcli maxauto create 新增 option [--command] 可选 submit(默认)，script。
4. create/combine/dag 执行过程中出现目录已存在会提示是否覆盖。
5. phcli maxauto combine 新增参数 [--owner]，[--tag]，[--jobs]。
6. phcli maxauto submit 改为 phcli maxauto online_run

## 1.2.3
1. dag airflow list 完成
2. phcli 1.2.3 spark submit 中文乱码 bug 解决
3. phcli 1.2.2 修复 submit jar 问题