semvec/pypi-packages huggingface dataset:
tf2calc 1.0.0
python package to calculate tf2 prices
License: MIT
Requires Python: >=3

# PricesTF Python API

This modul is a simple python package to calcualte tf2 prices.

### Installation

This module requires [Python](https://www.python.org/) v3+ to run.

For install the module type this to your command line...

```sh
pip install tf2calc
```

### Syntax
```text
calculate(<amount>, <"type">)
- amount (intriger)
- type (string):
  - "scrap"
  - "rec"
  - "ref"
  - "key"
  - "earbuds"
```

### Quick Example
```py
from tf2clac import *

calculation = calculate(1, "ref")
```

It will return a dictionary with the calculated values.
```json
{"scrap": 9, "rec": 3, "ref": 1, "key": 0.02, "earbuds": 0.0}
```
If you write an unknown type, it will return `0`.

License
----

MIT
pytorchcrf 1.2.0
PyTorch CRF with N-best decoding
License: MIT
Requires Python: >=3.6
Keywords: pytorch crf n-best

# PyTorch CRF with N-best Decoding

Implementation of Conditional Random Fields (CRF) in PyTorch 1.0. It supports top-N most probable paths decoding.

The package is based on [pytorch-crf](https://github.com/kmkurn/pytorch-crf) with only the following differences

- Method `_viterbi_decode` that decodes the most probable path get optimized. Running time gets reduced to 50% or less with batch size 15+ and sequence length 20+
- The class now supports decoding top-N most probable paths through the implementation of the method `_viterbi_decode_nbest`

## Requirements

- Python 3 (>= 3.6)
- PyTorch (>= 1.0)

## Installation

```bash
pip install pytorchcrf
```

## Examples

```python
>>> import torch
>>> from pytorchcrf import CRF
>>> num_tags = 5                        # number of tags is 5
>>> model = CRF(num_tags)
>>> seq_length = 3                      # maximum sequence length in a batch
>>> batch_size = 2                      # number of samples in the batch
>>> emissions = torch.randn(seq_length, batch_size, num_tags)

# Computing log likelihood
>>> tags = torch.tensor([[2, 3], [1, 0], [3, 4]], dtype=torch.long)  # (seq_length, batch_size)
>>> model(emissions, tags)

# Decoding
>>> model.decode(emissions)             # decoding the best path
>>> model.decode(emissions, nbest=3)    # decoding the top 3 paths
```