Saravanan666/pypi-org huggingface dataset:
Package: rosmontis
RosmontisRosmontis is a lightweight library that outputs a graph image usinggraphvizbased on the adjacency list, dictionary, or matrix. This module simplified the steps of creating a graph, where it adds the nodes and edges automatically from the input data to graphviz, creating the graph in one function call.InstallationCurrently,rosmontisonly supports Python 3. Usepipto install:$pipinstall--upgraderosmontisYou also need to havegraphvizinstalled in order to generate the image based on the.dotfiles. See the official website for the installation process:Graphviz.org.Usage & ExamplesUnweighted Undirected Graph in Adjacency Listimportrosmontisg=[['A',['B','E']],# node A is connected to node B and node E['B',['E','C']],# node B is connected to node E and node C['C',['D']],['D',['E','F']]]# output a png image representing the graph in the same# directory of this file.rosmontis.renderGraphList(graph=g,graphName="example1",weighted=False,directed=False)Weighted Undirected Graph in Adjacency Dictionaryimportrosmontis# node A is connected to node B with weight of 2, and node E with weight of 0.5# node B is connected to node E with weight of 0.2, and node C with weight of 3# ... etcg={'A':[['B',2],['E',0.5]],'B':[['E',0.2],['C',3]],'C':[['D',7]],'D':[['E',0.15],['F',1.6]]}rosmontis.renderGraphDict(graph=g,graphName="example2",weighted=True,directed=False)Unweighted Undirected Graph in Adjacency Matriximportrosmontis# Note column 0 and row 0 are the headers/labels of each node. The actual weight# starts from row 1 column 1# 1 indicates there is an edge, 0 indicates no connectiong=[[None,"A","B","C","D","E","F"],["A",0,0,0,0,1,1],["B",0,0,1,0,0,1],["C",0,1,0,1,0,0],["D",0,0,1,0,1,1],["E",1,0,0,1,0,1],["F",1,1,0,1,1,0]]rosmontis.renderGraphMatrix(graph=g,graphName="example3",weighted=False,directed=False)Weighted Directed Graph in Adjacency Matriximportrosmontis# Change the numbers from 1 to the weight value. Numbers other than 0 represents# a connection, vice versa.g=[[None,"A","B","C","D","E","F"],["A",0,2,0,0,0,3],["B",0,0,0,0,0.2,0],["C",0,0,0,7.5,0,13],["D",0,0,0,0,0,1.6],["E",0,0,0,0,0,-4],["F",0,0,0,0,0,0]]rosmontis.renderGraphMatrix(graph=g,graphName="example4",weighted=True,directed=True)See more examples in theexamples/folder.
Package: rosnet
rosnet🇰🇷 ‘rosnet’ 은 ML을 적용한 causal discovery 패키지입니다. 제 개인 연구를 위해 만들었지만, 다른 사람들도 최대한 사용하기 쉽도록 설계했습니다. 모든 코드는 혼자서 작성했습니다. 다만, 이용자의 편의를 위해 다른 패키지의 API 설계를 따라하긴 했습니다.🔠 ‘rosnet’is causal discovery package applied ML . I made it for my personal study. But, it is designed to be used as easy for others as possible. I created all the codes by myself. However, for the user's convenience, I followed the API design of other packages.목적 / Purpose🇰🇷 이 패키지의 목적은 다음과 같습니다 :ML 알고리즘을 Causal discovery에 적용텐서 기반으로 기존 ML 알고리즘 재설계🔠 The purpose of this package is as follows :Applying ML algorithm to Causal discoveryRe-engineering existing ML algorithm based on tensor설치 / Installment!pipinstallrosnet🔔 요구 패키지 / Required packagenumpy사용법 / Manual🇰🇷이 패키지의 API는scikit-learn, keras와 거의 비슷합니다!오직fit과predict, 두 개의 함수만 사용하시면 됩니다.🔠API of this package is just likescikit-learnandkeras!You only need to use two functions:fitandpredict.예시 / Example# Multilayer Perceptron# **Notice** : I made some ML algorithm as needed, but not all of them.#          If you just want to use ML algorithm itself,#          it is recommened to use other ML packages like scikit-learn, tensorflow ...fromrosnet.neural_networkimportlayersimportrosnet.neural_networkasnetworkX_train=# Your code, numpy.narray expectedy_train=# Your code, numpy.narray expecteddefbuild_model():model=network.Sequential([layers.Dense(64,activation='relu',input_shape=(X_train.shape[1],)),layers.Dense(64,activation='relu'),layers.Dense(64,activation='relu'),layers.Dense(64,activation='relu'),layers.Dense(4)])optimizer=network.optimizers.SGD(0.001)model.compile(loss='mse',optimizer=optimizer,metrics=['mae','mse'])returnmodelmodel=build_model()model.fit(X_train,y_train,epochs=100,batch_size=1000,validation_split=0.2,verbose=0)개발 기록 / Development log0.0.1 - 22.03.26rosnet.neural_networkrosnet.neural_network.Sequentialaddrosnet.neural_network.layersaddrosnet.neural_network.optimizersadd
Package: rosnik
rosnik-pythonGetting startedInstallpipinstall--upgraderosnikConfigurationThen in your application code:importrosnikrosnik.init(api_key="api-key",environment="development")Environment VariablesPlease note that environment variables will override configuration values passed in via initialization.# This is required to authenticate against our event ingestion tierROSNIK_API_KEY=# This is optional and will mark events to the application environment (e.g. development, staging, production).# If not supplied, it will go into a default environment.ROSNIK_ENVIRONMENT=# Setting this to 1 will send events on the foreground thread.# If it's not supplied or set to 0, it will send events on a# background thread.ROSNIK_SYNC_MODE=IntegrationsPlease let us know if there are other providers that would be helpful to have automatic instrumentation.AI ProvidersOpenAI: we support tracking Completion and ChatCompletion creationsWeb FrameworksFlask:fromrosnikimportflask_rosnikrosnik_extension=flask_rosnik.FlaskRosnik(api_key="api-key",environment="development")# rosnik.init happens hererosnik_extension.init_app(app)Django:# settings.pyMIDDLEWARE=[# ...other middleware'rosnik.frameworks.django.rosnik_middleware']# The middleware pulls from settings on init.ROSNIK_API_KEY="api-key"ROSNIK_ENVIRONMENT="development"LicenseLicensed under the MIT license. SeeLICENSE.Interested in learning more?Send us an email athello@rosnik.ai!
Package: ros-node-utils
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Package: rosnumpy
ros_numpyNote: This is the same as the original ros_numpy package byeric-wieserjust edited to be OS independent and installable using pip.Install using:pip install rosnumpyQuick StartPointCloud2 msg to Numpy array:importros_numpyimportsensor_msgsdefget_pc_from_ros_pc2_msg(msg):""" Returns point-cloud as a structured numpy array.Note: can be used with any topic of message type 'sensor_msgs/PointCloud2'"""msg.__class__=sensor_msgs.msg.PointCloud2returnros_numpy.numpify(msg)pc_array=get_pc_from_pc2_msg(msg)Image msg to Numpy array:importros_numpyimportsensor_msgsdefget_img_from_ros_image_msg(msg):""" Returns image as a numpy array.Note: can be used with any topic of message type 'sensor_msgs/Image'"""msg.__class__=sensor_msgs.msg.Imagereturnros_numpy.numpify(msg)img_array=get_img_from_ros_image_msg(msg)
Package: rosny
rosny is a lightweight library for building concurrent systems.InstallationTested on:LinuxPython >= 3.6From pip:pipinstallrosnyFrom source:pipinstallgit+https://github.com/lRomul/rosny.git@masterExamplefrommultiprocessingimportQueuefromrosnyimportThreadStream,ProcessStream,ComposeStreamclassSenderStream(ThreadStream):# using threading.Threaddef__init__(self,queue:Queue):super().__init__(loop_rate=30)self.queue=queueself.count=0# run the method in a loop in a separate threaddefwork(self):self.queue.put(self.count)self.logger.info(f'put{self.count}')self.count+=1classReceiverStream(ProcessStream):# using multiprocessing.Processdef__init__(self,queue:Queue):super().__init__()self.queue=queue# run the method in a loop in a separate processdefwork(self):value=self.queue.get(timeout=1)self.logger.info(f'get{value}')classMainStream(ComposeStream):# merging several streamsdef__init__(self):super().__init__()queue=Queue()self.sender=SenderStream(queue)self.receiver=ReceiverStream(queue)if__name__=="__main__":stream=MainStream()stream.start()stream.wait(5)stream.stop()stream.join()
Package: rospy-nonlocalstubs
rospy-nonlocalstubsA hack to get your editor to recognize rospy functions without installing ros or rospy on your system. This is for people like me, who run their ROS nodes inside a docker container and therefore don't have ROS installed on the environment they run their editor in.This makes use of the fact that most editors/LSPs will also check for the PEP 561 -stubs package, even when the base package is not installed, and the fact that type stubs are still valid, even when all arguments areAnyandIncomplete. To reiterate: this is an ugly hack that just happens to work awfully conveniently.Please do not install this package in any environment that also has ros installed. That might break stuff.To install, simply runpip install rospy-nonlocalstubsin the same environment as the one your editor lives in.This package can be automatically updated to the latest version of rospy by anyone who has mypy (more specifically, its submodule stubgen) installed:# Update the git submodule in which rospy livesgitsubmoduleinit&&gitsubmoduleupdate# Generate the stubs with stubgen./build.sh
Package: rospy-yaml-include
rospy_yaml_includeIntroductionrospy_yaml_include is a package that provides a YAML loader that can include other YAML files.It can either include a file given an absolute path,
or given a ROS package name and a relative path.rospy_yaml_include has a recursive check to prevent circular imports.UsageThe following section contains code snippets showing example usage of the package.
Additionally, the tests directory contains a few examples of how to use the package.Note that alternative to the below example which use inline yaml,
the yaml.load command can be used within awith open()statement
to load yaml from a file.Including a yaml from a ROS packagefromrospy_yaml_include.yaml_includeimportRospyYamlIncludeimportyamlyml="""value:- 10fields: !ros_includepackage: rospy_yaml_include_testextension: test_files/circular_import_ros.yaml"""constructor=RospyYamlInclude()yaml.load(yml,Loader=constructor.add_constructor())Dynamic loading of yaml filesUsing the!includetag, YamlInclude will attempt
to infer whether a dynamic of an absolute path is provided.
If the path provided has a leading / when it is treated
as an absolute path, otherwise it is treated as a relative path.
If the path provided is a relative path, then the base_directory parameter
must be set during instantiation or else an error will be raised.Including a yaml from a relative path with dynamic tagfromrospy_yaml_include.yaml_includeimportRospyYamlIncludeimportosimportyamlcwd=os.getcwd()yml="""value:- 10fields: !include test_files/import.yaml"""constructor=RospyYamlInclude(base_directory=cwd)yaml.load(yml,Loader=constructor.add_constructor())Including a yaml from an absolute path with dynamic tagfromrospy_yaml_include.yaml_includeimportRospyYamlIncludeimportyamlyml="""value:- 10fields: !include /path/to/file.yml"""constructor=RospyYamlInclude()yaml.load(yml,Loader=constructor.add_constructor())Including a yaml with a relative pathThe YamlInclude class contains an optional parameter to set a base path. If this base path is set during instantiation, then the !relative_include flag can be usedfromrospy_yaml_include.yaml_includeimportRospyYamlIncludeimportosimportyamlcwd=os.getcwd()yml="""value:- 10fields: !relative_include test_files/import.yaml"""constructor=RospyYamlInclude(base_directory=cwd)yaml.load(yml,Loader=constructor.add_constructor())Including a yaml from an absolute pathfromrospy_yaml_include.yaml_includeimportRospyYamlIncludeimportyamlyml="""value:- 10fields: !path_include /path/to/file.yml"""constructor=RospyYamlInclude()yaml.load(yml,Loader=constructor.add_constructor())Substituting a parameter (string) from a rosparamexample_key:!ros_param_substitute${rosparam_name_in_scope}example_def:!ros_param_substitute${rosparam_name_in_scope; <default value>}Note: ValueError is raised ifrosparam_name_in_scopeis not found;
HOWEVER, if; <default value>is provided (MUST be semicolon separated),
then the default value is used.Substituting a parameter (string) from an environment variableexample_key:!variable_substitute${ENVIRONMENT_VARIABLE_NAME}
Package: rosrestpy
RosRestPyMikrotik's RouterOS v7 REST API python moduleRouterOS v7 REST API SupportCheck Here for API Support.Not all types and methods of the RouterOS v7 REST API are supported, yet.
Finding any bugs? PleaseCreate IssueInstallingYou can install or upgrade rosrestpy with:pipinstallrosrestpy--upgradeExamplefromrosimportRos# Initiate Ros objectros=Ros("https://192.168.88.1/","admin","")# Check cpu loadifros.system.resource.cpu_load>90:print(f"{ros.system.identity}'s CPU > 90%")# Print all interface nameforinterfaceinros.interface():print(interface.name)# Finding specific queuequeues=ros.queue.simple(name="Hotspot")iflen(queues)==1:queue=queues[0]print(f"Usage{queue.bytes}")# Adding new /simple/queuefromros.queueimportSimpleQueuenew_queue=SimpleQueue(name="Test",target="192.168.88.0/24",max_limit="10M/10M",disabled=True)new_queue=ros.queue.simple.add(new_queue)print(new_queue)# Updating /simple/queuetest_queue=ros.queue.simple(name="Test")[0]new_test_queue=ros.queue.simple.set(test_queue,{"comment":"Test comment"})print(new_test_queue)# Using /tool/bandwith-testbw_tests=ros.tool.bandwith_test("172.16.0.1","3s","admin",direction="both")result_bw_test=bw_tests[-1]print(f"Download{result_bw_test.rx_total_average}")print(f"Upload{result_bw_test.tx_total_average}")ResourcesTheRouterOS REST APIis the technical reference forrosrestpy.ContributingContributions of all sizes are welcome. Please review ourcontribution guidelinesto get started. You can also help byreporting bugs or feature requests.Open Source NoticeBig thanks toattrsandcattrsas the bases of rosrestpy, without them this module creation would be very tedious!
Package: rossby
RossbyA wrapper for the National Weather Service APIInfoDocumentation for the National Weather Service API can be foundhere.Everything that is used to construct this wrapper is contained in
the directory you are currently in. There are 3 files that wrap the
entire API:rossby.pyapi_config.pydefault_response.pyAll of the endpoints can be found in the fileapi_config.py,
variableapi_endpoints. Each key in this dictionary variable
defines the name of a base endpoint that can be called on aRossby()object. Subsequent key-value pairs represent the unique
methods that can be called on the base endpoint.Getting StartedfromrossbyimportRossbyrossby=Rossby()kunv=rossby.stations.by_id(station_id='KUNV')print(kunv.geometry)print(kunv.geometry.coordinates)# equivalent to kunv.geometry['coordinates']office=rossby.offices.by_id(office_id='CTP')print(office.address)print(office.address.streetAddress)print(office.responsibleCounties)
Package: rossendorfer-farbenliste
rossendorfer_farbenlisteWritten 2020, Michal SmidThis package contains colors and colorscales which correspond to the style guideline of HZDR (Helmholtz-Zentrum Dresden Rossendorf).See description athttps://gitlab.hzdr.de/smid55/rosahami_processorSIMPLEST USAGE EXAMPLE:import rossendorfer_farbenliste as roflplt.imshow(some_image,cmap=rofl.cmap())
Package: rossmassey.fetch-leetcode-problem
Fetch ProblemPython package to get a dictionary with information about a leetcode problem, formatted inrstInstallingInstall package withpip install rossmassey.fetch-leetcode-problemUseimport fetch_leetcode_problemorfrom fetch_leetcode_problem import ...Documentationcd docs && make htmlSphinx documentation is generated from the docstringshttps://rossmassey.github.io/fetch-leetcode-problem/Building & Publishing to PyPIThis is done automatically on release tag by GitHub actionsManuallyAssume.pypircconfigured in user home directory wih PyPI credentialsrm -rf dist
python3 -m build
python3 -m twine upload --repository pypi dist/*
Package: ross-rotordynamics
Rotordynamic Open Source Software (ROSS)ROSS is a Python library for rotordynamic analysis, which allows the construction of rotor models and their numerical
simulation. Shaft elements are modeled with the Timoshenko beam theory, which considers shear and rotary inertia
effects, and discretized by means of the Finite Element Method. Disks are assumed to be rigid bodies, thus their strain
energy is not taken into account. Bearings and seals are included as linear stiffness and damping coefficients.After defining the elements for the model, you can plot the rotor geometry and run simulations such as static analysis,
modal analysis, undamped critical speed, frequency response, unbalance response, time response, and more.You can try it out now by running the tutorial onbinderDocumentationAccess the documentationhere.
The documentation provides theinstallation procedure,a tutorial,examplesand theAPI reference.QuestionsIf you have any questions, you can use theDiscussionsarea in the repository.Contributing to ROSSROSS is a community-driven project. If you want to contribute to the project, please
checkCONTRIBUTING.md.The code has been initially developed by Petrobras in cooperation with the Federal University of Rio de Janeiro (UFRJ)
with contributions from the Federal University from Uberlândia (UFU).
Currently, Petrobras has a cooperation agreement with UFRJ (LAVI) and UFU (LMEST) to develop and maintain the code.
Package: rosstat-flc
РосСтат ФЛКИнструмент для форматно-логического контроля отчетности, отправляемой в РосСтат.Документация описывающая формат отчетности и контроли -Приказ РосСтата от 28.10.2010 №372Список изменений -CHANGELOGУстановкаpipinstallrosstat-flcЗависимостиPLYlxmlИспользованиеfromrosstat.flcimportparse_schema,parse_report# На вход передаются ElementTree, Element, bytes, file name/path, или file-like объектыschema=parse_schema('schema.xml')report=parse_report('report.xml',skip_warns=True)forresultinschema.validate(report):print(result)# {'code': '4.30', 'name': 'Проверка контролей', 'description': 'XML Подраздел 2 стр. 201-202 гр.3 = "1" или "2", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'level': 1}# {'code': '4.60', 'name': 'Проверка контролей', 'description': 'XML Подраздел 2 стр. 203 гр. 3 = "1" или "2", или "3", или "4", или "5", или "6", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'level': 1}Результат проверки всегда список. При успешной проверке список будет пустой.Если на одном из этапов проверки будут выявлены ошибки, проверка будет прервана и вернутся все ошибки обнаруженные на этом этапе.С блоками проверок их порядком и описанием ошибок можно ознакомитьсяздесь.Флагskip_warnsопределяет будут ли выводится предупреждения о пропуске контролей с проверками за прошлый период (эти проверки невозможно реализовать не имея доступа к ранее сформированному отчёту).Полеlevelв результатах означает уровень проверки. 1 - ошибка, 0 - предупреждение.
Package: roster
rosterPython object registers. Keep track of your classes, functions and data.Installationrostercan be installed fromPyPIpip install rosterUsage:RecordDefault RecordfromrosterimportRecordnumbers:Record[int]=Record()numbers(1)numbers(2)numbers(3)>>>numbers[1,2,3]Generate eachitemfromrosterimportRecordcharacters:Record[str]=Record()@characters.itemdefcharacter(char:str,/)->str:returnchar.upper()character('a')character('b')character('c')>>>characters['A','B','C']RegisterDefault RegisterfromrosterimportRegisterservices:Register[str,type]=Register()@services('youtube')classYouTube:pass@services('spotify')classSpotify:pass>>>services{'youtube':<class'__main__.YouTube'>, 'spotify': <class '__main__.Spotify'>}Generate eachkeyfromrosterimportRegisterfromtypingimportCallablefunctions:Register[str,Callable]=Register()@functions.keydeffunction(name:str,/)->str:returnname.upper()@function('foo')deffoo():pass@function('bar')defbar():pass>>>functions{'FOO':<functionfooat0x7f9c4f065790>,'BAR':<functionbarat0x7f9c4f065820>}Generate eachvaluefromrosterimportRegisterfromtypingimportCallablefunctions:Register[str,Callable]=Register()@functions.valuedeffunction(name:str,/)->str:returnname.upper()@function('foo')deffoo():pass@function('bar')defbar():pass>>>functions{<functionfooat0x7f26443aa790>:'FOO',<functionbarat0x7f26443aa820>:'BAR'}Generate eachentryfromrosterimportRegisterfromtypingimportTupleidentifiers:Register[str,str]=Register()@identifiers.entrydefidentifier(code:str,/)->Tuple[str,str]:return(code[0],code.upper())identifier('foo')identifier('bar')>>>identifiers{'f':'FOO','b':'BAR'}
Package: rosteron
Therosteronmodule allows read-only access
to rostering information in instances of RosterOn Mobile,
a workforce management product fromAllocate Software.>>> import rosteron
>>> with rosteron.Session('https://rosteron.xyz.com.au/RosterOnProd/Mobile') as session:
...     session.log_in('joe.bloggs', 'abc123')
...     snapshot = session.get_roster()
>>> print(snapshot)
<Snapshot (time=2019-06-10T08:03:12+00:00, len=19)>
>>> for item in snapshot[:3]:
...     print(item)
<Item (date=2019-06-11, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>
<Item (date=2019-06-12, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>
<Item (date=2019-06-13, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>FeaturesRoster data includes server-side retrieval timestamps.Sessions automatically log out after use (when used in awithblock).Meaningful Python exceptions are raised when problems arise.Requests & responses to/from RosterOn
can optionally be logged to files for debugging.InstallationInstall this module fromPyPIusingpip:pip install rosteronSupportBug reports, feature requests, and questions are welcome
via the issue tracker.Issue tracker:https://github.com/Lx/python-rosteron/issuesContributeSample responses from other RosterOn installationsRoster output is minimally structured
on the assumption that each RosterOn instance formats its data differently
(the author has only seen data from one RosterOn Mobile instance).Roster response samples from other RosterOn Mobile instances
would be very gratefully received,
as these may demonstrate uniformity across all instances,
which would allow future releases of this module to provide more structured output.Source codePull requests are gratefully received and considered.GitHub repository:https://github.com/Lx/python-rosteronLicenseThis project is licensed under theMIT License.