semvec/pypi-packages huggingface dataset:
graphworks 0.5.0
Graph theoretic classes and helper functions.
License: MIT
Requires Python: >=3.7

# Graphworks

[![Python package](https://github.com/nathan-gilbert/graphworks/actions/workflows/python-package-ci.yml/badge.svg)](https://github.com/nathan-gilbert/graphworks/actions/workflows/python-package-ci.yml)

## A Python module for efficient graph theoretic programming

## Usage

See the [wiki](https://github.com/nathan-gilbert/graphworks/wiki)

### TLDR

First, `pip install graphworks`

```python
import json
from src.graphworks.graph import Graph

json_graph = {"label": "my graph", "edges": {"A": ["B"], "B": []}}
graph = Graph("my graph", input_graph=json.dumps(json_graph))
print(graph)
```

## Development

### Requirements

- Python 3.8+
- virtualenv
- numpy
- graphviz

### Install the required packages

```sh
pip install virtualenv
virtualenv env
```

### Start the virtualenv

```sh
source ./env/bin/activate
```

### You can deactivate the virtualenv with

```sh
deactivate
```

### Lastly, install the required libraries

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

### Building the package

- Update the version number in `graphworks.__init__.py`
- Run `python -m build`
- Run `twine check dist/*`
- Upload to test PyPi: `twine upload --repository-url https://test.pypi.org/legacy/ dist/*`
- Upload to PyPi main: `twine upload --skip-existing dist/*`
- To autopublish, tag commit with `git tag -a vX.Y.Z -m 'release message`
- Then `git push --tags`

### Diagnostics

- Run the unit tests: `python -m unittest discover tests '*_tests.py'`
- Run unit test coverage: `coverage run --source=graphworks/ -m unittest discover tests '*_tests.py'`
- Generate test coverage reports (either works):
  - `coverage report --omit="*/test*,*/venv/*"`
  - `coverage html --omit="*/test*,*/venv/*"`

## TODO

- Create Vertex class
- <https://www.python-course.eu/graphs_python.php>
- Build out directed graphs algorithms
  - <https://algs4.cs.princeton.edu/42digraph/>
- Allow for weighted graph algorithms
  - Jarnik's algorithm
  - Dijkstra's algorithm
- C++ binaries for speeding up graph computations
pycount-xilinx 0.1.0
Count words in a text file.
License: MIT
Requires Python: >=3.9

# pycount_xilinx

Count words in a text file.

## Installation

```bash
$ pip install pycount_xilinx
```

## Usage

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

```python
from pycount_xilinx.pycounts import count_words
from pycount_xilinx.pycounts import plot_words
import matplotlib.pyplot as plot_words

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

`pycount_xilinx` was created by Xilinx. It is licensed under the terms of the MIT license.

## Credits

`pycount_xilinx` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
Quart-Discord-any 2.2.2b1
Discord OAuth2 extension for Quart using modern Discord Libraries.
License: MIT
Requires Python: >=3.8

# Quart-Discord
[![PyPI](https://img.shields.io/pypi/v/Quart-Discord?style=for-the-badge)](https://pypi.org/project/Quart-Discord/) [![Read the Docs](https://img.shields.io/readthedocs/quart-discord?style=for-the-badge)](https://quart-discord.readthedocs.io/en/latest/) 

Discord OAuth2 extension for Quart using py-cord, nextcord, or the deprecated discord.py.


### Installation
To install current latest release use one of the following commands:

For py-cord: (My recommendation)
```sh
python3 -m pip install Quart-Discord-any[pycord]
```

For nextcord:
```sh
python3 -m pip install Quart-Discord-any[nextcord]
```

For the deprecated discord.py:
```sh
python3 -m pip install Quart-Discord-any[discordpy]
```

# You _MUST_ install one of the extras!


### Basic Example
```python
from quart import Quart, redirect, url_for
from quart_discord import DiscordOAuth2Session, requires_authorization, Unauthorized

app = Quart(__name__)

app.secret_key = b"random bytes representing quart secret key"

app.config["DISCORD_CLIENT_ID"] = 490732332240863233    # Discord client ID.
app.config["DISCORD_CLIENT_SECRET"] = ""                # Discord client secret.
app.config["DISCORD_REDIRECT_URI"] = ""                 # URL to your callback endpoint.
app.config["DISCORD_BOT_TOKEN"] = ""                    # Required to access BOT resources.

discord = DiscordOAuth2Session(app)


@app.route("/login/")
async def login():
    return await discord.create_session()
	

@app.route("/callback/")
async def callback():
    await discord.callback()
    return redirect(url_for(".me"))


@app.errorhandler(Unauthorized)
async def redirect_unauthorized(e):
    return redirect(url_for("login"))

	
@app.route("/me/")
@requires_authorization
async def me():
    user = await discord.fetch_user()
    return f"""
    <html>
        <head>
            <title>{user.name}</title>
        </head>
        <body>
            <img src='{user.avatar_url}' />
        </body>
    </html>"""


if __name__ == "__main__":
    app.run()
```

For an example to the working application, check [`test_app.py`](tests/test_app.py)


### Requirements
* Quart
* Async-OAuthlib
* cachetools


### Documentation
Head over to [documentation] for full API reference. 


[documentation]: https://quart-discord.readthedocs.io/en/latest/