Saravanan666/pypi-org huggingface dataset:
Package: pymoai
🧰  pymoai - MontOps moai client for PythonThis repository contains the source code for MontOps AI's official python client. This client is currently in pre-alpha version, so feedback is always welcome!You are welcome to file an issue here for general use cases. You can also contact MontOps Supporthere.RequirementsPython 3.8 or above is required.DocumentationFor the latest documentation, seeMontOps AIQuickstartInstall the library withpip install pymoaiNote: Don't hard-code authentication secrets into your Python. Use environment variablesemail/Password Authentication:exportMOAI_USERNAME=*************exportMOAI_PASSWORD=*************If you already have a token, use that instead:exportMOAI_TOKEN=*****************************************Example usage:importosimportpandasaspdfrompymoai.clientimportMoaiClient# If no credentials are supplied, then environment variables are required.email="tech@montops.ai"password="$montops123"# ...or try using an active token.# This may fail, see exception handling below.token=None# First create client with active token or credentialsmoai=MoaiClient(# ...using email/passwordemail=email,password=password,# ...or if using token, token will take prioritytoken=token)# Check the health of your serverhealth=moai.health().dict()print("Health: ",health)asserthealthisnotNoneandhealth['status']=='live'# Add a dataset to your moai system# From a DataFramepath="/path/to/dataset/data.csv"df=pd.DataFrame(path)result=moai.datasets.add(df=df)# Or pass in a string path to read from fs directlyresult=moai.datasets.add(path=path)ifresult.ok:print("DataFrame uploaded: ",result.details)elseprint("Upload failed: ",result.error)Exception handling:frompymoai.clientimportMoaiClientfrompymoai.exceptionsimportApiResponseError,InvalidTokenErrortry:try:# An InvalidToken error is raised if the token is expired or incorrectmoai=MoaiClient(token=token)exceptInvalidTokenError:print(f"Token invalid, logging in instead.")# Catch all other errors using ApiResponseErrorsmoai=MoaiClient(email=email,password=password)exceptApiResponseErrorase:print(f"Could not create moai client:{e.error}")returnContributingWe will allow contributing soon!LicenseApache License 2.0
Package: pymobi
Mobipocket tools forunpackandremovesrcs.NoteNo removingDRMKindle Mobipocket format is private forAMAZON, but some superman have parsed many parameter. You may find it fromMobipocket WikiFeatureunpack mobi file into html, css and image file.stripSOURCEsection for package generated bykindlegenadd book title before filename…LicensePlease follow GPLv3
Package: pymobile
This is a startproject for web-projects using python3, bottle, jquerymobile, asyncio,websockets and worker-threads.Workflow:* Web-templates should be placed in views-folder.* Database-modules should be placed in models-folder.* Modules for bottle and worker-threads should be placed in controllers-folder.* Static webfiles should be placed in static-folder* Run project with serve.py. All modules in controllers-folder is importedautomatically, all worker-threads is started and bottle webserver is started.Have a look at the examples included in controllers, models and views ordelete them if you don't need them.DOCUMENTATION:python3:        http://docs.python.org/3/library/index.htmlbottle:         http://bottlepy.org/docs/stable/jquerymobile:   http://view.jquerymobile.com/1.3.1/dist/demos/shared workerthreads:Have a look at controllers/livecounter.py and controllers/wol.pyTIPS:To change host or port you can create a new python-file:: touch run.pyThen paste following text into the python-file:---- START ----#!/usr/bin/env python3import serveif __name__ == '__main__':serve.run(port=58580)----- STOP ----TIPS:To start pym automatically at system startup you should create a new upstart conf-file:: sudo touch /etc/init/pym.confThen paste following text into the conf-file:---- START ----# start pymdescription     "pym"start on (local-filesystemsand started dbusand static-network-up)stop on stopping dbusexec python3 /path/to/pym/serve.py----- STOP ----
Package: pymobiledevice
pymobiledevicepymobiledevice is a cross-platform implementation of the mobiledevice library
that talks the protocols to support iPhone®, iPod Touch®, iPad® and Apple TV® devices.RequirementsPython 2.7 and 3.xM2Cryptoconstruct >= 2.9.29pyasn1futuresixbiplistLockdownd.py [com.apple.lockownd]This script can be used in order to pair with the device & starts other services./!\ Others services can only being accessed after succesful pairing.
Succesful pairing requiert the device to be unlocked and user to click on
"Trust this device" on its phone screen.afc.py [com.apple.afc]This service is responsible for things such as copying music and photos. AFC Clients like iTunes
are allowed accessing to a “jailed” or limited area of the device filesystem. Actually, AFC clients can
only access certain files, namely those located in the Media folder.house_arrest.py [com.apple.mobile.house_arrest]This service allows accessing to AppStore applications folders and their content.
In other words, by using an AFC client, a user/attacker can download the application resources and data.
It also includes the “default preferences” file where credentials are sometimes stored.installation_proxy.py [com.apple.mobile.installation_proxy]The installation proxy manages applications on a device.
It allows execution of the following commands:List installed applicationsList archived applications...mobilebackup.py & mobilebackup2.py [ com.apple.mobilebackup & com.apple.mobilebackup2 ]Those services are used by iTunes to backup the device.diagnostics_relay.py [com.apple.mobile.diagnostics_relay]The diagnostic relay allows requesting iOS diagnostic information.
The service handles the following actions:[ Sleep ]Puts the device into deep sleep mode and disconnects from host.[ Restart ] Restart the device and optionally show a user notification.[ Shutdown ] Shutdown of the device and optionally show a user notification.[ NAND, IORegistry, GasGauge, MobileGestalt ] Querry diagnostic informations....filerelay.py [com.apple.mobile.file_relay]Depending of the iOS version, the file relay service may support the following commands:
Accounts, AddressBook, AppleSupport, AppleTV, Baseband, Bluetooth, CrashReporter, CLTM
Caches, CoreLocation, DataAccess, DataMigrator, demod, Device-o-Matic, EmbeddedSocial, FindMyiPhone
GameKitLogs, itunesstored, IORegUSBDevice, HFSMeta, Keyboard, Lockdown, MapsLogs, MobileAsset,
MobileBackup, MobileCal, MobileDelete, MobileInstallation, MobileMusicPlayer, MobileNotes, NANDDebugInfo
Network, Photos, SafeHarbor, SystemConfiguration, tmp, Ubiquity, UserDatabases, VARFS, VPN, Voicemail
WiFi, WirelessAutomation.All the files returned by the iPhone are stored in clear text in a gziped CPIO archive.pcapd.py [com.apple.pcapd]Starting iOS 5, apple added a remote virtual interface (RVI) facility that allows mirroring networks trafic from an iOS device.
On Mac OSX the virtual interface can be enabled with the rvictl command. This script allows to use this service on other systems.
Package: pymobiledevice-qta
pymobiledevicepymobiledevice is a cross-platform implementation of the mobiledevice library
that talks the protocols to support iPhone®, iPod Touch®, iPad® and Apple TV® devices.RequirementsPython 2.7 and 3.xM2Cryptoconstruct >= 2.9.29pyasn1futuresixbiplistLockdownd.py [com.apple.lockownd]This script can be used in order to pair with the device & starts other services./!\ Others services can only being accessed after succesful pairing.
Succesful pairing requiert the device to be unlocked and user to click on
"Trust this device" on its phone screen.afc.py [com.apple.afc]This service is responsible for things such as copying music and photos. AFC Clients like iTunes
are allowed accessing to a “jailed” or limited area of the device filesystem. Actually, AFC clients can
only access certain files, namely those located in the Media folder.house_arrest.py [com.apple.mobile.house_arrest]This service allows accessing to AppStore applications folders and their content.
In other words, by using an AFC client, a user/attacker can download the application resources and data.
It also includes the “default preferences” file where credentials are sometimes stored.installation_proxy.py [com.apple.mobile.installation_proxy]The installation proxy manages applications on a device.
It allows execution of the following commands:List installed applicationsList archived applications...mobilebackup.py & mobilebackup2.py [ com.apple.mobilebackup & com.apple.mobilebackup2 ]Those services are used by iTunes to backup the device.diagnostics_relay.py [com.apple.mobile.diagnostics_relay]The diagnostic relay allows requesting iOS diagnostic information.
The service handles the following actions:[ Sleep ]Puts the device into deep sleep mode and disconnects from host.[ Restart ] Restart the device and optionally show a user notification.[ Shutdown ] Shutdown of the device and optionally show a user notification.[ NAND, IORegistry, GasGauge, MobileGestalt ] Querry diagnostic informations....filerelay.py [com.apple.mobile.file_relay]Depending of the iOS version, the file relay service may support the following commands:
Accounts, AddressBook, AppleSupport, AppleTV, Baseband, Bluetooth, CrashReporter, CLTM
Caches, CoreLocation, DataAccess, DataMigrator, demod, Device-o-Matic, EmbeddedSocial, FindMyiPhone
GameKitLogs, itunesstored, IORegUSBDevice, HFSMeta, Keyboard, Lockdown, MapsLogs, MobileAsset,
MobileBackup, MobileCal, MobileDelete, MobileInstallation, MobileMusicPlayer, MobileNotes, NANDDebugInfo
Network, Photos, SafeHarbor, SystemConfiguration, tmp, Ubiquity, UserDatabases, VARFS, VPN, Voicemail
WiFi, WirelessAutomation.All the files returned by the iPhone are stored in clear text in a gziped CPIO archive.pcapd.py [com.apple.pcapd]Starting iOS 5, apple added a remote virtual interface (RVI) facility that allows mirroring networks trafic from an iOS device.
On Mac OSX the virtual interface can be enabled with the rvictl command. This script allows to use this service on other systems.
Package: pymobility
pymobilityWork done by South Asia Poverty Team, The World Bankpymobilityis the Python package built on top of PySpark API, which faciliates big data processing. This package has
several sub-packages and modules for quantifying mobility and migration from raw GPS data. The package takesdeltaformatted geo-tagged raw dataset and generates various datasets like Origin Destination matrix and net migration figures,
and various statistics like average records in a time-period, average devices registered in a time period, etc.pymobilityhas three sub-packages:odm,stm, andeda.odmis used for generating origin-destination figures.stmhelps to quantify short term migration depending on whatever definition we use for short term migrants. Thestmsub-package is made modular, and there are a number of parameters which can be set according to the definition of short
term migrant used. Another sub-package,eda, helps to do exploratory data analysis. We can get statistics like average
devices in some time-period, or average records in some time-period, etc. More documentation about the individual
sub-packages is done on the sub-package README file itself.DependenciesAs the package is built on top ofPySpark API,PythonAPI forSpark(orPySpark API) should be installed. The code is
well tested onPython 3.6, so users are encouraged to havePython 3.6+version.OtherPythonpackages used herein arePandas.InstallationBothpysparkandpandascan be installed usingpip. The commands for them are given below:pip install pandas
pip install pysparkMore details aboutpysparkcan be foundhere.UsageThis package can be used for quantifying mobility and migration from geo-taggged rawdeltafiles. It facilitates
following features.Origin Destination Matrix (OD matrix): Details about use of this library for quantifying origin-destination movement
can be found in theREADME.mdfile inside theodmsub-package itself.Short Term Migration: This type of migration is quantified usingstmsub-package, which facilitates flexibility in
short term migrants' definition with the help of different parameters like away time period required, definition of
home, etc.Exploratory Data Analysis: The exploratory data analysis can be done using theedasub-package. Underedacommuter aggregates and mobility summary can be quantified. Details about its use can be found in theREADME.md.
Package: pymobius
The Mobius Python Client provides simple access to the Mobius API for
applications written on PythonInstallationInstall the package withpip:$ pip install pymobiusUsageFor importing library use:frompymobiusimportMobiusThe library need to be configured with your API secret key which you can
create inMobius DApp Storemobius=Mobius(api_key='your_api_key')Examplesdata=mobius.app_store.balance(app_uid='f9e5e943',email='mail@example.com')ifdata['num_credits']>0:mobius.app_store.use(app_uid='f9e5e943',email='mail@example.com',num_credits=1)Methodsmobius.app_store.balance(app_uid, email)Get balance of credits for email.mobius.app_store.use(app_uid, email, num_credits)Use numCredits from user with email.mobius.tokens.register(token_type, name, symbol, address)Register a token.mobius.tokens.balance(token_uid, address)Query the number of tokens specified by the token.mobius.tokens.create_address(token_uid, managed)Create an address for the token.mobius.tokens.register_address(token_uid, address)Register an address for the token.mobius.tokens.transfer_managed(token_address_uid, address_to, num_tokens)Transfer tokens from a Mobius managed address to a specified address.mobius.tokens.transfer_info(token_address_transfer_uid)Get the status and transaction hash of a Mobius managed token
transfer.More informationSee theREST API docs
Package: pymoc
IntroductionPyMOC is a module for manipulating Multi-Order Coverage (MOC)
maps.  It includes support for reading and writing the three
encodings mentioned in the IVOA recommendation: FITS, JSON
and ASCII.PyMOC also includes a utility programpymoctoolto allow
MOC files to be manipulated from the command line.InstallationThe module can be installed using thesetup.pyscript:python setup.py installUnit TestsPrior to installation, the unit tests can be run using:PYTHONPATH=lib python3 -m unittestor:PYTHONPATH=lib python2 -m unittest discoverThe routines included in the doctests should also be covered by
the unit tests.  However to ensure the documentation is correct,
they can be checked with:sphinx-build -b doctest doc doc/_build/doctestRequirementsFor reading and writing data in FITS format, theastropylibrary is required.Healpyis needed for some of the utility functions such asplot_mocandcatalog_to_moc.LicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.Additional LinksDocumentation at Read the DocsRepository at GitHub
Package: py-moc
PyMOC is a simple, modular suite of python ocean column models for
use in studying the Meridional Overturning Circulation (MOC). The
MOC plays a critical role in the uptake and redistribution of heat
and carbon by the ocean, and as such both mediates and is governed
by shifts in the climate regime. As such, understanding of the MOC
is crucial to understanding of climate change.The model suite consists of several independent modules representing
various ocean regions and dynamics. Specifically, there are modules
for calculating the advective-diffusive buoyancy balance in zonally
constrained ocean basins (such as the Atlantic Ocean) in both
transient and equilibrium states, in re-entrant surface channel flow
(such as in the shallow Southern Ocean), for calculating a thermal
wind balance between basins, and for calculating residual wind and
eddy driven circulation in a deep channel. These modules may be
coupled to study an arbitrary circulatory structure (such as the AMOC).The intended audiences for this model are educators and students
of the geophysical sciences. While the goal is to provide an accessible
model appropriate for newcomers to geophysical modeling, the physics
captured in PyMOC are robust enough to support basic research as well.Configuration and execution of the PyMOC suite requires little
administrative knowledge on the technical end. All modules are written
in pure Python, and the only core dependencies are the NumPy and SciPy
libraries. If configuration of your base system environment is undesirable,
a preconfigured Docker container has been made available with all required
software libraries pre-installed. Furthermore, a goal of the development
team is to keep PyMOC well tested, stable, and maintainable to reduce
pain to the end user. Further details on installation, configuration,
contribution, and issue reporting is available in the documentation.
Package: pymochad
========pymochad========A python library for sending commands to the mochad TCP gateway daemon forthe X10 CMA15A controller:https://sourceforge.net/projects/mochad/Complete documentation is here: http://pymochad.readthedocs.io/en/latest/Usage=====Using PyMochad is pretty straightforward you just need to init a PyMochad objectand then issue commands to it. For example:.. code-block:: pythonfrom pymochad import controllermochad = remote.PyMochad()print(mochad.status())will connect to a running mochad instance (running on your localhost) and printthe device status.You can also send a command directly to a device using a device class. Forexample:.. code-block:: pythonfrom pymochad import controllerfrom pymochad import devicemochad = controller.PyMochad()light_switch = device.Device(mochad, 'a1')light_switch.send_cmd('on')will connect to a running a mochad instance and send the *on* command to thelight switch device at address *a1* on the power line interface.For a complete API documentation see: :ref:`pymochad_api`.
Package: py-mock
py-mockpipinstallpy-mockpy-mock 介绍py-mock移植了Mock.js、better-mock的功能到 Python，如果你熟悉 Mock
.js 的模板语法， 那么在 Python 中也能轻而易举地 Mock
出你想要的数据，py-mock100%兼容 Mock.js。一些说明实际上py-mock是借助了py_mini_racer来运行 Mock.js 中的 mock 函数，且仅移植了 Mock.mock
方法，如果有问题可以在 github 上给我提 issue。使用示例frompprintimportpprintfrompymockimportMockMock=Mock()pprint(Mock.mock('@csentence 变量示例'))'何思许型面率儿相算加阶角难角看有资。 变量示例'pprint(Mock.mock({'list|1-10':[{'id|+1':1,'email':'@EMAIL'}]})){'list': [{'email': 'n.metv@mddwjpjxo.cf', 'id': 1},
          {'email': 'e.vseuqc@viiuxwde.biz', 'id': 2},
          {'email': 'v.eoje@mklgh.ba', 'id': 3},
          {'email': 'm.xobzjwhegf@hsclkd.uk', 'id': 4}]}pprint(Mock.mock(Mock.mock({'number1|1-100.1-10':1,'number2|123.1-10':1,'number3|123.3':1,'number4|123.10':1.123}))){'number1': 56.5787,
 'number2': 123.14013355,
 'number3': 123.695,
 'number4': 123.1236478526}pprint(Mock.mock({'regexp1':r'/[a-z][A-Z][0-9]/','regexp2':r'/\w\W\s\S\d\D/','regexp3':r'/\d{5,10}/','regexp4':r'\/\d{5,10}\/'# output raw regexp with escape slash})){'regexp1': 'xP9',
 'regexp2': 'B \xa0V7O',
 'regexp3': '98356203',
 'regexp4': '/\\d{5,10}/'}pprint(Mock.mock({'name':{'first':'@first','middle':'@first','last':'@last','email':'example\\@gmail.com','full':'@first @middle @last'}})){'name': {'email': 'example@gmail.com',
          'first': 'Nancy',
          'full': 'Nancy Nancy Lee',
          'last': 'Lee',
          'middle': 'Nancy'}}pprint(Mock.mock({'random':{'name':['@name','@cname'],'image':[# @image( size, background, foreground, format, text )"@image","@image('300x400')","@image('300x400', '占位图文字')","@image('300x400', '#234567', '#FFFFFF', 'png', 'HelloWorld')"],'emoji':[# emoji( pool, min, max )"@emoji","@emoji('😀😁😂😃😄')","@emoji(3, 6)","@emoji('123🌘😷🙊★♠♫', 3, 6)"]}})){'random': {'emoji': ['🌛', '😀', '👲🌐👧🍢🌂🐁', '♫1★🙊'],
            'image': ['https://iph.href.lu/400x300?bg=&fg=&text=',
                      'https://iph.href.lu/300x400?bg=&fg=&text=',
                      'https://iph.href.lu/300x400?bg=&fg=&text=占位图文字',
                      'https://dummyimage.com/300x400/234567/FFFFFF.png?text=HelloWorld'],
            'name': ['Mary Thompson', '高刚']}}You can also Mock form JSON string or JavaScript Object like-stringpprint(Mock.mock_js("""{name: {first: "@cfirst",last: "@clast",name: "@first@last",}}""")){'name': {'first': '卢', 'last': '强', 'name': '卢强'}}更多示例
Package: pymockache
PymockacheCaching lib, which makes possible to cache function result.
It works like mock, but mocking is static result.
Library writes first computed result of function to caching backend and restores result from it for
subsequent function calls with the same properties.First of all it was made for async and redis as backend.How to run redis into docker:docker run --name caching-redis -p 6379:6379 -d redisHow to use:frompymockache.async_.decoratorsimportAsyncCachingWrapperfrompymockache.async_.backends.redisimportAsyncRedisCachingBackendimportaiohttpimportasyncioimportloggingimporttimelogger=logging.getLogger(__name__)caching_backend=AsyncRedisCachingBackend(redis_host="redis://localhost:6379/0")@AsyncCachingWrapper(backend=caching_backend,sign_variables=["page_url"],expire_milliseconds=100000,logger=logger,log_active=True)asyncdefget_page_text(page_url)->str:"""Function returns text of http response from page_url."""asyncwithaiohttp.ClientSession()assession:asyncwithsession.get(page_url)asresponse:awaitasyncio.sleep(2)# Little sleep for clarity of the resulthtml=awaitresponse.text()returnhtmlasyncdefmain():urls_list=["https://www.google.com/","https://www.python.org","https://www.google.com/","https://www.python.org"]forurlinurls_list:t0=time.time()text=awaitget_page_text(page_url=url)t1=time.time()delta=t1-t0print(f"Url:{url}. Text length:{len(text)}. Total time:{str(delta)}")if__name__=='__main__':asyncio.run(main())Result:Url: https://www.google.com/. Text length: 13337. Total time: 2.237496852874756
Url: https://www.python.org. Text length: 50053. Total time: 2.20656418800354
Url: https://www.google.com/. Text length: 13337. Total time: 0.010967254638671875
Url: https://www.python.org. Text length: 50053. Total time: 0.012981891632080078
Package: py-mock-couchbase
A dumb couchbase connection drop in for unit testing.nosetests -v –cover-package=cbmock –with-cover -srequires nodejs be installed.The MIT License (MIT)Copyright (c) 2014 SPS Commerce, Inc.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.