semvec/pypi-packages huggingface dataset:
grscheller.datastructures 0.24.0
### package datastructures
Requires Python: >=3.12
Keywords: datastructures, data structures, fifo, lifo, stack, queue, SplitEnd

# Python Datastructures Useful for Algorithms

Python package of data structures which support the use and
implementation of algorithms.

* **Repositories**
  * [grscheller.datastructures][1] project on *PyPI*
  * [Source code][2] on *GitHub*
* **Detailed documentation**
  * [Detailed API documentation][3] on *GH-Pages*


### Overview

Data structures allowing developers to focus on the algorithms they are
using instead of all the "bit fiddling" required to implement behaviors,
perform memory management, and handle coding edge cases. These data
structures allow iterators to leisurely iterate over inaccessible copies
of internal state while the data structures themselves are free to
safely mutate. They are designed to be reasonably "atomic" without
introducing inordinate complexity. Some of these data structures allow
data to be safely shared between multiple data structure instances by
making shared data immutable and inaccessible to client code.

* functional & imperative programming styles supported
  * functional programming encouraged
  * project endeavors to remain Pythonic
    * methods which mutate objects don't return anything
      * like Python lists
    * in caparisons identity is considered before equality
      * like Python builtins

Sometimes the real power of a data structure comes not from what it
empowers you to do, but from what it prevents you from doing to
yourself.

---

[1]: https://pypi.org/project/grscheller.datastructures/
[2]: https://github.com/grscheller/datastructures/
[3]: https://grscheller.github.io/grscheller-pypi-namespace-docs/datastructures/
grscheller.fp 1.2.0
### Package grscheller.fp - Pythonic Functional Programming
Requires Python: >=3.12
Keywords: functional, functional programming, fp, monad, iterators, maybe, either, lazy, non-strict

# Python Functional Programming (FP)

Functional programming tools which endeavor to be Pythonic.

* **Repositories**
  * [grscheller.fp][1] project on *PyPI*
  * [Source code][2] on *GitHub*
* Detailed documentation for grscheller.datastructures
  * [Detailed API documentation][3] on *GH-Pages*

### Modules

* grscheller.fp.iterables
  * iteration tools implemented in Python
* grscheller.fp.nothingness
  * singleton classes representing either a
    * missing value
    * sentinel value
    * failed calculation
* grscheller.fp.err\_handling
  * monadic tools for handling missing values & unexpected events

### Benefits of FP

* improved composability
* avoid exception driven code paths
* data sharing becomes trivial due to immutability

---

[1]: https://pypi.org/project/grscheller.fp/
[2]: https://github.com/grscheller/fp/
[3]: https://grscheller.github.io/grscheller-pypi-namespace-docs/fp/
strava2gpx 1.0.1
A package to convert Strava activities to GPX format
Requires Python: >=3.8
Keywords: strava, gpx, convert

# Strava2GPX
![strava2gpx](https://github.com/user-attachments/assets/12a5735d-cb4d-4a2f-900f-47e6fb3b191d)

[Small Tutorial](https://jamesephelps.com/2024/07/18/how-to-get-gpx-files-from-the-strava-api-strava2gpx-python/)

A Python package to convert Strava activities using the Strava API to GPX format. Supports encoding heart rate, cadence, power (watts), and temperature data into GPX file using Garmin GpxExtensions format. Will not convert activity types without GPS data (e.g. Yoga, Weightlifting, etc.) Open a new issue to request additional features and report current problems or open a pull request if you want to contribute your own work.


## Installation

```sh
pip install strava2gpx
```
## Update

```sh
pip install --upgrade strava2gpx
```

## Usage Examples

### Write Activity by ID to GPX File
```python
from strava2gpx import strava2gpx
import asyncio

'''
Sends web requests so use in conjunction with asyncio 
or any other async library
'''

async def main():
    '''
    put in your Strava Api client_id, refresh_token, and client_secret
    '''
    client_id = '123456'
    refresh_token = 'adfh750a7s5df8a00dh7asdf98a9s8df6s9asdf8'
    client_secret = 'ahgdyt5672i3y8d345hgd2345c23hjgd1234yd23'

    # create an instance of strava2gpx
    s2g = strava2gpx(client_id, client_secret, refresh_token)

    # connect to Strava API
    await s2g.connect()

    # write activity to output.gpx by activity id
    await s2g.write_to_gpx(11893637629, "output")

if __name__ == '__main__':
    asyncio.run(main())
```

### Get a List of All User Activities
```python
from strava2gpx import strava2gpx
import asyncio
import os

async def main():
    '''
    put in your Strava Api client_id, refresh_token, and client_secret
    example using env variables
    '''
    client_id = os.getenv('STRAVA_CLIENT_ID')
    client_secret = os.getenv('STRAVA_CLIENT_SECRET')
    refresh_token = os.getenv('STRAVA_REFRESH_TOKEN')

    # create an instance of strava2gpx
    s2g = strava2gpx(client_id, client_secret, refresh_token)

    # connect to Strava API
    await s2g.connect()

    # get a list of all user's Strava activities
    activities_list = await s2g.get_activities_list()

    '''
    Each list element is the following format
    [name, id, start_date, type]
    '''

    print(activities_list[0:5])

if __name__ == '__main__':
    asyncio.run(main())
```

#### Output
```
[
    ['Legs may be sore', 11910466229, '2024-07-17T11:57:21Z', 'Ride'],
    ['Tall Grass, Hidden Dirt', 11906994862, '2024-07-17T00:10:57Z', 'Ride'],
    ['A little thunder there, a little MTB here', 11898361818, '2024-07-16T01:16:13Z', 'Ride'],
    ['Morning Run', 11893637629, '2024-07-15T11:50:49Z', 'Run'],
    ['Afternoon Yoga', 11880523323, '2024-07-13T19:09:04Z', 'Yoga']
]
```
JynParser 1
JynParser Python Parser Module

1. **`JynParser(Replacement with main)`**
   - **`Replacement`**:Replacement code to replace with main functon.
   - **What it does**: Swaps the codes with main.
   - **WARNING**:Swapping the codes cannot be undoed after! (Working on so u can swap the codes back.)
   - **Example**:
   def main():
      print("Hello world!")
   def function-name():
      print("Not hello world!")
   main()
   JynParser(function-name)
   main()

   Output:Hello world!
          Not hello world!
cypher-shell 0.5
Cypher Shell -- a shell for querying Neo4j with Cypher
Requires Python: >3.10
Keywords: cypher, neo4j, querying, shell, llm

# Cypher Shell

A shell for querying Neo4j with Cypher using LLMs.

## Installation

```bash
pip install cypher-shell
```

## How to use

```bash
python -m cypher_shell --help
```

or

```bash
python -m cypher_shell run --cfg-path configs/movies.yaml
```

where `configs/movies.yaml` is a configuration file that contains the node and relationship descriptions.

If no configuration file is provided, the tool will try to generate a schema automatically. This might give worse results.

You need to set the `.env` file with your OpenAI API key and Neo4j credentials. See `.env_template` for more information.

### Docker

You can also run the tool using Docker.

```bash
docker run --env .env -it ghcr.io/lemurpwned/cypher-shell:latest python3 -m cypher_shell run --cfg-path configs/movies.yaml
```

### Run query without LLM

Just preface the query with: `cs:` and the query will not be rewritten by the llm.

## Notes:

- sometimes getting the schema automatically is better than providing it manually.
mantis-xray 3.2.9
MANTiS is a Multivariate ANalysis Tool for x-ray Spectromicroscopy
Requires Python: >=3

# Spectromicroscopy #
[Spectromicroscopy](http://spectromicroscopy.com) combines spectral data with microscopy,
where typical datasets consist of a stack of microscopic images
taken across an energy range. Due to the data complexity, manual analysis 
can be time consuming and inefficient, whereas multivariate analysis tools 
not only reduce the time needed but also can uncover hidden trends in the data.

# Mantis #
[MANTiS](http://spectromicroscopy.com) is Multivariate ANalysis Tool for Spectromicroscopy developed in Python by [2nd Look Consulting](http://2ndlookconsulting.com). It uses principal component analysis and cluster analysis to classify pixels according to spectral similarity.

## Download ##
Mantis package and binaries can be downloaded from 
[spectromicroscopy.com](http://spectromicroscopy.com).
Alternatively, you can install [Python](https://www.python.org/downloads/) and then run the command: `python3 -m pip install mantis-xray`

## Update ##
You can upgrade to the latest package release with the command: `pip3 install mantis-xray -U`.
It is recommended that you also upgrade the dependencies with: `pip3 install mantis-xray -U --upgrade-strategy "eager"`

## Run ##
Installation via pip provides the `mantis-xray` command (alternatively `python3 -m mantis_xray`) to start the Mantis GUI.

## User Guide ##
Mantis User Guide can be found at [https://docs.spectromicroscopy.com/](https://docs.spectromicroscopy.com/).

## References ##

Please use the following reference when quoting Mantis

Lerotic M, Mak R, Wirick S, Meirer F, Jacobsen C. MANTiS: a program for the analysis of X-ray spectromicroscopy data. J. Synchrotron Rad. 2014 Sep; 21(5); 1206–1212 [http://dx.doi.org/10.1107/S1600577514013964]
partial-rankings 1.0.0
Infer partial rankings from a series of pairwise comparisons.
Requires Python: ~=3.11.9

# partial-rankings

Paired comparisons are a standard method to infer a ranking between a series of players/actors. A shortcoming of many of these methods is that they lack mechanisms that allow for partial rankings --rankings where multiple nodes can have the same rank. This package contains models to infer partial rankings from pairwise comparisons as described in **PREPRINT**.

## Project organization

```
├── environment.yml    <- Conda environment configuration file
├── LICENSE            <- Open-source license
├── Makefile           <- Makefile
├── README.md          <- This file.
├── data
│   ├── interim        <- Intermediate data that has been transformed.
│   ├── processed      <- Final data sets.
│   └── raw            <- Original data sets (wolf data set).
│
├── example.ipyb       <- Jupyter notebook containing an example use case of the
│                         partial_rankings algorithm when applied to a set of dominance 
│                         interactions among a pack of wolves.
│
├── pyproject.toml     <- Project configuration file with package metadata
│
├── requirements.txt   <- Requirements file for reproducing the analysis environment.
│
├── setup.cfg          <- Configuration file for flake8
│
└── partial_rankings   <- Source code for use in this project.
    │
    ├── __init__.py             <- Makes partial_rankings a Python module
    │
    ├── dataset.py              <- Code to read or generate data
    │
    ├── decos.py                <- Useful decorators
    │
    ├── model.py                <- Code to fit partial rankings algorithm
    │
    ├── preprocessing.py        <- Code to extract information from match lists
    │
    └── utils.py                <- Utility functions
```

## Installation
The ``partial-rankings`` package can be installed through pip:

```bash
pip install partial-rankings
```

To ensure that all dependencies are correctly installed it is recommended to create a Conda envrionment from the ``envrionment.yml`` file by running

```bash
conda env create --file=envrionment.yml
```

which will install the ``partial-rankings`` package along with all of its dependencies.

## Typical usage
Once the package has been installed it can be imported as

```python
import partial_rakings
```

Below is a typical use case:
```python
from partial_rankings.dataset import read_matchlist
from partial_rankings.model import partial_rankings
from partial_rankings.preprocessing import get_N, get_M, get_edges
```

```python
# Load match list
matchlist = read_matchlist("../data/raw/match_lists/wolf.txt")

# Extract algorithm inputs
N = get_N(matchlist)  # Number of players
M = get_M(matchlist)  # Number of matches
e_out, e_in = get_edges(matchlist)  # Out and in edges

# Fit model
model_fit = partial_rankings(N, M, e_out, e_in, full_trace=True)
```

See ``example.ipynb`` for further details.

--------