semvec/pypi-packages huggingface dataset:
rr-utils 1.1.2
It is a set of useful classes for python.
License: MIT
Requires Python: >=3.6

# RR Utils for Python

## What is, the purpose of this project?
It is a set of useful classes, That I often reuse in my projects

## How to install:
```bash
pip install rr-utils
```

## How to use it?
### How to use InlineClass
```python
from InlineClass.InlineClass import InlineClass
config_dic =  {"aa": 123, 
               "bb": "abc", 
               "cc": {"a1": 1}
               }
config_obj = InlineClass(config_dic, deep=True)
print(config_obj.cc.a1)
```

### How to use ConsoleLogger
```python
def consolelogger_use_case():
    import sys
    from ConsoleLogger import ConsoleLogger
    logger = ConsoleLogger()
    sys.stdout = logger
    print("This will go to console")

    logger.add_log_file_destination("log1.txt")
    print("This will go to console and file: log1.txt")
    logger.remove_last_destination()

    with logger.add_log_file_destination("log2.txt"):
        print("This will go to console and file: log2.txt")
```

### How to use Constraints
```python
from Constraints.Constraints import Constraints
from Constraints.VersionChecker import VersionChecker, VersionToCheck
from Version.Version import Version

obj = Constraints()
obj.add(VersionChecker(Version("3.8"), VersionToCheck.Python))
obj.add(VersionChecker(Version("4.2"), VersionToCheck.OpenCV))
obj.add(VersionChecker(Version("1.18"), VersionToCheck.NumPy))
obj.check(terminate_on_error=False)
```

### How to use Version
```python
from Version.Version import Version
ver = Version("1.2.3")
print(ver)
print("Major version {}".format(ver.get_version()[0]))
```

### How to use CallOnce
Look to dedicated [page](doc/callonce/README.md). 


### How to use StopWatch
```python
def stopwatch_use_case_1():
    from StopWatch.StopWatch import StopWatch
    obj = StopWatch(auto_start=False)
    with obj as timer:
        import time
        #some code
        time.sleep(0.2)
    print(obj.get_elapsed_time())
```

```python
def stopwatch_use_case_2():
    from StopWatch.StopWatch import StopWatch
    obj = StopWatch(auto_start=True)
    import time
    #some code
    time.sleep(0.2)
    print(obj.get_elapsed_time())
```

### How to use TimeLimitGenerator
```python
def timelimitgenerator_use_case():
    def func(counter, elapsed_total, elapsed_prev):
        import time
        print(f"Time elapsed: {elapsed_total}")
        time.sleep(0.2)
        return counter

    for item in TimeLimitGenerator(2, func): #will run for 2 secounds
        print(item)
```
PyTerminalCommander 0.0.7.2
A library use to build command-to-output Shell GUI application.
License: MIT
Keywords: shell gui command commander output log logger

PyTerminalCommander
===================

|Build Status|

A Python library to provide a divided GUI layout in terminal as an easy
way to build any command-output separated application.

Features
--------

-  Hook up to the stdout and stderr
-  Popup Support
-  Simple interface for easily integrating with any script
-  Customizable theme, overwritable palette
-  [v0.0.6] Move cursor fast using Ctrl+[Left/Right]; backspace the
   whole word by holding Ctrl

Demo
----

|asciicast|

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

Install from pip:

.. code:: sh

    $ sudo pip install PyTerminalCommander

Usage & Configuration
---------------------

Please refer to the example.py

Special Thanks
--------------

Original code is from:
http://zderadicka.eu/terminal-interfaces-in-python/

**Great thanks to Ivan Zderadicka**

Original LICENSE:

::

    The MIT License (MIT)
    Copyright (c) 2015 Ivan Zderadicka

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

License
-------

The MIT License (MIT)

Copyright (c) 2016 owwlo

Licensed under the MIT License. See the top-level file LICENSE.

.. |Build Status| image:: https://travis-ci.org/owwlo/PyTerminalCommander.svg?branch=master
   :target: https://travis-ci.org/owwlo/PyTerminalCommander
.. |asciicast| image:: https://asciinema.org/a/79219.png
   :target: https://asciinema.org/a/79219?t=8
wttime 0.2.1
Smart timestamp utility
License: MIT

# wttime - A fuzzy time parser

[![Lint and test](https://github.com/PJK/wttime/workflows/Tests/badge.svg?branch=master)](https://github.com/PJK/wttime/actions?query=workflow%3ATests)

Tired of figuring out what this timestamp means? Done with format strings?
Cannot be bothered to care about all the seconds, millis, and jiffies?

You don't have to! **wttime** is a fuzzy parser that can recover and
disambiguate virtually any time specification you can throw at it.

## Getting Started

### Installation

```sh
pip install wttime
```

### Examples

Guessing the most likely meaning:
```sh
$ wttime -t 'America/Los_Angeles' 20200101
UTC:     2020-01-01 08:00:00 (+0000)
$ wttime 1231231233000000
UTC:     2009-01-06 08:40:33 (+0000)
$ wttime 1231231233000
UTC:     2009-01-06 08:40:33 (+0000)
$ wttime 'Tuesday 10pm'
UTC:     2020-05-26 20:00:00 (+0000)
```

Variety of output formats:
```sh
$ wttime -l -r --remote-timezone 'America/Chicago' -f '%Y-%m-%d %H:%M' -umy 1231231233000000
UTC:     2009-01-06 08:40
Local:   2009-01-06 09:40
Remote:  2009-01-06 02:40
Seconds: 1231231233
Millis:  1231231233000
Micros:  1231231233000000

$ wttime -nx 20200810 -ns -y
1597010400000000
```

### Help
```sh
wttime --help
```

## TODOs

- get more data about format frequency in the wild
- figure out how to get feedback

## Development

### Add pre-commit hooks:

```
ln -sf $(pwd)/misc/hooks/pre-commit .git/hooks
```

### Run tests

```
pytest
```

### Publish to PyPI

```
rm -rf sdist
python setup.py sdist
twine upload dist/*
```


## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.