semvec/pypi-packages huggingface dataset:
print-wcolor 0.0.8
print_wcolor

# print_wcolor
使用print_wcolor可以打印出彩色字体和彩色背景

Use Print WColor to print out colored fonts and colored backgrounds
使用示例

for example

```
from print_wcolor import print_wcolor

a=[1,2,3,4]
c={}
c["r"]=255
c["g"]=255
print("*"*20)
print_wcolor("i think","therefor i am",a,c,fg="red",bg="green")
print("*"*20)
print_wcolor("i think","therefor i am",a,c,fg="red")
print("*"*20)
print_wcolor("i think","therefor i am",a,c,bg="green")
print("*"*20)
print_wcolor("i think","therefor i am",a,c)
```


其中"i think,therefor i am"是要打印的信息，fg是字体颜色，bg是背景颜色。

Where "I think,therefor I am" is the information to be printed, fg is the font color, bg is the background color.

关键词fg选项如下

Keyword FG options are as follows

```
{"black","red","green","yellow","blue","purple","cyan","white"}
```


关键词bg选项如下

Keyword BG options are as follows

```
{"black","red","green","yellow","blue","purple","cyan","white"}
```
pyDRMetrics 0.0.5
A Python toolkit for dimensionality reduction quality assessment
Requires Python: >=3.6

# pyDRMetrics

pyDRMetrics is a Python toolkit for DR (dimensionality reduction) quality assessment. Add a reference to this article if you use this package.
pyDRMetrics - A Python toolkit for dimensionality reduction quality assessment, Heliyon, Volume 7, Issue 2, 2021, e06199, ISSN 2405-8440, https://doi.org/10.1016/j.heliyon.2021.e06199. (https://www.sciencedirect.com/science/article/pii/S2405844021003042)
A more friendly GUI tool using pyDRMetrics can be accessed at http://spacs.brahma.pub/research/DR

# Installation

> pip install pyDRMetrics

# How to use

Download some sample datasets from the /data folder
Use the following sample code to use the package:

    # import the library
    from pyDRMetrics.pyDRMetrics import *

    # load the dataset
    import pandas as pd
    data = pd.read_csv('raman.csv')
    cols = data.shape[1]
    # convert from pandas dataframe to numpy matrices
    X = np.array(data.iloc[:,1:-1]) # skip first and last cols
    y = np.array(data.iloc[:,-1])
    X_names = list(data.columns.values[1:-1]) # -1 for removing the last column
    labels = list(set(y))

    # perform DR, e.g., PCA
    from sklearn.decomposition import PCA
    import matplotlib.ticker as mticker
    K = 2
    pca = PCA(n_components = K) # keep the first K components
    pca.fit(X)
    Z = pca.transform(X)
    Xr = pca.inverse_transform(Z)

    # Create DRMetrics object. This object contains all DR metrics and main API functions
    drm = DRMetrics(X, Z, Xr)
    drm.report() # this will generate a detailed report. You can also access each metric, e.g., drm.QNN, drm.LCMC, etc.
discord-handler 0.0.5
A small discord handler for the logging module using webtokens
Requires Python: >=3

# DiscordHandler

This class is using the integrated logging class from Python and [requests](http://docs.python-requests.org/en/master/) from PyPi. 

Feel free to change and add some good stuff.

## Installing

Install and update using pip:
```
pip install discord-handler
```

## Requirements
Installing requests:
```
pip install requests
```

## Get Started:

First you need Discord or some Channels, where you have access to create a new Webhook.

You find Webhooks options in the channel settings. Create a new Webhook and copy the __Webhook Url__. Note: Do NOT give this URL out to the public like me in previous commits. (I changed it :P )

You can test the logging class by using the [Test file](tests/test_handler.py). 

If u want to know, how to send messages via POST and [requests](http://docs.python-requests.org/en/master/) to Discord you can see an example in [Discord file](example/send_discord.py). 

## Attention:
Discord only allows 2 000 characters, so you might get trouble when using large messages. To limit
the length of the message use `max_size` in the constructor. See Example below.
Thanks to [racinmat](https://github.com/racinmat) for the implementation.

## Mentions:

To use mentions use the paramter notify_users. You can use __everyone__ without id and private mentions with id.
To get your user id you need to activate the developer mode and right click on your name.

## Example:
```python

    from discord_handler import DiscordHandler

    webhook_url = "Your Webhook here"
    agent = "My Application"

    logger = logging.getLogger("My Application")
    logger.setLevel(logging.DEBUG)

    # Create formatter
    FORMAT = logging.Formatter(
        "%(asctime)s - %(name)s - %(levelname)s - %(message)s")

    # Create DiscordHandler and StreamHandler
    # This will mention everyone. You can use your id here for private mentions.
    # Emits log as raw text, so strings can contain Discord markdown formatting such as __underline__ or **bold**
    notify_users = ['everyone']
    discord_handler = DiscordHandler(webhook_url, agent, notify_users=notify_users, emit_as_code_block=False, max_size=20000)
    stream_handler = logging.StreamHandler()

    # Add log level to handlers
    discord_handler.setLevel(logging.WARNING)
    stream_handler.setLevel(logging.DEBUG)

    # Add format to handlers
    discord_handler.setFormatter(FORMAT)
    stream_handler.setFormatter(FORMAT)

    # Add the handlers to the Logger
    logger.addHandler(discord_handler)
    logger.addHandler(stream_handler)

    logger.debug("Logger created")
```

For more Infos: [Logging Cookbook](https://docs.python.org/3/howto/logging-cookbook.html)