semvec/pypi-packages huggingface dataset:
move-imports 0.4
Refactor modules to move import statements to the header
License: MIT
Keywords: ast,refactor

# move-imports

A script to move imports to the top of the module. Suppose a module with inline import like this

```python
import requests
from math import sin
import datetime as dt

BASE_SCENARIO = """
    ##########
    # Accounts

"""

def foo():
    from math import (
        sin, cos as cos_
    )
    return sin(1), cos_(0)


def bar():
    from math import tan
    return tan(1)
```

Executing

```
$ move-imports path/to_refactor.py --isort --rewrite
```

will produce

```python
import datetime as dt
from math import cos as cos_, sin, tan

import requests

BASE_SCENARIO = """
    ##########
    # Accounts

"""

def foo():
    return sin(1), cos_(0)


def bar():
    return tan(1)
```

## Install

```
$ pip --user install move-imports
```

or the development version, directly from the git repo

```
$ pip --user install git+https://github.com/mgaitan/move-imports
```


## Skip cases

To keep an inline import you could add a comment in the same line or above
the stament with "avoid circular import" or "noqa".

```python

  def foo():
    # avoid circular import
    import baz
```

```python

  def foo():
    import baz  # noqa
```


## Incremental refactoring

Sometimes inline imports statements are there for a reason. Circular imports, optional dependendencies, etc.

To manage this, it's useful to go step by step, checking a changed module
is ok before to move to the next one.

With a combination of `--start-from-last` and `--limit-to LIMIT_TO`
arguments you could incrementally refactor a whole package.

For instance, calling repeteadly the following command

```
$ move-imports --isort --rewrite --start-from-last --limit-to=1 tests/billing/**/*.py
```

will recursively traverse `tests/billing/` refactoring one module at a time. Thus, the worflow would be:

- run,
- test,
- optionally revert and skip problematic imports or modify manually
- repeat


## Running tests

Clone the repo and install pytest

```
$ pytest
```


## Command line interface

```
$ move-imports --help
usage: move-imports [-h] [--start-from-last] [--limit-to LIMIT_TO] [--debug]
                    [--show-only] [--safe] [--isort]
                    [paths [paths ...]]

positional arguments:
  paths                Path/s to refactor. Glob supported enclosed in quotes

optional arguments:
  -h, --help           show this help message and exit
  --start-from-last    Incremental refactor
  --limit-to LIMIT_TO  Stop processing after N files. Use with --start-from-
                       last
  --debug              Make verbose output
  --show-only          write the result to stdin
  --safe               Only move stdlib or thirdparty imports
  --isort              Apply isort
```

## Acknowledgement

Thanks to [Shiphero](https://shiphero.com) for give me the time to do this.
deneb 1.0.1
Visualization library build on top of Altair and Vega
License: MIT
Requires Python: >=3.6.0

[![PyPI
version](https://badge.fury.io/py/deneb.svg)](https://badge.fury.io/py/deneb)

# deneb

`deneb` is a visualization library build on top of [Altair](https://altair-viz.github.io) and [Vega](https://vega.github.io) and allows simple creation of chart types such as pairplots, faceted line plots, and correlation matrices. 


## Installation

```commandline
$ pip install deneb
```


## Usage

See notebooks in `examples/`.

![](https://raw.githubusercontent.com/sbi-benchmark/deneb/main/examples/pairplot.png)


## Name

Altair, Deneb, and Vega form the [Summer Triangle](https://en.wikipedia.org/wiki/Summer_Triangle).


## License

MIT
rapid-clay-formations-fab 0.7.1
Fabrication code for Rapid Clay Formations.
License: MIT
Requires Python: >=3.7
Keywords: architecture,engineering,fabrication,construction

# rapid_clay_formations_fab

Fabrication code for Rapid Clay Formations.

* [Getting started](https://gramaziokohler.github.io/rapid_clay_formations_fab/getting_started.html) - for installation and update instructions
* [Example files](https://gramaziokohler.github.io/rapid_clay_formations_fab/examples.html) - for demonstration purposes
* [Contributing](https://gramaziokohler.github.io/rapid_clay_formations_fab/contributing.html) - how to start working on the code
* [Known issues](https://gramaziokohler.github.io/rapid_clay_formations_fab/known_issues.html) - for things that we know don't work
* [Issues](https://github.com/gramaziokohler/rapid_clay_formations_fab/issues) - for unknown issues, as well as suggestions and questions
* [Documentation](https://gramaziokohler.github.io/rapid_clay_formations_fab/)

## COMPAS

`rapid_clay_formations_fab` is part is built on top of [`compas`](https://compas-dev.github.io/),
 [`compas_fab`](https://gramaziokohler.github.io/compas_fab/) and
 [`compas_rrc`](https://bitbucket.org/ethrfl/compas_rrc/).

## Note on compatibility

Installation of the package requires Python \>\= 3.6.

Big parts are compatible with IronPython 2.7 (to be run inside Rhino plugin
Grasshopper).

The modules that require Python \>\= 3.6 should raise an exception on import.
autoyaml 2021.1.11.1642
Load and save config files for python projects
License: MIT

# autoyaml because config should be easy
Autoconfig is a config generator that takes
a dictionary, writes it to a file and loads it
back as a dictionary. 

The aim of this project is to standardise the
way python projects create and feed parameters into 
python applications without having to 
rewrite the same IO functions every time. 


## Installation
```
pip install autoyaml
```

## Usage
Write your config either from an interactive terminal
or from a script
```
from autoyaml import write_config

conf = {
   'parameter1': 1,
   'parameter2': 'something'
}

application_name = 'app_name'

write_config(conf,application_name)
```
Load your config from another python application
```
from autoyaml import load_config

class My_Class(object):
   def __init__(self, **kwargs):
      self.parameter1 = kwargs['parameter1']
      self.parameter2 = kwargs['parameter2']
      self.show_parameters()

   def show_parameters(self):
      print('parameter1 : {}'.format(self.parameter1))
      print('parameter2 : {}'.format(self.parameter2))


if __name__ == "__main__":
   my_class = My_Class(**load_config('app_name'))
```
## Password Protected Encryption
```
from autoyaml import write_config
from getpass import getpass

conf = {
   'secret_key': getpass('Secret Key? ')
}

application_name = 'app_name1'

write_config(conf, application_name, encrypted=True)

```
## Loads the same but requires password input by default
```
from autoyaml import load_config

class My_Class(object):
   def __init__(self, **kwargs):
      self.secret_key = kwargs['secret_key']
      self.show_parameters()

   def show_parameters(self):
      print('the last character of your secret it {}'.format(self.secret_key[-1]))


if __name__ == "__main__":
   my_class = My_Class(**load_config('app_name1'))
```
## Create a custom password function 
```
from autoyaml import load_config, write_config
def BAD_PASSWORD_FUNCTION():
   return 'password123'

write_config({'foo':'bar'},'app_name2', encrypted=True, password_function=BAD_PASSWORD_FUNCTION)

print(load_config('app_name3', password_function=BAD_PASSWORD_FUNCTION)
```