semvec/pypi-packages huggingface dataset:
gameServerBackend 0.0.4
A framework that interfaces games with websockets
Requires Python: >=3.7

![Python application](https://github.com/hydrogen602/gameServerBackend/workflows/Python%20application/badge.svg)
# gameServerBackend
A WebSocket based server for web games. Requires at least Python3.7

The objective is to make one websocket server than can track many users and games and know which users is playing what game. 
The goal is to make it so that it can be easily used to make a new game without having to worry about the issues of managing a
websocket server or identifying players, so that the game code can be given just a player and the action the player would like to perform.

## Docs

http://www.jonathanrotter.com/gameServerBackend/

## Notes
- lets have player id be the name

## How to run the example:
- go the the example directory
- run `python3 game.py`
- open the `index.html` page
- enter a name and connect  
Note: Little to no effort has been put into the frontend of the example because it is just for testing purposes
BRImage 0.1.9
Glitch Art Toolkit mimicking CRT monitor defects.
Requires Python: >=3.7

![](https://github.com/Dustpancake/BRImage/blob/master/banner-image.jpg) 

# BRImage
![Build](https://github.com/dustpancake/BRImage/workflows/Build/badge.svg)
[![PyPI Version](https://img.shields.io/pypi/v/brimage.svg)](https://pypi.python.org/pypi/BRImage/)
[![PyPI Downloads per Week](https://img.shields.io/pypi/dw/brimage.svg)](https://pypi.python.org/pypi/BRImage/)

Glitch Art Library and command line tool for generating glitch-art effects inspired by CRT monitors.
One-liner install (requires Python >=3.7)
```
pip install BRImage && brimage -h
```

<!--BEGIN TOC-->
## Table of Contents
1. [Installation and use](#toc-sub-tag-0)
	1. [pypi](#toc-sub-tag-1)
	2. [git](#toc-sub-tag-2)
2. [Sample image:](#toc-sub-tag-3)
<!--END TOC-->

## Installation and use <a name="toc-sub-tag-0"></a>
BRImage now comes with a very minimal command line interface, usable with
```bash
brimage -h
```

### pypi <a name="toc-sub-tag-1"></a>
I've made the project available with `pip` (you can view the project [here](https://pypi.org/project/BRImage/)):
```bash
pip install BRImage
```

and run with
```bash
brimage
```

### Building from source <a name="toc-sub-tag-2"></a>
Requires [SWIG](http://swig.org/).

First, clone the repository
```bash
git clone https://github.com/Dustpancake/BRImage && cd BRImage
```
It is recommended to use a *virtual environment*
```bash
# *nix
python3 -m venv venv && source venv/bin/activate
```

Generate the SWIG files; for this we require `numpy.i`:
```bash
curl "https://raw.githubusercontent.com/numpy/numpy/master/tools/swig/numpy.i" > BRImage/clib/numpy.i
```
Then we generate the `.py` and `.cxx` files with
```bash
cd BRImage/clib \
    && swig -c++ -python -py3 algorithms.i \
    && cd -
```
We then build with
```bash
python setup.py build_ext --inplace
```

or install into the environment with 
```bash
pip install .
```
- Running the script

To run when build from source:
```bash
python BRImage
```

If installed, use
```bash
brimage
```

## Sample image: <a name="toc-sub-tag-3"></a>

Input Image            |  Output Image
:-------------------------:|:-------------------------:
![](https://github.com/Dustpancake/BRImage/blob/master/sample-image.jpg)  |  ![](https://github.com/Dustpancake/BRImage/blob/master/sample-glitch.jpg)
pybaf 2.0.5
Python Distance Calculator Bing Api facilitator
Requires Python: >=3.6

[![PyPI version](https://badge.fury.io/py/pybaf.svg)](https://badge.fury.io/py/pybaf)
# Python Bing API Facilitator 

Python Bing API Facilitator is a Python library created to simplify the usage of the bing api for distance between two geographic coordination. The project is on current development and future methods may be implemented 

## Installation

Import the package from Pypi

```python
pip install pybaf
```

## Usage

Import the class pybaf from the package

```python
from pybaf import pybaf
```

Define the bing_api with your [Bing key](https://www.bingmapsportal.com/)
```python
pybaf = pybaf(key = 'key')
```


You need to define two dataframes that contain latitude and longitude and their IDs to calculate a Distance Matrix

```python
df_origin = 'Insert the origin dataframe here'
df_destination = 'Insert the origin dataframe here'
```

The **distance_matrix** method returns a pd.DataFrame with all cross IDs (origin and destination) with their relative distance(KM) and time(minutes).

Note that you will need to pass the destination_id and origin_id to identify the returning pd.DataFrame

```python
df_matrix = pybaf.distance_matrix(df_destination='', df_origin='', destination_id='', origin_id='',)
```

The **n_smallest** method returns the n_smallest value between id_origin the id_destinations

```python
n_smallest_df = pybaf.n_smallest(df_final, n=1,origin_id='', destination_id='',value='')

# default n=1
```




## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


## Authors

developed by [joaovitorncn](https://github.com/joaovitocn)
async-redis-objects 0.4.1
Object oriented interface to aioredis.
Keywords: utility redis oop object-oriented

[![Actions Status](https://github.com/adam-douglass/async-redis-objects/workflows/unittests/badge.svg)](https://github.com/adam-douglass/draughts/actions)
[![codecov](https://codecov.io/gh/adam-douglass/async-redis-objects/branch/main/graph/badge.svg?token=6n3DbzkOwk)](https://codecov.io/gh/adam-douglass/async-redis-objects)

Async Redis Objects
===================

Some object orient wrappers around the redis interface provided by [`aioredis`](https://github.com/aio-libs/aioredis).

Notes
-----

 - Included:
   - hash table
   - queue (list)
   - priority queue (sorted set)
   - locks (keys)
 - Includes python implementation with matching interface for mocking. \
   `from async_redis_objects.mocks import ObjectClient`
 - tested on pypy and CPython 3.6 to 3.9
 - [API documentation on read the docs](https://async-redis-objects.readthedocs.io)

Example
-------

```python
import aioredis
import asyncio
from async_redis_objects import ObjectClient


async def main():
    # Connect with aioredis as normal
    redis = aioredis.Redis(await aioredis.pool.create_pool(address='redis://redis:6379', db=3, minsize=5))

    # Make an object client object with your redis object
    objects = ObjectClient(redis)

    # Access a hash table in redis
    table = objects.hash('hash-table-key')
    await table.set('name', 'Hello World')

    # Access a queue
    queue = objects.queue('queue-name')
    await queue.push(await table.get('name'))
    await queue.push(100000)

    # Access a priority queue
    pq = objects.priority_queue('other-queue-name')
    await pq.push({'name': 'same json serializable object'}, priority=100)
    await pq.push(await queue.pop(), priority=101)
    print(await pq.pop())  # Print Hello World

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```
britz 0.0.0
Easily review dependencies between SQL Transformations
Requires Python: >=3.8

***Attention, this project is not in any state to be used.***

# britz
Easily review dependencies between SQL Transformations


[![test-action](https://github.com/JimFawkes/britz/workflows/run_tests/badge.svg)](https://github.com/JimFawkes/britz/actions)
[![codecov](https://codecov.io/gh/JimFawkes/britz/branch/master/graph/badge.svg)](https://codecov.io/gh/JimFawkes/britz)
![python](https://img.shields.io/badge/python-3.8-blue)
[![black](https://github.com/JimFawkes/britz/workflows/Lint/badge.svg)](https://github.com/JimFawkes/britz/actions)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](COPYING)
[![Latest Tag](https://img.shields.io/github/v/tag/jimfawkes/britz)](https://github.com/JimFawkes/britz/releases)
[![CodeFactor](https://www.codefactor.io/repository/github/jimfawkes/britz/badge)](https://www.codefactor.io/repository/github/jimfawkes/britz)
[![CodeQL](https://github.com/JimFawkes/britz/workflows/CodeQL/badge.svg)](https://github.com/JimFawkes/britz/actions)
flashtool 0.0.10
A few ready-to use python tools for machine learning
Requires Python: >=3.0

# FlashPythonToolbox
A few ready-to use python tools for machine learning

## Install
```
pip install flashtool
```

## Logger (to file)
For every print function, we print a copy to file without changing the whole file.

```python
Logger(filepath = "./log.txt", mode = "w", stdout = None)
```
- `filepath`: output path. Default: "./log.txt"
- `mode`: write mode, e.g., w,w+,a,a+. Default: "w"
- `stdout`: capture which print source. Default: "sys.stdout"

Example:
```python
from flashtool import Logger
import sys
sys.stdout = Logger("path/to/log/file/log.txt")
sys.stdout = Logger("path/to/log/file/log.txt","w")
sys.stdout = Logger("path/to/log/file/log.txt","w", sys.stdout)
```

## Email Module

Default Sender: `gtflashauto@gmail.com`. You need a password for this.

```python
# Function api
def send_email(port = 587,password = None,
        sender_email = "gtflashauto@gmail.com",
        smtp_server="smtp.gmail.com",
        receiver_email = None,
        subject="Subject",
        message="Hello! ",
        attachment=None):
    ...

# Example
from flashtool import send_email
send_email(receiver_email="xxx@gmail.com", subject="Hi", message="first email")
```

## Track Job

Track your job. Send you an email when it is done.

**Tracking by PID**
- Step 1: find your job pid by `ps`, e.g., `ps aux | grep python`
- Step 2:
```python
from flashtool import trackpid
trackpid(12345,5,"xxx@gmail.com")
trackpid([1357,2468],5,"xxx@gmail.com")
```
*API*:
```python
def trackpid(pid, checktime=1, receiver_email=None, sender_email="gtflashauto@gmail.com", msg=""):
  ...
```
- `pid`: pid or pids
- `checktime`: check pid every `checktime` seconds
- `msg`: additional message

## Pytorch Utils

### GPU Usage

```python
import flashtool as flash; flash.check_torch_memory(brief=True)
```
- `brief`: short message (default: Flase)


## Auto Script Running

```python
import flashtool as flash;
basescript='script/run.sh'
config={
    "DATA": "subset5"
}
flash.run_script(basescript, config)
```

## Profile Timing Line by Line 

```python

from flashtool import line_time_profiler 

@line_time_profiler()
def f(n=1000):
    a = [1 for _ in range(n)]
    b = sum(a)

f()
f(10000)

class C:
    @line_time_profiler()
    def f(self, n=1000):
        a = [1 for _ in range(n)]
        b = sum(a)

ins = C()
ins.f()
ins.f(10000)


@line_time_profiler(stop=True)
def f(n=1000):
    a = [1 for _ in range(n)]
    b = sum(a)

f()

```