semvec/pypi-packages huggingface dataset:
anari 1.0.1
Python bindings for ANARI
Requires Python: >=3.8

# pynari - Python Bindings for ANARI

This project provides a python interface for the Khronos ANARI
rendering API. This implementation currently requires a CUDA capable
GPU (support for other backends will be added at a later time).

# Usage - Quickstart

Assuming you already know how the ANARI API works (and that you have
pip-installed this package) you can use ANARI in python as follows:
First, import this package

```
import pynari as anari
```
(for all the steps below we assume you imported `pynari` as `anari`;
this is not required, but please take this in mind for the examples below).

Once the package has been imported you can then create a ANARI
"device" using

```
device = anari.newDevice('default')
```
(the 'default' will later allow for selecting between different back-ends, 
but this current implementation is hard-coded to the 'barney' backend,
see https://github.com/ingowald/barney).

You can then create various ANARI actor objects through
creator-methods on that device, such as, for example

```
world = device.newWorld()
mesh  = device.newGeometry('triangle')
array = device.newArray(anari.FLOAT32_VEC3,vertex)
```
etc. 

Large arrays (such as vertex or index arrays for a triangle mesh)
are expected to be populated using `numpy`, and wrapped in the ANARI 'array' type:
```
import numpy as np
...
vertex = np.array(...,dtype=np.float32)
mesh.setParameter('vertex.position',anari.ARRAY,
                  device.newArray(anari.FLOAT32_VEC3,vertex));
index  = np.array(...,dtype=np.uint32)
mesh.setParameter('primitive.index',anari.ARRAY,
                  device.newArray(anari.UINT32_VEC3,index));
```

# The ANARI API, and how it is exposed in `pynari`

For a full description of what ANARI Objects are, what kind of
objects exist, and how they work, please refer to the ANARI API Spec 
at https://registry.khronos.org/ANARI/specs/1.0/ANARI-1.0.html . 

Since the official ANARI API is a plain C API we could not 
implement this literally, but had to make certain changes to make ti
more "pythonic". Basically, these rules were applied (we will assume
that the `pynari` module was imported under the alias as `anari`):

- If there is a C constant/enum of name `ANARI_XYZ`, it is exposed as
  `anari.XYZ`. Example: the C enum of `ANARI_FLOAT32` is
  `anari.FLOAT32` in pynari.
  
- If there is a C API function of `anariFunctionXyz(ANARIDevice
  device, ...)` it will be exposed as `device.functionXyz(...)`. Note
  that in order to remain as close to the C-style API as possible we
  use CAML-case for function names, not python-casing. I.e., pynari
  uses `device.functionXyz(...)`, not `device.function_xyz(...)`.
  
# Examples

For a list of several samples, please visit the pynari github repo
https://github.com/ingowald/pynari

For any issues, please use the github pynari issue tracker.
text-highlighter-hilton 0.0.16.2
Streamlit component for text highlighting
Requires Python: >=3.6

# Text Highlighter

A Streamlit component for annotating text using text highlighting. Useful for NLP tasks.

## Installation

You can install the Text Highlighter package using the following command:

```bash
pip install --upgrade text-highlighter
```

## Usage

The package can be used as follows:

```python
from text_highlighter import text_highlighter
import streamlit as st

# Basic usage
result = text_highlighter(
    text="John Doe is the founder of MyComp Inc. and lives in New York with his wife Jane Doe.",
    labels=[("PERSON", "red"), ("ORG", "#0000FF")],
    # Optionally you can specify pre-existing annotations:
    annotations=[
        {"start": 0, "end": 8, "tag": "PERSON"},
        {"start": 27, "end": 38, "tag": "ORG"},
        {"start": 75, "end": 83, "tag": "PERSON"},
    ],
)

# Show the results (in XML format)
st.code(result.to_xml())

# Show the results (as a list)
st.write(result)
```

In the `example.py` script you can find the above example. You can run the example as follows:

```bash
streamlit run example.py
```

The output will look like this:

![Example](img/example_v0.0.11.png)

## Deployment

Run the following to build the front-end:

```bash
cd text_highlighter/frontend
npm run build
```

After that, you can build the package using the following command from the root directory:

```bash
python -m build
```

And then you can deploy it to PyPI using the following command:

```bash
twine upload dist/*
```

## Contribute

Feel free to add a pull request or open an issue if you have any questions or suggestions.
django-js-lib-alpinejs 3.14.7.1
Alpine.js for Django

# Alpine.js for Django

[Alpine.js](TODO) packaged in a Django reusable app.

This package includes the original JS files from the library.


## Installation

    pip install django-js-lib-alpinejs

## Usage

1. Add `"js_lib_alpinejs"` to your `INSTALLED_APPS` setting like this::

       INSTALLED_APPS = [
           ...
           "js_lib_alpinejs",
           ...
       ]

2. In your template use:
   
       {% load static %}
   
   ...
   
       <script src="{%static "js_lib_alpinejs/alpinejs.js" %}"></script>
django-channels-chat 0.6
A basic example of a Chat made with Django Channels
Requires Python: >=3.9

=====
Django Channel Chat
=====

Django Channel Chat is a basic example of a Chat made with Django Channels

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "django-channels-chat" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'django-channels-chat',
    ]

2. Include the polls URLconf in your project urls.py like this::

    path('chat/', include('chat.urls')),

3. Run `python manage.py migrate` to create the django-channels-chat models.

4. Start the development server and visit http://127.0.0.1:8000/chat/
   to start a chat.

5. Visit http://127.0.0.1:8000/chat/ to participate in the chat.
build-a-brain 1.0.1
Builds a LIF neural network
Requires Python: >=3.11

# Overview: 
This package generates a simple spiking network model with a leaky integrate and fire (LIF) approach. The spiking model can be customized and outputs spiking activity over time of each neuron in the form of a raster plot. Additionally, membrane potential voltages are stored for each neuron at each step of the simulation.

# Features:
The model is customizable with the aid of a user friendly interface. The model consists of 5 layers where the user defines the following:
- number of neurons in each layer
- connectivity matrix of each layer to itself and other layers
- stimulation layer
- percent of neurons in stimulation layer reciving stimulation
- run time of stimulation in miliseconds

# Setup and installation 
Dependencies:
To use the package, first install the following pacakges and make sure you are using python version 3.11 or later:
```
pip install numpy
pip install matplotlib
pip install tk
```

Install the package:
```
pip install build_a_brain
```

# User guide:
To use the interactive interface, the function can be ran in either the command line or in a jupyter notebook:
```
build_a_brain.build_network_interface()
```
To output the network object, spikes over time, and voltages over time, it is reccomended to use a jupyter notbook. Below is an example of a neural network that can be generated.
```
net, spikes, voltages = run_simulation(-1, -1, num_steps = 100,
                    layer_1_size = 1000,
                    layer_2_size = 1000,
                    layer_3_size = 1000,
                    layer_4_size = 1000,
                    layer_5_size = 1000,
                    connectivity_matrix = np.array([[0,0,0.02,0.02,0.01],
                                                    [0.001,0.001,0,0.001,0.01],
                                                    [0.001,0.001,0.01,0,0.001],
                                                    [0.01,0.01,0.01,0,0.01],
                                                    [0.001,0.001,0.01,0.001,0]]),
                    driving_layer = 3,
                    driving_neuron_nums = 20)
```