Saravanan666/pypi-org huggingface dataset:
Package: py-mrm
PyMRM: Python Package for Multiphase Reactor ModelingOverviewWelcome to PyMRM, a Python package designed for creating phenomenological models of multiphase reactors. Developed within the ambit of the Multiphase Reactor Modeling course at Eindhoven University of Technology, this package finds its roots in the Department of Chemical Engineering and Chemistry.PyMRM is the brainchild of Martin van Sint Annaland and Frank Peters. Originally implemented in Matlab, PyMRM stands today as a port to Python, signifying a step forward in accessibility and versatility.Getting StartedTo get a comprehensive understanding of PyMRM's capabilities, we recommend exploring the included Jupyter notebook. This notebook is packed with examples that demonstrate the application of the package in the realm of chemical engineering.FeaturesComprehensive set of functions for modeling multiphase reactorsUser-friendly interface tailored for both students and professionalsExtensive documentation and example-based learningHow to Installpip install py_mrmQuickstart GuideStart implementing 1D reaction-diffusion equations, proceed to convection, different phases, mass transfer, etc.ContributingWe welcome contributions from the community. If you're interested in enhancing PyMRM or have suggestions, please see our contributing guidelines.
Package: pymrt
PyMRT- Python Magnetic Resonance Tools: the multi-tool of MRI.____        __  __ ____ _____
|  _ \ _   _|  \/  |  _ \_   _|
| |_) | | | | |\/| | |_) || |
|  __/| |_| | |  | |  _ < | |
|_|    \__, |_|  |_|_| \_\|_|
       |___/OverviewThis software provides a support Python library and auxiliary console-based
tools to perform common tasks for Magnetic Resonance Imaging (MRI).
The aim is to be the multi-tool of MRI.At present, the following features are best supported:generic tools for image analysis from an MRI perspectivedata analysis for quantitative MRI experimentsOn top of this, additional effort is currently being put in the following
areas:image reconstruction and related features (e.g. coil combination, etc.)It is relatively easy to extend and users are encouraged to tweak with it.As a result of the code maturity, some of the library components may undergo
(eventually heavy) refactoring, although this is currently unexpected.Releases information are available throughNEWS.rst.For a more comprehensive list of changes seeCHANGELOG.rst.InstallationThe recommended way of installing the software is throughPyPI:$pipinstallpymrtAlternatively, you can clone the source repository fromGitHub:$mkdirpymrt$cdpymrt$gitclonegit@github.com:norok2/pymrt.git$pythonsetup.pyinstallFor more details see alsoINSTALL.rst.LicenseThis work is licensed through the terms and conditions of theGPLv3+The use of this software for scientific purpose leading to a publication
should be acknowledged through citation of the following reference:Metere, R., Möller, H.E., 2017. PyMRT and DCMPI: Two New Python Packages for MRI Data Analysis, #3816: Proceedings of the 25th Annual Meeting & Exhibition of the International Society for Magnetic Resonance in Medicine (ISMRM), Honolulu, Hawaii, USA.AcknowledgementsThis software originated as part of the Ph.D. work of Riccardo Metere at theMax Planck Institute for Human Cognitive and Brain Sciencesand theUniversity of Leipzig, and has been constantly expanded from there.For a complete list of authors please seeAUTHORS.rst.People who have influenced this work are acknowledged inTHANKS.rst.This work was partly funded by the European Union
through the Seventh Framework Programme Marie Curie Actions
via the “Ultra-High Field Magnetic Resonance Imaging: HiMR”
Initial Training Network (FP7-PEOPLE-2012-ITN-316716).
Package: py-ms
Python Microservices LibraryPyMS, Python MicroService, is aMicroservice chassis patternlike Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build
microservices with Python which handles cross-cutting concerns:Externalized configurationLoggingHealth checksMetricsDistributed tracingPyMS is powered byFlask,ConnexionandOpentracing.Get started withInstallationand then get an overview with theQuickstart.DocumentationTo know how to use, install or build a project see thedocs.Installationpipinstallpy-ms[all]QuickstartSee ourquickstart webpageCreate a project from scaffoldSee ourCreate a project from scaffold webpageHow To contributeWe appreciate opening issues and pull requests to make PyMS even more stable & useful! SeeThis docfor more details.
Package: pyMSA
Scoring Multiple Sequence Alignments with PythonpyMSA is an open source software tool aimed at providing a number of scores for
multiple sequence alignment (MSA) problems. Atutorialabout pyMSA is available in the resources folder of the proyect.FeaturesScore functions implemented:Sum of pairs,Star,Minimum entropy,Percentage of non-gaps,Percentage of totally conserved columnsandSTRIKE (Single sTRuctureInducedEvaluation).DownloadingTo download PyMSA just clone the Git repository hosted in GitHub:$gitclonehttps://github.com/benhid/pyMSA.git
$pythonsetup.pyinstallAlternatively, you can install it withpip:$pipinstallpyMSAUsageAn example of running all the included scores is located in theexamplefolder.AuthorsActive development teamAntonio Benítez-Hidalgoantonio.b@uma.esAntonio J. Nebroantonio@lcc.uma.esLicenseThis project is licensed under the terms of the MIT - see theLICENSEfile for details.
Package: pymsbuild-rust
pymsbuild-rustThis is apymsbuildextension for
compiling native modules written in Rust.Quick StartIn your_msbuild.py, importRustPydFileandCargofrompymsbuild_rust(usingimport *is okay).While Cargo is used to run the build, all files need to be specified from your_msbuild.pyfile to be collected when building an sdist, and to handle
incremental builds correctly.frompymsbuildimport*frompymsbuild_rustimport*METADATA={...}PACKAGE=Package('package',PyFile("__init__.py"),RustPydFile("native",Cargo("Cargo.toml"),SourceFile("src/lib.rs"),source="native"),)TheCargoelement refers to yourCargo.toml, which should specify that acdylibis to be built. The name of the lib should match the name provided toRustPydFile, which will also be the resulting extension module's name.[lib]name="native"crate-type=["cdylib"]Other than this, the module may build in any way it likes. Most likely, you
will usePyO3, and so should follow their documentation for
instructions on setting up the rest of your project (ignoring the parts that
refer to other build backends such as Maturin).Other files listed in theRustPydFilewill be included in your sdist, and will
be used to determine whether the module needs to be recompiled.Theoretically, multipleCargoelements will trigger multiple builds. However,
as they will all be directed into the same directory, this may not do what you
hope. Advanced users may find some value regardless.
Package: pymscada-pycomm3
pymscada-pycomm3Rockwell PLC driver for pymscada using pycomm3cd# to location of config dircp{xxx}/site-packages/pymscada-pycomm3/demo/pycomm3.yamlconfig
viconfig/pycomm3.yaml# edit as appropriate for your siteviconfig/tags.yaml# add any tagsviconfig/wwwserver.yaml# add tags on web pagepython-mpymscada_pycomm3This will put Logix data on thepymscadabus as tag values.
Package: pymschap
# pymschappython mschap# Exampledef verify_radius_request(ms_chap_response,authenticator_challenge,username,userpwd,secret,authenticator):import sixfrom pymschap import mschap, mpperesult = {}if len(ms_chap_response)!=50:raise Exception("Invalid MSCHAPV2-Response attribute length")# if isinstance(userpwd, six.text_type):#     userpwd = userpwd.strip().encode('utf-8')nt_response = ms_chap_response[26:50]peer_challenge = ms_chap_response[2:18]nt_resp = mschap.generate_nt_response_mschap2(authenticator_challenge,peer_challenge,username,userpwd,)if nt_resp == nt_response:auth_resp = mschap.generate_authenticator_response(userpwd,nt_response,peer_challenge,authenticator_challenge,username)result['MS-CHAP2-Success'] = auth_respresult['MS-MPPE-Encryption-Policy'] = '\x00\x00\x00\x01'result['MS-MPPE-Encryption-Type'] = '\x00\x00\x00\x06'mppeSendKey, mppeRecvKey = mppe.mppe_chap2_gen_keys(userpwd, nt_response)send_key, recv_key = mppe.gen_radius_encrypt_keys(mppeSendKey,mppeRecvKey,secret,authenticator)result['MS-MPPE-Send-Key'] = send_keyresult['MS-MPPE-Recv-Key'] = recv_keyelse:result['Reply-Message'] = "E=691 R=1 C=%s V=3 M=<password error>" % ('\0' * 32)return result
Package: py-msci-esg
MSCI ESG (Environment, Social, Governance) Corporate Search Tool ScraperMSCI Inc., is an American finance company headquartered in New York City and serving as a global provider of equity, fixed income, hedge fund stock market indexes, multi-asset portfolio analysis tools and ESG products. It publishes the MSCI BRIC, MSCI World and MSCI EAFE Indexes.ESG Risk Ratings provided by MSCI are designed to measure a company's resilience to long-term, industry material environmental, social and governance (ESG) risks. MSCI uses a rules-based methodology to identify industry leaders and laggards according to their exposure to ESG risks and how well they manage those risks relative to peers.What is it?This is a simple package that uses Selenium to scrape content from the MSCI.comESG (Environment, Social, Governance) Risk Corporate Search Tool.Why was this created?ESG risk ratings play an important role in stock market analysis, and previously, the only way of obtaining this data from MSCI was to open the Search Tool in a browser, search for a symbol, and click on one of the autosuggested results. This automates the collection of the important ESG risk rating data, both historical and current, and returns it in JSON format.
This project was built as a supplemental tool forStockScope, which is a Django web application in development for providing AI-driven Stock Market querying and alerting capabilities.How to UseThe following is a sample Python code snippet that uses this package.from msci_esg.ratefinder import ESGRateFinder

# Create an ESGRateFinder object, optionally passing in debug=True for more print statements
ratefinder = ESGRateFinder()

# Call the ratefinder object's get_esg_rating method, passing in the Apple stock symbol and 
# a JS timeout of 5 seconds (this is how long the Selenium web driver should wait for JS to execute 
# before scraping content)
response = ratefinder.get_esg_rating(
    symbol="TSLA",
    js_timeout=5
)
# The response is a dictionary; print it
print(response)
# Will look like: 
# {'rating-paragraph': 'Tesla is average among 40 companies in the automobiles industry.', 'rating-history-paragraph': "Tesla's rating remains unchanged since April, 2019.", 'current': {'esg_rating': 'a', 'esg_category': 'average'}, 'history': {'jul-17': 'aaa', 'apr-18': 'aa', 'aug-18': 'aa', 'apr-19': 'a', 'apr-20': 'a'}}If you use a symbol that doesn't have any data on the ESG Ratings Corporate Search Tool (e.g. AAPL), the output will look like:MSCI ESG Ratings Corporate Search Tool may not have data for the stock AAPL.  To verify this, open https://www.msci.com/our-solutions/esg-investing/esg-ratings/esg-ratings-corporate-search-tool and search for your stock to see if the resulting page contains data.
Package: py-mscip
py_mscippy_mscip is a python library for interfacing with Memsense IMU devices.Installationpy_mscip is available as a PyPi package for convenience. To add the latest stable version to your project, install the library using pip:pip install py_mscipBasic Usagepy_mscip provides a number of classes to make interfacing with Memsense IMUs convenient. The most basic of these is the Conn class which manages reading and writing to a serial connection. An example of a simple script to read values from the IMU and print them to the screen would be:frompy_mscip.interfaces.connimportConnfromserialimportSerialser=Serial(args.comport,args.baudrate)conn=Conn(ser,args.format)whileTrue:packets=conn.read()ifpackets:forpacketinpackets:print(packet)Additional examples along with API details and development information can be found in theofficial documentation.
Package: pymsd
the python sdk ofmsd-rsAlthough grpc can be used at any time, throughmsd-prototo generate client code to connect to themsdservice,msd-sdk-pythonSimplifies the process and provides some handy helper functions to make calling easier尽管任何时候都可以使用 grpc, 通过msd-proto来生成连接msd服务的客户端代码，msd-sdk-python简化了这个过程, 并提供了一些方便的辅助函数, 使得调用更加容易安装 (Install)pip install pymsd使用 (Usage)快速上手 (QuickStart)importpymsd# msd 服务的地址 | msd server addressHOST='127.0.0.1:50051'df=pymsd.msd_query(HOST,'select * from kline1d.sh600000')# 或者使用异步模式 | or use aysnc mode# df = await pymsd.msd_query_async(HOST, 'select * from kline1d.sh600000')# to_pandas_dataframe 将结果集转换为 pandas.DataFrame, 需要 pandas 已经安装 | use `to_pandas_dataframe` covert result to pandas.DataFrame# to_polars_dataframe 将结果集转换为 polars.DataFrame, 需要 polars 已经安装 | use `to_polars_dataframe` covert result to polars.DataFrame# to_numpy_list 将结果集转换为[(名字, numpy.ndarray)], 需要 numpy 已经安装  | use `to_numpy_list` covert result to list of (name, numpy.ndarray)df=pymsd.to_pandas_dataframe(df)print(df)自建连接pymsd 提供了简单接口, 使用全局的服务连接, 也可以自建连接, 这时会有更好的控制pymsd provides a simple interface, using the global service connection, you can also build your own connection, then there will be better controlimportpymsdimportgrpc# 创建 grpc 连接 | create grpc connectionwithgrpc.insecure_channel(_HOST)aschannel:stub=pymsd.DataFrameServiceStub(channel)# 创建请求 | new requestreq=pymsd.GetDataFrameRequest()req.sql=sql# 触发请求 | invoke requestresp=stub.Get(req)# df 即是返回的结果集, 可以根据不同的需要, 将其转换成 pandas.DataFrame 等等 | df is the result, that can be convert to pandas.DataFrame etc.df=resp.values
Package: pyMSDtorch
pyMSDtorch provides easy access to a number of segmentation and denoising methods using convolution neural networks.
The tools available are build for microscopy and synchrotron-imaging/scattering data in mind, but can be used elsewhere
as well.The easiest way to start playing with the code is to install pyMSDtorch and perform denoising/segmenting using custom
neural networks in our tutorial notebooks located in the pyMSDtorch/tutorials folder.Check the readthedocs page or the README.md file for more information.History0.1.0 (2021-08-10)First release.0.1.1 (2022-11-28)Second releasegetting ready for ‘pip install pyMSDtorch’added docstrings as much as we canbuilding template notebooks0.1.2-6 (2022-12-15)Second release - but now for realReady for ‘pip install pyMSDtorch’Documentation updateAdded notebooks and functionality for image classification
Package: pymsg
pymsy安装pipinstallpymsgclassDingTalkRobot因钉钉的自定义机器人存在限制："每个机器人每分钟最多发送20条"；为方便使用，该类实例会暂存未发送的消息，并在之后尝试再次发送。示例>>> from pymsg import DingTalkRobot

>>> robot = DingTalkRobot('https://oapi.dingtalk.com/robot/send?access_token=***')

>>> robot.text(
...     content='我就是我,  @1825718**** 是不一样的烟火',      # 消息内容
...     at='1825718****',                                  # 被@人的手机号, 可传多个
...     at_all=False                                       # @所有人，默认：False
... )
0                                                          # 返回暂存队列长度详细功能请参考代码
Package: py-msgraph
InstallationUse pip:pip install py-msgraphorpip install git+https://github.com/shineum/py_msgraph.gitPrerequisiteTo use MS graph API, MS application is necessary and tenant_id, client_id and client_secret are prepared.
It is needed to assign the permissions in the MS application depending on the APIs.Here are reference URLs.# Set up a Tenant
https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant

# Register an application
https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

# Graph API Permissions
https://learn.microsoft.com/en-us/graph/permissions-referenceGetting StartedInitialize MSGraphServiceClient instance.from py_msgraph import MSGraphServiceClient

config = {
    'tenant_id':      '<tentant_id>',
    'client_id':      '<client_id>',
    'client_secret':  '<client_secret>'
}

client: MSGraphServiceClient = MSGraphServiceClient(config)UsagesGet dataTo get data, use "get_data" method.data = client.get_data('<api_name>', '<options - optional>', '<version: api version - optional>')ex)data = client.get_data('users', {'$filter': "userPrincipalName eq 'youremail@yourdomain.com'", '$select': 'id'})
print(data)Post requestTo send post request, use "post_data" method.result = client.post_data('<api_name>', '<data: request body - optional>', '<headers: headers - optional>', '<version: api version - optional>', '<files: attachment - optional>')ex)user_id = "<user guid>"
group_id = "<group guid>"
req_body = {
    "@odata.id": f"https://graph.microsoft.com/v1.0/users/{user_id}"
}
result = client.post_data(f"groups/{group_id}/members/$ref", req_body)
print(result)OthersThis library also support put, patch and delete methods.result = client.put_data('<api_name>', '<data: request body - optional>', '<headers: headers - optional>', '<version: api version - optional>', '<files: attachment - optional>')

result = client.patch_data('<api_name>', '<data: request body - optional>', '<headers: headers - optional>', '<version: api version - optional>', '<files: attachment - optional>')

result = client.delete_data('<api_name>', '<data: request body - optional>', '<headers: headers - optional>', '<version: api version - optional>', '<files: attachment - optional>')
Package: pymsm
Multistate competing risk models in PythonRead the DocsHagai Rossman,Ayya Keshet,Malka Gorfine2022PyMSMis a Python package for fitting competing risks and multistate models, with a simple API which allows user-defined model, predictions at a single or population sample level, statistical summaries and figures.Features include:Fit a Competing risks Multistate model based on survival analysis (time-to-event) models.Deals with right censoring, competing events, recurrent events, left truncation, and time-dependent covariates.Run Monte-carlo simulations for paths emitted by the trained model and extract various summary statistics and plots.Load or configure a pre-defined model and run path simulations.Modularity and compatibility for different time-to-event models such as Survival Forests and other custom models.Installationpip install pymsmRequires Python >=3.8Quick example# Load data (See Rotterdam example for full details)frompymsm.datasetsimportprep_rotterdamdataset,states_labels=prep_rotterdam()# Define terminal statesterminal_states=[3]#Init MultistateModelfrompymsm.multi_state_competing_risks_modelimportMultiStateModelmulti_state_model=MultiStateModel(dataset,terminal_states)# Fit model to datamulti_state_model.fit()# Run Monte-Carlo simulation and sample pathsmcs=multi_state_model.run_monte_carlo_simulation(sample_covariates=dataset[0].covariates.values,origin_state=1,current_time=0,max_transitions=2,n_random_samples=10,print_paths=True)stateDiagram-v2
    s1 : (1) Primary surgery
    s2 : (2) Disease recurrence
    s3 : (3) Death
    s1 --> s2: 1518 
    s1 --> s3: 195 
    s2 --> s3: 1077Full examplesRotterdam Illness-death exampleEBMT multistate exampleCOVID hospitalizations multistate exampleCitationIf you found this library useful in academic research, please cite:@software{Rossman_PyMSM_Multistate_modeling_2022,author={Rossman, Hagai and Keshet, Ayya and Gorfine, Malka},doi={https://doi.org/10.5281/zenodo.6300873},license={MIT},month={2},title={{PyMSM, Multistate modeling in Python}},url={https://github.com/hrossman/pymsm},year={2022}}Also consider starring the projecton GitHubThis project is based on methods first introduced by the authors ofRoimi et. al. 2021.Original R code by Jonathan Somer, Asaf Ben Arie, Rom Gutman, Uri Shalit & Malka Gorfine availablehere.
Also seeRossman & Meir et. al. 2021for an application of this model on COVID-19 hospitalizations data.
Package: pyms-nist-search
PyMassSpec extension for searching mass spectra using NIST’s Mass Spectrum Search Engine.DocsTestsPyPIActivityQAOtherPyMassSpec extension for searching mass spectra using NIST’s Spectrum Search EnginePyMassSpec NIST Search is Free Software licensed under theGNU Lesser General Public License Version 3A copy of the MassBank of North America database, in JSON, MSP and NIST Library formats, is included for the purposes of these tests.
This library was created on 22 April 2020 using the “parse_mona_json.py” script and Lib2Nist.
Licensed under the CC BY 4.0 License.
For a list of contributors, see the fileMoNA_GCMS_Library/AUTHORSInstallationUsageYou will need to supply your own copy of the NIST Mass Spectral library to use this software.The main class in this library is theEngineclass. This class performs the actual searching. Start by initialising the search engine as follows:search=pyms_nist_search.Engine(FULL_PATH_TO_MAIN_LIBRARY,pyms_nist_search.NISTMS_MAIN_LIB,FULL_PATH_TO_WORK_DIR,)WhereFULL_PATH_TO_MAIN_LIBRARYis the path to the location of your mass spectral library, andFULL_PATH_TO_WORK_DIRis the path to the working directory to be used by the search engine.AMassSpectrumobject can then be searched as follows:search.full_search_with_ref_data(mass_spec)This will return a list of tuples consisting ofSearchResultandReferenceDataobjects for the possible identities of the mass spectrum.A list of just theSearchResultobjects can be obtained with this method:hit_list=search.full_search(mass_spec)For each of these hits, the reference data can be obtained as follows:forhitinhit_list:ref_data=search.get_reference_data(hit.spec_loc)TODOWrite comprehensive tests using pytest
Package: pyMSO4
pyMSO4A python library for interfacing with the Tektronix MSO4 oscilloscopes (tested
with MSO44).InstallationpipinstallpyMSO4UsageConnect the probe on channel 1 to the calibration square wave output, and press
the Autoset button, the following code will capture a trace of the signal as
seen on the oscilloscope screen:importpyMSO4mso44=pyMSO4.MSO4(trig_type=pyMSO4.MSO4EdgeTrigger)mso44.con(ip="128.181.240.130")# Using p2p ethernet connectionmso44.ch_a_enable([True,False,False,False])# Enable channel 1mso44.acq.wfm_src=['ch1']# Set waveform source to channel 1mso44.acq.wfm_start=0mso44.acq.wfm_stop=mso44.acq.horiz_record_length# Get all data pointswfm=mso44.sc.query_binary_values('CURVE?',datatype=mso44.acq.get_datatype(),is_big_endian=mso44.acq.is_big_endian)mso44.dis()Additional examples can be found in thedocumentation.DocumentationSphinx documentation is availablehere.Got root?If you're here because you think it's fun to get root on an oscilloscope, see
Appendix C of thereportfor the details.
Package: pymssgl
pymssql - DB-API interface to Microsoft SQL ServerA simple database interface forPythonthat builds on top ofFreeTDSto
provide a Python DB-API (PEP-249) interface toMicrosoft SQL Server.Detailed information on pymssql is available on the website:pymssql.readthedocs.ioNew development is happening on GitHub at:github.com/pymssql/pymssqlThere is a Google Group for discussion at:groups.google.comGetting startedpymssql wheels are available from PyPi. To install it run:pipinstall-UpippipinstallpymssqlMost of the times this should be all what’s needed.
The official pymssql wheels bundle a static copy of FreeTDS
and have SSL support so they can be used to connect to Azure.NoteOn some Linux distributionspipversion is too old to support all
the flavors of manylinux wheels, so upgradingpipis necessary.
An example of such distributions would be Ubuntu 18.04 or
Python3.6 module in RHEL8 and CentOS8.Basic exampleconn=pymssql.connect(server,user,password,"tempdb")cursor=conn.cursor(as_dict=True)cursor.execute('SELECT * FROM persons WHERE salesrep=%s','John Doe')forrowincursor:print("ID=%d, Name=%s"%(row['id'],row['name']))conn.close()Recent ChangesVersion 2.2.4 - 2022-04-12  - Mikhail TerekhovGeneralAdded bytes and bytearray to support bulk_copy types, thanks to steve-strickland (#756).Use FreeTDS-1.3.9 for official wheels on PyPi.Enable krb5 in Linux wheels, this time for real (#754).