Saravanan666/pypi-org huggingface dataset:
Package: linux-metrics
System Metrics/Stats Library for Linux2010-2013Corey GoldbergDev Home:https://github.com/cgoldberg/linux-metricsPyPI:http://pypi.python.org/pypi/linux-metricsFree Open Source :MIT LicenseDescriptionlinux-metricsis a Python package containing modules for getting OS metrics on systems running the Linux kernel.  It is a pure python library with no external dependencies.Basic stats for major subsystems are provided (Processor/CPU, Disk, Memory, Network).Install from PyPIpip install linux-metricsRequirementsPython 2.6/2.7/3.1/3.2/3.3/PyPyLinux 2.6+Example Usageprint number of processes running:from linux_metrics import cpu_stat

print cpu_stat.procs_running()print CPU utilization every 5 secs:>>> from linux_metrics import cpu_stat
>>>
>>> while True:
...     cpu_pcts = cpu_stat.cpu_percents(5)
...     print 'cpu utilization: %.2f%%' % (100 - cpu_pcts['idle'])
...
cpu utilization: 0.70%
cpu utilization: 0.50%
cpu utilization: 24.80%
cpu utilization: 20.89%
cpu utilization: 40.04%API* linux_metrics
  * cpu_stat
    * cpu_times()
    * cpu_percents(sample_duration=1)
    * procs_running()
    * procs_blocked()
    * load_avg()
    * cpu_info()
  * disk_stat
    * disk_busy(device, sample_duration=1)
    * disk_reads_writes(device)
    * disk_usage(path)
    * disk_reads_writes_persec(device, sample_duration=1)
  * mem_stat
    * mem_stats()
  * net_stat
    * rx_tx_bytes(interface)
    * rx_tx_bits(interface)
    * rx_tx_dump(interface)Examplelinux-metricspackage contains an example script:example.pyUnit TestsYou can run the included unit tests and verify all cases pass in your environment:$ nosetestsNote:  you may need to adjust the configuration of the unit tests to match your environment.  They are set by default to use:DISK_DEVICE = 'sda1'

NETWORK_INTERFACE = 'eth0'
Package: linuxnet-iptables
linuxnet-iptableslinuxnet-iptablesprovides programmatic access to the
Linuxiptables(8)command.
Usinglinuxnet-iptablesone can view existing chains/rules,
create new ones, or delete existing ones.
The package documentation is availablehere.For the following examples, Python3 (3.6 or later) is required.>>>fromlinuxnet.iptablesimportIptablesPacketFilterTable>>>table=IptablesPacketFilterTable('filter')>>>table.read_system_config()>>>input_chain=table.get_chain('INPUT')>>>forruleininput_chain:...print(' '.join(rule.to_iptables_args()))...-jprod_bad_traffic-mstate--stateRELATED,ESTABLISHED-jACCEPT-jprod_ingress-jprod_INPUT_ldrop>>>>>>print(input_chain.get_packet_count())183506560>>>The above code requires root access in order to successfully invoke theiptablescommand. If you are uncomfortable running it as root, you can
extract theiptablesoutput as root and then process it withlinuxnet-iptables(note that the-xnvoptionsmustbe
specified):#iptables-xnv-L>/tmp/iptables.output#Then, as a regular user:>>>withopen("/tmp/iptables.output")asf:...output=f.read()...>>>fromlinuxnet.iptablesimportIptablesPacketFilterTable>>>table=IptablesPacketFilterTable('filter')>>>table.init_from_output(output)True>>>input_chain=table.get_chain('INPUT')>>>forruleininput_chain:...print(' '.join(rule.to_iptables_args()))...-jprod_bad_traffic-mstate--stateRELATED,ESTABLISHED-jACCEPT-jprod_ingress-jprod_INPUT_ldrop>>>Modifications to the chains are also supported as shown in the
following (hereon, root permissions will be assumed).Creating a new chain:>>>fromlinuxnet.iptablesimportChainRule,Targets>>>newchain=table.create_chain('acceptall')>>>newchain.append_rule(ChainRule(target=Targets.ACCEPT))>>>#iptables-nv-LacceptallChain acceptall (0 references)pkts bytes target     prot opt in     out     source               destination0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0#Modifying the new chain to only accept TCP packets:>>>newchain.flush()# remove the existing rule>>>fromlinuxnet.iptablesimportPacketMatch>>>match_tcp=PacketMatch().protocol().equals('tcp')>>>rule=ChainRule(match=match_tcp,target=Targets.ACCEPT)>>>newchain.append_rule(rule)>>>newchain.append_rule(ChainRule(target=Targets.DROP))>>>#iptables-Lacceptall-nvChain acceptall (0 references)pkts bytes target     prot opt in     out     source               destination0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/00     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0#Deleting the new chain:>>>table.delete_chain(newchain)>>>InstallationPython3 is required.AvailableMakefiletargets can be listed by invokingmakewith no arguments.make installwill install the package.make testruns the unit tests.
Package: linuxnet-qos
linuxnet-qoslinuxnet-qosprovides programmatic access to thetc(8)command.
Usinglinuxnet-qosone can manipulate the Linux Traffic Control
functionality (queuing disciplines).For the following examples, Python3 (3.6 or later) is required.Accessing an interface's queuing discipline configuration:>>>fromlinuxnet.qosimportQDiscConfig>>>config=QDiscConfig('eth2')>>>config.dump()PFifoFastQDisc(0:0)rootbands3priomap1222120011111111PFifoFastQDiscis the Python class used to represent thepfifo_fastqueuing discipline (seetc-pfifo_fast(8)).The following examples modify the interface's queuing discipline, so
root privileges are required for successful execution of thetccommand.Replacing the interface's root queuing discipline:>>>fromlinuxnet.qosimportNetemQDisc,Handle>>>netem_qdisc=NetemQDisc(Handle(1,1),None,delay=30.0)>>>config.create_qdisc(netem_qdisc)>>>config.dump()NetemQDisc(1:1)rootdelay30.0msDeleting the existing queuing discipline configuration:>>>config.delete_config()>>>config.read_interface_config()True>>>config.dump()PFifoFastQDisc(0:0)rootbands3priomap1222120011111111InstallationPython3 is required.AvailableMakefiletargets can be listed by invokingmakewith no arguments.make installwill install the package.make testruns the unit tests.
Package: linuxp
Documentation:https://docs.linuxprofile.comSource Code:https://github.com/linux-profile/linux-profileIntroductionEnglish:Linuxpis a CLI tool for Linux profile management. With this project it is possible, from commands executed in the console, to create a file injsonformat to store the backup settings. For example, information about packages, aliases, scripts, texts and files. It also allows with a single command to restore the saved settings.Português:Linuxpé uma ferramenta de CLI para gerenciamento de perfil do Linux. Com este projeto é possível, a partir de comandos executados no console, criar um arquivo no formatojsonpara armazenar as configurações de backup. Como por exemplo, informações sobre pacotes, alias, scripts, textos e arquivos. Também permite com um único comando restaurar as configurações salvas.Why?English: With the need to automate processes and execution of scripts,Linuxpemerged, a project developed in python that aims to create a standard in the chaos of storing information about packages, aliases, scripts, texts and files in a single place, fully customizable from according to the user.Português: Com a necessidade de automatizar os processos e execução de scripts, surgiuLinuxp, projeto desenvolvido em python que tem como objetivo criar um padrão no caos do armazenamento de informações de pacotes, alias, scripts, textos e arquivos em um único local, totalmente personalizável de acordo com o usuário.Quick URLsLast Version ->https://linuxprofile.com/LAST_VERSIONInstallation ->https://linuxprofile.com/install.shUninstallation ->https://linuxprofile.com/uninstall.shInstallationPIPpip install linuxpPoetrypoetry add linuxpBash/Curl/bin/bash -c "$(curl -fsSL https://linuxprofile.com/install.sh)"Pacmangit clone https://github.com/linux-profile/linux-profile.git
cd linux-profile
makepkg
sudo pacman -U linux-profile-1.0.19-1-any.pkg.tar.zstUninstallationPIPpip uninstall linuxpPoetrypoetry remove linuxpBash/Curl/bin/bash -c "$(curl -fsSL https://linuxprofile.com/uninstall.sh)"Pacmansudo pacman -R linux-profileCommandsCommandDescriptionDocslinuxp configSettings file management.Linklinuxp profileProfile file management.Linklinuxp addParameter used to add a new item to the list in your profile file.Linklinuxp removeRemoves items from the profile file.Linklinuxp installThis parameter is used to install the modules,package,aliasandscript.Linklinuxp uninstallCommand used to uninstall items. Bevery carefulwhen running.Linklinuxp listLists all modules in the terminal and can also apply filters to find items.LinkExample Profile FileLink -linux_profile.jsonCommit Style⚙️ FEATURE📝 PEP8📌 ISSUE🪲 BUG📘 DOCS📦 PyPI❤️️ TEST⬆️ CI/CD⚠️ SECURITYLicenseThis project is licensed under the terms of the MIT license.
Package: linuxp-plugin
Documentation:https://docs.linuxprofile.comSource Code:https://github.com/linux-profile/linux-profile-pluginInstallationInstall - Pypi/PIPpip install -U linuxp-pluginCommandsCommandDescriptionDocslinuxp_plugin helloMy custom command.Linklinuxp_plugin exploreThis command shows some settings.LinkCommit Style⚙️ FEATURE📝 PEP8📌 ISSUE🪲 BUG📘 DOCS📦 PyPI❤️️ TEST⬆️ CI/CD⚠️ SECURITYLicenseThis project is licensed under the terms of the MIT license.
Package: linux-remote
This is an Server Package forLinuxRemoteAndroid APP.SeePromo videofor more information.Steps to InstallUsing pip package installer of python 2 or 3$ sudo pip3 installlinux-remote$ sudolinux-remote-setupinstallSteps to Upgrade$ sudo pip3 install--upgradelinux-remote$ sudolinux-remote-setupinstallSteps to Uninstall$ sudolinux-remote-setupuninstall$ sudo pip3 uninstalllinux-remote
Package: linuxserver
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.
Description: # linuxserver## About
linuxserver is a simple command-line interface that enables you to easily install a complete home media server onto your machine. It uses open-source images from [linuxserver.io](https://www.linuxserver.io/) and deploys them to Docker. The following services are supported:[Deluge](https://deluge-torrent.org/)[Gluetun](https://github.com/qdm12/gluetun)[Jackett](https://github.com/Jackett/Jackett)[Plex](https://www.plex.tv/)[Radarr](https://radarr.video/)[Sonarr](https://sonarr.video/)[Heimdall](https://heimdall.site/)## Requirements
- Python
- Docker## Installation
Please follow these steps to install Linux Server CLI:1. Installation via pip:`shell pip install linuxserver `2. Verify installation:`shell linuxserver-v`## Usage
Please follow these steps to use Linux Server CLI`shell linuxserver deploy gluetun deluge heimdall jackett sonarr radarr plex `Platform: UNKNOWN
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Package: linuxstream
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.
Package: linux-ticker
Simple ticker for use on linux platform. Maximum tick resolution is
1 millisecond.Install using pip:pipinstalllinux-tickerSimple use shown below:fromlinux_tickerimportTicker,RepeatedTickerdefhello(interval):print(f'hello() woke after{interval[0]}s')Repeat the ticker every 0.002 seconds for 2 times:repeated_ticker=RepeatedTicker(interval=0.002,count=2)repeated_ticker.tickback(hello,args=(repeated_ticker.interval,))Execute lambda:repeated_ticker.tickback(lambdax:print(f'lambda woke after{x[0]}s'),args=(repeated_ticker.interval,))No tickback - only ticks:repeated_ticker.tickback(None,args=())Repeat the ticker every 0.01 secondsimple_ticker=Ticker(interval=0.01)try:whilesimple_ticker.tick():print(f'simple ticker woke after{simple_ticker}s')finally:simple_ticker.stop()
Package: linux-touchpad
A simple, lightweight command line utility for managing your touchpad.Disable when a mouse is detected.Enabled when no mice are detected.Toggle this behavior.For a more feature-rich implementation, seetouchpad-indicator.DependenciesPython 3.7https://www.python.org/downloads/release/python-373/Libinputhttps://wiki.archlinux.org/index.php/LibinputInstall$ pip install linux-touchpadUsageStartTo begin the process, use this command:$ python -m linux_touchpad startToggleEnabled the touchpad and ignore mouse events:$ python -m linux_touchpad toggleStop$ python -m linux_touchpad stopAuthorNoah Coronanoah@coronasoftware.net
Package: linvpy
LinvPy is a Python package designed to solvw linear inverse problems of the form y=Ax+n, where y is a vector of measured values, A a known matrix, x an unknown input vector and n is noise. The goal is to find x, or at least the best possible estimation; if the matrix A is invertible, the solution is easy to find by multiplying by the inverse. If A is not invertible, we need to use regression techniques such as least squares method to find x. The first motivation for this project is that Marta Martinez-Camara, PhD student in Communications Systems at EPFL (Switzerland) desgined some new algorithms to solve linear inverse problems (namely the Tau-Estimator), and this package is a Python implementation of these algorithms, which may not be available anywhere else than here. LinvPy also contains several other famous but not implemented or not publicly distributed algorithms such as regularization functions, loss functions or M-estimator.To install from pip, simply run :
$ sudo pip install linvpyPyPi link :https://pypi.python.org/pypi/linvpyReadTheDocs link :http://linvpy.readthedocs.org/en/latest/
Package: linx-connection
Installing:pip install --user linx_connectionUsage:conn = LinxConnection(port='\<port>') # \<port> can be /dev/ttyUSBX if you are running on Linux or COMX if Windows
dct = conn.AnalogRead(1) # -> {..., 'data': \<data>, ...} where \<data> is bytes object representing status of A1 port. Use transfrom(dct) to get normal int value
Package: linxo
python-linxo-client===================|PyPI| |PyPI| |Build Status| |Requirements Status|Python client for `Linxo API <https://www.linxo.com>`__Installation============The python wrapper works with Python 2.6+ and Python 3.2+.The easiest way to get the latest stable release is to grab it from`pypi <https://pypi.python.org/pypi/linxo>>`__ using ``pip``... code:: bashpip install linxo-clientAlternatively, you may get latest development version directly from Git.::pip install -e git+https://github.com/alkivi-sas/python-linxo-client.git#egg=linxoConfiguration=============Create a linxo.conf. They are parsend in that order.::# Current directory./linxo.conf# Home directory~/.linxo.conf# Global/etc/linxo.confThe file should contains client\_id and client\_secret with a fakeaccess and refresh\_token. You can obtain client\_id and client\_secretby contacting Linxo.\`\`\`ini [default] endpoint = prod[prod] client\_id = dazjdkazldnoiazd,azldaz client\_secret = dazdazdzaaccess\_token = fake for now refresh\_token = fake for now\`\`\`\`Next step is to generate a token.. code:: python# -*- encoding: utf-8 -*-import linxo# create a client using configurationclient = linxo.Client()# Request tokenvalid_scopes = ['accounts_manage','accounts_read','connections_manage','connections_sync','transactions_read','users_create']client.generate_token(scopes=['transactions_read'])Execute the code, you will be asked to login to linxo and you will beredirected to localhost. Copy the code part, and the token will be saveto your configuration file automatically.Usage=====.. code:: python# -*- encoding: utf-8 -*-import linxoclient = linxo.Client()client.get('/transactions')Documentation=============The api documentation is `availablehere <https://sandbox-api.linxo.com/v2/documentation/>`__... |PyPI| image:: https://img.shields.io/pypi/v/linxo.svg.. |PyPI| image:: https://img.shields.io/pypi/status/linxo.svg.. |Build Status| image:: https://travis-ci.org/alkivi-sas/python-linxo-client.svg?branch=master:target: https://travis-ci.org/alkivi-sas/python-linxo-client.. |Requirements Status| image:: https://requires.io/github/alkivi-sas/python-linxo-client/requirements.svg?branch=master:target: https://requires.io/github/alkivi-sas/python-linxo-client/requirements/?branch=master
Package: linz-logger
Python LINZ LoggerWhy?LINZ has a standard logging format based loosely on thepinojslogging format:{"level":30,"time":1571696532994,"pid":10671,"hostname":"Ubuntu1","id":"01DQR6KQG0K60TP4T1C4VC5P74","msg":"SomeMessage","v":1}Usagepip install --upgrade linz-loggerfromosimportenvironfromlinz_loggerimportget_log,set_level,LogLevelset_level(LogLevel[environ.get("LOGLEVEL","WARNING").lower()].value)set_contextvars({"country":"NZ"})# remove_contextvars(["country"]) to remove a keyget_log().error('Hello World',key="value")# {"key": "value", "level": 50, "time": 1601555605017, "v": 1, "pid": 311800, "id": "01G9XAA1MCMX2K9NZN9GJJHN71", "msg": "Hello World", "hostname": "Ubuntu1", "country": "NZ"}
Package: lio
LIO: Learning from Indirect ObservationsA package for weakly supervised learning research based on PyTorchInstallationpipinstalllioorgitclonehttps://github.com/YivanZhang/lio.git
pipinstall-e.Most of the modules are designed as small (higher-order) functions.Feel free to copy-paste only what you need for your existing workflow to reduce dependencies.ReferencesLearning from Indirect ObservationsYivan Zhang, Nontawat Charoenphakdee, and Masashi Sugiyama[arXiv]Learning from Aggregate ObservationsYivan Zhang, Nontawat Charoenphakdee, Zhenguo Wu, and Masashi Sugiyama[arXiv][NeurIPS'20][poster]Learning Noise Transition Matrix from Only Noisy Labelsvia Total Variation RegularizationYivan Zhang, Gang Niu, and Masashi Sugiyama[arXiv][code]Approximating Instance-Dependent Noisevia Instance-Confidence EmbeddingYivan Zhang and Masashi Sugiyama[arXiv][code]
Package: liom-toolkit
Liom ToolkitThis package supports the research being done by theLaboratoire d’Imagerie Optique et Moléculaireat
Polytechnique Montréal. It hosts a collection of scripts used to process and analyze data collected by the lab.InstallationThe package can be installed using pip:pipinstallliom-toolkitRequirementsThe package requires the following packages to be installed and will attempt to install them using installation:antspyxallensdkscikit-imageome-zarrnibabelzarrh5pypynrrdSimpleITKTo create an anaconda environment with all the required packages, run the following commands:condacreate-n<name>
condaactivate<name>
condainstallpython=3.10# The line below is for Apple Silicon specifically.# Hdf5 needs to be installed using homebrew.HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.14.3pipinstalltables
pipinstallallensdk
pipinstallantspyx
pipinstallliom-toolkitPackage StructureThe package contains the following modules:RegistrationThe registration module is concerned with performing registration on brain imagery. It hosts a collection of scripts for
registering mouse brains to the Allen Atlas as well as functions for creating brain templates to use in registration.SegmentationThe segmentation module is concerned with segmenting brain imagery. It contains scripts to segment vessels in 2d slices.UtilsVarious utility functions used by the other modules. These include function for converting between the different data
files used within the lab.
Package: lion
LionLion is a very flexible yet fast library for mapping objects to
dictionaries. It uses a declarative API and supports a query language
similar to GraphQL. Unlike other serialization libraries it also
allows to skip entire fields instead of having anullvalue
in the dictionary.It is inspired by libraries likeserpy,marshmallow,Django REST FrameworkandKim.ExampleimportlionclassGroupMapper(lion.Mapper):id=lion.UUIDField()name=lion.StrField()classUserMapper(lion.Mapper):id=lion.UUIDField()email=lion.StrField(condition=lion.skip_empty)first_name=lion.StrField()last_name=lion.StrField()groups=lion.ListField(GroupMapper)user=User(id=UUID('ad94d0e8-2526-4d9b-ad76-0fbffcf41033'),email='john.doe@example.com',first_name='John',last_name='Doe',groups=[Group(id=UUID('95a326fc-32e5-4d9b-a385-1ea1257d98da'),name='Awesome people')])# Dump all fields to a dictionaryassertUserMapper().dump(user)=={'id':'ad94d0e8-2526-4d9b-ad76-0fbffcf41033','email':'john.doe@example.com','first_name':'John','last_name':'Doe','groups':[{'id':'95a326fc-32e5-4d9b-a385-1ea1257d98da','name':'Awesome people'}]}# Load user object from a dictionaryassertuser==UserMapper().load({'id':'ad94d0e8-2526-4d9b-ad76-0fbffcf41033','email':'john.doe@example.com','first_name':'John','last_name':'Doe','groups':[{'id':'95a326fc-32e5-4d9b-a385-1ea1257d98da','name':'Awesome people'}]})Query languageBy using the GraphQL-like query language it is possible
to dump and load only parts of a given structure:# Dump a subset of fieldsassertUserMapper('{id,email}').dump(user)=={'id':'ad94d0e8-2526-4d9b-ad76-0fbffcf41033','email':'john.doe@example.com'}# Dump subset of a nested mapperassertUserMapper('{id,email,groups{id}}').dump(user)=={'id':'ad94d0e8-2526-4d9b-ad76-0fbffcf41033','email':'john.doe@example.com','groups':['id':'95a326fc-32e5-4d9b-a385-1ea1257d98da']}PerformanceThe performance is somewhat slower thanserpybut still far ahead ofmarshmallowandDjango REST Framework.CaveatsLion also supports loading (serialization/marshalling) of data but currently does not perform any kind of validation. This is not a big deal if using Lion as part of a project which uses something likeconnexionwhich already performs validation using the provided OpenAPI specification file. Just be warned that loading an unvalidated data structure using Lion might result in somewhat weird looking data.