semvec/pypi-packages huggingface dataset:
pyvp 0.1.1
Vanishing Point Detector

# Automated Rectification of Image

Implements the modified version of the following paper:  

[Chaudhury, Krishnendu, Stephen DiVerdi, and Sergey Ioffe. "Auto-rectification
of user photos." 2014 IEEE International Conference on Image Processing (ICIP).
 IEEE, 2014.](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42532.pdf)

Modifcation note: Instead of finding edge direction using structural tensor and its eigenvectors as in paper, I have used more reliable canny edge detection and probabalistic hough line transform.

##  Results

Input image:

![Input Image](/results/shelf.jpg)

After rectification:

![Rectified Image](/results/shelf_warped.png)

## How it works

First, compute list of 'edgelets'. An edgelet is a tuple of edge location, edge direction and edge strength. 

```python
edgelets1 = compute_edgelets(image)
vis_edgelets(image, edgelets1) # Visualize the edgelets
```

![Edgelets](/results/edgelets.png)

Next, find dominant vanishing point using ransac algorithm. In our case it turns out to be horizontal.

```python
vp1 = ransac_vanishing_point(edgelets1, num_ransac_iter=2000, 
                             threshold_inlier=5)
vp1 = reestimate_model(vp1, edgelets1, threshold_reestimate=5)
vis_model(image, vp1) # Visualize the vanishing point model
```

![Horizontal Vanishing Point](/results/horizontal_vp.png)

Remove the inliers for horizontal vanishing point. Vertical lines should now be dominant. Recompute the vanishing point using ransac should give us vertical vanishing point. 

```python
edgelets2 = remove_inliers(vp1, edgelets1, 10)
vp2 = ransac_vanishing_point(edgelets2, num_ransac_iter=2000,
                             threshold_inlier=5)
vp2 = reestimate_model(vp2, edgelets2, threshold_reestimate=5)
vis_model(image, vp2) # Visualize the vanishing point model
```

![Vertical Vanishing Point](/results/vertical_vp.png)

Finally, compute homography and warp the image so that we have a fronto parellel view with orthogonal axes: 

```
warped_img = compute_homography_and_warp(image, vp1, vp2,
                                         clip_factor=clip_factor)
```

![Rectified Image](/results/shelf_warped.png)
liat-ml-roberta 1.1.5
Multi-Launguage RoBERTa trained by RIKEN-AIP LIAT.

# liat_ml_roberta
RoBERTa trained on Wikipedia Dump.

## How to install

Can use pip to install.

~~~bash
pip install liat_ml_roberta
~~~

## How to use

The loaded models and configurations can be used in the same way as [transformers.roberta](https://huggingface.co/docs/transformers/model_doc/roberta).

~~~python
from liat_ml_roberta import RoBERTaTokenizer


def main():
    tokenizer = RoBERTaTokenizer.from_pretrained(version="en_20190121_m10000_v24000_base")
    print(tokenizer.tokenize("This is a pen."))

    config = RoBERTaConfig.from_pretrained("roberta_base_en_20190121_m10000_v24000_u125000")
    model = RoBERTaModel.from_pretrained("roberta_base_en_20190121_m10000_v24000_u125000", config=config)


if __name__ == "__main__":
    main()
~~~

## Models

|name|lang|size|bpe merges|vocab size|updates|wikipedia version|  
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|  
|roberta_base_ja_20190121_m10000_v24000_u125000|ja|roberta-base|10000|24000|125000|20190121|  
|roberta_base_ja_20190121_m10000_v24000_u500000|ja|roberta-base|10000|24000|500000|20190121|  
|roberta_base_en_20190121_m10000_v24000_u125000|en|roberta-base|10000|24000|125000|20190121|  
|roberta_base_en_20190121_m10000_v24000_u500000|en|roberta-base|10000|24000|500000|20190121|  
|roberta_base_fr_20190121_m10000_v24000_u500000|fr|roberta-base|10000|24000|500000|20190121|  
|roberta_base_de_20190121_m10000_v24000_u500000|de|roberta-base|10000|24000|500000|20190121|
python-yeet 1.0.2
yeet is a simple Python framework
Requires Python: >=3.9,<4.0

# [what's a yeet?](https://www.youtube.com/watch?v=fVva0bV0odg)

# quickstart

## Run app
```python
import os
from controllers import HomeController, ArticlesController
from examples.constants import INIT_QUERIES, DB_SETTINGS
from python_yeet.app import Yeet
from python_yeet.db import Database

app = Yeet(name=os.path.basename(os.getcwd()))
app.add_route(r'^articles/$', ArticlesController(methods=['GET', 'POST']))
app.add_route(r'^.*$', HomeController)
db = Database(db_settings=DB_SETTINGS,
              init_queries=INIT_QUERIES)
app.run()
```

## Create model example

```python
import datetime
from python_yeet.orm import BaseModel, BaseManager


class Article(BaseModel):
    table_name = "articles"
    manager_class = BaseManager

    id: int
    title: str
    text: str
    author: int
    created_at: datetime.datetime
```

## Create controller example

```python
from examples.models.article import Article
from python_yeet.controllers import BaseController


class ArticlesController(BaseController):
    def get(self, path):
        return self.render_template('articles.html', articles=self._get_articles())
        
   
    @staticmethod
    def _get_articles():
        articles = Article.objects.select("id", "title")
        return articles
```
moldock 0.1.3
Python moldock to facilitate molecular docking
Requires Python: >=3.6

# Python scripts to automate molecular docking

### Installation

```
pip install moldock
```
or the latest version
```
pip install git+https://github.com/ci-lab-cz/docking-scripts.git
```

### Dependencies

from conda
```
conda install -c conda-forge python=3.9 numpy=1.20 rdkit scipy dask distributed vina
```

from pypi
```
pip install meeko
```

Installation of gnina is described at https://github.com/gnina/gnina

### Description

Fully automatic pipeline for molecular docking.
- two major scripts `vina_dock` and `gnina_dock` which support docking with `vina` and `gnina` (`gnina` also supports `smina` and its custom scoring functions)
- can be used as command line scripts or imported as a python module
- support distributed computing using `dask` library
- if calculation was interrupted it can be continued by invoking the same command, but everything except output DB may be omitted (these will be ignored nevertheless if DB exists) because all data is stored in DB at the first call
- `get_sdf_from_db` is used to extract data from output DB 

Pipeline:
- input SMILES are converted in 3D by RDKit embedding, if input is 3D structures in SDF their conformations wil be taken as starting without changes.
- ligands are protonated by chemaxon at pH 7.4 and the most stable tautomers are generated (optional, requires a Chemaxon license)
- molecules are converted in PDBQT format
- docking with `vina`/`gnina`
- output poses are converted in MOL format and stored into output DB along with docking scores

### Example

Both scripts `vina_dock` and `gnina_dock` have similar common arguments.

Docking using input SMILES, prepared protein and config files. Ligands will not be protonated with Chemaxon, so their supplied charged states will be used. 4 CPU cores will be used. When docking will finish an SDF will be created with top docking poses for each ligand. 
```
vina_dock -i input.smi -o output.db -p protein.pdbqt -s vina_config --no_protonation -c 4 --sdf 
``` 

Retrieve second poses for compounds `mol_id_1` and `mol_id_2` with their docking scores in SDF format:
```
get_sdf_from_db -i output.db -o out.sdf -d mol_id_1,mol_id_4 --fields docking_score --poses 2 
```
Instead of a comma-separated list of ids a text file can be supplied as an argument `-d`.

Retrieve top poses for compounds with docking score less then -10:
```
get_sdf_from_db -i output.db -o out.sdf --fields docking_score --poses 1 --add_sql 'docking_score < -10' 
```

Use as a Python module

```python
from moldock import vina_dock

vina_dock.iter_docking(dbname='output.db', receptor_pdbqt_fname='protein.pdbqt', protein_setup='vina_config.txt', protonation=False, exhaustiveness=8, seed=-1, n_poses=10, ncpu=4)
```

### Changelog

**0.1.2**
- (bugfix) docking of macrocycles is rigid (in future may be changed)

### Licence
CC BY-NC-SA 4.0
aws-recommendation-a17 0.1.2
Provides AWS recommendations
Requires Python: >=3.7

# aws_recommendations

aws_recommendations package gives recommendation for you aws account

Release Notes:
# v0.0.28
1. Bug fixes and stability improvements

# v0.0.10
1. Added methods for following recommendations:
   - Low Utilization Amazon EC2 Instances
   - Underutilized Amazon Redshift Clusters
   - idle ebs volumes
   - Idle elb
   - enable s3 bucket keys
   - rds_general_purpose_ssd
   - ebs_general_purpose_ssd
   - unused_ami

# v0.0.7
1. Added methods for new recommendations
2. Added following methods:
   1. reserved_instance_lease_expiration()
   2. unassociated_elastic_ip_addresses()
   3. rds_idle_db_instances()

# v0.0.3
1. Minor bug fixes

# v0.0.2
1. Improved code quality
2. Multi region now supported

# v0.0.1 - Initial Release
py-console 0.1.6
Colorful JavaScript-like console logging
Requires Python: >=3.9

# Welcome to py-console
I've always liked the ease with which we can log colorfull warning, errors and messages using JavaScript in a webbrowser console.
This package allows you to do just that. Check out more information [here](https://mikehuls.medium.com/python-printing-colorful-outputs-with-ease-b4e2a183db7c).

## Installation
```commandline
pip install py-console
```

## Usage
Main features:
 - printing lines with colored text and/or text backgrounds
 - printing lines of which parts have colored text or text backgrounds

### Demo

```python
    from py_console import console, bgColor, textColor

# Specify console settings
# Show time in console.log, console.warn etc by default?
console.setShowTimeDefault(True)
# Custom format for showing time (default H:M:S)
# Here we've added miliseconds
console.setTimeFormat(timeFormat='%H:%M:%S.%f')

# normal logging
console.log("log")
console.warn("warn", severe=False)
console.error("error", severe=False)
console.success("success", severe=False)
console.info("info", severe=False)

print(" ")

# Change time format back
console.setTimeFormat(timeFormat='%H:%M:%S')

# all of these colors also have the 'severe' option
console.log("log severe", severe=True)
console.warn("warn severe", severe=True)
console.error("error severe", severe=True)
console.success("success severe", severe=True)
console.info("info severe", severe=True)

print(" ")

# Specifying showTime ignores the defaults
console.warn('Not showing time', showTime=False)

print(" ")

# Logging with highlighted text
console.log(f"Normal log with default {console.highlight('highlighted')} part")
console.log(
    f"Normal log with a {console.highlight('FAIL', bgColor=bgColor.RED)} "
    f"and a {console.highlight('SUCCESS', bgColor=bgColor.GREEN)} part")
console.log(
    f"Severe log with a {console.highlight('FAIL', bgColor=bgColor.RED, textColor=textColor.BLACK)} "
    f"and a {console.highlight('SUCCESS', bgColor=bgColor.GREEN, textColor=textColor.BLACK)} part", severe=True)
console.log(f"Normal log with {console.highlight('highlighted red', bgColor=bgColor.RED)} part")
console.info(f"normal info with {console.highlight('highlighted red text', textColor=textColor.RED)} part")
console.warn(f"Normal warn with {console.highlight('only red text', textColor=textColor.RED, bgColor='')} part")
console.error(f"Error text with custom {console.highlight('black-yellow', textColor=textColor.YELLOW, bgColor=bgColor.BLACK)} highlights")
```

## Output:  

![output_example](https://raw.githubusercontent.com/mike-huls/py-console/main/images/outputs.png)

### Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

### License
[MIT](https://choosealicense.com/licenses/mit/)