semvec/pypi-packages huggingface dataset:
yandex-geo 2.1.2
Simple library for getting address or coordinates via Yandex geocoder
License: MIT
Requires Python: <4.0,>=3.11

# Yandex Geocoder

Get address coordinates via Yandex geocoder

[![test](https://github.com/sivakov512/yandex-geocoder/workflows/test/badge.svg)](https://github.com/sivakov512/yandex-geocoder/actions?query=workflow%3Atest)
[![Coverage Status](https://coveralls.io/repos/github/sivakov512/yandex-geocoder/badge.svg?branch=master)](https://coveralls.io/github/sivakov512/yandex-geocoder?branch=master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Python versions](https://img.shields.io/pypi/pyversions/yandex-geocoder.svg)](https://pypi.python.org/pypi/yandex-geocoder)
[![PyPi](https://img.shields.io/pypi/v/yandex-geocoder.svg)](https://pypi.python.org/pypi/yandex-geocoder)

## Installation

**Synchronous version:**

Install it via `pip` tool:

```shell
pip install yandex-geo
```

or Poetry:

```shell
poetry add yandex-geo
```

## Usage example

Yandex Geocoder requires an API developer key, you can get it [here](https://developer.tech.yandex.ru/services/) to use
this library.

**Synchronous version:**

```python
from decimal import Decimal

from yandex_geocoder import Client

client = Client("your-api-key")

coordinates = client.coordinates("Москва Льва Толстого 16")
assert coordinates == (Decimal("37.587093"), Decimal("55.733969"))

address = client.address(Decimal("37.587093"), Decimal("55.733969"))
assert address == "Россия, Москва, улица Льва Толстого, 16"
```

**Asynchronous version:**

```python
import asyncio
from decimal import Decimal

from yandex_geocoder import Client


async def main():
    aclient = Client(api_key="your-api-key")

    coordinates = await aclient.aiocoordinates("Москва Льва Толстого 16")
    assert coordinates == (Decimal("37.587093"), Decimal("55.733974"))
    address = await aclient.aioaddress(Decimal("37.587093"), Decimal("55.733974"))
    assert address == "Россия, Москва, улица Льва Толстого, 16"


if __name__ == '__main__':
    asyncio.run(main())
```

## Development and contribution

First of all you should install [Poetry](https://python-poetry.org).

- install project dependencies

```bash
just install
```

- run linters

```bash
just lint
```

- run tests

```bash
just test
```

- feel free to contribute!
rebar-py 1.0.3
REBAR (Removing the Effects of Bias through Analysis of Residuals): Improving the accuracy of bulk fitness assays by correcting barcode processing biases.
License: MIT
Requires Python: >=2.6

# REBAR

## Removing the Effects of Bias through Analysis of Residuals

Code and data accompanying the preprint: 

**Improving the accuracy of bulk fitness assays by correcting barcode processing biases.**  
Ryan Seamus McGee, Grant Kinsler, Dmitri Petrov, Mikhail Tikhonov.  
bioRxiv 2023.10.31.565047; doi: https://doi.org/10.1101/2023.10.31.565047

## Code

`rebar.py` is a python module that implements our barcode bias correction method.

You can run this bias correction method using the command line or as part of your own python scripts, as seen in the brief examples below and in the case study `run-rebar.ipynb' notebooks.

Further documentation about code usage is forthcoming. Questions regarding this code can be directed to ryansmcgee@gmail.com.

### Running the method from the command line

Run `rebar.py` as a script from the command line, specifying the paths of input files and the desired output directory as arguments. 

For example:
```
python rebar.py --counts ./case-study/data/kinsler-2020-preprocessed-data/counts.csv --samples ./case-study/data/kinsler-2020-preprocessed-data/samples.csv --variants ./case-study/data/kinsler-2020-preprocessed-data/variants_withNeutralGroups.csv --config ./case-study/rebar-config.json -outdir case-study/results/ 
```

### Interfacing with the method within python scripts

Our method is implemented using an object-oriented structure that makes it easy to interface with as a "black box" or in a more "hands on" manner as desired.

For example, executing the method within your own script can be as simple as:
```
# Set up bias correction object
debiaser = BiasCorrection(counts='./data/kinsler-2020-preprocessed-data/counts.csv', 
                          samples='./data/kinsler-2020-preprocessed-data/samples.csv', 
                          variants='./data/kinsler-2020-preprocessed-data/variants_withNeutralGroups.csv',
                          config='./rebar-config.json',
                          outdir='./results/')

# Perform bias correction
debiaser.run()
```

## Case Study Results

We applied our bias inference and correction method to the bulk fitness assay data from Kinsler et al. (2020) (refer to our preprint for more information). Input data, jupyter notebooks that replicate the execution of our method, results data, and figures can be found in the `case-study` directory.