Saravanan666/pypi-org huggingface dataset:
Package: pysros
Python 3 for Nokia Service Router Operating System (pySROS)OverviewThe pySROS libraries provide a model-driven management interface for
Python developers to integrate with supported Nokia routers
running the Service Router Operating System (SR OS).The libraries provide an Application Programming Interface (API) for developers
to create applications that can interact with Nokia SR OS devices, whether those
applications are executed from a development machine or directly on the router.When a developer uses only libraries and constructs supported on SR OS, a
single application may be executed from a development machine or ported
directly to an SR OS node where the application is executed.Pre-requisitesIn order to use the pySROS library the following pre-requisites must be met:One or more SR OS nodeRunning in model-driven modeRunning SR OS 21.7.R1 or greater (to execute applications on the SR OS device)With NETCONF enabled and accessible by an authorized user (to execute applications
remotely)A Python 3 interpreter of version 3.10 or newer when using the pySROS library to
execute applications remotelyLicenseCopyright 2021-2023 Nokia.The license is locatedhere.Reporting issuesIssues, suggestions, and enhancements are welcome.  Please use the Nokia support
process.  Issues raised in GitHub may be considered for inclusion into the project
by Nokia.  Pull requests are not accepted.InstallationMultiple installation methods are available:PyPiNokia support portalGitHubNote: It is recommended to use Python virtual environments where appropriate.PyPiThe preferred method of installation of the pySROS libraries is to install
directly from the Python Package index (PyPi) using thepiptool.The pySROS project islocated on PyPi.org.The libraries can be downloaded and installed by using the following:pipinstallpysrosTo upgrade to the latest release use:pipinstall--upgradepysrosNokia support portalThe pySROS libraries are available fordownload from the portalfor registered
customers.The obtained file can be unzipped and subsequently installed using:python3setup.pyinstallGitHubThe pySROS libraries are available fordownload from GitHub.The obtained file can be installed using:gitclonehttps://github.com/nokia/pysros
python3setup.pyinstallDocumentation and examplesGuidance documentation is available in the SR OS System Management Guide.API documentation is provided in this repository and may be compiled from source
using:cddocs
pip3install-rrequirements.txt
makehtmlThe built documentation will be available in the docs/build/html directory.Alternative formats may be selected after themakecommand instead of thehtmlattribute.  Some of
these include:singlehtmlmantextFurther reading and assistanceNokia product documentationTechnical support
Package: pysrp
pySRPPython module implementing Stable Random Projections.These create interchangeable, data-agnostic vectorized representations of text suitable for a variety of contexts.You may want to use them in concert with the pre-distributed Hathi SRP features.InstallationPython 3pip3installgit+git://github.com/bmschmidt/pySRP.gitPython 2pipinstallgit+git://github.com/bmschmidt/pySRP.gitUsageExamplesSee thedocs folderfor some IPython notebooks demonstrating:Taking a subset of the full Hathi collection (100,000 works of fiction) based on
identifiers, and exploring the major clusters within fiction.Creating a new SRP representation of text files and plotting dimensionality reductions of them by language and timeSearching for copies of one set of books in the full HathiTrust collection, and using Hathi metadata to identify duplicates and find errors in local item descriptions.Training a classifier based on library metadata using TensorFlow, and then applyinig that classification to other sorts of text.Basic UsageUse the SRP class to build an object to perform transformations.This is a class method, rather than a function, which builds a cache of previously seen words.importSRP# initialize with desired number of dimensionshasher=SRP.SRP(640)The most important method is 'stable_transform'.This can tokenize and then compute the SRP.hasher.stable_transform(words="foo bar bar"))If counts are already computed, word and count vectors can be passed separately.hasher.stable_transform(words=["foo","bar"],counts=[1,2])Read/write toolsSRP files are stored in a binary file format to save space.
This format is the same used by the binary word2vec format.file=SRP.Vector_file("hathivectors.bin")for(key,vector)infile:pass# 'key' is a unique identifier for a document in a corpus# 'vector' is a `numpy.array` of type `<f4`.There are two other methods. One lets you read an entire matrix in at once.
This may require lots of memory. It returns a dictionary with two keys: 'matrix' (a numpy array)
and 'names' (the row names).all=SRP.Vector_file("hathivectors.bin").to_matrix()all['matrix'][:5]all['names'][:5]The other lets you treat the file as a dictionary of keys. The first lookup
may take a very long time; subsequent lookups will be fastwithoutrequiring
you to load the vectors into memory. To get a 1-dimensional representation of a book:all=SRP.Vector_file("hathivectors.bin")all['gri.ark:/13960/t3032jj3n']You can also, thanks to Peter Organisciak, access multiple vectors at once this way by passing a list of identifiers. This returns a matrix with shape (2, 160) for a 160-dimensional representation.all[['gri.ark:/13960/t3032jj3n','hvd.1234532123']]Writing to SRP filesYou can build your own files row by row.# Note--the dimensions of the file and the hasher should be equal.output=SRP.Vector_file("new_vectors.bin",dims=640,mode="w")hasher=SRP.SRP(640)forfilenamein[a,b,c,d]:hash=hasher.stable_transform(" ".join(open(filename).readlines()))output.add_row(filename,hash)# files must be closed.output.close()
Package: pysrs
Python SRS (Sender Rewriting Scheme) library.
As SPF is implemented, MTAs that check SPF must account for any forwarders.
One way to handle forwarding is to have the forwarding MTA rewrite envfrom to a
domain they are authorized to use.Seehttp://www.openspf.org/SRSfor details.
The Perl reference implementation and a C implementation are athttp://www.libsrs2.org/
Package: pysrt
pysrtpysrt is a Python library used to edit or create SubRip files.Forewordpysrt is mainly designed as a library, but if you are experiencing troubles
with bad subtitles you can first try to useruby-osdbwhich will try to find the best subtitle for your movie. If you are still unlucky
pysrt also provide ansrtcommand useful for either shift, split, or rescale a.srtfile.Command UsageShifting:$ srt -i shift 2s500ms movie.srtSpliting:$ srt split 58m26s movie.srtRescaling:$ srt -i rate 23.9 25 movie.srtInstallationpysrt is available on pypi. To intall it you can use eitherpip:$ sudo pip install pysrtor distutils:$ sudo easy_install pysrtIt is compatible with python >= 2.6 and 3.Library UsageImport:>>> import pysrtParsing:>>> subs = pysrt.open('some/file.srt')
# If you get a UnicodeDecodeError try to specify the encoding
>>> subs = pysrt.open('some/file.srt', encoding='iso-8859-1')SubRipFile are list-like objects of SubRipItem instances:>>> len(subs)
>>> first_sub = subs[0]SubRipItem instances are editable just like pure Python objects:>>> first_sub.text = "Hello World !"
>>> first_sub.start.seconds = 20
>>> first_sub.end.minutes = 5Shifting:>>> subs.shift(seconds=-2) # Move all subs 2 seconds earlier
>>> subs.shift(minutes=1)  # Move all subs 1 minutes later
>>> subs.shift(ratio=25/23.9) # convert a 23.9 fps subtitle in 25 fps
>>> first_sub.shift(seconds=1) # Move the first sub 1 second later
>>> first_sub.start += {'seconds': -1} # Make the first sub start 1 second earlierRemoving:>>> del subs[12]Slicing:>>> part = subs.slice(starts_after={'minutes': 2, 'seconds': 30}, ends_before={'minutes': 3, 'seconds': 40})
>>> part.shift(seconds=-2)Saving changes:>>> subs.save('other/path.srt', encoding='utf-8')
Package: pysrttranslator
This program is a tool to translate and create automatically an srt file to be used as a subtitle
for your video, to be auto reproduce in your language.Supported on the google api for google-translate and based on the parser library pysrt with this
program you will be able to translate in a matter of seconds your subtitles from the origin
language for your videos.The flow of work is something like this:Download or create your subtitle for your videos insrt formatin your language.Run this script telling the origin and destiny.Gualá your subtitle is in other language.NoteThis translations are not perfect due to the normal leak of quality of google translate,
remember install aprogramto post-edit your subtitles easily. and this is a list ofplayerswhich support natively this subs.Dependencies:Generate yourgoogle API key, if you don’t know what it is, I recomend read theofficial help.pysrt.google-api-python-client.Installing:This is an script designed to run directly from the source code, only install
the dependencies using the installer of your preference and run the script, you can install it
quickly with pip.:$sudo pip install pysrttranslatorOr you can install from the sources:$ Download the source.
$ tar zxfv source.tar.gz
$ cd source
$ sudo setup.py installConfiguring.You need create a config file with at least the Google API key.:$touch local.cfg
$nano local.cfgPaste this test file on your local.cfg file, you can read the config options to know how set global
and local variables in this case the file will be read from the location where you are.[__main__]input_lang=en#origin lang of your subtitleoutput_lang=es#destiny lang of your subtitleslog_file=pysrttranslator.log#where your log will begoogle_api_key=INSERTHEREYOURKEY#your api key generated in google develper consoleUsage.Some examples about how to use it.1.- Translating a file and saving it in the same folder from english to spanish.:$pysrttranslator file.srt -i en -o esWith this command you will obtain a file calledfile.es.srtjust beside the file.srt file.2.- Translating a file and saving the result in other folder from english to spanish.:$pysrttranslator file.srt /path/destiny/fileoutput.srt -i en -o es3.- Run this command to get all options.:$pysrttranslator --helpOptions availables.This is what you will get if you run the –help option.
Package: pyssa
pyssa : Python package for stochastic simulationsIntroductionpyssais a Python package for stochastic simulations. It offers a simple API to define models, perform stochastic simulations with them and visualize the results in a convenient manner.Currently under active development in thedevelopbranch.InstallInstall withpip:$pipinstallpyssaDocumentationGeneral:https://pyssa.readthedocs.io.UsageA short summary follows, but a more detailed tutorial can be found athttps://pyssa.readthedocs.io/en/latest/tutorial.htmlfrompyssa.simulationimportSimulationV_r=np.array([[1,0],[0,1],[0,0]])# Reactant matrixV_p=np.array([[0,0],[1,0],[0,1]])# Product matrixX0=np.array([100,0,0])# Initial statek=np.array([1.0,1.0])# Rate constantssim=Simulation(V_r,V_p,X0,k)# Declare the simulation object# Run the simulationsim.simulate(max_t=150,max_iter=1000,chem_flag=True,n_rep=10)Change simulation algorithmYou can change the algorithm used to perform the simulation by changing thealgorithmparametersim.simulate(max_t=150,max_iter=1000,chem_flag=True,n_rep=10,algorithm="tau_adaptive")Run simulations in parallelYou can run the simulations on multiple cores by specifying then_procsparametersim.simulate(max_t=150,max_iter=1000,chem_flag=True,n_rep=10,n_procs=4)Plot simulation resultssim.plot()Accessing simulation resultsresults=sim.resultsYou can also access the final states of all the simulation runs byfinal_times,final_states=results.finalLicenseCopyright (c) 2018-2020, Dileep Kishore, Srikiran Chandrasekaran. Released under: Apache Software License 2.0CreditsCythonpytestCookiecutteraudreyr/cookiecutter-pypackageblack
Package: pyssage
PySSaGEPySSaGE is a collection of python versions of analyses originally part of thePASSaGE(Rosenberg 2001) andPASSaGE2 (Rosenberg and Anderson 2011) software packages for spatial analysis.See thePySSaGE wikifor more information.AnalysesSo far the following analyses have been implemented:Quadrat-VarianceOne-dimensionalTTLQV: Two-Term Local Quadrat Variance Analysis3TLQV: Three-Term Local Quadrat Variance AnalysisPQV: Paired Quadrat Variance AnalysistQV: Triplet Quadrat Variance Analysis2NLV: Two-term New Local Variance Analysis3NLV: Three-term New Local Variance AnalysisTwo-dimensional4TLQV: Four-Term Local Quadrat Variance Analysis9TLQV: Nine-Term Local Quadrat Variance Analysis5QV: Pentuplet Quadrat VarianceWaveletsHaarFrench Top HatMexican HatMorletSineDistance CalculationsEuclidean distances/angles from 1, 2, and 3-dimensional pointsSpherical distances/angles from latitudes and longitudesShortest-path/Geodesic distancesDistances from arrays of dataEuclidean distancesSquared Euclidean distancesManhattan distancesCanberra distancesHamming distancesJaccard distancesCosine distancesCzekanowski distancesCorrelation distancesSquared correlation distancesDistance class determinationConnections/LinksDelaunay/Voronoi TessellationMinimum-spanning TreeRelative Neighborhood NetworkGabriel GraphLeast-diagonal NetworkRange-based Connectionsk-nearest NeighborsCorrelogramsCorrelogramsMoran'sIGeary'scMantel CorrelogramsVariogramsAnisotropyBearing AnalysisBearing CorrelogramsMoran'sI, Geary'sc, and MantelWindrose CorrelogramsMoran'sI, Geary'sc, and MantelAngular Correlation AnalysisMiscellaneousMantel tests
Package: pyssam
Python Statistical Shape and Appearance Modelling (pyssam)Welcome topyssam, a Python library for statistical modelling of biomedical shape and appearance.Installationpyssam can be installed usingpipinstallpyssamDocumentationInformation on how to use pyssam, such as jupyter notebooks and API documentation are available onreadthedocs.Getting helpIf you observe any unexpected behaviour, have any feature requests or questions, please submit an issue to
this repository's issue tracker.
Please state which version of python and pyssam's dependencies that you are using, as well as your operating system.Citing usIf you use pyssam in your work, please cite the following:@article{williams2023pyssam,
  author = {Williams, Josh and Ozel, Ali and Wolfram, Uwe},
  title = {pyssam -- a Python library for statistical modelling of biomedical shape and appearance},
  journal = {arXiv preprint arXiv:2301.04416},
  publisher = {arXiv},
  year = {2023},
}
Package: pyssandra
PyssandraCassandra object mapper using Pydantic models.Exampleimportuuidfromcassandra.authimportPlainTextAuthProviderfromcassandra.clusterimportClusterfrompydanticimportBaseModel,FieldfrompyssandraimportPyssandracloud_config={"secure_connect_bundle":"/path/to/secure-connect-dbname.zip"}auth_provider=PlainTextAuthProvider(username="user",password="pass")cluster=Cluster(cloud=cloud_config,auth_provider=auth_provider)session=cluster.connect()keyspace="test"db=Pyssandra(session,keyspace)@db.table(partition_keys=["id"],index=["first"])classUser(BaseModel):"""Test user model."""id:uuid.UUID=Field(default_factory=uuid.uuid4)first:strlast:str# Create DB Table.db[User].sync()# CRUD Methods.user=User(first="Test",last="User")awaitdb[User].insert(user)awaitdb[User].find_one({"id":user.id})page1=awaitdb[User].find_many(where={"first":"Test"},page_size=10)page2=awaitdb[User].find_many(where={"first":"Test"},page_size=10,paging_state=page1.paging_state)awaitdb[User].update(user)awaitdb[User].delete({"id":user.id})
Package: pyssb
pyssb is a package for building general purpose SSBs (Site Specific
Browsers) with PyQT5.InstallationYou should be able to install the pyssb package via PyPI:sudo pip install -U pyssbYou of course will need to install PyQT5 as well, but this probably
needs to be installed via your OS package manager. You may have to
separately install a PyQT5 webkit package separately.UsageYou should be able to runpyssbto generate simple python
executables.If you would like to use pyssb, here’s a simple example of what is
generated by thepyssbgenerator:fromPyQt5importQtWidgetsfrompyssbimport*importsysssb_config={'name':'pyssb','title':'pyssb','url':'https://github.com/lhl/pyssb/'}if__name__=="__main__":app=QtWidgets.QApplication(sys.argv)ssb=SSBWindow(ssb_config)ssb.show()sys.exit(app.exec_())See thesamples folderfor more examples.SSB ListWorks1Password AnywhereAsanaDropbox PaperEvernoteGMail + GMail for AppsHackpadMessengerDoesn’t Work:Wunderlist - doesn’t load, blank screenHangouts - has UA checkNotesThis might not be a good fit for you. If so, there might be some alternatives:SSB solutions for OS X:http://fluidapp.com/https://github.com/kfix/MacPinhttps://github.com/dmarmor/epichrome
Package: pyssc
pysscA Sennheiser Sound Control Protocol (SSC) Client Implementation for PythonIntroductionTheSennheiser Sound Control Protocolis a specific adaption of Open Sound Control. Pyssc is a simple client implementation that allows users to discover SSC Devices in their networks and subsequently communicate with those Devices via SSC.InstallationPyssc is published topypi.org/pyssc.pip install pysscUsageInitially you will have to find out the IP Addresses of your SSC Devices. If you don't know them you can try and find them usingzeroconf.importpysscassscfound_setup=ssc.scan()When you know all the IPs you can store the setup as a JSON file.found_setup.to_json('setup.json')Here's an example setup JSON:{"Device 1":"fe80::2a36:38ff:fe60:7515","Device 2":"fe80::2a36:38ff:fe60:784f",}Once you have defined your setups as a JSON you don't need to scan anymore. Simply import your setup at the beginning of your session.found_setup=ssc.Ssc_device_setup().from_json('setup.json')Now you can send and receive SSC either to and from a single devicedevice_1=found_setup.ssc_devices[0]ssc_transaction=device_1.send_ssc('{"audio":{"out":{"mute":true}}}')or the whole setup.found_setup.send_all('{"audio":{"out":{"mute":true}}}')To find out which commands work for your specific SSC Device please refer to theSSC Documentation.
Package: pyssc32
This is simple interface to control RC servos with an SSC32 board.Features:Direct and grouped queries (#<N>P<US>and<SERVO_POS>…T<MS>)Angle (degrees or radians) to microsecond position calculationSimple configuration file that help to map board output pin to servo name and provide limits.Sequences scripts (in YAML format)Example>>> import ssc32
>>> import math
>>> ssc = ssc32.SSC32('/dev/ttyUSB0', 115200, count=32)
>>> ssc[2].position = 2000
>>> ssc[3].name = 'pan'
>>> ssc[4].name = 'tilt'
>>> pan_servo = ssc['pan']
>>> tilt_servo = ssc['tilt']
>>> pan_servo.degrees = 0
>>> tilt_servo.radians = math.pi/4
>>> ssc.commit(time=1000)
>>> ssc.is_done()
False
>>> ssc.is_done()
True
>>> ssc.description = 'My camera's pan/tilt'
>>> ssc.save_config('my_pantilt.cfg')0.4.2Change n to r to allow running on non-Windows platforms.0.4.1Add ssc32yaml script runnerDon’t change servo position on init (Servo.is_changedflag)0.4.0Servo script interface
with YAML serialization/deserializationMove to packageDepends on PyYAML0.3.3Rename Servo propertiesServo.degree->Servo.degrees,Servo.radian->Servo.radiansUse callback for ServoDescription for configuration (SSC32.description) line starts with#~
Package: pyssdb
pyssdb is anSSDBClient Library for Python.SSDBis a high
performace key-value(key-string, key-zset, key-hashmap) NoSQL database,
using Google LevelDB as storage engine.pyssdb is simple, has no depencencies other than the Python Standard Library.pyssdb is pure Python, and is compatible withgevent.pyssdb is thread-safe.Installationpipinstall--upgradepyssdbUsageHere is a short example:>>>importpyssdb>>>c=pyssdb.Client()>>>c.set('key','value')1>>>c.get('key')'value'>>>c.hset('hash','item','value')1>>>c.hget('hash','item')'value'>>>c.hget('hash','not exist')isNoneTrue>>>c.incr('counter')1>>>c.incr('counter')2>>>c.incr('counter')3>>>c.keys('a','z',1)['counter']>>>c.keys('a','z',10)['counter','key']For more information, seethe tutorial, which will explain
most everything.For the full list of SSDB commands, seethis page.LicenseCopyright (C) 2013-2017 Yue Du, Licensed underthe 2-clause BSD license.
Package: pyssdeep
This package is a Python wrapper forssdeepby Jesse Kornblum, which is a
library for computing Context Triggered Piecewise Hashes (CTPH).Installation$pipinstallpyssdeepUsageGet a fuzzy hash value for a string:importpyssdeeptry:result=pyssdeep.get_hash_buffer('The string for which you want to calculate a fuzzy hash')esceptpyssdeep.FuzzyHashErroraserr:print(err)exceptTypeErroraserr:print(err)print('The fuzzy hash value is{}'.format(result))Get a fuzzy hash value for a file:importpyssdeeptry:result=pyssdeep.get_hash_file('e:/file.txt')esceptpyssdeep.FuzzyHashErroraserr:print(err)exceptIOErroraserr:print(err)print('The fuzzy hash value is{}'.format(result))Get a fuzzy hash value for a file (using the pep 452 API):importpyssdeepbuffer_size=1024fuzzy_hash_obj=pyssdeep.new()withopen('e:/file.txt','rb')asfile:buffer=file.read(buffer_size)whilelen(buffer)>0:fuzzy_hash_obj.update(buffer)buffer=file.read(buffer_size)result=fuzzy_hash_obj.digest()LicenseMIT Copyright (c) 2020 Evgeny DrobotunRelease hystory1.0.0 (20.10.2020)First release of‘pyssdeep’
Package: pyssembly
PyssemblyA python assembly emulator.This tool allows to execute pseudo assembly code and it is meant for teaching purposes.Installpython -m pip install pyssemblyUsagepython -m pyssembly <code.pys>ExamplesLots of examples are available in theexamplesfolder.Print the result of 137 * 2322:create filemultiplication.pyscontaining:mov a 137
mul a 2322
out a "\n"run it with:python -m pyssembly multiplication.pysresult:318114Read 2 numbers from stdin and return average:create fileaverage.pyscontaining:in a "First number: "
in b "Second number: "
int a a 
int b b 
mov avg a
add avg b
div avg 2
out "The average between " a 
out " and " b 
out " is: " avg 
out "\n" nullrun it with:python -m pyssembly average.pysresult:First number: 26
Second number: 17
The average between 26 and 17 is: 21.5Pseudo assemblyThe language that pyssembly is able to execute is a pseudo assembly. All instructions have the form:<instruction> <operand a> <operand b>All instructions that return a result, store such result in the first operand (a).CommentsTo comment a line write ';' at the beginning. For example:;this is a commentLabelsTo label a line, to use it as destination in a jmp statement, simply write a single word in the line. For example:this-is-a-labelNullThe null value is simply the keywordnull. Like so:out "Hello world" nullArraysArrays are accessed using the[]sintax. For example:mov arr[0] 6Arrays are actually dictionaries and anything can be a key.Instruction setGeneralmov a b: store b into ajmp a b: if a, jump to b (b can be a label or a line number)in a b: print b to stdout, read string from stdin, store it into aout a b: print a and b to stdoutConversionsbool a b: boolean(b)int a b: integer(b)flt a b: float(b)str a b: string(b)Mathadd a b: a + bsub a b: a - bmul a b: a * bdiv a b: a / bpow a b: ablog a b: logbaroot a b: a1/bidiv a b: a // bmod a b: a % bRandomrnd a b: generate random float, a<=rf<=birnd a b: generate random integer, a<=ri<=bTrigonometrysin a b: sin(b)cos a b: cos(b)tan a b: tan(b)asin a b: asin(b)acos a b: acos(b)atan a b: atan(b)atan2 a b: atan2(a, b)Booleaneq a b: a == bneq a b: a != bles a b: a < bleq a b: a <= bgrt a b: a > bgeq a b: a >= bnot a b: not band a b: a and bor a b: a or bxor a b: a xor bnand a b: a nand bnor a b: a nor bnxor a b: a nxor b