semvec/pypi-packages huggingface dataset:
FPE 0.1.2
Format Preserving Encryption with FF1 and FF3-1
License: MIT
Requires Python: >=3.7

# Installation

This library uses PyCryptodome which means a C compiler is required.
For Mac and Linux users this is already installed. For Windows users please
follow this guide from PyCryptoDome.

https://pycryptodome.readthedocs.io/en/latest/src/installation.html#windows-from-sources

# Usage

The libray is imported as `from FPE import FPE`.

To generate a tweak use `FPE.generate_tweak(tweak_length)` where tweak_len is the
length of the tweak in bytes. Note that for FF3-1 the tweak_length must be 7 bytes.

To generate a key use `FPE.generate_key()`, this will generate a 16 byte key.

To make a cipher object use `cipher = FPE.New(key,tweak,mode)`

Currently supported modes are `Mode.FF1` and `Mode.FF3-1`

To encrypt use `cipher.encrypt(plaintext,format)`

Currently supported formats are:

`Format.DIGITS`\
`Format.CREDITCARD`\
`Format.LETTERS`\
`Format.STRING`\
`Format.EMAIL`\
`Format.CPR`

to decrypt use `cipher.decrypt(ciphertext,format)`

The library also supports CSV files

To encrypt a csv file use `cipher.encryptCSV(InputFilePath,OutputFilePath,formats)`
where formats is a list of formats sorted by the columns

To decrypt a csv file use `cipher.decryptCSV(InputFilePath,OutputFilePath,formats)`

to generate a random CSV file with certain formats use 
`cipher.generateData(OutputFilePath,rows,formats,variables)` where rows
define the number of rows in the CSV file. Formats is the lists of formats
to use. Variables is the list of variable names used for the first row.

# Examples

Example of encrypting and decrypting "123456" as `DIGITS` and printing the output

```Python
from FPE import FPE

if __name__ == '__main__':

	T = FPE.generate_tweak(8)
	
	key = FPE.generate_key()
	
	cipher = FPE.New(key,T,FPE.Mode.FF1)
	
	ciphertext = cipher.encrypt('123456',FPE.Format.DIGITS)
	
	print(ciphertext)
	
	plaintext = cipher.decrypt(ciphertext,FPE.Format.DIGITS)
	
	print(plaintext)
```

Example of generating, encrypting and decrypting a 1000 row CSV file

```Python
from FPE import FPE, Format

variables = [
	'Username','Password','Email','PhoneNumber','Cpr-number',
	'Creditcard','adress','city','zip','country'
]


formats = [
	Format.LETTERS, Format.STRING, Format.EMAIL, Format.DIGITS,
	Format.CPR, Format.CREDITCARD,Format.STRING,Format.LETTERS,
	Format.DIGITS,Format.LETTERS
]

if __name__ == '__main__':
	
	T = FPE.generate_tweak(7)
	key = FPE.generate_key()
	cipher = FPE.New(key,T,FPE.Mode.FF3)
	cipher.generateData('testData.csv',1000,formats,variables)
	cipher.encryptCSV('testData.csv','encryptedData.csv',formats)
	cipher.decryptCSV('encryptedData.csv','decryptedData.csv',formats)

```
django-pay2 2.1.0
Интеграция платежных систем для Django
License: MIT
Requires Python: >=3.9,<3.10

=============================
DjangoPay2
=============================

.. image:: https://travis-ci.org/la1t/django_pay2.svg?branch=master
    :target: https://travis-ci.org/la1t/django_pay2

Интеграция платежных систем для Django

Quickstart
----------

Установите DjangoPay2::

    pip install django_pay2

Добавьте приложение в `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'django_pay2',
        ...
    )

Добавьте Django Pay's URLы в urlpatterns:

.. code-block:: python


    urlpatterns = [
        ...
        path('payments/', include('django_pay2.urls')),
        ...
    ]

Платежи
-----------------

Любой платеж создается методом create_<название-платежной-системы>_payment. Метод возвращает объект типа PaymentMethod. Существует два типа
PaymentMethod — PaymentForm и RedirectMethod. Первый должен сериализовываться и отправляться на front. Второй можно либо также сериализовать
и отправить на фронт, либо возвратить редирект.

Так же метод создает объект типа Payment. Эта модель отвечает за сохранение информации о платеже, а так же об объекте-инициаторе платежа.
После успешной оплаты он отправляет сигнал `payment_received` привязанному объекту.

TODO
--------

- [*] Сериализаторы для PaymentForm и RedirectMethod
- [ ] Интеграция с free_kassa
- [ ] `handle_form_debug` проверяет, что ему пришла валидная форма
- [*] Переписывание тестов на pytest
- [ ] Инструкция по написанию собственных провайдеров
- [ ] Инструкция по добавлению и настройке каждого провайдера
- [ ] Более подробная инструкция по использованию
- [*] Инструкция по увеличению версии


Разработка
----------

Установка development зависимостей

::
  pip install -r requirements_dev.txt

Запуск тестов

::
  tox

Выпуск
--------

1. Установить новую версию в `pyproject.toml' и `__init__.py` файлах
2. `poetry publish --build`
bianary-decision-parameter 0.2
bianary_classification
License: MIT
Keywords: decision

this module is used to find out best parameters of desision tree.
![Markdown Logo](https://github.com/mainak-cmd/All-Ml/blob/main/flow_chart.drawio.png)

#Bianary_classification

##Aim
The module aims to create a library that will help users to build trees that can help classify binary classes easily. But, it is essential to note that this module should be used after the process (cleaning, transformation, and reduction) of the data.

##Advantages
1.)Autopruneing the tree no need to hyperparameter tuneing
2.)very easy to use.
3.) Brier score to evaluate to find out best paraameter as  is that it is focused on the positive class, which for imbalanced classification is the minority class. A perfect classifier has a Brier score of 0.0.

##Limitation
1.) Preprocessing must requires.
2.) do not shows good perfformance for high dimentional data ,feature reduction before use this module is adviceable.
3.)little time consumeing.


##code example : 
```python
import bianary_decision_parameter
from bianary_decision_parameter import 
from sklearn import preprocessing
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
Load breast_cancer dataset
split it into train and test set
da=load_breast_cancer()
X1=da.data
y1=da.target
scaled_X_1 = preprocessing.scale(X1)
X_train1, X_test1, y_train1, y_test1 = train_test_split(scaled_X_1, y1,test_size=0.3)
p2=bianary_decision_parameter('auto',X_train1,y_train1, X_test1, y_test1,1,1)
p3=bianary_decision_parameter('sqrt',X_train1,y_train1, X_test1, y_test1,1,10) 
p4=bianary_decision_parameter('log2',X_train1,y_train1, X_test1, y_test1,1,10)

p2.parameter()

	accuracy_score  missclassification 	specificity 	Recall 	precision 	depth 	ccp_alpha 	max_features
     0 	        0.912281 	0.087719 	0.912281 	0.83871 	0.912281 	2 	0.004307 	auto
```
## Explanation
p2=bianary_decision_parameter('auto',X_train1,y_train1, X_test1, y_test1,1,1)
Feature_selection = 'auto' \n
class_weight = 0_class ,1_class