Saravanan666/pypi-org huggingface dataset:
Package: rosetta-dispatcher
Nmt dispatcher模式优化本项目提供一个基于消息队列的生产者-消费者负载均衡。达到：空闲的服务器主动拉取任务并完成。减少服务端因负载不均导致的闲置时间。服务器可以按batch拉取任务。达到合并小请求为batch请求的效果。通过batch处理增大服务端的吞吐量。生产者-消费者RPC数据包格式：Request:名称类型说明content_typestr内容类型：jsonreply_tostr回复的队列名correlation_idstrrequest_idtimeoutint超时时间datastr数据结构：nmt接口请求参数Response:名称类型说明correlation_idstr任务唯一IDstatusintrpc执行状态码： 0 - OK, 500 - timeoutdatastr数据结构: nmt 返回结果correlation_id 生成机制SnowflakeSnowFlake的结构如下(每部分用-分开):0 - 0000000000 0000000000 0000000000 0000000000 0 - 00000 - 00000 - 0000000000001位标识，由于long基本类型在Java中是带符号的，最高位是符号位，正数是0，负数是1，所以id一般是正数，最高位是041位时间截(毫秒级)，注意，41位时间截不是存储当前时间的时间截，而是存储时间截的差值（当前时间截 - 开始时间截)得到的值），这里的的开始时间截，一般是我们的id生成器开始使用的时间，由我们程序来指定的（如下下面程序IdWorker类的startTime属性）。41位的时间截，可以使用69年，年T = (1L << 41) / (1000L * 60 * 60 * 24 * 365) = 6910位的数据机器位，可以部署在1024个节点，包括5位datacenterId和5位workerId12位序列，毫秒内的计数，12位的计数顺序号支持每个节点每毫秒(同一机器，同一时间截)产生4096个ID序号加起来刚好64位，为一个Long型。SnowFlake的优点是，整体上按照时间自增排序，并且整个分布式系统内不会产生ID碰撞(由数据中心ID和机器ID作区分)，并且效率较高，经测试，SnowFlake每秒能够产生26万ID左右。UUID1保证客户端生成ID唯一性，并携带了时间戳。超时机制worker端根据rpc_header里的timeout决定任务是否超时丢弃，并给出任务超时response。client端定期检查rpc_request，如果已经超时，则立即返回服务繁忙。服务过载client发送请求前获取rpc_queue长度，当长度超过N时，直接拒绝请求，返回服务器繁忙。消息去重机制根据消息队列的特性确定是否需要去重机制。worker端自带最近处理任务correlate_id的set集，如果重复则直接丢弃任务？batch处理机制批处理由2条线程组成。第一条为rpc请求队列获取线程，完成从rpc请求队列获取rpc请求，并将请求放入到本地队列，为了减少redis请求导致的额外开销以及降低延时，获取请求方式为阻塞获取。第二条线程为请求批量处理线程，从本地队列获取尽可能多的请求，当请求数量为16，或请求队列为空时进行任务处理。经过测试吞吐量随batch增大，吞吐量增大。batch为16时，吞吐量达到瓶颈。线程程数越多吞吐量越小。故批处理batch大小定为16。获取请求线程代码deffetch_rpc_request():whileTrue:iflen(internal_queue)>=16:sleep(50)continuerequest=get_request_from_rpc_queue(blocking=True)internal_queue.append(request)处理请求线程代码defdeal_rpc_request():whileTrue:iflen(internal_queue)==0andlen(batch)>0orlen(batch)==16:translate(batch)send_response(batch)else:req=get_req_from_internal_queue()batch.append(req)​​​​​
Package: rosetta-easycache
easycache本项目提供一个基于异步aioredis作为缓存，达到：通过异步redis查询，优化数据库查询。通过装饰器快速使用，并且不用在业务代码中修改逻辑。基于aioredis2.0+创建redis connections pool，全局只需维护一个redis connections pool，节省维护连接池的资源。在数据库和用户之间增加redis层，通过装饰器实现达到快速使用，不影响原来业务代码逻辑的目的。说明1. EasyCache : class创建easycache装饰器对象，将参数redis设置为默认redis，redis应该是一个redis client。2. easycache.find参数:名称类型说明prefixstrredis key的前缀， 必填redisaioredis.Redisredis client，为空时使用默认rediskey_expire_timeintkey expire time, 默认为10minkey_param_indexint数据库主键在参数列表中的位置，第一个位置为1key_param_namestr数据库主键参数的名称，传参时必须使用命名参数opt_param2key_funcfunction将参数转为redis key的函数，为空时默认参数为str或者ObjectId类型逻辑：如果获取参数正确且缓存命中，则直接返回缓存的结果，否则调用func，并在获取参数正确的情况下将结果存入缓存。3. easycache.delete参数:名称类型说明prefixstrredis key的前缀， 必填redisaioredis.Redisredis client，为空时使用默认rediskey_expire_timeintkey expire time, 默认为10minkey_param_indexint数据库主键在参数列表中的位置，第一个位置为1key_param_namestr数据库主键参数的名称，传参时必须使用命名参数opt_param2keys_funcfunction将参数转为redis key list的函数，为空时默认参数为str或者ObjectId类型逻辑：如果获取参数正确则删除对应key。example1. 维护一个redis connections poolimportaioredisredis_pool=aioredis.ConnectionPool.from_url(f'redis://localhost:6379',decode_responses=True,)redis_client=aioredis.Redis(connection_pool=redis_pool)这里推荐同时调用aioredis.Redis定义一个redis client，并且之后使用redis client代替redis pool。2. 定义一个easycache装饰器frominit_redis_poolimportredis_clientimporteasycacheeasycache=easycache.EasyCache(redis_client)3.使用装饰器如需优化以id为条件的数据库查询，且id是唯一的，则在查询的接口调用find，在更新以及删除的接口调用delete。prefinx可以是“数据库名：数据库表名”， key_param_name是findtest函数的参数列表中，传入id的参数名。@easycache.find(prefix='testcache',key_param_name='id')asyncdeffindtest(*,id):awaitasyncio.sleep(1)now=datetime.datetime.now()dir={'time':now}returndirloop=asyncio.get_event_loop()future=asyncio.create_task(findtest(id='921h3918chachs'))loop.run_until_complete()在更新以及删除的接口调用delete@easycache.delete(prefix='testcache',key_param_name='id')asyncdefdeletetest(*,id,other):print('delete test ')awaitasyncio.sleep(1)returnotherloop=asyncio.get_event_loop()future=asyncio.create_task(deletetest(id='921h3918chachs'，other='test delete'))loop.run_until_complete()在批量更新以及删除的接口调用delete，并且定义处理批量参数的functiondefdelete2_param2keys(ids):res=[]ids_l=ids['list']foridinids_l:res.append('testcache:'+id['key'])returnres@easycache.delete(key_param_name='ids',opt_param2keys_func=delete2_param2keys)asyncdefdeletetest2(*,ids:dict,other):print('delete test two running')awaitasyncio.sleep(3)returnothermp={'list':[{'key':'921h3918chachs'},{'key':'9989898989891sa'}]}loop=asyncio.get_event_loop()future=asyncio.create_task(deletetest2(id=mp，other='test delete'))loop.run_until_complete()0.1.2修饰函数之后，函数变成异步函数，所以要异步调用
Package: rosettasciio
RosettaSciIOTheRosetta Scientific Input Output libraryaims at providing easy reading and
writing capabilities in Python for a wide range ofscientific data formats. Thus
providing an entry point to the wide ecosystem of python packages for scientific data
analysis and computation, as well as an interoperability between different file
formats. Just as theRosetta stoneprovided a translation between ancient Egyptian hieroglyphs and ancient Greek.
The RosettaSciIO library originates from theHyperSpyproject for multi-dimensional data analysis. As HyperSpy is rooted in the electron
microscopy community, data formats used by this community are still particularly
well represented.RosettaSciIO provides the dataset, its axes and related metadata contained in a
file in a python dictionary that can be easily handled by other libraries.
Similarly, it takes a dictionary as input for file writers.See thedocumentationfor further details.NoteRosettaSciIO has recently been split out of theHyperSpy repositoryand the new API is still under development. HyperSpy will use the RosettaSciIO IO-plugins from v2.0. It is already possible to import the readers directly from RosettaSciIO as follows:fromrsciioimportmsamsa.file_reader("your_msa_file.msa")
Package: rosette-api
Rosette APIThe Rosette Text Analytics Platform uses natural language processing, statistical modeling, and machine learning to
analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable
information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and
comparing the similarity of names, categorizing and adding linguistic tags to text and more.Rosette API AccessRosette CloudSign UpQuick StartInstallationpip install rosette_apiExamplesView small example programs for each Rosette endpoint
in theexamplesdirectory.Documentation & SupportBinding APIRosette Platform APIBinding Release NotesRosette Platform Release NotesBinding/Rosette Platform CompatibilitySupportBinding License: Apache 2.0Binding Developer InformationIf you are modifying the binding code, please refer to thedeveloper READMEfile.
Package: ros-get
ros-env is a collection of simple tools for working with ROS source
packages.InstallationTheros-getsoftware usespipto install itself. If you don’t have
it yet, it is available aspython-pipat Debian and Ubuntu. (Install
usingsudo apt installpython-pip.)Installation from PyPIpipinstallros-getFor development it is recommended to installros-getwithpip install-e. This installs a package in editable mode.Installation from sourceIf you like to both use and hackros-get, you can ‘install’ the
software by pointing the installation to the development code.Makeros-getavailable locally, eg by download or cloning the
repository, for examplegitclonehttps://github.com/Rayman/ros-get.gitInstall usingpipwith theeditableoption-eDIR.cdros-getpipinstall--user-e.The final.says thatpipshould redirect theros-getcommand relative to this directory (to./src/ros-get).UsageTODO: create a workspaceros-getinstalltue_configros-getremovetue_configros-getupdateComparison withtue-envSeparation between distro definition and the toolDistro definition according toREP
143Dependency definition according toREP
112Parallel git clone/pullPython (instead of bash)Uninstallpipuninstallros-get
Package: ros-glint
Make your ROS code sparkle!ROS Glint is a linter for ROS 1 and ROS 2 packages.
It is a pure Python version of the ROS 1 packageroscompile.Running from the Command LineInstalling the Python package installs theglint_roscommand. (Note: There's 5 million commands that start withros. [citation needed] The command isglint_rosfor ease of access/tab completion)The command will find all ROS packages in a the current directory and attempt to run the "glinters" on them all.usage: glint_ros [-h] [-f FOLDER] [-y] [-s] [linter ...]

positional arguments:
  linter                By default, run all linters. If any are specified here, only those
                        specified are run.

options:
  -h, --help            show this help message and exit
  -f FOLDER, --folder FOLDER
                        The folder to search for ROS packages in. Defaults to the current
                        directory.
  -y, --yes-to-all      Non-interactive mode that accepts all suggestions.
  -s, --skip-ros-load   Avoid loading ROS resources, useful in scripting environments.AcknowledgementsROS Glint logo byhttps://glowtxt.com/
Package: rosh
RoSh - Router ShellAboutThis is an interactive diagnostic shell for Linux-based routers. It is inspired by the CLI of classic network devices (e.g. Cisco IOS) and implements diagnostic functions similar to iproute2/bridge/ethtool/tc/wireguard. It is explicitly not intended for configuration changes, but to support the analysis of software routers by network engineers.CommandsThe following commands are available:disable
  interface        disable (shutdown) an interface
    {ifname}
enable
  interface        enable (no shutdown) an interface
    {ifname}
exit               exit from rosh
help               show command help
identify
  interface        initiate the adapter identify by sight procedure
    {ifname}
ifstatecli         run ifstatecli command
  <apply|check|shell|show|showall>
lbu                run lbu command
  <commit|ci|diff|exclude|include|list|ls|list-backup|lb|package|pkg|revert|status|st>
mtr                run mtr command
netns              change active netns namespace for subsequent commands
  {netns}
ping               run ping command
renegotiate
  interface        restart auto-negotiate on an interface
    {ifname}
reset
  interface        reset an interface
    {ifname} <flags|mgmt|irq|dma|filter|offload|mac|phy|ram|dedicated|all>
shell              launch a interactive system shell
show
  bridge
    fdb            show bridge forwarding database
      [dst <{ipv6}>] [ifindex <{ifname}>] [state <{state}>]
  interface        show interface details
    {ifname} [channels|coalesce|driver|eee|features|module|pause|priv-flags|ring|settings|stats|tstamp|tunnels]
  ip
    address        show assigned ipv4 addresses
      [index <{ifname}>]
    neighbour      show ipv4 neighbour cache entries (ARP)
      [dst <{ip}>] [ifindex <{ifname}>] [state <{state}>]
    route          show ipv4 routes
      [dst <{pfx}>] [gateway <{ip}>] [oif <{ifname}>] [proto <{proto}>] [scope <{scope}>] [table <{table}>]
    rule           show ipv4 routing policy rules
      [dst <{pfx}>] [iif <{ifname}>] [oif <{ifname}>] [proto <{proto}>] [src <{pfx}>] [table <{table}>]
  ipv6
    address        show assigned ipv6 addresses
      [index <{ifname}>]
    neighbour      show ipv4 neighbour cache entries
      [dst <{ipv6}>] [ifindex <{ifname}>] [state <{state}>]
    route          show ipv6 routes
      [dst <{pfxv6}>] [gateway <{ipv6}>] [oif <{ifname}>] [proto <{proto}>] [scope <{scope}>] [table <{table}>]
    rule           show ipv6 routing policy rules
      [dst <{pfxv6}>] [iif <{ifname}>] [oif <{ifname}>] [proto <{proto}>] [src <{pfxv6}>] [table <{table}>]
  netns            show netns namespaces
    {netns}
ssh                run ssh command
tcpdump            run tcpdump command
telnet             run telnet command
traceroute         run traceroute commandInstallAlpine LinuxRoSh is available in the community repository ofAlpine Linux edge.PyPiRoSh is available atPyPiand can be installed viapip:$ pip install rosh
Package: rosie
Prerequisites:Rosie installation (seehttps://gitlab.com/rosie-pattern-language/rosie)Rosie and the Rosie Pattern Language (RPL)RPL expressions are patterns for matching text, similar to regex but
more powerful.  You can use RPL for text pattern matching the way you
might use PCRE or regex in Perl, Python, or Java.  Unlike regex, RPL
is readable and maintainable, and packages of rpl are easily shared.The Rosie project provides a library so you can use RPL from a variety
of programming languages.  We also provide an interactive read-eval-
print loop for pattern development and debugging, and an RPL compiler.
The Rosie matching engine is very small and reasonably fast.Rosie’s home page:https://rosie-lang.orgThe repository of record for the Rosie project is located at:https://gitlab.com/rosie-pattern-language/rosieOpen issues are at:https://gitlab.com/rosie-pattern-language/rosie/issuesBefore opening an issue with a bug report or an enhancement request,
please check the current open issues.
Package: rosimg2mp4
rosimg2mp4A simple tool to record ROS2 Image topics to MP4.usage: main.py [-h]
[-i RGB_IMAGE_TOPIC_NAME]
[-o OUTPUT_MP4_FILE_NAME]
[-fs FRAME_SIZE FRAME_SIZE]
[-vf VIDEO_WRITER_FPS]

options:
  -h, --help
    show this help message and exit
  -i RGB_IMAGE_TOPIC_NAME, --rgb_image_topic_name RGB_IMAGE_TOPIC_NAME
    RGB image topic name.
  -o OUTPUT_MP4_FILE_NAME, --output_mp4_file_name OUTPUT_MP4_FILE_NAME
    Output MP4 file name. e.g. output.mp4
  -fs FRAME_SIZE FRAME_SIZE, --frame_size FRAME_SIZE FRAME_SIZE
    Frame size. e.g. --frame-size {Width} {Height}
  -vf VIDEO_WRITER_FPS, --video_writer_fps VIDEO_WRITER_FPS
    Video writer FPS.https://github.com/PINTO0309/mp42ros
Package: ros-introspect
ros_introspectros_introspectis a Pure Python library for working with the files in ROS packages in a structured way.
It is compatible with both ROS 1 and ROS 2.You can specify the path directly.from ros_introspect import Package
package = Package('/full/path/geometry_msgs')or you can use the built-in crawler to search recursivelyfrom ros_introspect import find_packages

for package in find_packages('/home/dlu/ros2_ws/src'):
    print(package)ThePackageClassAPackageis a path where the$PATH/package.xmlexists and a collection ofPackageFiles that are contained within that folder.Each of the package files are a subtype ofPackageFilebased on their functionality, with each of the subtypes being defined inros_introspect.components, including...package.xmlCMakeLists.txtSource code (Python or C++)ROS Interfaces, i.e. messages, services and actionsDynamicReconfig configurations (ROS 1 only)Plugin XML, for use withpluginlibLaunch files, bothXML(ROS 1) and Python (ROS 2)Parameter files (.yaml)RViz configurations (.rviz)Robot model files (.urdfand.xacro)setup.pyandsetup.cfgfor Python codeDocumentation (Markdown, RST, licenses, etc.)Miscellaneous Config files (various metadata like the.githubfolder)Everything that does not fall into one of those categories ends up as "Other"****Excluding.pyc,*~, and.git/files
Package: ros-lab
ROS-Lab: Docker-Based Robot Operating System Virtual LabA Docker-based virtual lab of Robot Operating System to help beginners learn and practise. It's based on docker image "muchensun/ros_turtlebot3_vnc", which is built on another docker image"dorowu/ubuntu-desktop-lxde-vnc". This lab is wrapped by a command line tool to simplify operations.InstallationIt's highly recommended to create a conda Python3 environment before installation.You can usepipto install(remember to use Python3), type the following command:pip install ros-labHow to useTyperos-labin command line, you will enter ros-lab.Inputhelpor?for command information.Have fun with ros-lab !Several tipsFor Ubuntu user, you may need to configure Docker before you start. If you have problems about user permission, please try the first answerhere.After executing the "start_lab" command, it may take sime time to start the lab. You can try to refresh the page.Useful linksThis work is finished inDistributed & Embedded System Lab, Lanzhou University.ROSOfficial Tutorial.TurtleBot3Official Manual.A very helpfulROS courseheld by ETH.
Package: ros-license-toolkit
ros_license_toolkitWarningFor any legal questions, please consult a lawyer. This tool is not a substitute for legal advice.MotivationROS packages must have licenses. This tool checks if the license declarations in thepackage.xmlmatches the license(s) of the code. We do this by usingscancode-toolkitto scan the code and compare the results to the declaration in thepackage.xmlFunctionalitygraph TD
    classDef stroke stroke:#333,stroke-width:2px;
    s([scan code for licenses and copyrights]) 
    class s stroke
    p[compare to\n package.xml\nfor linting]
    class p stroke
    c[create\ncopyright file\nfor release]
    class c stroke
    s --> p
    s --> cFeaturesThis checks:Is any license defined inpackage.xml?- LicenseTagExistsCheckHas at most one license tag without a source-files declaration?- LicenseTagExistsCheckDo all licenses tags follow the SPDX standard?- LicenseTagIsInSpdxListCheckAre license texts available and correctly referenced for all declared licenses?- LicenseTextExistsCheckDoes the code contain licenses not declared in any license tags source-file attribute (source-files="src/something/**")?- LicensesInCodeCheckUsageInstallationInstall the package from source:pipinstall.Basic UsageYou should then have the executable in your$PATHand can run it on any ROS package or a directory containing multiple ROS packages:ros_license_toolkitmy_ros_packageAll Options$ros_license_toolkit-h
usage:ros_license_toolkit[-h][-c][-v][-q]path

ChecksROSpackagesforcorrectlicensedeclaration.

positionalarguments:pathpathtoROS2packageorrepocontainingpackages

options:-h,--helpshowthishelpmessageandexit-c,--generate_copyright_filegenerateacopyrightfile-v,--verboseenableverboseoutput-q,--quietdisablemostoutputUsing it as a GitHub actionYou can useros_license_toolkitinside your GitHub workflow in order to check licenses in your
repository in each pull request. Use the following job inside your workflow file:jobs:check_licenses:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v3-uses:boschresearch/ros_license_toolkit@1.1.5State of DevelopmentWORK IN PROGRESSThis is currently working and feature complete to the point it was originally intended.
But there are still open points concerning testing and it is also very important to make sure how this behaves with existing ROS packages.
In particular, the following things will have to be done:To DoCoverage analysisLinter(s) per CIField trials (check existing ROS packages and see what to do with the results). seefield-trials/Evaluate runtime. If scancode-toolkit takes too long on too many cases, we will have to look for an alternative.Allow license name in tag to be also full name of SPDX key.Each LicenseTag should have SPDX id.Single license tag without file attribute and single license text should match automatically.Turn into github action.Licenseros_license_toolkit is open-sourced under the Apache-2.0 license. See theLICENSEfile for details.
Package: rosmobilelib
rosmobilelibEnable to struct movement robotic action with ROS, the open-source robotic middleware. This library make able to run that by Python3 code on external of ROS network and workspace.This is dependedroslibpythat allows ROS programing without defining as ROS Node by usingrospy.Main FeaturesManage features to set ROS robotic movement simply.Dynamic schedule to Goal with sending/waiting of Action.Provide some feature that use for programming with ROS such as coordinate transformation ofTF.Give support to synchronize to single callback for needs to subscribed multi topic such as stereo camera system.InstallationTo install rosmobilelib, usepip:pip install rosmobileliborpip install rosmobilelib --extra-index-url https://test.pypi.org/simpleDocumentationDetails coming soon. For now, just watch down and get through it.Example implementation:Import libraries.import roslibpy as rlp
from rosmobilelib import MobileClientPrepare connection with roslibpy. If you desire details seehere.client = rlp.Ros('localhost', port=9090)
lm1 = lambda: print('is ROS connected: ', client.is_connected)
client.on_ready(lm1)
client.run()DefineMobileClientobject and wait for to subscribe needs topics.lm2 = lambda r: print('reached goal', r)
ms = MobileClient(client, lm2, odom_topic='/odom', map_topic='/map')
ms.wait_for_ready()Use dynamic FCFS scheduler. Set goal and make able to execute goals. You can set goal any time not only after call start().Details:start(), stop(): make scheduling queue executable/inexecutablems.start()

# set scheduler a goal that go ahead 0.5 from robot body
ms.set_goal_relative_xy(0.5, 0, is_dynamic=False)

# set relative pos(x:front:-0.5, y:left:1) based basis vector that decided dynamic after previous executed
ms.set_goal_relative_xy(-0.5, 1, is_dynamic=True)

# set goal directly with world frame's pose
ms.set_goal(ms.get_vec_q(-0.4,-0.6,0), ms.get_rot_q(0,0,math.pi/2))

time.sleep(60)

ms.stop()There are other way to wait for time until reach goal. Exchangetime.sleep(n)toms.wait_for_execute_all()....
ms.wait_for_execute_all()
...
Package: ros-modex
ROS Model Extractor (WIP)This project provides a model extraction tool for ROS Launch applications.
It should be able to read launch files, interpret them, and build a model of the expected architecture of the ROS system at runtime.Package StructureToolingPackage StructureIt provides asrcdirectory, under which your own packages sit. Example files for__init__.py,__main__.pyandcli.pyare already provided.Tests are placed under thetestsdirectory, and documentation under thedocsdirectory.To start your new project, you should change its name, URL and metadata details at:README.mdCHANGELOG.mdsetup.pytests/*.pysrc/*ToolingThis package sets up varioustoxenvironments for static checks, testing, building and publishing.
It is also configured withpre-commithooks to perform static checks and automatic formatting.If you do not usetox, you can build the package withbuildand install a development version withpip.Assumecdinto the repository's root.To install thepre-commithooks:pre-commitinstallTo run type checking:tox-etypecheckTo run linting tools:tox-elintTo run automatic formatting:tox-eformatTo run tests:toxTo build the package:tox-ebuildTo build the package (withbuild):python-mbuildTo clean the previous build files:tox-ecleanTo test package publication (publish toTest PyPI):tox-epublishTo publish the package to PyPI:tox-epublish----repositorypypiTo install an editable version:pipinstall-e.