semvec/pypi-packages huggingface dataset:
Bext 0.1.1
A cross-platform Python 2/3 module for colorful, boring, text-based terminal programs.

Bext
======

A cross-platform Python 2/3 module for colorful, boring, text-based terminal programs.

Basically, use Bext if you want to move the cursor around the terminal window and have colorful text, like some kind of limited curses module (but it works on Windows also.)

Bext does not currently work in the new Windows Terminal. It does work in the older Command Prompt.

Note: Currently something in Colorama 0.4.6 causes Bext to fail. Please use 0.4.5 or earlier.

Installation
------------

To install with pip, run:

    pip install bext

Functions
---------

* ``fg(color)``

Sets the foreground color, that is, the color of the text. The color is a string of one of the following colors: black, red, green, yellow, blue, purple, cyan, white, reset, random.

* ``bg(color)``

Sets the background color, that is, the color of the cell behind the text characters. You "paint" a cell with the background color by printing a space character.

* ``size()``

Returns a tuple of the (width, height) of the current terminal.

* ``resize(columns, rows)``

Resizes the terminal window to the given number of columns and rows. Returns `True` if the resize was a success and `False` if not. Note that on Ubuntu Linux, this function doesn't work if the Terminal window is maximized. On Windows, if the Command Prompt is maximized the window won't change size but the screen buffer size will be resized. This function is not very reliable.

* ``clear()``

Erase all the text on the screen, paint the entire terminal to the background color, and moves the cursor to (0, 0) at the top-left corner of the screen.

* ``clear_line()``

Erases the line where the cursor is located.

* ``goto(x, y)``

Move the cursor to x, y coordinates on the screen. (0, 0) is the top-left corner of the screen.

* ``title(text)``

Sets the title of the terminal window to `text`.

* ``hide_cursor()``

Hides the cursor.

* ``show_cursor()``

Shows the cursor after hiding it.

* ``get_key(blocking=True)``

Waits until the user presses a single key on the keyboard, then returns that key as a string. If `blocking` is `False`, the function returns immediately (returning `None` if no key has been pressed.)

Example
-------

```python

    import bext, random

    width, height = bext.size()

    try:
        while True:
            bext.fg('random')
            bext.bg('random')
            x = random.randint(0, width - 1)
            y = random.randint(0, height - 1)

            if x == width -1 and y == height - 1:
                continue # Windows has weird behavior where a character at the end of the row always moves the cursor to the next row.
            bext.goto(x, y)
            print('*', end='')
    except KeyboardInterrupt:
        pass

```

Contribute
----------

If you'd like to contribute to Bext, check out https://github.com/asweigart/bext

Support
-------

If you find this project helpful and would like to support its development, [consider donating to its creator on Patreon](https://www.patreon.com/AlSweigart).
multivariate-cwru 1.4
Preprocessed CWRU Bearing Dataset for multivariate signals
Requires Python: >=3.6

# Multivariate CWRU Bearing Package
This package is created to extract and preprocess the CWRU Bearing datasets provided by the [Case Western Reserve University][cwru].
This package functions as an extension on the original package developed by [Litchiware][Litchiware], specifically designed to extract multivariate signals from the Bearing datasets for using in fault diagnosis experiments. Please read the documentation carefully for correct use of the package. 
### Installation
Installing the package can be done manually, but I recommend to install via pip since this is much easier by just copying the code below and paste it in your terminal/command prompt:
```sh
$ pip install multivariate-cwru
```

### Use of the package
After the installation, the package can be imported in your specific session, for example in Jupyter Notebook;
```sh
import multivariate_cwru
```
Then the class in the package can be called as follows;
```sh
data = multivariate_cwru.CWRU("12FanEndFault", 2048, 0.8, 1,2,'1797',normal_condition = True)
```
The called function results in six different objects:
* data.x_train, contains train samples represented in a 3D-array (nr of time series, sequence length, amount of sensors). 
* data.y_train, train labels representing different fault conditions.
* data.x_test, test samples, 3D-array (nr of time series, sequence length, amount of sensors). 
* data.y_test, test labels representing different fault conditions
* data.nclasses, amount of different fault conditions
* data.labels, the different fault conditions extracted from the datafiles

### Arguments
As can be seen in the previous code block, the package asks seven arguments for extracting and preprocessing the CWRU bearing datasets into usable objects. The following arguments need to be addressed when using CWRU class:
>1) Experiment: The specific name for the experiment to use. There are three options: `"12DriveEndFault"`, `"12FanEndFault"` and `"48DriveEndFault"`.
>2) Length: Sequence length of every time series.
>3) Trainsplit: Between 1 and 0 which splits the data into a train and test set.
>4) Seed: Set seed for data shuffle to recreate reproducible objects.
>5) Sens: number of sensors to be extracted. Integer number between  `1` and `3`.
>6) RPM: Choose the rotations per minute to narrow down the experiment's data. Four options are available, `"1797"`,`"1772"`,`"1750"`and `"1730"`. Multiple inputs are possible.
>7) Normal_condition: Boolean expression to add/exclude the normal conditions from the objects.










[cwru]: <https://csegroups.case.edu/bearingdatacenter/pages/welcome-case-western-reserve-university-bearing-data-center-website>
[Litchiware]: <https://github.com/Litchiware/cwru>