Saravanan666/pypi-org huggingface dataset:
Package: universal-api-client
Universal REST API ClientFree software: MIT licenseDocumentation:https://universal-api-client.readthedocs.io/en/latest/.FeaturesThis library is a small REST API client with the following features:Url builder - allows you to build a url by natively calling the
client's attributesHTTP requests - a thin wrapper around therequestslibrary that
allows full control of the HTTP requests.Installationpipinstalluniversal-api-clientUsageInitialising the clientfromuniversal_api_clientimportClientswapi_client=Client(base_url='https://swapi.co/api/')Building a URLThe url builder is part of therequest(APIRequest) attribute of the
client.swapi_client.request.people# <universal_api_client.request.APIRequest at 0x1093c3eb8>swapi_client.request.people.url# 'https://swapi.co/api/people/'swapi_client.request.people(identifier=1).url# 'https://swapi.co/api/people/1/'swapi_client.request.people(identifier='1').url# 'https://swapi.co/api/people/1/'Making a requestThe requests are made by the already builtAPIRequestobject. The
method call returns the appropriate method call from the requests
library.response=swapi_client.request.people(identifier='1').get()# <Response [200]>print(response.status_code)# 200AuthenticationThe library allows the use of the requests authentication classes (request.auth).There are 2 ways to add authentication:When initializing the client.fromrequests.authimportHTTPBasicAuthswapi_client=Client(base_url='https://swapi.co/api/',auth=HTTPBasicAuth('user','pass'))When performing the request (overrides the authentication set in the client).fromrequests.authimportHTTPBasicAuthswapi_client.request.people.get(auth=HTTPBasicAuth('user','pass'))Trailing slashSome API urls require (or not) a trailing slash at the end of the URL. This can be controlled by thetrailing_slashflag when creating the client:fromuniversal_api_clientimportClientswapi_client=Client(base_url='https://swapi.co/api/',trailing_slash=False)swapi_client.request.people(identifier='1').url# 'https://swapi.co/api/people/1'CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: universalasync
universalasyncA library to help automate the creation of universal python librariesOverviewHave you ever been frustrated that you need to maintain both sync and async versions of your library, even thought their code differs by just async and await?
You might have came up to rewriting your code before release or other unreliable solutions.This library helps you to focus only on the main async implementation of your library: sync one will be created automaticallyVia decorating all your public methods, the wrapped functions automatically detect different conditions and run the functions accordingly.If user uses your library in async context, minimal overhead is added, it just returns the coroutine right away.Otherwise the library calls the coroutine via various loop methods, like as if you did it manually.There should be no issues at all, the only limitation is that signals and async subprocesses are supported only when running in the main thread.Also note that when run from a different os thread, the library will create a new event loop there and run coroutines.This means that you might need to adapt your code a bit in case you use some resources bound to a certain event loop (likeaiohttp.ClientSession).You can see an example of how this could be solvedhereFor API reference seethe docsInstallationpip install universalasyncExample of usage# wrap needed methods one by oneclassClient:@async_to_sync_wrapsasyncdefhelp():...@async_to_sync_wraps@propertyasyncdefasync_property():...# or wrap whole classes@wrapclassClient:asyncdefhelp(self):...@propertyasyncdefasync_property():...client=Client()defsync_call():client.help()client.async_propertyasyncdefasync_call():awaitclient.help()awaitclient.async_property# works in all casessync_call()asyncio.run(async_call())threading.Thread(target=sync_call).start()threading.Thread(target=asyncio.run,args=(async_call(),)).start()Copyright and LicenseCopyright (C) 2021 MrNaif2018Universal async-sync wrapper initially based onthis implementationLicensed under theMIT license
Package: universal-crc
Universal CRCThe goal of this project is to provide a simple and universal CRC computation tool, allowing the user to freely choose any of the parameters.InstallationInstall universalCRC$ pip install universal-crcUsageTo use custom parameters :from universalCRC import crc
CRC = crc.compute_CRC("111213141516171819",0x07,0x00,0x00,8,False,False)To use predefined parameters :from universalCRC import crc
CRC = crc.compute_CRC("111213141516171819",preset = "DARC")
Package: universaldatatool
Universal Data Tool PythonPython module for data labeling leveraging the Universal Data Tool.FeaturesOpenUniversal Data Toolin Jupyter notebookMassage data into and out of theUDT formatUsagepipinstalluniversaldatatoolimportuniversaldatatoolasudtds=udt.Dataset(type="image_segmentation",image_paths=["/path/to/birds/good_bird.jpg","/path/to/birds/bird2.jpg"],labels=["good bird","bad bird"])# Opens dataset directly in jupyter notebookds.open()APISubmodulesudt.nb: jupyter notebook widgetMethodsudt.load_json(file_path): Load UDT File from jsonudt.load_csv(file_path): Load UDT File from csvudt.Dataset(type=None, image_paths=None, labels=None)udt.Interface(type=None, labels=None): Create UDT interfaceudt.Sample(image_url=None, document=None, ...) : Create UDT Sampleudt.nb.display(udt_file): Display Universal Data Tool widgetTODOsimage_path,video_pathetc. supportBetter DocsUsage ExamplesLoad CSV or JSON from filesCollaborative synchronization w/ universaldatatool.comedit/openshould check that there are no local pathsHelpful stringificationMake it easy to run testsImage Segmentation kills jupyter notebook scrollingMake JupyterLab Extension123Continuous integration testing via Github ActionsCypress browser testingDevelopmentRunning Cypress TestsCypress will automatically open a browser and create jupyter notebooks with different test scenarios. It's really fast for developing and testing. To
use it, you must first run our jupyter docker container, which mounts volumes properly such that universaldatatool can be imported. To do this, run:yarnstart:jupyterA jupyter notebook is now running in the background.You can now run the cypress tests in development mode by running...yarncy:runAn electron browser will open with automated tests.How To TestEach file in theuniversaldatatool/testsdirectory can be tested with pytest e.g.python-mpytestuniversaldatatool/tests/example1.pyReleasing
Package: universal-date-parser
Universal Date Parseran universal date parser for python, which can parse date string from different formats and localization (including
Excel dates) into datetime object and more.Installationvia Githubpipinstallgit+https://github.com/guangyu-he/universal_date_parservia PyPIpipinstalluniversal-date-parserUsageinitializing parser instanceuse method to get the resultArgumentsdate_in_str: the date string to be parseddate_format(optional): the format of the date string, default is "guess", which means it will guess the format"guess": guess the formatothers: date formats supported by datetime.strptime()locale(optional): the locale of the date string, default is None, which means it will guess the localization
formatMethodsto_datetime(): return datetime objectto_date(): return date objectto_time(): return time objectto_date_str(date_format): return date string, by default, the format is "YYYY-MM-DD"to_str(date_format): return the date time string, by default, the format is "YYYY-MM-DD HH:MM:SS"to_timestamp(): return the timestamp objectExamplesfromuniversal_date_parserimportDateParserdate_string="06/07/1995"a=DateParser(date_string,locale="de_DE")print(a.to_date_str())# >>> 1995-07-06print(a.to_str())# >>> 1995-07-06 00:00:00print(a.to_date_str(date_format="%d.%m.%Y"))# >>> 06.07.1995date_string="06/07/1995"a=DateParser(date_string,locale="en_US")print(a.to_date_str())# >>> 1995-06-07date_string="06/07/1995"a=DateParser(date_string,date_format="%d/%m/%Y")print(a.to_date_str())# >>> 1995-07-06date_string="Jun/06/1995"a=DateParser(date_string)print(a.to_date_str())# >>> 1995-06-06date_string="06/Juni/1995"a=DateParser(date_string,locale="de_DE")print(a.to_date_str())# >>> 1995-06-06Updates Logv0.0.1initial uploadfirst versionv0.0.2updatedescription and setup updatesv0.0.2.1bug fixfix long desc error in setup.py while installingSupportfeel free to check source code inGitHub, you are
welcome
to leave any comments.2022©Guangyu He, for further support please contact author.Email:me@heguangyu.net
Package: universal-divergence
universal-divergenceuniversal-divergence is a Python module for estimating divergence of two sets of samples generated from the two underlying distributions.
The theory of the estimator is based ona paperwritten by Q.Wang et al[1].Installpip install universal-divergenceExamplefrom __future__ import print_function

import numpy as np
from universal_divergence import estimate

mean = [0, 0]
cov = [[1, 0], [0, 10]]
x = np.random.multivariate_normal(mean, cov, 100)
y = np.random.multivariate_normal(mean, cov, 100)
print(estimate(x, y))  # will be close to 0.0

mean2 = [10, 0]
cov2 = [[5, 0], [0, 5]]
z = np.random.multivariate_normal(mean2, cov2, 100)
print(estimate(x, z))  # will be bigger than 0.0References[1]Qing Wang, Sanjeev R. Kulkarni, and Sergio Verdú. “Divergence estimation for multidimensional densities via k-nearest-neighbor distances.” Information Theory, IEEE Transactions on 55.5 (2009): 2392-2405.
Package: universaldjango
universal-model-django is a Django app to conduct web-based polls. For each question,
visitors can choose between a fixed number of answers.Quick startAdd “universal-model-django” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'universaldjango',
]dont Include the universaldjango URLconf in your project urls.py like this:path('polls/', include('universaldjango.urls')),Runpython manage.py migrateto create the universaldjango models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a universaldjango (you’ll need the Admin app enabled).
Package: universalid
UniversalIDGenerates unique id's based on the current date/timeFeaturesUnid includes a datetime stamp - your can extract the creation time from a UnidYou can assign a custom prefix to your id, e.g. a country codeUnid is case-insentitiveBase 36 encoded (digits + letters from A-Z)Uses thesecretslibrary to generate cryptographically strong pseudo-random numbersFully documented:https://universalid.readthedocs.io/en/latest/100% coverageInstallationInstall the latest release fromPyPI <https://pypi.org/project/universalid/>_:.. code-block:: shpip install universalidUsageThe Unid class is available directly off the :code:universalidpackage::>>> from universalid import Unid
>>> Unid.create(prefix='DK')
'DKDQ2D6JCJXI2Q82J06X0PK16P34XDO0'

>>> unid = Unid.create()
>>> Unid.get_time( unid )
datetime.datetime(2018, 12, 20, 11, 36, 27, 756356)LinksUseful linksNano Id collisioncalculator <https://zelark.github.io/nano-id-cc/>_Universal ID <https://www-01.ibm.com/support/docview.wss?uid=swg21112556>_ in Lotus NotesContributeIssue Tracker: github.com/$project/$project/issuesSource Code:https://github.com/majkilde/universalid.gitLicenseThe project is licensed under the MIT license.
Package: universalio
UniversalIOUniversalIO is a library for Python developers looking to seamlessly integrate multiple different
file storage solutions.The concept was born out of a need for a project to allow users to specify files which might be in the
Azure Blob Storage, Azure File Store, on a network drive, or on a SFTP server and then manipulate these
files. In addition, there was a need to write the same file back to multiple different locations. The
solution was to wrap the specific API for those storage solutions in an API that allowed the system to
operate on them consistently, as well as coordinating file transfers between them. The need for batch
operations led to the adoption of asyncio and its implementations for most of the backend, though
non-asynchronous methods are available as well.Operations Supportedis_dir()is_file()exists()parent()child(child_name)basename()joinpath(*paths)remove()read(block_size)write(bytes)text(encoding)copy()move()mkdir(recursive)rmdir(recursive)crawl()detect_encoding()is_local_to(resource)Asynchronous versions of most of the above exist with the suffix _asyncStorage Solutions SupportedLocal/network drives (via aiofiles)SFTP (via asyncssh)Azure Blob Storage (via azure.storage.blob.aio)HTTP servers (via aiohttp)Requires GET support for read accessRequires PUT support for write accessRequires DELETE support for deleteSupports MKCOL for basic directory/collection creationSupports COPY, falls back to a GET and a PUT, for file copyingSupports MOVE, falls back to a COPY and a DELETE, for file movingPlanned EnhancementsSome restructuring to match the pathlib API as much as possibleSupport for pulling credentials from TOML files in user's home directorySupport for Azure File StorageSupport for FTP and FTPSSupport for direct HTTP access and HTML scrapingSupport for a batch file uploader/downloaderSupport for glob() matching and other searching optionsSupport for pathlib-style with_name() to change the file nameSupport for touch()Support for writing text directlySupport for HTTP authentication methods, including a custom method to support custom API callsMore direct support for file copy/moving if the descriptor and connection is the sameConsidering support for SSH/SCPConsidering support for relative file paths on local/network drives (challenging to understand what the root would be?)Considering support for chmod/etc (but not supported on Windows)Considering support for symbolic link creation (but complex on Windows)
Package: universalizer
universalizerThe KG-Hub Universalizer provides functions for knowledge graph cleanup and identifier normalization.InstallationInstall withpip:pip install universalizerORInstall with Poetry.git clone https://github.com/Knowledge-Graph-Hub/universalizer.git
cd universalizer
poetry installUsageWith KGX format node and edge files in the same directory:universalizer run path/to/directoryOr, if they're in a single tar.gz file:universalizer run -c graph.tar.gzID and category mappingSSSOM-format maps are supported. Use a single map file:univeralizer run -m poro-mp-exact-1.0.sssom.tsv path/to/directoryor a whole directory of them:univeralizer run -m path/to/mapfiles path/to/directoryTo map node categories as well as identifiers, use the-uflag:univeralizer run -m path/to/mapfiles path/to/directory -uFor SSSOM maps fromsubject_idtoobject_id, subject node IDs will be remapped to object IDs.If theobject_categoryvalue is specified the node's category ID will be remapped as well.Note that this will complete node normalizationandID remapping.Maps should use the normalized form (e.g., specify "FBbt:00005201", not "FBBT:00005201", even if the latter form is in the input graph.)
Package: universal-open
Universal-Open (uopen)uopenis a cross-platform utility that serves as an alternative to platform-specific commands likexdg-openon Linux,openon macOS, andstarton Windows. It is designed to provide a unified entry point on any of those platforms,
promoting interoperability for configuration files and scripts.uopenjust acts as a named pass-through shim, offering a common entry point for various platforms.
However, it is important to note that using platform-specific flags withuopenis not recommended.
Package: universal-parser-tool
Universal Parser ToolThis tool (a.k.aupt) helps to fetch sample tests from online judges.
It can be useful to speedup testing codes before final submit.InstallYou can installuptfrom pypi using this command:$ pip install universal-parser-toolYou should be able to runuptafter install.To login services and use parsers on private webpages, you need to install a supported browser and its driver.BrowserDriverSupportedTestedFirefoxhttps://github.com/mozilla/geckodriver/releases✅✅Chromium/Chromehttps://sites.google.com/a/chromium.org/chromedriver/downloads✅✅Edgehttps://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/✅❌SafariBuilt-in✅❌Operahttps://github.com/operasoftware/operachromiumdriver/releases❌❌IEhttps://selenium-release.storage.googleapis.com/index.html❌❌ConfigurationsAll configurations stored at~/.config/upt, includingupt.conf(general configs) andcookie.jar(login cookies).After installing, You may runupt initto initialize config options.UpgradeYou can check current version by runningupt -v. Upgrade to newer version by this command.$ pip install -U universal-parser-toolParsersAt this time, these judges have built-in support.AtCoderCodeforcesQueraUsacoNOTE: You need to login a service if you want to use it during contest.PluginsIt is possible to develop and publish your own plugins ofupt.
In this context, plugins are python modules, and their name starts withupt-.
Several built-in parsers are included inupt-builtin.The plugin must provide aregisterfunction, returning a list of classes (inherited fromBaseParser).
After installing the module,uptautomatically finds the plugin and callsregister.There is a documented example of a parserhere.upt-builtinis another example that's been tested.If you have written a good plugin foruptand have published it on PyPI, notify me so I can add it here.
Package: universal-pathlib-edge
Universal PathlibUniversal Pathlib is a python library that aims to extend Python's built-inpathlib.Pathapi to use a variety of backend filesystems usingfsspecInstallationPypipipinstalluniversal_pathlibcondacondainstall-cconda-forgeuniversal_pathlibBasic Usage>>>fromupathimportUPath>>>path=UPath("file:/some/filepath.py")>>>path.namefilepath.py>>>path.stemfilepath>>>path.suffix.py>>>path.exists()TrueSome backends may require other dependencies. For example to work with S3 paths,s3fsis required.For more examples, see theexample notebook here
Package: universal-response-mobile-api
Library for django rest frameworkRepository:https://bitbucket.org/anmv/universal-response-mobile-apiPIP package:https://pypi.org/project/universal-response-mobile-api/Installpip install universal-response-mobile-apiUseimport universal_response_mobile_api as u_mobile_api1. DecoratorAdd your Django project, for default behavior:file:settings.pyimport universal_response_mobile_api as u_mobile_api

'DEFAULT_RENDERER_CLASSES': (
        'u_mobile_api.StructuredJsonRenderer',
    ),or use as decorator for rest-api.2. Errors handlerAdd your Django project:file:settings.pyimport universal_response_mobile_api as u_mobile_api

REST_FRAMEWORK = {
    ...
    'EXCEPTION_HANDLER': 'u_mobile_api.custom_exception_handler',
    ...
}
Package: universal-silabs-flasher
Universal Silicon Labs FlasherAutomatically communicates with radios over CPC, EZSP, or Spinel to enter the bootloader and then flashes a firmware image with XMODEM.Installation$pipinstalluniversal-silabs-flasherUsageUsage: universal-silabs-flasher [OPTIONS] COMMAND [ARGS]...Options:-v, --verbose--device PATH_OR_URL           [required]--bootloader-baudrate NUMBERS  [default: 115200]--cpc-baudrate NUMBERS         [default: 460800, 115200, 230400]--ezsp-baudrate NUMBERS        [default: 115200]--spinel-baudrate NUMBERS      [default: 460800]--probe-method TEXT            [default: bootloader, cpc, ezsp, spinel]--bootloader-reset [yellow|ihost|slzb07|sonoff]--help                         Show this message and exit.Commands:dump-gbl-metadataflashprobewrite-ieeeFlashing firmwareFor safety, firmware GBL image files are validated and their checksums verified both before sending, and by the device bootloader itself.In addition to validating the firmware image, the version number of the firmware image currently running on the device is read.If the provided firmware image type does not match the running image type, the firmware will not be flashed. Cross-flashing can be enabled with--allow-cross-flashing.If the provided firmware image is a lower version than the currently running image, the downgrade will not be allowed. Downgrades can be enabled with--allow-downgrades.To always upgrade/downgrade firmware to a specific version (i.e. as the entry point for an addon bundling firmware), use--ensure-exact-version.All of the above logic can be skipped with--force.YellowThe Yellow's bootloader can always be activated with the--bootloader-reset yellowoption:$universal-silabs-flasher\--device/dev/ttyAMA1\--bootloader-resetyellowflash\--firmwareNabuCasa_RCP_v4.1.3_rcp-uart-hw-802154_230400.gbl\SkyConnectThe SkyConnect will be rebooted into its bootloader from the running application: either EmberZNet or CPC.$universal-silabs-flasher\--device/dev/cu.SLAB_USBtoUART\flash\--firmwareNabuCasa_SkyConnect_EZSP_v7.1.3.0_ncp-uart-hw_115200.gblWriting IEEE addressEnsure a target device running EmberZNet firmware has the correct node IEEE address:$universal-silabs-flasher\--device/dev/cu.SLAB_USBtoUART\write-ieee\--ieee00:3c:84:ff:fe:92:bb:2cThe IEEE address can also be specified without colons:--ieee 003c84fffe92bb2c.If the current device's IEEE address already matches the provided one, the command will not write it unnecessarily.
Package: universal-sitemap-loader
Universal Sitemap LoaderUniversal Sitemap Loaderthe easiest way to find a Sitemap>>>fromuniversal_sitemap_loaderimportUniversalSitemapLoader>>>loader=UniversalSitemapLoader("https://www.example.com/")>>>sitemap=loader.find_sitemap()This tries to find the Sitemap no matter where the heck it is.Key FeaturesCan handel compressed (.gz) filesRecursively gets the URL´s from all sitemapstries to find even the strangest placed sitemapsOther functions include:>>>urls=loader.get_urls()or>>>urls=loader.get_urls_from_sitemap("https://www.example.com/sitemap.xml")Installing the PackageUniversal Sitemap Loader is available on PyPI:$python-mpipinstalluniversal-sitemap-loaderOfficially supports Python 3.7+.This project is licensed under the GNU General Public License v3.0. See theLICENSEfile for more details
Package: universal-startfile
OverviewThis is a cross-platform version of theos.startfilefunction in the Python standard library.It emulates the following actions in an operating system's UI:double-clicking a filesingle-clicking a URLwhich will open the default program associated with that type.SetupRequirementsPython 3.7+InstallationInstall it directly into an activated virtual environment:$ pip install universal-startfileor add it to yourPoetryproject:$ poetry add universal-startfileUsageAfter installation, import thestartfilefunction:fromstartfileimportstartfilestartfile("~/Downloads/example.png")startfile("http://example.com")
Package: universal-utils
python-utilspython utilsScreenShotbrowser=get_browser('https://tushare.pro/document/2?doc_id=33')# 移除悬浮browser.execute_script("""var toTop = document.querySelector('.scroll-to-top');if(toTop){toTop.remove();}""")# 隐藏滚动条browser.execute_script("""var style = document.createElement('style');style.innerHTML='body::-webkit-scrollbar{display:none;}';document.querySelector('head').append(style);""")screen_shot=ScreenShot()screen_shot.save_full_page_screen_shot('ts.jpg',browser=browser)browser.quit()
Package: universe-matrix
# universe_matrixThis package lets developers use BASIC style dynamic arrays within python. This is useful when you’re sending data back to universe and are trying to structure it to how it will be used natively.Key points here are that indexing starts from 1 and -1 as a position means append, similar to how BASIC handles arrays.# RequirementsThis package requires the Rocket supplied module u2py as this is just a wrapper around it.# Installationpip install universe-matrix# Examples>>> from universe_matrix import UniverseMatrix>>> a = UniverseMatrix()
>>> a[1] = 'Hello'
>>> a[2] = 'World'
>>> print(a.u2())
HelloþWorld>>> a = UniverseMatrix()
>>> a[-1] = 'Hello'
>>> a[-1] = 'World'
>>> print(a.u2())
HelloþWorld>>> a = UniverseMatrix()
>>> a[1] = 1
>>> a[2] = 2
>>> a[2,1] = 3
>>> a[2,2] = 4
>>> a[2,3] = 5
>>> a[2,3,1] = 6
>>> a[2,3,2] = 7
>>> a[2,3,2,2] = 8
>>> print(a.u2())
1þ3ý4ý6ü7û8>>> print(a[2,3,1])
6