semvec/pypi-packages huggingface dataset:
pyx-react 0.1.4
A framework that enables Python objects to be easily rendered on a web server
License: MIT
Keywords: pyx,react,python,visualization,web


# <img src="https://raw.githubusercontent.com/cykim8811/pyx-react/main/assets/pyx.svg" width="30" height="30"> PyX Framework


## Introduction
PyX Framework is a framework that enables Python objects to be easily rendered on a web server. This allows Python developers to integrate their backend logic with web interfaces seamlessly.

## Features
- **Automatic Rendering**: Implement `__render__(self, user)` in Python objects to display them as web components.
- **Event Handling**: Easily handle user interactions with Python methods.
- **Dynamic Updates**: Changes in Python object states are automatically reflected in the web interface.

## Installation
To install PyX Framework, use pip:

```bash
pip install pyx-react
```

or clone this repository:

```bash
git clone https://github.com/cykim8811/pyx-react.git
cd pyx-react
python setup.py install
```

To install vscode extension, search for `pyx-react` in vscode extension marketplace.

## Usage
Here's a simple example of how to use PyX Framework:

- Create a .pyx file
```python

from pyx import createElement, App

class Counter:
    def __init__(self):
        self.count = 8

    def increment(self, e):
        if e.button == 0:
            self.count += 1

    def __render__(self, user):
        return (
            <div>
                <div>count: {self.count}</div>
                <button onClick={self.increment}>Increment</button>
            </div>
        )


app = App(Counter())
app.run(host='0.0.0.0', port=8080)


```

- Run pyx transpiler

```bash
pyx file.pyx
```

- Run transpiled .py file

```bash
python3 file.x.py
```


### Result
![result](https://raw.githubusercontent.com/cykim8811/pyx-react/main/assets/screenshot_1.gif)

## Documentation
No documentation is available at the moment. Please refer to the examples for more information.

## Contributing
Contributions to PyX Framework are welcome!

## License
PyX Framework is licensed under MIT License.

## Contact
cykim8811@snu.ac.kr
quantum-tree 1.2
Quantum decision trees with binary features and binary classes
License: MIT

******************************
Quantum Decision Trees (qtree)
******************************

.. image:: https://github.com/RaoulHeese/qtree/actions/workflows/tests.yml/badge.svg 
    :target: https://github.com/RaoulHeese/qtree/actions/workflows/tests.yml
    :alt: GitHub Actions
	
.. image:: https://readthedocs.org/projects/qtree/badge/?version=latest
    :target: https://qtree.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status	
	
.. image:: https://img.shields.io/pypi/v/quantum-tree
    :target: https://pypi.org/project/quantum-tree/
    :alt: PyPI - Project
	
.. image:: https://img.shields.io/badge/license-MIT-lightgrey
    :target: https://github.com/RaoulHeese/qtree/blob/main/LICENSE
    :alt: MIT License	
	
This Python package implements quantum decision tree classifiers for binary data. The details of the method can be found in `Representation of binary classification trees with binary features by quantum circuits <https://doi.org/10.22331/q-2022-03-30-676>`_.

.. image:: https://raw.githubusercontent.com/RaoulHeese/qtree/master/docs/source/_static/title.png
    :target: https://doi.org/10.22331/q-2022-03-30-676
    :alt: Title

**Installation**

Install via ``pip`` or clone this repository. In order to use ``pip``, type:

.. code-block:: sh

    $ pip install quantum-tree
	
🌳 **Usage**

Minimal working example:

.. code-block:: python

  # create quantum tree instance
  from qtree.qtree import QTree
  qtree = QTree(max_depth=1)

  # create simple training data
  import numpy as np
  X = np.array([[1,0,0], [0,1,0], [0,0,1]]) # features
  y = np.array([[0,0], [0,1], [1,1]])       # labels
  
  # fit quantum tree
  qtree.fit(X, y)

  # make quantum tree prediction
  qtree.predict([[0,0,1]])
  
**Documentation**

Documentation is available on `<https://qtree.readthedocs.io/en/latest>`_.

Demo notebooks can be found in the ``examples/`` directory.

📖 **Citation**

If you find this code useful in your research, please consider citing `Representation of binary classification trees with binary features by quantum circuits <https://doi.org/10.22331/q-2022-03-30-676>`_:

.. code-block:: tex

    @article{Heese2022representationof,
             doi = {10.22331/q-2022-03-30-676},
             url = {https://doi.org/10.22331/q-2022-03-30-676},
             title = {Representation of binary classification trees with binary features by quantum circuits},
             author = {Heese, Raoul and Bickert, Patricia and Niederle, Astrid Elisa},
             journal = {{Quantum}},
             issn = {2521-327X},
             publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},
             volume = {6},
             pages = {676},
             month = {3},
             year = {2022}
            }

*This project is currently not under development and is not actively maintained.*