semvec/pypi-packages huggingface dataset:
folder-dict 0.1.2
TThe versatile dict for Python!
License: MIT
Requires Python: >=3.9,<4.0

# Folder Dict
The versatile dict for Python!

# Installation
```
pip install folder-dict
```
or clone this repository and run the following command.
```
pip install -e ./
```

Import
```py
from folder_dict import FolderDict
```

# Usage
- Import and Construct  
    ```py
    # Empty Folder Dict
    fd = FolderDict(sep="/")
    > fd
    --> FolderDict({})
    ```

- Subscription  
    ```py 
    user =  {
	    "name": "Joe",
    	"age": 22,
    	"hobbies": ["Playing football", "Podcasts"],
	    "friends": {
    		"Sue": {"age": 30},
	    	"Ben": {"age": 35},
    	    }
    }

    fd = FolderDict(user, sep="/")
    > fd["name"]
    --> Joe
    
    > fd["friend/Sue/age"]
    --> 30

    > fd["/friend/Ben"]
    --> FolderDict({
        "age": 30,
    })
    ```

    - Multiple inputs 
        ```py
        > fd["name", "age","friends/Ben/age"]
        --> ("Joe", 22, 35)
        ```


- Assignment  
    Assigns the object at the given path into the FolderDict.
    ```py
    fd = FolderDict(sep="/")
    fd["path/to/obj_name"] = 10
    
    > fd["path/to/obj_name"]
    10
    ```
    - Multiple inputs  
    ```py
    fd["a/b", "c/d"] = (0,1)
    > fd
    --> FolderDict({
        "a/b": 0,
        "c/d": 1
    })
    ```

- list
    Lists all paths contained in the FolderDict.
    ```py
    fd["a/b", "c/d"] = (0,1)
    > fd.list()
    --> ["/a/b", "/c/d"]
    ```

- Direct card `~`  
    Get paths ending with "c".
    ```py
    fd["a/b/c", "d/e/f/abc", "g/h/c", "i/j"] = (1,2,3,4)
    > fd.list("~c")
    --> ["/a/b/c", "/d/e/f/abc", "/g/h/c"]
    ```
    *cf.*
    ```py
    > fd.list("~/c")
    --> ["a/b/c", "g/h/c"]
    ```

- Properties
    ```py
    fd["a/b","a/c"] = (1,2)

    # dict
    > fd.dict
    --> {'a': {'b': 1, 'c': 2}}
    
    # PathDict
    > fd.PathDict
    -->PathDict({
      "a": {
        "b": 1,
        "c": 2  
      }
    })

    # sep
    > fd.sep
    --> '/'
    ```
decimal-mask 0.2.0
Django mask decimal fields
License: MIT
Requires Python: >=3.10,<4.0

# Coral Decimal Mask

Widgets que aplicam mascaras nos forms do django.

## Como usar

```py
from django import forms
from decimal_mask.widgets import DecimalMaskWidget, MoneyMaskWidget, PercentMaskWidget


class MyForm(forms.Form):
    value1 = forms.DecimalField(widget=DecimalMaskWidget())
    value2 = forms.DecimalField(
        widget=DecimalMaskWidget(
            decimal_attrs={
                "locales": "pt-BR",
                "decimalPlaces": 2,
                "format": {
                    "style": "currency",
                    "currency": "BRL",
                },
            },
        ),
    ) # ou usar forms.DecimalField(widget=MoneyMaskWidget())
    value3 = forms.DecimalField(widget=PercentMaskWidget())
```

- O parâmetro `decimal_attrs` são algumas opções para construir o objeto javascript [Intl.NumberFormat](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).

  - `locales` é o primeiro parâmetro de `Intl.NumberFormat` referente a linguagem utilizada na interface do usuário da sua aplicação.

  - `decimalPlaces` é o número de casas decimais que a mascara vai considerar.

  - `format` é um `dict` com as informações do parâmetro `options` de `Intl.NumberFormat`.


## Contribuindo com o projeto

```py
(venv) poetry install
(venv) pytest
```
bb2parse 1.0.0
Python wrapper for BloodBowl Match files
License: MIT

# bb2parse
---
Parse Bloodbowl2 replay files for statistics

## Install
---
Install using pip:
```$ pip install bb2parse```

## Usage
### Initializing a Season/Match Object
```python
from bb2parse import BloodBowlMatch, BloodBowlSeason

game = BloodBowlMatch('{XML file}')

season = BloodBowlSeason('{XML file}','{XML file}','{XML file}','{XML file}'...)
```

### Attributes of Match Objects
```python
game.match_outcome
game.home
game.away

# Subclass 
game.HomeTeam
game.AwayTeam

game.HomeTeam.coach     

#Object and its methods and attributes
game.HomeTeam.Offense 
        .interceptions
        .touchdowns
        .running_yards
        .passing_yards
        .passes
        .catches
        .possession
        .occupation_own
        .get_pass_completion()
        .get_pass_intercept_ratio()
game.HomeTeam.Defense
        .casualties_inflicted
        .interceptions
        .ko_inflicted
        .injuries_inflicted
        .kills_inflicted
        .expulsions
        .occupation_their
        .get_ratio_injuries()
        .get_ratio_casualties()
        .get_ratio_kills()
game.HomeTeam.Injuries
        .deaths_sustained
        .ko_sustained
        .casualties_sustained
        .injuries_sustained
```

### Attributes of Season objects
```python
season.seasonlength
season.scoreboard

season.Teams.teamlist # returns regular set of teams involved in games

# Use this attribute to look for stats/data
season.getTeams
# Should return list of team objects

season.getTeams[0].name
season.getTeams[0].matches_played
season.getTeams[0].matches # Returns list of BloodBowl Match Objects
season.getTeams[0].get_total_kills()
season.getTeams[0].get_total_touchdowns()
season.getTeams[0].get_total_running_yards()
season.getTeams[0].get_total_passing_yards()
season.getTeams[0].get_td_avg()


```