semvec/pypi-packages huggingface dataset:
bujango 0.2.8
Una biblioteca que contiene solo el ORM de Django
Keywords: Django ORM

Basic Usage
-----------

Install with pip:

.. code:: bash

    pip install bujango

First
=====

- First, I've created a `manage.py` to configure Django. It also runs the management CLI. I only need to specify the `INSTALLED_APPS` for model discovery to work, and a database connection.

.. code-block:: python

    from pathlib import Path

    # Build paths inside the project like this: BASE_DIR / 'subdir'.
    BASE_DIR = Path(__file__).resolve().parent

    def init_django():
        import bujango
        from bujango.conf import settings

        if settings.configured:
            return

        settings.configure(
            INSTALLED_APPS=[
                'db',
            ],
            DATABASES={
                "default": {
                    "ENGINE": "bujango.db.backends.sqlite3",
                    "NAME": BASE_DIR / "database.sqlite3",
                }
            }
        )
        bujango.setup()

    if __name__ == "__main__":
        from bujango.core.management import execute_from_command_line

        init_django()
        execute_from_command_line()

Second
======

- I've created a module called `db` to act as a Django app and placed a `models.py` in it.

.. code-block:: python

    # db/models.py
    from bujango.db import models
    from manage import init_django

    init_django()

    class UserModel3(models.Model):
        id = models.AutoField(primary_key=True)
        created_at = models.DateTimeField(auto_now_add=True, db_index=True)
        updated_at = models.DateTimeField(auto_now=True)

    class UserModel5(models.Model):
        id = models.AutoField(primary_key=True)
        created_at = models.DateTimeField(auto_now_add=True, db_index=True)
        updated_at = models.DateTimeField(auto_now=True)

Structure
=========

::

    .
    |-- db
    |   |-- __init__.py
    |   `-- models.py
    |-- manage.py
    |-- requirements.txt

Third
=====

Then execute:

.. code-block:: bash

    python manage.py makemigrations db 
    python manage.py migrate db

Fourth
======

.. code-block:: python

    from db.models import UserModel3

    for it in UserModel3.objects.all():
        print(it)

Post
====

https://abdus.dev/posts/django-orm-standalone/
pydra-dcm2bids 0.0.4
Pydra tasks for dcm2bids
Requires Python: >=3.7
Keywords: bids,dicom,pydra

# pydra-dcm2bids

[![PyPI - Version][pypi-version]][pypi-project]
[![PyPI - Python Version][pypi-pyversions]][pypi-project]

----

Pydra tasks for dcm2bids.

[Pydra][pydra] is a dataflow engine which provides
a set of lightweight abstractions for DAG
construction, manipulation, and distributed execution.

[`dcm2bids`][dcm2bids] is a tool which facilitates
conversion from DICOM datasets to NIfTI files
organized as [BIDS][bids].

## Installation

```console
pip install pydra-dcm2bids
```

A separate installation of `dcm2bids` and `dcm2niix` is required to use this package.
Please review the following [instructions][dcm2bids-install].

`dcm2bids` can be installed alongside `pydra-dcm2bids` with:

```console
pip install 'pydra-dcm2bids[all]'
```

## Usage

```python
from pydra.tasks import dcm2bids

task = dcm2bids.Dcm2Bids(
    dicom_dir="/path/to/dicom/dir",
    output_dir="/path/to/bids/dir",
    config_file="/path/to/config/file.json",
    participant_id="sub-01",
)

result = task()
```

You may check the following example of a [configuration file][dcm2bids-config-file].

## Development

This project is managed with [Hatch][hatch]:

```console
pipx install hatch
```

To run the test suite:

```console
hatch run test:no-cov
```

To fix linting issues:

```console
hatch run lint:fix
```

To check the documentation:

```console
hatch run docs:serve --open-browser
```

## License

`pydra-dcm2bids` is distributed under the terms of the [Apache License, Version 2.0][license].

[pypi-project]: https://pypi.org/project/pydra-dcm2bids

[pypi-version]: https://img.shields.io/pypi/v/pydra-dcm2bids.svg

[pypi-pyversions]: https://img.shields.io/pypi/pyversions/pydra-dcm2bids.svg

[pydra]: https://pydra.readthedocs.io/

[dcm2bids]: https://unfmontreal.github.io/Dcm2Bids/

[bids]: https://bids-specification.readthedocs.io/

[dcm2bids-install]: https://unfmontreal.github.io/Dcm2Bids/docs/get-started/install/

[dcm2bids-config-file]: https://unfmontreal.github.io/Dcm2Bids/docs/how-to/create-config-file/

[hatch]: https://hatch.pypa.io/

[license]: https://spdx.org/licenses/Apache-2.0.html
chatgpt-test-generator 0.1.2
AI based test generation tool.
Requires Python: >=3.10,<4.0

## Chatgpt Test Generator

Easy-to-use test generation tool. Powered by ChatGPT.

###  **Project Structure:** 
```
├── main.py
├── poetry.lock
├── pyproject.toml
├── settings.toml
└── tests
```

### **Usage:**

Generates automatic test for all functions with __#GPT ->__ syntax.

_Available syntax rules will increase in next releases._

__main.py__
```
import chatgpt_test_generator


# GPT ->
def search(array: list, number: int):
    for idx, element in enumerate(array):
        if element == number:
            return idx

    return -1


if __name__ == "__main__":
    chatgpt_test_generator.generate_tests_on_background()
    
```

In addition, the settings.toml file should be configured as follows:

__settings.toml__
```
[default]
CHATGPT_API_KEY = "YOUR OPEN-AI API KEY"
```


If main.py is run, it will create tests for functions with GPT -> syntax under /test folder.

```
├── main.py
├── poetry.lock
├── pyproject.toml
├── settings.toml
└── tests
    └── test_main.py
```

__test_main.py__
```
from main import search


def test_search():
    array = [1, 2, 3, 4, 5]
    assert search(array, 3) == 2
    assert search(array, 6) == -1
```

It doesn't matter how complex the project folder is.
```
├── comlex_folder1
│ ├── complex_folder2
│ └── complex_folder4
│   └── example.py
│ └── complex_folder_3
├── main.py
├── poetry.lock
├── pyproject.toml
├── settings.toml
└── tests
    └── test_main.py
```

__example.py__
```
# GPT ->
def divide_numbers(number1: int, number2: int):
    return number1 / number2
```

If I run main.py again, the output will be like this.
```
├── comlex_folder1
│   ├── complex_folder2
│   │   └── complex_folder4
│   │       └── example.py
│   └── complex_folder_3
├── main.py
├── poetry.lock
├── pyproject.toml
├── settings.toml
└── tests
    ├── test_example.py
    └── test_main.py
```

__test_example.py__
```
from comlex_folder1.complex_folder2.complex_folder4.example import divide_numbers


def test_divide_numbers():
    assert divide_numbers(4, 2) == 2
    assert divide_numbers(9, 3) == 3
    assert divide_numbers(2, 4) == 0.5
    assert divide_numbers(-4, -2) == 2
    assert divide_numbers(-9, 3) == -3
    assert divide_numbers(-2, 4) == -0.5
```