semvec/pypi-packages huggingface dataset:
hostscanner 0.0.2
Automated host configuration scanner.
License: MIT

# Host Configuration Scanner

This script will SSH into a specified host and collect hardware configuration
details and persist the information to a hosted PostgreSQL database.
Periodically, this database will be synced with Maestro's hosted database
to ensure that host hardware configuration remains up-to-date.

## Quickstart

It is recommended to create and install project in a  virtual environment before.

### Install via pip (recommended)
```bash
$ pip install hostscanner==0.0.1
```

#### Install using _setup.py_ (only if needed, otherwise skip)

```bash
# in project folder
$ python3 setup.py install
```

### Import the package

```python3
import configscanner
```

## Using the Package
### `HostScanner(machine_name, root_esx_password)`
The `HostScanner()` class will be used to create a new instance of a `HostScanner` to scan a host for configuration changes.
```python3
# import the package
import configscanner
from configscanner.host_scanner import HostScanner

# create a HostScanner instance with the machine name and password
# as arguments
host_scanner = HostScanner('w1-hs1-b1414', '')

# execute the scan
host_scaner.scan()
```
#### `scan()` Method
After creating a HostScanner instance, you will call `scan()` in order to execute the scanning logic. This method will handle scanning the host hardware and generating a config file as well as persisting this information to the hosted database instance. It accepts no arguments and has no return value.

Currently, if a host already exists in the database and the config is also a match, the new entry will not be persisted.


## Testing

In _tests/conftest.py_, a vairable `HOST_NAME` is set. In order for tests to
run successfully, the machine set here must be online, have ESX installed, and
have the correct root ESX password `HOST_PWD` set. If tests are failing, check
to see this variable is set to a known good host and root password is correct.

Unit tests are included via `pytest`. Run the tests using the following
command:

```bash
# in project folder
$ python3 -m pytest
```

Note: Ensure you've setup/installed the project via `$ python3 setup.py install`
before running the test suite.

## Reference

- [Development Confluence Page](https://confluence.eng.vmware.com/display/PerfSymphony/Hosts+Automatic+Scanning)

## License

MIT License, Copyright (c) 2021 VMware, Juan Macias
braces.py 0.4.0
Braces for Python Programming Language.
License: MIT
Requires Python: >=3.5

braces.py
=========

.. image:: https://img.shields.io/pypi/l/braces.py.svg
    :target: https://opensource.org/licenses/MIT
    :alt: Project License

.. image:: https://img.shields.io/pypi/v/braces.py.svg
    :target: https://pypi.python.org/pypi/braces.py
    :alt: Library Version

.. image:: https://img.shields.io/pypi/pyversions/braces.py.svg
    :target: https://pypi.python.org/pypi/braces.py
    :alt: Required Python Versions

.. image:: https://img.shields.io/pypi/status/braces.py.svg
    :target: https://github.com/nekitdev/braces.py
    :alt: Development Status

.. image:: https://img.shields.io/pypi/dw/braces.py.svg
    :target: https://pypi.python.org/pypi/braces.py
    :alt: Library Downloads / Week

.. image:: https://app.codacy.com/project/badge/Grade/6c8b6893a1204953bf4fec15c0c080fd
    :target: https://www.codacy.com/gh/nekitdev/iters.py/dashboard
    :alt: Code Quality

braces.py is a library that allows using ``{}`` braces and ``;`` for indentation.

Warning
-------

There is a known limitation in braces.py. That is, indentation like this does **NOT** work:

.. code:: python

    def identity(value: T) -> T
    {
        return value;
    }

The said limitation was partially intentional,
as it brings more problems than solutions in analysis.

Installing
----------

**Python 3.5 or higher is required**

To install the library, you can just run the following command:

.. code:: sh

    # Linux / OS X
    python3 -m pip install --upgrade braces.py

    # Windows
    py -3 -m pip install --upgrade braces.py

In order to install the library from source, you can do the following:

.. code:: sh

    $ git clone https://github.com/nekitdev/braces.py
    $ cd braces.py
    $ python -m pip install --upgrade .

Quick example
-------------

Below is an example of identity function using braces style.

.. code:: python

    # coding: braces

    from typing import TypeVar;

    T = TypeVar("T");


    def identity(some: T) -> T {
        return some;
    }

This snippet gets translated to syntactically valid python code:

.. code:: python

    from typing import TypeVar

    T = TypeVar("T")


    def identity(some: T) -> T:
        return some

You can find more examples in examples directory.

Authors
-------

This project is mainly developed by `nekitdev <https://github.com/nekitdev>`_,
with help of `isidentical <https://github.com/isidentical>`_.
laaos 2.1.1
"Log as append-only source" logger
License: MIT
Keywords: logging

# Log as append-only source package

[![Build Status](https://travis-ci.org/BlackHC/laaos.svg?branch=master)](https://travis-ci.org/BlackHC/laaos)

Logs as append-only source: write your ML training results in Python without having to worry about crashes. Loading is a breeze: the logs are native Python code. The package supports unstructured data. The data can easily be imported into Jupyter Notebooks or elsewhere.

## Installation

To install using pip, use:

```
pip install laaos
```

To run the tests, use:

```
python setup.py test
```

## Append-only source logs

Storing training results as Python dictionaries or JSON files is problematic because the formats are not append-only, 
which means that you have to rewrite the file every time something changes. (Or you only write results at the end, 
which does not play well with interruptions or intermediate failures.)

Alternatively, we can simply write the operations that create a structure to a file in an append-only fashion.
If the data structure itself is growing and not mutated, this only increases file-size by a constant factor.

The advantage of this library is that the file format is very simple: it's valid Python code.

The only requirement is that you only store primitive types, lists, sets, dicts and immutable types.

Custom wrappers can be added by registering `TypeHandler`s when creating a `Store`. See `WeakEnumHandler` and `StrEnumHandler`.

## Example

```python
from laaos import open_file_store, safe_load

store = open_file_store("test", suffix="", truncate=True)
print("Output file: ", store.uri)

store['losses'] = []
losses = store["losses"]

for i in range(10):
    losses.append(1/(i+1))

store.close()
```

The resulting file `laaos/test.py` contains valid Python code:

```python
store = {}
store['losses']=[]
store['losses'].append(1.0)
store['losses'].append(0.5)
store['losses'].append(0.3333333333333333)
store['losses'].append(0.25)
store['losses'].append(0.2)
store['losses'].append(0.16666666666666666)
store['losses'].append(0.14285714285714285)
store['losses'].append(0.125)
store['losses'].append(0.1111111111111111)
```

It can be loaded either with:

```python
form laaos.test import store
```

or with the more secure:

```python
safe_load('laaos/test.py')
```

### Slightly more sensible example

```python
from laaos import open_file_store

initial_data = dict(config=dict(dataset="MNIST", learning_rate=1e-4, seed=1337), losses=[])

store = open_file_store("experiment_result", suffix="", initial_data=initial_data)

if store["config"] != initial_data["config"]:
    raise ValueError("Experiment mismatch!")

print("Output file: ", store.uri)

losses = store["losses"]

for i in range(len(losses), 10):
    print("Epoch ", i)
    losses.append(1 / (i + 1))

    if i % 3 == 0:
        raise SystemError("Preemption!")

store.close()
```