semvec/pypi-packages huggingface dataset:
whyylog 0.2
Prints out a log message to terminal in color
Keywords: python,logging,log,print

# whylog

This is an library to print color-coded log messages to the terminal. It prints in the following format.

`TIME [LOG TYPE] (file names) > (path of the call|line no): Message.`

## Log Levels

Print or Save to a log file.
| Log Level | Log Type      | Print Color | Background Color |
| ---------:| ------------- | ----------- | ---------------- |
|         0 | Emergency     | Black       | Red              |
|         1 | Alert         | Black       | Yellow           |
|         2 | Critical      | Black       | Magenta          |
|         3 | Error         | Red         | No Color         |
|         4 | Warning       | Yellow      | No Color         |
|         5 | Notice        | White       | Blue             |
|         6 | Informational | White       | No Color         |
|         7 | Debug         | Cyan        | No Color         |
|         8 | None          | NA          | NA               |

## Usage

### Code

```python
from whylog import Log

def main():
    test()

def test():
    log = Log(loglevel=8)
    log.emergency('Test emergency Print by importing')
    log.alert('Test alert Print by importing')
    log.critical('Test crtical Print by importing')
    log.error('Test error Print by importing')
    log.warning('Test warning Print by importing')
    log.notice('Test notice Print by importing')
    log.debug('Test Debug Print by importing')
    log.info('Test info Print by importing')

if __name__ == '__main__':
    main()
```

### Output

![Output](images/output.png)
autodice 1.0.3.dev2
Automated Distributed CNN inference at the Edge
Requires Python: >=3.1, <4
Keywords: CodeGeneration,Deep Learning,development

# AutoDiCE Project.
[The source for this AutoDiCE project is available here][src].
![Python Logo](https://www.python.org/static/community_logos/python-logo.png "Sample inline image")


# How to use the Partition 
```
### Prepare AlexNet Model and Computing nodes
### mapping.json Template (AlexNet):
{"lenovo_cpu0": ["conv1_1", "conv1_2", "norm1_1", "pool1_1", "conv2_1", "conv2_2", "norm2_1", "pool2_1", "conv3_1", "conv3_2", "conv4_1", "conv4_2", "conv5_1", "conv5_2", "pool5_1", "OC2_DUMMY_0", "fc6_1", "fc6_2"], "lenovo_cpu1": ["fc6_3", "fc7_1", "fc7_2", "fc7_3", "fc8_1", "prob_1"]}

### Quick Start.
import os,sys
 
from partition.interface import *

if __name__ == '__main__':

    output_dirs= './models'
    if not os.path.exists(output_dirs):
    # Create a new directory because it does not exist
        os.makedirs(output_dirs)
        print("The output directory %s is created!" % (output_dirs))

    origin_model = "bvlcalexnet-9.onnx"
    ### Can be downloaded from:
    # https://github.com/onnx/models/blob/main/vision/classification/alexnet/model/bvlcalexnet-9.onnx
    input_model = format_onnx(origin_model)
    model =  onnx.load(input_model)
    # resourceid = { 1:'lenovo_cpu0', 2:'lenovo_cpu1'}
    platforms = ['lenovo']

    ### How the layers in alexnet model distribute over two computing nodes???
    random_map = {
            "lenovo_cpu0":
                ["conv1_1", "conv1_2", "norm1_1", "pool1_1", "conv2_1",
                "conv2_2", "norm2_1", "pool2_1", "conv3_1", "conv3_2",
                "conv4_1", "conv4_2", "conv5_1", "conv5_2", "pool5_1",
                "OC2_DUMMY_0", "fc6_1", "fc6_2"],
            "lenovo_cpu1":
                ["fc6_3", "fc7_1", "fc7_2", "fc7_3", "fc8_1", "prob_1"]
             }
    

    InputSpecs = Interface(model=input_model, mappings=random_map, platforms=platforms)
    #cppname, NodesList, ComputingNodes
    ### Generate Cpp Files for Multinode-Inference.
    GenerateCode = EngineCode(
        CppName = "./models/multinode",
        Platforms = InputSpecs.platforms,
        NodesList = InputSpecs.nodes,
        ComputingNodes = InputSpecs.computingnodes,
        ValueInfos = InputSpecs.value_map,
        Inputs = InputSpecs.inputs,
        Outputs = InputSpecs.outputs,
        Benchmark = False)

# ...
```

 

[packaging guide]: https://packaging.python.org
[distribution tutorial]: https://packaging.python.org/tutorials/packaging-projects/
[src]: https://github.com/parrotsky/AutoDiCE
[rst]: http://docutils.sourceforge.net/rst.html
[md]: https://tools.ietf.org/html/rfc7764#section-3.5 "CommonMark variant"
[md use]: https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
dexcolor 0.1.9
A Python package for adding color and style to terminal text output
Requires Python: >=3.7

# dexcolor

**dexcolor** is a Python package that provides a simple and convenient way to add color and style to text output in the terminal. It supports various ANSI escape sequences for text formatting and provides a cross-platform solution for both POSIX and Windows operating systems.

## Installation

You can install **dexcolor** using pip:

```
pip install dexcolor
```

## Usage

### Using Colors Only

You can use **dexcolor** to add colors to your text. Available colors are:

- GRAY
- RED
- GREEN
- YELLOW
- BLUE
- MAGENTA
- CYAN
- WHITE
- BRIGHT_BLACK
- BRIGHT_RED
- BRIGHT_GREEN
- BRIGHT_YELLOW
- BRIGHT_BLUE
- BRIGHT_MAGENTA
- BRIGHT_CYAN
- BRIGHT_WHITE

Example:

```python
from dexcolor import DEX

print(DEX.RED("Hello, World!"))
```

### Using Colors and Styles

You can combine colors with styles to customize the appearance of your text even further. Available styles are:

- BOLD
- DIM
- ITALIC
- UNDERLINE
- BLINK
- REVERSE

Example:

```python
from dexcolor import DEX

print(DEX.MAGENTA("Hello, World!", style='BOLD'))
```

### Using Styles Only

You can also apply styles without any specific color:

```python
from dexcolor import STYLE

print(STYLE.DIM("Hello, World!"))
```

### Resetting Colors and Styles

To reset the text color and style to the default, you can use the RESET attribute:

```python
from dexcolor import DEX

print(DEX.RED("Hello, World!") + DEX.RESET)
print(DEX.RED("Hello, World!", style='BOLD') + DEX.RESET)
```

### Windows Compatibility

**dexcolor** is compatible with Windows operating systems. If you are working on Windows and want to convert ANSI escape sequences to the Win32 format, you can use the provided conversion function.

#### ANSI Escape Sequences Conversion (Windows)

To convert ANSI escape sequences to the Win32 format on Windows, you can use the following code:

```python
from dexcolor import convert_ansi_to_win32

text = '\033[31mHello, World!\033[0m'  # Example text with ANSI escape sequences
converted_text = convert_ansi_to_win32(text)  # Convert ANSI escape sequences to Win32 format

print(converted_text)  # Display the converted text
```

This conversion function is specifically useful on Windows to ensure proper rendering of colored and styled text.

## Compatibility

**dexcolor** is compatible with Linux, macOS, and Windows operating systems. It utilizes ANSI escape sequences, which are widely supported on various platforms.


- [GitHub Repository](https://github.com/Terong333/dexcolor)
- [PyPI Package](https://pypi.org/project/dexcolor/)

---

If you have any questions or need further assistance, feel free to ask!