semvec/pypi-packages huggingface dataset:
pycounts_je 0.1.0
Calculate word counts in text file
License: MIT
Requires Python: >=3.9

# pycounts_je

Calculate word counts in text file

## Installation

```bash
$ pip install pycounts_je
```

## Usage

`pycounts_je` can be used to count words in a text file and plot results
as follows:

```python
from pycounts_je.pycounts_je import count_words
from pycounts_je.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`pycounts_je` was created by Julia Everitt. It is licensed under the terms of the MIT license.

## Credits

`pycounts_je` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
flask-scram 1.0.1
Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the Flask web framework.
License: MIT
Requires Python: >=3.8

# flask-scram

Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the
[Flask](https://flask.palletsprojects.com/) web framework.

See [requests-scram](https://github.com/COUR4G3/requests-scram) for a client-side implementation.


## Getting Started

Initialize the extension with the application or with ``init_app`` in an application factory, and then decorate your
route with the ``login_required`` method:


```python
from flask import Flask
from flask_scram import Scram


USERNAME = 'user'
PASSWORD = 'pass'

app = Flask(__name__)

db = {}

def auth_fn(username):
    return db[username]

scram = ScramAuth(app, auth_fn=auth_fn)

# or, later in your application factory: scram.init_app(app)

# store your authentication key in your "database"
db[USERNAME] = scram.make_auth_info(PASSWORD)


@app.route("/")
@scram.login_required
def index():
    return "OK"

```

You may specify the following configuration variables:

- ``SCRAM_MECHANISM`` - supported SCRAM Authentication mechanism e.g. ``SCRAM-SHA-256``
- ``SCRAM_REALM`` - the realm parameter to use e.g. defaults to ``request.host``


You may also use the ``authenticate`` method in your code or before request handler.

See [scramp](https://github.com/tlocke/scramp) for examples of the ``make_auth_info`` and
``make_stored_server_keys`` functions which the same methods implement.


## Todo

- Implement [One Round-Trip Reauthentication](https://datatracker.ietf.org/doc/html/rfc7804#section-5.1)


## License

Licensed under the MIT License.
mds_sm_pycounts 0.1.0
A package for counting words in a text file
License: MIT
Requires Python: >=3.9

# mds_sm_pycounts

A cool package for counting words in a text file

## Installation

```bash
$ pip install mds_sm_pycounts
```

## Usage

`mds_sm_pycounts` can be used to count words in a text file and plot results
as follows:

```python
from mds_sm_pycounts.mds_sm_pycounts import count_words
from mds_sm_pycounts.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()
```


## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`mds_sm_pycounts` was created by Sean McKay. It is licensed under the terms of the MIT license.

## Credits

`mds_sm_pycounts` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
synthgen 0.1.1
Generate strings according to specified characteristics
License: MIT
Requires Python: >=3.10,<4.0

### SynthGen

## Introduction

<p> SynthGen is a string generator that generates name-like strings for synthesising name identifiers. <br>
The main goal for developing SynthGen is to create strings that shares the characteristics of a known population. <br>
This version of SynthGen generates low fidelity sex and ethnicity.</p>

Users can tailor:<br>

Total number of terms to generate: total_strings (int) (1,000) <br>

# characteristics related to gender/ethnicity

<p> Proportion of names are unique (not correct yet): unique_percentage (int) (0.5)<br>
Proportion of gender: gender_settings (dict) {'Male': 0.4, 'Female': 0.6} <br>
Proportion of Strings overlapped by gender: gender_overlap_percentage (int) (0.15) <br>
Proportion of ethnicity: ethnicity_settings (dict) {'White': 0.81, 'Asian': 0.096, 'Black': 0.042, 'Mixed': 0.03, 'Other': 0.022} <br>
Proportion of Strings overlapped by ethnicity: ethnicity_overlap_percentages (dict) {('White', 'Black'): 0.1, ('White', 'Asian'): 0.05, ('White', 'Other'): 0.1} <br> </p>

# String related characteristics:

<p>string_settings = { <br>
    'lengths': [4, 5, 6, 7],  # Specify lengths <br>
    'length_probabilities': [0.15, 0.3, 0.4, 0.15],  # Specify length probabilities <br>
    'num_terms_range': [1, 2, 3],  # Specify number of terms range  <br>
    'num_terms_probabilities': [0.2, 0.6, 0.2]  # Specify number of terms probabilities  <br>
} </p>

## Future direction - 1
Other string characteristics will be introduced to tailor, such as:
- apostrophes, hyphens, non-ISO characters
- vowel-consonant ratios

Uniqueness of terms will be a key goal to be retained, by gender and ethnicity. 


## Future direction - 2
To implement a insight tool to generate settings based on the loaded dataframe, and generate strings that match the characteristics of the loaded dataset.

---

## Current work-around looks like:

uniqueness_requirements = {
    ('White', 'Male'): 0.85,
    ('White', 'Female'): 0.80,
    ('Black', 'Male'): 0.90,
    ('Black', 'Female'): 0.75,
    # Add more combinations as needed
}

df = pd.read_csv('output_from_SynthGen.csv')
grouped_df = df.groupby(['Ethnicity', 'Gender'])

for group, group_data in grouped_df:
    # Get the desired uniqueness for the current group from the dictionary
    desired_uniqueness = uniqueness_requirements.get(group, 0.8)  # Default to 0.8 if not specified
    
    # Calculate the number of unique names needed for the group based on desired uniqueness
    total_names = len(group_data)
    unique_names_needed = int(desired_uniqueness * total_names)
    
    # Apply your sampling technique to ensure the desired level of uniqueness
    # Replace this with your actual sampling logic
    sampled_data = group_data.sample(unique_names_needed)
    
    # Append the sampled data to the subsample DataFrame
    subsample_df = subsample_df.append(sampled_data)

subsample_df.to_csv('subsampled_data.csv', index=False)
requests-scram 1.0.1
Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the Requests library.
License: MIT
Requires Python: >=3.8

# requests-scram

Implements RFC 7804 Salted Challenge Response (SCRAM) HTTP Authentication Mechanism for the
[Requests](https://requests.readthedocs.io/) library.

See [flask-scram](https://github.com/COUR4G3/flask-scram) for a server-side implementation.

Took much inspiration from [requests-ntlm2](https://github.com/dopstar/requests-ntlm2) and
[requests-gssapi](https://github.com/pythongssapi/requests-gssapi/).


## Getting Started

Initialize ``HTTPSCRAMAuth`` and pass as the ``auth`` parameter to your request or session:

```python
import requests

from requests_scram import HTTPSCRAMAuth

# specify ``mechanisms`` for supported mechanisms (defaults to all non-PLUS)
auth = HTTPSCRAMAuth("user", "pass")

resp = requests.get("http://localhost:5000", auth=auth)
resp.raise_for_status()

print(resp.text)

```


## Todo

- Handle multiple ``WWW-Authenticate`` headers (server would typically advertise multiple SCRAM authentication mechanisms)
- Do something with ``Authentication-Info``?
- Implement [One Round-Trip Reauthentication](https://datatracker.ietf.org/doc/html/rfc7804#section-5.1)


## License

Licensed under the MIT License.
pydecklib 0.1.1
A deck of cards
License: MIT
Requires Python: >=3.9,<4.0

# pydecklib

A deck of cards

## Installation

```bash
$ pip install pydecklib
```

## Usage

`pydecklib` can be used to use a deck of cards in a game context.

```python
from pydecklib.deck import Deck

deck = Deck()
deck.shuffle()
card = deck.draw()
```

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`pydecklib` was created by amaurylekens. It is licensed under the terms of the MIT license.

## Credits

`pydecklib` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
pycounts_yimengxia 0.1.0
Calculate word counts in a text file!
License: MIT
Requires Python: >=3.9

# pycounts_yimengxia

Calculate word counts in a text file!

## Installation

```bash
$ pip install pycounts_yimengxia
```

## Usage

`pycounts_yimengxia` can be used to count words in a text file and plot results
as follows:

```python
from pycounts_yimengxia.pycounts_yimengxia import count_words
from pycounts_yimengxia.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()
```

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`pycounts_yimengxia` was created by Yimeng Xia. It is licensed under the terms of the MIT license.

## Credits

`pycounts_yimengxia` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).