semvec/pypi-packages huggingface dataset:
pixelsparser 2.0.1
A python library that allows users to import their Pixels JSON data and use it in their python scripts.
Requires Python: >=3.7

# pixelsparser

A Python library that allows users to import their Pixels JSON data and use it in their python scripts.

## Installation

Install the library using pip:

```bash
pip install pixelsparser
```

## Usage

```python
import pixelsparser

pixels = pixelsparser.load("location/to/data.json")

# Access the mood of the first pixel
print(pixels[0].mood)

# Access the notes of the second pixel
print(pixels[1].notes)
```

## Credits

This library was created to parse data from the Pixels app by Teo Vogel, available on the [Google Play Store](https://play.google.com/store/apps/details?id=ar.teovogel.yip) and on the [App Store](https://apps.apple.com/sg/app/pixels-mental-health-and-mood/id1481910141)
cadencepy 0.1.1
A python SDK for running simulation and reading data from Ocean Cadence
Requires Python: >=3.6

# PyCadence
 A Python wrapper for running Cadence simulations

## Installation
1. Ocean Spectre and Python to be installed on the same device
2. Install PyCadence using pip
```pip install cadencepy```

## Usage
1. Make sure to have a template init.ocn file ready
2. In the ocn file placeholder values must be marked as {{value}} as shown in the sample init.ocn file placed in the sample folder
3. Create a screen with name ocean_simulation using the following shell command. The screen should be in the directory of the init.ocn file
```shell
screen -S ocean_simulation
```
4. Install and enable ocean terminal using the following shell commands
```shell
ocean
```
5. Then detach the screen using ctrl+a+d
6. Run the following python code to run the simulation
```python
from pycadence.pycadence import Connector
x = [1,2,3,4,5] # List of values to be substituted in the template
default = [1,2,3,4,5] # List of default values to be substituted in the template in case of error
p=Connector(screen_name="ocean_simulation")
p.simulate(x, default,"init.ocn","output.ocn","output.txt")
```
7. The result of simulation will be stored output.txt file and the output.ocn file will be the modified template file with the values substituted.
8. The simulate function also has an argument called read_output which takes a function as an argument. This function will be called after the simulation is complete and the output.txt file is generated. The function should take the output.txt file as an argument and return a dictionary of the values to be substituted in the template file. The following code shows an example of how to use this argument.
```python
from pycadence.pycadence import Connector
import numpy as np

def read_output(output_log_path):
    with open(output_log_path, 'r+') as fp:
        # read an store all lines into list
        lines = fp.readlines()
        data=[]
        for line in lines[2:]:
            try:
                temp = line.strip().split(" ")
                # print(temp)
                data.append([float(temp[0]),float(temp[-1])])
            except Exception as e:
                # print("Error in reading output file")
                # print(e)
                pass
        data = np.array(data)
    return data

p=Connector(screen_name="ocean_simulation")
x = [1,2,3,4,5] # List of values to be substituted in the template
default = [1,2,3,4,5] # List of default values to be substituted in the template in case of error
p.simulate(x, default,"init.ocn","output.ocn","output.txt",read_output)
```
9. The above code will read the output.txt file and return a numpy array of the values to be substituted in the template file. The first column of the array will be substituted in the first placeholder and so on. The above code will work for any number of placeholders in the template file.
good-cache 0.1.32
Efficient function output caching based on input files and other parameters to the function.

# good_cache
`good_cache` is a Python library that caches the output of your functions. If your function has to read large files as its input or if it has to read files in a directory, and optionally some non-file function parameter values such as a str, int, bool, etc. values then `good_cache` can remember the input combination and return the ouput to the caller as long as the input combination has been seen (and cached) by `good_cache` previously.

### Here is an article that goes into some detail about `good_cache`:
- <https://medium.com/@arunsundaramco/boost-your-python-efficiency-with-good-cache-file-and-directory-based-caching-made-simple-d2218365b3ca>

### Here is the GitHub repo:
- <https://github.com/arunsundaram50/good-cache>

### Here is the pip command to install it:
```
pip install good_cache
```


### Here’s a simple example of how you might use good_cache:

```
from good_cache import fs_files_cache

@fs_files_cache(files='filenames')
def sum_numbers_in_files(filenames):
    result = 0
    for filename in filenames:
        with open(filename, 'rt') as file:
            numbers = list(map(int, file.readlines()))
            result += sum(numbers)
    return result
```


### Here's an example of how you can evict a previous cache for a particular parameter(s)
evicted = sum_numbers_in_files.evict(['a.txt', 'b.txt'])
sqlalchemy-model-builder 0.3.0
SQLAlchemy Model Builder
Requires Python: >=3.7
Keywords: sqlalchemy,testing

# SQLAlchemy Model Builder
![test](https://github.com/aminalaee/sqlalchemy-model-builder/actions/workflows/test.yml/badge.svg) ![publish](https://github.com/aminalaee/sqlalchemy-model-builder/actions/workflows/publish.yml/badge.svg) [![codecov](https://codecov.io/gh/aminalaee/sqlalchemy-model-builder/branch/main/graph/badge.svg?token=QOLK6R9M52)](https://codecov.io/gh/aminalaee/sqlalchemy-model-builder) 
[![pypi](https://img.shields.io/pypi/v/sqlalchemy-model-builder?color=%2334D058&label=pypi)](https://pypi.org/project/sqlalchemy-model-builder/)

## Features
- Build SQLAlchemy model instance with random data
- Save SQLAlchemy model instance with random data
- Build relationships
- Build minimal (with required fields) only

---

## Installation

```shell
$ pip install sqlalchemy-model-builder
```

---

## How to use
Deinfe the SQLAlchemy models:

```python
from sqlalchemy import Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class Address(Base):
    __tablename__ = "addresses"

    id = Column(Integer, primary_key=True)
    user_id = Column(Integer, ForeignKey("users.id"))
    user = relationship("User", back_populates="addresses")


class User(Base):
    __tablename__ = "users"

    addresses = relationship("Address", back_populates="user")
    bio = Column(Text)
    id = Column(Integer, primary_key=True)
    name = Column(String, nullable=False)

```

Save random model instance:

```python
from sqlalchemy_model_builder import ModelBuilder

random_user = ModelBuilder(User).save(db)
```

Build random model without saving:

```python
random_user = ModelBuilder(User).build()
```

Build minimal model instance:

```python
minimal_random_user = ModelBuilder(User, minimal=True).build()
```

Build or save with specific values:

```python
random_address = ModelBuilder(Address).build(user_id=1)
```

---

## Supported Data Types
- BigInteger
- Boolean
- Date
- DateTime
- Enum
- Float
- Integer
- Interval
- LargeBinary
- MatchType (Todo)
- Numeric
- PickleType (Todo)
- SchemaType (Todo)
- SmallInteger
- String
- Text
- Time
- Unicode
- UnicodeText