Saravanan666/pypi-org huggingface dataset:
Package: eynnyd
Eynnyd Web FrameworkEynnyd (pronounced [Ey-nahyd]) is an acronym forEverything You Need, Nothing
You Don't. It is a light-weight WSGI compliant python 3 web framework.
Eynnyd was designed with the primary goal to not impose bad engineering decisions
on it's users. It is also designed to not overstep or assume the wants of it's user.Simplicity and Freedom is the DesignThis is the framework for you if the following sound good:You are permitted but not coerced into following REST.Arequest handlertakes arequestand returns aresponse.Arequest interceptortakes arequestand returns arequest.Aresponse interceptortakes arequestand aresponseand returns aresponse.You can have any number ofrequest interceptors,request handlers, orresponse interceptors.You can name your handler methods anything you want.You can limit the scope (paths it applies to) of any interceptor.We do not provide extraneous dependencies or opinions (like database connection libraries or templating engines)There is noEynnyd wayto do things.There is nothingcleverormagic. (like global singletons or special decorators)You can see your entire routing layout, succinctly, in your main.If this at all sounds good we recommend you keep reading and see what else Eynnyd
can provide for you.DocumentsRead the documents ateynnyd.readthedocs.ioHow to install itEynnyd is published to pypi and can be installed using:pipinstalleynnydHow to use itEynnyd does not come with a built in WSGI HTTP server. We recommendgunicornfor running your application.A simple hello world example looks like:# hello_world_app.pyfromeynnydimportRoutesBuilderfromeynnydimportEynnydWebappBuilderfromeynnydimportResponseBuilderfromhttpimportHTTPStatusdefhello_world(request):returnResponseBuilder()\.set_status(HTTPStatus.OK)\.set_utf8_body("Hello World")\.build()defbuild_application():routes=\RoutesBuilder()\.add_handler("GET","/hello",hello_world)\.build()returnEynnydWebappBuilder()\.set_routes(routes)\.build()application=build_application()Using gunicorn this can now be rungunicorn hello_world_app.An example with interceptors# hello_world_app.pyimportloggingfromeynnydimportRoutesBuilderfromeynnydimportEynnydWebappBuilderfromeynnydimportResponseBuilderfromhttpimportHTTPStatusLOG=logging.getLogger("hello_world_app")defhello_world(request):returnResponseBuilder()\.set_status(HTTPStatus.OK)\.set_utf8_body("Hello World")\.build()deflog_request(request):LOG.info("Got Request:{r}".format(r=request))returnrequestdeflog_response(request,response):LOG.info("Built Response:{s}for Request:{r}".format(s=response,r=request))returnresponsedefbuild_application():routes=\RoutesBuilder()\.add_request_interceptor("/hello",log_request)\.add_handler("GET","/hello",hello_world)\.add_response_interceptor("/hello",log_response)\.build()returnEynnydWebappBuilder()\.set_routes(routes)\.build()application=build_application()For Developers / ContributorsInstalling requirementsrun:pipinstall-rtest_requirements.txtRunning the testsAfter installing the requirements run:python-munittestdiscovertestsChecking coverageAfter installing the requirements run:coveragerun--sourceeynnyd/-munittestdiscovertests/
coveragereport
Package: eynollah
EynollahDocument Layout Analysis (segmentation) using pre-trained models and heuristicsFeaturesSupport for up to 10 segmentation classes:background,page border,text region,text line,header,image,separator,marginalia,initial,tableSupport for various image optimization operations:cropping (border detection), binarization, deskewing, dewarping, scaling, enhancing, resizingText line segmentation to bounding boxes or polygons (contours) including for curved lines and vertical textDetection of reading orderOutput inPAGE-XMLOCR-DinterfaceInstallationPython versions3.7-3.10with Tensorflow>=2.4are currently supported.For (limited) GPU support thematchingCUDA toolkit>=10.1needs to be installed.You can either install viapip install eynollahor clone the repository, enter it and install (editable) withgit clone git@github.com:qurator-spk/eynollah.git
cd eynollah; pip install -e .Alternatively, you can runmake installormake install-devfor editable installation.ModelsPre-trained models can be downloaded fromqurator-data.de.In case you want to train your own model to use with Eynollah, have a look atsbb_pixelwise_segmentation.UsageThe command-line interface can be called like this:eynollah\-i<imagefile>\-o<outputdirectory>\-m<pathtodirectorycontainingmodelfiles>\[OPTIONS]The following options can be used to further configure the processing:optiondescription-flfull layout analysis including all steps and segmentation classes-lightlighter and faster but simpler method for main region detection and deskewing-tabapply table detection-aeapply enhancement (the resulting image is saved to the output directory)-asapply scaling-clapply countour detection for curved text lines instead of bounding boxes-ibapply binarization (the resulting image is saved to the output directory)-epenable plotting (MUST always be used with-sl,-sd,-sa,-sior-ae)-hoignore headers for reading order dectection-di <directory>process all images in a directory in batch mode-si <directory>save image regions detected to this directory-sd <directory>save deskewed image to this directory-sl <directory>save layout prediction as plot to this directory-sp <directory>save cropped page image to this directory-sa <directory>save all (plot, enhanced/binary image, layout) to this directoryIf no option is set, the tool will perform layout detection of main regions (background, text, images, separators and marginals).
The tool produces better quality output when RGB images are used as input than greyscale or binarized images.Use as OCR-D processorEynollah ships with a CLI interface to be used asOCR-Dprocessor.In this case, the source image file group with (preferably) RGB images should be used as input like this:ocrd-eynollah-segment -I OCR-D-IMG -O SEG-LINE -P modelsAny image referenced by@imageFilenamein PAGE-XML is passed on directly to Eynollah as a processor, so that e.g.ocrd-eynollah-segment -I OCR-D-IMG-BIN -O SEG-LINE -P modelsuses the original (RGB) image despite any binarization that may have occured in previous OCR-D processing steps
Package: ez2bruteforce
ez2bruteforceez2bruteforceis a python package that allows you to bruteforce the POW(proof of the work) stage in CTF game.
You can specify the char table, bruteforce length and the position and then use bruteforce to crack its hash digtest.pypi home page：https://pypi.org/project/ez2bruteforce/ExampleIf you have known the hash of the digtest, like this:importhashlibcipher=hashlib.sha1(b"Dear XXX:")# cipher = b"\xf0\x1d\xb9\xe9|Xh\x84\xdb\r\xb0'\xa7\x80\xdc\x07\xbc\xca_`"Then you can use ez2bruteforce to crack it.BfItem(3, string.ascii_letters)means the bruteforce length is 3, and the char table is " all ascii letter.sha1_solver(problem,cipher)will return the original string if the hash is correct.fromez2bruteforceimportBfItem,Problem,sha1_solverimportstringcipher=b"\xf0\x1d\xb9\xe9|Xh\x84\xdb\r\xb0'\xa7\x80\xdc\x07\xbc\xca_`"problem=Problem(["Dear ",BfItem(3,string.ascii_letters),":"])result=sha1_solver(problem,cipher)# result = b'Dear abc:'Also, you can pass your own hash function into thegeneric_solver.fromez2bruteforceimportBfItem,Problem,generic_solverfrombase64importb64decode,b64encodecipher=b64encode(b'abc')problem=Problem([BfItem(3,"abcdefg")])result=generic_solver(problem,cipher,b64encode)# result = b'abc'TODOtpye-stub supportMuti-threading supportAddimport *support
Package: eZadb
eZadbis a python application that aims to provide theAndroid Debug
Bridge(adb) funcionalities in more simple and intuitive way.ezadb has two modes:command-line: this mode allows you to use some of the most common
adb commands, e.g.: install/uninstall packages; grant/revoke
permissions; input text; etc.graphical mode: this mode provides almost the same features as
the command-line mode but in a more intuitive way.To install go to the command line and type:pipinstallezadbCommand Line Toolcommand lineSee thewikipage
for more informationGui Interfacegui interfaceSee thewikipage for more informationContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull
requests to us.AuthorsFilipe Baptista-filipebatistaSee also the list ofcontributorswho participated in this project.AcknowledgementsA big thanks toArtur Costa-cosartthat helped in the beginning of the project.LicenseeZadb is made available under the terms of the GPLv3.See theLICENSEfile that accompanies this distribution for the full text of the
license.
Package: ez-address-parser
ez-address-parserA parser for Canadian postal addressesInstallFromPyPipip install ez-address-parserFromGitHubpip install git+https://github.com/zehengl/ez-address-parser.gitUsageCommand Linepython -m ez_address_parser --address <some-address>Code (with pretrained model)fromez_address_parserimportAddressParserap=AddressParser()address=input("Address: ")result=ap.parse(address)fortoken,labelinresult:print(f"{token:20s}->{label}")Code (without pretrained model)fromez_address_parserimportAddressParserap=AddressParser(use_pretrained=False)data=[[('123','StreetNumber'),('Main','StreetName'),('St','StreetType'),('E','StreetDirection')],...]# list of list of (<token>, <label>) tupleap.train(data)address=input("Address: ")result=ap.parse(address)fortoken,labelinresult:print(f"{token:20s}->{label}")CreditsIconbyRakhmat Setiawan
Package: ezaero
ezaero(easy-aero)is an open source Python package oriented to implement numerical
methods for Aerodynamics, such as the 3D Vortex lattice Method for lifting surfaces.DocumentationAPI documentation and examples can be found onhttps://ezaero.readthedocs.io.ExamplesYou can check out the examples in thegallery, and export them as .py scripts or Jupyter notebooks to continue exploring!InstallationTo install the package, simply use pip:$ pip install ezaeroRequirementsezaero has the following dependencies:Python (>=3.7)NumPymatplotlibezaero is tested on Linux, Windows and OS X on Python 3.7 and 3.8.PlatformSiteStatusLinux / OS XTravis CIWindows x64AppveyorContributingAll contributions and suggestions are welcome! For more details, check outCONTRIBUTING.rst.MotivationThis library is a free-time project. I am using as a means to:Experiment the performance of several scientific computing packages and tools applied to a computation-intensive application.Dive deep into the Python Open Source community.Redoproperly(in terms of performance optimization, SW best practices, …) a project I enjoyed a lot during my Master Thesis, back in 2014.My thesis covered the analysis of the aeroelastic response of an UAV in a gust scenario.My plan is to implement the following modules:3D steady VLM [Done]3D unsteady VLMWing motion equation solver (aeroelastic response)If for some reason you run across this project, and find it useful or have suggestions,
don’t be shy! feel free to contribute ordrop me a line.
Package: ezai-env
ezai_envDescriptionDocker container and conda virtual environment creation for doing AI on local machines, Kubernetes or SageMaker.Pre-requisites for buildingLinux: Python is InstalledWindows: Python is installed, preferably miniconda.UsageEZAI in docker environment with conda:Note: This version maps$homedirectory and/mntdirectory on the host to docker container, so be careful with modifying anything in these folders inside the container, it will also be modified on the hostDo the following first:Download the two files:curl -O "https://raw.githubusercontent.com/armando-fandango/ezai_env/main/{.env,ezai-docker}"modify.envfile as needed, specially theitagexecutesource ezai-dockernow use any of the following commandsTo run EZAI containerezai_runcpulls the image if not presentstarts the container if not startedenters the containerI generally create an alias in bash to run the notebooks from the container quickly:alias eznb='conda activate ezai && jupyter notebook --ip=* --no-browser'To pull EZAI image:ezai_pull_imageTo remove EZAI containerezai_rmcTo remove EZAI imageezai_rmiTo build EZAI imageezai_build_imageEZAI conda environment on your local machine (no docker):modifyezai-conda-req.txtas neededmodifyezai-pip-req.txtas neededfor linux: executeezai-conda-create.sh --venv <location-of-env>  --python-ver <python-version>for windows: executeezai-conda-create.ps1 -venv <location-of-env>  -python-ver <python-version><location-of-env>: Default is/opt/conda/envs/ezaion linux andC:/Miniconda3/envs/ezaion windows<python-version>: Defalult is3.7You can supply your ownrequirements.txtfiles with--piptxtand--condatxt.activate the environment withconda activate <location-of-env>test the tensorflow and pytroch GPU withpytest -p no:warnings -vvEZAI conda environment in AWS SageMaker instance:The SageMaker instance should be already created and stopped before following these steps.On your laptopConfigureawscliif not already done:aws configureClone the repo :git clone https://github.com/armando-fandango/ezai_env.gitGo to theezai_envfolder where you cloned the reposource the filesource ezai-condaSet the SageMaker env:set_sagemaker_env -i <instance_name>Prepare the SageMaker instanceLaunch the instance and open a terminalIn the terminal:cd /home/ec2-user/SageMaker/ezai_envCreate conda environment:./ezai-conda-create.sh --venv /home/ec2-user/SageMaker/envs/ezaiactivate the environment withconda activate /home/ec2-user/SageMaker/envs/ezaitest the tensorflow and pytorch GPU withpytest -p no:warnings -vvTest itOpen thetest.ipynbfileTODO:Give option to create fully isolated containerGive option to select which libraries to installadd/enable more librariesmake separate dockerfile for Sumo and create only if asked from the run
Package: ez-aio
ez_aioEasiest way to make tons of get/post requests with aiohttp.You need DIY to get/post with different proxy/headers/cookies, or delete/patch/put request.Singel GETurl = 'https://www.baidu.com'
result = aio.get(url)[0]  # return a list by defaultSingel GET and printurl = 'https://www.baidu.com'
aio.get(url, func=print)x100 GETurls = ['https://www.baidu.com'] * 100
results = aio.get(urls)x100 POSTurls = ['https://httpbin.org/post'] * 100
data = [{'a': n} for n in range(100)]
results = [aio.post(urls, data=data, func=print)]Singel GET speedtest# requests might raise errors
a = timeit.repeat("requests.get('https://www.baidu.com', headers=header0)",
                  setup='import requests\nfrom ez_aio import header0', repeat=10, number=1)
b = timeit.repeat("aio.get(['https://www.baidu.com'], headers=header0)",
                  setup='from ez_aio import aio, header0',  repeat=10, number=1)
for x, y in ((a, 'requests'), (b, 'aiohttp')):
    print(y)
    print(f'{mean(x):.3f} ± {stdev(x):.3f} s, (range) [{min(x):.3f}, {max(x):.3f}]')defget(urls, binary=False, func=None, fdata=None, li=99, forced=True, ssl=False, 
    proxy=None, headers=None, cookies=None):
post(urls, data=None, binary=False, func=None, fdata=None, li=99, forced=True,
     ssl=False, proxy=None, headers=None, cookies=None):urls: url or list of urldata: post(*, data=data[i], *) Change to json=data[i] if you want.binary: result = response.text() if binary else response.read()func: return func(result, *) if func else return resultfdata: func(result, fdata[i] if fdata else func(result)li: max of session, 99 be defaultforced: only return response.status in [200, 403] if forcedssl: sslproxy: proxyheaders: headerscookies: cookiesreturn: func(result, *) if func else resultMoreLearn more about aiohttpSimple test with some libs
Package: ez-aiohttp
ez_aiohttpThe aiohttp wrapper to make it more like requests.How to useIt is kinda like requests, but it is async.
And you need to import aiohttp if you want to use more than GET,POST,PUT,PATCH,DELETE.This just make it more simple.Here's an example:importaiohttp,ez_rq,ez_rq.utilasyncdefmain():a=ez_rq.get('https://www.google.com')print(awaita.text())b=ez_rq.post('https://www.google.com',data={'a':'b'})print(awaitb.text())c=ez_rq.put('https://www.google.com',data={'a':'b'})print(awaitc.text())d=ez_rq.patch('https://www.google.com',data={'a':'b'})print(awaitd.text())e=ez_rq.delete('https://www.google.com')print(awaite.text())f=awaitez_rq.util.json2attr(a)# or you can send the dictionaryf.a='b'print(awaitez_rq.util.attr2json(f))etc.It always returnaiohttp.client_reqrep.ClientResponseobject.doc
Package: ez-api
e-z.host API Python WrapperThis is a Python wrapper for the e-z.host API, allowing for easy use of the file uploading, link shortening, and pasting services.
The source code is available athttps://github.com/NotJINXZ/ez-apiInstallationThis library can be installed viapip:pipinstallez-apiUsageHere are some examples of how to use the library:importez_api# Upload a fileapi_key='your-api-key-here'file_path='/path/to/file.txt'url=ez_api.upload_file(api_key,file_path)# Shorten a URLapi_key='your-api-key-here'url='https://google.com'short_url=ez_api.shorten_url(api_key,url)# Create a text pasteapi_key='your-api-key-here'paste_text='This is some example paste text.'paste_language='plaintext'paste_title='Example Paste'paste_description='This is an example paste created with the e-z.host API Python wrapper.'paste=ez_api.create_text_paste(api_key,paste_text,paste_language,paste_title,paste_description)For more detailed documentation, see theofficial e-z.host API documentation.API KeyUnfortunately this API is paid. If you would like to purchase join theirDiscord Serveror check out theirwebsite.LicenseThis library is released under the MIT License. SeeLICENSEfor more information.
Package: ezapi-tmdb
ezapi-tmdbA Python wrapper for TMDb API, supporting version3and4InstallFromPyPipip install ezapi-tmdbFromGitHubpip install git+https://github.com/zehengl/ezapi-tmdb.gitUsageAll endpoints are mapped to functions in aTMDbobjectAll query string params are used as keyword argumentsVersion 3 ExampleSeeVersion 3 documentsfor detailed API usage.fromtmdbimportTMDb3api_key="..."tmdb=TMDb3(api_key)# query string params are used as keyword argumentsprint(tmdb.get_popular_movies(region="US"))print(tmdb.get_tvs_on_the_air(page=10))# create session_id with username/password loginusername="..."password="..."request_token=tmdb.create_request_token().get("request_token")tmdb.create_session_with_login(username,password,request_token)session_id=tmdb.create_session(request_token).get("session_id")# some endpoints require session_idprint(tmdb.get_account_details(session_id=session_id))# store global options, language / region for exampletmdb.set_options(language="de",region="de")tmdb.get_trending("all","week")# reset global optionstmdb.reset_options()# configure image languages globallytmdb.set_options(include_image_language=["en","null"])tmdb.get_movie_images(597)# url param per request would overwrite global optionstmdb.get_movie_images(597,include_image_language=["de","fr"])Version 4 ExampleSeeVersion 4 documentsfor detailed API usage.fromtmdbimportTMDb4# API Read Access Token from the settings pageaccess_token="..."tmdb=TMDb4(access_token)# create a user access tokenrequest_token=tmdb.create_request_token().get("request_token")print(f"https://www.themoviedb.org/auth/access?request_token={request_token}")# click on the link above, sign in, then approve accessresp=tmdb.create_access_token(request_token)# extract the user access token and account id for v4 apiuser_access_token=resp.get("access_token")account_id=resp.get("account_id")tmdb.update_access_token(user_access_token)tmdb.get_list(14105)tmdb.get_account_favorite_movies(account_id)Testgitclonegit@github.com:zehengl/ezapi-tmdb.gitcdezapi-tmdbexporttmdb_api_key="..."exporttmdb_username="..."exporttmdb_password="..."exporttmdb_access_token="..."python-mvenv.venvsource.venv/bin/activate
pipinstall-e.
pipinstall-rrequirements-test.txt
pytestUse$Env:tmdb_api_key="...",$Env:tmdb_username="...",$Env:tmdb_password="...", and$Env:tmdb_access_token="..."to set the api key, username, password, and access token environment variables on Windows.CreditsIcon fromwww.themoviedb.orgContributors ✨Thanks goes to these wonderful people (emoji key):Cologler💻Rafael Pierre💻joselimajr🤔This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: ezapi-yelp
ezapi-yelpA Python wrapper forYelp Fusion APIInstallFromPyPipip install ezapi-yelpFromGitHubpip install git+https://github.com/zehengl/ezapi-yelp.gitUsagefromyelpimportYelpFusiontoken="..."yelp_fusion=YelpFusion(token)print(yelp_fusion.business_search(location="San Francisco"))print(yelp_fusion.transaction_search("delivery",location="San Francisco"))print(yelp_fusion.business_details("WavvLdfdP6g8aZTtbBQHTw"))print(yelp_fusion.business_match(name="Gary Danko",address1="800 N Point St",city="San Francisco",state="CA",country="US",))print(yelp_fusion.reviews("WavvLdfdP6g8aZTtbBQHTw"))print(yelp_fusion.autocomplete(text="Gary Danko",latitude=37.80587,longitude=-122.42058))print(yelp_fusion.all_categories())print(yelp_fusion.category_details("hotdogs"))print(yelp_fusion.event_lookup("oakland-saucy-oakland-restaurant-pop-up"))print(yelp_fusion.event_search(location="Oakland"))print(yelp_fusion.featured_event(location="Oakland"))Testgitclonegit@github.com:zehengl/ezapi-yelp.gitcdezapi-yelpexportyelp_token="..."python-mvenv.venvsource.venv/bin/activate
pipinstall-e.
pipinstall-rrequirements-test.txt
pytestUse$Env:yelp_token="..."to set the api key environment variable on Windows.CreditsIconbytulpahn
Package: ezargs
ezargsLightweight, zero-setup dynamic Python command line argument parsing.ezargsis extremely simple (< 10 SLoC) and pushes as much of the parsing logic into the user's hands as possible. I wroteezargsbecause I wanted an easier way to set up ephemeral, flexible, or just plain easy CLI arguments for Python scripts. I just wanted to be able to pass whatever I wanted and grab it in the code without having to declare fields beforehand.The only strict rule pertains to the format of arguments, which is as follows:Arguments must be key-value pairs in the format:key=valueeg.python my_scripy.py duration=5 max_shift=12 name=foo secret='ab!@#3=e32'parses the arguments into:{'duration': '5', 'max_shift': '12', 'name': 'foo', 'secret': 'ab!@#3=e32'}Subsequent=appearances in the value are allowed.eg.name=fo=o->{'name': 'fo=o'}Values with spaces must be wrapped in quotes. In general, strings should be sent with quotes (single or double).eg.name="John Appleseed"->{'name': 'John Appleseed'}Type conversions, presence checks, etc. are up to the user to handle.All values are parsed as strings.Installation:Installezargswithpip install ezargsSimple Code Recipe:fromezargsimportparse_argsdefmain(args:dict)->None:max_attempts=int(args.get("max-attempts",5))# default value with type conversionifnot(filename:=args.get("filename")):# presence checkraiseException("missing file name!")print(f"{filename=},{max_attempts=}")if__name__=="__main__":args:dict=parse_args()main(args)
Package: ezazure
Azure’s python interface for uploading and downloading files is complicated and
unintutive.ezazureprovides an easy interface to these
functionalities.To get started, check out thedocs!If you will be contributing to this repo, check out thedeveloper’s guide.QuickstartInstall this package:pipinstallezazurePut your Azure connection string and container name in a.ezazurefile:connection_str:AZURE_CONNECTION_STRINGcontainer:CONTAINER_NAMERun from the command line either of the following:python-mezazure--uploadFNAMEpython-mezazure--downloadFNAMEezazuresupports regex pattern matching:python-mezazure--download--regexFNAME.*python-mezazure--upload--regexPATH/FNAME[0-9]+\.csvYou can also use this package as an API:fromezazureimportAzureazure=Azure()azure.upload(fname)azure.download(fname)