Saravanan666/pypi-org huggingface dataset:
Package: easy-dp
easy-dpThis library provides a simple way to implement differential privacy in PyTorch. The focus is only on supporting multi-gpu training with FSDP to allow for large models.Note: the code is heavily based onprivate-transformersInstallationpip install easy-dpUsagefrom easy_dp import PrivacyEngine

privacy_engine = PrivacyEngine(
    len_dataset=len(train_dataset),
    batch_size=batch_size,
    max_grad_norm=max_grad_norm,
    num_epochs=num_epochs,
    target_epsilon=target_epsilon,
    target_delta=target_delta,
)Compute the gradient of a single sample, then clip it:privacy_engine.clip_gradient(model.parameters())You can accumulate the gradients into a variable, for example here we use thesummed_clipped_gradientsattribute. Then add noise to the accumulated gradients and divide by the batch size before saving the gradients to the model parameters:for param in model.parameters():
    param.grad = privacy_engine.add_noise(param.summed_clipped_gradients)
    param.grad = param.grad / batch_sizeNow you can calloptimizer.step()to update the model parameters.Upload to PyPIpython -m build

twine upload dist/*
Package: easydrop
easydropEasily share files through AirDropwithout a Maceasydropis a simple cli utility for quick and easysending/receiving files with AirDrop onWindoza/Linux// Strikethrough words are stuff that doesn't work yet tho I would really want it toUsingMake sure you haveeverything requiredpip install -U easydropReceive files:$easydropreceive
sudopassword:# Password to manage network interfaces22:01:51Hangtight!DisablingnormalWiFi...# easydrop will disable your normal network when running22:01:52StartingOWL...22:01:54OWLrunning!22:01:55StartingHTTPserver-pressCTRL+Ctostop...
^C22:01:59StoppingOWL...22:01:59Restartingnetwork...# ...but will bring it back up after it's done!Aborted!Send files: not yet implemented :disappointed:CreditsThis is a very simple wrapper around much much bigger work of guys @seemoo-lab - it usesowlfor low-level AirDrop network layer as well asopendropfor some app level - HUGE shout-out for them for reverse enineering all of this!!!Supported hardware and platformsAs noted onowl repo, you need WiFi card that supportsactivemonitor mode - you can quickly check it by running:$iwlist|grep"active monitor"# You should see:>Devicesupportsactivemonitor(whichwillACKincomingframes)If you don't have it, then I'm sorry, but it probably won't work :disappointed:For now,easydroponly works on Linux (amd64 arch) (owlitself works on MacOS too, but you already have AirDrop there :laugh:)You will also need to installlibpcap,libevandlibnl:on Debian:sudo apt install libpcap-dev libev-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-devon Fedora:sudo dnf install libpcap-devel libev-devel libnl3-develon other distros: idk, you can do it :muscle:owlis already included in the package :wink:// TODO: Include those dependencies in packageTODO:Sending files - may require more work to alsoadvertise BLE beacons to wake up receiversWindoza
Package: easydsi
easyDSI 1.2.0Python Library makes it easy for users to code and run data structures & algorithms without having to summarize everything.Containsheap()min_heap()max_heap()queue()tree()binary_tree()binary_search_tree()Heapheap()orheap([list])- Creates a min heap.min_heap()ormin_heap([list])- Creates a min heap.max_heap()ormax_heap([list])- Creates a max heap.Methodsadd(element)- Add the element at the last position.remove()- Delete the element.get_max(n)- Get the n maximum elements from the heap.get_min(n)- Get the n minimum elements from the heap.display()- Display all the elements.get_elements()- Return all the elements.Queuequeue()orqueue([list])- Creates a queue.Methodsadd(element)- Add the element at the last position.add(position, element)- Add the element at the position you give.add_first()- Add the element at the first position.add_last()- Add the element at the last position.remove()- Delete the element from the first position.remove(position)- Delete the element from the position.remove_first()- Remove the element from the first position.remove_last()- Remove the element from the last position.index(position)- Get the element from the position.find(element)- Get the index of the element.display()- Display all the elements.get_elements()- Return all the elements.get_size()- Get the total number of elements.get_max()- Get the maximum element from the queue.get_min()- Get the minimum element from the queue.get_sum()- Get the sum of the elements from the queue.get_avg()- Get the average of the elements from the queue.reverse(inplace=False)- Reverse the queue.sort(desc=False, inplace=False)- Sort the queue.map(function, inplace=False)- Map all the elements to the function.Treetree()ortree([list])- Creates a binary tree.binary_tree()orbinary_tree([list])- Creates a binary tree.binary_search_tree()orbinary_search_tree([list])- Creates a binary search tree.Methodsadd(element)- Add the element.remove(value)- Delete the element with the value.get_elements()- Return all the elements.get_nodes()- Return all the nodes.display()- Display all the elements.inorder()- Return the in-order traversal of the tree.preorder()- Return the pre-order traversal of the tree.postorder()- Return the post-order traversal of the tree.levelorder()- Return the level-order traversal of the tree.get_size()- Get the total number of elements.get_height()- Return the height of the tree.get_properties()- Return the properties of the tree.How to installOpen your command prompt and enter the below command.pip install easydsiHow to useImport the library in your project.importeasydsiasdsiInitialize the data structure.queue=dsi.queue([1,2,3])queue.display()[1, 2, 3]Add an element.queue.add(4)queue.display()[1, 2, 3, 4]Remove an element.queue.remove()queue.display()[1, 2, 3]Change Log1.2.1 (13/09/2022)New Features:Binary TreeBinary Search TreeMin HeapMax Heap
Package: easyeasy
easyeasy.clientHow to useInstallpip install easyeasyInitializefromeasyeasy.clientimportClientclient=Client("bc420813-17d9-47fa-9d29-8bd6a1207f8a")ExamplesclassCat:def__init__(self):self.id=Noneself.name=Noneself.interests=[]self.age=Nonecat=Cat()cat.name="Sam"cat.age=1.5cat.interests=["play","eat","discover"]# add object. entity name will be inferred from class nameid=client.add(cat)# or specify entity name explicitlyid=client.add(cat,"cat")# get one object by id. Specify entity type. Entity name will be inferredcat=client.get_one(id,Cat)# or specify entity name explicitlycat=client.get_one(id,Cat,"cat")# at least one should be specified(entity_class or entity_name). In case entity_class not specified, dict object will be returned# update objectcat.age=2.0cat.interests=["eat","sleep","play"]# object must have id property to distinguish which object is being updated. entity_name can be specified explicitlyclient.update(cat)# get all objects. entity_name can be specified explicitlycats_collection=client.get(Cat)# filteringcats_collection=client.get(Cat,query={'age':1.5})# get 1.5 years old catscats_collection=client.get(Cat,query={'age_gt':1.0})# cats older than 1 yearcats_collection=client.get(Cat,query={"name_like":"Sa*"})# wildcard# pagingcats_collection=client.get(Cat,query={"_start":"10","_count":10})# orderingcats_collection=client.get(Cat,query={"_orderby":"age"})cats_collection=client.get(Cat,query={"_orderbydesc":"age"})# learn more about filtering operators at: http://easyeasy.io/docs#/operators# delete object by idclient.delete(cat.id,Cat)LicenceISC
Package: easyebay
Easy eBayA library for scraping items from eBayTo begin withHere is a sample codeExample 1importeasyebayresult=easyebay.search(keyword="4090",pageNum="1",maxPrice="1000",minPrice="500",conditions=[easyebay.condition.used])parsed=easyebay.parseSearch(result)foriteminparsed:print(item.title,item.price,item.shipping,item.url)Here's a sample outputYASKAWA CDBR-4090B B... $989.99 None https://www.ebay...
LOT OF 5 Motorola RS... $769.69 None https://www.ebay...
MELLTRONICS 222-4090... $750.00 None https://www.ebay...
...easyebay.searchreturns the html, and easyebay.parseSearch returnseasyebay.itemobject. This is the definition of
item objectclassitem():title:strcondition:strprice:strseller:listshipping:strreturns:strsold:strurl:strimage:str
Package: easyecs
EasyECSEasyECS is an innovative container deployment tool designed to streamline the process of launching containers within the Amazon Web Services (AWS) Elastic Container Service (ECS) Fargate. With its user-friendly interface and automated workflows, EasyECS empowers developers to efficiently manage containerized applications on the AWS cloud platform. This tool is similar to what skaffold can be in Kubernetes environment.DemonstrationFeaturesCreate a CloudFormation Stack on AWS.Create port forwarding between you and the task.Build and push docker image on the fly.An easy configuration file.Manage IAM permissions via configuration file.Synchronize file between the host and the remote containers.Send input to the container.Let the task run in the background.How to installpip install easyecsDependenciesNodeJS needs to be installed on your machine for AWS CDK to work.How to useUsage: easyecs [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  delete  Delete a stack
  dev     Run a stack in development mode
  run     Run a stackSample configurationmetadata:
  appname: "helloworld"
role:
  managed_policies: []
  statements:
    - sid: "ssmactions"
      resources: ["*"]
      actions: ["ssmmessages:CreateControlChannel", "ssmmessages:CreateDataChannel", "ssmmessages:OpenControlChannel", "ssmmessages:OpenDataChannel", "secretsmanager:*"]
      effect: "Allow"
execution_role:
  managed_policies: ["service-role/AmazonECSTaskExecutionRolePolicy", "AmazonEC2ContainerRegistryReadOnly"]
  statements:
    - sid: "secretmanageractions"
      resources: ["*"]
      actions: ["secretsmanager:GetSecretValue"]
      effect: "Allow"
    - sid: "s3actions"
      resources: ["*"]
      actions: ["s3:*"]
      effect: "Allow"
task_definition:
  resources:
    limits:
      cpu: 2
      memory: 4096
  containers:
    - name: helloworld
      image: docker.io/library/debian
      user: root
      tty: true
      command: "/bin/bash"
      resources:
        limits:
          cpu: 1
          memory: 2048
      volumes:
        - "./easyecs:/root/easyecs"
        - "./ecs.yml:/root/ecs.yml"
      port_forward:
        - "8000:8000"
      env: []
      secrets: []
Package: easyeda
1，IntroductionThe easyeda is a simple but useful tool to do Exploratory Data Analysis in Machine Learning.
It can be used in both classification task and regression task.2，Use ExampleFirst, you can use pip to install easyeda.pipinstalleasyedaThen, you can use it like below.fromeasyedaimportedaimportpandasaspdfromsklearnimportdatasetsfromsklearn.model_selectionimporttrain_test_split##boston=datasets.load_boston()df=pd.DataFrame(boston.data,columns=boston.feature_names)df["label"]=boston.targetdftrain,dftest=train_test_split(df,test_size=0.3)dfeda=eda(dftrain,dftest,language="Chinese")3，Contact to the authorGithub:https://github.com/lyhue1991/easyedaEmail:lyhue1991@163.com
Package: easyeda-python-sdk
easyeda-python-sdkPython tools & design framework for EasyEDAInstallpipinstalleasyeda-python-sdkExamplefromeasyedaimportPCB,Pointpcb=PCB()pcb.BOARD_OUTLINE_LAYER.add_rectangle(width=1000,height=500,corner_radius=50)pcb.DOCUMENT_LAYER.add_text("Hello from easyeda-python-sdk",font_size=40,font_width=4,position=Point(-500,300))forpin[Point(-430,180),Point(430,180),Point(-430,-180),Point(430,-180)]:pcb.add_hole(80,center=p)print(pcb)
Package: easyEEG
# Overview
EasyEEG provides simple, flexible and powerful methods that can be used to directly test neural and psychological hypotheses based on topographic responses. These multivariate methods can investigate effects in the dimensions of response magnitude and topographic patterns separately using data in the sensor space, therefore enable assessing neural sources and its dynamics without sophisticated localization. Python based algorithms provide concise and extendable features of EasyEEG. Users of all levels can benefit from EasyEEG and obtain a straightforward solution to efficiently handle and process EEG data and a complete pipeline from raw data to publication.—
## Documentation
Seehttp://easyeeg.readthedocs.io/en/latest/for introduction, tutorials, and reference manual.—
# Installation instructionsEasyEEG has been tested on Python3.X 64bit.
(Current it might be unfit for older versions like Python2.7. But since Python2 will become obsolete in the years to come, why not drop it anyaway and take Python3 instead?)The simplest way to install EasyEEG is through the Python Package Index (PyPI), which ensures that all required dependencies are established. This can be achieved by executing the following command:` pip install easyEEG `or:` sudo pip install easyEEG `###*Required Dependencies*numpypandasscipymatplotlibstatsmodelsseabornmnepermutetqdm
Package: easy-elasticsearch
Easy ElasticsearchThis repository contains a high-level encapsulation for usingElasticsearchwith python in just a few lines.InstallationVia pip:pipinstalleasy-elasticsearchVia git repo:gitclonehttps://github.com/kwang2049/easy-elasticsearch
pipinstall-e.UsageTo utilize the elasticsearch service, one can select from 3 ways:(1) Start an ES service manually and then indicate thehostandport_http(please refere todownload_and_run.sh);(2) Or leavehost=Noneby default to start a docker container itself;(3) Or leavahost=Noneand settingservice_type=executableto download an ES executable and start it in the back end.Finally, just either call itsrankorscorefunction for retrieval or calculating BM25 scores.fromeasy_elasticsearchimportElasticSearchBM25pool={'id1':'What is Python? Is it a programming language','id2':'Which Python version is the best?','id3':'Using easy-elasticsearch in Python is really convenient!'}bm25=ElasticSearchBM25(pool,port_http='9222',port_tcp='9333')# By default, when `host=None` and `mode="docker"`, a ES docker container will be started at localhost.query="What is Python?"rank=bm25.query(query,topk=10)# topk should be <= 10000scores=bm25.score(query,document_ids=['id2','id3'])print(query,rank,scores)bm25.delete_index()# delete the one-trial index named 'one_trial'bm25.delete_container()# remove the docker container'Another example for retrieving Quora questions can be found ineasy_elasticsearch/examples/quora.py:python-measy_elasticsearch.examples.quora--modedockerorpython-measy_elasticsearch.examples.quora--modeexecutable
Package: easyemail
Small lib abstracting creation and sending emails with smtplib. This is work in
progress, please do not use it in production.WARNINGFrom version 0.3 and up I stopped supporting template rendering inside of the
library. Now you need to render html / text on your side and use attach_text.InstallationInstall with pip:$ pip install easyemailTestingTo run tests, you’ll needmakoandjinja2libraries that are not included
in requirements in normal setup.You can run tests that way:$ python setup.py testIssues and questionsHave a bug? Please create an issue on GitHub!https://github.com/niktto/easyemail/issuesContributingEasyEmail is an open source software and your contribution is very much
appreciated.Check for
open issueshttps://github.com/niktto/easyemail/issuesor
open a fresh issuehttps://github.com/niktto/easyemail/issues/newto start a discussion around a feature idea or a bug.Fork the
repository on Githubhttps://github.com/niktto/easyemailand make your changes.Follow these rules: PEP8, PEP257 and The
Zen of Python.Make sure to add yourself to AUTHORS and send a pull request.LicenceEasyEmail is available under the New BSD License. See
LICENSEhttps://github.com/niktto/easyemail/blob/master/LICENSEfile.
Package: easyenc
EasyEnc, encryption module made for Python.EasyEnc is a quick, light and easy module made for Python, to ease your encryption needs.Installation InstructionsInstalling this module is as easy as advertised:Method 1:
You can runpip install easyencin your CMD/Terminal to download and install it
directly from PyPI (Python Package Index).Method 2:
You can download the source code from this repository and after that, runningpip install "the/path/to/the/downloaded/repo"in your CMD/Terminal and you're done!Usage and PrerequisitesOnly requirement this module asks for is the Cryptography module which you can install withpip install cryptographyTo use this module, open up a new Python file and typefrom EasyEnc import KeyGenerator, EncryptorFrom there, you can create instances of these classes and use the functions inside them, like:kg = KeyGenerator()
e = Encryptor()

key = kg.generate_key("foobar")
super_top_secret_message = e.encrypt_message("deep dark secret", key)

print(super_top_secret_message)Don't worry you can also decrypt it! But to find out more about it, you can open up a Python Shell and type:from EasyEnc.classes import KeyGenerator, Encryptorand then:help(KeyGenerator)orhelp(Encryptor)and Python will display all the available functions along with some documentation included in the source code!Bugs and IssuesIf you encounter any bugs with the module, feel free to send me a message on Discord @saint#5622, or email me aterick.8bld@gmail.com
Package: easyencrypt
Easy EncryptionSource:https://github.com/WKHAllen/easyencryptContentsHashing, symmetric encryption, and public/private key encryption functions.DependenciescryptographyrsaInstallationpip install easyencryptExample>>># hashing>>>fromeasyencryptimportnewSalt,hashText>>>newSalt()b"b\xa3\x1c\xf5Y\xe2;\xb9\xa6\xaeUz\xde\x88\x07\xfe'\xc9\xaa\x96\xdfBh\xc9\xf9\x04\xb26\xff\xa9zJ\x17\xd5\x01n\xfeV\xa7$\xa8`G\xfd\r]\x8a`\xeaL4\x02{\xd6\x9b\xb3\xa9\xd9\x89\x18;\xec\xab\x83">>>message="Hello, World!">>>hashText(message,algorithm="sha256")b'\xdf\xfd`!\xbb+\xd5\xb0\xafgb\x90\x80\x9e\xc3\xa51\x91\xdd\x81\xc7\xf7\nK(h\x8a6!\x82\x98o'>>># symmetric encryption/decryption>>>fromeasyencryptimportnewKey,passwordToKey,symmetricEncrypt,symmetricDecrypt>>>newKey()b'1h8_Z3LcL55r3ljklF_1fhKWy122zqDYWAJyQEZaKlA='>>>password="password123">>>key=passwordToKey(password)>>>keyb'75K3eLr-dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8='>>>ciphertext=symmetricEncrypt(message,key)>>>ciphertextb"\x80\x00\x00\x00\x00[B?\xe7\xbb\x825s\xff\xf3\x92AX|$\xf5\x19\x16\xe7f\x98\x8cgND\xf8\xdf\xd4Q\x00Y\xe5v\xb9\x0e\xa0\xa0\xb8\x05\x87N\xe6\x19h\x93K\xa9\xdb\x11\xef%V\xc2\xb1'\xa4;\xb8\xaf\xd2[\xdc\xb2\xae\xea\xca\xa4z">>>symmetricDecrypt(ciphertext,key)b'Hello, World!'>>># public/private key encryption/decryption>>>fromeasyencryptimportnewKeyPair,encrypt,decrypt>>>pub,priv=newKeyPair()>>>ciphertext=encrypt(message,pub)>>>ciphertextb"\x01@H\x16\xe5\x01\xc0\x02)\x13\x8e\xba\xbb{p_5t\xf1\x81\x18y2\x12=t\xfe\xeb(\xcf\xce\xdd\xbd'\xb2\xddS\xbd\x0e\xc3\xf5\x0b-\xd8{\xe3W\xd5\xe8)_\xa8\xfb\x11\x8d\xb2\xb0l\x04\xf2>\xd9`\x0cS\xb9">>>decrypt(ciphertext,priv)b'Hello, World!'
Package: easyencryption
In Progress...We offer a simple way to encrypt data. We have 3 different ways of doing this.Fernet - Cryptographys algorithm that contains "symmetric ciphers, message digests, and key derivation functions" (pypi.org), this is pretty basic encryption.AES256 - It is the "current encryption standard" (idera.com), it can slow down slower processors but should be fine on most systems.RSA - It uses a pair of keys (public and private) to encrypt data. It encrypts the data with the public key, but the data can only be unencrypted with the private key.SHA - Secure Hash Algorithm, used for cryptographic security. Cryptographic hash algorithms produce irreversible and unique hashes. The larger the number of possible hashes, the smaller the chance that two values will create the same hash. The higher number sha means more unique hashes.ECC - Elliptic-curve cryptography is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields.
XOR - XOR algorithm of encryption and decryption converts the plain text in the format ASCII bytes and uses XOR procedure to convert it to a specified byte.
Custom - A custom Ascii scrambler that I made. It is not the most secure so I wouldn't recommend using it alone, but using it in combination with some other methods provided by this package removes the possibility of the same thing being created.WARNINGThis cannot be used in combination with SHA hashing because of the checking methods.This is a very simple library that I made for one of my projects, so there might be bugs please report these in the github issues. Although it might be simple it is pretty powerful.WARNINGDon't delete the .key files or you cant unencrypt the data that you have encrypted with that key.InformationDownloads
Package: easy-enum
User friendly implementation of documentedEnumtype for Python
language.Installation$pipinstalleasy_enumTo install the latest version from master branch execute in shell
following commands:$pipinstall-Uhttps://github.com/molejar/pyEnum/archive/master.zipIn case of development, install pyEnum from sources:$gitclonehttps://github.com/molejar/pyEnum.git$cdpyEnum$pipinstall-U-e.You may run into a permissions issues running these commands. Here are a
few options how to fix it:Run withsudoto install pyEnum and dependencies globallySpecify the--useroption to install locally into your home
directory (export “~/.local/bin” into PATH variable if haven’t).Run the command in avirtualenvlocal to a
specific project working set.UsageFollowing example is showing how easy you can use this Enum in your
code:fromeasy_enumimportEnumclassTestEnum(Enum):# attribute with no description, the name will be 'FIRST_ITEM' and empty string as descriptionFIRST_ITEM=1# attribute with descriptionSECOND_ITEM=(2,'Description for second item')# attribute with description and custom string nameTHIRD_ITEM=(3,'third','Description for third item')# attribute with custom string name (the description must be specified as empty string)FOURTH_ITEM=(4,'fourth','')# Read attributes value and nameprint(TestEnum.SECOND_ITEM)# 2print(TestEnum['FIRST_ITEM'])# 1print(TestEnum[1])# 'FIRST_ITEM'print(TestEnum[3])# 'third'print(TestEnum['third'])# 3# Use get method with default value if want skip exceptionprint(TestEnum.get(8))# Noneprint(TestEnum.get('eight'))# Noneprint(TestEnum.get(8,'eight'))# 'eight'# Check if exist attribute with specific valueprint(1inTestEnum)# Trueprint(8inTestEnum)# False# Check if exist attribute with specific nameprint('first'inTestEnum)# Falseprint('third'inTestEnum)# True# Get attribute description (as parameter use attribute name or value)print(TestEnum.desc(1))# ''print(TestEnum.desc(2))# 'Description for second item'print(TestEnum.desc('third'))# 'Description for third item'# Get count of all attributesprint(len(TestEnum))# 4# Get list with all attributes namenames=[item[0]foriteminTestEnum]print(names)# ['FIRST_ITEM', 'SECOND_ITEM', 'third', 'fourth']# Get list with all attributes valuevalues=[item[1]foriteminTestEnum]print(values)# [1, 2, 3, 4]# Read all itemsforname,value,descinTestEnum:print('{}={}({})'.format(name,value,desc))