Saravanan666/pypi-org huggingface dataset:
Package: py-steam-web-api
DescriptionThis project is entirely based on theSteam Web API. You can find all the API information in the "all_api_info" folder, which includes both the APIs that require an API key and the ones that can be called without an API key. However, to ensure smooth usage, it is recommended that youapply for an API key. Currently, the project has only implemented a portion of the API functionalities that I deemed useful.Get startpipinstallpy-steam-web-apibasicfrompy_steam_web_api.apiimportSteamApis=SteamApi(key="xxxxxxxxxxxxxxxxxxxx")get user infou=s.user.get_user_info(steamid=76561198155349454)print(u.steamid,u.personaname)# 76561198155349454 nikeget friends# def get_friends(self, steamid: str) -> list[User]u=s.user.get_friends(steamid=76561198155349454)foriinu:print(i.steamid,i.personaname)# 76561198098262862 nike# 76561198400723672 aplay# 76561198417914571 Πget level# def get_level(self, steamid: int) -> int:a=s.user.get_level(steamid=76561198155349454)print(a)# 45get recent played games#def get_recent_played_games(self, steamid: int) -> list[Game]:a=s.game.get_recent_played_games(steamid=76561198155349454)foriina:print(i.appid)# 271590# 1260320# 436150# 322330all#userdefget_user_info(self,steamid:int)->User:defget_friends(self,steamid:int)->list[User]:defget_badges(self,steamid:int)->list[Badge]:defget_level(self,steamid:int)->int:#gamedefget_recent_played_games(self,steamid:int)->list[Game]:defget_owned_games(self,steamid:int,include_appinfo=True)->list[Game]:defget_game_list(self,max_results=10000)->list[Game]:#statsdefget_number_of_current_players(self,appid:int)->dict:defget_player_achievements(self,appid:int,steamid:int)->dict:defget_schema_for_game(self,appid:int)->dict:defget_user_stats_for_game(self,appid:int,steamid:int)->dict:
Package: pysteg
pystegpysteg is a python library for image steganography.From Wikipedia:Steganography is the practice of concealing a message within another message or a physical object.In computing/electronic contexts, a computer file, message, image, or video is concealed within another file, message, image, or video.The word steganography comes from Greek steganographia, which combines the words steganós (στεγανός), meaning "covered or concealed", and -graphia (γραφή) meaning "writing".UsagePlease see usage_example.pyDependenciescryptography and imageioBuilt with poetryLicenseMIT
Package: pystegano
PyStegano - Steganography tools for PythonGetting itTo download pystegano, either fork this github repo or simply use Pypi via pip.$pipinstallpysteganoUsing itFirst, import PyStegano.importpysteganoAfter import this package, you could use these commands to get more detailed information about each function.help(pystegano.lsb)help(pystegano.lsb_grayscale)help(pystegano.ssb4_grayscale)help(pystegano.ssbn_grayscale)help(pystegano.dct)help(pystegano.fft)LicenseMIT LicenseCopyright (c) 2020Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: pystegy
stegy             -           Release 0.0.2a small steganography utility that inserts text messages into imageslets start !stegy=stegyImage()message="a secret message"filepath=stegy.encode(message)this code returnfilepathwith './data/result.pgn'
That randomly generated PNG-file contains your secret message.you can decode hidden message in './data/result.pgn' with :decoded  = stegy.decode(filepath)returndecodedstr containing :a secret messageoptionsdest :set the filepath of result by addingdestparameter to encodefilepath=stegy.encode(message,dest='./tmp/my.png')create PNG file according yourdestparameter
returnfilepathwith './tmp/my.png'src :give your own image file  by addingsrcparameter to encodefilepath=stegy.encode(message,src='./srcImage/boat.jpg')create PNG file according yourdestparameter
returnfilepathrelative to a downscaled PNG-file build from yoursrctopics :
this parameter is inactive ifscrparameter is set.
give a topic list for randomly choosen image ( str comma-separated)filepath=stegy.encode(message,topics='cat,boat')the generated PNG should represent either a 'cat' or a 'boat'key :
a key for message encryption (override default one)a png generated withkeyparameter can only be decoded with the samekey.filepath=stegy.encode("lorem ipsum sic dolores amet...",key='MySecretKey')decoded=stegy.decode(filepath,key='MySecretKey')Release Note v 0.0.2Added 2 exceptions on 'decode'NoMessageexception : if given image have no message in itBadKeyexception : if a message is found but the decode key doesn't fit.
Package: pystella
pystellaenables the easy expression of both PDE systems and the algorithms
to solve them in high-performance computing environments within Python.
It provides interfaces to generate custom computational kernels
vialoopywhich can then be executed
from Python on (multiple) CPUs or GPUs usingpyopenclandmpi4py.
Moreover,pystellaimplements a number of algorithms for PDE time evolution
and spatial discretization that can be readily applied to a variety of physical
systems.Its features include:code generation for performant element-wise kernels, stencil-based computations,
reductions, and histogramsdistributed domain decomposition and grid boundary sychronizationtime-stepping algorithms, including low-storage Runge-Kutta schemesfinite difference and spectral collocation methods for spatial derivativesa geometric multigrid solver for generic sets of nonlinear boundary-value problems
(in beta)wrappers to OpenCL-based Fast Fourier Transforms (FFTs) and distributed
CPU FFTsFourier space methods for field analysis and solving Poisson’s equationAll of the above functionality is configured to run at high performance by default,
as are the interfaces for generating custom kernels (though this is
entirely user-configurable!).
Additionally, the provided functionality is intended to work seamlessly whether
running in distributed- (i.e., multiple devices) or shared-memory
(i.e., a single device) contexts without sacrificing performance in either case.pystellawas designed to simulate preheating and gravitational wave production
after cosmological inflation and provides a simple way to specify models of this
process.
However,pystellais also designed to be sufficiently abstract as to provide a
good framework for most systems that can be discretized onto grids
(e.g., lattice field theory, (magneto)hydrodynamics, Einstein’s equations,
electromagnetism, etc.).
The preheating-specific components can be viewed as examples for the symbolic
representation of arbitrary physical systems as an interface to its code generation
routines.pystellaprovides entry points at varying levels of abstraction—so if you like
the idea ofpystellabut the algorithms you require are not implemented,
you can create new interfaces (or extend existing ones) for your purposes
with ease.
(Better yet, consider contributing a PR!)pystellaisfully documentedand is licensed under the liberalMIT license.
Package: pystem
Automatic segmentation of STEM imagesAutomatic segmentation of Scanning Transmission Electron Microscope (STEM) images with unsupervised machine learningLearning moreIf you want to learn more about this project, you may readour manuscriptthat is not yet completely finished, orour presentationfor BiGmax workshop 2020.Try it now:Getting StartedPrerequisitespython 3, numpy, scipy, scikit-learn, fftw3Installingvia conda, the simplest way, highly recommendedconda install -c conda-forge pystemvia pip1. First make sure that FFTW3 library is installed 
2. pip install pystemvia source code1. First make sure that FFTW3 library is installed 
then type commands:
git clone https://github.com/NingWang1990/pySTEM.git
cd pySTEM
python setup.py build
python setup.py install --userHow to useExamples can be found in the examples folder
Give it a try right now by simply clicking the 'launch binder' button
Package: pystematic
Pystematic is a lightweight framework that helps you to systematically setup and
run reproducible computational experiments in python.Main features:Standardizes how experiments and associated parameters are defined.Provides both CLI and programmatic interfaces for running your experiments.Encourages reproducibility by isolating experiment outputs and providing
tools for managing random seeds.QuickstartInstallationpystematic is available onpypi, and
can be installed with your package manager of choice.If using poetry:$ poetry add pystematicor with pip:$ pip install pystematicDefining and running experimentsExperiments and parameters are defined by decorating the main function of the
experiment. The following example defines an experiment namedhello_worldwith a single parametername:importpystematicasps@ps.parameter(name="name",help="The name to greet.",)@ps.experimentdefhello_world(params):print(f"Hello{params['name']}!")You can run the experiment either by supplying a dict containing the values for
the parameters:hello_world.run({"name":"World",})or you can run the experiment from the command line by invoking thecli()method of the experiment:if__name__=="__main__":hello_world.cli()Then from the terminal you simply run:$ python path/to/file.py --name "World"DocumentationFull documentation is available athttps://pystematic.readthedocs.io.ExtensionsFor running machine learning experiments in pytorch check out thepystematic-torchplugin.Related toolsOther related tools that might interest you:MLflow: a machine learning lifecycle platform.Hydra: a framework for
elegantly configuring complex applications.Click: Python composable command line interface toolkit.
Package: pystematic-torch
This is an extension topystematicthat adds functionality related to running machine learning experiments in
pytorch. Its main contribution is theContextobject and related classes.
Which provides an easy way to manage all pytorch related objects.InstallationAll you have to do for pystematic to find the plugin is to install it:$ pip install pystematic-torchExampleHere’s a small example that shows how using theContextobject,SmartDataLoaderandRecordersimplifies setting up and running a
training session in pytorch.importpystematic@pystematic.experimentdefcontext_example(params):ctx=pystematic.torch.Context()ctx.epoch=0ctx.recorder=pystematic.torch.Recorder()ctx.model=torch.nn.Sequential(torch.nn.Linear(2,1),torch.nn.Sigmoid())ctx.optimzer=torch.optim.SGD(ctx.model.parameters(),lr=0.01)# We use the smart dataloader so that batches are moved to# the correct devicectx.dataloader=pystematic.torch.SmartDataLoader(dataset=Dataset(),batch_size=2)ctx.loss_function=torch.nn.BCELoss()ctx.cuda()# Move everything to cuda# ctx.ddp() # and maybe distributed data-parallel?ifparams["checkpoint"]:# Load checkpointctx.load_state_dict(pystematic.torch.load_checkpoint(params["checkpoint"]))# Train one epochforinput,lblinctx.dataloader:# The smart dataloader makes sure the batch is placed on# the correct device.output=ctx.model(input)loss=ctx.loss_function(output,lbl)ctx.optimzer.zero_grad()loss.backward()ctx.optimzer.step()ctx.recorder.scalar("train/loss",loss)ctx.recorder.step()ctx.epoch+=1# Save checkpointpystematic.torch.save_checkpoint(ctx.state_dict(),id=ctx.epoch)DocumentationReference documentation is available athttps://pystematic-torch.readthedocs.io.
Package: pystencil
pystencilShort blurb about what your product does.One to two paragraph statement about your product and what it does.InstallationOS X & Linux:pip3installpystencilWindows:pipinstallpystencilUsage exampleA few motivating and useful examples of how your product can be used. Spice this up with code blocks and potentially more screenshots.For more examples and usage, please refer to theWiki.Development setupDescribe how to install all development dependencies and how to run an automated test-suite of some kind. Potentially do this for multiple platforms.pipinstall--editablepystencilDocumentation-Read the Docs-WikiMetaStephen R A King :stephen.ra.king@gmail.comDistributed under the MIT license. Seelicensefor more information.https://github.com/Stephen-RA-King/pystencil
Package: pystencils
pystencilsRun blazingly fast stencil codes on numpy arrays.pystencilsuses sympy to define stencil operations, that can be executed on numpy arrays.
Exploiting the stencil structure makespystencilsrun faster than normal numpy code and even as Cython and numba,as demonstrated in this notebook.Here is a code snippet that computes the average of neighboring cells:importpystencilsaspsimportnumpyasnpf,g=ps.fields("f, g : [2D]")stencil=ps.Assignment(g[0,0],(f[1,0]+f[-1,0]+f[0,1]+f[0,-1])/4)kernel=ps.create_kernel(stencil).compile()f_arr=np.random.rand(1000,1000)g_arr=np.empty_like(f_arr)kernel(f=f_arr,g=g_arr)pystencilsis mostly used for numerical simulations using finite difference or finite volume methods.
It comes with automatic finite difference discretization for PDEs:importpystencilsaspsimportsympyasspc,v=ps.fields("c, v(2): [2D]")adv_diff_pde=ps.fd.transient(c)-ps.fd.diffusion(c,sp.symbols("D"))+ps.fd.advection(c,v)discretize=ps.fd.Discretization2ndOrder(dx=1,dt=0.01)discretization=discretize(adv_diff_pde)Installationpipinstallpystencils[interactive]Without[interactive]you get a minimal version with very little dependencies.All options:gpu: use this if an NVIDIA or AMD GPU is available and CUDA or ROCm is installedalltrafos: pulls in additional dependencies for loop simplification e.g. libislbench_db: functionality to store benchmark result in object databasesinteractive: installs dependencies to work in Jupyter including image I/O, plotting etc.doc: packages to build documentationOptions can be combined e.g.pipinstallpystencils[interactive,gpu,doc]pystencils is also fully compatible with Windows machines. If working with visual studio and cupy makes sure to run example files first to ensure that cupy can find the compiler's executable.DocumentationRead the docshereand
check out the Jupyter notebooks indoc/notebooks. TheChangelogof pystencils can be foundhere.AuthorsMany thanks go to thecontributorsof pystencils.Please cite usIf you use pystencils in a publication, please cite the following articles:Overview:M. Bauer et al, Code Generation for Massively Parallel Phase-Field Simulations. Association for Computing Machinery, 2019.https://doi.org/10.1145/3295500.3356186Performance Modelling:D. Ernst et al, Analytical performance estimation during code generation on modern GPUs. Journal of Parallel and Distributed Computing, 2023.https://doi.org/10.1016/j.jpdc.2022.11.003
Package: pystencils-autodiff
pystencils_autodiffThis repo adds automatic differentiation topystencils.InstallationInstall via pip:pipinstallpystencils-autodiffor if you downloaded thisrepositoryusing:pipinstall-e.Then, you can access the submodulepystencils.autodiff.importpystencils.autodiffUsageCreate apystencils.AssignmentCollectionwith pystencils:importsympyimportpystencilsz,y,x=pystencils.fields("z, y, x: [20,30]")forward_assignments=pystencils.AssignmentCollection({z[0,0]:x[0,0]*sympy.log(x[0,0]*y[0,0])})print(forward_assignments)Subexpressions:MainAssignments:z[0,0]←x_C*log(x_C*y_C)You can then obtain the corresponding backward assignments:frompystencils.autodiffimportAutoDiffOp,create_backward_assignmentsbackward_assignments=create_backward_assignments(forward_assignments)print(backward_assignments)You can see the derivatives with respective to the two inputs multiplied by the gradientdiffz_Cof the outputz_C.Subexpressions:MainAssignments:\hat{x}[0,0]←diffz_C*(log(x_C*y_C)+1)\hat{y}[0,0]←diffz_C*x_C/y_CYou can also use the classAutoDiffOpto obtain both the assignments (if you are curious) and auto-differentiable operations for Tensorflow…op=AutoDiffOp(forward_assignments)backward_assignments=op.backward_assignmentstensorflow_op=op.create_tensorflow_op(backend='tensorflow_native',use_cuda=True)… or Torch:torch_op=op.create_tensorflow_op(backend='torch_native',use_cuda=True)Test Report and Coveragehttps://i10git.cs.fau.de/pycodegen/pystencils_autodiff/-/jobs/299120/artifacts/browse
Package: pystencils-reco
pystencils_recopystencilsis a HPC code generation framework based on SymPy.
You can use it to generate C/C++ or CUDA for various frameworks includingwaLBerla, Torch, Tensorflow.This repository implements routines commonly needed for image processing and CT reconstruction.InstallationInstall via pip :pipinstallTODOor if you downloaded this repository using:pipinstall-e.UsageTODO. Have a look at thetests
Package: pystencils-walberla
pystencils-walberlaFormulate stencil kernels in pystencils and generate optimized C++ Code for waLBerla from it.
Look at the waLBerla documentation on how to use it.Install withpipinstallpystencils-walberlaand enable WALBERLA_BUILD_WITH_CODEGEN in waLBerla's CMake.
Package: pystepfunction
pystepfunctionsCreate AWS Stepfunction asl.json files (state machine definition files) using python.Pre-made tasks that are easy to use.Test dataflow through the stepfunction using the same python code.Visualise the stepfunction using pyvis for easier dubugging without the use of the AWS console.Docshttps://mrhopko.github.io/pystepfunction/pystepfunction/Installationpip3 install pystepfunctionComplete examplefromloggingimportgetLoggerfrompystepfunction.tasksimport(LambdaTask,GlueTask,PassTask,SucceedTask,FailTask,)frompystepfunction.branchimportBranchfrompystepfunction.vizimportBranchVizfrompystepfunction.stateimportStateMachinefrompystepfunction.errorsimportERROR_STATE_ALLlogger=getLogger(__name__)# create a lambda tasklambda_task=(LambdaTask("lambda_task",function_arn="aws::my-lambda-arn").with_retry(error_equals=[ERROR_STATE_ALL],interval_seconds=1,max_attempts=3).with_catcher(error=[ERROR_STATE_ALL],task=FailTask("lambda_task_fail",cause="lambda task failed",error="MyLambdaError"),).with_resource_result({"Payload":{"Result":"LambdaResult"}}).with_output(result_path="$.LambdaTaskResult",result_selector={"SelectThis.$":"$.Payload.Result"},))# create a glue taskglue_task=(GlueTask("glue_task",job_name="my-glue-job-name",job_args={"job_input_arg.$":"$.LambdaTaskResult.SelectThis"},).with_catcher(error=[ERROR_STATE_ALL],task=FailTask("glue_task_fail",cause="glue task failed",error="MyGlueError"),).with_resource_result({"JobResult":"GlueResult"}).with_output(result_path="$.GlueTaskResult"))# chain them together and create a branchlambda_task=lambda_task>>glue_task>>SucceedTask("succeeded")branch=Branch(comment="Lambda and Glue",start_task=lambda_task)# view the aslprint(branch)# asl as a dictasl=branch.to_asl()# write the asl to a filebranch.write_asl("my_asl_file.asl.json")# visualise the aslBranchViz(branch).show()# create a state machinesm=StateMachine(state={"Input1":"Input1Value"},logger=logger)sm.apply_branch(branch)sm.show_logs()
Package: pysteps
pysteps - Python framework for short-term ensemble prediction systemsdocsstatuspackagecommunityWhat is pysteps?Pysteps is an open-source and community-driven Python library for probabilistic precipitation nowcasting, i.e. short-term ensemble prediction systems.The aim of pysteps is to serve two different needs. The first is to provide a modular and well-documented framework for researchers interested in developing new methods for nowcasting and stochastic space-time simulation of precipitation. The second aim is to offer a highly configurable and easily accessible platform for practitioners ranging from weather forecasters to hydrologists.The pysteps library supports standard input/output file formats and implements several optical flow methods as well as advanced stochastic generators to produce ensemble nowcasts. In addition, it includes tools for visualizing and post-processing the nowcasts and methods for deterministic, probabilistic, and neighbourhood forecast verification.Quick startUse pysteps to compute and plot a radar extrapolation nowcast in Google Colab withthis interactive notebook.InstallationThe recommended way to install pysteps is withcondafrom the conda-forge channel:$ conda install -c conda-forge pystepsMore details can be found in theinstallation guide.UsageHave a look at thegallery of examplesto get a good overview of what pysteps can do.For a more detailed description of all the available methods, check theAPI referencepage.Example dataA set of example radar data is available in a separate repository:pysteps-data.
More information on how to download and install them is availablehere.ContributionsWe welcome contributions!For feedback, suggestions for developments, and bug reports please use the dedicatedissues page.For more information, please read ourcontributors guidelines.Get in touchYou can get in touch with the pysteps community on ourpysteps slack.
To get access to it, you need to ask for an invitation or you can use thisautomatic invitation page.Reference publicationsThe overall library is described inPulkkinen, S., D. Nerini, A. Perez Hortal, C. Velasco-Forero, U. Germann,
A. Seed, and L. Foresti, 2019:  Pysteps:  an open-source Python library for
probabilistic precipitation nowcasting (v1.0).Geosci. Model Dev.,12 (10),
4185–4219, doi:10.5194/gmd-12-4185-2019.While the more recent blending module is described inImhoff, R.O., L. De Cruz, W. Dewettinck, C.C. Brauer, R. Uijlenhoet, K-J. van Heeringen,
C. Velasco-Forero, D. Nerini, M. Van Ginderachter, and A.H. Weerts, 2023:
Scale-dependent blending of ensemble rainfall nowcasts and NWP in the open-source
pysteps library.Q J R Meteorol Soc., 1-30,
doi:10.1002/qj.4461.Contributors