semvec/pypi-packages huggingface dataset:
foamfile 0.11
OpenFOAM config file parser
License: MIT

File parser for OpenFOAM configuration files based on <https://cfd.direct/openfoam/user-guide/v6-basic-file-format/>

foamfile uses [pyparsing](https://github.com/pyparsing/pyparsing/) to extract the data from the files.

### example usage
```python
from foamfile import FoamFile

with FoamFile("path/to/file") as f:
    foam_content = f.read()
    print(f.header)
    print(foam_content)

with FoamFile("path/to/file", "w", foam_class="dictionary") as f:
    f.write(foam_content)
```

### TODO
* Macro expansion does not work at the moment
* Optimize parsing of directives
* Add codeStreams
* Add calculations
* Add support for comments

Tested with OpenFOAM v6.
pytorchtrainer 0.2.1
PyTorch module trainer
License: MIT
Requires Python: >=3.5
Keywords: pytorch trainer

# PyTorch trainer

[![CircleCI](https://circleci.com/gh/benoitmartin88/pytorchtrainer/tree/master.svg?style=svg)](https://circleci.com/gh/benoitmartin88/pytorchtrainer/tree/master)

Are you tired of writing those same epoch and data-loader loops to train your PyTorch module ?
Look no further, PyTorch trainer is a library that hides all those boring training lines of code that should be native to PyTorch. 

You will also benefit from the following features:

- Early stopping: stop training after a period of stagnation
- Checkpointing: save model and estimator at regular intervals
- CSV file writer to output logs
- Several metrics are available: all default PyTorch loss functions, Accuracy, MAE
- Progress bar from console
- SIGINT handling: handle CTRL-C
- Model's data type (`float32`, `float64`) 


## Example

Code examples can be found in the [example folder](https://github.com/benoitmartin88/pytorchtrainer/tree/master/examples).

Here is a simple example:

``` python

import torch
import pytorchtrainer as ptt


# Your usual model, optimizer, loss function and data loaders
model = MyModel()
optimizer = torch.optim.Adam(self.model.parameters(), lr=1e-3)
criterion = torch.nn.MSELoss()
train_loader = MyTrainDataloader()
validation_loader = MyValidationDataloader()


# instantiate a default trainer
trainer = ptt.create_default_trainer(model, optimizer, criterion)

# optionally save a checkpoint after every 10 epochs
trainer.register_post_epoch_callback(ptt.checkpoint.SaveCheckpointCallback(save_every=10))

# optionally compute validation loss after every epoch
validation_callback = ptt.callback.ValidationCallback(validation_loader, ptt.metric.TorchLoss(criterion), validate_every=1)
trainer.register_post_epoch_callback(validation_callback)

# optionally save training and validation loss after every iteration using default save directory
trainer.register_post_iteration_callback(ptt.callback.CsvWriter(save_every=1,
                                                                extra_header=[validation_callback.state_attribute_name],
                                                                callback=lambda state: [state.get(validation_callback.state_attribute_name)]))
# run the training
trainer.train(train_loader, max_epochs=100)

```

## Dependencies

- python > 3.5
- pytorch > 1.0.0 (install instructions from the official [PyTorch website](https://pytorch.org/get-started/locally))


## Contributing

Feel free to submit an issue or pull request. But before you do please read the [contributing guidelines](CONTRIBUTING.md)
ocupgrader 0.1.0
A tool which wraps the OpenShift command line tools to make upgrades easier
License: MIT
Requires Python: >=3.4
Keywords: openshift,kubernetes

# ocupgrader
Helper tool to automate upgrades of applications in OpenShift based on [ocdeployer](https://github.com/bsquizz/ocdeployer).


# Getting Started

## Details
* Requires OpenShift command line tools (the `oc` command), you should log in to your cluster before using this tool:

```
$ oc login https://api.myopenshift --token=*************
```

* `ocupgrader` relies on YAML file with task definitions located in current directory and called `ocupgrader.yml` or located on path passed using `-f` argument. There is an [example](ocupgrader-example.yml) how this file can look like.

## Instalation
```
$ pip3 install --user ocupgrader
```

## Usage
```
$ ocupgrader myproject list-tasks
$ ocupgrader myproject run maintenance-mode
$ ocupgrader myproject run status
$ ocupgrader myproject run single-component-status -p component=deploymentconfig-name
$ ocupgrader -f /path/to/ocupgrader.yml myproject run fixit
```

## Debugging
```
$ OCDEPLOYER_LOG_LEVEL=INFO ocupgrader myproject run single-component-status -p component=deploymentconfig-name
```
pygments-michelson 1.0.1
Pygments lexer for Michelson contracts
License: MIT
Requires Python: >=3.4
Keywords: pygments michelson tezos lexer

# Pygments Lexer for Michelson contracts

A lexer class for Michelson contracts.

## Installing

From pip:

```
# pip --user install pygments-michelson-1.0.0
```


## Usage

### On the command line

```bash
$ pygmentize contract.tz
```

### From python script to generate HTML

```python
from pygments import highlight
from pygments_michelson import MichelsonLexer
from pygments.formatters import HtmlFormatter

code = 'parameter unit; storage unit; code { CDR; NIL operation; PAIR };'
print(highlight(code, MichelsonLexer(), HtmlFormatter()))
```
exacto 0.2.2
Python tools for splitting strings.
License: MIT
Keywords: UTILS,SPLIT,STRING

# Exacto

Exacto is a collection of Python tools that simplify splitting strings according to non-trivial business rules. You may find this package useful if: 

  - A regular expression is not enough for your use case.
  - You want to avoid writing and maintaining manual parsing code.
  - You don't want to mess around with LLVM or FSMs.
 
However, if performance is your primary goal, these tools may not be for you. 

# Usage

```python
from exacto import split, lift, quote, nest

# Simple example with default rules: split on whitespace
result = split("Hello   World")  
assert list(result) == ["Hello", "World"]

# Complicated example with custom separator and quotes
result = split("ENV='Prod-172.0.10.10'.VER='2.1'", quote("'"), ".")
assert list(result) == ["ENV='Prod Env'", "VER='2.1'"]

# Extract embedded tokens
result = lift("Hello [FOO] is [BAR]", nest("[", "]"))
assert list(result) == ["FOO", "BAR"]
```