semvec/pypi-packages huggingface dataset:
gym-trajectory 0.1
Custom environment for OpenAI gym
Requires Python: >=3.6

# gym-trajectory
Custom environment for OpenAI gym

N-dimensional trajectory


```py
import gym
import gym_trajectory

env = gym.make('Trajectory-v0')
observation = env.reset()

while True:
    (observation, reward, done, info) = env.step(env.action_space.sample())
    env.render()
```

![](gifs/demo.gif)
lhereader 1.0.11
A python module to read LHE files.
Keywords: lhe madgraph parser reader reading parsing

# lhereader
[![PyPI version](https://badge.fury.io/py/lhereader.svg)](https://badge.fury.io/py/lhereader)

A Python module to read LHE files. Originally by [diptaparna](https://github.com/diptaparna/lhereader), significantly rewritten by me. No dependency on ROOT, requires python version >= 3.6.

Usage example:

```python
import numpy as np
from lhereader import LHEReader


reader = LHEReader('path/to/file.lhe')

# Mediator mass in each event
mmed = []
counter = 0
for iev, event in enumerate(reader):
    # Find DM particles
    dm = filter(lambda x: abs(x.pdgid)== 52, event.particles)

    # Sum over all DM four-momenta in the event
    combined_p4 = None
    for p4 in map(lambda x: x.p4(), dm):
        if combined_p4:
            combined_p4 += p4
        else:
            combined_p4 = p4
    mmed.append(combined_p4.mass)

print(f'Mean mediator mass: {np.mean(mmed)}')
print(f'Median mediator mass: {np.median(mmed)}')
```

## Treatment of weights


The parser assumes that each weight XML element has an attribute called `id` that uniquely identifies the weight per event. In practical terms, each entry should look roughly like this:

```
<wgt id='some string'> 123456.7 </wgt>
```

Weights are read in one of two modes: `list` or `dict`, which can be set via the `weight_mode` argument to the `LHEReader` constructor. In the first case, weights are returned as an unlabelled list in the order of appearance. In the second case, weights are returned as a dictionary per event, which the `id` attribute serving as the key, and the weight as the value. 

The weights can easily be filtered using the `weight_regex` argument. Only weights with an `id` matching this regular expression will be returned.

In case no `id` attribute can be found, the `dict` mode, as well as filtering are not supported
simplerecommender 0.0.2
Items recommendation for a specific user
Keywords: python,recommendation algorithm,recommender,recommendation

Recommending items for a specific existing user based on user rating and average rating per item

## Installation

Run the following to install:

```python
pip install simplerecommender
```

## Usage

```python
import simplerecommender

# get recommendations

simplerecommender.rec(df,
		      genre_col,
		      user_col,
		      user,
		      user_rating_col,
		      avg_rating_col,
		      sep=None)
```

[GitHub](https://github.com/sujanshirol/simplerecommender)
EgC-Demo-Package-test 0.0.3
A small example package from EGC
Requires Python: >=3.7

Copyright (c) 2018 The Python Packaging Authority

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
pyduckdb 0.0.1b3
A Python wrapper around DuckDB to add some convenience.
Requires Python: >=3.7

# pyduckdb

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Python wrapper for DuckDB to add type hinting and more closely mirror SQLite. This is still a rough work in
progress, but should hopefully highlight the utility of the [PEP 249](https://github.com/thesketh/pep249) 
abstract base classes.

This implementation provides Python type hints, context managers, and more distinct cursor types on top of
DuckDB. This is not intended to be used in production, but as a test bed for some ideas and to demonstrate
the abstract base classes.

## Installation

```
python3 -mpip install pyduckdb
```

## Usage

Uses the standard Python database API.

```python
from pyduckdb import connect

def main():
    with connect(":memory:") as connection:
        with connection.execute("SELECT 1;") as cursor:
            print(next(cursor))

if __name__ == "__main__":
    main()

```

There is a very naive async implementation available, which essentially involves wrapping every call
with [`asyncio.to_thread`](https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread):

```python
import asyncio
from pyduckdb.aiopyduckdb import connect

async def main():
    async with connect(":memory:") as connection:
        async with await connection.execute("SELECT 1;") as cursor:
            print(await cursor.fetchone())

if __name__ == "__main__":
    asyncio.run(main())

```

Differences from the PEP:
 - `Connection`s implement the `execute*()` functions from the cursor, and return a cursor, as SQLite does.
 - `Connection`s and `Cursor`s implement `executescript()` as SQLite does.
 - `Cursor`s implement the same transactional features as their `Connection`s.
autoscriber 1.0.4
Python library for the autoscriber summarizer.
Requires Python: >=3.4

# autoscriber-lib
Python library for the autoscriber summarizer.

## Install
```bash
python3 -m pip install --upgrade autoscriber
```

## Usage
```python
from autoscriber import summarize
summarize("text here") # list of bullet points
```

## Run Example
```python
python3 example.py
```
salahs-twitterbot 1.3.1
twitterbot to remove/view favorites/tweets and view trending tweets
Keywords: web twitterbot twitter

# Twitter Bot
twitter bot
+ delete tweets
+ get trending tweets

## Install
` pip install salahs-twitterbot[scripts]`

## Twitter API
- create a new [twitter application](https://apps.twitter.com/)
- save consumer key, consumer secret, access  key and access secret as environment variables

```
cat <<EOF > keys.env
export TWITTER_CONSUMER_KEY='aaaaaaaaaaaaaaaaaaaaaaaaa'
export TWITTER_CONSUMER_SECRET='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
export TWITTER_ACCESS_TOKEN='aaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
export TWITTER_ACCESS_TOKEN_SECRET='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
EOF
source keys.env
```

- `delete_old_tweets --help`
- `get_trending_tweets --help`
- `remove_favorites --help`
py-twitch 0.1.3
Twitch API Python client

# py-twitch

![python](https://img.shields.io/badge/python-v3.7-blue)

`py-twitch` is Twitch Helix REST API client library.

This library supports typing using dataclass, so you can use IDE's auto complete.

## Note

*Api with OAuth is not implemented. It will be implemented in the future.*


## Installation



```shell
pip install py-twitch
```

## Requirements


+ python ( > 3.7 )
+ requests
+ dacite

## Usage

every client method named method_url. 

For example, `GET https://api.twitch.tv/helix/users` is defined as `get_users`


### Example
#### Single Parameter Example
```python
from twitch.client import TwitchAPIClient
client_id = "YOUR CLIENT ID"
client_secret = "YOUR CLIENT SECRET"

client = TwitchAPIClient(client_id, client_secret)

# Default Example
pagination = None
while True:

	data = client.get_users_follows(from_id="171003792", after=pagination)
	pagination = data.pagination.cursor

	for user in data.data:
		print(f"{171003792} following {user.to_name}")

	if not pagination:
		break

```

#### Multiple Parameter Example
```python
from twitch.client import TwitchAPIClient
client_id = "YOUR CLIENT ID"
client_secret = "YOUR CLIENT SECRET"

client = TwitchAPIClient(client_id, client_secret)

# Multi Query Parameters Example
data = client.get_users(id=["141981764", "171003792"])
for user in data.data:
	print(f"display_name is {user.display_name}")

print(data)
```


## TODO

+ Implements OAuth Methods

+ Change fields(such as started_at) type to DateTimeField 

+ ~~Check Optional fields and List fields~~