Saravanan666/pypi-org huggingface dataset:
Package: pystages
PyStagesPyStages is a Python 3 library for controlling motorized stages which have a
motion controller. It has been designed for microscopy test benches automation.The following motion controllers are currently supported (only the main features
are implemented):Micos Corvus Eco controllerNew Scale Technologies M3-FS focus modules (serial only)Newport SMC100 motion controllersTic Stepper Motor controller (USB only)CNC Router with GRBL/GCode instructions (CNC 3018-PRO)The library also provides helper classes for basic vector manipulation and
autofocus calculationDocumentationDocumentation is available onRead the Docs.RequirementsThis library requires the following packages:pyserialnumpypyusb
Package: pystagram
PystagramInstagram APIs Client for PythonBadges: Pypi, instagram, python version, license, code style,(Description, logo)
graph apibasic display apireadthedocsFeaturesBasic featuresInstallationPystagramcan be installed from PyPI or from source.PyPIpipinstallpystagramSourcegitclonehttps://github.com/MatthieuThib/pystagram.gitcdpystagram
pipinstall.Table of ContentsUsagePublish mediaFetch mediaHashtag Search?cursor paginated endpointsSome endpoints can return a lot of data, hence, they areMAX_PAGES = 10
Package: pystalkd
pystalkdBeanstalk is a simple, fast work queue.
Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronouslyhttp://kr.github.io/beanstalkd/pystalkd is a beanstalkd bindings targeting python3.
This library is based onhttps://github.com/earl/beanstalkcand should be API compatible.Installingpip install pystalkdor from source:python setup.py installUsing>>>frompystalkd.BeanstalkdimportConnection>>>c=Connection("localhost",11300)#if no argument is given default configuration is used>>>c.put("hey!")>>>job=c.reserve(0)>>>job.body"hey!"One of the goals is to be API compatible with beanstalkc, so this tutorial should be valid:https://github.com/earl/beanstalkc/blob/master/TUTORIAL.mkdThe main differences, API wise are:where number of seconds is expected pystalkd also accepts a timedelta objectyou can temporarily watch and use a tube using thewithkeywordprint(c.using())# "default"withc.temporary_use("test"):print(c.using())# "test"print(c.using())# "default"print(c.watching())# ["default"]withc.temporary_use("test"):print(c.watching())# ["default", "test"]print(c.watching())# ["default"]you also have access to the "bytes" API.
To maintain compatibility with beanstalkc the API worked only with strings but now
you can use the functions ending in "_bytes" (internally this is controlled using therawparamater) to work directly
with bytesfromosimporturandomtest_bytes=urandom(50)job_id=c.put_bytes(test_bytes)job=c.reserve_bytes(0)print(job.body)# b'i\x91\xdf\xf8\x1b?zj....'job_id2=c.put("string")job2=c.reserve_bytes(0)print(job2.body)# b'string'Note: you can usereserve_byteswithputand get the raw string (not encoded), but the other way around might cause problemsTestsTo test with default host and port (localhost, 11300):python3 test.pyTo test on a specific host (if port is not specified 11300 is used)python3 test.py host [port]LicenseCopyright (C) 2008-2014 Andreas Bolka.Copyright (C) 2015-2016 Gabriel Menezes.
Licensed under theMIT.
Package: pystallone
This package is a Python binding for the Stallone Java library, which is an
effort to combine multiple tools for building Markov models from molecular
trajectory data.It provides a high level API for:wrapping data (trajectories, math structures)(linear) algebradiscretize MD trajectoriesperform coordinate transformationsmultiple methods for estimate Markov modelsgenerate trajectories from potentialfree energy estimation…For more information have a look at the current Stallone website:http://github.com/markovmodel/pystallone
Package: pystamps
pystamps is a PDS image thumbnail browser.  It is alpha quality software and
not affiliated with NASA.Free software: BSD licenseFeaturesThis is a still a work in progress and is alpha quality software.Currently available features:Display ImagesSelect ImagesPrint Image pathsResize window and wrap imagesCommand Line argumentspystampsDisplays all PDS compatible images in current directorypystamps [filename or glob]Displays single image or all images matching glob that are PDS
compatibleopen in pdsviewNeeds install first:pip install pdsviewInstall` git clone git@github.com:planetarypy/pystamps.git pip install-rrequirements.txt `You must also install PySide, PyQt4, or PyQt5 (PyQt5 recommended)Screen ShotsDefault view:Wrap Images and select images:History0.1.0 (“2017-08-21”)First release on PyPI.
Package: pystan
PyStanis a Python interface to Stan, a package for Bayesian inference.Stan® is a state-of-the-art platform for statistical modeling and
high-performance statistical computation. Thousands of users rely on Stan for
statistical modeling, data analysis, and prediction in the social, biological,
and physical sciences, engineering, and business.Notable features of PyStan include:Automatic caching of compiled Stan modelsAutomatic caching of samples from Stan modelsAn interface similar to that of RStanOpen source software: ISC LicenseGetting startedInstall PyStan withpip install pystan. PyStan runs on Linux and macOS. You will also need a C++ compiler such as gcc ≥9.0 or clang ≥10.0.The following block of code shows how to use PyStan with a model which studied coaching effects across eight schools (see Section 5.5 of Gelman et al (2003)). This hierarchical model is often called the “eight schools” model.importstanschools_code="""
data {
  int<lower=0> J;         // number of schools
  array[J] real y;              // estimated treatment effects
  array[J] real<lower=0> sigma; // standard error of effect estimates
}
parameters {
  real mu;                // population treatment effect
  real<lower=0> tau;      // standard deviation in treatment effects
  vector[J] eta;          // unscaled deviation from mu by school
}
transformed parameters {
  vector[J] theta = mu + tau * eta;        // school treatment effects
}
model {
  target += normal_lpdf(eta | 0, 1);       // prior log-density
  target += normal_lpdf(y | theta, sigma); // log-likelihood
}
"""schools_data={"J":8,"y":[28,8,-3,7,-1,1,18,12],"sigma":[15,10,16,11,9,11,10,18]}posterior=stan.build(schools_code,data=schools_data)fit=posterior.sample(num_chains=4,num_samples=1000)eta=fit["eta"]# array with shape (8, 4000)df=fit.to_frame()# pandas `DataFrame`CitationWe appreciate citations as they let us discover what people have been doing
with the software. Citations also provide evidence of use which can help in
obtaining grant funding.To cite PyStan in publications use:Riddell, A., Hartikainen, A., & Carter, M. (2021). PyStan (3.0.0).https://pypi.org/project/pystanOr use the following BibTeX entry:@misc{pystan,
  title = {pystan (3.0.0)},
  author = {Riddell, Allen and Hartikainen, Ari and Carter, Matthew},
  year = {2021},
  month = mar,
  howpublished = {PyPI}
}Please also cite Stan.
Package: pyStandardSettings
pyStandardSettingsStandardised settings loadera port of nodejsstandard-settingsWhyNo morecp config.sample.json config.json.Your app presents asettings/settings.default.jsonwhich is always included.
User, or other developer needing custom settings, loads his custom settings, overriding default settings.
If a key is missing in user settings, it won’t trigger any error, as a default value is insettings.default.json.standard-settingsoffers multiple ways to change settings:settings.jsonfile, command line arguments, environment variables.
Check below examples for usage and priority order.InstallationpipinstallpyStandardSettingsUsageThis module loads settings from a file, from commandline arguments, and environment variables.
It should be required at the very beginning of your project:frompyStandardSettingsimportsettingsThen your settings are accessible using:printsettings.server.portPriority orderEnvironment variablesExample:SERVER_PORT=2500pythonmain.pyservice_spacebro_inputMessage=new-mediapythonmain.pyCommand line parameters (argv)Example:pythonmain.py--server.port2000# to specify a fieldpythonmain.py--settingssettings/settings.prod.json# to specify a settings fileNB: To use a key with argv, it needs to be present insettings.default.jsonFilesThese files are always loaded if present:settings/settings.jsonfirstsettings/settings.default.jsonWorking all together with different settingsOn your project, you may have other developers working with different settings.
Pushing them in the repo is annoying. We know you’ve seen that before.
Using standard-settings, developers can share common default settings, AND load custom settings.Best practice is to addsettings/settings.default.jsonin your repo, this file covers default settings, common for each developer.
And.gitignoresettings/settings.json, this file has custom settings inside.SchemaThe following schema is an example of settings used in Soixante circuits apps:{"server":{"host":"myip","port":3333},"timeout":{"lookbook":5,"popup":4},"folder":{"kcDownloader":"path-to/data","lookbook":"path-to/lookbook"},"flag":{"stabalize":true,"devMode":true},"customKey":{"maxImageNumber":64},"meta":{"title":"","description":"","message":"...","source":""},"service":{"altruist":{"host":"192.168.1.6","port":6666},"spacebro":{"host":"192.168.1.6","port":8888,"channelName":"my-channel","client":{"name":"my-app"}}}}Seesoixantecircuits/standardGoodiesTo list all settings keys available in your project, usepythonmain.py-hand it will displayusage:main.py[-h][-sSETTINGS][--recipeRECIPE][--server.hostSERVER.HOST][--server.portSERVER.PORT]optionalarguments:-h,--helpshowthishelpmessageandexit-sSETTINGS,--settingsSETTINGSsettingsfileinjsonformat--recipeRECIPE--server.hostSERVER.HOST--server.portSERVER.PORTtest commandpython-mtests.test
Package: pystandups
PyStandupsA command line utility for working with daily standups. A "standup" is a brief description of what work will be done that day. PyStandups supports:Storing standups for each dayReviewing the previous day's standup (in case the actual work done ended up being different from what was planned)A rudimentary "backlog" to save things for later standupsStandups are stored as a JSON dictionary. The location is hardcoded (seeDATA_DIR). The schema and format may change without warning between versions of PyStandups, so back this up if it's important. However, the goal is to keep the data simple enough to be self-explanatory and trivial to migrate.Usagestandup today- prepare standup at the beginning of the day. PyStandups will try to intelligently fill in as much information as possible, and you will have the opportunity to edit it in your editor.standup later- take quick notes for future standups.standup todayautomatically fills in the data fromstandup later. For more sophisticated management of planned tasks, use an external tool like Jira.standup get todayandstandup get last- print the relevant standup to standard out. These are mainly intended for use in scripts.Old StandupsPyStandups does not support working with standups older than today or other complex tasks. You can use an external tool likejqto work with the JSON file directly.Installpip install pystandupsto install latest release.The project is managed bypoetryso if you want to work on the code seepoetry install.Make sure you have$VISUAL(preferred) or$EDITORset. If relevant, the command should include the "wait" parameter so that PyStandups is blocked until you close the editor window. So for example,subl -wnotsubl.
Package: pystapler
staplerA Hash Based Method for Matching Crosslinkers into Peptides and Proteins for PyRosettaInstallationpip install pystaplerTheoryThis protocol is developed to quickly identify pairs of residues that can accomidate disulfides given the 3D structure of a protein.To achieve this goal, examples of 30,000 native disulfide structures were procured from the PDB, and the relative positions of the backbone atoms (N, CA, C) were calculated, hashed, and stored into a database.Therefore, when you have a candidate protein structure and you would like to know if any residue pairs from the structure can accomidate a disulfide, you can quickly calculate all of the relative positions of backbone atoms in the protein and ask which transformations are the same as an example in the database of native examples.The protocol is scalable/adaptable to other crosslinkers given a set of conformations of the new crosslinker. For disulfides, this was given by the PDB, but for crosslinks that do not have a native examples, the examples must be generated from scratch. Also, this protocol is not limited to sidechain-to-sidechain crosslinking. One could implement loop closure with some tweaks.Exampleimportpyrosettapyrosetta.init()frompyrosetta.rosetta.core.select.residue_selectorimportTrueResidueSelectorfrompyrosetta.rosetta.core.select.residue_selectorimportChainSelectorfromstaplerimportNativeDisulfideStaplerdefault_residue_selectors=[TrueResidueSelector(),TrueResidueSelector()]ab_residue_selectors=[ChainSelector('A'),ChainSelector('B')]aa_or_ab_residue_selectors=[ChainSelector('A'),ChainSelector('A,B')]native_disulfide_stapler=NativeDisulfideStapler(residue_selectors=default_residue_selectors,minimum_sequence_distance=4)pose=pyrosetta.pose_from_file('input.pdb')fori,stapled_poseinenumerate(native_disulfide_stapler.apply(pose)):stapled_pose.dump_pdb(f'output_{i}.pdb')
Package: pystarburst
PyStarburst DataFrame APIPyStarburst DataFrame API allows you to query and transform data in Starburst products in a data pipeline without having to download the data locally.DocumentationSee the PyStarburst APIdocumentationand the examplesrepository.Getting startedInstall pystarburstpipinstallpystarburstConnect to a Starburst serverThe parameters are the same connect parameters as in Trino Python Client.frompystarburstimportSessionconnection_parameters={"host":"localhost","port":8080,"user":"admin","catalog":"tpch","schema":"tiny"}session=Session.builder.configs(connection_parameters).create()Using SQLfrompystarburstimportSessionsession=Session.builder.configs({...}).create()session.sql("SELECT 1 as a").show()Querying a tablefrompystarburstimportSessionsession=Session.builder.configs({...}).create()df=session.table("nation")print(df.schema)df.show()Filtering a data framefrompystarburstimportSessionsession=Session.builder.configs({...}).create()df=session.table("nation")df.filter(df.col("regionkey")==0).show()Joining data framesfrompystarburstimportSessionsession=Session.builder.configs({...}).create()df=session.table("nation")df.filter(df.col("regionkey")==0).show()AggregationfrompystarburstimportSessionfrompystarburst.functionsimportcolsession=Session.builder.configs({...}).create()df=session.table("nation")df.agg((col("regionkey"),"max"),(col("regionkey"),"avg")).show()
Package: pystare
PySTAREIntroductionPySTARE exposes the STARE library to python.RequirementsPystare requires STARE to be installed.
It expects either:libSTARE.ain /usr/local/lib/ and STARE.h in /usr/local/include/ orthe variables STARE_LIB_DIR and STARE_INCLUDE_DIR to be set e.g. with:exportSTARE_INCLUDE_DIR=/path/to/directory-containing-stare.h/exportSTARE_LIB_DIR=/path/to/directory-containing-stare.a/Build and install STARE e.g. with:gitclonehttps://github.com/SpatioTemporal/STAREcdSTARE
mkdirbuildcdbuild
cmake-DSTARE_INSTALL_LIBDIR=lib-DBUILD_SHARED_LIBS=NO../
make-j4
sudomakeinstallIt may be necessary to set PYTHON_INCLUDE_DIRS, if, for example, numpy
headers cannot be found.InstallationWheels for manylinux exist on pypipipinstallpystareOr install from source:exportSTARE_INCLUDE_DIR=/path/to/directory-containing-stare.h/exportSTARE_LIB_DIR=/path/to/directory-containing-stare.a/gitclonehttps://github.com/SpatioTemporal/pystarepip3installpystare/Manual buildpython3setup.pybuild_ext--inplacepython3setup.pybdist_wheel
python3setup.pysdistTestspystare usespytest. Pytest is configured inpytest.ini.Runpytestto run all tests.To run the doctest,pytest--doctest-modulesTo run tests of a specific modulepytest/path/to/module.pyDocumentationpystare uses sphinxpipinstallsphinx-markdown-tablessphinx-automodapimyst_parsernbsphinxnumpydocpydata-sphinx-themeUsageSpatialimportnumpyimportpystarelat=numpy.array([30,45,60],dtype=numpy.double)lon=numpy.array([45,60,10],dtype=numpy.double)indices=pystare.from_latlon(lat,lon,12)print('0 indices: ',[hex(i)foriinindices])lat,lon=pystare.to_latlon(indices)print(lat,lon)lat,lon,level=pystare.to_latlonlevel(indices)print(lat,lon,level)level=pystare.to_level(indices)print(level)area=pystare.to_area(indices)print(area)Temporalimportnumpyimportpystaredatetime=numpy.array(['1970-01-01T00:00:00','2000-01-01T00:00:00','2002-02-03T13:56:03.172','2016-01-05T17:26:00.172'],dtype=numpy.datetime64)print(datetime)print(datetime.astype(numpy.int64))index=pystare.from_utc(datetime.astype(numpy.int64),6)print([hex(i)foriinindex])index=pystare.from_utc(datetime.astype(numpy.int64),27)print([hex(i)foriinindex])Common issues when buildingundefined symbolSTARE and pystare out of sync. Are we building against the correct STARE version?Stale pystare targets.python setup.py cleanmight helpMissing function headers inPySTARE.h
Package: py-stars-tools
regex_utils 正则相关is_mobile_simple        : 简单判断是否为手机号
is_email                : 判断是否邮箱
is_url                  ：判断是否为url
is_ip                   : 判断是否为ip
is_zh                   : 判断是否为中文
is_chain_postal_code    ：判断是否为中国邮编encrypt_utils 加密相关md5                     ：获取md5
Package: pystart
pystartQuickly create new Python packages with standard configuration files.This package provides a command-line utility that asks simple questions in order to create a standard Python project from scratch. It is a handy way to start a new project with a clean structure!InstallIt can be installed from command-line usingpip:pipinstallpystartUsageFrom command-line, go to the folder you use to maintain your projects and enterpystartDone. It will asks the package name, author name, among other questions, to create the initial structure of your Python project.ExampleAnimated GIF demonstrating the usage.AuthorsDanilo HortaAcknowledgementsReadable Licensesfor providing license templates in markdown format.LicenseThis project is licensed under theMIT License.
Package: py-starter-auto-template
PythonStarterAuto-generate starter template of python3 and create envInstallpipinstallpy-starter-auto-templateUsageTo create a project base template with bump2version managing versioningpyinit-mcreate<project_name>In your project folder, it will createpackage_name/|--src/||--__init__.py|--tests/||--test_placeholder.py|--.bumpversion.cfg|--.gitattributes|--.girigore|--MANIFEST.in|--pytest.ini|--setup.pyTo create github/workflowspyinit-mcreate<project_name>-iciIt will create.github/|--workflows/||--<project_name>_ci.yml
Package: pystashlib
A python library for querying and updating a stash sqlite databasepystashlib and Stash compatibility table:pystashlibStash versionStash schemav0.4.0-v0.4.4v0.24.0-v0.24.354v0.3.0-v0.3.1v0.17.0-v0.17.236v0.2.8v0.15.0-v0.16.131v0.2.7v0.14.030v0.2.5v0.12.0-v0.13.129v0.2.4v0.11.028Changelogv0.4.4Updated StashInterface GQL client to support Stash v0.24.3v0.4.3Added support for performer name disambiguationChangedquery_performer_nameReturns list[PerformersRow] instead of PerformersRow.create_performer_from_urlAdded disambiguation argumentdef create_performer_from_url(self, name, disambiguation, url, commit=True):Addedquery_performer_name_disambiguatedReturns a PerformersRow match on name and disambiguation.Pass None or "" to get a PerformersRow with no disambiguation.v0.4.2Added back tree_from_file and scrape functions to new stashlib.html module with lxml as an optional dependencyv0.4.1Fix image blob savingv0.4.0Update to support Stash v0.24.3v0.3.1Removed tree_from_file and scrape functions from stashlib.common to remove dependency on lxml
Package: pystassh
pystasshAn easy to use libssh wrapper to execute commands on a remote server via SSH with Python.Author: Julien CHAUMONT (https://julienc.io)Version: 1.2.2Date: 2022-05-17Licence: MITUrl:https://julienc91.github.io/pystassh/InstallationJust usepipto install the package:pip install pystasshpystasshis working with python 3+ and pypy.Requirementspystasshis using libssh to work, you will have to install the library before usingpystassh. Only version 0.7.3 was used during the development, but versions 0.5 and above should work fine as well withpystassh.
Visitlibssh's official websitefor more information.libffi-devis also required by thecffimodule.On Debian and Ubuntu:apt-get install libssh-4 libffi-devOn Fedora:dnf install libssh libffi-develExamplesEstablishing a connection:>>>frompystasshimportSession>>># With default private key>>>session=Session('remote_host.org',username='user')>>># With username and password>>>session=Session('remote_host.org',username='foo',password='bar')>>># With specific private key and a passphrase>>>session=Session('remote_host.org',privkey_file='/home/user/.ssh/my_key',passphrase='baz')Running simple commands:>>>frompystasshimportSession>>>withSession('remote_host.org',username='user')asssh_session:...res=ssh_session.execute('whoami')>>>res.stdout'foo'Handling errors:>>>frompystasshimportSession>>>withSession('remote_host.org',username='user')asssh_session:...res=ssh_session.execute('whoam')>>>res.stderr'bash: whoam : command not found'Running multiple commands:>>>frompystasshimportSession>>>withSession('remote_host.org',username='user')asssh_session:...ssh_session.execute('echo "bar" > /tmp/foo')...res=ssh_session.execute('cat /tmp/foo')>>>res.stdout'bar'Using a session without awithblock:>>>frompystasshimportSession>>>ssh_session=Session('remote_host.org',username='user')>>>ssh_session.connect()>>>res=ssh_session.execute('whoami')>>>res.stdout'foo'>>>ssh_session.disconnect()Using a shell:>>>frompystasshimportSession>>>withSession('remote_host.org',username='user')asssh_session:...channel=ssh_session.channel...withchannel:...channel.request_shell(request_pty=False)...# non blocking read to flush the motd, if there is one...channel.read_nonblocking(1024)...channel.write("export foo=42;\n")...channel.write("echo $foo;\n")...channel.read(2048)b'42\n'DocumentationThe complete documentation is available at:http://pystassh.readthedocs.org/en/latest/
Package: pystat
CI status:This library is a thin python wrapper around counter and timer implementation inhttps://raw.github.com/armon/statsiteInstallingpystat can be installed via pypi:pip install pystatBuildingGet the source:git clone https://github.com/blackwithwhite666/pystat.gitCompile extension:python setup.py build_ext --inplaceUsageCounter example:from pystat import Counter
counter = Counter()
counter.add()
assert 1 == int(counter)
counter.add()
assert 2 == int(counter)
counter.add(5)
assert 7 == int(counter)
assert 3 == len(counter)
assert 5.0 == counter.max
assert 1.0 == counter.min
assert 2.333.. == counter.mean
assert 2.309.. == counter.stddevTimer example:from pystat import Timer
timer = Timer()
timer.add(1.0)
assert 1 == int(timer)
timer.add(1.0)
assert 2 == int(timer)
timer.add(5)
assert 7 == int(timer)
assert (0.5, 0.95, 0.99) == timer.quantiles
assert 5.0 == timer.query(0.99)
assert 1.0 == timer.query(0.5)Running the test suiteUse Tox to run the test suite:toxChangelog0.2.4Add support for load and dump;Check for overflow in __len__;0.2.3Support for fluent interface;0.2.2PlainCounterimplementation;0.2.1Countercan take some iterable to constructor;0.2.0Add serialization support forCounter;Add union support forCounter;0.1.0 (initial release)Prototype.