Saravanan666/pypi-org huggingface dataset:
Package: pysyslimit
pysyslimitpysyslimitis a light-weight library which can manage the permission in linux system.InstallationJust install this package with the pip commandpipinstallpysyslimitFor further information, take a look at theInstallation Page.Quick StartPlease attention that many function in this library need root permission, so It is strongly recommended to run this with root.Take a look at who I amfrompysyslimitimport*if__name__=="__main__":print("current user:",SystemUser.current())print("current user's groups:",SystemUser.current().groups)print("current group:",SystemGroup.current())The output should becurrent user: root
current user's groups: [<SystemGroup root, id: 0>]
current group: rootGet and update the permission of filesfrompysyslimitimport*if__name__=="__main__":print(FilePermission.load_from_file("test_file"))chmod_del("test_file","004")print(FilePermission.load_from_file("test_file"))chmod_add("test_file","014")print(FilePermission.load_from_file("test_file"))The output shall berw-rw-r--
rw-rw----
rw-rwxr--Do calculation between permissionsfrompysyslimitimport*if__name__=="__main__":print(FilePermission.loads('463')+FilePermission.loads('615'))print(FilePermission.loads('463')|FilePermission.loads('615'))# the same as +print(FilePermission.loads('463')-FilePermission.loads('615'))print(FilePermission.loads('463')&FilePermission.loads('615'))The output shall berw-rwxrwx
rw-rwxrwx
---rw--w-
r-------xContributingWe appreciate all contributions to improvepysyslimit,both logic and system designs. Please refer to CONTRIBUTING.md for more guides.Licensepysyslimitreleased under the Apache 2.0 license.
Package: pysyslogclient
# pysyslogclientSyslog client for Python 3 (RFC 3164/5424) for UNIX and Windows## DescriptionSyslog client following* RFC3164 (https://www.ietf.org/rfc/rfc3164.txt)* RFC5424 (https://www.ietf.org/rfc/rfc5424.txt)with UNIX and Windows support. TCP and UDP transport is possible.If TCP is used, on every log message, that is send to the specified server,and a connection error occured, the message will be dismissed anda reconnect will be tried for the next message.## UsageA small CLI client is implemented in *client.py*. To call it, run```python -m pysyslogclient.cli```### Startup clientTo setup the client for RFC 5424 over TCP to send to SERVER:PORT:```import pysyslogclientclient = pysyslogclient.SyslogClientRFC5424(SERVER, PORT, proto="TCP")```or for RFC3164:```import SyslogClientclient = pysyslogclient.SyslogClientRFC3164(SERVER, PORT, proto="TCP")```### Log a messsageLog the message "Hello syslog server" with standard severity *INFO* as facility*USER*. As program name *SyslogClient* the PID of the called python interpreteris used.```client.log("Hello syslog server")```To specify more options, call log with more arguments. For example to log athe message as program *Logger* with PID *1* as facility *SYSTEM* with severity*EMERGENCY*, call log the following way:```client.log("Hello syslog server",facility=pysyslogclient.FAC_SYSTEM,severity=pysyslogclient.SEV_EMERGENCY,program="Logger",pid=1)```### ShutdownTo disconnect, call```client.close()```
Package: pysysp
pysysp: Synthetic Stellar Photometry for PythonThis is a set of tools to compute synthetic photometry in a simple way,ideal to integrate in larger projects.The inputs are photonic response functions for the desired phtometric bands andstellar spectra. The units used in this package are: erg cm^-2 s^-1 Ang^-1 for fluxes;Ang^-1 for wavelength. Note that this implies units of cm Ang^-1 for the speed of light.These units must be used in all inputs for the package to operate properly.It is possible to compute magnitudes in Vega and AB systems, and interstellarextinction, for any given photometric passband, given an extinction law, which mustbe a callable object function of wavelength only. The only extinction law providedis the one by Cardelli, Clayton & Mathis (1989), but others can be easily added ifneeded.At the moment only the bandpasses for Bessel's UBVRI and Gaia's G filters are provided.References: Casagrande & VandenBerg (2014); Bessel & Murphy (2012)Acknowledgments:  Vega CALSPEC spectrum alpha_lyr_stis_006http://www.stsci.edu/hst/observatory/cdbs/calspec.htmlphotonic response functions by Bessel & Murphy (2012)for the U, B, V, R, I filters-------------------------Usage example:>>> import pysysp#load a spectrum from a fits file>>> vega = pysysp.StarSpectrum('alpha_lyr_stis_006.fits')#print the flux>>> vega.fluxarray([  1.23810533e-17,   1.67559561e-17,   1.78002369e-17, ...,1.40140733e-19,   1.38734358e-19,   1.26490663e-19], dtype=float32)#Check available filters>>> pysysp.showfilters{'Gaia': ['G'], 'Bessel': ['B', 'I', 'R', 'U', 'V']}#load the photonic response for the bands B and V with linear smoothing>>> V=pysysp.BandPass('V',smt='linear')>>> B=pysysp.BandPass('B',smt='linear')#You can also load any ascii file with two columns (first wavelength, second filter response)>>> B2 = pysysp.BandPass('./filters/B.dat')#compute the V magnitude in Vega system#The magnitude of Vega in V band is not 0, so in order to#compute the correct value we should correct the zero point>>> vega.apmag(V,mag='Vega',mzero=0.03)0.029999999999999999#Same in AB system>>> vega.apmag(V,mag='AB')0.0062420242892642364#Compute E(B-V) for a (monochromatic) extinction Av=0.5>>> ab=vega.extinction(B,law='cardelli',A=0.5,Rv=3.1)>>> av=vega.extinction(V,law='cardelli',A=0.5,Rv=3.1)>>> ab-av0.15954421668471008Changelog---------changelog:1.0.0 (09/04/2015)------------------- Initial release.1.0.1 (21/10/2015)------------------- added MANIFEST.in file
Package: pysystemd
##pysystemda systemd binding Library in pythonits Support python 2.7, python3### installto install pysystemd use pip install pysystemd### How to usethis library contains 4 classes1- statusthis class Contain Methods to query the status of the servicesit take the service name as Parameterto check if the service running or not you can use()is_running""" if the service running return 0. """to check if the service enable or not you can useis_enable()""" if the service enabled return 0. """2- servicesthis class use to   """manage the services like running and stop and reboot."""it take the service name as Parameterto run service usestart()return 0 if Succeed.to stop service usestop()return 0 if Succeed.to restart service use restart()to relode serviceuse relode()3- list_servicesthis class use to list servicesto list all servicesuse list_all()its return services names as listto list all running servicesuse list_running()its return running services as listto list all not running servicesuselist_dont_running()its return dont running services as listto list all enable servicesuse()list_enableits return  all enabled services as listto list all  disable servicesuselist_disable()its return all disabled services as list4- powerthis class use to manage the power in the systemto poweroffto poweroff the system usepoweroff()the reboot the system usereboot()to boot to rescue mode userescue()to suspend the system usesuspend()
Package: pySystemRDLModel
An abstract language model of SystemRDL written in Python.Main GoalsThis package provides a unified abstract language model for SystemRDL.
Projects reading from source files can derive own classes and implement additional logic to create a concrete language
model for their tools.Projects consuming pre-processed SystemRDL data (parsed, analyzed or elaborated) can build higher level features
and services on such a model, while supporting multiple frontends.Use CasespySystemRDLModel GeneratorsTBDpySystemRDLModel ConsumersElectronic Design Automation Abstraction (EDA²)ExamplesList all Modules with Parameters and PortsTBDContributorsPatrick Lehmann(Maintainer)and more...LicenseThis Python package (source code) licensed underApache License 2.0.The accompanying documentation is licensed underCreative Commons - Attribution 4.0 (CC-BY 4.0).SPDX-License-Identifier: Apache-2.0
Package: pyszn
A Python package for the Simplified Zone Notation standard.Documentationhttps://pyszn.readthedocs.org/Changelog1.6.0 (2022-06-07)NewAdd the capability to specify subnodes by using ´node>subnode´ syntax.Add the capability to specify a multiline text as value of an
attribute by using ``` [Sergio Salazar]1.5.0 (2021-11-04)ChangesUp to a 10x speedup when parsing attribute injection [Max Nedorezov]1.4.0 (2021-05-21)NewSupport parse topology from a ‘TOPOLOGY_ID’ [Jose Martinez]1.3.0 (2020-10-05)NewAllow user to skip paths using fnmatch [David Diaz]1.2.0 (2019-06-11)NewSupport for lists and floats types [Eduardo Mora]1.1.1 (2018-11-21)ChangesParser supports multiline attributes. [Javier Peralta]1.1.0 (2018-11-09)ChangesDropped support for Python 2.7. [Carlos Jenkins]FixFix grammar description for pyparsing > 2.2.2. [Carlos Jenkins]1.0.0 (2017-11-02)Initial public release.NewInject support links ports and env. [Javier Peralta]LicenseCopyright (C) 2016-2021 Hewlett Packard Enterprise Development LP

Licensed 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 at

    http://www.apache.org/licenses/LICENSE-2.0

Unless 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: pysztaki
Translator script for console using thehttp://szotar.sztaki.hudatabaseA really short script, which uses the given dictionaries (in first two
parameters) to translate a word or an expression. It uses web-based
translator of szotar.sztaki.hu (parsed with BeautifulSouphttp://www.crummy.com/software/BeautifulSoup/). TheSztakiQueryParserclass contains the actual translation code, it can be simply
reused.## Script homehttp://pysztaki.googlecode.com/https://github.com/oroszgy/pysztakiCopyright (c) 2008, Pek Daniel </br>
Copyright (c) 2014, György Orosz## RequirementsPython interpreter, tested with 3.4.The script depends on BeautifulSoup python module,
which can be downloaded fromhttp://www.crummy.com/software/BeautifulSoup/Since this is a very immature script, it may contain errors. Every
feedback, bugreport would be welcomed.## Usagesztaki.py <word/expression> [from_lang] [to_lang]Available languages
* eng
* hun
* ger
* pol
* fre
* ita
* bul
Package: pyszuru
pyszuruPython interface for szurubooruInstallation:pip install pyszuruUsageCreating API Instanceimportpyszurumybooru=pyszuru.API("https://example.com/booru",username="alice",# Authenticate with a passwordpassword="hunter2",# Or use a tokentoken="my-token-string",# Optionally specify a API base URL if it differs from the default configuration# api_url="/booru-api", <-- relative to base URL# api_url="https://api.example.com/booru", <-- new absolute base)Working with tagsNote: it is reccomended to use the factory functions outlined below instead of calling theTagconstructor directly.Get existing tagGet an existing tag from the booru by referencing it by namemarvel_comics_tag=mybooru.getTag("marvel_comics")Create new tagCreate a new tag, must specifiy a primary name onlyspiderman_tag=mybooru.createTag("spiderman")Alter properties of tagspiderman_tag.implications=spiderman_tag.implications+[marvel_comics_tag]spiderman_tag.push()Working with postsNote: it is reccomended to use the factory functions outlined below instead of calling thePostconstructor directly.Get existing postmy_old_post=mybooru.getPost(1337)Create a postwithopen("image.jpg","rb")asf:file_token=mybooru.upload_file(f)my_new_post=mybooru.createPost(file_token,"safe")Alter tags of a postmy_new_post.tags=[marvel_comics_tag,spiderman_tag]my_new_post.push()SearchingSearching across tagsunused_tags=mybooru.search_tag("usages:0")Searching across postsforpostinmybooru.search_post("marvel_comics type:image special:fav",show_progress_bar=True):wget.download(post.content)Reverse image searchwithopen("similar.jpg","rb")asf:similar_file_token=mybooru.upload_file(f)result=mybooru.search_by_image(similar_file_token)ifresult:ifany(x.exactforxinresult):raiseException("Found an exact match")else:warnings.warn(f"Found{len(result)}similar posts")
Package: pyt
Pyt is a lightweight wrapper aroundPython’s unittest
modulethat adds
some nice features and enhancements over the stockunittestmodule.QuickstartPyt overrides unittest’s built-in pathfinding to be smarter and less
verbose, so you can match tests using prefix matching which makes
running a test like:$ python -m unittest tests.foo_test.BarTestCase.test_cheas simple as:$ pyt foo.Bar.cheBut it’s even less verbose if you want it to be, pyt can reach into the
modules and classes to do its matching, so you don’t even need to
specify the module and class if you don’t want to:$ pyt cheMore examplesTo run all theHappytests:$ pyt HappyTo run all thenewmoduletests:$ pyt newmoduleTo run more than one test:$ pyt test1 test2 ...To run every testpytcan find:$ pytAnd the way I like to run all tests in the current directory:$ pyt -vbWhich can also be written:$ pyt --verbose --bufferFlagsTo see everything pyt can do$ pyt --help–warningsThis will convert warnings into errors.$ pyt --warnings–rerunIf your last testrun had failing tests this will rerun only the tests
that failed.$pyt --rerunThings to be aware ofpyt uses Python’s PEP 8 style conventionspytusesPython’s code styling
conventionsto decide what
is the module and class, so, given input like this:$ pyt foo.bar.Baz.chepytwill considerfoo.barto be the module,Bazto be a
class (because it starts with a capital letter), andcheto be a
method (since it comes after the class).Likewise,pytuses unittest conventions, so a test module should end
with_test(eg,foo.bar_test) or start with test (eg,test_foo.py) and a TestCase class should extendunittest.TestCase, and test methods should start withtest_(eg,test_che).Vague input can cause pyt to run more tests than you expectSo if you have something like this:project/
  __init__.py
  user.py
  foo/
    __init__.py
    user.py
  tests/
    __init__.py
    user_test.py
    foo/
      __init__.py
      user_test.pyAnd you want to run tests forfoo.userand you run:$ pyt userit will run bothtests/user_testandtests.foo.user_test, the
solution is to just be more verbose when you have to be:$ pyt foo.userEnvironment VariablesIf you are running the tests within pyt, you might notice there is an
environment variablePYT_TEST_COUNTthat contains the count of how
many tests pyt found to run.InstallationUsepip:$ pip install pytYou can also get it directly from the repo:$ pip install --upgrade git+https://github.com/Jaymon/pyt#egg=pytIf you install pyt using Python 3 it can also be invoked using thepyt3command:$ pyt3 --helpLikewise, Python 2 installs apyt2command:$ pyt2 --helpTestingTesting in 2.7 on most systems:$ python -m unittest pyt_testTesting in 3.5 on MacOS:$ python3.5 -m unittest pyt_test
Package: pyta
Pyta = Python + BetaInspired by:http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdfUsageInner dispatch is used to guarantee pre- and post-conditions without
using auxiliary methods. An external dispatch results in the lowest method
that callsinnerbeing called. Aninner(cls, self)call calls the
next highest method that has aninnercall, or the highest method if
there is no higherinnermethod.superworks the same as before,
but take care not to cause an infinite loop.Full example:from pyta import inner, BetaMetaclass

class A(object):
    def foo(self):
        print "world!"

class B(A): # Can inherit from regular classes
    # The lowest class in the hierarchy that uses `inner` needs the metaclass
    __metaclass__ = BetaMetaclass

    def foo(self):
        inner(B, self).foo() # Calls C.foo
        super(B, self).foo() # Calls A.foo

class C(B):
    def foo(self):
        print "Hello, "

obj = C()
obj.foo() # External dispatch; calls B.fooCaveatsBecause usinginnerin a superclass completely changes which method
an external dispatch resolves to (it’s no longer the most-overriding method)
the metaclass is required to inspect the source of the methods and sprinkle
some magic to make it all work.In order for everything to work properly, youmustcallinner(cls, self)lexically. In other words, it won’t work if you do this:bar = inner
bar(cls, self).foo()Or this:from pyta import inner as bar
bar(cls, self).foo()Currently, the implementation doesn’t distinguish between strings vs. actual method
calls, so if your method contains a string like"text inner( moretext", it’ll
break everything.
Package: pytab
pyTable is the library to plot table easily!(on matplotlib)installation$ pip install pytabHow to use?Example /table_0.pyYou can plot a table easily by giving data as a dict object as below.importpytabasptif__name__=='__main__':data={'a':[1.0,2.1,3.5,'-',2.0,1.0,2.1,3.5,4.0,2.0,],'b':[5.7,6.1,7.2,8.3,1.2,5.7,6.1,7.2,8.3,'-',],}# The simplest tablept.table(data=data)pt.show()table0Example /table_1.pyAnd, you can design a table easily.importpytabasptif__name__=='__main__':data={'a':[1.0,2.1,3.5,4.0,2.0,1.0,2.1,3.5,4.0,2.0,],'b':[5.7,6.1,7.2,8.3,1.2,5.7,6.1,7.2,8.3,1.2,],}rows=[str(i)foriinrange(len(data['a']))]pt.table(data=data,rows=rows,# set numbers as rowth_c='#aaaaee',# set table header background-colortd_c='gray',# set table data (rows) background-colortable_type='striped',# set table type as 'striped')pt.show()table1Documentation[en]pyTable Documentation[jp]pyTable ドキュメントLICENSEMITCopyright (c) 2020 HiroshiARAKI All Rights Reserved.
Package: pytabby
Aflexible, non-opinionated,tabbedmenu system to interactively control program flow for
terminal-based programs. It’s a class with one sole public method which runs in awhileloop as you switch tabs (if you want tabs, that is; you’re free not to have any) or if you
enter invalid input, and then returns a string based on the value you selected that
you can use to control the outer program flow.Of course, you can run the class itself in awhileloop in the enclosing program, getting
menu choice after menu choice returned as you navigate a program.Installationpip install pytabbyMeow.UsagefrompytabbyimportMenumyconfig=Menu.safe_read_yaml('path/to/yaml')# or Menu.read_json() or just pass a dict in the next stepmymenu=Menu(myconfig)result=mymenu.run()ifresult=='result1':do_this_interesting_thing()elifresult=='result2':do_this_other_thing()# etc...See it in action!FAQ*Why did you make this?Well, it was one of those typical GitHub/PyPI scenarios, I wanted a specific thing,
so I made a specific thing and then I took >10X the time making it a project so that
others can use the thing; maybe some people will find it useful, maybe not.
I like running programs in the terminal, and this allowed me to put a bunch of
utilities like duplicate file finders and bulk file renamers all under one
umbrella. If you prefer GUIs, there are plenty of simple wrappers out there,Why can’t I return handlers?Out of scope for this project at this time, but it’s on the
Wish List. For now, the Menu instance just returns strings
which the outer closure can then use to control program flow,
including defining handlers using control flow/if statement
based on the string returned by Menu.run().Why are my return values coming in/out strings?To keep things simple, all input and output (return) values are
converted to string. So if you haveconfig['tabs'][0]['items][0]['item_returns']= 1,
the return value will be ‘1’.Why do ‘items’ have both ‘item_choice_displayed’ and ‘item_inputs’ keys?To keep things flexible, you don’t have to display exactly
what you’ll accept as input. For example, you could display
‘yes/no’ as the suggested answers to a yes or no question, but
actually accept [‘y’, ‘n’, ‘yes’, ‘no’], etc.I have ‘case_sensitive’ = False, but my return value is still uppercase.case_sensitiveonly affects inputs, not outputsWhat’s up with passing a dict with the tab name as a message to Menu.run()?The message might be different depending on the tab, andrun()only exits when it returns a value when given a valid item input.
It changes tabs in a loop, keeping that implementation detail
abstracted away from the user, as is right.DependenciesPyYAML>=5.1schema>=0.7.0Wish List:a way to dynamically silence (“grey out”, if this were a GUI menu system)
certain menu items, which may be desired during program flow, probably by
passing a list of silenced tab names and return valueshave an option to accept single keypresses instead of multiple keys and
ENTER with the input() function, usingmsvcrtpackage in Windows
orttyandtermiosin Mac/Linux. (This will make coverage platform-
dependent, so it will have to be cumulative on travis and appveyor)Photo CreditErik-Jan Leusink via Unsplash
Package: pytabix
This module allows fast random access to files compressed withbgzipand
indexed bytabix. It includes a C extension with code fromklib. The bgzip
and tabix programs are availablehere.Installationpip install --user pytabixSynopsisGenomics data is often in a table where each row corresponds to a genomic
region (start, end) or a position:chrom  pos      snp
1      1000760  rs75316104
1      1000894  rs114006445
1      1000910  rs79750022
1      1001177  rs4970401
1      1001256  rs78650406Withtabix, you can quickly retrieve all rows in a genomic region by
specifying a query with a sequence name, start, and end:importtabix# Open a remote or local file.url="ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20100804/"url+="ALL.2of4intersection.20100804.genotypes.vcf.gz"tb=tabix.open(url)# These queries are identical. A query returns an iterator over the results.records=tb.query("1",1000000,1250000)records=tb.queryi(0,1000000,1250000)records=tb.querys("1:1000000-1250000")# Each record is a list of strings.forrecordinrecords:printrecord[:3]['1','1000760','rs75316104']['1','1000760','rs75316104']['1','1000894','rs114006445']['1','1000910','rs79750022']['1','1001177','rs4970401']['1','1001256','rs78650406']ExampleLet’s say you have a table of gene coordinates:$zcatexample.bed.gz|shuf|head-n5|column-tchr19536111315363617255786ZNF415chr107214912172150375221017CEP57L1P1chr4185009858185139113133121ENPP6chrX1326697721331196722719GPC3chr6134924279134925376114182FAM8A6PSortit by chromosome, then by start and end positions. Then, usebgzipto
deflate the file into compressed blocks:$zcatexample.bed.gz|sort-k1V-k2n-k3n|bgzip>example.bed.bgzThe compressed size is usually slightly larger than that obtained with gzip.Index the file withtabix:$tabix-s1-b2-e3example.bed.gz$lsexample.bed.gzexample.bed.bgzexample.bed.bgz.tbi
Package: pytable
BasicProperty-based RDBMS WrapperPyTable provides a schema-based mechanism for constructing
database-based applications.  Included is a fairly elegant
SQLQuery object which makes creation of complex SQL in response
to application requirements somewhat easier, as well as
classes allowing the modelling of database schemas.Can read MySQL and PostgreSQL schemas from live databases.
Can build databases from schemas.
Does not attempt to abstract away differences in SQL syntax.
Provides optional object-oriented row-wrappers with
BasicProperty properties defining fields.
Package: pytable-console
Copyright (c) 2020 Justin MundtPermission 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: # pytablePython table creator.Platform: UNKNOWN