Saravanan666/pypi-org huggingface dataset:
Package: simes
simes: Simple Encrypted Socket LibraryOverviewsimesis a Python library designed to facilitate secure and easy-to-use encrypted communication over sockets. It provides a suite of tools for encrypting and decrypting messages sent over TCP/IP, ensuring that your data remains private and secure during transmission.FeaturesAES Encryption: Utilizes Advanced Encryption Standard (AES) in CBC mode for strong encryption.Automatic Padding: Handles padding of messages to fit block size requirements.IV Management: Securely generates and manages Initialization Vectors (IVs) for each encryption operation.Key Management: Offers a simple interface for managing encryption keys.Error Handling: Robust error handling for common issues like message size limits and unknown senders.Socket Communication: Seamlessly integrates with Python'ssocketmodule for network communications.InstallationTo installsimes, you can simply use pip:pipinstallsimesUsageHere's a quick example to get you started withsimes:Encrypting and Sending a MessageimportsocketfromsimesimportsendEncryptedJSON# Setup socket and keysock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)key=b'secret_key_16_byte'# Encrypt and send a messagedata={"message":"Hello, World!"}sendEncryptedJSON(sock,'sender_name',data,key)Receiving and Decrypting a MessagefromsimesimportreceiveEncryptedJSON# Assuming 'sock' is a socket objectkeys_dict={'sender_name':b'secret_key_16_byte'}sender,data=receiveEncryptedJSON(sock,keys_dict)print("Received message from",sender,":"data)Check the test directory for more examples.ContributingContributions tosimesare welcome!Licensesimesis released under theMIT License.
Package: simfaas
This is a project done inPACS Labaiming to develop a performance simulator for serverless computing
platforms. Using this simulator, we can calculate Quality of Service
(QoS) metrics like average response time, the average probability of
cold start, average running servers (directly reflecting average cost),
a histogram of different events, distribution of the number of servers
throughout time, and many other characteristics.The developed performance model can be used to debug/improve analytical
performance models, try new and improved management schema, or dig up a
whole lot of properties of a common modern scale-per-request serverless
platform.ArtifactsPyPi PackageGithub RepoReadTheDocs
Documentation(PDF)Examples(MyBinder Jupyter
Lab)Jupyter Notebook Docker
ImageRequirementsPython 3.6 or abovePIPInstallationInstall using pip:pipinstallsimfaasUpgrading using pip:pipinstallsimfaas--upgradeFor installation in development mode:gitclonehttps://github.com/pacslab/simfaascdsimfaaspipinstall-e.And in case you want to be able to execute the examples:pipinstall-rexamples/requirements.txtUsageA simple usage of the serverless simulator is shown in the following:fromsimfaas.ServerlessSimulatorimportServerlessSimulatorasSimsim=Sim(arrival_rate=0.9,warm_service_rate=1/1.991,cold_service_rate=1/2.244,expiration_threshold=600,max_time=1e6)sim.generate_trace(debug_print=False,progress=True)sim.print_trace_results()Which prints an output similar to the following:100%|██████████| 1000000/1000000 [00:42<00:00, 23410.45it/s]
Cold Starts / total requests:    1213 / 898469
Cold Start Probability:          0.0014
Rejection / total requests:      0 / 898469
Rejection Probability:           0.0000
Average Instance Life Span:      6335.1337
Average Server Count:            7.6612
Average Running Count:           1.7879
Average Idle Count:              5.8733Using this information, you can predict the behaviour of your system in
production.DevelopmentIn case you are interested in improving this work, you are always
welcome to open up a pull request. In case you need more details or
explanation, contact me.To get up and running with the environment, run the following after
installingAnaconda:condaenvcreate-fenvironment.ymlcondaactivatesimenvpipinstall-rrequirements.txtpipinstall-e.After updating the README.md, use the following to update the README.rst
accordingly:bash.travis/readme_prep.shExamplesSome of the possible use cases of the serverless performance simulator
are shown in theexamplesfolder in our Github repository.LicenseUnless otherwise specified:MIT (c) 2020 Nima Mahmoudi & Hamzeh KhazaeiCitationYou can find the paper with details of the simultor inPACS lab
website. You can use the
following bibtex entry for citing our work:Coming Soon...
Package: simfempy
SIMple Finite Element Methods in PYthonimportmatplotlib.pyplotaspltimportmatplotlib.gridspecasgridspecimportpygmshfromsimfempy.applications.heatimportHeatfromsimfempy.applications.problemdataimportProblemDatafromsimfempy.meshes.simplexmeshimportSimplexMeshfromsimfempy.meshesimportplotmesh,animdata# create meshh=0.1withpygmsh.geo.Geometry()asgeom:holes=[]rectangle=geom.add_rectangle(xmin=-1.5,xmax=-0.5,ymin=-1.5,ymax=-0.5,z=0,mesh_size=h)geom.add_physical(rectangle.surface,label="200")geom.add_physical(rectangle.lines,label="20")# required for correct boundary labels (!?)holes.append(rectangle)circle=geom.add_circle(x0=[0,0],radius=0.5,mesh_size=h,num_sections=6,make_surface=False)geom.add_physical(circle.curve_loop.curves,label="3000")holes.append(circle)p=geom.add_rectangle(xmin=-2,xmax=2,ymin=-2,ymax=2,z=0,mesh_size=h,holes=holes)geom.add_physical(p.surface,label="100")foriinrange(len(p.lines)):geom.add_physical(p.lines[i],label=f"{1000+i}")mesh=geom.generate_mesh()mesh=SimplexMesh(mesh=mesh)# create problem datadata=ProblemData()# boundary conditionsdata.bdrycond.set("Dirichlet",[1000,3000])data.bdrycond.set("Neumann",[1001,1002,1003])data.bdrycond.fct[1000]=lambdax,y,z:200data.bdrycond.fct[3000]=lambdax,y,z:320# postprocessdata.postproc.set(name='bdrymean_right',type='bdry_mean',colors=1001)data.postproc.set(name='bdrymean_left',type='bdry_mean',colors=1003)data.postproc.set(name='bdrymean_up',type='bdry_mean',colors=1002)data.postproc.set(name='bdrynflux',type='bdry_nflux',colors=[3000])# paramaters in equationdata.params.set_scal_cells("kheat",[100],0.001)data.params.set_scal_cells("kheat",[200],10.0)data.params.fct_glob["convection"]=["0","0.001"]# create applicationheat=Heat(mesh=mesh,problemdata=data,fem='p1')static=Trueifstatic:# run staticresult=heat.static()print(f"{result=}")# for p, v in result.data['global'].items(): print(f"{p}: {v}")fig=plt.figure(figsize=(10,8))fig.suptitle("Heat static",fontsize=16)outer=gridspec.GridSpec(1,2,wspace=0.2,hspace=0.2)plotmesh.meshWithBoundaries(heat.mesh,fig=fig,outer=outer[0])result.data.update({'cell':{'k':heat.kheatcell}})plotmesh.meshWithData(heat.mesh,data=result.data,alpha=0.5,fig=fig,outer=outer[1])plt.show()else:# run dynamicdata.params.fct_glob["initial_condition"]="200"t_final,dt,nframes=2500,10,50result=heat.dynamic(heat.initialCondition(),t_span=(0,t_final),nframes=nframes,dt=dt)# print(f"{result=}")nhalf=int(nframes/2)u=result.data['point']['U']fig=plt.figure(figsize=(10,8))fig.suptitle("Heat dynamic",fontsize=16)outer=gridspec.GridSpec(1,3,wspace=0.2,hspace=0.2)plotmesh.meshWithData(heat.mesh,title=f't={result.time[0]}',point_data={'u':u[0]},fig=fig,outer=outer[0])plotmesh.meshWithData(heat.mesh,title=f't={result.time[nhalf]}',point_data={'u':u[nhalf]},fig=fig,outer=outer[1])plotmesh.meshWithData(heat.mesh,title=f't={result.time[-1]}',point_data={'u':u[-1]},fig=fig,outer=outer[2])plt.show()postprocs=result.data['global']fori,kinenumerate(postprocs):plt.plot(result.time,postprocs[k],label=k)plt.legend()plt.grid()plt.show()anim=animdata.AnimData(mesh,u)plt.show()
Package: simfile
A modern simfile parsing & editing library for Python 3.Full documentation can be found onRead the Docs.FeaturesSupports both SM and SSC filesFormat-agnostic API for reading & writing simfilesSM ↔︎ SSC conversionTiming data supportBeat ↔︎ song time conversionHandles BPM changes, stops, delays and warpsAccepts "split timing" from SSC chartsNote streams from chartsAlgorithms for grouping jumps & hold/roll head/tail notesFlexible note counting functionsTiming data integrationFully typed, documented, and tested APIInstallationsimfileis available on PyPI:pip3installsimfileQuickstartLoad simfiles from disk usingsimfile.openorsimfile.load:>>>importsimfile>>>springtime=simfile.open('testdata/Springtime/Springtime.ssc')>>>springtime<SSCSimfile:Springtime>>>>withopen('testdata/nekonabe/nekonabe.sm','r')asinfile:...nekonabe=simfile.load(infile)...>>>nekonabe<SMSimfile:猫鍋>Use lowercase attributes to access most common properties:>>>springtime.artist'Kommisar'>>>springtime.banner'springbn.png'>>>springtime.subtitle='(edited)'>>>springtime<SSCSimfile:Springtime(edited)>Alternatively, use uppercase strings to access the underlying dictionary:>>>springtime['ARTIST']'Kommisar'>>>springtime['ARTIST']isspringtime.artistTrue>>>list(springtime.keys())[:7]['VERSION','TITLE','SUBTITLE','ARTIST','TITLETRANSLIT','SUBTITLETRANSLIT','ARTISTTRANSLIT']Charts are stored in a list under the.chartsattribute and function similarly to simfile objects:>>>len(springtime.charts)9>>>chart=springtime.charts[0]>>>chart<SSCChart:dance-singleChallenge12>>>>list(chart.keys())[:7]['CHARTNAME','STEPSTYPE','DESCRIPTION','CHARTSTYLE','DIFFICULTY','METER','RADARVALUES']Developingsimfileuses Pipenv for dependency management. Activate the environment:pipenvshellTo run the unit tests:py-munittestTo build the documentation:docs/makehtml
Package: simfire
SimFire Fire SimulatorIntroductionSimFire usesPyGameto display and simulate different fire spread models, including the Rothermel Surface fire spread model described inthispaper.For more comprehensive documentation, go to ourdocs page.Running the SimulationLeft: Fire simulated near Julian, CA. Right: Fire simulated near Reno, NV.Both fires have winds from the east at 20mphInstallsimfireby following theinstallation instructions. Then run therun_game.pyscript:pythonrun_game.pyRunning as a Python Modulefromsimfire.sim.simulationimportFireSimulationfromsimfire.utils.configimportConfigconfig=Config("configs/operational_config.yml")sim=FireSimulation(config)# Run a 1 hour simulationsim.run("1h")# Run the same simulation for 30 more minutessim.run("30m")# Render the next 2 hours of simulationsim.rendering=Truesim.run("2h")# Now save a GIF and fire spread graph from the last 2 hours of simulationsim.save_gif()sim.save_spread_graph()# Saved to the location specified in the config: simulation.sf_home# Update agents for display# (x, y, agent_id)agent_0=(5,5,0)agent_1=(5,5,1)agents=[agent_0,agent_1]# Create the agents on the displaysim.update_agent_positions(agents)# Loop through to move agentsforiinrange(5):agent_0=(5+i,5+i,0)agent_1=(5+i,5+i,1)# Update the agent positions on the simulationsim.update_agent_positions([agent_0,agent_1])# Run for 1 update stepsim.run(1)# Turn off rendering so the display disappears and the simulation continues to run in the# backgroundsim.rendering=FalseInstalling the PackagepipinstallsimfireContributingFor contributing, see theContribution Pagein ourdocs.CitationTo cite this software, use the “Cite this repository” link built into GitHub on the right.CopyrightCopyright ©2023 The MITRE Corporation. ALL RIGHTS RESERVED. Approved for Public Release; Distribution Unlimited. Public Release Case Number 22-3261.
Package: sim-fish
Sim-FISHSim-FISHis a python package tosimulate smFISH images. The package allows the user simulate and localize spots, cells and nuclei. The ultimate goal is to provide toy images toexperiment, train and evaluate smFISH statistical analysis.User can simulate images of spots and clusters with different level of noise...SpotsClustered  spots... or localization patterns within  subcellular regions.Perinuclear patternFoci patternInstallationDependenciesSim-FISH requires Python 3.6 or newer. Additionally, it has the following dependencies:big-fish (>= 0.6.1)joblib (>= 0.13.2)numpy (>= 1.16.0)scikit-image (>= 0.14.2)matplotlib (>= 3.0.2)pandas (>= 0.24.0)Virtual environmentTo avoid dependency conflicts, we recommend the the use of a dedicatedvirtualorcondaenvironment.  In a terminal run the command:condacreate-nsimfish_envpython=3.6sourceactivatesimfish_envWe recommend two options to then install Sim-FISH in your virtual environment.Download the package from PyPiUse the package managerpipto install Sim-FISH. In a terminal run the command:pipinstallsim-fishClone package from GithubClone the project'sGithub repositoryand install it manually with the following commands:gitclonegit@github.com:fish-quant/sim-fish.gitcdsim-fish
pipinstall.UsageSim-FISH provides a toolbox to simulate smFISH images. A completedocumentationis available online.This package is part of theFISH-Quantframework.SupportIf you have any question relative to the repository, please open anissue. You can also contactArthur Imbert.Roadmap (suggestion)Version 0.Y.0:Improve background noise simulation.Improve PSF simulation.Cell and nucleus simulation in 2D.Cell and nucleus simulation in 3D.Allow benchmark and valuation pipeline.Add simulation of colocalized spotsAdd examplesVersion 1.0.0:Complete code coverage.DevelopmentSource codeYou can access the latest sources with the commands:gitclonegit@github.com:fish-quant/sim-fish.gitcdsim-fish
gitcheckoutdevelopContributingPull requestsare welcome. For major changes, please open anissuefirst to discuss what you would like to change.TestingPlease make sure to update tests as appropriate if you open a pull request. You can install exacts dependencies and specific version ofpytestby running the following command:pipinstall-rrequirements_dev.txtTo perform unit tests, run :pytestsimfishCitationIf you exploit this package for your work, please cite:Arthur Imbert, Wei Ouyang, Adham Safieddine, Emeline Coleno, Christophe Zimmer, Edouard Bertrand, Thomas Walter, Florian Mueller. FISH-quant v2: a scalable and modular analysis tool for smFISH image analysis. bioRxiv (2021)https://doi.org/10.1101/2021.07.20.453024
Package: simfleet
SimFleetAgent-based fleet simulator to test strategiesFree software: MIT licenseDocumentation:https://simfleet.readthedocs.io.FeaturesOpen Fleets simulatorStrategy patternContinuous simulatorLoad scenariosMulti-agent system built withSPADEXMPP communicationsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.3 (2022-12-13)Update third-party libs1.0.2 (2021-02-14)Fixed bug with Vuex version1.0.1 (2019-11-07)SPADE and pandas version upgraded.Stop simulation fixed.Aesthetic changes.Minor bug fixes.Updated documentation.1.0.0 (2019-11-05)Moved from a taxi simulator to a generic fleet simulator.Updated documentation.Added support for different cities.Directory agent now sends all the info.Fixed bug of staying the corresponding time in the station when charging.Changed logger to loguru library.Removed fuel from transport popup, now is current_autonomy/max_autonomy.Concurrent charging in stations now allowed through TimeoutBehavior.Custom icons added.Removed agents introduction from GUI.Added specific parameters in scenario file (now config file).CLI simplified.Changed cli to config file.Control of free places and status for StationAgent.Fuel refill behavior between TransportAgent and StationAgent.Refactoring from passenger to CustomerRefactoring from taxi to TransportRefactoring from coordinator to fleet manager0.4.1 (2019-01-07)Fixed bug when checking if the simulation is finished.0.4.0 (2018-10-25)Improved the concurrent creation of agents.Added stop and clear buttons to the interface.Added download button for getting results in excel and json formats.Documentation updated.0.3.0 (2018-10-01)Migrated to SPADE 3.Documentation highly improved.Helper functions added and refined.Javascript framework included: VueJSRoutes centralized with a Route agent.UI improved.0.2 (2017-11-15)Added scenario loading feature.0.1.3 (2017-11-15)Fixed minor bugs.0.1.1 (2017-11-14)Added documentation.0.1.0 (2017-11-03)First release on PyPI.
Package: simflow
SimFlowUltra portable Deep Learning framework in NumpyLink to official Documentation :https://00arun00.github.io/SimFlow/Currently supported featuresLayers:Actication Functions:ReLUSigmoidTanhLeakyReLUSoftplusexpConvolutional Layers:Convolutional Neural netsDilated Convolutional LayerOther Layers:DenseBN_mean (mean only batch norm)Batch NormalizationLosses:SoftmaxCrossEntropyLossOptimizers:SGDMomentumNestrov MomentumRMSPropAdagradAdadeltaAdamIterators:Full batchMini batchStochasticData Loaders:MNISTInstallation stepspip install -r requirements.txtSample network/ How to useimportsimflowassfData,Labels=sf.data_loader_mnist.load_normalized_mnist_data_flat()inp_dim=784num_classes=10#create networknet=sf.Model()net.add_layer(sf.layers.Dense(inp_dim,200))net.add_layer(sf.layers.ReLU())net.add_layer(sf.layers.BN_mean(200))net.add_layer(sf.layers.Dense(200,num_classes))#add loss functionnet.set_loss_fn(sf.losses.SoftmaxCrossEntropyLoss())# add optimizernet.set_optimizer(sf.optimizers.SGD(lr=0.01,momentum=0.9,nestrov=True))# add iteratornet.set_iterator(sf.iterators.minibatch_iterator())# fit the training data for 5 epochsnet.fit(Data['train'],Labels['train'],epochs=5)# pring scores after trainingprint("Final Accuracies after training :")print("Train Accuracy: ",net.score(Data['train'],Labels['train'])[1],end=" ")print("validation Accuracy: ",net.score(Data['val'],Labels['val'])[1],end=' ')print("Test Accuracy: ",net.score(Data['test'],Labels['test'])[1])Features currently worked onLayers:dropoutmaxpool / average poolPReLURegularizers:L1L2elastic netOptimizersNadamAdamaxTesting Featuresrun the following command to check if all your layers are functionalpython -m pytest -vcurrently supportsDense LayerBN_mean LayerBN layerConv LayerdilatedConv Layer
Package: simframe
SimframeFramework for scientific simulationsSimframeis a Python framework to facilitate scientific simulations. The scope of the software is to provide a framework which can hold data fields, which can be used to integrate differential equations, and which can read and write data files.Data fields are stored in modifiednumpy.ndarrays. Therefore,Simframecan only work with data, that can be stored inNumPyarrays.Installationpip install simframeDocumentationhttps://simframe.readthedocs.io/1. Simple Integration2. Advanced Integration3. Updating Groups and Fields4. Custom Integration Schemes5. Adaptive Integration Schemes6. Implicit IntegrationExample: Coupled OscillatorsExample: Double PendulumExample: Compartmental ModelsModule ReferenceContributingTo contribute to the software, please read thecontribution guidelines.CitationIf you useSimframe, please remember to citeStammler & Birnstiel (2022).@article{simframe,
  doi = {10.21105/joss.03882},
  url = {https://doi.org/10.21105/joss.03882},
  year = {2022},
  publisher = {The Open Journal},
  volume = {7},
  number = {69},
  pages = {3882},
  author = {Sebastian M. Stammler and Tilman Birnstiel},
  title = {Simframe: A Python Framework for Scientific Simulations},
  journal = {Journal of Open Source Software}
}Ackowledgementssimframehas received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme under grant agreement No 714769.simframewas developed at theUniversity Observatoryof theLudwig Maximilian University of Munich.
Package: simgen
Similarity based Molecular Generation (SiMGen)SiMGen is a local similarity based molecular generation method. It uses a pretrained MACE model to generate local molecular descriptors and a time-dependent similarity kernel to generate new molecules.SiMGen is available as an online web-tool athttps://zndraw.icp.uni-stuttgart.de/.InstallationThe package can be installed usingpip:pipinstallsimgenNote that the analysis code requires therdkitpackage, which is not installed by default. To install it, runpipinstallsimgen[all]UsageThere are two main ways to use the package: via a command line interface or interactively usingZnDraw.Interactive useWe host an online gpu-powered web-tool athttps://zndraw.icp.uni-stuttgart.de/. The documentation for the web-tool is availablehere.However, you can also run ZnDraw locally. After installing the package, you can run the following command to start the web-tool:zndraw--port1234PATH_TO_XYZ_FILE# Path is optional; Use --no-browser for remote servers# Do the next command in a separate terminalsimgenconnect--devicecuda# default port is 1234If you want to try out linker generation, add the--add-linkersflag to thesimgen connectcommand.Runsimgen connect --helpfor more information.[!TIP]
SiMGen uses themace-modelspackage to download data and the hydrogenation model. Downloading local copies can speed up your workflow. To do so, rungitclonehttps://github.com/RokasEl/MACE-ModelscdMACE-Models
dvcpull
simgeninit.# or simgen init /path/to/MACE-ModelsThis will set SiMGen's default path to the local MACE models.CLI useFor unconstrained generation, you can use the following command:pythonscripts/generate_mols_cli.py--save-pathPATH_TO_SAVE_MOLS\--num-molecules10\--num-heavy-atoms9\--track-trajectories\--prior-gaussian-covariance1.1.0.1# controls the shape of the priorTo construct molecules with more complicated shapes, you will have to manually define the shape via a point cloud prior. Seescripts/paper_examples/generate_macrocycles.pyfor an example.ReferencesIf you use SiMGen in your research, please cite the following paper:LicenseThe code is licensed under the MIT license. SeeLICENSEfor more information.
Package: simgen-ssg
What is simgen-ssg?simgen-ssgis a content recommendation engine tailored specifically for static sites. By leveraging vector search technology, it enables seamless integration of personalized 'you might also like' sections for your blog, FAQs, and various content-driven pages.Why simgen-ssg?Personalization: Tailor suggestions for a user-centric experience.Ease of Integration: Effortlessly implement recommendations into static sites.Engagement Boost: Enrich user experiences and increase engagement.Who is it for?Bloggers: Offer personalized 'you might also like' sections for blog posts, keeping readers engaged and on your site longer.Knowledge Base Enhancement: Implement 'similar articles' suggestions in FAQs or documentation pages, aiding users in finding relevant information quickly.Content Publishing Platforms: Enhance content discovery by suggesting related articles or posts, keeping users engaged and extending their browsing time.Portfolio Websites: Showcase similar projects or works to visitors, allowing them to explore related content based on their interests.Educational Websites: Offer 'you might also like' sections for courses or resources, aiding learners in discovering supplementary material.Community Forums: Facilitate the discovery of related threads or discussions, encouraging deeper engagement among users.Event or Conference Websites: Recommend similar events or sessions based on attendee preferences, optimizing their experience and participation.Recipe or Lifestyle Blogs: Suggest similar recipes or articles catering to specific user tastes or interests.Job Boards: Offer job recommendations based on user profiles or previous job searches, enhancing user experience and increasing the likelihood of finding suitable positions.Travel Websites: Recommend similar destinations, accommodations, or activities, making trip planning more personalized and engaging.How does it work?The project uses Qdrant vector database along withfastembedunder the hood to generate vector embeddings for the chunks in your site. It then provides an API to query the vector embeddings across the database to generate related content recommendations.How do I use it?InstallationDev environmentInstall the package usingpip install simgen-ssgRun the server using `simgen-ssg