semvec/pypi-packages huggingface dataset:
stribor 0.2.0
Library for normalizing flows and neural flows
Requires Python: >=3.7

# Stibor

Normalizing flows and neural flows for PyTorch.

- Normalizing flow defines a complicated probability density function as a transformation of the random variable.
- Neural flow defines continuous time dynamics with invertible neural networks.

## Install package and dependencies

```
pip install stribor
```

## Normalizing flows

### Base densities

- Normal `st.Normal` and `st.UnitNormal` and `st.MultivariateNormal`
- Uniform `st.UnitUniform`
- Or, use distributions from `torch.distributions`

### Invertible transformations

- Activation functions
    - ELU `st.ELU`
    - Leaky ReLU `st.LeakyReLU`
    - Sigmoid `st.Sigmoid`
    - Logit (inverse sigmoid) `st.Logit`
- Affine
    - Element-wise transformation `st.Affine`
    - Linear layer with LU factorization `st.AffineLU`
    - Matrix exponential `st.MatrixExponential`
- Coupling layer that can be combined with any element-wise transformation `st.Coupling`
- Continuous normalizing flows `st.ContinuousTransform`
    - Differential equations with stochastic trace estimation:
        - `st.net.DiffeqMLP`
        - `st.net.DiffeqDeepset`
        - `st.net.DiffeqSelfAttention`
    - Differential equations with fixed zero trace:
        - `st.net.DiffeqZeroTraceMLP`
        - `st.net.DiffeqZeroTraceDeepSet`
        - `st.net.DiffeqZeroTraceAttention`
    - Differential equations with exact trace computation:
        - `st.net.DiffeqExactTraceMLP`
        - `st.net.DiffeqExactTraceDeepSet`
        - `st.net.DiffeqExactTraceAttention`
- Cummulative sum `st.Cumsum` and difference `st.Diff`
    - Across single column `st.CumsumColumn` and `st.DiffColumn`
- Permutations
    - Flipping the indices `st.Flip`
    - Random permutation of indices `st.Permute`
- Spline (quadratic or cubic) element-wise transformation `st.Spline`


### Example: Normalizing flow

To define a normalizing flow, define a base distribution and a series of transformations, e.g.:
```py
import stribor as st
import torch

dim = 2

base_dist = st.UnitNormal(dim)

transforms = [
    st.Coupling(
        transform=st.Affine(dim, latent_net=st.net.MLP(dim, [64], 2 * dim)),
        mask='ordered_right_half',
    ),
    st.ContinuousTransform(
        dim,
        net=st.net.DiffeqMLP(dim + 1, [64], dim),
    )
]

flow = st.NormalizingFlow(base_dist, transforms)

x = torch.rand(10, dim)
y = flow(x) # Forward transformation
log_prob = flow.log_prob(y) # Log-probability p(y)
```

### Example: Neural flow

Neural flows are defined similarly but now we don't need the base density and all the invertible transformations must depend on time. In particular, at `t=0`, the transformation becomes an identity.
```py
import torch
import stribor as st

dim = 2

f = st.NeuralFlow([
    st.ContinuousAffineCoupling(
        latent_net=st.net.MLP(dim, [32], 2 * dim),
        time_net=st.net.TimeLinear(dim),
        mask='ordered_0',
        concatenate_time=False,
    ),
])

x = torch.randn(10, 4, dim)
t = torch.randn_like(x[...,:1])
y = f(x, t=t) # Outputs the same dimension as x
```

## Run tests

```
pytest --pyargs stribor
```
minha-aposta 0.0.1
Meu pacote de apostas
Requires Python: >=3.8

# package_name

Descrição. 
O pacote minha_aposta é usado para:
	- disponibilizar módulos com as modalidades dos seguintes jogos:
		-quina
		-megasena
		-duplasena
		-lotofacil
	- gerar apostas com numeros aleatórios, dentro dos possíveis para cada modalidade

## Installation

```bash
pip install minha_aposta
```

## Use
```python
from minha_aposta import quina
minha_aposta.quina.aposta()

## Author
netotricca

## License
[MIT](https://choosealicense.com/licenses/mit/)
blast-extract 0.1.0
Provides tools to extract nucleotide sequences from a genome using NCBI BLAST
Requires Python: >=3.10

# Blast-Extract

Extract subsequences from a genome using NCBI BLAST and reference sequences.

Minimal usage:

```bash
extract-sequences --references references.fasta genome.fasta > extracted.fasta
```


## Installation

Requirements:

- [Python 3.10] or later
- NCBI [BLAST+ executables] 2.23.0 or later

The BLAST bin directory must be added to the PATH.

Install the package using pip. This will also create the entry point scripts to use the commands as described below.

```bash
pip install blast-extract
```


## Usage 

All commands can use STDIN and STDOUT, so can be chained using pipes (`|`) on UNIX-like systems.

```bash
cat genome.fasta | extract-sequences --references references.fasta | hash-sequences > seqhashes.tsv
```

### Commands

#### extract-sequences

The `extract-sequences` command extracts nucleotide sequences from an input (multi-)FASTA file. It requires a
multi-FASTA file with references to search for. Its output is a multi-FASTA whose headers start with the identifier
of the corresponding matched reference.

The script will by default normalize and extend the BLAST results so they are in the same strand as the reference and
cover as much of the reference as possible. This is an important improvement over using solely BLAST, as its score
optimization may drop nucleotides at the outer ends of the alignment.

Behind the scenes, a BLAST nucleotides database will be created, by default in the current working directory. You can
specify a different directory for the databases with `--dbdir`. The derived BLAST database will be updated if needed, by
comparing the last modification time of the files. Each reference filepath will generate a uniquely named database, so
can be used in conjunction.

There are two filter options: `--pident` (default 80.0) for minimum percentage identity, and `--pcov` (default 80.0) for
minimum percentage coverage. By nature of using BLAST, less strict settings will increase the likelyhood of
false-negatives: when a subsequence may exist that satisfies the filters, but due to BLAST heuristics was not found. The
underlying blastn call will actually use a slightly lower percentage identity threshold and no coverage requirement.
Both are checked by the python script after post-BLAST corrections.

#### hash-sequences

The `hash-sequences` command is used to get hash values for each sequence in an input multi-FASTA file. You may choose
any of the algorithms available to your python installation, which will be listed if you give an invalid value. It is
recommended to stick to the defaults unless needed for compatibility with other tools or organisations. The output uses
TSV format, with the first column containing the sequence name and the second containing the generated sequence hash.


----

Copyright (C) Jan Deneweth 2022


[Python 3.10]: https://www.python.org/downloads/
[BLAST+ executables]: https://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download
diretriz-vigilancia 0.0.2
O projeto objetiva disponibilizar os parâmetros de qualidade em formato adequado para utilização em análises computacionais
Requires Python: >=3
Keywords: python,water,water-quality,water-resources

# Diretrizes Vigilância

<br>

[Diretriz Nacional do Plano de Amostragem da Vigilância da Qualidade da Água para Consumo Humano](bvsms.saude.gov.br/bvs/publicacoes/diretriz_nacional_plano_amostragem_agua.pdf) que *"visa orientar a elaboração e a implementação dos planos de amostragem da vigilância da qualidade da água para consumo humano, abordando o quantitativo mínimo de amostras, a frequência de amostragem, os parâmetros a serem analisados, bem como as orientações para a seleção dos pontos de coleta"*.

As diretrizes trazem informações sobre o número de amostras que devem ser realizadas.

<br>


```python
pip install diretriz-vigilancia --upgrade
```

<br>

------

### *TODO*

1. ...
2. ...
3. ...
filesystem-database 1.0.4
A relatively simple multilayered database built on top of standard file systems.
Requires Python: >=3.6

# filesystem-database
This database is easy to set up: Just make an empty folder and initialize a `dbNode` object in it! The database structure consists of `dbNode` objects. `dbNode`s contain more `dbNode`s and keys, which store a byte value.

# Usage
To initalize a database:
```python
import filesystem_database as fs_db

rootNode = fs_db.dbNode('/path/to/database/directory')
```
The directory passed to `dbNode()` must either be empty or contain *only* data from a `dbNode`.

To use keys:
```python
rootNode.mkKey(0, 'exampleKey')     # Create a key with ID 0 and name `exampleKey`
rootNode.set(0, b'test data :D')    # Set a value to key 0
rootNode.get(0)     # Get the value of key 0 (returns `b'test data :D'` in this case)
rootNode.keys       # A list containing key IDs
rootNode.keyNames   # A dictionary containing key names and the key IDs they correspond to
```
Here `0` is the ID to give the key and `'exampleNode'` is the optional name to assign to the key. Neither the ID nor the name may be used for multiple keys. `get` and `set` will accept either an integer for a key ID or a string for a key name.

To use nodes:
```python
subNode = rootNode.mkNode(0, 'exampleNode') # Create a node (ID 0, name 'exampleNode') under `rootNode`
rootNode.node(0)    # Get node 0 from `rootNode`
rootNode.nodes      # A list containing node IDs
rootNode.nodeNames  # A dictionary containing node names and the node IDs they correspond to

```
`subNode` is a `dbNode` object whose contents are within `rootNode`. Here `0` is the ID to give the node (must not be taken) and `'exampleNode'` is the optional name to assign to the node. Neither the ID nor the name may be used for multiple nodes. `get` and `set` will accept either an integer for a key ID or a string for a key name.

# Command Line Utility
There is an included command line utility for easier management of databases. To run it, enter the following in a Python terminal:
```python
>>> from filesystem_database import cli
>>> cli()
```

### Commands
1. `load`
2. `unload`
3. `mk-key`
4. `rm-key`
5. `keys`
6. `get`
7. `set`
8. `mk-node`
9. `rm-node`
10. `nodes`
11. `node`
12. `drop-node`
13. `quit`

Most of these are identical to the methods of a `dbNode`, except for a few. `load` and `unload` will load a `dbNode` from the supplied path. `node` 'enters' a node within the current node, setting it in the promp string. `drop-node` drops the current node and moves to its parent node. `quit` exits the CLI interface.