semvec/pypi-packages huggingface dataset:
dxf2x 0.0.1
Convert between DXF, TSV, SVG, PXF(Protobuf) formats.
Requires Python: >=3.7

# dxf2x

Convert between DXF, TSV, SVG, PXF(Protobuf) formats.

# install

```sh
$ pip3 install dxf2x
$ dxf2x --version
dxf2x 0.0.1
```

# Usage

```sh
dxf2x [-h] [-s FORMAT] -t FORMAT [-d DIR] [-q] [-v] FILE [FILE ...]
```

## positional arguments:

* FILE: All the files are read and converted in turn.

## optional arguments:

* `-s FORMAT`, `--source FORMAT`: specifies the format of the input. Determined by FILE by default.
* `-t FORMAT`, `--target FORMAT`: specifies the format of the output.
* `-d DIR`, `--dir DIR`: specifies the directory for output files.
* `-q`, `--quiet`: disable the progress.
* `-h`, `--help`: show this help message and exit.
* `-v`, `--version`: show program's version number and exit.

Choose `FORMAT` from 'dxf', 'tsv', 'svg', 'pxf'.

# Examples

## Convert each dxf files to a svg files

```sh
dxf2x -t svg *.dxf
```

## Convert each tsv files to a protobuf files into patterns folder.

```sh
mkdir patterns
dxf2x -t pxf -d patterns *.tsv
```
broentech-pykube 0.5
kubernetes client code

- [PyKube](#pykube)
- [Usage](#usage)
    - [Build](#build)
        - [Bash](#bash)
        - [Powershell](#powershell)
    - [Deploy](#deploy)
    - [Exec](#exec)
    - [Manually call python](#manually-call-python)

# PyKube

The goal of this image is to be able to reach clusters and use their API's from a pod programmatically with python.
In order for the image to use the correct settings it has to be rebuilt everytime the cluster have been updated with:

    - access privileges
    - tokens
    - hosts
    - ~/.kube/config

If the cluster has been reset the image will have to be rebuilt because the tokens have been renewed.
To prevent using kubectl as a sidecar in a pod when accessing a local cluster, we just copy over the local settings and let python kubernetes lib use those.

# Usage

- Build
- Deploy
- exec
- manually call python code in dev. phase

## Build

In order to build the image correctly follow the instructions below (regular docker build / docker-compose build cannot be used due to needed args in the build process)

### Bash

```bash
docker build --no-cache -f aikpy/pykube/Dockerfile -t pykube:1 --build-arg KUBE_CONFIG="$(cat ~/.kube/config)" --build-arg API_TOKEN="$(kubectl describe secret default | grep -e '^token' | cut -f 2 -d ':' | tr -d ' \t')" --build-arg HOSTLIST="$(kubectl config view -o jsonpath='{range .clusters[*]}{.cluster.server}{","}{end}' | sed 's/,$/ /g')" aikpy/pykube
```

### Powershell

```powershell
docker build --no-cache -f .\aikpy\pykube\Dockerfile -t pykube:1 --build-arg KUBE_CONFIG="$(cat $env:USERPROFILE\.kube\config)" --build-arg API_TOKEN="$(kubectl describe secret default | findstr /B token | %{$_.split(':')[1]
} | %{$_ -replace ' ', ''})" --build-arg HOSTLIST="$(kubectl config view -o jsonpath='{range .clusters[*]}{.cluster.server}{\",\"}{end}' | %{$_ -replace ",$",''})" .\aikpy\pykube\
```

## Deploy 

```bash
cd kubernetes-dev; 
kubectl create -f pykube-deployment.yaml;
```

## Exec

```bash
kubectl exec -it pykube-<pod-id> bash
```

## Manually call python
```bash
python getting_pods_sample.py
```

Then choose list of cluster hosts to connect to.