Saravanan666/pypi-org huggingface dataset:
Package: pymetrc
PymetrcOnly the Montana endpoints are tested at this time. Each state dictates the subset of features Metrc exposes. As such, this may not work as intended with other state API endpoints.This project is intended to provide abstraction and easy integration with the Metrc REST API. It provides easily digestible output for use with Pandas and data analysis, storage, etc.AIOHTTP is used to make concurrent calls to the API as the time-based query limitations can make necessary many individual GET requests, especially when initializing a database with all packages, sales receipts, etc.Currently, only GET endpoints are implemented. Once these are covered, POST and PUT functionality is planned.InstallationPymetrc is available via pip:pipinstallpymetrcUsageUpon instantiation of a Metrc object, an initial GET request is made to populate the facility list stored by the object. These facilities are those the given user has access to. This does not currently guarantee that the given user has permission to access the endpoints specified -- this is planned for future implementations.Date/time strings passed must be in ISO 8601 format.It is ill-advised to use API keys directly in code. It is recommended to use environment variables or other more secure means to store your API credentials:importosvendor_api_key=os.environ['METRC_VENDOR_API_KEY']user_api_key=os.environ['METRC_USER_API_KEY']EmployeesfrompymetrcimportMetrcstate='mt'm=Metrc(vendor_api_key,user_api_key,state)data=m.get_basic("employees_v1")PackagesfrompymetrcimportMetrcstate='mt'm=Metrc(vendor_api_key,user_api_key,state)data=m.get_last_modified("packages_v1_active","D-12345","2020-01-01T00:00:00+00:00","2021-01-01T00:00:00+00:00")This returns a list of dictionary objects, each representing an entity of the type requested. In the above example, we get back a list of packages.Sales TransactionsfrompymetrcimportMetrcstate='mt'm=Metrc(vendor_api_key,user_api_key,state)data=m.get_sales_transactions("D-12345","2020-01-01T00:00:00+00:00","2021-01-01T00:00:00+00:00")In the above example, we get a list of receipts each containing a sub-list of per-package transactions. Requesting sales transactions via Pymetrc prompts a request first for the sales receipts in this time period. The receipt ids are parsed and then the sales transactions can be queried using these ids. Sales receipts can be requested if only high-level sales information is needed.TechnologiesPython 3.7+aiohttptqdm
Package: py-metricks
Marketing Science | Admetricks libraryDeveloped by Carlos Trujillo, Marketing Scientist.IntroductionIf you are part of the marketing world you have surely heard about Admetricks, Comscore, Lotame or Adcuality. Tools that provide us with data
which we can use to carry out different types of studies to many of the phenomena that we face in this area.Every day, the adoption of technology is more important than ever in order to take our analysis a little beyond the conventional.
This can represent a very accomplished challenge, because many of the tools that we use every day do not have their connectors enabled for everyone.
users, resulting in not being able to do large data downloads.And those users who manage to obtain a connector to any of these platforms, a great way awaits them to understand the connector, its operability and
results, with the little information that exists on the internet.Therefore, I decided to start small projects where I will be creating pseudo packages, for those who are in the world of marketing and programming. Waiting
to be able to shorten the adaptation curve of some of the professionals that we meet here.This is my second package in this project. I present PyMetricks, a simplification of the connection to the Admetricks REST API in Python.I await your feedback!pipinstallpy_metricksfrompy_admetricks.pymetricksimportadmetricks_apiInitially the package has two methods, where each one returns a DataFrame. The main method generates a report in Pandas format where you can see all
the data obtained by the Admetricks REST API.admetricks=admetricks_api(username='your_mail@enterprise.com',password='admetricks_password')report=admetricks.reports_generator(country='chile',since_date='2021-05-31',device='mobile',ad_type='display')report.head(10)#country options 'chile','colombia','argentina','brasil','españa','peru','mexico','honduras','puerto rico','panama','uruguay','costa rica',#                 'guatemala','ecuador','venezuela','nicaragua','salvador','republica dominicana' or 'paraguay'The second package obtains all the images captured by Admetricks within a certain period, in the raw format, therefore they will see a complete capture
of the entire screen and not just the ad.admetricks=admetricks_api(username='your_mail@enterprise.com',password='admetricks_password')screenshots=admetricks.screenshots_data(country='chile',site='facebook',since_date='2021-01-08',until_date='2021-01-08')screenshots.head(10)Very soon, automatic learning modules will be added to exploit the information we have within the platform.What do you think is the best module we can start with?
Package: pymetrics
PyMetricsis versatile metrics collection library for Python that encapsulates the collection of counters, gauges,
histograms, and timers into a generic interface with pluggable publishers so that you can helpfully instrument your
applications without suffering vendor lock.Publishing metrics is a straightforward process involving two steps. First, configure your metrics and publisher(s):METRICS_CONFIG={'version':2,'error_logger_name':'pymetrics','publishers':[{'path':'pymetrics.publishers.datadog.DogStatsdPublisher','kwargs':{'host':'localhost','port':8135,},},],}Then, use apymetrics.recorders.base.MetricsRecorderin your application to collect and publish:frompymetrics.recorders.defaultimportDefaultMetricsRecordermetrics=DefaultMetricsRecorder(config=settings.METRICS_CONFIG)metrics.counter('counter.name').increment()metrics.gauge('gauge.name',tag_name1='tag_value1',tag_name2='tag_value2').set(12)metrics.histogram('histogram.name').set(1730)withmetrics.timer('timer.name'):do_something()cumulative_timer=metrics.timer('cumulative_timer.name')foriteminitems:do_something_without_timing()withcumulative_timer:do_something_with_timing()metrics.publish_all()Provided publisher plugins include Statsd, Datadog, Python Logging, SQLite, and a null publisher. Writing your own is
simple and we encourage you to share your work with the community by submitting a pull request.LicensePyMetrics is licensed under theApache License, version 2.0.InstallationPyMetrics is available in PyPi and can be installing directly via Pip or listed insetup.py,requirements.txt,
orPipfile:pipinstall'pymetrics~=1.0'install_requires=[...'pymetrics~=1.0',...]pymetrics~=1.0pymetrics = {version="~=1.0"}DocumentationThe complete PyMetrics documentation is available onRead the Docs!
Package: pymetrics-assessment-api-client
pymetrics-assessment-api-clientA client library for accessing pymetrics Assessment APIInstallationpipinstallpymetrics-assessment-api-clientBase URLsUS Production:https://api.pymetrics.comUS Staging:https://staging.api.pymetrics.comUsageA full set of examples can be found in thepymetrics-assessments-api-client examples directory.To get started, please request Client ID, Client Secret and API Key from pymetrics.First, create a client for staging environment:frompymetrics_assessment_api_clientimportClientclient=Client(base_url="https://staging.pymetrics.com")To get an authenticated token, you can hit the get oauth endpoint by doing the following:frompymetrics_assessment_api_client.modelsimportOAuthTokenRequestfrompymetrics_assessment_api_client.api.defaultimportmercury_o_authfrompymetrics_assessment_api_client.modelsimportOAuthTokenResponsefrompymetrics_assessment_api_client.typesimportResponserequest=OAuthTokenRequest(client_id=client_id,client_secret=client_secret,grant_type="client_credentials")auth_response:Response=mercury_o_auth.sync_detailed(client=client,json_body=request)auth_token_response:OAuthTokenResponse=auth_response.parsedprint(f"Access Token:{auth_token_response.access_token}")To retrieve an order, you can use the token generated above and hit the get order endpoint:frompymetrics_assessment_api_client.api.defaultimportmercury_retrieve_orderfrompymetrics_assessment_api_client.modelsimportMercuryAssessmentOrderfrompymetrics_assessment_api_client.typesimportResponseauth=f"Bearer{access_token}"get_order_response:Response=mercury_retrieve_order.sync_detailed(client=client,uuid=order_uuid,authorization=auth,x_api_key=API_KEY,report=False)parsed_get_order_response:MercuryAssessmentOrder=get_order_response.parsedprint(f"Successfully retrieved order:{parsed_get_order_response.to_dict()}")
Package: pymetro
PymetroPymetro is a python library that allows you to incorporate scientific notations using symbols into your program. It provides functions that force a specific notation on a variable as specified by the user and includes a function that automatically formats any given numbers to a standard index form.Note that all of the returns given by any functions in this module are Strings.UsageManualTo use Pymetro, it is first imported to the Python workspace like any other library as:>> import pymetroYou can then call one of the many functions provided in order to format the desired number. For manual formatting functions, the function is called from the library and provided with either an integer or a float. The following is an example of raising the number 2314.124 to a notation of kilo:>> pymetro.kilo(2314.124)
2.314124kYou can also specify the number of digits after the decimal point by providing another integer to the function representing the number of places required after the decimal point:>> pymetro.kilo(2314.124, 3)
2.314kIf no integer is provided to specify the rounding place, the function would simply default to not rounding the number at all.AutoThe auto function on the other hand automatically formats the number based on the standard index form, to illustrate, these are the results of passing two different numbers into the auto function:>> pymetro.auto(2145.235)
2.145235k
>> pymetro.auto(0.032523)
32.523mAs you can see, both numbers were automatically formatted to the recommended notation. This is helpful when the user cannot predict what numbers are going to be generated or inputted in their program.
Similarly, the auto function is also capable of accepting a specific number of integers following the decimal point to round, the result is as follows:>> pymetro.auto(2145.235, 3)
2.145k
>> pymetro.auto(0.032523, 2)
32.52mFunctionsNotationSymbolFunctionAttoaatto()Femtoffemto()Picoppico()Nanonnano()Microµmicro()Millimmilli()Kilokkilo()MegaMMega()GigaGgiga()TeraTtera()Petapetapeta()ExaEexa()ZettaZzetta()YottaYyotta()
Package: pyMetrohmAUTOLAB
Metrohm AUTOLAB control packageThis is aunofficialcontrol package to Metrohm-AUTOALB.
This package contains a main pacakge namedAUTOALB()class structure and implemented functions:classAUTOLAB():def__init__(self,sdk=R"C:\Program Files\Metrohm Autolab\autolabsdk\EcoChemie.Autolab.Sdk",adx=R"C:\Program Files\Metrohm Autolab\autolabsdk\Hardware Setup Files\Adk.x"):defdisconnectAutolab(self):defsetSDKandADX(self,sdk,adx):defisMeasuring(self):defconnectToAutolab(self,hdw=R"C:\Program Files\Metrohm Autolab\autolabsdk\Hardware Setup Files\PGSTAT302N\HardwareSetup.FRA32M.xml"):defmeasure(self,procedure):defsave(self):defsaveAs(self,saveName):defsetCellOn(self,On=True):defsetMode(self,Mode='Potentialstatic'):defsetPotential(self,potential):defsetCurrentRange(self,EstimateCurrentInAmpere=1E-6):defwait(self,QuietTime=5):how to use it:Step 0,
install the requirement softerware,pipinstallpythonnet
pipinstallpyMetrohmAUTOLABAnd AUTOALB SDK v1.11
You can download ithereStep 1, import this packageimportMetrohm.AUTOLABasECStep 2, tell Python where your instrument located# tell the codes where your SDK install firsthdw=R'C:\Program Files\Metrohm Autolab\autolabsdk\Hardware Setup Files\PGSTAT302N\HardwareSetup.FRA32M.xml',sdk=R"C:\Program Files\Metrohm Autolab\autolabsdk\EcoChemie.Autolab.Sdk"adx=R"C:\Program Files\Metrohm Autolab\autolabsdk\Hardware Setup Files\Adk.x"Setp 3, initialise the AUTOLAB class(C's bad habbit)# initializing the class firstautolab=EC.AUTOLAB(sdk=sdk,adx=adx)autolab.CMD=True# optional: Enable CMDLOG or not, it's good if you want to trace the codeStep 4, Have fun with ittry:ifautolab.connectToAutolab(hdw):# first we need to connect to our instrumentprint("Connecting to AUTOLAB successfully....")# do measurementautolab.measure(R"*.nox file path")# it will take times till measrement finishautolab.saveAs(R"save file name")`except:print("Connecting to AUTOLAB FAIL....")returnOptionalStep 5, delete the instanceIt is a good habit, but not always necessary.# it is a good habit to del the instance after scriptdelautolab
Package: pymetronome
PyMetronomeA simple metronome utility.Installationpip install pymetronomeUsageAfter installing themetcommand is availableusage: met [-h] [--bpm BPM] [--meter METER]

optional arguments:
  -h, --help     show this help message and exit
  --bpm BPM      Beats per minute
  --meter METER  The time signature to use (e.g. "4/4")Alternatively, you can also usepython -m metNotesCurrently, this is only supported on Windows (because it relies on the standard librarywinsoundmodule)
Package: pymeu
pymeuPyMEU (Python ME Utility) is a set of helper functions built around pycomm3 to interface with Rockwell Automation PanelView Plus 6/7 HMIs.The current release has not been widely tested; it is alpha quality at best and could easily brick your device.  Use at your own risk.InstallationTo install from pip:pip install pymeuTo upgrade from pip:pip install pymeu --upgradeBasic ExamplesUse the download function to transfer a *.MER file to the remote terminal:frompymeuimportMEUtilitymeu=MEUtility('YourPanelViewIpAddress')meu.download('C:\\YourFolder\\YourProgram.mer')Use the upload function to transfer a *.MER file from the remote terminal:frompymeuimportMEUtilitymeu=MEUtility('YourPanelViewIpAddress')meu.upload('C:\\YourFolder\\YourProgram.mer')Use the upload all function to transfer all *.MER files from the remote terminal:frompymeuimportMEUtilitymeu=MEUtility('YourPanelViewIpAddress')meu.upload_all('C:\\YourFolder')Use the reboot function to restart the remote terminal:frompymeuimportMEUtilitymeu=MEUtility('YourPanelViewIpAddress')meu.reboot()
Package: pymewc
Pymewc ( Python Microcontroller Interface)Making your microcontroller connect with pythonversion:0.1.6 BetaPymewc is a new and innovative python library that can be used for connecting python with the microcontroller world.Pymewc is a lightweight package that aims simplicity yet performing complex tasks with ease.FeaturesRead data from each pin of the microcontrollerRead data printed on the serial monitor windowScoping Using Analog Pin 0 with a accuracy of upto 100 HzWriting program to the microcontroller(Development Stage)Sending data to the local cloud service / running a apache server(Development Stage)InstallationPymewc requiresPythonv3.6+ to run.  But extensively tested and recomends using python version > 3.7Install the dependencies and packages and thats it.For windowspipinstallpymewcFor linux and unix based Operating systemsDownloading pip on linux based operating systemsDebian and Debian Based distros(Ubuntu, Mint etc)sudoaptinstallpython3-pipFor Arch and Arch Based distros(Manjaro, Endevour etc)sudopacman-Spython-pipInstalling package using pippip3installpymewcHow to use the packageTo check whether the python package is working and responding perfectlyimportpymewc
pymewc.hello()To make the LED blink with time delayimportpymewc
pymewc.blink()For printing what the serial monitor prints:importpymewc
pymewc.serial()For printing what the serial monitor prints without infinity loop condition specify no. of data to be displayed:importpymewc
pymewc.serial_discrete()For scoping using analog pin A0 (Currently default value is A0 other analog pin values are under development) :importpymewc
pymewc.scope()Adding few other features which are digitalRead and digitalWrite functionalites(In development will be live soon)Development Going onWorking on autodetect port nameDigital read and write functionalities for microcontrollersArduino scoping for other analog pinsMultiple scoping at the same timeWant to help??Want to contribute? Great!I will always welcome everyone contributers to contribute to the project which will be live soon. Hope it hits the market hardScreenshot of the outputsThe scope image output in the matplotlib output window (Scoping Image output)LicenseMITFree Software, Hell Yeah!
Package: pymex
PYMEX package is a collection of modules providing tools for accessing interaction
data distributed by The IMEx Consortium partners as well as for parsing, transformation
and construction of PSI-MI endorsed interaction data files.Modulespymex.xmlrecord- A generic, configurable XML record serializer/deserializer.pymex.mif- PSI-MI XML format support (versions 2.5.4 and 3.0.0).pymex.pypsiq- PSICQUC server access.Quick Startfrom lxml import etree as ET
    import pymex.mif

    rec = pymex.mif.Record()
    rec.parseMif( file, 'mif254' )

    for interaction in rec.interactions:
       print( "Interaction type:",interaction.type.label )
       print( "Participant count:", len(interaction.participants))
       for participant in interaction.participants:   
          print(" Participant:",participant.interactor.label)
          print("   Host:", participant.interactor.host.label)
          print("   Type:", participant.interactor.type.label)
          print("   Sequence:", participant.interactor.sequence)

    recDom = rec.toMif( 'mif300' )
    print( ET.tostring(recDom,pretty_print=True).decode("utf-8") )Further details:Pymex Wiki
Package: pymexc
pymexcpymexcis an unofficial Python library for interacting with theMEXC crypto exchange. It provides a simple and intuitive API for making requests to theMEXC API endpoints.Most of the code was generated with ChatGPT, if you see an error, write to issues.InstallationYou can install pymexc using pip:pipinstallpymexcGetting StartedTo start working with pymexc, you must import spot or futures from the library. Each of them contains 2 classes: HTTP and WebSocket. To work with simple requests, you need to initialize the HTTP class. To work with web sockets you need to initialize the WebSocket classExample:frompymexcimportspot,futuresapi_key="YOUR API KEY"api_secret="YOUR API SECRET KEY"defhandle_message(message):# handle websocket messageprint(message)# SPOT V3# initialize HTTP clientspot_client=spot.HTTP(api_key=api_key,api_secret=api_secret)# initialize WebSocket clientws_spot_client=spot.WebSocket(api_key=api_key,api_secret=api_secret)# make http request to apiprint(spot_client.exchange_info())# create websocket connection to public channel (spot@public.deals.v3.api@BTCUSDT)# all messages will be handled by function `handle_message`ws_spot_client.deals_stream(handle_message,"BTCUSDT")# FUTURES V1# initialize HTTP clientfutures_client=futures.HTTP(api_key=api_key,api_secret=api_secret)# initialize WebSocket clientws_futures_client=futures.WebSocket(api_key=api_key,api_secret=api_secret)# make http request to apiprint(futures_client.index_price("MX_USDT"))# create websocket connection to public channel (sub.tickers)# all messages will be handled by function `handle_message`ws_futures_client.tickers_stream(handle_message)# loop forever for save websocket connectionwhileTrue:...DocumentationYou can find the official documentation for the MEXC APIhere.LicenseThis library is licensed under the MIT License.
Package: pyMez
pyMez is a python package born out of the daily needs of a laboratory scientist. In particular, there is a constant need to use external equipment to acquire data, store that data in a sensible way, analyze the stored data, and generate collections and reports after analyzing the data. In the world of scientific computation there is an endless universe of solutions to do this, however none of the solutions met my personal daily needs and philosophy simultaneously. This package tries to stitch together many tools to meet those needs, while serving as a backend library to a webserver. It thus has many dependencies. Some of the dependencies are os specific, however the lack of them should not prevent operation. Although it currently has a single primary developer, it is my hope that it will be adopted by at least 10’s of people and help them accomplish their daily scientific goals.
Package: pyMFD
Multipoint force-deflection analysisThis library allows for loading Nanoscope v7.2 force-volume data and performing
multipoint force-deflection (MFD) analysis. MFD is a local materials characterization
technique that performs many force-deflection ramps on a microcantilever.
The each force-deflection ramp is converted to a compliance value.
The compliance data is fit to a fixed-free Euler beam and Young's modulus is extracted. pyMFD is the first software created for MFD analysis, as it is
a new technique.InstallationDetailed installation instructions are available in thedocumentation.$ git clone https://github.com/larsenkg/pyMFD.git
      $ cd pyMFD
      $ python -m venv env
      $ source env/bin/activate
(env) $ python -m pip install numpy==1.21.2 scipy==1.7.1 matplotlib==3.5.0 \ 
        bottleneck==1.3.2 pytest==7.1.2
(env) $ python -m pytest pyMFD/tests/DocumentationThe documentation is availablehere.Compliance map inspectorThe compliance map inspector allows for interactive exploration of the compliance map (left) and the force ramps (center) that make up each pixel of the compliance map. One can also view a map of $R^2$ values (right) to get an idea of where the fits might fail.Example:importmatplotlib.pyplotaspltfrompyMFD.FVimportFVfrompyMFD.summarizeimportcomp_mat_inspectorfrompyMFD.cantileverimportcalc_modulusspm_file="data/examples/02041411.001"# Example force-volume scanfv=FV(spm_file)# Load force-volume scan(comp_mat,r2s)=fv.summarize()# Interactive compliance map inspector# Use mouse to select pixels in the (left) compliance map.# The force ramp data is shown in the center plot.# The R^2 map (how well the force-deflection data was fit) is shown in the right map.comp_mat_inspector(comp_mat,fv.z_piezo,fv.get_retract(),fv.sc_params,r2s_mat=r2s)plt.show()Calculate Young's modulus of microcantilever# Continued from abovecant_num=0# Cantilever numberrows_to_avg=3# Number of rows to average around center line of cantilever(E,offset,E_lin,offset_lin)=calc_modulus(fv,cant_num)print("---- Cubic fit ----")print(f"Young's modulus:{E/1e9:.2f}GPa")print(f"Offset:{offset*1e6:.2f}µm")print("---- Linearized fit ----")print(f"Young's modulus:{E_lin/1e9:.2f}GPa")print(f"Offset:{offset_lin*1e6:.2f}µm")Output:---- Cubic fit ----
Young's modulus: 145.97 GPa
Offset: 4.14 µm
---- Linearized fit ----
Young's modulus: 158.66 GPa
Offset: 4.04 µmCommunity guidelinesIf you are having issues installing or using this software, or would like to report a bug, please create anew issuein this repository. Please provide as much information as possible, including a reproducible example (if applicable).Feature requests and pull requests are welcome. If you would like to contribute, but do not know where to start, you may create a new issue. Please let us know your interests and how you would like to help.