semvec/pypi-packages huggingface dataset:
mbmutils 1.2.0
Developer's tools
Requires Python: >=3.6

# mbmutils

Simpmle common utilities.

## Installation

```
pip install mbmutils
```

## f-Functions

The `f`-functions are simple string utilities of common actions. They have the
standard pattern of:

> return string after|before|between the keys

These all use the "first found" index. Meaning if there are more than one
instance of the key found, they use the first. Because of this there are functions
that look from the front (`f_left | f_right`) and functions that look from the
back (`f_left_back | f_right_back`).

| function     | Description                                                         |
|--------------|---------------------------------------------------------------------|
| f_right      | return everything to the `right` of the key                         |
| f_left       | return everything to the `left` of the key                          |
| f_right_back | return everything to the `right` of the key, starting from the back |
| f_left_back  | return everything to the `left` of the key, starting from the back  |
| f_between          | return everything between the keys          |

You will also find a `not_found` parameter to these functions. This
allows you to define what is returned if the key is not found in the string.

### Examples

```python

from mbmutils import mu

my_string = "hello there fancy world!"

print({mu.f_right(my_string, ' fancy ')})
# -> world!

print({mu.f_left(my_string, ' fancy ')})
# -> hello there 

print({mu.f_left(my_string, 'will not find')})
# -> None 

print({mu.f_left(my_string, 'will not find',
                 not_found="not here")})
# -> not here 
```

## Path functions

There are also a few _path-finding_ functions that search for a path
containing the `partial_path` provided. These will search the current path
and then begin looking upward from there.

There are 2 functions: 1 for files and the other for directories.

```python

from mbmutils import mu

# assuming current folder is
# /path/to/python/code
mu.find_folder_path('data')
# will return the first valid:
#   -> path/to/python/code/data
#   -> path/to/python/data
#   -> path/to/data
#   -> path/data

# again, assuming current folder is
# /path/to/python/code
mu.find_folder_path('my_file.json')
# will return the first valid:
#   -> path/to/python/code/my_file.json
#   -> path/to/python/my_file.json
#   -> path/to/my_file.json
#   -> path/my_file.json

```
octodir2 0.4
Tool for downloading directories from Github repositories
Requires Python: >=3.0
Keywords: github directory download

<div align="center">
    <img src="logo.png">
</div>

Download individual directorys from GitHub repository

# Installation
1. Download latest release [HERE](https://github.com/Jalkhov/octodir/releases/latest)
2. Extract the file and enter the directory
3. Now in the console type
    ```
    $ python setup.py install
    ```
4. And press Enter

# Use

## From the console

```
$ octodir
```

**You will be asked for the following data:**

* **Full folder url:** Direct url to the target folder
  * **Example:** `https://github.com/Jalkhov/octodir/tree/stable/octodir`
* **Output folder**: Absolute path of the output directory
  * You can enter a dot to download in the current working directory

## In code

```python
from octodir import Octodir

target = 'https://github.com/Jalkhov/Octodir/tree/stable/octodir'
folder = '.' # Current working directory

Octo = Octodir(target, folder)
Octo.dowload_folder()
```

# Support me <3

<a href="https://www.buymeacoffee.com/Jalkhov" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
divinate 0.1.2
A framework for Actuarial modelling.
Requires Python: >=3.8

# Divinate

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![pytest](https://github.com/RatulMaharaj/divinate/actions/workflows/pytest.yaml/badge.svg?branch=main)](https://github.com/RatulMaharaj/divinate/actions/workflows/pytest.yaml)

## What is it?

A framework for Actuarial modelling.

## Installation

```sh
pip install divinate
```

## Quick start example

A `model.py` file will be used to house the modelling logic which will be applied to each modelpoint.

```python
# import the library
from divinate import CashFlow, DiscountFactors, Model, StaticFlow

# Create new model instance
model = Model()

# Add a premium component
model.add_component(
    CashFlow(
        input_array=[100], formula=lambda prev: prev * 1.05, label="premium"
    )
)

# Add a sum assured component
model.add_component(CashFlow(label="cover", input_array=[1_000_000]))

# Add an expense component
model.add_component(
    StaticFlow(
        input_array=[10, 10, 10, 10, 10],
        label="expense",
    )
)

# Add discounting component
model.add_component(DiscountFactors(interest_rate=0.05, label="V"))

# Project cashflows over term
# Results return a pandas df object
df = model.project(term=10)

# Perform linear combination style manipulations
# Discounting the components
components = ["premium", "cover", "expense"]
for component in components:
    df[f"V_{component}"] = df[component] * df["V"]


# Define reserving relationship
df["Reserve"] = df["V_cover"] + df["V_expense"] - df["V_premium"]

# Results get returned as a pandas dataframe
print(df)
```

## License

[MIT](https://github.com/RatulMaharaj/divinate/blob/main/LICENSE)

## Documentation

This project is documented using sphinx and the full documentation can be found at **TBD**.

## Development & Contibutions

The following steps can be followed to set up a development environment.

1. Clone the project:

```sh
git clone https://github.com/RatulMaharaj/divinate.git
cd divinate
```

2. Create a virtual environment and activate it using:

```sh
python -m venv venv
source venv/bin/activate # mac
venv\Scripts\activate # windows
```

3. Install the project dependencies:

```sh
pip install -r requirements-dev.txt
```

In development mode, the package can be installed by running:

```sh
pip install -e .
```

4. Install the pre-commit hooks

```sh
pre-commit install
```

### Testing

The tests for this project can be found in the `divinate/tests` directory. Tests will run after every commit (locally) and on every push (using github actions) but can also be run manually using:

```sh
pytest
```
motical 0.1.0
Motivational Life Calendar
Requires Python: >=3.8,<4.0

# Motical - Motivational Calendar

[![PyPI Version][pypi-image]][pypi-url]
[![Build Status][build-image]][build-url]
[![Code Coverage][coverage-image]][coverage-url]
[![][stars-image]][stars-url]
[![][versions-image]][versions-url]

It could be a harsh way to motivate yourself but this Python package/app 
will help you to understand were in your lifetime you are.

Based on avarage lifespan of a person in specific country (in future - based on other life conditions)
you may get your "life calendar" with number of weeks, years already passed and yet to go ...


<!-- Badges: -->

[pypi-image]: https://img.shields.io/pypi/v/motical
[pypi-url]: https://pypi.org/project/motical/
[build-image]: https://github.com/mathspp/motical/actions/workflows/build.yaml/badge.svg
[build-url]: https://github.com/mathspp/motical/actions/workflows/build.yaml
[coverage-image]: https://codecov.io/gh/mathspp/motical/branch/main/graph/badge.svg
[coverage-url]: https://codecov.io/gh/mathspp/motical/
[stars-image]: https://img.shields.io/github/stars/mathspp/motical/
[stars-url]: https://github.com/mathspp/motical
[versions-image]: https://img.shields.io/pypi/pyversions/motical/
[versions-url]: https://pypi.org/project/motical/
msg-relay 0.0.1
Lightweight Python publish/subscribe event bus
Keywords: pubsub message bus pub sub event

PySub
=====

Micro framework for pub/sub decoupling with concurrency support.

| 
|  

| 
|  

Getting Started
---------------

0. Install
~~~~~~~~~~

.. code:: bash

   pip install msg-relay

1. Define Event types and their properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

   from relay import Event

   @dataclass(frozen=True)
   class NewUserCreated(Event):
       user_id: str


   @dataclass(frozen=True)
   class UserDeleted(Event):
       user_id: str

2. Define Subscribers/Handlers and mapping to event types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

   from relay import Subscriber

   class UserCacheHandler(Subscriber):
       def on_new_user(event: NewUserCreated):
           print(f"Publish user to Cache: {event.user_id}")

       def on_user_deleted(event: UserDeleted):
           print(f"Delete user from Cache: {event.user_id}")

       handlers = {
           NewUserCreated: on_new_user,
           UserDeleted: on_user_deleted,
       }


   class EmailHandler(Subscriber):
       def on_new_user(event: NewUserCreated):
           time.sleep(10)
           print(f"Sending welcome email to: {event.user_id}")

       handlers = {
           NewUserCreated: on_new_user,
       }

3. Define Channels
~~~~~~~~~~~~~~~~~~

.. code:: python

   from relay import Channel

   user_updates_channel = Channel(
       identifier="user_updates",
       supported_events=[NewUserCreated, UserDeleted],
       executor=ProcessingExecutor.MULTIPLE_THREADS
   )

   # register subscribers
   user_updates_channel.subscribe(EmailHandler())
   user_updates_channel.subscribe(UserCacheHandler())

4. Publish events
~~~~~~~~~~~~~~~~~

.. code:: python

   from relay import publish

   # generate events
   event2 = NewUserCreated(user_id="21")
   event = UserDeleted(user_id="21")

   # publish events with channel
   user_updates_channel.publish(event)

   # or publish events via msgrelay.publish
   publish(event2, channel_id="user_updates")
pricestf_py 0.1.2
pricestf_py is a library to get Team Fortress 2 items' prices from prices.tf API.

# Prices.tf API


`pricestf_py` is a library to get Team Fortress 2 items' prices from [prices.tf API](https://api2.prices.tf/docs).

Prices can be queried both by items' SKUs or names: to get prices from item names a Steam API key is required.


## Installation

```bash
pip3 install pricestf_py
```

If you are planning to get the items' prices using their names, after installing the package run:

```python
from pricestf_py import TF2Items

TF2Items.save_item_ids(api_key='your-steam-api-key')
```

This method will download the list of item IDs which are necessary to generate the items' SKUs.

Use it also to update the items list (e.g. when new items are added to Team Fortress 2).


## Examples

```python
from pricestf_py import PricesTF

# Get token from prices.tf API
ptf = PricesTF()

# get item prices from its name
response = ptf.price_by_name("Rump-o'-Lantern", "Unique", craftable=False, australium=False, killstreak=0)
print(response)

# get item price from its SKU
response = ptf.price_by_sku(869, 6, craftable=False, australium=False, killstreak=0)
print(response)
```