Saravanan666/pypi-org huggingface dataset:
Package: participation
Routines for analysis and synthesis of RDF social participation data.
Idealized facilites include:Observance of expected stability and overall measures of each instance.Integration of data from a number of instances.Integration of data from a usual social platforms (Facebook, Twitter, LinkedIn).Recommendation of resources through topological and textual criteria, with explicit routines and potential uses.Synthesis of audiovisual artifacts to ease observation, probing and exploitation.Translation of participatory data to RDF.HTTP utilities, such as bootstrapping participatory ontologies or an access to resource recommendation routines.Public data, such as provided by the Gmane database or donated profiles from private networks (e.g. Facebook), or gathered by Twitter, can be incorporated as RDF in the Social Graph.Usage exampleimportparticipationasP# downloads Social Participation data from Participabr,# Cidade Democrática and AA from datahub.ioP.download()# The triplification routines are available:# accesses Participa.br data on PostgreSQL and save RDF Xml and TurtleP.triplification.ParticipaTriplification("dbname","username")# accesses Participa.br data on PostgreSQL and save RDF Xml and TurtleP.triplification.AATriplification("dbname","username","dbname2","username2","ircLog.txt")# accesses Participa.br data on PostgreSQL and save RDF Xml and TurtleP.triplification.OCDTriplify("dbname","username")# print number of users in each RDF graph# print number of incidences of each# print vocabularyimportsocialasS# To load GDF file:fg=S.GDFgraph("../data/RenatoFabbri06022014.gdf")# graph should be on fg.G# find posts by friends with similar names# To make an abstract animation with the overall network:song=S.FSong(fg.G,"fsong/",True,True,False,True)# Check mixedVideo.webm# Add information about users that are equivalent (through RDF).# make network with and without that information# Make recommendation based on a target resource# Make recommendation of percolatory method# Rise a flask instance, point an example meteor interface# more ***under construction***# Enjoy!
Package: participation-coefficient
Participation coefficientComputes the participation coefficient of nodes as defined by R. Guimera in the papers:Guimera, R., Mossa, S., Turtschi, A., & Amaral, L. N. (2005).
The worldwide air transportation network: Anomalous centrality, community structure, and cities' global roles. Proceedings of the National Academy of Sciences, 102(22), 7794-7799.andGuimera, R., & Amaral, L. A. N. (2005). Cartography of complex networks: modules and universal roles. Journal of Statistical Mechanics: Theory and Experiment, 2005(02), P02001.This is a meso level statistics requiring and depending on a community structure of the graph. Because community structures may not be stable, the routine iteratively calls the Leiden community finding algorithm before computing a ratio reflecting how much a node connects to other communities in a diverse manner.Installing and using the pluginThe library relies ontulip-python, a python binding of theC++ Graph Visualization framework Tulip. Tulip also comes as a GUI.Several libraries need to be installed prior to using the plugin, that can for instance be installed runningpoetry install --no-root. The specific dependencies are listed as part of thepyproject.tomlfile. A simple test script can optionally be run.The plugin itself is typically used as:# assuming a graph as already been defined
params = tlp.getDefaultPluginParameters('Participation Coefficient', graph)
community = graph.getIntegerProperty('community')
params['communities'] = community
particip = graph.getDoubleProperty('participation')
params['result'] = particip
graph.applyDoubleAlgorithm('Broker score', particip, params)Alternatively, the plugin may be used within the Tulip GUI after the script has been loaded and ran.
Package: particleman
Particle ManParticlemotionanalysis of seismic surface waves using the Stockwell Transform.DocumentationSeismic surface waves can be detected and extracted from three-component
data through particle motion polarization analysis.  Particle Man is a
software package that employs the Stockwell Transform to perform surface wave
filtering/extraction and display for multifrequency analysis.This package implements the Normalized Inner Product surface wave filtering and extraction methods ofMeza-Fajardo et al., (2015).
The Stockwell transform is implemented in C using FFTW libraries.InstallationPrerequisitesC compilerfftw3DependenciesPython 3NumPyMatplotlibUsing from a Conda environment.ymlTheenvironment.ymlfile will install everything you need into aparticlemanenvironment:conda env create -f environment.yml.  To install Particle Man into
an existing Conda environment, make sure you've got the dependencies you need installed
and available, and just usepipto install it from source.Manually on a Macgccfrom XCode should work fine.  Getting fttw3 is easy withhomebrew(brew install fftw)
or with Conda (conda install -c conda-forge fftw).To Particle Man install from source, just:pipinstall.
Package: particlepy
ParticlePyExamples•Documentation•PyPiA short library for easy to use particles in Pygame based onDaFluffyPotato'sparticle system.InstallationDependenciespygamenumpysetuptoolsSphinxsphinx_rtd_themeVersionsLatestPippipinstall--upgradeparticlepyGitgitclonehttps://github.com/grimmigerFuchs/ParticlePy.gitcdParticlePy/
pipinstall-rrequirements.txt
python3setup.pyinstallUsageThis is a short example of how to use this library. Examples can be found in theexamplesfolder.#!/usr/bin/env python3# example.pyimportpygameimportparticlepyimportsysimporttimeimportrandompygame.init()# pygame configSIZE=800,800screen=pygame.display.set_mode(SIZE)pygame.display.set_caption("ParticlePy example program")pygame.mouse.set_visible(False)# timingclock=pygame.time.Clock()FPS=60# delta timeold_time=time.time()delta_time=0# particle system to manage particlesparticle_system=particlepy.particle.ParticleSystem()# main loopwhileTrue:# quit windowforeventinpygame.event.get():ifevent.type==pygame.QUIT:pygame.quit()sys.exit()ifevent.type==pygame.KEYDOWN:ifevent.key==pygame.K_ESCAPE:pygame.quit()sys.exit()# delta timenow=time.time()delta_time=now-old_timeold_time=now# update particle propertiesparticle_system.update(delta_time=delta_time)print(len(particle_system.particles))# get mouse positionmouse_pos=pygame.mouse.get_pos()for_inrange(5):particle_system.emit(particlepy.particle.Particle(shape=particlepy.shape.Rect(radius=16,angle=random.randint(0,360),color=(3,80,111),alpha=255),position=mouse_pos,velocity=(random.uniform(-150,150),random.uniform(-150,150)),delta_radius=0.2))# color manipulationforparticleinparticle_system.particles:particle.shape.color=particlepy.math.fade_color(particle=particle,color=(83,150,181),progress=particle.inverted_progress)# render shapesparticle_system.make_shape()# post shape creation manipulationforparticleinparticle_system.particles:particle.shape.angle+=5# render particlesparticle_system.render(surface=screen)# update displaypygame.display.update()screen.fill((13,17,23))clock.tick(FPS)LicenseDistributed under theMIT License. SeeLICENSEfor more
information.ContactgrimmigerFuchs -grimmigerfuchs@gmail.comGithub:https://github.com/grimmigerFuchs/ParticlePyPyPi:https://pypi.org/project/particlepy/
Package: particles
particlesSequential Monte Carlo in python.MotivationThis package was developed to complement the following book:An introduction to Sequential Monte Carloby Nicolas Chopin and Omiros Papaspiliopoulos.It now also implements algorithms and methods introduced after the book was
published, see below.Featuresparticle filtering: bootstrap filter, guided filter, APF.resampling: multinomial, residual, stratified, systematic and SSP.possibility to definestate-space modelsusing some (basic) form of
probabilistic programming; see below for an example.SQMC(Sequential quasi Monte Carlo);  routines for computing the Hilbert curve,
and generating RQMC sequences.FFBS (forward filtering backward sampling): standard, O(N^2) variant, and
faster variants based on either MCMC, pure rejection, or the hybrid scheme;
see Dau & Chopin (2022) for a discussion. The QMC version of Gerber and
Chopin (2017, Bernoulli) is also implemented.other smoothing algorithms: fixed-lag smoothing, on-line smoothing,
two-filter smoothing (O(N) and O(N^2) variants).Exact filtering/smoothing algorithms:Kalman(for linear Gaussian models)
andforward-backward recursions(for finite hidden Markov models).Standard and waste-free SMC samplers: SMC tempering, IBIS (a.k.a. data
tempering). SMC samplers for binary words (Schäfer and Chopin, 2014), with
application tovariable selection.Bayesian parameter inference for state-space models:PMCMC(PMMH, Particle Gibbs)
andSMC^2.Basic support forparallel computation(i.e. running multiple SMC algorithms
on different CPU cores).Variance estimators(Chan and Lai, 2013 ; Lee and Whiteley, 2018; Olsson
and Douc, 2019).nested sampling: both the vanilla version and the SMC sampler of Salomone
et al (2018).ExampleHere is how you may define a parametric state-space model:importparticlesimportparticles.state_space_modelsasssmimportparticles.distributionsasdistsclassToySSM(ssm.StateSpaceModel):defPX0(self):# Distribution of X_0returndists.Normal()# X_0 ~ N(0, 1)defPX(self,t,xp):# Distribution of X_t given X_{t-1}returndists.Normal(loc=xp)# X_t ~ N( X_{t-1}, 1)defPY(self,t,xp,x):# Distribution of Y_t given X_t (and X_{t-1})returndists.Normal(loc=x,scale=self.sigma)# Y_t ~ N(X_t, sigma^2)You may now choose a particular model within this class, and simulate data from it:my_model=ToySSM(sigma=0.2)x,y=my_model.simulate(200)# sample size is 200To run a bootstrap particle filter for this model and datay, simply do:alg=particles.SMC(fk=ssm.Bootstrap(ssm=my_model,data=y),N=200)alg.run()That's it! Head to thedocumentationfor more examples, explanations, and installation instructions.Who do I talk to?Nicolas Chopin (nicolas.chopin@ensae.fr) is the main author, contributor, and
person to blame if things do not work as expected.Bug reports, feature requests, questions, rants, etc are welcome, preferably
on the github page.
Package: particlescv2
particlescv2particlescv2 is a port of the Particles Python PyGame library PyIgniton for
OpenCV2. The original PyIgntion files can be found athttps://launchpad.net/pyignitionThe original repository for particlescv2 is at:
Githubhttps://github.com/bunkahle/particlescv2Setup the library by running setup_cython.py:setup_cython.py build_ext --inplaceThis will generate a compiled cythonized particlescv2.pyd (Windows) or particlescv2.so (Linux, Mac)
from the file particlescv2.pyx. This is useful for speed and performance.
particlescv2 seems to be even faster than the original PyGame library PyIgnition.The library is pretty fast even if it is not compiled. The plain Python
routine can be found in particlescv2.py.Binary for Win-32 Python27For convenience there is also the precompiled binary for Win-32 Python 2.7
included: particlescv2.pyd. Copy this file to Lib/site-packages directory
and you are ready to go:import particlescv2
... your codeExamplesThere are several examples for running the library in the Examples section.RequirementsThe code currently only runs under Python 2.7. Ports to Python 3 are welcome.
If you want to compile the pyx file with cython you also need cython of course.
The blist is required for running as well as numpy and opencv2.
These libraries can easily be installed withpip install numpy
pip install blist
pip install opencv-pythonoptionally
pip install cythonopencv2 and numpy windows binaries and setup wheels can also be downloaded from
Christoph Gohlkes Python page for windows:https://www.lfd.uci.edu/~gohlke/pythonlibs/Changes1.0 initial release for Python21.1 routine now also runs in Python3, removed old cv2 SyntaxLicenseSame license as PyIgntion: GNU GPL v3
Package: particleShear
particleShear
Python package for particle shear simulationThis package provides a discrete particle simulation kit for having multiple spheres interacting. The spheres (i.e. 2D circles) interact by mutual elastic repulsion and tangential friction upon contact, but can also be crosslinked together. In addition to the elementary implementation of the interacting particles, it is also possible to define rheological experiments where the spheres are exposed to sinusoidally varying displacement conditions on the boundaries.Acknowledgement: Thanks from the author (Thomas Braschler) go to Fabien Bonini and Joé Brefie-Guth for package testing, and to Daniel Lyobenov for initial help with simulation setup.
Package: particleShield
particleShieldparticleShield is a Python library designed to facilitate radiation shielding calculations. It provides a set of functions and utilities to determine the amount of radiation absorbed by different shielding materials for different types of radiation.FeaturesThis Python code provides a set of functions to perform various calculations related to radiation physics, including:Half-value layer (HVL) calculationBuildup factor calculationDose rate calculationRadiation attenuation calculationBethe-Bloch equation for energy lossBragg curve generationRequirementsPython 3.7NumPyMatplotlibInstallationMake sure you have Python 3.7 installed on your system.Install the required dependencies by running the following command:pipnumpyasnp,matplotlib.pyplotaspltDownload the particleShield library and import it in your project.UsageThe package can then be imported using:importparticleShieldIonizing RadiationparticleShield provides multiple functions for calculation of radiation protection and dosimetry for different types of ionizing radiation.#Calculate the half-value layerhvl=particleShield.calculate_hvl(initial_intensity,attenuation_factor)#Calculate the buildup factorbuildup_factor=particleShield.calculate_buildup_factor(penetration_depth,attenuation_factor)#Calculate the dose ratedose_rate=particleShield.calculate_dose_rate(intensity,conversion_factor,time,distance)#Calculate radiation attenuationattenuated_intensity=particleShield.calculate_attenuation(I0,mu,x)Beth-Bloch equationThe Bethe-Bloch equation is used to calculate the energy loss of charged particles (e.g., electrons, protons, alpha particles) as they pass through a material. It describes how these particles lose energy through ionization and excitation of atoms in the material.#Calculate energy loss using the Bethe-Bloch equation for Protons in Airkinetic_energy=100# MeVcharge=1# Elementary charge unitsatomic_mass=28.09# g/molatomic_number=14ionization_potential=78# eVenergy_loss=bethe_bloch(kinetic_energy,charge,atomic_mass,atomic_number,ionization_potential)print("Energy Loss:",energy_loss,"MeV/cm")Output: Energy Loss: -4.297 MeV/cmBragg CurveThe Bragg curve is a graphical representation that illustrates how the energy deposition of charged particles varies with depth as they traverse a material.#Generate the Bragg curve for protons in airalpha=0.1666# MeV/(g/cm^2)p=1.76# g/cm^2shallowest_depth=10.0# cmdeepest_depth=15.0# cmgenerate_bragg_curve(alpha,p,shallowest_depth,deepest_depth)Bragg curve for protons in air:
Package: particletools
particletoolsThis single Python module around an XML data file provides some convenient functions for people
working with properties of physical particles (protons, pions, D-mesons, etc.)StatusThis version is stable.DocumentationThe latest version of the documentation can be foundhere.RequirementsThe package is universal and should work with all Python versions above 2.7.Installationpip install particletoolsQuickstartThe purpose of this tools is to provide library-like features to convert
particle names into PDG IDs, the particle codes of some common event generators, or to obtain their masses and decay channels. The below example demonstrates
how to look up the branching ratios of some particle.fromparticletools.tablesimportprint_decay_channelsprint_decay_channels(221)eta decays into:
        39.3824%, gamma, gamma
        32.512%, pi0, pi0, pi0
        22.7%, pi+, pi-, pi0
        4.69%, pi+, pi-, gamma
        0.6%, gamma, e-, e+
        0.044%, pi0, gamma, gamma
        0.04%, pi+, pi-, e-, e+
        0.031%, gamma, mu-, mu+
        0.0006%, mu-, mu+ContributorsHans Dembinski (github:HDembinski)Sonia El Hadri (github:soso128)MIT LicenseCode and documentation copyright 2015-2020 Anatoli Fedynitch
Package: particle-tracking
Particle TrackingPackage that performs tracking of colloidal particles in2D. Based on conventional tracking methods used inthis paper. This is version based on a tracking code written in R (seeRepo). NOTE: other available packages, such asTrackpy, allow particle tracking in 2D & 3D.InstallationUsepip install particle-trackingto simply install the code.Using the codethe simples way to run the code is busing ajupyer notebook. See templates insideparticle_tracking/example/. Start withimport particle_tracking as ptThe code has three main class objectsTracker,Linker&Filtering, which allow to detect particles, reconstruct individual trajectories (usingTrackpy's linking method, and filter trajectories respectively. Simply usept.Tracker()
pt.Linker()
pt.Filteringto access the main functions. NOTE: all of the class obejct above requireparams, a dictionary containing parameters to exceute the tracking methods. See the next section to learn how to generateparams.Interactive MenuThe code includes an interactive widget that allows to select and modify quickly the input parameters. Import the interactive menu usingfrom particle_tracking.src  import menus
menu = menus.MainMenu()
menu.optionsOnce the parameters are selected useparams = menus.return_params(menu.options.children)CharacterisationThe code includes extra tools to characterise the samples onced they have been tracked. Structural order and dynamics can be anylsed by means of $\psi_{6}$ and mean-squared displacements. For example,from particle_tracking.src.characterisation import Psi6
psi6 = Psi6()orfrom particle_tracking.src.characterisation import MSD
msd = MSD()
Package: particle-tracking-manager
particle-tracking-managerManager for particle tracking simulations.Project based on thecookiecutter science project template.InstallationInstall withpip install particle-tracking-managerorconda install -c conda-forge particle-tracking-managerTo install environment from github repo after cloning repo:conda env create -f environment.ymlTo install packages to run pre-commit:mamba install --file requirements-dev.txt
Package: particula
PARTICULAParticula is a simple aerosol particle simulator. It is designed to be easy to use and easy to extend. The goal is to have a robust aerosol (gas phaseandparticle phase) simulation system that can be used to answer scientific questions that arise in experiments and research endeavors.Goals & conductThe main goal is to develop an aerosol particle model that is usable, efficient, and productive. In this process, we all will learn developing models in Python and associated packages. Let us all be friendly, respectful, and nice to each other. Any code added to this repository is automatically owned by all. Please speak up if something (even if trivial) bothers you. Talking through things always helps. This is an open-source project, so feel free to contribute, however small or big your contribution may be.We follow the Google Python style guidehere. We have contribution guidelineshereand a code of conducthereas well.Usage & developmentThe development of this package will be illustrated through Jupyter notebooks (here) that will be put together in the form of a Jupyter book on ourwebsite. To use it, you can installparticulafrom PyPI or conda-forge withpip install particulaorconda install -c conda-forge particula, respectively.For development, you can fork this repository and then installparticulain an editable (-e) mode --- this is achieved bypip install -e ".[dev]"in the root of this repository. Invokingpip install -e ".[dev]"will installparticula, its runtime requirements, and the development and test requirements. The editable mode is useful because it allows seeing the manifestation of code edits globally through theparticulapackage in your environment (in a way, with the-emode,particulaself-updates to account for the latest local code edits).Tour & ExamplesStart here...
Package: partiell
partiellPartial argument application using....DescriptionAn enhanced version offunctools.partial()that
allows partially applying positional arguments from both the left and right
sides of the argument list.We use...(theEllipsisobject) as a placeholder in the argument list for
the arguments that arenotyet supplied. The object returned frompartial()also supports being called with...for further partial application.Usepartialas a function decorator (@partial) to make a function
automatically support partial argument application with....UsageAs a drop-in replacement forfunctools.partial():>>>frompartiellimportpartial>>>fromoperatorimportmul,truediv>>>double=partial(mul,2)# same as functools.partial()>>>double(5)10>>>halve=partial(truediv,...,2)# functools.partial() cannot do this>>>halve(3)1.5As a function decorator to enable smoother partial function application:>>>@partial...deff(x,y,z):...returnx*100+y*10+zf()can now be called with...for partial function application:>>>g=f(1,...)# Supply first argument only (x)>>>g(2,3)# Supply the two remaining arguments (y, z)123Functions derived fromf()automatically support...themselves:>>>h=g(2,...)# Supply g's first argument (y)>>>h(3)# Supply the final argument (z)123Using the...placeholder also allows supplying arguments right-to-left:>>>i=f(...,3)# Supply last argument only (z)>>>i(1,2)# Supply the remaining arguments (x, y)123We can even supply arguments from both ends simultaneously:>>>j=f(1,...,3)# Supply first and last argument (x, z)>>>j(2)# Supply the remaining argument (y)123DiscussionUsing...as a placeholder for future function arguments allows for a
"functional light" programming style that is somewhere between the verbosity
of invoking partial() explicitly and the implicit currying provided by e.g.
the@currydecorator inPyMonad.The idea of using...as a placeholder for function arguments and having it
convert a function call into a partial function application is not new.
AFAICS, it was first discussed onpython-list in 2005, around the
timepartial()was first added to the Python standard library (PEP 309).InstallationRun the following to install:$pipinstallpartiellDevelopmentTo work on partiell, clonethis repo,
and run the following (in a virtualenv) to get everything you need to develop
and run tests:$pipinstall-e.[dev]Alternatively, if you are using Nix, simply use the bundledshell.nixto get
a development environment:$nix-shellUsenoxto run all tests (as defined innoxfile.py):$noxContributingMain development happens athttps://github.com/jherland/partiell/.
Post issues and PRs there.