Saravanan666/pypi-org huggingface dataset:
Package: unified-database
# requirements_dev.txt we use for the testing
It makes it easier to install and manage dependencies for development and testing, separate from the dependencies required for production.# difference between requirements_dev.txt and requirements.txtrequirements.txt is used to specify the dependencies required to run the production code of a Python project, while requirements_dev.txt is used to specify the dependencies required for development and testing purposes.# tox.ini
We use if for the testing in the python package testing against different version of the python## how tox works tox enviornment creation
1. Install depedencies and packages
2. Run commands
3. Its a combination of the (virtualenvwrapper and makefile)
4. It creates a .tox# pyproject.toml
it is being used for configuration the python project it is a alternative of the setup.cfg file. its containts configuration related to the build system
such as the build tool used package name version author license and dependencies# setup.cfg
In summary, setup.cfg is used by setuptools to configure the packaging and installation of a Python projec# Testing python applicationtypes of testing1. Automated testing
2. Manual testingMode of testing1. Unit testing
2. Integration testsTesting frameworkspytestunittestrobotframeworkseleniumbehavedoctest# check with the code style formatting and syntax(coding standard)pylintflake8(it is best because it containt 3 library pylint pycodestyle mccabe)pycodestyle
Package: unified-focal-loss-pytorch
Unified Focal Loss PyTorchAn implementation of loss functions
from“Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation”Extended for multiclass classification and to allow passing an ignore index.Note: This implementation is not tested against the original implementation. It varies
from the original implementation based on my own interpretation of the paper.Installationpipinstallunified-focal-loss-pytorchUsageimporttorchimporttorch.nn.functionalasFfromunified_focal_lossimportAsymmetricUnifiedFocalLossloss_fn=AsymmetricUnifiedFocalLoss(delta=0.7,gamma=0.5,ignore_index=2,)logits=torch.tensor([[[0.1000,0.4000],[0.2000,0.5000],[0.3000,0.6000]],[[0.7000,0.0000],[0.8000,0.1000],[0.9000,0.2000]]])# Shape should be (batch_size, num_classes, ...)probs=F.softmax(logits,dim=1)# Shape should be (batch_size, ...). Not one-hot encoded.targets=torch.tensor([[0,1],[2,0],])loss=loss_fn(probs,targets)print(loss)# >>> tensor(0.6737)Detailed API ReferenceSeeAPI docs.LicenseSeeLICENSE.
Package: unified-io
⚡️ Introductionunified-iois a Python utility that attempts to unify several I/O operations (i.e., read/write data in different formats) under a similar interface while making them more concise and user-friendly.The library provides a unified interface for reading/writing files, which is based on the following principles:Read/write interfaces consist of concise functions with similar signatures.Read/write interfaces allows passing keyword arguments to the underlying I/O functions to preserve flexibility.Read operations can be performed lazily using generators.Before reading/writing, the user can specify a callback function that will be applied to each element of the data stream.readfunctions haveloadaliases (e.g.,read_csvhas aload_csvalias) andwritefunctions havesavealiases (e.g.,write_csvhas asave_csvalias.Use very efficient stuff for each format (e.g.,orjsonforjsonfiles). Suggestions are welcome!✨ Supported formatsCSVand similar formats (e.g., TSV, PSV, etc.)GZIPJSONJSONlLZ4Numpy(.npy)PickleText🔌 Requirementspython>=3.7💾 Installationpipinstallunified-io💡 ExamplesThe API is designed to be as simple as possible. For example, the following code snippet reads a CSV file, applies a callback function to each element of the data stream, and writes the result to a JSONl file:fromunified_ioimportread_csv,write_jsonldefcallback(x):return{"id":x["id"],"title":x["title"].lower()}# Using a generator we avoid loading the entire file into memorydata=read_csv('input.csv',callback=callback,generator=True)write_jsonl('output.jsonl',data)📚 DocumentationBrowse thedocumentationfor more details and examples.🎁 Feature RequestsWould you like to see other features implemented? Please, open afeature request.🤘 Want to contribute?Would you like to contribute? Please, drop me ane-mail.📄 Licenseunified-iois an open-sourced software licensed under theMIT license.
Package: unified-json-api
python-package-templateThis repository is designed to help you create local and remote package layers in Python.It focuses on building package layers and does not include GraphQL and REST-API layers.Download EnvironmentTo set up the environment, follow these steps in your terminal:gitclonehttps://github.com/circles-zone/<your-repo>.git--branchdev# or other branchcd<your-repo>
gitcheckout-bBU-<new-branch># if a new branch is neededpython-mvenvvenv
pipinstall-rrequirements.txt
...<edityourcode>...
gitadd.
gitcommit-m"Your commit message"gitpushoriginBU-<your-branch>For more detailed information, refer to thedocumentation.Check List:Directory StructureEnsure that the root directory has the following structure:.github/.vscode/(optional)directory_with_same_name_as_the_repo/db/reports/project_name/src/__init__.pyexample_class.pytests/example_class_test.py__init__.pyThis setup enables easy switching to a mono repo configuration.Database Python ScriptsPlace<table-name>.pyin the/dbfolder if needed.There's no need for a separate file for_mltables.Feel free to delete the example file if it's not required.Database Schema and DataCreate files to define the database schema, tables, views, and populate metadata and test data.Use/db/<table-name>.pyto create the schema, tables, views (including_ml_table).Use/db/<table-name>_insert.pyto create metadata and test data records.Updatesetup.pyDon't forget to update thesetup.pyfile, including the package name and version.Remember to upload the version after every deployment.Working with VS CodeEnsure that you push thelaunch.jsonfile to the repository.This enables running and debugging the code smoothly.Unit TestingWe recommend usingpytestover theunittestpackage.Create apytest.inifile in the project directory, not the root directory.
run in termianl: pytestWorkflow CompletionWhen you've addressed all the TODOs in the repository, using infrastructure classes like Logger, Database, Url, Importer, and others, make sure your Feature Branch GitHub Actions Workflow is green without warnings.All tests should run in GitHub Actions, your code should be well-documented, theREADME.mdfile should be clear and self-explanatory, test coverage should be above 90%, and all lines of code should be covered by unit tests.Once these conditions are met, you can filter and analyze your records in Logz.io.Pull thedevbranch to your Feature Branch and then create a Pull Request todev.Good luck :)check your code visibility lint with flake (Mandatory before pusj):run those command
python -m pip install flake8 pytest
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statisticsnote: you should use autopep8 extension in your code!
Package: unified-map
UnifiedMany implementations, one way of access.MapApply a function to a list of arguments and collect the results
– serial, parallel or distributed.This package provides reasonably simple syntax for a frequent programming task
which is implemented in various places (built-in, standard library, external libraries).
Here are three descriptions of this task:Mapa list of inputs to a list of results via a user-provided function.Applya given function to a list of arguments to get a list of return values in the same order.A black-box functionis evaluated with different inputs and the outputs are collected.In general, this is a so-called“pleasingly parallel problem”(aka “embarrassingly parallel” or “pleasingly parallel”)
because it is straightforward to separate it into independend subtasks.
For this reason, and due to its frequent occurrence, it is recognized as aprogramming idiom(“parallel map”, “parallel for loop”)
inparallel computingthat can equally simple be applied indistributed computing.
This package allows to do so with a focus on simplicity of use.Project referencesDocumentationGitHub PageSource codeGitHubPackagePyPIAuthorsRobert Haas
Package: unified-path
Unified PathUnified Path is a Python wrapper aroundpathlib.PurePathandpathlib.Path, that provides an OS-independent path representation.
It is especially useful in shared environments when you need to write to a path in a configuration file, and this file may be read from different OS.InstallationInstall from pypi using pip:pip install unified-pathDrive translationsLet's say you have a shared drive containing pictures. This drive is accessible on Windows asP:, and on Linux as/mnt/pictures.
Using this library you can easily handle this situation by storing an unified path to the Pictures drive, that will be readable on both OS.First you need to register the paths:importunified_pathasupup.register_drive_translation('P:/','/mnt/pictures')Then you can obtain the unified string representation using theas_unified()function:# In Linuxup.UnifiedPath('/mnt/pictures/folder/img.jpg').as_unified()# P:/folder/img.jpg# In Windowsup.UnifiedPath('P:\\folder\\img.jpg').as_unified()# P:/folder/img.jpgYou can construct anUnifiedPathinstance from either the local representation or either the unified representation.
AsUnifiedPathinherits frompathlib.Path, you can use the result as any otherPathobject.# In Linuxup.UnifiedPath('P:/folder/img.jpg')# okup.UnifiedPath('P:\\folder\\img.jpg')# also ok# In Windowsup.UnifiedPath('P:/folder/img.jpg')# okup.UnifiedPath('/mnt/pictures/folder/img.jpg')# also okVirtual drivesIt is also possible to assign a virtual drive letter to a dynamic path.
This allows to "hide" a part of the path that may change, so that the stored path will always remain valid.importunified_pathasupgit_root=...# obtain root path of current repository using some git commandup.register_virtual_drive('G:/',git_root)up.UnifiedPath('G:/data/conf.json')# okUsage with argparseUnified Path can be used as argparse arguments:# Now you can use -i P:/folder/img.jpg in Linuxparser.add_argument('-i',type=up.UnifiedPath,required=True,help='input file')The library also comes with a helper that constraints the file extension:# An error will be emitted if calling -i with a file that is not a .jpgparser.add_argument('-i',type=up.make_path_validator(['.jpg']),required=True,help='input image')
Package: unified-range
unified-rangeThe library converts input semver ranges to a uniform model, and the other way around, providing objects that are easier to use programmatically.Examples of supported rangesnpm style semver -<1.2.3 >=2.0.0ruby style semver -<1.2.3, >=2.0.0maven style version ranges -[1.2.3,2.1.1), [3.0.0,4.1.1)Additionally, use this library to run algorithms on any input version ranges and calculate whether a specific version is included in this range.PrerequisitesEnsure you have installed either pip or pipenvInstall:pipenv install unified-rangeorpip install unified-rangeImport theapimodule:from unified_range import apiHow to useFollowing are the different functions you can perform with this library.To convert a range to the uniform string range, from the semver format:ver_rng = api.from_semver(semver_str)Results: uniform range structureConvert from the uniform range structure to a semver string (return str):semver = api.to_semver(unified_spec_str)To convert the versionrange object to a string:version_range_str = str(ver_rng)Convert from the uniform string to the uniform model object (VersionRange objects):ver_rng = api.unified_range(unified_spec_str)>>> api.unified_range('[1.2.3,4.5.6)')
<unified_range.models.UnifiedVersionRange at 0x7f7e4dc17320>Within a list of ranges, retrieve versions not included:filtered_lst = api.filter_versions(ascending_version_list, ranges)>>> api.filter_versions(['0.1', '0.2', '1.0', '1.1', '2.0'], ['[,0.2]', '[1.1]'])
['1.0', '2.0']The versions inascending_version_listshould be sorted in ascending order,
from oldest to newest, and contain all the versions for the package.From a list of version ranges, retrieve the closest version in the list to the current version (next):Filter next version and maximum version from list of version and ranges:next_version = api.next_filtered_version(current_version, ascending_version_list, ranges)current_version must be included in the ascending_version_list.>>> api.next_filtered_version(current_version='0.2', ascending_version_list=['0.1', '0.2', '1.0', '1.1', '2.0'], ranges=['[,0.2]', '[1.1]'])
'1.0'

>>> api.next_filtered_version(current_version='1.1', ascending_version_list=['0.1', '0.2', '1.0', '1.1', '2.0'], ranges=['[,0.2]', '[1.1]'])
'2.0'Retreive the latest version that is not included:max_version = api.maximum_filtered_version(ascending_version_list, ranges)>>> api.maximum_filtered_version(ascending_version_list=['0.1', '0.2', '1.0', '1.1', '2.0'], ranges=['[,0.2]', '[1.1]'])
'2.0'Uniform structure examplesFollowing are the uniform structures used in this library:Uniform string structure example: (,1.2.3)Uniform model examples:UnifiedVersionRange.constraints -> List[Restrictions]Restriction.bounds -> Tuple[Bound, Bound]Bound.version -> strBound.inclusive -> booleanReferences and prior worksThis library was built with the following:Maven’s VersionRange:modelandspecof maven.https://semver.org/npm’s semver library
Package: unifi-respondd
unifi_responddThis queries the API of a UniFi controller to get the current status of the Accesspoints and sends the information via the respondd protocol. Thus it can be picked up byyanicand other respondd queriers.OverviewConfig File:controller_url:unifi.lancontroller_port:8443username:ubntpassword:ubntssid_regex:.*freifunk.*offloader_mac:SiteName:00:00:00:00:00:00SiteName2:00:00:00:00:00:00nodelist:https://MAPURL/data/meshviewer.jsonversion:v5ssl_verify:Truemulticast_enabled:falsemulticast_address:ff05::2:1001multicast_port:1001unicast_address:fe80::68ff:94ff:fe00:1504unicast_port:10001interface:eth0verbose:truelogging_config:formatters:standard:format:'%(asctime)s,%(msecs)d%(levelname)-8s[%(filename)s:%(lineno)d]%(message)s'handlers:console:class:logging.StreamHandlerformatter:standardroot:handlers:-consolelevel:DEBUGversion:1
Package: uniflash
Reflash Logitech Unifying Receivers easilyWindows users please install libusb first. (Go tohttps://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0, download libusb-win32-devel-filter-1.2.6.0.exe and install it)Usage: uniflash <command> [<args>]command is one of:icp         reset the unifying firmware into its bootloader mode
reset       reset from the bootloader
flash       when in icp mode flash the given hexfile
info        print info about bootloader (nRF24LU1+)
info_ti     print info about bootloader (CC2544)
Package: unifonter
unifonterunifonter is a filter that tries to make ASCII fancy with the help of Unicodequick introunifonteris meant to be used as a filter, or as a quick lookup /
translation tool. So you can use it either like$ man man | unifonter
𝔐𝔄𝔑(1)                        𝔐𝔞𝔫𝔲𝔞𝔩 𝔭𝔞𝔤𝔢𝔯 𝔲𝔱𝔦𝔩𝔰                        𝔐𝔄𝔑(1)

𝔑𝔄𝔐𝔈
       𝔪𝔞𝔫 - 𝔞𝔫 𝔦𝔫𝔱𝔢𝔯𝔣𝔞𝔠𝔢 𝔱𝔬 𝔱𝔥𝔢 𝔰𝔶𝔰𝔱𝔢𝔪 𝔯𝔢𝔣𝔢𝔯𝔢𝔫𝔠𝔢 𝔪𝔞𝔫𝔲𝔞𝔩𝔰

𝔖𝔜𝔑𝔒𝔓𝔖ℑ𝔖
       𝔪𝔞𝔫 [𝔪𝔞𝔫 𝔬𝔭𝔱𝔦𝔬𝔫𝔰] [[𝔰𝔢𝔠𝔱𝔦𝔬𝔫] 𝔭𝔞𝔤𝔢 ...] ...
       𝔪𝔞𝔫 -𝔨 [𝔞𝔭𝔯𝔬𝔭𝔬𝔰 𝔬𝔭𝔱𝔦𝔬𝔫𝔰] 𝔯𝔢𝔤𝔢𝔵𝔭 ...
       𝔪𝔞𝔫 -𝔎 [𝔪𝔞𝔫 𝔬𝔭𝔱𝔦𝔬𝔫𝔰] [𝔰𝔢𝔠𝔱𝔦𝔬𝔫] 𝔱𝔢𝔯𝔪 ...
       𝔪𝔞𝔫 -𝔣 [𝔴𝔥𝔞𝔱𝔦𝔰 𝔬𝔭𝔱𝔦𝔬𝔫𝔰] 𝔭𝔞𝔤𝔢 ...or$ unifonter Hello
ℍ𝕖𝕝𝕝𝕠Several different styles are supported; use-kfollowed by a style
combination you want, otherwise one is chosen at random.Supported styles can be seen viaunifonter -d:UseTo getb𝐁𝐨𝐥𝐝i𝐼𝑡𝑎𝑙𝑖𝑐bi𝑩𝒐𝒍𝒅 𝑰𝒕𝒂𝒍𝒊𝒄s𝖲𝖺𝗇𝗌-𝖲𝖾𝗋𝗂𝖿bs𝗦𝗮𝗻𝘀-𝗦𝗲𝗿𝗶𝗳 𝗕𝗼𝗹𝗱is𝘚𝘢𝘯𝘴-𝘚𝘦𝘳𝘪𝘧 𝘐𝘵𝘢𝘭𝘪𝘤bis𝙎𝙖𝙣𝙨-𝙎𝙚𝙧𝙞𝙛 𝘽𝙤𝙡𝙙 𝙄𝙩𝙖𝙡𝙞𝙘c𝒮𝒸𝓇𝒾𝓅𝓉bc𝓑𝓸𝓵𝓭 𝓢𝓬𝓻𝓲𝓹𝓽d𝔻𝕠𝕦𝕓𝕝𝕖-𝕊𝕥𝕣𝕦𝕔𝕜f𝔉𝔯𝔞𝔨𝔱𝔲𝔯bf𝕭𝖔𝖑𝖉 𝕱𝖗𝖆𝖐𝖙𝖚𝖗kSᴍᴀʟʟ-Cᴀᴘꜱm𝙼𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎wＦｕｌｌｗｉｄｔｈbut note the order of the letters doesn't matter (-k bisis the same
as-k sib), so if you find that you think "fraktur bold" instead of
"bold fraktur", just go with it.Some other options are supported; see the output of-h.
Package: uniform
Uniform📋Dress your form processing endpoints.📋IntroductionUniform is a form processing tool that can be easily plugged into your Starlette backend.It gives you the following:Extract and validate form data againsttypesystem.SchemaReturn 400 Bad Request with validation problems explained100% test coverage.100% type annotated codebase.RequirementsPython 3.6+Installation$pip3installuniformExampleexample.py:importuvicornfromstarlette.applicationsimportStarlettefromstarlette.requestsimportRequestfromstarlette.responsesimportPlainTextResponsefromtypesystemimportSchema,BooleanfromuniformimportUniform,validateapp=Starlette()classTestSchema(Schema):test=Boolean()@app.route("/")@validate(Uniform(TestSchema))asyncdefhome(request:Request)->PlainTextResponse:returnJSONResponse(content={"ok":True,"description":None,"result":dict(request.state.data)})if__name__=="__main__":uvicorn.run(app,host="0.0.0.0",port=8080)Then run the application...$pythonexample.pySend POST request tohttp://127.0.0.1:8080/withapplication/jsonorapplication/x-www-form-urlencodeddata and it will be validated.DependenciesUniform work withstarletteendpoints and validate forms usingtypesystemlibrary.If you want to parseapplication/x-www-form-urlencodedform data - you will also need apython-multipart.— 📋 —Uniform isUnlicensedcode in Public Domain.
Package: unifr-api-epuck
First StepsWelcome to the UNIFR API e-puck’s documentation.unifr_api_epuck is a simple API wrapper that lets you control a real or simulated e-puck robot.
Please find below the instructions to get started with the API for Python3.Submitted by: David Roman FrischerObject detection section by: Vincent CarrelSupervisor: Dr. Julien Nembrinidocumentation :https://unifr-api-epuck.readthedocs.io/en/latest/RequirementsPython3.x on your computer.Webots or a real e-puck.How To StartWith Real RobotsHow to install the package from your terminal.$pipinstallunifr_api_epuckHow to implementTo import the package:fromunifr_api_epuckimportwrapperTo create an instance of the robot:#Put the IP address of your robot.MY_IP='192.168.43.125'r=wrapper.get_robot(MY_IP)To control the robot by calling its actions:r.init_sensors()#initiates the sensorsr.set_speed(-2,2)#makes it turn around itself#infinite loopwhiler.go_on():prox_values=r.get_prox()#gets the values of the proximity sensorsprint(prox_values)r.clean_up()#makes a resetTo run the file$python3my_controller_file.pyWith WebotsHow to install the package from your terminal.$pipinstallunifr_api_epuckHow to implement your Python controllerTo import the wrapper from the package:fromunifr_api_epuckimportwrapperTo create an instance of the robot:r=wrapper.get_robot()To control the robot by calling its actions:r.init_sensors()#initiates the sensorsr.set_speed(-2,2)#makes it turn around itself#infinite loopwhiler.go_on():prox_values=r.get_prox()#gets the values of the proximity sensorsprint(prox_values)r.clean_up()#makes a resetTo run the file:⏯  press play on WebotsSimple Example CodeQ: What does it do ?A: The robot goes forward at a speed of 2 and prints its proximitiy sensor values.fromunifr_api_epuckimportwrapperip_addr='192.168.43.125'r=wrapper.get_robot(ip_addr)r.set_speed(2)#sets the speed of the wheelsr.init_sensors()#initiates the proximity sensor#infinite loopwhiler.go_on():print(r.get_prox())#prints the proximity sensor values on the terminal#inserts some more code here to control your robotr.clean_up()Graphic User InterfaceA GUI is available in the package. To start it, please run the following command:$python3-munifr_api_epuck-gSourcesWifi Protocol between Robot <–> computerhttps://www.gctronic.com/doc/index.php?title=e-puck2_PC_side_development#WiFi_2http://projects.gctronic.com/epuck2/complete.pyhttps://github.com/nembrinj/epuckAPI/tree/masterWebotshttps://www.cyberbotics.com/doc/reference/nodes-and-api-functionsMultiprocesshttps://docs.python.org/3/library/multiprocessing.html#multiprocessing.managers.SyncManagerhttps://stackoverflow.com/questions/2545961/how-to-synchronize-a-python-dict-with-multiprocessingSocket errorshttps://docs.python.org/3/library/exceptions.html#OSErrorPi-Puckhttps://pi-puck.readthedocs.io/en/latest/https://github.com/yorkrobotlab/pi-puckhttps://github.com/gctronic/Pi-puck
Package: unify-connector-framework
Element Unify Connector FrameworkThe Unify Python Connector Framework is a library to develop connectors that interact
with Element Unify. This library is intended for developers who are building connectors to
ingest source input data to Element Unify or publish data from Element Unify to another
destination.User InformationThis section is intended for users of the Unify Python Connector Framework. This includes
developers who are building connectors, integrations, and automation that interfaces
with Element Unify. For developers looking to contribute to the Connector Framework, see theDeveloper Informationsection.InstallationYou can install the Unify Connector Framework fromPyPI:pip install unify-connector-frameworkUsing the Unify Connector Framework with virtualenvThis assumes you have installed an appropriate version virtualenv, python, and
other associated tools. This also assumes you have an existing python project
you'd like to import into, in this casemy-project.mkdir path/to/my-project; cd path/to/my-project
virtualenv venv
source venv/bin/activate
echo unify-connector-framework >> requirements.txtThen, in your python import section add the following line:from unifyconnectorframework.organization_client import OrganizationClientDocumentationThe Connector Framework developer guide is found in the Unify API Documentation Portal under the Unify Connector Framework section.Navigate to your instance of Element Unify.Log in and select your organization.From the top-right menu, click on the Support icon and select API Documentation.Developer InformationThis section is intended for developers working to extend the Unify Connector Framework.Developer GuideFork this repository.Revise files with your contributions.Follow styling guides. SeePython style guide.Check for lint warnings. SeeLint checking.Create a pull request with description of your changes.Python style guidePlease use the following Python style guideGoogle Python Styling guideLint checkingWe usy pylint to verify lint warnings, our build system requires a linter score
of >=9.0 to pass successfully.To locally check you changespip install pylint
pylint dir/to/the/file.py