Saravanan666/pypi-org huggingface dataset:
Package: pyspawn
PyspawnAn intelligent database cleaner for integration tests ported from Jbogard/RespawnTo use, create a Checkpoint and initialize with tables you want to skip, or schemas you want to keep/ignore:frompyspawnimportCheckpointfrompyspawn.adaptersimportSqlServerAdapter,PgAdaptercheckpoint=Checkpoint(tables_to_ignore=["A"],tables_to_include=["B","C"],schemas_to_ignore=["schema1"],schemas_to_include=["schema2","schema3"],check_temporal_table=False,reseed_identity=True,db_adapter=SqlServerAdapter())In your tests, in the fixture setup, reset your checkpoint:importpyodbcfrompyspawnimportCheckpointfrompyspawn.adaptersimportSqlServerAdapter,PgAdapterconn_str:str=""withpyodbc.connect(conn_str)asconn:checkpoint=Checkpoint(tables_to_include=["A","B","C"],schemas_to_include=["dbo"],db_adapter=SqlServerAdapter())checkpoint.reset(conn)How does it work?Pyspawn examines the SQL metadata intelligently to build a deterministic order of tables to delete based on foreign key relationships between tables. It navigates these relationships to build a DELETE script starting with the tables with no relationships and moving inwards until all tables are accounted for.Once this in-order list of tables is created, the Checkpoint object keeps this list of tables privately so that the list of tables and the order is only calculated once.In your tests, you Reset your checkpoint before each test run. If there are any tables/schemas that you don't want to be cleared out, include these in the configuration of your Checkpoint.In benchmarks, a deterministic deletion of tables is faster than truncation, since truncation requires disabling or deleting foreign key constraints. Deletion results in easier test debugging/maintenance, as transaction rollbacks/post-test deletion still rely on that mechanism at the beginning of each test. If data comes in from another source, your test might fail. Respawning to your checkpoint assures you have a known starting point before each test.Installing PyspawnYou should install Pyspawn with pip:pip install pyspawnWant to contribute?TestingTo run tests docker-compose is dependent on a few environment variables from a .env-file located in the root directory.You can supply your own variables according to the specifications of the "environment" lists spesificed inthe compose file,
or you can copy the demo values from the composeArgs in thetesting pipelineWhen the .env-file is in place all you have to run is:docker-compose-fdocker-compose.yaml-fdocker-compose.testing.yamlbuild
docker-compose-fdocker-compose.yaml-fdocker-compose.testing.yamlrun--rmpyspawnHonorsLastly I'd like to send my thanks to Jbogard for creating Respawn in the first place! I've found it to be a fantastic tool to greatly improve the testing experience and general code quality.
Package: pyspcli-ui
Terminal User Interface for Silverpeak/Aruba SD-WAN CLI.
This CLI tool is a wrapper of the other project spcli which provides a terminal user interface with guided manu to query the Silverpeak API.Getting StartedRequierementsPython >=3.7User with API KEYTo get started, install the CLI tool from Pypipip3 install pyspcli-uior download it directly from github:pip3 install git+https://github.com/NetDevLazg/spcli-ui.gitOnce the installation is successful, you will need to create a file with your api credentials.Create a folder in the following directorymkdir ~/.spcliCreate a yml file with your credentials in.spclidirectoryUsingvimvim ~/.spcli/creds.ymlUsingnanonano ~/.spcli/creds.ymlThe yml file needs to have the following variables.
Example:url: silverpeak-orch-use1.silverpeak.cloud
token: a38b3360bb4d06fed7e53f77c8752d74bb4faeb4295385a25e02ebc2594d9074a16bb115fce4d4dc9826d824950504b6d23373After the file is created and saved, please verify the cli tool version using the following command:sp -v
version...installed: 0.0.6Possible ErrorsIf you receive an error saying “Command not found” make sure to add the location where the package is installed to your $PATHPossible error:WARNING: The script sp is installed in '/Users/John/Library/Python/3.8/bin' which is not on PATH.Fix:export PATH='$PATH:/Users/John/Library/Python/3.8/bin'ExamplesTo use the user interface please use the following command:spui
Package: pyspcwebgw
Python library for communicating withVanderbilt SPC alarm systemsvia the REST/websocket API provided by the SPC Web Gateway software made byLundix IT. Using this library you can:Retrieve information for all alarm areas and zones.Change the alarm mode, i.e. arming and disarming of the alarm system.Get real-time updates when attributes of areas and zones change, e.g. if motion detector connected to the systems triggers or when the alarm goes off.UsageLibraryTo use the library in your own application see the example file.
Package: pyspdx
pyspdxShort library to validate SPDX expressions. I have not found any working implementation in python and I wanted to mess around with pyparsing anyways.API / UsageThis lib only exposes one function:from pyspdx import validate

validate("MIT")  # Valid, does nothing
validate("NotValid") # Throws ValueError
validate("(Apache-2.0 OR MIT) AND BSD-3-Clause") # Valid
validate("(DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2 OR (Apache-2.0 AND PostgreSQL OR OpenSSL)) AND (BSD-3-Clause OR Apache-2.0 WITH 389-exception)") # ValidUsed Sourceshttps://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/https://pyparsing-docs.readthedocs.io/en/latest/HowToUsePyparsing.html
Package: pySpeakNG
pySpeakNGA thin wrapper aroundeSpeak-NGfor
off-line text-to-speech synthesis. pySpeakNG is very simple, consisting of a
single function which wrapseSpeak-NG's command line interface.RequirementsA working installation of theeSpeak-NGcommand line utility for
Linux (and, presumably, for Windows, though this is not officially supported at
this stage). eSpeak-NG is available in the repositories most common GNU/Linux
distributions, and is also buildable with standard tools.For Debian/Ubuntu/Mint-type systems:sudo apt install espeak-ngFor Red Hat/Fedora/Rocky-type systems:sudo dnf install espeak-ngInstallationInstall the latest stable release from PyPI with:python3 -m pip install --upgrade pySpeakNGUsageSee thespeak()function and module documentation.
Package: py-spec
py_spec (SPEC python utilities)This is the Python package for SPEC.py_specuses theblackcode style.InstallYou can install the package usingpip.pip install py_specOr from the GitHubpip install git+https://github.com/PrincetonUniversity/SPEC.git#egg=SPEC&subdirectory=Utilities/pythontoolsYou can also install it locally (cd /path/to/SPEC/Utlities/pythontools/).python setup.py installorpip install -e .You can also add the path to yourPYTHONPATHto directly use this package.importsyssys.path.append('/path/to/SPEC/Utlities/pythontools/py_spec')or put this in your env file.export PYTHONPATH=$PYTHONPATH:/path/to/SPEC/Utlities/pythontools/py_specUseAfter installation, in your python kernel, you can use the functions by something likefrompy_specimport*DocumentationYou can find documentations at./docs.DevelopersHere are the contributors:Ksenia AleynikovaZhisong QuJonathan SchillingChristopher Berg SmietCaoxiang Zhu
Package: pyspec2openapi
pyspec2openapiTool to convert the types defined in the Ethereum python specshttps://github.com/ethereum/consensus-specsto an OpenAPI definition, forhttps://github.com/ethereum/beacon-APIs. This tool facilitates manteinance of the OpenAPI spec and follows the canonical JSON mapping fromhttps://github.com/ethereum/consensus-specs/pull/3506UsageInstall from PyPIpip install pyspec2openapiCreate aconfig.ymlfilespec_version:v1.4.0-beta.5sources:phase0:-{spec:beacon-chain.md}-{spec:validator.md}-{file:extra_types/phase0.md}altair:-{spec:beacon-chain.md}-{spec:validator.md}-{spec:light-client/sync-protocol.md}-{file:extra_types/altair.md}bellatrix:-{spec:beacon-chain.md}-{spec:validator.md}-{file:extra_types/bellatrix.md}capella:-{spec:beacon-chain.md}-{spec:validator.md}-{spec:light-client/sync-protocol.md}deneb:-{spec:polynomial-commitments.md}-{spec:beacon-chain.md}-{spec:validator.md}-{spec:p2p-interface.md}-{spec:light-client/sync-protocol.md}-{file:extra_types/deneb.md}generate_blinded_types:[bellatrix,capella,deneb]ignore_classnames:-LightClientStoreexclude_comments:-'\[New[^\]]*\]'-'\[Modified[^\]]*\]'spec_version: Specific Github tag from theethereum/consensus-specsrepo to fetch sources fromsources: Topologically sorted list of fork and files to fetch types from. This tool can topologically sort types within the same markdown file, but not across them.generate_blinded_types: Auto-generate the typesBlindedBeaconBlockBody,BlindedBeaconBlock, andSignedBlindedBeaconBlockfor a specific set of forks.ignore_classnames: Ignore container code blocks with this list of namesexclude_comments: Ignore comments for container properties that match any of this regexGenerate types specpyspec2openapi config.yml out.ymlReview an example output with anexample configin./pyspec2openapi/tests/example_specs_out.yml
Package: pyspeckle
by Scott PrahlA collection of routines to track and analyze laser speckle.  This is a python
port of SimSpeckle Matlab routines described in:`Duncan & Kirkpatrick, "Algorithms for simulation of speckle (laser and otherwise)," in SPIE Vol. 6855 (2008)
<https://www.researchgate.net/profile/Sean-Kirkpatrick-2/publication/233783056_Algorithms_for_simulation_of_speckle_laser_and_otherwise/links/09e4150b78c4e8fe5f000000/Algorithms-for-simulation-of-speckle-laser-and-otherwise.pdf>`_To cite the code, then use:Prahl, S. (2023). pyspeckle: a python module for creation and analysis of laser speckle. (Version 0.5.1) https://doi.org/10.5281/zenodo.83116781D speckle2D speckleDocumentation and examples for 1D, 2D, and 3D speckle are available at <https://pyspeckle2.readthedocs.io>InstallationUsepip:pip install pyspeckleor useconda:conda install -c conda-forge pyspeckleLicensepyspeckleis licensed under the terms of the MIT license.
Package: pyspecpol
Utilities for spectropolarimetry analysis and data reductionTHIS IS A DEVELOPMENT ENVIRONMENT, USE AT YOUR OWN PERILThe idea is to make a more general and a more modular package for spectropolarimetry (than my personnal package FUSS).
The ultimate goal is for these utilities to fully integrate astropy. I don’t know if I’ll get there, but that’s the dream.LicenseThis project is Copyright (c) H.F. Stevance and licensed under
the terms of the GNU GPL v3+ license. This package is based upon
theAstropy package templatewhich is licensed under the BSD 3-clause licence. See the licenses folder for
more information.ContributingWe love contributions! pyspecpol is open source,
built on open source, and we’d love to have you hang out in our community.Imposter syndrome disclaimer: We want your help. No, really.There may be a little voice inside your head that is telling you that you’re not
ready to be an open source contributor; that your skills aren’t nearly good
enough to contribute. What could you possibly offer a project like this one?We assure you - the little voice in your head is wrong. If you can write code at
all, you can contribute code to open source. Contributing to open source
projects is a fantastic way to advance one’s coding skills. Writing perfect code
isn’t the measure of a good developer (that would disqualify all of us!); it’s
trying to create something, making mistakes, and learning from those
mistakes. That’s how we all improve, and we are happy to help others learn.Being an open source contributor doesn’t just mean writing code, either. You can
help out by writing documentation, tests, or even giving feedback about the
project (and yes - that includes giving feedback about the contribution
process). Some of these contributions may be the most valuable to the project as
a whole, because you’re coming to the project with fresh eyes, so you can see
the errors and assumptions that seasoned contributors have glossed over.Note: This disclaimer was originally written byAdrienne Lowefor aPyCon talk, and was adapted by
pyspecpol based on its use in the README file for theMetPy project.
Package: pyspectator
Summarypyspectator is a Python cross-platform tool for monitoring resources of OS: CPU, memory, disk, network.RequirementsOS: Linux, Windows, FreeBSD, SolarisPython version: 3.XPackages: psutil, netifaces, wmi (only on Windows), enum34 (only on python 3.0.0 - 3.4.0)For Windows OS Microsoft Visual C++ 10.0 or higher is requiredHow to installRun as root user:pipinstallpyspectatorExample of usageThere is simple project namedpyspectator_tornadodeveloped special for demonstration of pyspectator features.How to useYou can use pyspectator as module for your own project. Simple example of usage is presented in file “console.py”.NOTE: on Windows pyspectator can require elevated privileges.Class “Computer”>>>frompyspectator.computerimportComputer>>>computer=Computer()>>>computer.os'Linux 3.14.4-1-MANJARO'>>>computer.python_version'CPython ver. 3.4.1'>>>computer.uptime'1:07:52'>>>computer.processor.name'Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz'Class “Cpu”>>>frompyspectator.processorimportCpu>>>fromtimeimportsleep>>>cpu=Cpu(monitoring_latency=1)>>>withcpu:...for_inrange(8):...cpu.load,cpu.temperature...sleep(1.1)...(22.6,55)(6.1,55)(5.5,54)(7.1,54)(5.6,54)(7.0,54)(10.2,54)(6.6,54)
Package: pyspectator_tornado
Summarypyspectator_tornado is a web-monitoring tool ported on Tornado with pyspectator as a main monitoring module.
It’s able to collect and display general information about workstation, cpu, memory, disk devices and network.ScreenshotsRequirementsOS: Linux, Windows, FreeBSD, SolarisPython version: 3.XPackages: pyspectator, tornadoHow to installRun as root user:pipinstall-Upyspectator_tornadoHow to useTo start working with pyspectator_tornado system you must execute file “start.py” in a root directory of project.Most simple method, where pyspectator_tornado will be binded on port “8888” and available by address: “localhost:8888”:pythonstart.pyIf you want use simple address “localhost” or port “8888” is busy by another application, you specify custom port, for example:pythonstart.py--port=80# now pyspectator_tornado is available by address "localhost"Also you can bind site with some domain name:pythonstart.py--port=80--address=your-domain-name.com# now pyspectator_tornado is available by next addresses:
# "localhost" and "your-domain-name.com"
Package: pyspectral
PyspectralGiven a passive sensor on a meteorological satellite Pyspectral provides the
relative spectral response (rsr) function(s) and offer you some basic
operations like convolution with the solar spectrum to derive the in band solar
flux, for instance. The focus is on imaging sensors like AVHRR, VIIRS, MODIS, ABI,
AHI, OLCI and SEVIRI. But more sensors are included and if others are needed they can
be easily added. With Pyspectral it is possible to derive the reflective and
emissive parts of the signal observed in any NIR band around 3-4 microns where
both passive terrestrial emission and solar backscatter mix the information
received by the satellite. Furthermore Pyspectral allows correcting true color
imagery for the background (climatological) atmospheric signal due to Rayleigh
scattering of molecules, absorption by atmospheric gases and aerosols, and Mie
scattering of aerosols.Adam Dybbroe
May 2021, Norrkoping, Sweden
Package: pyspectroworks
pySpectroWorkspySpectroWorks is a Python module for loading data from SpectroWorks™. This readme file provides a brief introduction to the module and how it can be used.Getting startedInstallation:pip install pyspectroworksImport the module and establish a connection to SpectroWorks™ using your API key:import pyspectroworks

api_key = "INSERT_API_KEY_HERE"
conn = pyspectroworks.connect(api_key)UsageOnce you have a connection instance you can extract all your projects as a list:projects = conn.get_projects()Each element in this list is aProjectobject. All data about a project is found in itsdataattribute, however, the most useful information has its own attributes:project = projects[0]  # get first project
print("Project name:", project.project_name)
print("Number of items:", project.num_files)
print("Created:", project.created)  # unix timestamp of when this project was created
print("Last modified:", project.modified)  # unix timestamp of when this project was last modifiedEach project can include several items. These are your experiments and can be extracted with theget_itemsmethod:items = project.get_items() # get all items in projectLike projects, items include a multitude of different data which can be accessed by the item'sdataattribute.
The box code and cuvette number can be found in thebox_codeandcuvette_idxattributes.
Calculated results are available in the itemsresultsattribute.item = items[0] # get first item
ri = item.results['refractive_index']['value'] # get the refractive index
# print cuvette and refractive index
print(f'Cuvette: {item.box_code: >6}{item.cuvette_idx:0>2}, Refractive Index: {ri: >8}')To extract the spectral data use theget_spectrummethod of the item.The available spectrum types are:reference_B(B side reference spectrum)sample_A(A side sample spectrum)sample_B(B side sample spectrum)sample_D(D side sample spectrum)spectrum = item.get_spectrum('sample_B')The spectrum is a list consisting of pairs of wavelengths and attenuance values.Example scriptAn example script can be found inapi_test.pyAplicationsAnalysis of water quality- pySpectroWorks can be used to extract spectral data from water samples, which can be used to identify pollutants and contaminants.Analysis of beverages- pySpectroWorks can be used to analyze the spectral data of beverages such as wine, beer, and juice, which can provide information on their chemical composition and quality.Analysis of oils and fats- pySpectroWorks can be used to analyze the spectral data of liquid oils and fats, which can provide information on their composition and purity.Analysis of biological fluids- pySpectroWorks can be used to extract spectral data from biological fluids such as blood, urine, and saliva, which can provide information on disease diagnosis and treatment.
Package: pyspectrum
pyspectruma small, multi-use color library for pythonsupports RGB, Hexadecimal, Decimal, CMYK, HSV and most web colors (red,seagreen,yellow)QuickstartInstallation & UpgradingUsingpipto install is highly reccomendedpip install -U pyspectrumUpgrade to the latest stable versionpip install -U --upgrade pyspectrumExampleimportpyspectrum# init colorsc=pyspectrum.Colors()# creating color classes out of valuesredRGB=c.RGB(255,0,0)redHex=c.Hexadecimal("#ff0000")redCMYK=c.CMYK(0,100,100,0)# html/css color nameconvertedRGB=c.from_name("red")# converting valuesconvertedCMYK=redRGB.to_cmyk()convertedHex=redRGB.to_hex()# accessing tuples and printingprint(f"Red RGB tuple:{redRGB.to_tuple()}")print(f"Red Hex code:{redHex.to_string()}")print(f"Red CMYK tuple:{redCMYK.to_tuple()}")## printing colored text from RGB# prints'This is red text' in a red colorprint(c.color_text("This is red text",redRGB))## Combining Colors# making greeng=c.mix_colors([#yellowc.RGB(255,255,0),# bluec.RGB(0,0,255)])print(g.to_tuple())
Package: pyspectrum2
pyspectrum2 implements the Protobuf-based interface toSpectrum2required for building Python-basedSpectrum2backends.SupportFor support and discussions please join the XMPP MUC:spectrum@conference.spectrum.im.ExampleFor an exampe backend which uses pyspectrum2 checkouttransWhat.ContributorsSteffen Vogel (stv0g)Sarang Bharadwaj (sarangbh)Licensepyspectrum2 is licensed under theGPLv3license.
Package: pySpectrumFileFormat
Microanalysis File FormatProject to read and write various x-ray spectrum file format.Free software: Apache Software License 2.0Documentation:https://microanalysis-file-format.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.BadgespypypyupGitHubHistory0.1.0 (2017-03-07)First release on PyPI.
Package: pyspecty
PySpectyA happy light weight library to search python errors on stackoverflow automatically.InstallationInstallation is simplest with pip:pip install pyspectyInstallation notespyspecty depends onsingleton-decoratoronly.pyspecty automatically search python errors on stackoverflow. SeeUsagebelow.UsageCheck outA simple usage examplefor a short intro. A sample usage is:frompyspectyimportPySpectyPySpecty()# that's it!Fromexample:frompyspectyimportPySpectyPySpecty()# That's it!! Do it somewhere in your file# The actual code!!print(2/0)# Code end hereoutput is:TODOTests need to be written.A dumb page also open that need to be fixed.ContributingFeel free to submit pull requests to me.AuthorsMuhammad Haseeb-Initial work-Muhammad HaseebLicensingThe pycloudy library isMIT Licenced. Feel free to use commercially of personally.
Package: pyspedas-examples
PySPEDAS ExamplesThis project contains general examples and turorials for pySPEDAS.RequirementsPython 3.8+ is required.InstallationTo install the examples, use the following command:pipinstallpyspedas_examplesTo upgrade the examples from a previous version, use the following command:pipinstallpyspedas_examples--upgradeInstalling pyspedas_examples will also install pyspedas and all other required packages.Running the examplesTo run one of the examples using the python command line, use the following commands:frompyspedas_examplesimportex_basic
ex_basic()Alternatively, you can open the example file using an editor (like Visual Studio Code) and run it directly.Additional examplesAdditional, mission-specific examples, can be found in the repositories:Magnetospheric Multiscale Mission (MMS):https://github.com/spedas/mms-examplesTime History of Events and Macroscale Interactions during Substorms (THEMIS):https://github.com/spedas/themis-examplesAdditional InformationFor documentation on PySPEDAS, see:https://pyspedas.readthedocs.io/For documentation on PyTplot, see:https://pytplot.readthedocs.io/For documentation on cdflib, see:https://cdflib.readthedocs.io/For more information on IDL SPEDAS, seehttp://spedas.org/
Package: pyspedfiscal
PySpedFiscalLê e serializa um arquivo do tipo Sped FiscalInstalaçãopip install pyspedfiscalDependenciasPydanticComo UsarLendo um arquivo:# Importe a classe SpedFiscalfrompyspedfiscalimportSpedFiscal# Utilize o metodo da classe `importar` para carregar um arquivo spedsped_fiscal=SpedFiscal.importar('caminho_arquivo')# Utilize a hierarquia do arquivo para percorrer os registrosregistros_0200=sped_fiscal.bloco_0.resgistro_0001.registros_0200forregistroinregistros_0200:...Lendo um bloco:frompyspedfiscal.bloco_0importBloco0bloco="""|0000|016|0|01072022|31072022|EMPRESA TESTE|14028298000152||SP|009371438460|3550308|||A|0||0001|0||0002|00||0005|EMPRESA TESTE|25821270|RUA EMPRESA TESTE|1111||BAIRRO EMPRESA TESTE|2499999999|||..."""registros=bloco.splitlines()bloco_0=Bloco0.ler_registros(registros)Lendo um Registrofrompyspedfiscal.bloco_0.registro_0000importRegistro0000registro="|0000|016|0|01072022|31072022|EMPRESA TESTE|14028298000152||SP|009371438460|3550308|||A|0|"registro_0000=Registro0000.ler_registro(registro)Registros ImplementadosBloco 0Bloco BBloco CBloco DBloco EBloco GBloco HBloco GBloco KBloco 1Bloco 90000B001C001E00190010001B020C100E10099000002B025C101E11099900005B030C105E11599990015B035C1100100B350C1110150B420C1120175B440C1130190B460C1140200B470C1150205B500C1160206B510C1200210B990C1300220C1400221C1600300C1700305C1800400C1900450C1950460C197050006000990
Package: pyspeechanalysis
PySpeechAnalysisNow Supportautocorrelation, average_magnitude_difference, bandpass_filter, covariance, discrete_cosine_transfrom,framming, hamming_window, mel_filter, moving_average, normalize_signal,pre_emphasis, power_spectrum, standard_deviationExampleHow to usefromscipy.ioimportwavfilefrompyspeechanalysisimportSpeechProcessingasSPinputfile=r'./audio.wav'[fs,X]=wavfile.read(inputfile)# PRE-PROCESSINGx=SP.normalize_signal(X,is_figure=True)y=SP.pre_emphasis(x,is_figure=False)# FRAMING AND OVERLAPPINGPERCENT=80FRAME_MILLISEC=0.032frame=SP.set_frame(fs,FRAME_MILLISEC)signal_vector=SP.framming(y,frame,PERCENT)Check out:https://edocstudio.info