semvec/pypi-packages huggingface dataset:
polars-typed 0.1.0
Type hints for schemas of polars data frames
Requires Python: >=3.12

# Polars-typed

Let your static type checker help you remember which columns are present in your dataframe, and which types they (should) have!

## Why polars-typed?

* Static schema validation. No more typos in string column names.
* Autocomplete on the available columns of you dataframe!
* Catch schema errors before your code hits prod. Yes you wrote a unit test but you hardcoded some naive datetimes in the test data, and now it turns out your data lake is serving datetimes with time zones, causing exceptions in production. `polars-typed` forces you to think about this ahead of release, so the problem never reaches prod.

### What about alternatives?

What about `pandera`? Pandera does data validation, but _not_ schema validation. `polars-typed` does schema validation, _not_ data validation.

What about `poldantic`? Poldantic does not integrate with static type checkers. `polars-typed` aims to prevent a whole class of problems from ever reaching the first unit test (or prod..) by letting you validate all your data transforms with a single `pyright` call, or live diagnostics if you have a type checker configured in your IDE.


### statically enforced, runtime-checked schemas for dataframes

Mypy/pyright/ty reminds you to add schema validation, and tells you what schema you can expect from a function.
The actual data validation happens at runtime.

Schemas offer two modes of validation:

`DataFrameSchema.validate` performs strict validation, failing if the schema is not exactly as specified.
`DataFrameSchema.coerce` attempts to coerce before validation, so unnecessary columns are dropped and columns can be reordered. Optionally datatypes are cast (as long as this can be done without loss of information; casting 12345 to `pl.Int8` will fail).

A `DataFrameSchema` _must_ specify each column using `polars.DataType` types; any other type (eg `str` or `int`) will result in a type error.

Both `DataFrame`s and `LazyFrame`s are supported. Note that validation on `LazyFrame`s is potentially expensive.

```python
import polars as pl
from polars_typed import Column, DataFrame, DataFrameSchema

class TestSchema(DataFrameSchema):
    foo = Column(pl.Boolean)
    # Some polars datatypes carry metadata on the object level instead of the type level.
    # For that reason it is necessary to assign (=) the columns, instead of defining them through type annotations (:)
    bar = Column(pl.Datetime(time_unit="us", time_zone=None))

def typed_function(df: DataFrame[TestSchema]) -> DataFrame[TestSchema]:
    df_untyped = df.filter(pl.col("foo"))
    # return df_untyped # mypy/pyright/ty complains
    return TestSchema.validate(df_untyped) # mypy/pyright/ty is happy

untyped_df = pl.DataFrame({"foo":[False], "bar":1})

typed_function(untyped_df) # mypy/pyright/ty complains
typed_df = typed_function(TestSchema.validate(untyped_df)) # mypy/pyright/ty is happy

# the Column wrapper type lets us use the schema as an enum of column identifiers as well
typed_df.select(TestSchema.foo)
  ```
itd-iter-api 2.3.0
ITD client for python
Requires Python: >=3.9

# pyClient
Клиент ITD для python


## Установка

```bash
pip install itd-iter-api
```

## Пример

```python
from iter import Client

c = Client() # вход через встроенный браузер или из файла
c = Client(email='mail@example.com', password='1234') # вход через встроенный браузер и автозаполнение или из файла
c = Client(token='afvrc...', cookies='refresh_token=...;__ddg1=...; ...') # вход используя токен и куки или из файла
c = Client(use_manual_login=False) # можно отключить вход через браузер
c = Client(session_file='session.jsoon') # файл сессии с токеном и куки

print(c.get_me())
```

---
### Скрипт на обновление имени
Этот код сейчас работает на @itd_sdk (обновляется имя и пост)
```python
from itd import Client
from time import sleep
from random import randint
from datetime import datetime
from datetime import timezone

c = Client(None, '...')

while True:
    c.update_profile(display_name=f'PYTHON ITD SDK | Рандом: {randint(1, 100)} | {datetime.now().strftime("%m.%d %H:%M:%S")}')
    sleep(1)
```

### Скрипт на смену баннера
```python
from itd import Client

c = Client(None, '...')

id = c.upload_file('любое-имя.png', open('реальное-имя-файла.png', 'rb'))['id']
c.update_profile(banner_id=id)
print('баннер обновлен')

```

### Встроенные запросы
Существуют встроенные эндпоинты для комментариев, хэштэгов, уведомлений, постов, репортов, поиска, пользователей, итд.
```python
c.get_user('ITD_API') # получение данных пользователя
c.get_me() # получение своих данных (me)
c.update_profile(display_name='22:26') # изменение данных профиля, например имя, био итд
c.create_post('тест1') # создание постов
# итд
```

### Кастомные запросы

```python
from iter.request import fetch

fetch(c.token, 'метод', 'эндпоинт', {'данные': 'данные'})
```
Из методов поддерживается `get`, `post`, `put` итд, которые есть в `requests`
К названию эндпоинта добавляется домен итд и `api`, то есть в этом примере отпарвится `https://xn--d1ah4a.com/api/эндпоинт`.

> [!NOTE]
> `xn--d1ah4a.com` - punycode от "итд.com"
topsis-neeraj-102317014-tiet 1.0.3
A Python package for TOPSIS calculation

# TOPSIS-Python Package

**Author:** Neeraj  
**Roll Number:** 102317014

---

## What is TOPSIS?
**T**echnique for **O**rder of **P**reference by **S**imilarity to **I**deal **S**olution (TOPSIS) is a multi-criteria decision analysis method. It is based on the concept that the chosen alternative should have the shortest geometric distance from the positive ideal solution (PIS) and the longest geometric distance from the negative ideal solution (NIS).

---

## Installation
You can install the package using pip:
pip install Topsis-Neeraj-102317014

---

## Example Usage
topsis data.xlsx "1,1,1,2" "+,+,-,+" result.xlsx

---

## Input File Format
The input file must:

Be a .xlsx file.
Contain at least 3 columns.
The first column should contain the object/alternative names (e.g.,M1,M2,M3).
From the 2nd column onwards, all values must be numeric.

---

## Output
The output will be a excel file containing all the original data, plus two additional columns:

Topsis Score: The calculated preference score.
Rank: The final ranking of the alternatives.

---