Saravanan666/pypi-org huggingface dataset:
Package: mc2p-python
MyChoice2Pay PythonOverviewMyChoice2Pay Python provides integration access to the MyChoice2Pay API.InstallationYou can install usingpip:pip install --upgrade mc2p-pythonoreasy_installeasy_install --upgrade mc2p-pythonor to install from source, run:python setup.py installQuick Start Examplefrom mc2p import MC2P

mc2p = MC2PClient('KEY', 'SECRET_KEY')

# Create transaction
transaction = mc2p.Transaction({
    "currency": "EUR",
    "products": [{
        "amount": 1,
        "product_id": "PRODUCT-ID"
    }]
})
# or with product details
transaction = mc2p.Transaction({
    "currency": "EUR",
    "products": [{
        "amount": 1,
        "product": {
            "name": "Product",
            "price": 5
        }
    }]
})
transaction.save()
transaction.pay_url # Send user to this url to pay
transaction.iframe_url # Use this url to show an iframe in your site

# Get plans
plans_paginator = mc2p.plan.list()
plans_paginator.count
plans_paginator.results # Application's plans
plans_paginator.get_next_list()

# Get product, change and save
product = mc2p.Product.get("PRODUCT-ID")
product.price = 10
product.save()

# Create and delete tax
tax = mc2p.Tax({
    "name": "Tax",
    "percent": 5
})
tax.save()
tax.delete()

# Check if transaction was paid
transaction = mc2p.Transaction.get("TRANSACTION-ID")
transaction.status == 'D' # Paid

# Create subscription
subscription = mc2p.Subscription({
    "currency": "EUR",
    "plan_id": "PLAN-ID",
    "note": "Note example"
})
# or with plan details
subscription = mc2p.Subscription({
    "currency": "EUR",
    "plan": {
        "name": "Plan",
        "price": 5,
        "duration": 1,
        "unit": "M",
        "recurring": True
    },
    "note": "Note example"
})
subscription.save()
subscription.pay_url # Send user to this url to pay
subscription.iframe_url # Use this url to show an iframe in your site

# Receive a notification
notification_data = mc2p.NotificationData(JSON_DICT_RECEIVED_FROM_MYCHOICE2PAY)
notification_data.status == 'D' # Paid
notification_data.transaction # Transaction Paid
notification_data.sale # Sale generatedExceptionsfrom mc2p.errors import InvalidRequestError

# Incorrect data
shipping = mc2p.Shipping({
    "name": "Normal shipping",
    "price": "text" # Price must be number
})
try:
    shipping.save()
except InvalidRequestError as e:
    e._message # Status code of error
    e.json_body # Info from server
    e.resource # Resource used to make the server request
    e.resource_id # Resource id requested
Package: mc2s
MC2SMC2S provides a script to apply MCR-ALS and projection using least squares regression based onCARS datapackage.DatasetsDatasets can be provided on request atdamien.boildieu@xlim.frUsageTo launch the main script :carsdataYou can also provide directly the configuration file with :carsdata -j path/to/configuration/file.jsonConfiguration files are in JSon format, examples of configuration are available in theconfigsfolder.
Configuration attributes are the same as objects constructors in the source code. Hence,mc2.jsoncontains:{"data":["Path/to/file"],"analyzer":{"MCR":{"output_dim":5,"guesser":{"Simplisma":{"simp_err":5}},"c_regr":{"NNLS":{}},"c_constr":{"ChanVeseConstraint":{"nu":0,"lambda1":1,"lambda2":1,"mu":0.35},"NormConstraint":{"axis":1}},"st_regr":{"NNLS":{}},"st_constr":{}}},"vspan":[{"begin":3180,"end":3200,"color":"cyan"},{"begin":3046,"end":3066,"color":"green"},{"begin":2997,"end":3017,"color":"red"},{"begin":2910,"end":2930,"color":"green"},{"begin":2834,"end":2854,"color":"red"}],"spectra_colors":["darkmagenta","mediumvioletred","navy","teal","saddlebrown"]}
Package: mc2-symmetry
symmetryCluster management tool for the MC2.BuildTo create a virtual environment and install the requirements, run (by default it usespython3.7, you can change that
in theMakefilevariableVENV_BIN)make venvRun Symmetry components manuallyPrerequisitesMake sure the virtualenv is activatedsource .venv/bin/activateSymmetry publishes and reads telemetry data to and fromredis,
so you need a running redis instance first:redis-serverStart the telemetry deamonDownload and start thetelemetry daemon./telemdYou can verify that the telemetry daemon sends data by suscribing to the topic
via the redis CLI:redis-cli psubscribe "telem/*"Start the cluster deamonStart the cluster daemon (which controls the cluster state)python -m symmetry.cli.clusterdWebsocket serverTo start the websocket server for the dashboard:python -m symmetry.cli.websocketThe websocket is running on port8082and automatically connects to the local redis-server onlocalhost:6379.
Connect withws://ip:8082/topicto receive all published messages for the giventopic.Run the dashboardServe the app with gunicorngunicorn -w 4 --preload -b 0.0.0.0:5000 \
    -c symmetry/webapp/gunicorn.conf.py \
    symmetry.webapp.wsgi:apiPoint your browser tohttp://localhost:5000/ui/dashboard.Using SymmetryCreating servicesTo create a new service in the cluster aPOSTrequest must be sent to theapi/services/{service_id}endpoint, withservice_idbeing the new service.ThePOSTrequest has one optional
(tar-exported docker image) and one mandatory (service
description) body element.The service description is structured this way:%YAML1.2---id:#must be same id as in endpointmaintainer:#the uploader of the servicename:#"Pretty" version of the nameversion:#any version numberdescription:#simple descriptionimage_tag:#if docker image uploaded then this tag must be provided by the image. otherwise it is pulledport:#the port which is exposed by the serviceAfter correct execution the answer should look somewhat like this:{"name":"Test Service","version":"1.0.0","desc":"This is a simple test_service","maintainer":"silvio","10.0.0.3":"1"}Other Client ScriptsRecording telemetry dataYou can use the telemetry clientcli.telemcto consume telemetry data in
various ways.# prints to system out
python -m symmetry.cli.telemc

# writes to a csv file
python -m symmetry.cli.telemc --file /tmp/telemetry-results.csv
Package: mc3
mc3: Multi-core Markov-chain Monte CarloA Python implementation of the Markov-chain Monte Carlo algorithm.Install as:pip install mc3or:conda install -c conda-forge mc3Docs at:https://mc3.readthedocs.io/en/latest/Cite as:@ARTICLE{CubillosEtal2017apjRednoise,author={{Cubillos}, Patricio and {Harrington}, Joseph and {Loredo}, Thomas J. and {Lust}, Nate B. and {Blecic}, Jasmina and {Stemm}, Madison},title="{On Correlated-noise Analyses Applied to Exoplanet Light Curves}",journal={\aj},keywords={methods: statistical, planets and satellites: fundamental parameters, techniques: photometric, Astrophysics - Earth and Planetary Astrophysics},year=2017,month=jan,volume={153},number={1},eid={3},pages={3},doi={10.3847/1538-3881/153/1/3},archivePrefix={arXiv},eprint={1610.01336},primaryClass={astro-ph.EP},adsurl={https://ui.adsabs.harvard.edu/abs/2017AJ....153....3C},adsnote={Provided by the SAO/NASA Astrophysics Data System}}
Package: mca
mca is aMultiple Correspondence Analysis(MCA) package for python, intended to be used withpandas. MCA is afeature extractionmethod; essentiallyPCAforcategorical variables. You can use it, for example, to addressmulticollinearityor thecurse of dimensionalitywith big categorical variables.Installationpipinstall--usermcaUsagePlease refer to theusage notesandthis illustrated ipython notebook.ReferenceMichael Greenacre, Jörg Blasius (2006).Multiple Correspondence Analysis and Related Methods, CRC Press. ISBN 1584886285.History1.0(2014-06-24)First release. I’m sure it’s an auspicious date somewhere in the world.1.01(2015-03-23)More documentation, in the form of an ipython notebook. Fixed bug #2 affecting python 2.x1.02(2017-07-29)Fixed division-by-zero bug (issue #14)1.03(2018-01-10)Added sparse matrix support
Package: mcache
Async ready Multi Cache LibraryA python package to use a async ready decorator for caching outputs.Currently supported cache stores:FilecacheMemcachedRequirementsmemcachedOn osxbrewinstallmemcached
brewservicesstartmemcachedOn Linuxsudoapt-get-yinstallmemcachedlibmemcached-tools
sudosystemctlenablememcached
sudosystemctlstartmemcachedInstalling the packagepipinstallmcacheUsing it in your applicationfrommcacheimportfilecache,DAY@filecache(lifetime=DAY*2)defadd(x):returnx+4print(add(10))Asyncimportasynciofrommcacheimportfilecache,DAY@filecache(lifetime=DAY*2)asyncdefadd(x):returnx+4print(asyncio.run(add(10)))Sriram
Package: m-caching
LRU CacheThư viện caching của MOBIO. Hỗ trợ cache trên memory hoặc Redis.Cài đặt:pip3 install m-cachingSử dụng:__store_type = StoreType.REDIS # for redis cache
__store_type = StoreType.LOCAL # for memory cache
__file_config = 'config-file-path'

lru_redis_cache = LruCache(store_type=__store_type, config_file_name=__file_config,
                           redis_uri='redis://redis:6379/0',
                           redis_cluster_uri='redis://redis-cluster.redis.svc.cluster.local:6379/0',
                           redis_type=RedisType.REPLICA)Ignore empty values from cache__store_type = StoreType.REDIS
__file_config = 'config-file-path'
lru_cache = LruCache(store_type=__store_type, config_file_name=__file_config)
lru_cache.accept_none(False) # => ignore none valuesUsagecache for class's functionclass TestCache:
    @lru_cache.add_for_class()
    def test(self, x):
        print("TestCache::test param %s" % x)
        return x + 1

    @staticmethod
    @lru_cache.add()
    def test_static(x):
        print("TestCache::test_static test param %s" % x)
        return x + 1cache for normal function@lru_cache.add()
def some_expensive_method(x):
    print("Calling some_expensive_method(" + str(x) + ")")
    return x + 200Example config[REDIS]
host=redis-server
port=6379
cache_prefix=test_cacheChangedlog:v0.1.13:Support RedisClusterv0.1.12:Fix bug: missing import;v0.1.11:Support python3.9v0.1.10:Sửa lại tên version 0.1.9v0.1.9:Thêm try...except: khi set item vao redis.
Package: mcaddon
mcaddonUtility functions for creating Minecraft Bedrock Add-Ons.Documentation:https://mcaddon.readthedocs.io/InstallationInstall the module with pip:pip3 install mcaddonUpdate existing installation:pip3 install mcaddon --upgradeRequirementsNameDescriptionmclangRead and write to .lang files.molangMolang to Python Translator & interpreter written in pure Python.commentjsonAdd Python and JavaScript style comments in your JSON files.jsonschemaAn implementation of JSON Schema validation for PythonchevronMustache templating language rendererOur Goal?Our goal is to create a library that can create a mcaddon or mcpack from the ground up using Python.FeaturesLoad packs from any format version.Supportsmustachelogic-less templates.ExamplesBlockfrommcaddonimport*blk=Block('test:on_interact_change_state_block')blk.add_component(OnInteractComponent(event='test_event'))blk.add_event('test_event',SetBlockState({'custom:direction':"1"}))blk.save('block.json')Itemfrommcaddonimport*blk=Item('minecraft:blaze_rod')blk.add_component(FuelComponent(12.0))blk.add_component(MaxStackSizeComponent(64))blk.add_component(IconComponent('blaze_rod'))blk.add_component(HandEquippedComponent(True))blk.add_component(DisplayNameComponent('Blaze Rod'))blk.save('item.json')Command-line interfaceRoad mapResource packsanimation_controllersanimationsattachablesbiomes_client.jsonblocks.jsoncamerasentityflipbook_textures.jsonfontitem_textures.jsonmaterialsmodelsparticlespiecesrender_controllerssoundssounds.jsonterrain_textures.jsontexture settexturesuitextsBehavior packscamerasentitiesfeature_rulesfeaturesspawn_rulesstructurestradingblocksitemsloot_tablesrecipestextsvolumeSkin packsAddonscontents.jsoncliupdate mcaddon/mcpackSupport to load all format versions. (At least all versions that are used in vanilla packs)Support to import packs. (for both singleplayer and on dedicated server)Toolchain to load packsscripting - Convert Python to the Official MinecraftScripting and API.
Package: mcafee-epo
A straightforward wrapper around the ePO API. Manages authentication,
building requests, and interpreting responses. Simply treat the client
object as a callable function, passing the command name and parameters.Install:$ pip install mcafee-epoUse:>>> from mcafee_epo import Client
>>> client = Client('https://localhost:8443', 'user', 'password')
>>> systems = client('system.find', '')Differences from “official” clientThis library was created in response to the fairly poor client
distributed by McAfee, which didn’t support Python 3 and was generally
a mess. (You can find a cleaned up version of their client with Python 3
support in the first few commits.)The official library requires copying files into the Python location to
“install” it. This library is an actual package installed usingpip.The official client uses low level url libraries and numerous
workarounds to make http requests. This library uses therequestslibrary to greatly simplify
the work the previous code was doing while offering better security.The official client uses a dynamic command discovery and dispatch
mechanism to make API calls seem like a nested set of objects. This
library forgoes that complexity (which wasn’t understood by IDEs anyway)
for a more straightforward approach that just accepts command names when
calling.LinksReleases:https://pypi.org/project/mcafee-epo/Code:https://github.com/davidism/mcafee-epo
Package: mcafee-epo-policies
McAfee ePolicy Orchestrator Polices Python Class LibraryOverviewThe intent of this package is to give you some simple Class to read and manipulate Policy document from the Policy Catalog of McAfee ePolicy Orchestrator.DocumentationSorry, I did not took time yet to write the documentation of that package, except the documentation within each python function for each class.InstallationDownload the latest releaseRun the following command to install the packagepip install mcafee_epo_policiesBugs and FeedbackFor bugs, questions and discussions please use theGithub Issues.LICENSECopyright 2020 Benjamin MarandelLicensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package: mcafee-mwgapi
Overview:This is an open source project to help developers working on the McAfee Web Gateway product,
Since McAFee lacks a pre-developed code package.
Package is written in reference of MWG Version 8.2.Usage:from webgatewayapi.authenticate import authenticate

MWG_SERVER = input("Enter MWG Server")
PORT = input("Enter API Port")

authServer = authenticate(hostname=MWG_SERVER, port=PORT)
auth = authServer.createSession(username="something", password="something")
print(auth.session) 

from webgatewayapi.appliances import appliances
appliance = appliances(auth=auth.session, hostname=MWG_SERVER, port=PORT)
listappliance = appliance.listAppliances()
print(listappliance)

from webgatewayapi.listdata import listdata
list = listdata(auth.auth.session, hostname=MWG_SERVER, port=PORT)
getalllists = listdata.listdata()
print(getalllists)

trustedsoruce:
publichostvalidation = trustedsource()
print(publichostvalidation.lookup(data=test.setup()))Contribution:This is an Open Source Project, Contributions are welcome.#License:
MIT License
__
Package: mcafeesecure-api
python-apiMcAfee SECURE API - Python ModuleThis Python module interfaces with the McAfee SECURE API to issue
API requests.Your API Key may be found athttps://www.mcafeesecure.com/user/account/apior by contactingsupport@mcafeesecure.com.This module requires one non-standard package:
requests - a Python HTTP libraryExample Uses:import mcafeesecure_api as ms
ms.scan_targets()
ms.scan_target(args.target_id)
ms.scan_result(args.target_id, args.scan_id)
ms.scan_vuln(args.vuln_id)General API Notes:Full Documentation may be found at https://www.mcafeesecure.com/user/support/api/

    The McAfee Secure API enables customers and partners to integrate certain components
    of the McAfee Secure service into their application.

    All requests should be made to a URL similar to the following:

        https://api.mcafeesecure.com/api/v1/[METHOD].json


    To authenticate include an "x-apikey" header in your request. API keys are provisioned
    and configured by our support team. You can view your API keys here.

        curl --header "x-apikey: APIKEY" https://api.mcafeesecure.com/api/v1/[METHOD].json

    By default API calls are executed in the company that owns the API key. If the company is
    a reseller or otherwise has companies that it manages, those companies can be modified by
    including a "companyId" parameter in any request.Changes:* 0.0.1 - [1/14/19]
    - Support added for: scan_targets, scan_target, scan_result, scan_vuln
* 0.0.2 - [1/17/19]
    - Support added for: account_create, account_create_lite, site_add, site_update,
        site_get, site_delete, site_lookup, subscription_list, subscription_add,
        user_add, company_get, sso
* 0.0.3 - [1/18/19]
    - Test candidate for PyPI-Test package submission
* 0.0.4 - [1/18/19]
    - Bug fix to __init__.py
* 0.0.5 - [1/28/19]
    - Working fix for __init__ importing, Pushed to PyPI
Package: mcafeesecure-csv
mcafee-secure-csv-toolMcAfee SECURE - CSV Creation ToolThis Python module uses the McAfee SECURE API module
and the Pandas module to generate CSV outputs from the JSON results.This script requires two non-standard packages:json_normalize - a component of pandas, a data analysis package, that
    allows for the flattening of nested dictionaries found in JSON.

mcafeesecure_api - a Python module for the McAfee SECURE APICurrently Supported API Calls:scan-targets, scan-target, scan-result, scan-vulnReports:full-report: includes a listing of every found vulnerability and where it was foundExamples Uses:$ python3 ./mcafeesecure_csv.py -m scan-targets
$ python3 ./mcafeesecure_csv.py -m scan-target  -t 81159
$ python3 ./mcafeesecure_csv.py -m scan-result -t 81159 -s 201809072027TgDGIr3ywDIrPX1fysum
$ python3 ./mcafeesecure_csv.py -m scan-vuln -v 1100894
$ python3 ./mcafeesecure_csv.py -m full-reportChangelog:* 0.0.1 - Initial release - [1/28/19]
* 0.0.2 - Bug fix for targets that had never been scanned [1/29/19]
Package: mcai-worker-sdk
Python SDK for Media Cloud AI workersBased onmcai_worker_sdk, this SDK uses thePyO3 crateto export a compiled module compatible with CPython ABI.DocumentationPlease, check the docshereandherefor the SDK with the media feature enabled.BuildBefore using the Python module you should build it as a CPython library. This will require a virtualenv (where the module will be installed) andmaturinto compile the module.virtualenvvenv# Create your environmentsourcevenv/bin/activate# Launch itYou can then either build the module in development mode (this will build and install the module in your virtualenv):maturindevelop--featuresextension-module# Build and install the moduleOr build the wheel file and install it manually viapip:maturinbuild--featuresextension-module# Build the wheel file to install the modulepipinstallpath/to/generated/wheel/fileYou will now be able to import the module in your Python's scripts by doing:importmcai_worker_sdkasmcaiCheck outmaturin's docsfor more information on building the module!Supported versionWe intempt to support as many distribution and architecture as we can, however ifpipdoesn't find any compatible version for your installation it will download the source and try to compile them directly.This operation supposes that you have at leastRust 1.62.We currently support the following version of Python implementations:CPython 3.8 : manylinuxCPython 3.9 : manylinux, macosx x86_64CPython 3.10 : manylinux, macosx x86_64, macosx arm64CPython 3.11 : manylinux, macosx arm54Pypy 3.8 : manylinuxPypy 3.9 : manylinuxAnd the following core architectures:x86_64TestTo run tests you must havejson-strong-typinginstalled:pipinstalljson-strong-typingThen launch tests basically:cargotestcargotest--featuresmediaRunning examplesBuild the Python moduleIn your virtual environment:maturindevelopSimple workerRUST_LOG=debug\SOURCE_ORDERS="examples/message.json"\PYTHON_WORKER_FILENAME="worker.py"\SOURCE_PATH="README.md"\DESTINATION_PATH="README.md.out"\pythonworker.pyMedia workerFirst set the media filename:exportSOURCE_PATH="/folder/filename.ext"Then run the SDK with these parameters:RUST_LOG=debug\SOURCE_ORDERS="examples/message.json"\PYTHON_WORKER_FILENAME="media_worker.py"\DESTINATION_PATH="results.json"\cargorun--featuresmedia
Package: mcai-worker-sdk-media
Python SDK for Media Cloud AI workersBased onmcai_worker_sdk, this SDK uses thePyO3 crateto export a compiled module compatible with CPython ABI.DocumentationPlease, check the docshereandherefor the SDK with the media feature enabled.BuildBefore using the Python module you should build it as a CPython library. This will require a virtualenv (where the module will be installed) andmaturinto compile the module.virtualenvvenv# Create your environmentsourcevenv/bin/activate# Launch itYou can then either build the module in development mode (this will build and install the module in your virtualenv):maturindevelop--featuresextension-module# Build and install the moduleOr build the wheel file and install it manually viapip:maturinbuild--featuresextension-module# Build the wheel file to install the modulepipinstallpath/to/generated/wheel/fileYou will now be able to import the module in your Python's scripts by doing:importmcai_worker_sdkasmcaiCheck outmaturin's docsfor more information on building the module!Supported versionWe intempt to support as many distribution and architecture as we can, however ifpipdoesn't find any compatible version for your installation it will download the source and try to compile them directly.This operation supposes that you have at leastRust 1.62.We currently support the following version of Python implementations:CPython 3.8 : manylinuxCPython 3.9 : manylinux, macosx x86_64CPython 3.10 : manylinux, macosx x86_64, macosx arm64CPython 3.11 : manylinux, macosx arm54Pypy 3.8 : manylinuxPypy 3.9 : manylinuxAnd the following core architectures:x86_64TestTo run tests you must havejson-strong-typinginstalled:pipinstalljson-strong-typingThen launch tests basically:cargotestcargotest--featuresmediaRunning examplesBuild the Python moduleIn your virtual environment:maturindevelopSimple workerRUST_LOG=debug\SOURCE_ORDERS="examples/message.json"\PYTHON_WORKER_FILENAME="worker.py"\SOURCE_PATH="README.md"\DESTINATION_PATH="README.md.out"\pythonworker.pyMedia workerFirst set the media filename:exportSOURCE_PATH="/folder/filename.ext"Then run the SDK with these parameters:RUST_LOG=debug\SOURCE_ORDERS="examples/message.json"\PYTHON_WORKER_FILENAME="media_worker.py"\DESTINATION_PATH="results.json"\cargorun--featuresmedia
Package: mcalc
mcalcA simple not very precise calculator :exclamation::exclamation::exclamation:Able to perform basic operations like:AddSubtractMultiplyDivideTakenrootGetting started:Instalation:To install the package runpip install mcalcUsage examples>>> from mcalc.calc import Calculator
>>> Calculator(0)
0.0
>>> Calculator(1)
1.0
>>> cal1 = Calculator(10)
>>> cal1.add(5)
15.0
>>> cal1.subtract(10)
5.0
>>> cal1.multiply(-5)
-25.0
>>> cal1.divide(-5)
5.0
>>> cal1.n_root(3)
1.7099759466766968
>>> cal1.reset(9)
9.0
>>> cal1.n_root(2)
3.0
>>> cal1.n_root(0.2)
243.0Usage caveatsYou get basicpython floating point precisionn_rootmethod doesn't support taking roots of negative numbers, because this package doesn't support complex numbers (simple is in the name :sweat_smile:)LicenseThis code is protected under the MIT license