semvec/pypi-packages huggingface dataset:
async-orm 1.0.0
async orm for async web framework

### async-orm
Async orm for async web framework, you should use Django to manage your database(ddl etc).
```
pip install -U async-orm
```

### Usage
```
from django.db import models
from async_orm import BaseModel, transation, Q


class FooBar(BaseModel):
    """ foo bar """

    game = models.CharField(verbose_name='game', max_length=30, blank=False, null=False, db_index=True)
    title = models.CharField(verbose_name='title', max_length=100, blank=False, null=False)
    weight = models.IntegerField(verbose_name='weight', blank=False, null=False, default=0)

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    class Meta:
        app_label = 'test'
        verbose_name = "foo_bar"
        verbose_name_plural = "foo_bar"
        ordering = ['key', '-title']


async def test_foo_bar():
    game = 'game1'
    title = 'title2'
    # select
    await FooBar.select(where=Q(game=game, title=title) | Q(game='game2'), limit=2, offset=5)
    await FooBar.select(fields=['id', 'title'], order_by=['-title'])
    await FooBar.select(where=Q(weight__gt=0), limit=1)
    await FooBar.select(count=['game'], distinct=True, where=Q(id__gte=2))

    ret = await FooBar.select(where=Q(game='game2'), limit=1)
    if not ret:
        # insert
        ret = FooBar(game='game2', title='title22', weight=0)
        num = await ret.save()
        print(ret.id)
        print(num)
        # result = FooBar.create(game='game2', title='title22', weight=0)
    else:
        # update
        ret.title = 'new title' + str(datetime.datetime.now())
        num = await ret.save()
        print(ret.id)
        print(num)

        # delete
        # num = await ret.delete()
        # print(num)

    # transaction
    if ret is not None:
        async with transaction() as ts:
            await FooBar.create(game='game2', title='ttitle1', weight=0, ts=ts)
            await FooBar.create(game='game2', title='ttitle2', weight=0, ts=ts)
            await FooBar.create(game='game2', title='ttitle3', weight=0, ts=ts)
            await ts.conn.rollback()
            await FooBar.create(game='game2', title='ttitle4', weight=0, ts=ts)
            await ts.conn.commit()

```
env2fs 0.2.0
write env vars to filesystem (CI tool)
Requires Python: >=3
Keywords: automation cli

env2fs: write env vars to filesystem (CI tool)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Write a file with an env var content or a set of env vars.

Usage example::

    env2fs ~/.ssh/id_rsa SSH_KEY fmod=600 dmod=700

Note that the missing dollar sign is intendent to prevent evaluation from
the parent shell itself.

The above example writes the contents of the ``$SSH_KEY`` environment variable
into ``~/.ssh/id_rsa``, with a mode of 600 and 700 for any parent directory
that will be automatically created if necessary.

To write an env file, pass a variable name that ends with underscore, ie::

    export staging_pgpass=foo
    env2fs staging.env staging_

Will write staging.env with contents::

    pgpass=foo

Extra CLI options::

  --dryrun       Do not actually touch the fs
  --verbose,-v      Verbose output
batdata 0.1.0
A package to download Vietnam stock market data

# Introduction

`batquant` is a package that helps developers, researchers to quickly get Vietnam financial data. Since Vietnam is not well-supported by famous platform like Bloomberg, Reuters, Yahoo, Google, we were inspired to develop our own data package that serves Vietnam data.

# Recent changes

## v0.1.0 - 20190215:

- First version
- Data available: trading data only

## Incoming: v0.2.0:

##### Add more data:

- reference prices (ceiling, floor, ref price...)
- stock info (company name, shareout, list of stocks)

##### Exception handler

##### Reference object to lookup for fields

# Installation

`pip install batdata`

# Usage

## Init data object

```
import batdata
vnd = batdata.Vnd() # Data from VND api
```

## Getting data

```
# historical data of HPG from 2018-01-01 to 2018-12-31
data = vnd.hist("HPG","close","20180101","20181231")

jsonData = data.json # getting data as json
dfData = data.df # getting data as pandas DataFrame

# fromTime and toTime can also be python datetime objects
fromTime = datetime.datetime(2018,01,01)
toTime = datetime.datetime(2018,12,31)
hpgHist = vnd.hist("HPG","close",fromTime,toTime)

# historical OHLC data of HPG, MSN
hpgHistWeekly = vnd.hist(["HPG","MSN"],["open","high","low","close"],"20180101","20181231",interval="w")

# last price
hpgLast = vnd.curr("HPG","last")


```

# TODO

## Financial fields reference

## More data
alignmentrs 0.9.0
Quickly read and manipulate multiple sequence alignments in Python
Keywords: block,alignment,bioinformatics

# alignmentrs

Quickly read and manipulate multiple sequence alignments in Python

## Installation

    pip install alignmentrs

## Quickstart

### Import alignment into Python
```python
>>> import alignmentrs as rs
>>> aln = rs.Alignment.from_fasta('hiv.fna', 'HIV_alignment')
>>> aln
Alignment(nsamples=10, nsites=120, nmarkers=0)
>>> aln.sample_ids
['sample01', 'sample02', 'sample03', 'sample04', 'sample05', 'sample06'
 'sample07', 'sample08', 'sample09', 'sample10']
```

### Select sites to remove from the alignment
```python
>>> sites_to_remove = [i for i in range(120) if (i-2) % 3 != 0]  # remove 1st and 2nd position in codon triplet
>>> aln.remove_sites(sites_to_remove, copy=False)  # manipulate inplace, copy=True returns a new copy
Alignment(nsamples=10, nsites=40, nmarkers=0)
```

### Select sites to retain in the alignment
```python
>>> sites_to_retain = list(range(2, 3, 120))  # third position in codon triplet
>>> aln.retain_sites(sites_to_retain, copy=False)  # manipulate inplace, copy=True returns a new copy
Alignment(nsamples=10, nsites=40, nmarkers=0)
```

### Get a subset of samples and sites
```python
>>> sub_aln = aln.subset(samples=['sample01', 'sample03', 'sample05'], sites=list(range(2, 3, 120)))
>>> sub_aln
Alignment(nsamples=3, nsites=40, nmarkers=0)
```

## License

[MIT License](https://github.com/kentwait/alignmentrs/blob/master/LICENSE)