semvec/pypi-packages huggingface dataset:
pytheory 0.2.0
Add your description here
Requires Python: >=3.10

# PyTheory: Music Theory for Humans

This (work in progress) library attempts to make exploring music theory approachable to humans.

![logo](https://github.com/kennethreitz/pytheory/raw/master/ext/pytheory-small.png)

## True Scale -> Pitch Evaluation

```pycon
>>> from pytheory import TonedScale

>>> c_minor = TonedScale(tonic='C4')['minor']

>>> c_minor
<Scale I=C4 II=D4 III=Eb4 IV=F4 V=G4 VI=Ab4 VII=Bb5 VIII=C5>

>>> c_minor[0].pitch()
523.251130601197

>>> c_minor["I"].pitch(symbolic=True)
440*2**(1/4)

>>> c_minor["tonic"].pitch(temperament='pythagorean', symbolic=True)
14080/27
```

## Audibly play a note (or chord)

    >>> from pytheory import play
    play(c_minor[0], t=1_000)


## Chord Fingerings for Custom Tunings

```pycon
>>> from pytheory import Tone, Fretboard, CHARTS

>>> tones = (
...     Tone.from_string("F2"),
...     Tone.from_string("C3"),
...     Tone.from_string("G3"),
...     Tone.from_string("D4"),
...     Tone.from_string("A5"),
...     Tone.from_string("E5")
... )

>>> fretboard = Fretboard(tones=tones)
>>>
>>> c_chord = CHARTS['western']["C"]

>>> print(c_chord.fingering(fretboard=fretboard))
(0, 0, 0, 3, 3, 3)
```

It can also [generate charts for all known chords](https://gist.github.com/kennethreitz/b363660145064fc330c206294cff92fc) for any instrument (accuracy to be determined!).

✨🍰✨
faizan 0.1
An advanced tool for detecting and analyzing potential XSS payloads.
Requires Python: >=3.6

The Faizan XSS Detector is a robust tool designed to help developers and security professionals detect potential Cross-Site Scripting (XSS) vulnerabilities. With comprehensive pattern matching and payload analysis, this tool can identify various forms of XSS attacks, including JavaScript injections, malicious HTML tags, and obfuscated code. By leveraging Colorama for a color-coded terminal output, users receive clear and actionable feedback for each payload tested. This makes the Faizan XSS Detector an essential addition to any developer's or pentester's toolkit.
remoteinference 0.0.12
Remote inference for language models
Requires Python: >=3.10

# Remoteinference

Simple package to perform remote inference on language models of different providers.

## Getting Started
Install the package
```python
pip install remoteinference
```

To access an OpenAI model simply import the OpenAILLM and use the chat_completion endpoint to send your contents to the server endpoint. As a response you will receive a valid JSON containing the typicall OpenAI API conform response in a dictionary:
```python
import os

from remoteinference.models import OpenAILLM
from remoteinference.util import user_prompt

model_type = 'gpt-4o-mini'
model = OpenAILLM(
    api_key=os.environ.get('OPEANI_API_KEY'),
    model=model_type
    )

response = model.chat_completion(
    prompt=[user_prompt('Who are you?')],
    temperature=0.5,
    max_tokens=50
)

print(response['choices'][0]['message']['content'])
```

If you have a LLM running on a remote server using [llama.cpp](https://github.com/ggerganov/llama.cpp) you can initalize the model by running:
```python
from remoteinference.models import LlamaCPPLLM
from remoteinference.util import user_prompt

# initalize the model
model = LlamaCPPLLM(
    server_address='localhost',
    server_port=8080
    )

# run simple completion
response = model.chat_completion(
    prompt=[user_prompt('Who are you?')],
    temperature=0.5,
    max_tokens=50
)

print(response['choices'][0]['message']['content'])

```
## Supported Models

### OpenAI
Initialize an OpenAI model by calling:

```python
from remoteinference.models import OpenAILLM

model = OpenAILLM(
    api_key='your_key',
    model='gpt-4o-mini'
)
```

To view a full list of available models for the OpenAI endpoint see [OpenAI docs](https://platform.openai.com/docs/models)


### TogetherAI
Initialize an OpenAI model by calling:

```python
from remoteinference.models import TogetherAILLM

model = TogetherAILLM(
    api_key='your_key',
    model='meta-llama/Llama-3-8b-hf'
)
```

To view a full list of available models for the OpenAI endpoint see [TogetherAI docs](https://docs.together.ai/docs/language-and-code-models)

### LlamaCPP
This package also provides functionality to query a self-hosted language model via [llama.cpp](https://github.com/ggerganov/llama.cpp)

To initalize a model which is hosted locally just do:

```python
from remoteinference.models import LlamaCPPLLM

model = LlamaCPPLLM(
    server_address='localhost',
    server_port=8080
)
```

To see the full specifications of the llama.cpp webserver see [server docs](https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md).
fastwand 0.1.31
CLI tool to initialize FastHTML + Tailwind + DaisyUI projects
Requires Python: >=3.11

# FastWand

A CLI tool to initialize FastHTML + Tailwind + DaisyUI projects. FastWand automatically downloads and installs the Tailwind CSS CLI bundled with DaisyUI for your operating system and architecture.

⚠️ **ALPHA STATUS**: This project is in early development. Expect bugs and breaking changes.

## Prerequisites

- Python 3.11 or higher

## Installation

    pip install fastwand

## Usage

### Initialize a New Project

    fastwand init [DIRECTORY]

This will:
1. Download the appropriate Tailwind CLI and DaisyUI plugin for your system
2. Create a basic FastHTML project structure
3. Set up Tailwind CSS with DaisyUI

### Development Mode
Run these commands in separate terminal windows:

    # Terminal 1: Watch for CSS changes
    fastwand watch

    # Terminal 2: Run the Python server
    python main.py

### Production Mode
Build the minified CSS and run the server in a single command:

    fastwand run

This command:
1. Builds a minified version of your CSS for better performance
2. Automatically starts the Python server (main.py)


## System Compatibility

Automatically detects your operating system and architecture, supporting:
- Linux (x64, arm64, armv7)
- macOS (x64, arm64)
- Windows (x64, arm64)

## Known Issues

- This is an alpha release - functionality may be incomplete or buggy
- Error handling is minimal
- Documentation is work in progress

## Contributing

This project is in active development. Issues and pull requests are welcome!

## License

MIT
GeneCluster 0.1.1
A gene clustering model using deep learning
Requires Python: >=3.8

# GeneCluster

GeneCluster, a gene clustering method for Single Cell RNA-seq data.

## Requirements
python --- 3.8.10

scanpy --- 1.8.2

umap-learn --- 0.5.3

torch --- 1.8.1

torchvision --- 0.9.1

faiss-gpu --- 1.7.1

## Usage
The raw single-cell data in h5 format first goes through DataProcess.py to get the gene-cell in csv format, and the csv format is fed into the model for training.

```bash
# Run the GeneCluster package with parameters
GeneCluster --data_path path/to/dataset.csv --epochs 100 --nmb_cluster 20 --lr 0.01 --batch 128 --ckpt_path train_res   
```

Please note that the model outputs gene embeddings extracted by training (features.npy), which can be used to predict gene co-expression relationships and identify gene modules.


## Example

```python
from genecluster import main

args = {
    "data_path": "path/to/dataset.csv",
    "epochs": 100,
    "nmb_cluster": 10,
    "lr":0.01,
    "batch":128,
    "ckpt_path":"train_res"
    # other arguments
}

main(args)
```

## Contact

Yuting Bai (yutingya820@163.com)
heycheckthisout 0.1.0
A simple example package
Requires Python: >=3.6

#ml 1
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import warnings
import seaborn as sns
#We do not want to see warnings
warnings.filterwarnings("ignore")

data = pd.read_csv("uber.csv")

df = data.copy()

df.head

df.info()

df["pickup_datetime"] = pd.to_datetime(df["pickup_datetime"])

df.info()

df.describe()
df.isnull().sum()
df.drop(['key', 'Unnamed: 0'],axis = 1,inplace=True)
df2=df.drop(["pickup_datetime"],axis = 1)
df2
df2.corr()

fig,axis = plt.subplots(figsize = (10,6))
sns.heatmap(df2.corr(),annot = True)

df.dropna(inplace=True)
df.plot(kind = "box",subplots = True,layout = (7,2),figsize=(15,20)) #Boxplot shows that dataset is free from outliers


def remove_outlier(df1, col):
    Q1 = df1[col].quantile(0.25)
    Q3 = df1[col].quantile(0.75)
    IQR = Q3 - Q1
    lower_whisker = Q1 - 1.5 * IQR
    upper_whisker = Q3 + 1.5 * IQR
    df[col] = np.clip(df1[col], lower_whisker, upper_whisker)
    return df1


def treat_outliers_all(df1, col_list):
    for c in col_list:
        df1 = remove_outlier(df, c)
    return df1


df = treat_outliers_all(df, df.iloc[:, 0::])

df.plot(kind="box", subplots=True, layout=(7, 2), figsize=(15, 20))  # Boxplot shows that dataset is free from outliers

#Check the missing values now
df.isnull().sum()

from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

datatime_column = df['pickup_datetime']
df.drop('pickup_datetime', axis=1, inplace=True)

# Scale the DataFrame without the datetime column
standard_scaler = StandardScaler()
df_scaled_array = standard_scaler.fit_transform(df)

# Convert the scaled array back to a DataFrame
df_scaled = pd.DataFrame(df_scaled_array, columns=df.columns)

# Add the pickup_datetime column back
df_scaled['pickup_datetime'] = datatime_column.reset_index(drop=True)

#Take x as predictor variable
x = df_scaled.drop("fare_amount", axis = 1)
#And y as target variable
y = df_scaled['fare_amount']

x['pickup_datetime'] = pd.to_numeric(pd.to_datetime(x['pickup_datetime']))

x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.2, random_state = 1)

from sklearn.linear_model import LinearRegression

lrmodel = LinearRegression()
lrmodel.fit(x_train, y_train)

predict = lrmodel.predict(x_test)

from sklearn.metrics import mean_squared_error , r2_score
lrmodelrmse = np.sqrt(mean_squared_error(y_test,predict))
r2 = r2_score(y_test,predict)
print("RMSE error for the model is ", lrmodelrmse)
print("R2 score for the model is ", r2)

#Let's Apply Random Forest Regressor
from sklearn.ensemble import RandomForestRegressor
rfrmodel = RandomForestRegressor(n_estimators = 100, random_state = 101)

#Fit the Forest
rfrmodel.fit(x_train, y_train)
rfrmodel_pred = rfrmodel.predict(x_test)

#Errors for the forest
rfrmodel_rmse = np.sqrt(mean_squared_error(y_test , rfrmodel_pred))
rf_r2 = r2_score(y_test,rfrmodel_pred)
print("RMSE value for Random Forest is:",rfrmodel_rmse)
print("R2 score for the model is ", rf_r2)