Saravanan666/pypi-org huggingface dataset:
Package: pyStorages
pyStoragesSimple data storages written in PythonCurrently supported storage types:JSONPickleRedisInstallationpipinstallpyStorages# orpipinstallgit+https://github.com/Cub11k/pyStorages.gitForRedisStorageuse extras:pipinstallpyStorages[redis]# or, for async versionpipinstallpyStorages[aioredis]Getting startedpyStorages is the simplest way to interact with different types of storages,
where data is stored and treated as a dictionary, in terms of python -dict.Storage class interface is pretty convenient and is described below:Set data[async] def set_data(**kwargs)This method allows you to update data according to key-value pairs.
Existing key-values pairs not covered by passed keys won't be affected.Parameterskwargs- key-value pairs, according to which, the data will be updatedReturns-NoneDelete data[async] def delete_data(*keys)This method allows you to delete values by keys.Parameterskeys- list of keys, which will be deleted, if presentRaisesKeyError- in case of receiving a non-existing keyReturns-NoneReset data[async] def reset_data()This method allows you to delete all data.Returns-NoneGet data[async] def get_data(*keys)This method allows you to get values by keys.
For nested keys uselist.Note: if no keys are passed, all data will be returned.>>> get_data('key1', 'key2', 'key3')
(data['key1'], data['key2'], data['key3'])

>>> get_data(['key1', 'key2'])
(data['key1']['key2'],)

>>> get_data([])
(data,)

>>> get_data()
(data,)Parameterskeys- list of keys, which values will be returned, if presentRaisesKeyError- in case of non-existing keyReturns-tupleExamplesComing soon...
Package: pystoreql
Table of Contents1Whypystoreql?1.1Features1.2To do2Installation3Paste sharing4File and directory sharing5Command line interface6Contributing1Whypystoreql?pystoreql(py-store-q-l) lets you share pastes, files and directories easily and let you choose the name (id) (could be easy to be remembered) for the paste/file/directory being shared. Everyone who has theidcan download the paste/file/directory easily by typing a simple command (e.g.,pystoreql get <id>) without opening a web browser. Read more below to find out how to usepystoreql.1.1FeaturesAnonymous sharing: No need to register to post, upload, download.Easy to use: Simply typing a command v.s. opening a web browser or using a graphic interface clients.Unlimited: In theory, there should be no limit on the number and the size of pastes or files you can share.Possible to host and use your ownpystoreqlserver with the same command line interface likegit.More features will be coming as users suggest.1.2To doWriting testsWeb interface (maybe)Better support for Windows and MacOS.Phone applications i.e., Android, iOS, … (unlikely)2InstallationYou need python to runpystoreql. For Ubuntu users, it is simple as:$ sudo apt-get install -y python python-pipAlternatively, you can install Miniconda (a Python distribution):https://conda.io/miniconda.htmlThen you can installpystoreqlby usingpipcommand:In Ubuntu, without usingsudo:$ pip install --user pystoreqlOr if you have Miniconda:$ pip install pystoreql3Paste sharingThe two main sub-commands for paste sharing arepostandget. To share a paste and assign it anid(e.g.,your_wanted_id):$ pystoreql post your_wanted_id "the paste string"or:$ cat your_file.txt | pystoreql post your_wanted_id -To retrieve a paste with a givenid(e.g.,the_id):$ pystoreql get the_idTo retrieve a paste with a given id (e.g.,the_id) and save it to a file (e.g.,filename.txt)$ pystoreql get the_id > filename.txt4File and directory sharingThe two main sub-commands for file and directory sharing arepushandpull. To share a file or a directory and assign it anid(e.g.,your_wanted_id):$ pystoreql push your_wanted_id the_file_or_dir_pathTo retrieve a file or a directory with a givenid(e.g.,the_id) to the current working directory:$ pystoreql pull the_id5Command line interface$ pystoreql --help
Usage:
  pystoreql get <id>
  pystoreql post <id> <value>
  pystoreql pull <id>
  pystoreql push <id> <file_or_dir>6ContributingThe source code is available at:https://github.com/hieu-n/pystoreqlPlease feel free to file issues/suggestions, fork, modify and make pull requests. New contributors are more than welcome.
Package: pystorm
Pystorm lets you run Python code against real-time streams of data via
Apache Storm.  With pystorm you can create Storm bolts and spouts in
Python without having to write a single line of Java.  It is meant to be used
under-the-hood by Storm Python libraries that will provide the command-line
tools for actually building/submitting the topologies (e.g.,streamparse).DocumentationHEADStableContributorsAlphabetical, by last name:Dan Blanchard (@dsblanch)Keith Bourgoin (@kbourgoin)Arturo Filastò (@hellais)Jeffrey Godwyll (@rey12rey)Daniel Hodges (@hodgesds)Wieland Hoffmann (@mineo)Tim Hopper (@tdhopper)Omer Katz (@thedrow)Aiyesha Ma (@Aiyesha)Andrew Montalenti (@amontalenti)Rohit Sankaran (@roadhead)Viktor Shlapakov (@vshlapakov)Mike Sukmanowsky (@msukmanowsky)Cody Wilbourn (@codywilbourn)Antonio Uccio Verardi (@poros)Curtis Vogt (@omus)
Package: pystorms
pystorms: simulation sandbox for the evaluation and design of stormwater control algorithmsOverviewThis library has been developed in an effort to systematize quantitative analysis of stormwater control algorithms.
It is a natural extension of the Open-Storm's mission to open up and ease access into the technical world of smart stormwater systems.
Our initial efforts allowed us to develop open source and free tools for anyone to be able to deploy flood sensors, measure green infrastructure, or even control storm or sewer systems.
Now we have developed a tool to be able to test the performance of algorithms used to coordinate these different sensing and control technologies that have been deployed throughout urban water systems.For the motivation behind this effort, we refer the reader to our manuscriptpystorms. In general, this repo provides a library ofscenariosthat are built to allow for systematic quantitative evaluation of stormwater control algorithms.Getting StartedInstallationRequirementsPyYAML >= 5.3numpy >= 18.4pyswmmpipinstallpystormsPlease raise an issue on the repository or reach out if you run into any issues installing the package.ExampleHere is an example implementation on how you would use this library for evaluating the ability of a rule based control in maintaining the flows in a network below a desired threshold.importpystormsimportnumpyasnp# Define your awesome controllerdefcontroller(state):actions=np.ones(len(state))foriinrange(0,len(state)):ifstate[i]>0.5:actions[i]=1.0returnactionsenv=pystorms.scenarios.theta()# Initialize scenariodone=Falsewhilenotdone:state=env.state()actions=controller(state)done=env.step(actions)performance=env.performance()Detailed documentation can be found on thewebpage
Package: pystory
Keep a local history of everything you do inside your virtual python environment.InstallationAfter activating your virtual environment, install the module with:pip install pystoryAdd the following line to your.bashrc/.bash_profilefile to enablepystory:export PROMPT_COMMAND='if [ ! -z ${VIRTUAL_ENV+x} ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> $VIRTUAL_ENV/.pystory; fi'The contents ofPROMPT_COMMANDare executed as a regular Bash command just before Bash displays a prompt.This line adds your last command as an entry to the.pystoryfile, which will be placed in your$VIRTUAL_ENV/folder.Ex:/Users/username/project/.venv/.pystoryUsageCheck your pystory by typingpystorywhile your virtual environment is activated.$ pystory
Hist    Count    Command
1       1.       pip install requests
2       1.       pip install Django
5       3.       python
...Note that the output is compressed, so only the last history entry of a command is listed, with the count of times the command is used.$ pystory find Django
Commands matching `Django`:
Hist    Count     Command
2       1         pip install Django
Package: pystorz
pystorzis anobject store frameworkbuilt in python. It consists of a set of modules implementing theStoreinterface and features a simpleobject modeling languageused to generate golang object class meta for interacting withStoreAPIs.pystorzmodules provide functionality to store, modify and retrieve modeled objects from various sources (TBD). Such modules can be composed together to chainStorefunctionality into more complex logical modules. Combining modules allows handling object changes and manipulating data in complex wayswithin or acrossservices, making multi-level server complexity achievable with ease. The Store modules are fully compatible with each other and can be composed in any combination since they all implement or expose the sameStoreinterface.Original storz was written in go. You can check it out here:https://github.com/wazofski/gostorzThis is a python port of the original storz.
Still in development.Quick Start GuideInstallationpip install pystorzModel exampleYou can find a saomple model in the tests folder.https://github.com/wazofski/pystorz/blob/master/tests/model/sample.ymlYou can define simple structures and reference them as fields in other structures.You need to define Objects that will become your root level modeled objects. You can then create, update, delete and retrieve these from using a store.Only a SQLite store is implemented at the moment.More to come.
Check out the go version (link above) for more information.Usagefrom pystorz.mgen import builder

    # run the code gen to 
    builder.Generate("path/to/model.yml")
    # this will make a generated folder in the project home directory

    # you can then import the generated model
    from generated import model

    # initialize a store
    stor = SqliteStore(
        Schema(),
        SqliteConnector("path/to/your/sqlite3.db"))

    world = model.WorldFactory()
    world.External().SetName("hello")

    created_world = stor.Create(world)
    world.External().SetDescription("hello world")
    updated_world = stor.Update(world.Metadata().Identity(), world)
    
    # ...
Package: pystospa
pystospaA Python binding of a C++ software package for stochastic simulations of spatially extended systems,StoSpa2. Code-base has been completely refactored since the previous version ofStoSpa. Python bindings have also been included.InstallationEasy waypip install pystospaHard wayAfter cloning the following repositorygit clone https://github.com/BartoszBartmanski/StoSpa2.git --recursivedo the followingcd StoSpa2
python setup.py installThis way of installing pystospa assumes the following packages are installed are metscikit-buildsetuptoolswheelcmakeExampleLet's consider the following chemical reactionA \rightarrow \emptysethappening at ratek. The python code for this simulation is as followsimport pystospa as ss

v = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])
v.add_reaction(r)

s = ss.Simulator([v])
s.run("example.dat", 0.01, 500)After importing pystospa, we create the voxel and reaction objects withv = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])and then we add the reaction object to the voxel object.v.add_reaction(r)And finally, we pass the voxel objects, contained in a list, to a simulator objects = ss.Simulator([v])
s.run("example.dat", 0.01, 500)and we invoke therunfunction of the Simulator class, to run a stochastic simulation saving the state every 0.01 seconds for 500 steps.
Package: pystospaboost
pystospaboostA Python binding of a C++ software package for stochastic simulations of spatially extended systems,StoSpa2. Code-base has been completely refactored since the previous version ofStoSpa. Python bindings have also been included.InstallationEasy waypip install pystospaboostHard wayAfter cloning the following repositorygit clone https://github.com/BartoszBartmanski/StoSpa2.git --recursivedo the followingcd StoSpa2
python setup.py installThis way of installing pystospa assumes the following packages are installed are metscikit-buildsetuptoolswheelcmakeboostExampleLet's consider the following chemical reactionA \rightarrow \emptysethappening at ratek. The python code for this simulation is as followsimport pystospa as ss

v = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])
v.add_reaction(r)

s = ss.Simulator([v])
s.run("example.dat", 0.01, 500)After importing pystospa, we create the voxel and reaction objects withv = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])and then we add the reaction object to the voxel object.v.add_reaction(r)And finally, we pass the voxel objects, contained in a list, to a simulator objects = ss.Simulator([v])
s.run("example.dat", 0.01, 500)and we invoke therunfunction of the Simulator class, to run a stochastic simulation saving the state every 0.01 seconds for 500 steps.
Package: pystrace
pystracePython library and command line tool for collecting strace eventsPurposeThis library works as wrapper for strace generating syscall events, this events can be used by applications for system calls activity analisys.In order to handle long executions without generating massive aummounts of logs, the library creates a named FIFO and an extra process where the strace is executed outputing to the FIFO. The main process consumes all the data and generates the corresponding events.Installpip3install--userpystraceHow to use (Lib)frompystraceimportTracerdefon_event(event):print(event)my_tracer=Tracer(["id"],on_event,filter_syscalls="file",filter_return="successful")my_tracer.run()How to use (command ine tool)pystrace--commandExample:# Trace only file related syscalls with successful resultpystrace-sfile-rsuccessful--who
Package: pystrainer
Strainer is a different take on serialization and validation in python. It utilizes a functional style over classes.Strainer officially supports Python 2.6–2.7 & 3.4–3.5, and runs great on PyPy.FeaturesFunctionalComplex Python object serializationData de-serializationData ValidationSpeedSerialization Exampleimportdatetimefromstrainerimport(serializer,field,child,formatters,validators,ValidationException)artist_serializer=serializer(field('name',validators=[validators.required()]))album_schema=serializer(field('title',validators=[validators.required()]),field('release_date',validators=[validators.required(),validators.datetime()],formatters=[formatters.format_datetime()]),child('artist',serializer=artist_serializer,validators=[validators.required()]))classArtist(object):def__init__(self,name):self.name=nameclassAlbum(object):def__init__(self,title,release_date,artist):self.title=titleself.release_date=release_dateself.artist=artistbowie=Artist(name='David Bowie')album=Album(artist=bowie,title='Hunky Dory',release_date=datetime.datetime(1971,12,17))Now we can serialize, deserialize, and validate data>>>album_schema.serialize(album){'artist':{'name':'David Bowie'},'release_date':'1971-12-17T00:00:00','title':'Hunky Dory'}>>>album_schema.deserialize(album_schema.serialize(album)){'artist':{'name':'David Bowie'},'release_date':datetime.datetime(1971,12,17,0,0,tzinfo=<iso8601.Utc>),'title':'Hunky Dory'}>>>input=album_schema.serialize(album)>>>delinput['artist']>>>album_schema.deserialize(input)ValidationException:{'artist':['This field is required']}The example has been borrowed fromMarshmallowand tweaked.InstallationTo install Strainer, simply:$pipinstallpystrainer✨🍰✨Satisfaction, guaranteed.Release History1.0.1refining validatorsadded attr_getter to child, and many1.0.0Updating docsMaking it official0.0.9Fixing python 3 comptatability issue0.0.8Removed an errant print statement0.0.7Fixed a bug with datetime validators0.0.6Fixed a bug with multiple validation, pointing to the correct indexFixed a bug that applied vlaidation to entire array in multiple instead of elementsAdded a dict_field, if source is dict, instead of an objectAdded ability to pass validators to child, and many instances applying validation before moving to sub-elementAdded tests around catching nested validation errorsAdded formatters, so things can be formatted on the way outGot rid of encoders, not the domain of this projectEverything can be imported from one namespaceChanged the API from to_representation/to_internal to serialize/deserialize0.0.5 (2016-11-29)Fleshed out docsAdded datetime validatorIncreased speed bu reducing loops0.0.4 (2016-11-23)Add some validators0.0.1 (2016-11-23)Birth
Package: pystrand
pystrandQuickstartIn order to define a genetic algorithm you only need to determine
how should genotypes, or candidate solutions, look and which operators
should apply to them.The rest is simply matter of providing training data.In our case the data was generated by functionf(x) = 5 + 5x + 2x^2.>>>x = [i for i in range(10)]
   >>>y = [5 + (5*i) +(2*(i**2)) for i in x]After importing the model class we define which values can genes take.>>>from pystrand.models.polymodels import PowerPolyModel
   >>>domain = [i/10 for i in range(-100, 100)]At the model initialization we can provide constraints on operator behavior, population size
and maximum allowed runtime. This is particulary useful if we are looking for approximate solution.>>> model = PowerPolyModel(domain, population_size=500, max_iterations=1000, crossover_prob=0.5)We can also initialize the model with no constraints on the behavior of the algorithm, which will
set parameters to pre-determined defaults.
The only required parameter is the domain of gene values.>>> model = PowerPolyModel(domain)Model is then fitted on provided data.>>>model.fit(x, y, verbose=0)
   >>>model.solution
   ... (1., Genotype([5., 5., 2., 0., 0., 0., 0., 0., 0., 0.]))
Package: pystrapi
PyStrapiWork withStrapifrom Python via REST APIInstallpipinstallpystrapiExamplesQuick start:importasynciofrompystrapiimportStrapiClientasyncdefmain():strapi=StrapiClient(api_url=strapi_url)awaitstrapi.authorize(your_identifier,your_password)# optionalusers=awaitstrapi.get_entries('users',filters={'username':{'$eq':'Pavel'}})user_id=users['data'][0]['id']awaitstrapi.update_entry('users',user_id,data={'username':'Mark'})asyncio.run(main())DevelopmentInstall environment:python -m venv .env
source .env/bin/activate
poetry installLintRunprospector:prospectorUnit testspytest test/unittestsIntegration testsRun Strapi test server (seeinstructions), and run integration tests:pytest test/integrationCreate new releasePush changes to 'main' branch followingConventional Commits.
Package: pystrat
pystratConvenient stratigraphic plotting and analysis in Python.pystratseeks to make the plotting and analysis of stratigraphic data reproducible and simple.InstallationPyPITo install the latest release from PyPI, simply enter the following at the command prompt:pip install pystratGitHubTo install the latest version of the code directly from GitHub:Open Terminal.Change the current working directory to the location where you want the cloned directory to be made.cd <path/to/directory/>Copy, paste, and execute the following:git clone https://github.com/yuempark/pystrat.gitSet the path by opening.bash_profileor.bashrc(usually in your root directory) and adding the following:export PATH=$PATH:<path/to/directory>/pystrat
export PYTHONPATH=$PYTHONPATH:<path/to/directory>/pystratIf you don't want to mess with your.bash_profileor.bashrc, just make sure that your code is in the same directory aspystrat-tutorial.ipynb.UsageA tutorial on how to use the main features ofpystratare included inpystrat-tutorial.ipynb.ContributingWe can makepystratbetter - feel free toraise an issueormake a pull request!
Package: pystrata
pyStrataSite response analyses implemented in Python. This Python packages aims
to implement many of the features found inStrata. These features include:Input motion characterization:Time seriesRandom vibration theoryWave propagation or site amplification:linearequivalent-linearequivalent-linear with frequency dependent propertiesquarter wavelengthNonlinear curve models:Predictive models:Darendeli (2001)Menq (2004)Kishida (2012)Curves:Vucetic & Dobry (1991)EPRI (1993)GEI (1983)GeoMatrix (1990)Idriss (1990)Imperial Valley SoilsIwasakiPeninsular RangeSeed & IdrissSite and soil property uncertainty:Toro (1994) Vs correlation modelG/Gmax and D uncertainty:Darendeli (2001)EPRI SPID (2013)Development of this software is on-going and any contributions are encouraged.
Previously namedpysra, but renamed after some sage and persistent advice to be
better associated withStrata.Installationpystratais available viapipand can be installed with:pip install pystrataIf you are usingcondaand a create apystrataspecific environmental make sure you installipykernelsandnb_conda_kernelsso that the environment is discoverable byJupyterwith:conda install ipykernel nb_conda_kernelsCitationPlease cite this software using the followingDOI.ExamplesThere are a variety of examples of usingpystratawithin theexamples
directory. An interactive Jupyter interface of these examples is available on.Historyv0.5.2 (2023-01-18)Fixed: Providing unsmoothed transfer function outputFixed: MenqSoilTypev0.5.1 (2022-09-22)Fixed: Correlation model from Toro. Previously used rho_0 instead of d_0, and the
wrong depthRenamed: BedrockDepthVariation to HalfSpaceDepthVariationFixed: HalfSpaceDepthVariation was removing the last layerv0.5.0 (2022-06-14)Renamed topyStrata.v0.4.11 (2020-03-31)Added: Depth dependent velocity variation modelAdded: Output plotting functionalityAdded: Ability to exclude soil type variation from bedrockv0.4.10 (2020-03-27)Fixed: Error in SPID variation of G/GmaxAdded: Scaling during read of SMC and AT2 input motionsv0.4.9 (2020-03-09)Add InitialVelProfile and CompatVelProfile outputsv0.4.8 (2019-12-11)Remove Cython and cyko as dependenciesAdded a numba based Konno-Ohmachi smoothingv0.4.6 (2019-11-12)FIXED #11: Dependencies missing on install.v0.4.5 (2019-10-24)FIXED #9: Wrong stress for some Menq components.v0.4.4 (2019-05-22)Incremented version because of issue with automated builds.v0.4.3 (2019-05-22)FIXED: Bug in MANIFEST.inv0.4.2 (2019-05-22)Incremented version because of issue with automated builds.v0.4.1 (2019-05-22)Fixed strain profile to usemax_strain.Changed README and HISTORY to markdown.v0.4.0 (2019-03-11)Added smoothed FourierAmplitudeSpectrum output.v0.3.2 (2018-12-02)Fixed building of docs.Removed stickler.Version double increment due to pypi naming conflict.v0.3.0 (2018-11-30)Converted all damping to decimal.Added tests for KishidaSoilType.Added tests against Deepsoil.v0.0.1 (2016-04-30)First release on PyPI.
Package: pystrategy
pystrategyThis is the repository for pystrategy package.No docutils, pandoc, or any other tricks! Just aREADME.mdand asetup.py.See the source for this project here:https://github.com/faprieto96/pystrategy.Background:This project is possible thanks to the previous research and effort of the work developed by Francisco de Asís, ...... References of previous research papers can be find:Fernández-Navarro, F., Martínez-Nieto, L., Carbonero-Ruz, M., & Montero-Romero, T. (2021). Mean squared variance portfolio: A mixed-integer linear programming formulation. Mathematics, 9(3),http://dx.doi.org/10.3390/math9030223etcHow to install pystrategy?In your terminal windows:
>>> python 3 pip install pystrategyFunctions implemented:>>> import pystrategy
>>> py_strategy(StrTypes.STRATEGY, OptTypes.OPTIMIZATION, _str_params, _opt_params)And much much more!
Package: pystrava
Transparent authentication for Strava API. This library has been inspired byspotifylibas it uses a very similar
authentication flow.The idea is to use all features and methods fromstravalibbut handling the authentication transparently just by providing all required
details.It’s currently written for Strava V3 APIRead more onUSAGE.rstorRead the docsor check the code for substantial docstrings.FeaturesSame features as Stravalib’s library but with transparent authenticationRenew’s the token transparentlyHistory0.2.2 (2019-02-17)Fixed bug that getsredirects_uriFixed bug about relative imports0.2.1 (2019-02-12)Retrieve new access token if expired transparentlyLoggingDocs0.2.0 (2019-02-08)V3 API with refresh token0.1.2 (2018-08-22)Parsing code query string with built-in methods0.1.1 (2018-08-22)First release