Saravanan666/pypi-org huggingface dataset:
Package: mercupy-parser
Python wrapper for mercury-parserInstallationdocker-compose.ymlcontains the configuration to runmercury-parserwithnginx.docker-compose up -d --scale mercury-parser=nwhere n is the number of instances of mercury-parserThen you can access the service athttp://localhost:4000.pip install mercupy-parserUsagefrommercupy_parserimportMercupy# api_endpoint = "http://localhost:4000/parser"mercupy=Mercupy(api_endpoint=api_endpoint,verbose=True)# parse single urlresponses=mercupy.parser(url,headers=headers,content_type=content_type)# parse multiple urlsresponses=mercupy.parser(urls,headers=headers,content_type=content_type)print(responses[0].json())
Package: mercurial-hug
This library provides a wrapper around select Mercurial functionality. We aim for the wrapper to be
friendlier to use than Mercurial itself (the libraries, that is, which are largely undocumented) and
also to provide a stable API. To achieve this, we will implementonlythe functionality we need,
and if you ask nicely we might also implement the functionality you need too.Also, Mercurial is licensed under the GPLv2+ and we use it under the terms of the GPLv3. This project
is licensed according to the AGPLv3+, so if you’re looking for a cushion from the strict copyleft
license, this library is not your answer.Hosted on GitHub?!I know it’s a little weird to host a project about Mercurial in a Git repository, but BitBucket is
not impressive, and basically I didn’t think it was worth off-GitHub hosting just for this small
library. Sorry!
Package: mercurial-litf
mercurial-litfA litf compatible plugin for theMercurialtest runner.It can be used withBalto: BAlto is a Language independent Test Orchestrator.InstallationYou can install "mercurial-litf" viapipfromPyPI:$ pip install mercurial-litfConfigurationThe mercurial-litf CLI need to find where the Mercurial test-runner is located. It reads theMERCURIAL_RUN_TESTS_PATHenvironment variable in order to do so, please ensure it's defined in your environment.
Package: mercurio
MercurioSend email with python, my way.Mercurio is a simple class to send email with python, managing
smtp, attachments and mimetypes, multiple recipients,
attachments with a specific content id (to html email templating)...InstallationInstallation is as easy as run:pip install mercurioUsageTo initialize a mercurio instance simply call it with
typical smtp parameters. No connection will be opened
at this stage, then you can initialize and reuse it
during the whole code.frommercurioimportmercuriohg=mercurio(host="smtp.test.com",port=25,smtp_user="myuser",smtp_pwd="mypwd")To debug purposes, you can create the message and save it in a file
without send it thgrougth smtp. You can open such file
with a normal email client.message=hg.make_message(fromaddress="from@me.com",recipient="to@me.com",reply_to_address="reply@to.me",text="a long text, very long.",sbj="The subject, or the object?",attachments=[],cid_attachments={})withopen('test_email.eml','w')aso:o.write(message.as_string())Send a real message is easy: use
an hg instance, and call
send method with its parameters. Note that you can
send multiple type of attachments (images, xlsx, json,
txt). Mercurio can choice the correct mime type.
You can also use attachment with a specific content
id, that can be used in html email to include
images in the body of the message.hg.send(fromaddress="from@me.com",recipients=["to@me.com"],reply_to_address="reply@to.me",text="a long text, very long.",sbj="The subject, or the object?",attachments=[],cid_attachments={"content_id_01":"mylogo.png"})
Package: mercurius
Yet Another Portfolio Management Toolbox.Use at your own risk.FeaturesData AugmentationConcat different assets ohlcvConcat different assets tickerBacktestTrading algorithmsfull listContributingTODOs (CheckISSUES)DisclaimerThis project is based on OLPS[1] and PGPortfolio[2]. Many thanks to the authors.[1]https://github.com/olps/olps[2]https://github.com/zhengyaoJiang/PGPortfolio
Package: mercurius-core-library
Mercurius Core Python LibraryMercurius Core Python Library is a repository of reusable Python components to be shared with Python projects integrating the Mercurius RESTful API server.These components have minimal dependencies on other libraries, so that they can be deployed easily.  In addition, these components will keep their interfaces as stable as possible, so that other Python projects can integrate these components without having to worry about changes in the future.To install the Mercurius Core Python Library, enter the follow command line:$pipenvinstallmercurius-core-library
Package: mercurius-restful-api-client-library
Perseus Place RESTful API Client Python LibraryRepository of classes that provide Pythonic interfaces to connect to a RESTful API server developed with Perseus RESTful API Framework.Python LibraryPoster 0.8.1Note: this library includes a modified version ofposter 0.8.1, which original version provides a set of classes and functions to facilitate making HTTP POST (or PUT) requests using the standard multipart/form-data encoding.The original libraryposter 0.8.1cannot be used to upload file uploaded into memory (i.e., stream-to-memory), like for instance djangoInMemoryUploadedFile. The reason is that such file-like object doesn't support the methodfileno()used by theposter 0.8.1to determine the size of the file-like object to upload in Python moduleposter.encode:iffileobjisnotNoneandfilesizeisNone:# Try and determine the file sizetry:self.filesize=os.fstat(fileobj.fileno()).st_sizeexcept(OSError,AttributeError):try:fileobj.seek(0,2)self.filesize=fileobj.tell()fileobj.seek(0)except:raiseValueError("Could not determine filesize")This code raises the exceptionio.UnsupportedOperationthatposter 0.8.1doesn't catch. Chris AtLee included Alon Hammerman's patch in the tagtipof the library ``poster, for catching theio.UnsupportedOperation for fileno` on 2013-03-12:try:fromioimportUnsupportedOperationexceptImportError:UnsupportedOperation=None(...)iffileobjisnotNoneandfilesizeisNone:# Try and determine the file sizetry:self.filesize=os.fstat(fileobj.fileno()).st_sizeexcept(OSError,AttributeError,UnsupportedOperation):try:fileobj.seek(0,2)self.filesize=fileobj.tell()fileobj.seek(0)except:raiseValueError("Could not determine filesize")However, the latest version ofposterinstallable withpipis still0.8.1.
Package: mercuro
Mercuro is a non-concurrent, unintelligent, Python-based threaded syslog
listener that forwards all its events to a [Riemann][1] server.All interaction with Riemann is handled via the [Bernhard][2] library.You probably shouldn’t use Mercuro in production yet, at least until it
provides concurrency, forking, and a config file.See test.py for example use.[1]:http://riemann.io/[2]:https://github.com/banjiewen/bernhard
Package: mercury-base
Набор инструментов для взаимодействия со счётчиками Инкотекс МеркурийЭтот набор инструментов предназначен для управления счётчиками маркиИнкотексМеркурий, подключенных к серверу через последовательную шину (RS485/CAN) или TCP/IP.УстановкаУстановите при помощи pip:$pipinstallmercury-baseЛибо добавьте в файл requirements.txt вашего проекта на python в качестве зависимости:mercury-base~=1.6ИспользованиеВот пример вывода на экран текущей мощности в нагрузке для счётчика Меркурий 206
с сетевым адресом 12345678 (по умолчанию совпадает с серийным номером счётчика),
подключенного к последовательному порту /dev/ttyACM0:frommercury_baseimportMeter,SerialDataTransporttransport=SerialDataTransport('/dev/ttyACM0')meter=Meter(12345678,transport)print('Модель счётчика - Меркурий%s, серийный номер%s'%meter.model,meter.serial_number)current_power=meter.command('get_load_power')print('Текущая мощность в нагрузке -%sкВт'%current_power)Возможно подключение к счётчику по TCP/IP:frommercury_baseimportMeter,TcpDataTransporttransport=TcpDataTransport('192.168.0.2',5051)meter=Meter(12345678,transport)Возможно подключение к счётчику по TCP/IP:frommercury_baseimportMeter,TcpDataTransporttransport=TcpDataTransport('192.168.0.2',5051)meter=Meter(12345678,transport)КомандыСо списком доступных команд можно ознакомиться в документации соответствующего протокола:Mercury V1(для однофазных счётчиков Меркурий 200, 201, 203 и 206)Mercury V2(для трёхфазных счётчиков Меркурий 203.2TD, 204, 208, 230, 231, 234, 236, и 238)
Package: mercuryclient
Mercury SDK can be used in projects that interface with the mercury service
that provides common internal functionality.Initializing the clientfrom mercuryclient import MercuryApi
# Setup connection parameters
conn_params = {'username': 'mercury_username', 'password':'password', 'url':'https://mercury-url.com'}
m = MercuryApi(conn_params)
m.send_mail(['recipent@email.com'],'Test mail', 'Mail body','ses','ses_profile')Available APIs:send_mailsend_smsrequest_experian_reportget_experian_responsefetch_experian_reportrequest_cibil_reportget_cibil_responsefetch_cibil_reportrequest_highmark_reportget_highmark_responsefetch_highmark_reportrequest_verify_idget_verify_id_resultrequest_bank_statementget_bank_statement_resultverify_webhookinsurancesecure_patyment_rechargeget_operators_listmake_rechargeget_recharge_statusget_recharge_wallet_balanceget_recharge_ipget_recharge_plansbbpsset_agent_on_boardget_stateget_district_by_stateget_bill_categoriesget_biller_by_categoriesget_customer_params_by_biller_idget_amountsend_bill_payment_request_transidsend_bill_payment_requestget_duplicate_payment_receiptregister_trasaction_complaintregister_service_complaintget_complaint_statusget_bbpsidverify_bank_accountverify_gstinget_verify_gst_resultgenerate_okyc_otpverify_okyc_otpfetch_rc_detailsverify_udyog_aadhaarfetch_equifax_reportgenerate_liveness_session_idget_liveness_session_resultextract_itr_detailsfetch_itr_reportgenerate_epfo_otpverify_epfo_otpget_epfo_detailsname_matchTypes:For complex requests like CIBIL, Experian or Highmark, you can construct the request
JSON using the provided pydantic models. The types are available atmercury.types.<request_type>.request.Example using models for generating Highmark Request:from mercuryclient.types.highmark.request import Applicant, HighmarkRequest
applicant = Applicant(name="Example Name" ...)
request_obj = HighmarkRequest(
    applicant=applicant,
    inquiry_reference_number="ABCDE",
    ...
)
# After generating your request, pass the object to the corresponding request
m.fetch_highmark_report(request_obj, profile="sample_profile)Testing:Tests are run undertoxYou can install tox with>>> pip install toxIf using pyenv - you can do the following steps before running tox
(patch version will depend on your installations - tox only considers the major version)>>> pyenv local 3.7.3 3.6.8 3.8.1Without this step - tox will not be able to find the interpretersRun tests using the following command>>> tox
Package: mercury-engine-data-structures
Mercury Engine Data StructuresConstruct type definitions for Mercury EngineFormatSamus Returns (Read)Samus Returns (Write)Dread (Read)Dread (Write)PKG✓✓✓✓BMSAD✓✓✓✓BMSSD✓✓✓✓BRFLDMissingMissing✓✓BMSLD✓✓MissingMissingBMSCC✓✓✓✓BRSAMissingMissing✓✓Example Usage# TODOColors for TextMetroid Dread uses the following annotations in text to change color:CodeColor{c0}White(Default){c1}Yellow{c2}Red{c3}Pink{c4}Green{c5}Blue{c6}UI Active(Light blue){c7}UI Inactive(Dim blue)
Package: mercury-explainability
mercury-explainabilitymercury-explainabilityis a library with implementations of different state-of-the-art methods in the field of explainability. They are designed to work efficiently and to be easily integrated with the main Machine Learning frameworks.Mercury project at BBVAMercury is a collaborative library that was developed by the Advanced Analytics community at BBVA. Originally, it was created as anInnerSourceproject but after some time, we decided to release certain parts of the project as Open Source.
That's the case with themercury-explainabilitypackage.The basic block ofmercury-explainabilityis theExplainerclass. Each one of the explainers inmercury-explainabilityoffers a different method for explaining your models and often will return anExplanationtype object containing the result of that particular explainer.The usage of most of the explainers you will find in this library follows this schema:frommercury.explainabilityimportExplainerExampleexplainer=ExplainerExample(function_to_explain)explanation=explainer.explain(dataset)Basically, you simply need to instantiate your desiredExplainer(note that the above exampleExplainerExampledoes not exist)
providing your custom function you desire to get an explanation for, which usually will be your model’s inference or evaluation function.
These explainers are ready to work efficiently with most of the frameworks you will likely use as a data scientist (yes, includedSpark).If you're interested in learning more about the Mercury project, we recommend reading this blogpostfromwww.bbvaaifactory.comUser installationThe easiest way to installmercury-explainabilityis usingpip:pip install -U mercury-explainabilityHelp and supportThis library is currently maintained by a dedicated team of data scientists and machine learning engineers from BBVA.Documentationwebsite:https://bbva.github.io/mercury-explainability/Emailmercury.group@bbva.com
Package: mercurygui
mercuryguimercurygui provides a higher-level worker thread which regularly queries the MercuryiTC for its sensor readings and provides a live stream of this data to other parts of the software. This prevents individual functions from querying the MercuryiTC directly and causing unnecessary overhead.The user interface for the cryostat plots historic temperature readings going back up to 24 h and provides access to relevant temperature control settings such as gas flow, heater power, and ramp speed while lower-level configurations such as calibration tables must be changed programmatically.InstallationInstall the stable version from PyPi by running:$pipinstallmercuryguior the latest version from github:$pipinstallgit+https://github.com/OE-FET/mercuryguiSystem requirementsLinux or macOSPython 2.7 or 3.xAcknowledgementsConfig modules are based on the implementation fromSpyder.
Package: mercuryitc
MercuryITC driverAboutThis is a purely python based driver to remotely control the
Oxford Mercury iTC cryogenic
environment controllerhttp://www.oxford-instruments.com/.This driver is requires pyvisa-py but can be easily modified to use another interface.This driver supports the aux, heater and temperature, and gasflow modules. Look
at the class docstrings to see all the implemented commands (which is almost all).How to useThe core of this module is the class MercuryITC. To initialize a driver object,
just create an instance of this class with the device's visa address, e. g.:>>>frommercuryitcimportMercuryITC>>>m=MercuryITC('TCPIP0:172.20.91.43:7020:SOCKET')All the instrument attributes can be accessed through instance attributes, e.g.:>>>print(m.serl)All MercuryITC modules are automatically recognized and added to the modules
attribute:>>>print(m.modules)Values can be read from and written to the instrument in the same way as for
main models:>>>htr=m.modules[0]>>>print(htr.nick)>>>htr.nick='Main heater'>>>print(htr.nick)There exists a special kind of attributes calledsignalsin the MercuryITC
manual. These contain a numeric value as well as a unit. Signals are read
and set as tuples, e.g.:>>>print(htr.volt)>>>htr.volt=(2.5,'V')>>>print(htr.volt)Note that all attributes which are notsignalsare cached and retrieved only
once from the device. They are stored and read from memory afterwards. To
remove these variables from memory for whatever reason, simply call the
destructor:>>>delm.serlIt's also possible to empty the entire cache of an object by calling the
clear_cache method:>>>m.clear_cache()InstallationDownload or clone the repository. Install the package by running$pipinstall/path/to/folderwhere "/path/to/folder" is the path to the folder containing setup.py.To fixMercuryITC: USER and PASS property not implementedAdd support for level meter module
Package: mercury-monitoring
mercury-monitoringmercury-monitoringis a library to monitor data and model drift. It contains a set of utilities which you can use for detecting in advance whether the statistical properties of your data have changed and whether your model's performance is getting worse.Among others, you can check things like:Changes in your entire data distribution (P(X))Changes in your marginals (i.e. individial features P(Xi))Estimated performance of your model when you don't have access to the true labelsand take the actions you consider pertinent (e.g. retrain your model on more recent data, generate alerts, etc.).Most of the classes for detecting drift have acalculate_drift()method which will yield the predicted result on whether drift has been detected or not.Usage examplefrommercury.monitoring.drift.domain_classifier_driftimportDomainClassifierDrift# Create example datasetsX_src=np.array([np.random.normal(0,1,1000),np.random.normal(0,1,1000)]).TX_target=np.array([np.random.normal(0,1,500)+2,np.random.normal(0,1,500)]).T# Calculate driftdrift_detector=DomainClassifierDrift(X_src,# Source datasetX_target,# Target dataset (e.g. newer batch of data)features=["f1","f2"],p_val=0.01,test_size=0.3,n_runs=10)# Get resultsdrift_metrics=drift_detector.calculate_drift()# Print the resultsprint("Drift Score: ",drift_metrics["score"])print("p_val: ",drift_metrics["p_val"])print("Is drift detected? ",drift_metrics["drift_detected"])# Plot drift scores per featuredrift_detector.plot_feature_drift_scores(figsize=(8,4))Feel free to explore more of the drift detectors and use the most appropiate for your use case.DocumentationWe encourage you checking the documentation of this package at:https://bbva.github.io/mercury-monitoring/and taking a look at the availablenotebook tutorials.Mercury project at BBVAMercury is a collaborative library that was developed by the Advanced Analytics community at BBVA. Originally, it was created as anInnerSourceproject but after some time, we decided to release certain parts of the project as Open Source.
That's the case with themercury-monitoringpackage.If you're interested in learning more about the Mercury project, we recommend reading this blogpostfromwww.bbvaaifactory.comUser installationThe easiest way to installmercury-monitoringis usingpip:pip install -U mercury-monitoringHelp and supportThis library is currently maintained by a dedicated team of data scientists and machine learning engineers from BBVA AI Factory.  In case you find any bug, have an idea or request feel free to open a ticket on theIssuessection.Emailmercury.group@bbva.com
Package: mercury-python
mercury-pythonThe goal of themercury-pythonpackage is to expose mercury's network protocol analysis functionality via python. The cython interface is given inmercury.pyx.InstallationRecommended Installationpipinstallmercury-pythonFrom SourceYou will first need tobuild mercuryand install cython and optionally wheel:pipinstallcython
pipinstallwheelWithin mercury'ssrc/cython/directory,Makefilewill build the package based on the makefile target:make# default build in-placemakewheel# generates pip-installable wheel fileUsageInitializationimportmercurylibmerc=mercury.Mercury()# initialization for packet parsinglibmerc=mercury.Mercury(do_analysis=True,resources=b'/<path>/<to>/<resources.tgz>')# initialization for analysisParsing packetshex_packet='5254001235020800273a230d08004500...'libmerc.get_mercury_json(bytes.fromhex(hex_packet)){"fingerprints":{"tls":"tls/(0303)(13011303...)((0000)...)"},"tls":{"client":{"version":"0303","random":"0d4e266cf66416689ded443b58d2b12bb2f53e8a3207148e3c8f2be2476cbd24","session_id":"67b5db473da1b71fbca9ed288052032ee0d5139dcfd6ea78b4436e509703c0e4","cipher_suites":"130113031302c02bc02fcca9cca8c02cc030c00ac009c013c014009c009d002f0035000a","compression_methods":"00","server_name":"content-signature-2.cdn.mozilla.net","application_layer_protocol_negotiation":["h2","http/1.1"],"session_ticket":""}},"src_ip":"10.0.2.15","dst_ip":"13.249.64.25","protocol":6,"src_port":32972,"dst_port":443,}AnalysisThere are two methods to invoke mercury's analysis functionality. The first operates on the full hex packet:libmerc.analyze_packet(bytes.fromhex(hex_packet)){"tls":{"client":{"server_name":"content-signature-2.cdn.mozilla.net"}},"fingerprint_info":{"status":"labeled","type":"tls","str_repr":"tls/1/(0303)(13011303...)[(0000)...]"},"analysis":{"process":"firefox","score":0.9992411956652674,"malware":false,"p_malware":8.626882751003134e-06}The second method operates directly on the data features (network protocol fingerprint string and destination context):libmerc.perform_analysis('tls/1/(0303)(13011303...)[(0000)...]','content-signature-2.cdn.mozilla.net','13.249.64.25',443){"fingerprint_info":{"status":"labeled"},"analysis":{"process":"firefox","score":0.9992158715704546,"malware":false,"p_malware":8.745628825189023e-06}}Static functionsParsing base64 representations of certificate data:b64_cert='MIIJRDC...'mercury.parse_cert(b64_cert)output:{"version":"02","serial_number":"00eede6560cd35c0af02000000005971b7","signature_identifier":{"algorithm":"sha256WithRSAEncryption"},"issuer":[{"country_name":"US"},{"organization_name":"Google Trust Services"},{"common_name":"GTS CA 1O1"}],...Parsing base64 representations of DNS data:b64_dns='1e2BgAAB...'mercury.parse_dns(b64_dns)output:{"response":{"question":[{"name":"live.github.com.","type":"AAAA","class":"IN"}],...
Package: merdb
I took a career break to build this. If you like it and are looking to hire a ML engineer, please contact me :)CAUTION: PROTOTYPE! NO PRODUCTION USE, not even development.Merdb is a data processing library thatis a relational api like SQL to query datahas Unix like pipes to compose operators using the|syntaxscales to multi core or a cluster(via Modin)processes data too big to fit into memorysupport interactive and optimized processing(optimizations in roadmap)InstallpipinstallmerdbExampleimportpandasaspdfrommerdb.interactiveimport*# for lazy(TBD) use `from merdb.lazy import *`defis_senior(row)->bool:returnrow['age']>35defdouble_age(row)->int:returnrow["age"]*2cols=["name","age"]people_df=pd.DataFrame([["Raj",35],["Sona",20],["Abby",70],["Abba",90],],columns=cols)# One can specify functions without any source data like quadruple agequadruple_age=map(double_age,"age")|map(double_age,"age")result=(t(people_df)# convert people_df to a merdb table|where(is_senior)|order_by("name","asc")|quadruple_age# Unix like pipe syntax making it easy to refactor out intermediate processing|select("age")|rename({"age":"new_age"}))# Convert to Pandas Dataframe and printprint(result.df())