semvec/pypi-packages huggingface dataset:
karoosync 1.4.0
Syncs workouts from intervals.icu to Hammerhead Karoo
License: MIT

## Overview

karoosync gets today's workout from [intervals.icu](https://intervals.icu) for usage on a Hammerhead Karoo bike computer.

## Getting Started
- Install this using `pip install karoosync`
- Get your [intervals.icu](https://intervals.icu) API key on your [account](https://intervals.icu/settings) page.
- Run `karoosync`, the first time it will create a `karoosync.cfg` config file in your current directory.
- Open `karoosync.cfg` and modify it as required:
    - The start & end dates that you want to get the activities for, can be the same date if you only want one day.
    - Your intervals.icu athlete id & API key.
    - Add your Hammerhead dashboard username & password.
- Run the app with `karoosync`.
- You'll see the workout show up in the dashboard under workouts and on your Karoo.

## Caveat
If you run the app multiple times for the same date, you will see duplicates in the Hammerhead dashboard that might have to be removed manually. Bandwidth permitting I'll try to improve that workflow in a future version.

## Disclaimer
This website is in no way affiliated with either Hammerhead or https://intervals.icu. It was developed for personal use and is not supported. I welcome pull requests if you want to contribute.
plai 0.1
Programming language to create data manipulation pipelines.
License: MIT
Requires Python: >=3.6

# Plai [![codecov](https://codecov.io/gh/matheusbsilva/plai/branch/development/graph/badge.svg?token=Z56KFD6WPY)](https://codecov.io/gh/matheusbsilva/plai)

Plai is a domain specific programming language(DSL) to create data manipulation pipelines with focus on data treatment, validation and easier syntax. It uses [pandas](https://pandas.pydata.org) as data manipulation engine so it is meant to work with small data.

## Examples 

Example of pipeline with basic data manipulation using Plai:

```
df = read_file('issues.csv')

pipeline(df) as 'gh_pct_issues_by_language.csv':
    $.groupby(.name, as_index=False).sum()
    (.count/.count.sum()) * 100 as pct
    {.name, .count, .pct}
```

To create validations for the dataframes being manipulated you can define dictionaries mapping each column to a specific type, and apply
that to a dataframe or pipeline. When applied to the dataframe it will validate its schema accordingly to the defined on the dictionary, that is, it will check data type and column presence. For the pipeline, the result dataframe will be validated. The following snippet is an example of implementation:

```
input_type = {
    'name': 'str',
    'year': 'int',
    'quarter': 'int',
    'count': 'int'
}

output_type = {
    'name': 'str',
    'count': 'int',
    'pct': 'float'
}

input_type::df = read_file('issues.csv')

output_type::pipeline(df) as 'gh_pct_issues_by_language.csv':
    $.groupby(.name, as_index=False).sum()
    (.count/.count.sum()) * 100 as pct
    {.name, .count, .pct}
```

## Development 

1. Install the dependencies by running the command on the root folder of the project:
```
pip install -r requirements-dev.txt
```

2. To run all the tests execute:
```
pytest tests
```

To run a specific test execute:
```
# For a specific test file
pytest tests/test_grammar.py

# For a specific test class
pytest tests/test_grammar.py::TestBasicTokens

# For a specific tests method
pytest tests/test_grammar.py::TestBasicTokens::test_token_number
```

3. To run the interactive terminal execute on the root folder:
```
python -m plai
```

4. To execute the code from a file:
```
python -m plai file.plai
```
pycounts-ca 0.2.1
Calculates word counts in a text file!
License: MIT
Requires Python: >=3.9,<4.0

# pycounts_ca

Calculates word counts in a text file!

## Installation

```bash
$ pip install pycounts_ca
```

## Usage

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

```python
from pycounts.pycounts import count_words
from 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.
Contributor - Christopher Alexander (@christopheralex)

## License

`pycounts_ca` was created by Christopher Alexander. It is licensed under the terms of the MIT license.

## Credits

`pycounts_ca` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
carddeck 0.1.3
Python package for a deck of cards
License: MIT
Requires Python: >=3.6.0
Keywords: card game, sample


# Poker Hands from a Deck of Cards
 _An object model of cards is loaded into a deck, that is shuffled and dealt out as hands is packaged in the python module **carddeck**._

 Carddeck is composed of four python classes: 1) cards, 2) deck, 3) pokerhands, and 4) errors.  It is a concept used to exercise python setup, coding, documenting and packaging for pypi distribution. 
## Install from PyPi
`pip install carddeck`
## Example
The defult of five cards in four hands are dealt after creating a deck, and shuffling it.

    from carddeck.deck import deck
    myD = deck()
    myD.shuffle()
    myD.deal()
    myD.printHands()
    --------
    Outout:
    ['Q♥', '8♥', 'A♥', '2♠', '7♣'] 
    ['4♣', 'K♣', 'J♦', 'J♠', '4♦'] 
    ['4♥', '7♦', '9♥', '2♦', '10♠'] 
    ['2♥', 'Q♣', 'A♦', 'J♣', '5♦'] 
The four hands are evaluated using the PokerHands object.

    from carddeck.pokerhands import PokerHands
    myPH = PokerHands()
    for i in range(0,len(myD.hands)):
        theCards = myD.hands[i]
        theHand = myPH.getHand(theCards)
        print(theCards, theHand)
    --------
    ['Q♥', '8♥', 'A♥', '2♠', '7♣'] High card: A
    ['4♣', 'K♣', 'J♦', 'J♠', '4♦'] Two pair: 4 and J
    ['4♥', '7♦', '9♥', '2♦', '10♠'] High card: 10
    ['2♥', 'Q♣', 'A♦', 'J♣', '5♦'] High card: A
The next deal from the remaining cards can then be evaluated.

    myD.deal()
    for i in range(0,len(myD.hands)):
        theCards = myD.hands[i]
        theHand = myPH.getHand(theCards)
        print(theCards, theHand)
    --------
    ['Q♥', '8♥', 'A♥', '2♠', '7♣'] High card: A
    ['4♣', 'K♣', 'J♦', 'J♠', '4♦'] Two pair: 4 and J
    ['4♥', '7♦', '9♥', '2♦', '10♠'] High card: 10
    ['2♥', 'Q♣', 'A♦', 'J♣', '5♦'] High card: A
simple-file-logger 0.1.6
A simple logger class to log to files
License: MIT
Requires Python: >=3.7,<4.0

# Simple File Logger

This python package provides a `Logger` class which is easy to use
for basic logging to files.

## Install

```sh
pip install simple-file-logger
```

## Usage

```py
from simple_file_logger import Logger

logger = Logger("my_log_file", "path/to/log/directory")
logger.info("Hello!")

# writes to `my_log_file_YYYYMMDD_HHMM_SS.log`
# 2022-01-26 11:57:14,182 - INFO - Hello!
```

The constructor provides various options to configure the logger.

```py
logfile_name: str,
log_dir: Union[Path, str, None]=None,
level=logging.DEBUG,
mode="w",
add_timestamp_to_filename=True,
log_to_console=False,
is_null_handler=False,
is_rolling_handler=False,
process: str = None,
```

- To disable to console in addition to the file (default behavior), pass `log_to_console=False`.
- The `is_rolling_handler` parameter controls whether the logger automatically writes to a new file when the existing one becomes larger than `5mb`. It will archive the current log with a serial number and transition to a new file automatically. The limit of archived files is `5` so the oldest one will get deleted when archiving for the 6th time.
- The `is_null_handler` parameter initializes a logger that does nothing. This is useful for unit testing libraries where functions log messages but you don't want any actual logging to take place.
- The `process` parameter is a little addition to provide some info about what process the currently running script represents. It can be any arbitrary string, such as `downloading_data` or `monitoring_files` etc. This process will also appear on each log line. As the script executes, you can set the `process` in the logger object to a new value. This is helpful for producing files which facilitate easy line extraction related to a specific process when the file is big.

  ```py
  logger.process = "downloading_file"
  # ... logic to download some file which does some logging.
  # The lines will have `downloading_file` before the log message.

  # update file contents
  logger.process = "update_contents"  # set process to indicate the context of log messages to follow

  # ... logic to update file contents and do some logging.

  # no need for further process logs, and just want to log messages.
  logger.process = ""  # prevents addition of process string to log message.

  ```