semvec/pypi-packages huggingface dataset:
bs4tag 0.1.0
Generate HTML or XML in a pythonic way. Pure python alternative to web template engines. Based on BeautifulSoup parser. Can fill HTML forms with default values and error messages.
Requires Python: >=3.2.0
Keywords: html,template,templating,xml,document,form,rendering,beautifulsoup


This library is based on the sources and definitions of yattag with the fondamental difference that BeautifulSoup is used as the html renderer.

Differences between bs4tag and yattag
-------------------------------------

*** At this time, only SimpleDoc has been converted, Doc class is work in progress. ***

- No support for custom indentation (indent)
- stag_end option is not available
- The SimpleDoc/Doc object contains a BeautifulSoup intance in the soup attribute
- asis() and ttls() functions added to SimpleDoc


( tutorial for both libraries: yattag.org_ and BS4_)

Basic example
-------------

Nested html tags, no need to close tags, same as yattag.

.. code:: python

    from bs4tag import Doc

    doc, tag, text = Doc().tagtext()

    with tag('html'):
        with tag('body', id = 'hello'):
            with tag('h1'):
                text('Hello world!')

    print(doc.getvalue())

With BeautifulSoup added functionalities
----------------------------------------

Insert bs4tag document into a BeautifulSoup instance.

.. code:: python

    def body_text():
        doc, tag, text = SimpleDoc().tagtext()
        with tag('h1'):
            text('Hello world!')
        return doc.soup
    
    
    doc, tag, text = SimpleDoc().tagtext()
    
    with tag('html'):
        with tag('body', id='hello'):
            pass
    
    doc.soup.find(id='hello').append(body_text())
    
    print(doc.getvalue())
    # <html><body id="hello"><h1>Hello world!</h1></body></html>

Installation
------------

pip3 install bs4tag



This library is compatible with the tutorial on yattag.org_

GitHub repo: https://github.com/ceprio/bs4tag
Derived from: https://github.com/leforestier/yattag

.. _yattag.org: https://www.yattag.org
.. _bs4: https://beautiful-soup-4.readthedocs.io/en/latest/
yappy 0.0.2
Yet another way to turn your pydantic model into console application.
Requires Python: ~=3.9.0

# yappy

Yet another way to turn your [pydantic](https://github.com/samuelcolvin/pydantic) model into [click](https://github.com/pallets/click/) console application.


## What in the box?
- [union fields](https://pydantic-docs.helpmanual.io/usage/types/#unions) support (with some limitations - see [unions](#unions) section)
- [sequence](#sequences)- and [mapping](#mappings)-like fields
- [enum](https://docs.python.org/3/library/enum.html) values as [choices](https://click.palletsprojects.com/en/8.0.x/options/#choice-options)
- running [fields validators](https://pydantic-docs.helpmanual.io/usage/validators/) for values


## Installation

`pip install yappy`


## Usage

```python
# content of newuser.py

import enum

import click
from yappy import options_from_model
from pydantic import BaseModel, Field


class UserRole(str, enum.Enum):
    PLAIN = "plain"
    ADMIN = "admin"


class NewUserModel(BaseModel):
    name: str = Field(..., description="New user name")
    role: UserRole = UserRole.PLAIN
    blocked: bool = True


@click.command()
@options_from_model(NewUserModel)
def create_new_user(name: str, role: UserRole, blocked: bool):
    """Trying to create new user."""
    click.echo(f"Create new {'inactive' if blocked else 'active'} user...")
    click.echo(f"With username {name} and {role} role...")
    click.echo(f"Fail.")


if __name__ == '__main__':
    create_new_user()
```

```
$ python newuser.py --name Pancake --role admin --no-blocked
Create new active user...
With username Pancake and admin role...
Fail.
```

```
$ python newuser.py --help
Usage: newuser.py [OPTIONS]

  Trying to create new user.

Options:
  --name TEXT               New user name  [required]
  --role [plain|admin]      [default: plain]
  --blocked / --no-blocked  [default: no-blocked]
  --help                    Show this message and exit.
```


## Sequences

Tuple fields with fixed elements count turns into [multi value options](https://click.palletsprojects.com/en/8.0.x/options/#tuples-as-multi-value-options).

All other sequences (except `str`, of course) turns into [multiple options](https://click.palletsprojects.com/en/8.0.x/options/#multiple-options).


## Mappings

For now mappings turns into mix of [multi value](https://click.palletsprojects.com/en/8.0.x/options/#tuples-as-multi-value-options) and [multiple](https://click.palletsprojects.com/en/8.0.x/options/#multiple-options) options - every option contains key and value pair and can repeat.
Example:
```
$ python cli.py --dict-field key1 value1 --dict-field key2 value2
```
produce dict:
```python
{
    "key1": "value1",
    "key2": "value2",
}
```


## Unions

`Union` supports only same elements count, e.g. `Union[tuple[str, bool], tuple[str, int]]` are valid type, but `Union[tuple[str, bool], tuple[str]]` are not.
swc 0.7.2
Solar performance calculator

<img src="./docs/logo.png" alt="SWC" align="left" width="192px" height="192px"/>
<img align="left" width="0" height="192px" hspace="10"/>

#### SWC 
> Simplified solar performance simulator

[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![GitHub last commit](https://img.shields.io/github/last-commit/pesap/swc?style=flat-square)](https://github.com/pesap/swc/commits/main) [![Version](https://img.shields.io/github/v/tag/pesap/swc?style=flat-square)](https://img.shields.io/github/v/tag/pesap/swc?style=flat-square) [![PyPI](https://img.shields.io/pypi/v/swc?style=flat-square)](https://pypi.org/project/swc/)

<br/>


## Table of contents
* [About](#about)
* [Installation](#installation)
* [How to use](#howtouse)
    * [Configuration](#configuration)
    * [Solar radiation data](#solarradiationdata)
    * [SAM simulation](#samsimulation)
* [Authors](#authors)

## About

I made this code for my personal use. The code merges the NSRDB-API and the SAM-SDK in one easy code to simulate the performance
of a solar power plant at a given location. If you want to know more about the [SAM-SDK](https://sam.nrel.gov/sdk) or [NSRDB-API](https://nsrdb.nrel.gov/api-instructions) please visit their respective websites.


## Installations

To install using `pip`

```bash
pip install swc
```

To upgrade

```bash
pip install --upgrade swc
```

## How to use
Using the solar radiation data as input, we implemented an easy way to change the configuration parameters to simulate the performance of a PV system.


### Configuration

First you need to get an API. Read https://developer.nrel.gov/signup/. Once you have it, create a .env file under your working folder that includes:

```yaml
API_KEY=YOUR API_KEY_GOES_HERE
```

And thats it!

### Solar radiation data

To get solar radiation data from the NSRB from a Jupyter Notebook or Console

```python
import swc.nsrdb as nsrdb

# Define site dictionary
site_info = {
    "lat": 18.3,
    "lng": -99.3,
    "api_key": "YourAPIKEY",
    "force_download": False,
    "year": "2014",
}

# Download data
df = nsrdb.get_nsrdb_data(**site_info)
print(df.head())
```

### SAM simulation

To perform a SAM simulation using the data from the NSRDB

```python
import swc.sam_simulation as sam

# Define simulation params
simulation_params = {
    "lat": site_info["lat"],
    "lng": site_info["lng"],
    "losses": 4.3,
    "dc_ac_ratio": 1.2,
    "inv_eff": 96.0,
    "tilt": 20,
    "system_capacity": 100,
    "elevation": 1100,
    "timezone": -6,
    "configuration": 0,  #  0 For fixed tilt, 2 for 1-axis and 4 for 2-axis
    "gcr": 0.4,
    "azimuth": 100,
    "interval": 60,
}

# Run SAM simulation
output_data, output_params = sam.sam_simulation(df, **simulation_params)

print(output_data.head())
```


## Authors
* pesap
* Sergio Castellanos

---

## Todo

- [ ] Update the code to include more use cases.
helloworld-pucsp 0.0.1
Say hello

# Hello World

This is an example project demonstrating how to publish a python module to PyPI.

## Installation

Run the following to install:

```python
pip install helloworld_pucsp
```

## Usage

```python
from helloworld import say_hello

# Generate "Hello world!"
say_hello()

# Generate, "Hello Everybody"
say_hello("Everybody")
```

# Developing Hello World
To install helloworld, along with the tools you need to develop and run tests, run the following in your virtualenv:

```bash
$ pip install -e .[dev]
```
AirbnbScraper 0.0.1
A dynamic and scalable data pipeline from Airbnbs commercial site to your local system / cloud storage.
Requires Python: >=3.6

# Airbnb Scraper

A fully dynamic and scalable data pipeline made in Python dedicated to scraping Airbnb's commercial website for both alphanumeric and image data, and saving both locally and/or on the cloud.

## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install airbnbscraper.
```bash
pip install airbnbscraper
```

## Usage
```python
from airbnbscraer.Scraper import AirbnbScraper

scraper = AirbnbScraper()

# Returns a dictionary of structured data and a list of image sources for a single product page
product_dict, imgs = scraper.scrape_product_data('https://any/airbnb/product/page', any_ID, 'Any Category Name you wish')

# Returns a dataframe of product entries as well as a dictionary of image sources pertaining to each product entry
df, imgs = scraper.scrape_all()

```
## Docker Image 
This package has been containerised in a docker image where it can be run as an application. Please note that data can only be stored onto an SQL database or on the cloud by this method, not in local directories.
[Docker Image](https://hub.docker.com/r/docker4ldrich/airbnb-scraper)

```bash
docker pull docker4ldrich/airbnb-scraper

docker run -it docker4ldrich/airbnb-scraper
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
dchs220 0.0.2
Python API for D-Link S220 sirens
Requires Python: >=3.5

# DCH S220 Siren API

Python API for D-Link S220 sirens

**Useful links**

  * [Product page](https://eu.dlink.com/es/es/products/dch-s220-mydlink-home-siren)
  * [REST API in NodeJS](https://github.com/mtflud/DCH-S220-Web-Control)
SchinkenDB 1.0.0
This is my Database it is no gud and shouldn't be used lmao
Requires Python: >=3.6

# SchinkenDB
I made this DataBase just so I have made one this is not actually useful or fast   
and the code is no gud   
don't use under any circumstances!   
HA GAYYYYY

default and only user: admin   
default and only password: admin   
maybe in the future the user and password are changeable     

Host:
```python
from SchinkenDB import SchinkenHost

db = SchinkenHost("FileName.sdb")
db.run()
```
Client:
```python
from SchinkenDB import SchinkenClient

db = SchinkenClient("127.0.0.1", "admin", "admin")

print(db.set("t", "test"))
print(db.get("t"))
```
anslapi 1.0.1
Module for creating a simple API with AWS Lambda and API Gateway

# anslapi

A python3 module for creating a simple API with AWS Lambda and API Gateway.

## Install

```shell
python3 -m pip install anslapi
```

## Configuration

Create an api gateway with the methods that are needed, and set up authentication, schemas, etc. as wished. Create a Lambda function and configure our function as the target for each method. Use Lambda proxy mode.

## Usage example

```python
from anslapi import APIHandler

def get_user(userid):
  return "user.name@example.com"

def add(event):
  import json
  result = { 
    "status": "FAIL"
  }

  j = json.loads(event["body"])

  if "userid" in j:
    result["response"] = cls.get_user(j["userid"])
    result["status"] = "SUCCESS"
    return (200, result)

  else:
    result["reason"] = "Invalid request"
    return (400, result)  


def lambda_handler(event, context):
  ah = APIHandler()

  ah.add_handler('/add', 'POST',  Actions.add)
  
  response = ah.handle(event)
    
  return response

```
ststransformers 0.0.5
An easy-to-use wrapper library for using Transformers in Semantic Textual Similarity Tasks.
Requires Python: >=3.6

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Downloads](https://static.pepy.tech/badge/ststransformers)](https://pepy.tech/project/ststransformerst)

# STSTransformers : Transformer based Semantic Textual Similarity. 

STSTransformers provides state-of-the-art models for Semantic Textual Similarity.

## Installation
you first need to install PyTorch.
Please refer to [PyTorch installation page](https://pytorch.org/get-started/locally/#start-locally) regarding the specific install command for your platform.

When PyTorch has been installed, you can install from source by cloning the repository and running:

```bash
git clone https://github.com/TharinduDR/STS-Transformers.git
cd STS-Transformers
pip install -r requirements.txt
``` 

You can find the implementations in the examples folder.
imageobfuscator-SHANTIH19 1.0
Encode and decode data in an image using a password
Requires Python: >=3.6

# imageobfuscator.py

Encode and decode data in an image using a password

### Usage
    usage: Image Obfuscator [-h] [-d | -e] [-o [OUTPUT]] [-f] path seed [phrase]
    
    Encode and decode data in an image using a seed as a "password"
    
    positional arguments:
      path                  image path
      seed                  seed/password
      phrase                phrase to encode
    
    options:
      -h, --help            show this help message and exit
      -d, --decode          decode (default)
      -e, --encode          encode
      -o [OUTPUT], --output [OUTPUT]
                            output path
      -f, --file            phrase is a path to a file to encode

### Dependencies
- Python 3.x
- [Pillow](https://github.com/python-pillow/Pillow "Pillow")

### License

This program is distributed AS IS, with no guarantees, under [wtfpl](http://www.wtfpl.net/).