Saravanan666/pypi-org huggingface dataset:
Package: ez-spotify-dl
Don’t you think would be cool if you could donwload your playlists from your Spotify account, do you?
So, theEz Spotify DLcan do that for you. Plus, in an easy way.## InstallAssuming that you havepipinstalled, open the console/terminal execute:`bash $ pip installez-spotify-dl`use –user flag if you don’t want to install on system-wide mode`bash $ pip install--userez-spotify-dl`or download/clone the package, go to project folder and`bash $ python setup.py install `as the same as using pip you can insert the –user flag`bash $ python setup.py install--user`## Usage1 - Getting Spotify’s api authorization.`bash $ spotify_dl--authorize`HINT:At this moment you will be guided byEz Spotify DL, just follow the interactive instructions that will appear to you. So, you don’t need to follow this usage guide if you don’t wanna. I really think thatEz Spotify DLinteractive instructions are enough.
Well, it’s up to you.2 - Insert your Spotify username.3 - Open your web browser and go tohttp://localhost:5000.4 - Authenticate.5 - Go back to terminal where you started theEz Spotify DLand press CTRL+C.6 - Execute:`bash $ spotify_dl-d<path_where_you_want_download_your_playlists> `7 - Wait your playlists get downloaded.WARNING:Make sure you are creating playlists containing at maximum 100 tracks.
It’s due Spotify API limits at 100 the amount of tracks returned per playlist.For more information execute:`bash $ spotify_dl-h`That’s all.
Package: ezsqlite
EZSQLITEUse SQLite3 without knowing SQLHow to Install :$pipinstallezsqliteHow to Use :fromezsqliteimportDatabasedb=Database('File.db','users')users=db.slctall()user=db.select(id='test')db.update({'id':'test'},{'id':'example'})db.insert('text','ex','ample')db.delete(id='test')
Package: ezstat
Ezstat: Easy statisticsOO For easy statistics, inspired byStatisticsclass ofdeapIt is really easy and awesome! Believe me!Introductionezstatis built for easy statistics, esp. for the history of iterations.StatisticsThe main classStatisticsjust extendsdict{str:function}(called statistics dict), function here will act on the object of statistics. The values of dict have not to be a function, if it is a string, then the object of method with the same name is applied.Frankly, It just borrows the idea from theStatisticsclass ofdeap. But unlike the author of deap, I just create it a subclass of dict, need not define strange methods.See the following example and function_call, the underlying implementation.ExamplesExample:>>>importnumpyasnp>>>T=np.random.random((100,100))# samples(one hundrand 100D samples)>>>stat=Statistics({'mean':np.mean,'max':'max','shape':'shape'})# create statistics>>>print(stat(T))>>>{'mean':0.5009150557686407,'max':0.5748552862392957,'shape':(100,100)}>>>print(stat(T,split=True))# split the tuple if it needs>>>{mean': 0.5009150557686407, 'max': 0.5748552862392957, 'shape[0]': 100, 'shape[1]': 100}# with sub-statisticss=Statistics({'mean':np.mean,'extreme':{'max':'max','min':np.min},# as a sub-statistics'shape':'shape'})print(s(X))# dict-valued statistics, equivalent to the aboves=Statistics({'mean':np.mean,'extreme':lambdax:{'max':np.max(x),'min':np.min(x)},'shape':'shape'})print(s(X))#Result: {'mean': 0.49786554518848564, 'extreme[max]': 0.9999761647791217, 'extreme[min]': 0.0001368184546896023, 'shape': (100, 100)}MappingStatisticsMappingStatisticsis a subclass ofStatistics. It only copes with iterable object, and maps the obect to an array by funcional attributekey.Example:>>>stat=MappingStatistics(key='mean',{'mean':np.mean,'max':np.max})>>>print(stat(T))>>>{'mean':0.5009150557686407,'max':0.5748552862392957}In the exmaple, 'mean', an attribute of T, maps T to a 1D array.Advanced UsageStatisticsacts on a list/tuple of objects iteratively, gets a series of results,
forming an object ofpandas.DataFrame. In fact, it is insprited byStatisticsclass of third part libdeap. In some case, it collects a list of dicts of the statistics result for a series of objects. It is suggested to transform to DataFrame object.history=pd.DataFrame(columns=stat.keys())forobjinobjs:history=history.append(stat(obj),ignore_index=True)To DoTo define tuple of functions for the value of statistics dict.
Package: ezstdf
ezstdfezstdf is a python package for parsing "Standard Test Data Format" files with a focus on speed.
Parse a STDF file with thousands of records in less than a second.Installationpip install --upgrade ezstdfDependenciespandas (required)FeaturesCan read STDF (binary, V4) and ATDF (clear text, V2) filesMost record types are supported, unsupported ones are skipped for nowConvert records to Pandas data framesExport to Excel file (requires openpyxl)Auto-detection of endiannessFast and easy to useExamplesParse a file:fromezstdf.StdfReaderimportStdfReaderstdf=StdfReader()stdf.parse_file("../sample_files/sample.atdf")# each record type can now be accessed as a data frame# example: access the File Attributes Record (FAR)df_far=stdf.farprint(df_far)Export as Excel. Each sheet is a difference record, and each row a sub-record.stdf.to_excel("test.xlsx")Historyv0.0.1: initial releasev0.0.2: fixed meta info in pypiv0.0.3:better tolerance to illegal characters in stringsfixed parsing of jx and kx fieldssupport for mpr
Package: ezstools
ezstoolsEzstools is a Python library that provides a variety of tools and modules to help developers deal with common issues. Whether you need to manipulate JSON files, generate random data, or interact with the console, ezstools has you covered.Disclaimer: This library is still in development and is not yet ready for production use.InstallationpipinstallezstoolsUsageHere's an example of how to use theconvert_numfunction from thefuncsmodule:fromezstools.funcsimportconvert_numprint(convert_num(123456))# 123KHere's another example, this time using thestring_toolsmodule:fromezstools.string_toolsimportmost_similar_string,random_stringprint(most_similar_string(target="Hello Ezstools",options=["Hello Ezstools","Hello world","ezstools","hello",random_string(length=10)]))Modules:itertorProvides aIteratorclas which servers as a wrapper for iterables, used for better syntax and more powerful operations.traitsProvides a collection of typing hints, decorators and classes to mimic Rust's traits.console_utilscontains methods to interact with the console, including methods to display links and pick menus.funcsprovides a collection of general-purpose functions, such as timeit for timing code snippets and convert_num for converting a string to a number.json_toolsprovides tools to manipulate JSON files, including methods to load and dump JSON data.random_generatorprovides tools to generate random data, such as random names or email addresses.html_sliceThe html_slice module provides a command-line interface (CLI) tool to slice HTML files, allowing you to extract or modify
specific parts of the file.string_toolsprovides tools for string manipulation, including find and replace operations, normalization, and more.custom_iterablesprovides a set of methods to make built-in iterables more powerful, such as map, filter, and reduce.simple_kvThe simple_kv module provides tools to interact and manipulate simple key-value files (.skv), a custom file format.module_toolsprovides tools to create and interact with Python modules, such as methods to import and reload modules.LICENSEezstoolsis licensed under the MIT License. Please see the LICENSE file for more information.
Package: ez-stopwatch
Python StopwatchThis module contains a Stopwatch class with a context manager and a decorator function to time your code easilyBelow are some examples:First import the Stopwatch classfromstopwatchimportStopwatchFor the tutorial we're going to use this function which takes a bit more than a second to rundeffunc():x=''foriinrange(1_000_000):x+=str(i)Instantiate the Stopwatch class:sw=Stopwatch()sw.start()func()sw.stop()print('Time elapsed:',sw.time_elapsed)Time elapsed: 1.2138440999988234Or we can simply print the instance which will return a nicely formatted string:print(sw)Time elapsed: 1.214Using the 'with' statement:withStopwatch()assw:func()print(sw)Time elapsed: 1.138You can also pass an instance of a class to automatically add the time taken to the total elapsed time of the instance:sw=Stopwatch()withsw:func()func()withsw:func()print(sw)Time elapsed: 2.328The above example is the equivalent of:sw=Stopwatch()sw.start()func()sw.stop()func()sw.start()func()sw.stop()print(sw)Time elapsed: 2.324You can also use the decorator to time a function every time you run itFirst import the decorator:fromstopwatchimporttime_itAdd it to your function:@time_it()deffunc():x=''foriinrange(1_000_000):x+=str(i)Now the function will return a tuple with the time taken and the output of the function (which in our case is None)print(func())(1.1769665000028908, None)You can also add the time taken to an existing Stopwatch instance like so:sw=Stopwatch()@time_it(stopwatch=sw)deffunc():x=''foriinrange(1_000_000):x+=str(i)Call the function twice:print('Out:',func())print(sw)print('Out:',func())print(sw)Out: (1.2755557999989833, None)
Time elapsed: 1.276
Out: (1.3011283000014373, None)
Time elapsed: 2.577
Package: ezstorages
Ezstorge[!CAUTION]
Currently in development, not ready for useA python ORM (Object-Relational Mapping) that allow to use a simple class syntax to interact with a database.Why Ezstorge?I needed to use a simple ORM to interact with a database, but I found that most of the existing ORMs are either too complex for a simple use case, and the migration tools are not always easy to setup and use.Simple:The type of the field is defined by the type hintHas a simple query syntax similar toPonyORMFlexible:Automatic table creationAutomatic table update (add and remove fields)No need to use extra migration toolsBeautiful:Designed to be beautiful and easy to read.Fully typed, for better IDE support[!NOTE]
Inspired byPonyORMandSqlalchemyExampleimportpandasaspdimportezstorgeasezdb=ez.Sqlite("example.db")@db.useTable("cars")classCar(ez.Table):model:str# Required string fieldprice:float# Required float fieldmiles:int=0# Default value if not provided# Create, update, delete tabledb.createTable(Car)db.createTables()db.updateTable(Car)db.updateTables()db.deleteTable(Car)db.deleteTables()car=Car(model="Tesla",price=100)car.save()# Save the cardb.commit()# Commit the changecars=Car.where()# Get all carsprint(cars)# Use lambda to filtercars=Car.where(lambda:Car.price>20)print(cars)# Create a dataframe from the tabledf=pd.DataFrame(users)print(df)TypesintfloatstrbooldatetimedatetimetimedeltalistdictsettupleenumjsonbytesbytearrayuuidDecimalAnyUnionProvidersExcelSqliteMicrosoft AccessMySQLPostgreSQL
Package: ezstruct
========EzStruct========:copyright: 2013 by Matthew Sachs:license: Apache License v2.0Expressive syntax for working with binary data formats and networkprotocols.  Like the :py:mod:`struct` module, but with a more readablesyntax, especially if your format has:* Length-prefixed variable-length byte sequences or strings* Count-prefixed variable-count repeated fields* Terminated (null or otherwise) strings* String encodings* Numbers which represent enumeration membersExample::tcp = ezstruct.Struct("NET_ENDIAN",ezstruct.Field("UINT16", name="sport"),ezstruct.Field("UINT16", name="dport"),ezstruct.Field("UINT32", name="seqno"),ezstruct.Field("UINT32", name="ackno"),ezstruct.Field("UINT16",name="flags",value_transform=ezstruct.FieldTransform(pack_flags_bitfield,unpack_flags_bitfield)),ezstruct.Field("UINT16", name="window_size"),ezstruct.Field("UINT16", name="checksum"),ezstruct.Field("UINT16", name="urg"),ezstruct.Field("BYTES",name="options",default_pack_value={},length=lambda data: data["offset"] - 5,value_transform=ezstruct.FieldTransform(pack_and_pad_options,unpack_options)))header_data = {"sport": 123,"dport": 456,"seqno": 1,"ackno": 0,"flags": {"offset": 5,"syn": 1},"window_size": 100,"checksum": 0,"urg": 0}header_bytes = tcp.pack_bytes(header_data)assert tcp.unpack_bytes(header_bytes) == header_dataHistory=======v0.1.0, 2014-01-15Initial release.Authors=======* `Matthew Sachs <http://github.com/matthewg/>`_
Package: eztable
EZTable is a lightweight python table library. It is designed to be as
easy as possible:It’s easy to install because it’s pure python, you don’t need to compile
any C extensions, however if you do have a compiler then a few of the
components can be made to work faster.It’s easy to deploy because it’s packaged both sdist (.tar.gz format)
and also as a Python Wheel. You can use the Pip command to install it or
add it as a dependency of your project without introducing any extra
hassle.It’s easy to learn: There’s plenty of documentation and examples of how
to use EZTable’s main features.It’s easy to use, because the API is familiar to anybody who has used
lists and common Python sequences.Basic UsageThis Asciinema explains how to programatically build, filter and join
EZTable’s table object:Project StatusCurrent test status:Dependencies:Code Quality:About this projectDocumentation:http://pythonhosted.org/eztable/Latest release:https://pypi.python.org/pypi/eztable/Latest source:https://github.com/salimfadhley/eztableIssues:https://github.com/salimfadhley/eztable/issues
Package: ez-task
ez-task - simple python multiprocessingez-task wraps the standard Python multiprocessing library to simplify the management and usage of multiple long-running processes.
ez-task is designed for low-latency applications.Installationpip3 install --no-deps ez-taskUsageUsing TaskManagerfrom ez_task.manager import TaskManager
import time

def foo():
    time.sleep(1)
    return 'Foo Call'

def bar(text):
    time.sleep(2)
    return text

def baz(text, key = 'key'):
    time.sleep(3)
    return f'{text} {key}'

with TaskManager() as manager:
    foo_task, bar_task, baz_task = manager.define_task_set(foo, bar, baz)

    # Execute tasks concurrently
    foo_task.run()
    bar_task.run('bar')
    baz_task.run('baz', key='booz')

    # Sychronously block for output
    print('foo task:', foo_task.get_result()) # foo task: foo task Foo

    print('bar task:', bar_task.get_result()) # bar task: bar

    print('baz task:', baz_task.get_result()) # baz task: baz booz

    # Total time taken is 3 secondsUsing Task Directlydef foo(a, b):
    time.sleep(2)
    return a + b

task = Task(foo)

for i in range(10):
    task.run(i, i*2)

results = task.get_all_results()
print(results) # [0, 3, 9, 12]
Package: eztea
EZTea Web Framework# use falconpipinstalleztea[falcon,mysql,migration,testing]# use djangopipinstalleztea[django,postgresql,testing]UsageFalcon ExamplefromvalidrimportTfromeztea.falconimportApplication,ResponderContext,Routerrouter=Router()@router.get("/")defhello(ctx:ResponderContext,name:str=T.str.default("world"),)->T.dict(hello=T.str):return{"hello":name}app=Application()app.include_router(router)Django ExamplefromvalidrimportTfromdjango.httpimportHttpRequestfromeztea.djangoimportRouterrouter=Router()@router.get("/")defhello(req:HttpRequest,name:str=T.str.default("world"),)->T.dict(hello=T.str):return{"hello":name}urls=router.to_url_s()Testing Examplefromeztea.falcon.testingimportWebTestClientfromeztea.django.testingimportWebTestClientfrommyapp.wsgiimportapplicationdeftest_hello():client=WebTestClient(application)response=client.get('/')assertresponse.status_code==200assertreesponse.json()=={"hello":"world"}
Package: ez-tess-ocr
0.0.3 fixfix: different api use same lib due to brokenez_tess_ocr installpipinstallez_tess_ocrlinux need install tesseract-ocrsudo add-apt-repository -y ppa:alex-p/tesseract5-ocr
sudo apt -y install tesseract-ocrexamplefromez_tess_ocrimportcreate_ocr,release_ocr,ocr_image,ocr_confimportcv2deftest_ocr():image=cv2.imread('./testing/ocr_test.png')api=create_ocr()text=ocr_image(api,image)conf=ocr_conf(api)release_ocr(api)print('text',text,'conf',conf)if__name__=='__main__':test_ocr()change language (default='eng')copy
Package: ez-timer
ez-timerThe easiest way to time a code block in Python.Quick Links:InstallationUsageOverviewOverviewez-timerprovides a single, easy to use API for timing function calls.withez_timer()astimer:1+1timer.result# 0.000001That is it.  That is the API.  Solves one problem, and solves it well.BackgroundWhen working on extensive profiling for an enterprise Python project I regularly found myself writing:start=time.time()# some codeend=time.time()result=end-start# do something with resultWhiletimeitexists, I foundtimeitto be heavy handed for what I needed in 90% of cases.
This inspired me to createez-timer.Installationez-timer can be installed from pypi:pipinstallez-timerUsageUsing ez-timer is simple:fromez_timerimportez_timerwithez_timer()astimer:# run expensive computationtime.sleep(1)print(timer.result)# > 1.0001That's all.  That is the API.
Package: eztool
A package makes your life easier.Installationpip install eztoolFor installing on Linux, run this before installexport INSTALL_ON_LINUX=1UsageTime now by timezone and formatimport eztool

now = eztool.t_now(timezone = "Hongkong", time_fmt = "%d/%m/%Y %H:%M:%S")

print(now)

# output: 20/4/2004 15:20:40Timerfrom eztool.timer import timer

T = timer()

T.start()
# output: eztool [Timer]: Start timing.

### Your Code Here

T.stop()
# output: eztool [Timer]: Consumed 0.054247083000000015 seconds.
Package: eztools
eztoolsA handy module for Python programming, to make my life easier, this module is mainly to meet my needs,
welcome to contribute your features to make it save your time and life.eztools => easy tools.Installationpipinstalleztools-UUsagefromeztoolsimportconvertersconverters.to_int('123')LicenseMITChange Log0.0.1Baby version.
Package: eztransfer
eztransferSimple tool that makes moving your files between different storage providers easier.eztransferis taking care of this time-consuming and boring operations.You have access to various handles (seeSupported Services) or even implement your own! (by using interface)You don't need to think about transferred files being on your hard drive. Just specify where your files are and where you want them to be.If you just need to transfer files from A to B, or B to A, this is the right tool! It's aimed for simple operations.Getting StartedPrerequisitesPython 3.6+InstallationUltimately, there will be a pip package.Just for now:Clone repositorygit clone https://github.com/mbroton/ez-transfer.gitCreate python virtual environment, activate itvirtualenv venv
source venv/bin/activateInstall requirementspip install -r requirements.txtUsagefromsrcimport*# Initialize handlessftp=SFTPHandle(*sftp_credentials)azure=AzureBlobStorageHandle(*azure_credentials)# Send multiple files from SFTP to Azure Blob Storagefiles=("/home/ez/minecraft.exe","/home/ez/selfie.png")destination="transfer/"Transfer(source=sftp,destination=azure).files(files).to(destination).execute()# Single file from SFTP to Azure Blob StorageTransfer(source=sftp,destination=azure).file("/home/ez/selfie.png").to("received/image.png").execute()# Single file (this time in opposite direction) from Azure Blob Storage to SFTPTransfer(source=azure,destination=sftp).file("received/image.png").to("/home/ez/selfie.png").execute()Supported ServicesSFTPAzure Blob StorageFor now, just two of them. Expect more in near future...Feel free to suggest, what I should cover next.LicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactMichal Broton -LinkedInProject Link:https://github.com/mbroton/ez-transfer
Package: ez-transform
💥 ez-transform (Ezt)Analytics Engineering for Data Lakes powered bypolars,arrowanddelta-rs.👉 InstallationWe recommend first setting up a Python virtual environment and activating it.$python-mvenv.venv$source.venv/bin/activateAnd then install Ezt with pip into your virtual environment.$pipinstallez-transform👉 Getting startedYou can test out Ezt by creating a project from the command line.$eztinitmyproject&&cdmyprojectNow you have created a project and can use your IDE of choice to start
developing your data models. 🥳Check out the documentation athttps://ez-transform.github.io/ezt-core/to learn more about how to develop data models with Ezt.
Package: eztvit
Features:Scrapes the HTML fromhttps://eztv.yt/(previously eztv.it, but they’ve migrated)Offers a simple API to get a list of shows and episodes for TV seasonsHas unit tests, and tests that that run against the live websiteActively tested and working as of August 2015Seehttps://github.com/jaysh/eztvit-pythonfor details.
Package: ezufw
EzUFW - wrapper for Uncomplicated FirewallPackage allows control UFW from python side.Table of contentsInstallationDescriptionUsageInstallationpip install ezufwDescriptionEzUFW is based on class. To manipulate UFW (iptables) rules first initialize the object and execute its methods.List of methods:enable() 
disable()
rules() # get all registered rules
execute(*cmd, force=False) # execute command 
reset(default_policies=True, force=True) # reset UFW setup and apply basic policies by default
delete_by_port(*ports) # delete rules which are related to the given ports
delete_by_ip(*ip_address) # delete rules which are related with given IPsUsagefrom ezufw import EzUFW

ufw = EzUFW()Example 1
Package: ezui
EzUIA python module for easily creating a powerful and dynamic user interface in shellHow to use:Here is a simple program who use it : (You can find it in the repo)importezuiimportsysbanner="""______     _    _ _____|  ____|   | |  | |_   _|| |__   ___| |  | | | ||  __| |_  / |  | | | || |____ / /| |__| |_| |_|______/___|\____/|_____|"""defadd(a,b):returna+bdefsay_hello():print("Hello World!")defsub(a,b):returna-bdefexit():sys.exit()# This is the Menu elementselements=[("Hello World Function",say_hello),("Additionner",add),("Sub two operands",sub),("Exit the programm",exit)]ezui.simple_menu(elements,banner,"default")Todo- Create a title system ✅
- Find a way to know if the app is in foreground ❌
Package: ezure
Overviewezure (Easy Azure) is a Python package that serves as a comprehensive wrapper for Azure utilities. It simplifies and streamlines interactions with various Azure services, providing easy-to-use functions for downloading and uploading blobs, managing tables, handling queues, and more.FeaturesBlob Management: Easily download and upload blobs to your Azure storage account.Table Management: Efficiently manage your Azure tables.Queue Management: Simplify interactions with Azure queues.Azure Key Vault Utility: Simplify interactions with Azure Keys.InstallationYou can install ezure using pip:pipinstallezureUsageHere's a simple example of how to use ezure:importezure# Initialize the ezure clientez=ezure.Client()ez.connection_string='connection_string'# Download a blobez.download_blob('your-container-name','your-blob-name','output-file-path')# Upload a blobez.upload_blob('your-container-name','your-blob-name','input-file-path')ContributingWe welcome contributions!