semvec/pypi-packages huggingface dataset:
Treer 0.1.0
Ascii Tree Creator for Python!
License: MIT


Treer
===

Ascii Tree Tool for Python!

Powered by [Yamato Nagata](https://twitter.com/514YJ)

[GitHub](https://github.com/nagataaaas/Treer)

```python
from treer import Tree

root = Tree.from_path("tests")
root.colorize = False
print(root.draw())
# tests
#  ├── test.py
#  └── test_dir
#       ├── dir1
#       │    ├── dir1-1
#       │    │    └── dir1-1-1
#       │    ├── dir1-2
#       │    └── *dir1-3
#       ├── dir1-1
#       └── dir2
#            ├── dir2-1
#            └── dir2-2

root = Tree.from_mapping({
            'root': {
                'dir1': {
                    'file1': None,
                    'file2': None,
                    'dir1-2': {
                        'file3': None,
                    },
                },
                'dir3': [
                    'file4',
                    'file5',
                ],
                'dir4': 'file6'
            }
        })
root.colorize = False
print(root.draw())
# root
#  ├── dir1
#  │    ├── file1
#  │    ├── file2
#  │    └── dir1-2
#  │         └── file3
#  ├── dir3
#  │    ├── file4
#  │    └── file5
#  └── dir4
#       └── file6
```

**colored example**

![output](https://github.com/nagataaaas/Treer/blob/main/assets/capture1.png?raw=true)

# Installation

    $ pip install treer
complex-number 0.1.4
This is a simple complex number python package.
License: MIT
Requires Python: >=3.10
Keywords: python,python 3.10,complex number,complex numbers,complex operations

# ComplexNumber

ComplexNumber class to perform complex operations.
You can take a look at the source code [here](https://github.com/Enzo1603/ComplexNumber).

## Installation

```bat
pip install complex-number
```

## Usage example

```python
from complex_number import ComplexNumber
import math

z1 = Complex(1, 2)  # real, imag
z2 = Complex.from_polar(2, math.pi)  # modulus, argument

print(z1)
z2.print(4)  # set precision (defaults to 2)
z2.print_polar(4)  # set precision (defaults to 2)

print(z1.real)
z1.real = 5

print(z1.imag)
z1.imag = -3

print(z1.modulus)
z1.modulus = 4

print(z1.argument)
z1.argument = math.pi / 2
```

### Math operations

```python
print(z1 + z2)
z1 += z2

print(z1 - z2)
z1 -= z2

print(z1 * z2)
z1 *= z2

print(z1 / z2)
z1 /= z2

print(z1 ** 3)
z1 **= 3

print(z1.root())  # defaults to 2
print(z1.root(3)) # returns a tuple of ComplexNumbers with all solutions

print(+z1)
print(-z1)
```

### Additional Operations

```python
print(z1.conjugate())

print(z1.polar())  # returns dictionary with the keys: modulus and argument.

print(ComplexNumber.to_cartesian(modulus=2, argument=math.pi))  # returns tuple with real and imag part.
```

### Check for Equality

```python
print(z1 == z2)  # true if real and imag parts are both equal to each other
```