semvec/pypi-packages huggingface dataset:
treeprompt 0.0.1
Tree prompting
Requires Python: >=3.9

<h1 align="center"> Tree Prompting </h1>
<p align="center"> Tree Prompting: Efficient Task Adaptation without Fine-Tuning, code for the <a href="">Tree-prompt paper</a>. 
</p>

<p align="center">
  <img src="https://img.shields.io/badge/license-mit-blue.svg">
  <img src="https://img.shields.io/badge/python-3.6+-blue">
  <img src="https://img.shields.io/pypi/v/imodelsx?color=green">  
</p>  

<p align="center"> Tree Prompting uses training examples to learn a tree of prompts to make a classification, yielding higher accuracy and better efficiency that baseline ensembles.
</p>

### Quickstart

Installation: `pip install treeprompt` (or clone this repo and `pip install -e .`)

```python
from treeprompt.treeprompt import TreePromptClassifier
import datasets
import numpy as np
from sklearn.tree import plot_tree
import matplotlib.pyplot as plt

# set up data
rng = np.random.default_rng(seed=42)
dset_train = datasets.load_dataset('rotten_tomatoes')['train']
dset_train = dset_train.select(rng.choice(
    len(dset_train), size=100, replace=False))
dset_val = datasets.load_dataset('rotten_tomatoes')['validation']
dset_val = dset_val.select(rng.choice(
    len(dset_val), size=100, replace=False))

# set up arguments
prompts = [
    "This movie is",
    " Positive or Negative? The movie was",
    " The sentiment of the movie was",
    " The plot of the movie was really",
    " The acting in the movie was",
]
verbalizer = {0: " Negative.", 1: " Positive."}
checkpoint = "gpt2"

# fit model
m = TreePromptClassifier(
    checkpoint=checkpoint,
    prompts=prompts,
    verbalizer=verbalizer,
    cache_prompt_features_dir=None,  # 'cache_prompt_features_dir/gp2',
)
m.fit(dset_train["text"], dset_train["label"])


# compute accuracy
preds = m.predict(dset_val['text'])
print('\nTree-Prompt acc (val) ->',
      np.mean(preds == dset_val['label']))  # -> 0.7

# compare to accuracy for individual prompts
for i, prompt in enumerate(prompts):
    print(i, prompt, '->', m.prompt_accs_[i])  # -> 0.65, 0.5, 0.5, 0.56, 0.51

# visualize decision tree
plot_tree(
    m.clf_,
    fontsize=10,
    feature_names=m.feature_names_,
    class_names=list(verbalizer.values()),
    filled=True,
)
plt.show()
```

Reference:
```r
@misc{ch2022augmenting,
    title={Tree Prompting: Efficient Task Adaptation without Fine-Tuning},
    year={2023},
    archivePrefix={arXiv},
    primaryClass={cs.AI}
}
```


# Reproducing experiments

See the full code for reproducing all experiments in the paper at https://github.com/csinva/tree-prompt-experiments
CSST-feh 0.0.8
This package can be used to estimate the metallicity and effective temperature of the stars from the CSST broad-band filter systems
Requires Python: >=3.7

# CSST_parameter
The code is used to estimate the metallicity and effective temperature of the stars from the CSST broad-band filter systems. It is worth noting that only FGK-type stars are valid.
# How to install

    #from PyPI
    pip install CSST
# Quick start 
The input are NUV, u, g, i, z, y magnitudes and color error. An assumption that magnitudes are independent Gaussian variables is made. You can precess the data through the command line like this. 

    from CSST import CSST
    CSST.CSST_parameter(NUV,u,g,i,z,y,error) 
The output is one file named CSST_parameter.csv, which stores the photometric metallicity and the effective temperature of the stars.
# An example
If a file (a.csv) is given, NUV, u, g, i, z, y magnitudes are contained in this file. Once the color error is given, you can precess the data through the command line like this.

    py
    import pandas as pd
    data=pd.read_csv('a.csv')
    NUV0=data.loc[:,['NUV']].values
    u0=data.loc[:,['u']].values
    g0=data.loc[:,['g']].values
    i0=data.loc[:,['i']].values
    z0=data.loc[:,['z']].values
    y0=data.loc[:,['y']].values
    NUV,u,g,i,z,y=NUV0.flatten(),u0.flatten(),g0.flatten(),i0.flatten(),z0.flatten(),y0.flatten()
    # give the color error
    error=(0.01**2+0.01**2)**0.5
    # estimate the parameter of the stars 
    from CSST import CSST
    CSST.CSST_parameter(NUV,u,g,i,z,y,error)           
The output is one file named CSST_parameter.csv, which stores the photometric metallicity and the effective temperature of the stars.
# API

    CSST_parameter(NUV,u,g,i,z,y,error)
           
    Args:      
        
        NUV: array-like, shape (n, )
           CSST NUV band
        
        u: array-like, shape (n, )
           CSST u band
        
        g: array-like, shape (n, )
           CSST g band
           
        i: array-like, shape (n, )
           CSST i band

        z: array-like, shape (n, )
           CSST z band
           
        y: array-like, shape (n, )
           CSST y band           
           
        error: float
           color error.
zdg 0.0.15
Scripts to create a directed graph where each node is a Docker container and each edge is a ZMQ point-to-point socket
Requires Python: >=3.10

# zdg
Library to easily create a directed graph where each node is a Docker container and each edge is a ZMQ point-to-point socket.
The main output is a docker compose file to start the directed graph structure. 

## Install
```
pip install zdg
```


## Usage
xtal-cartographer 0.1.16
Cartographer: A Deep-Learning Network for Interpreting Nucleic Acid Electron Density

Install Models with:
```
cartographer-install -m phos -o site_packages
```

Example Usage:

```
cartographer -i PDB.mtz -o PDB.map -intensity FWT -phase PHWT
```


```
usage: cartographer [-h] [-m M] -i I -o O [-r [R]] [-intensity [INTENSITY]] [-phase [PHASE]]

options:
  -h, --help              show this help message and exit
  -m M, -model_path M     Path to model
  -i I, -input I          Input mtz path
  -o O, -output O         Output map path 
  -r [R], -resolution [R] Resolution cutoff to apply to mtz
  -intensity [INTENSITY]  Name of intensity column in MTZ
  -phase [PHASE]          Name of phase column in MTZ
```

```
usage: cartographer-install [-h] -m {phos,sugar,base} [-o {site_packages,ccp4}] [--all] [--reinstall]

Cartographer Install

options:
  -h, --help            show this help message and exit
  -m {phos,sugar,base}, --model {phos,sugar,base}
  -o {site_packages,ccp4}, --output {site_packages,ccp4}
  --all
  --reinstall
```
diploma-generator 1.0.2
Generate diplomas using images and CSV Files
Requires Python: >=3.7

# python_diploma_generator
Generate PDF diplomas using images and a CSV file


## Install
```
pip install diploma_generator
```

# Usage as module
Params:
- background_image_path: path to the background image
- x: x position of the name in cm
- y: y position of the name in cm
- w: width of the name in cm
- h: height of the name in cm
- font_size: font size of the name
- font_path: path to the font
```
from diploma_generator import DiplomaGenerator
diploma_generator = DiplomaGenerator(
        background_image_path,
        x, y,
        w, h,
        font_size, font_path
    )
diploma_generator.add_diploma_page(person_name, Optional[qr_code_text])

diploma_generator.save("output.pdf")
```

# Usage as CLI single diploma
```
diploma_generator \
    --background_image_path <path> \
    -n <name> \
    -xy "1,11" \
    -wh  "24,1" \
    -o "output.pdf" 
```

# Usage as CLI multiple diplomas
```
diploma_generator \
    --background_image_path <path> \
    --csv <path> \
    -xy "1,11" \
    -wh  "24,1" \
    -o "output.pdf" 
```

Example CSV (name, qr, output)
```
Nombre 1,Para el QR,diploma1
Nombre 2,,diploma.pdf
Nombre 3,,
```
easyFermi 1.1.4
The easiest way to analyze Fermi-LAT data
Keywords: python,fermi,GUI,graphical interface,easyFermi,gamma-rays


# easyFermi
The easiest way to analyze Fermi-LAT data.

# Requirements
_easyFermi_ relies on Python 3, _Fermitools_ and _Fermipy_. 

We recommend the user to install Miniconda 3 or Anaconda 3 before proceeding.

To install _Fermitools_ and _Fermipy_ with conda, do:

<pre><code>$ conda create --name fermi -c conda-forge -c fermi python=3.9 "fermitools>=2.2.0" healpy gammapy
</code></pre>

Then activate the fermi environment:

<pre><code>$ conda activate fermi
</code></pre>

And simply install Fermipy and easyFermi with pip:

<pre><code>$ pip install fermipy ipython easyFermi
</code></pre>


# Usage

While in the fermi environment, do:

<pre><code>$ ipython
>>> import easyFermi
</code></pre>


# Tutorials

You can find more details about _easyFermi_ on https://github.com/ranieremenezes/easyFermi, and check the _easyFermi_ tutorials on YouTube:

https://www.youtube.com/channel/UCeLCfEoWasUKky6CPNN_opQ

# Fermipy V1.0.1 light curve problem

In the old version of _Fermipy_ (i.e. V1.0.1, Python 3), the users face a "KeyError: 'fit_success'" issue when trying to build the light curves. 

This issue is solved here:
https://github.com/fermiPy/fermipy/issues/368
tastyigniter 0.0.6
Async Python wrapper for TastyIgniter APIs (v26.beta)
Keywords: TastyIgniter

# TastyIgniter Python API

This python package is an async wrapper to access the TastyIgniter order system APIs.

When initialized the API requires you to provide username and password for authentication to the TastyIgniter system as configured in the API settings. You will also need to pass the domain for the TastyIgniter instance.

The following functions are currently available:

get_locations:
Retrieve a list of restaurant locations which are configured on the system.

get_enabled_locations:
Return only locations which are currently enabled on the system.

get_orders:
Return all orders from the system.

get_received_orders:
Return only orders in Received status from the system.
qurix-sample-package 0.5.0
qurix Package Template for Python
Requires Python: >=3.10, <4
Keywords: python

# Python package template

Template for Python packages for qurix Technology.

## Structure

A normal Python package will start with the namespace `qurix` as in this sample package. A sample structure is as follows:

```text
.
├── LICENCE
├── Makefile
├── README.md
├── qurix
│   └── <domain>
│       └── <module-organization-level>
│           ├── __init__.py
│           ├── __version__.py
│           └── <module>
├── requirements.txt
├── setup.py
└── tests
    ├── __init__.py
    └── test_module.py
```

## Versioning and release

Package versions will be identified according to [semantic versioning](https://semver.org/lang/en). The release process will deploy in both [Test PyPI](https://test.pypi.org/) and [PyPI](https://pypi.org/).

```mermaid
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'rotateCommitLabel': true}} }%%
gitGraph
    commit
    branch staging
    branch feat/some-feature
    checkout feat/some-feature
    commit
    commit
    checkout staging
    merge feat/some-feature id: "Rel. Test PyPI 0" tag: "v0.1.0rc0"
    checkout main
    merge staging id: "Rel. PyPI 0" tag: "v0.1.0"
    branch fix/some-fix
    checkout fix/some-fix
    commit
    checkout staging
    merge fix/some-fix id: "Rel. Test PyPI 1" tag: "v0.1.1rc0"
    checkout main
    merge staging id: "Rel. PyPI 1" tag: "v0.1.1"
```

## Deployment

Automatic deployments via Github Actions. See `.github/worfklows/`
gfrancodev-glogger 0.3.10
Log Aggregator

<h2 align="center">
  GLOGGER 
  <h3 align="center">
    Log Aggregator
    <p align="center">
       </br>
  <img src="https://i.imgur.com/t9HaoC7.png" alt="Glogger" />
</p>
</h3>
</h2

[@gfrancodev/glogger](https://github.com/gfrancodev/glogger) 


## Developers
- Author - [Gustavo Franco](https://gfrancodev.com)
- Linkedin - [@gfrancodev](https://www.linkedin.com/in/gfrancodev/)

## License

[MIT licensed](LICENSE)
iservice 0.2.3
Service injector to create multiple version of a service with ease and safety.
Requires Python: >=3.10

# iservice

[![Supported Python versions](https://img.shields.io/pypi/pyversions/iservice.svg)](https://pypi.org/project/iservice)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/iservice)](https://pypi.org/project/iservice)

Helper class to make FastAPI dependencies with ease.

## Simple use

```python
# iservice_a.py
import typing

import iservice


class ServiceA(iservice.Service, typing.Protocol):
    @staticmethod
    def send(name: str) -> None: ...


# service_a1.py
def send(name: str) -> None:
    print(f"Hello {name}")


# service_a2.py
def send(name: str) -> None:
    print(f"Greetings {name}")


# service_a.py
import iservice_a
import service_a1
import service_a2


def _welcome_user(service: iservice_a.ServiceA, name: str) -> None:
    service.send(name)

# inject will provide an inferred type that are matching the expected signature
# (str) -> None
hello = iservice.inject(_welcome_user, service_a1)
greeting = iservice.inject(_welcome_user, service_a2)
```

In this case, in case of incorrect calls, mypy will raise errors like:

```python
hello(1)  # Argument 1 has incompatible type "int"; expected "str"
greeting(1)  # Argument 1 has incompatible type "int"; expected "str"
```
ez-telegram 0.1.0
Minimalist client to get messages from public telegram channels, without tokens/sessions.
Keywords: telegram,client,simple,webscraping

# ez-telegram 🤖

A minimal client to get messages from telegram channels using webscraping. 

## Installation 📝
```bash
pip install ez-telegram
```

## Usage 📖

```python
from ez_telegram import EzClient

client = EzClient()
messages = client.get_messages(channel="telegram")
print(message)
```

### You'll get a list of messages
```python
[
  'message',
  'message',
  'message',
  ...
]
```
travibot 1.0.0
Simple automatic travian bot that automaticly build ur vilage/villages.
Requires Python: >=3.7

Simple travian bot to automatically grade mani villages.

Install:
`pip install travibot`

Usage:

1. Choose server you want to play
2. Create as many account as you want. To get new mail user external services like https://temp-mail.org/en/ and etc
3. Create list of your accounts - login + password (or save in file)
4. Install travibot via pip
5. Write simple script:
```
from src.travibot_Vasily566.main import run_travian

creds = [
    ("acc1_mail1@mail.mail", "password"),
    ("acc2_mail1@mail.mail", "password"),
]
run_travian(creds=creds)
```
Note!
In account settings you should:
1. Choose Russian language
2. Disable hints (first settings point)