Saravanan666/pypi-org huggingface dataset:
Package: proc-monitoring
MonitorizaciónEste proyecto incluye un módulo empaquetado "proc_monitoring", el cual contiene métodos para enviar métricas hacia sistemas Kafka.RequisitosLos requisitos para instalar y ejecutar el proyecto son:Un IDE o un editor de código:IDE:PyCharmEditores de Código:Visual Studio Code,Notepad++,VIMUn entorno dePython 3.6.8mínimo con las siguientes librerías:PyYAMLrequestsparamikokafka-pythonlibrary-commonsSi se utiliza en Windows, también instalar los paquetes:win-inet-pythonOpcionalmente, si se requiere ejecutar un entorno local de kafka para realizar pruebas, se pueden utilizar las siguientes imágenes docker para construir el entorno:confluentinc/cp-zookeeperconfluentinc/cp-kafkaEn el directorio "docker" hay un fichero para construir el entorno local de kafka con docker.InstalaciónPara instalar el programa localmente o en un Linux remoto:Descargar o clonar el proyecto desde el repositorio.Asegurarse de tener un entorno de Python funcional con la versión requerida y los paquetes necesarios.Activar el entorno de Python que fue creado.Instalar el módulo ejecutando este comando en la ruta del proyecto:pythonsetup.pyinstallSe puede instalar docker y ejecutar el comandodocker-compose upen el directorio "docker" para crear un entorno de pruebas con Kafka instalado y así depurar fallos en el envío de métricas a Kafka.ConfigurationLos argumentos para linea de comandos del script principalexecutor.pyson:-cf/--config-file: Describe los nodos lanzados en la ejecución y su configuración.-w/--whatif: Si se establece, el script se ejecutará normalmente pero no cambiará ningún dato persistente.-i/--info: Si se establece, mostrará en pantalla la información de cada uno de los pasos del lanzamiento del script.-d/--debug: Si se establece, aumentará el nivel de información mostrada en pantalla, generalmente solo se usa para depurar errores.-h/--help: Muestra un mensage de ayuda del script.Para configurar los nodos a monitorizar o modificar el servidor Kafka al que se envían las métricas, modificar el ficheroconfiguration.yaml.
Este fichero está dividido en 3 objetos principales, "nodos", "argumentos" y "conexiones":Nodos(nodes): En esta sección los nodos son declarados y configurados. Para añadir un nodo, simplemente añadir una entrada a la lista de nodos, con el parámetrotypeespecificando el nombre completo de la clase a la que debería de ser instanciada, y el parámetroargsespecificando el diccionario de argumentos que se pasaría a la clase. Cada tipo de nodo que se defina en un futuro, debería de estar documentado en el directoriodocs.Argumentos(args): En esta sección los argumentos son creados y definidos. El valor de estos argumentos, es obtenido posteriormente desde la clase nodo concreta para ser utilizado.Conexiones(connection_refs): En esta sección se definen las conexiones necesarias para recabar métricas y enviarlas, como por ejemplo, la uri de la API de NSX y sus credenciales, o la IP del servidor Kafka al que se van a envíar las métricas. Posteriormente se accede a estás conexiones definidas desde la secciónargsde cada nodo.
Package: procobserver
Uses psutil to observe/log processes during a certain timepip install procobserverfromprocobserverimportobserve_procsdf=observe_procs(executables=("Vpn.exe",),# list or tuple of exe files (not the whole path!)pids=(5800,18166),# list or tuple of pidspickle_output_path="f:\\picklefileobj.pkl",# If None, nothing will be saved to your HDDsleeptime=0.2,# sleep between each scantimeout=30,# If timeout is None, you have to press ctrl+c)# Press ctrl+c to stop the observationOut[2]:'\n^CStopping observation ...dfOut[3]:0num_handles...aa_localtime0484...1.678241e+091604...1.678241e+092870...1.678241e+0931336...1.678241e+094419...1.678241e+095484...1.678241e+096604...1.678241e+097870...1.678241e+0981336...1.678241e+099419...1.678241e+09[10rowsx28columns]
Package: procon
proconprocon is an extension to the popular pm4py process mining library with the goal to enable conformance checking on BPMN models.
Assume you have an advanced BPMN 2.0 model, maybe with cancellation features, and you have gathered event data, e.g., from your
ERP or CRM system. You are very likely interested to see how well the real worl process behavior matches the desired process model.
procon gives you the opportunity to do that with only a few lines of Python code!Installationprocon can be installed on Python 3.7.x / 3.8.x / 3.9.x by doing:pipinstall-UproconExampleThe following example shows you how to import a bpmn model and an event log to then derive conformance statistics based on them.importosimportprocon# IMPORTANT: In case you want to make use of parallel programming, you need to encapsulate the conformance checking# code inside a __name__ == '__main__' guardif__name__=='__main__':# import .bpmn filebpmn_graph=procon.import_bpmn(os.path.join("test_data","example.bpmn"))# import event log as a dataframedf=procon.import_event_log(os.path.join("test_data","example.xes"))# alternatively, you can directly import a dataframe via pandas# for more info see https://pm4py.fit.fraunhofer.de/documentation#importingparameters={}# should boundary events be treated as labelled activities?parameters['include_events']=True# derive alignemnts between event log and modelalignments=procon.compute_alignments(df,bpmn_graph,parameters=parameters)# ideally, you save the alignments object in some file via pickle in case you do not want to wait the whole time again ;-)# import pickle# file_pi = open(os.path.join("path", "to", "alignments.obj"), 'wb')# pickle.dump(alignments, file_pi)# finally, derive conformance statistics from the alignmentsres=procon.derive_statistics(alignments,df,bpmn_graph,parameters=parameters)# save the resulting dataframe to a csv file on your machineres.to_csv(os.path.join("conformance-result.csv"))Input BPMN model:Output Table:The meaning of the columns is as follows:Index/Activity: Name of the activityOccurrences: Total occurrences of the activity in the event logCorrect: Number of times the activity appeared at the desired point in time according to the process modelWrong Position: Number of times the activity appeared in a case in an undesired orderMissing: Number of times the activity was completely missing in a case although it was expected to appear
Package: procore
Procore Python SDKPython SDK for accessing Procore APIs.InstallationThis project requiresPython 3+andRequestslibrary (pip install requests).Download this project and use it (copy it in your project, etc).Install it frompip.$ pip install procoreUsageTo use this SDK you'll need these Procore credentials used for OAuth2 authentication:client ID,client secretandrefresh token. Visithttps://developers.procore.comto setup Procore developer accountThis SDK is very easy to use.First you'll need to create a connection using the main class Procore.fromprocoreimportProcore,WrongParamsErrorconnection=Procore(login_url='LOGIN URL',base_url='BASE URL',client_id='PROCORE CLIENT ID',client_secret='PROCORE CLIENT SECRET',refresh_token='REFRESH TOKEN')companies=connection.companies.get()# Get All Companiescompany_id=companies[0]['id']projects=connection.projects.get(company_id=company_id)# Get All ProjectsSee more details about the usage into the wiki pages of this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: procpipe
Simple data processing pipelinesCreate simple data pipelines with sink/source modules that can
process or drop elements. Each pipeline step receives a dictionary
of metadata+data for the element, and it can add/remove fields
to the element, or terminate processing of the element.An example pipeline would be a generator (thesource) which reads image files from a directory, followed by a pipe that resizes each image, followed by a pipe that saves each image.StagesEach stage can contain asource, asink, or both. Sources generate elements, while sinks process and optionally drop elements from the pipeline.Source StageA source stage is defined by creating a subclass of 'Pipeline' class with a 'source' function at a minimum, as the example below.classArraySource(pipeline.Pipeline):def__init__(self,sink,arr):self.arr=arrsuper(ArraySource,self).__init__(sink)defsource(self):foriinrange(len(self.arr)):element={"word_id":i,"word":self.arr[i]}yield(element)Sink StageA sink stage is define by creating a subclass of 'Pipeline' class with a sink function at a minimum, as in the example belowclassDropSmallWord(pipeline.Pipeline):def__init__(self,sink,min):self.min=minsuper(DropSmallWord,self).__init__(sink)defsink(self,element):iflen(element['word'])<self.min:returnNoneelse:returnelementElementsElements are the units of data passed through the processing pipeline. An element is a dictionary that can contain any number of fields. Both data and meta-data about the data unit can be contained in the element.Creating the PipelineIn order to create a pipeline, the stages are created and linked to each other, starting from the final stage and working back to the source, as follows:pw=PrintWord(None)# Save imageds=DropSmallWord(pw,5)a=ArraySource(ds,words)As can be seen, the final stage is initiated withNoneas sink, while all other stages receive their subsequent stage as sinkExamplesLook in the examples subdirectory for these examplesfeeder.py: Feeds an array of words into a filter stage that drops small words, followed by a stage that prints the remaining wordsresizer.py: Reads image files from the command-line, passes them through a resizer stage, followed by an image-save stage.
Package: proc-plot
proc_plotQuick interactive trending of time series data for process control data analysis.UsageTo start, read process data into a pandas Dataframe.  It will work best if the column names in the dataframe are DCS tagnames e.g. FIC101.SP.  Next, let proc_plot know which dataframe to use and call the show() function to show the main window.%matplotlib qt
import matplotlib.pyplot as plt
import proc_plot
import pandas
df = pandas.read_excel('data.xlsx',parse_dates=True)
proc_plot.set_dataframe(df)
proc_plot.show()Grouping Rulesproc_plot uses regular expression rules to group tags that should be plotted on the same axis.
Seehelp(proc_plot.add_grouping_rule)for examples if you want to customise grouping rules.
Since v1.4, the function load_grouping_template() makes it easy to load preconfigured grouping rules for different kinds of data.  v1.4 includes templates 'ProfCon' and 'DMC'.%matplotlib magicThe intended use of proc_plot is to call it from a jupyter notebook.  The way the qt gui loop runs in jupyter is tricky and proc_plot includes logic to check which backend is used (plt.get_backend) to tell if the notebook is using%matplotlib qtor%matplotlib notebook.It is possible to switch the backend after the %matplotlib magic, if the backend is switched before proc_plot is imported then proc_plot could break the qt gui loop.  In previous versions of matplotlib I recommended using%matplotlib qt, and then switching the backend withplt.switch_backend('nbagg')after importing proc_plot if you want to use interactive notebook plots and proc_plot in the same notebook.In current versions of jupyter notebook and matplotlib, using%matplotlib notebookworks well.Show MeThe tool has a button "Show Me" that will show you python code to generate the current trend.  The code assumes your dataframe is calleddfand that you importedmatplotlib.pyplot as plt.
Package: procprotect
ProcProtect v0.1.15A package to protect your app from debugging, being run in a VM or dumping.+Info and usage:go to the wiki on the Github Pagehere.+Install:manuallyDownload the projectherecd in the project dir with the consolerun:pip install . --upgradeyour done!frompiprun:pip install procprotectyour done!author:@cookie0o on github
Package: procrastinate
Procrastinate: PostgreSQL-based Task Queue for PythonProcrastinate is looking foradditional maintainers!Procrastinate is an open-source Python 3.8+ distributed task processing
library, leveraging PostgreSQL to store task definitions, manage locks and
dispatch tasks. It can be used within both sync and async code and integrated
to Django.In other words, from your main code, you call specific functions (tasks) in a
special way and instead of being run on the spot, they're scheduled to
be run elsewhere, now or in the future.Here's an example (if you want to run the code yourself, head toQuickstart):# mycode.pyimportprocrastinate# Make an app in your codeapp=procrastinate.App(connector=procrastinate.SyncPsycopgConnector())# Then define tasks@app.task(queue="sums")defsum(a,b):withopen("myfile","w")asf:f.write(str(a+b))withapp.open():# Launch a jobsum.defer(a=3,b=5)# Somewhere in your program, run a worker (actually, it's usually a# different program than the one deferring jobs for execution)app.run_worker(queues=["sums"])The worker will run the job, which will create a text file
namedmyfilewith the result of the sum3 + 5(that's8).Similarly, from the command line:exportPROCRASTINATE_APP="mycode.app"# Launch a jobprocrastinatedefermycode.sum'{"a": 3, "b": 5}'# Run a workerprocrastinateworker-qsumsLastly, you can use Procrastinate asynchronously too (actually, it's the
recommended way to use it):importasyncioimportprocrastinate# Make an app in your codeapp=procrastinate.App(connector=procrastinate.PsycopgConnector())# Define tasks using coroutine functions@app.task(queue="sums")asyncdefsum(a,b):awaitasyncio.sleep(a+b)asyncwithapp.open_async():# Launch a jobawaitsum.defer_async(a=3,b=5)# Somewhere in your program, run a worker (actually, it's often a# different program than the one deferring jobs for execution)awaitapp.run_worker_async(queues=["sums"])There are quite a few interesting features that Procrastinate adds to the mix.
You can head to the Quickstart section for a general tour or
to the How-To sections for specific features. The Discussion
section should hopefully answer your questions. Otherwise,
feel free to open anissue.Note to my future self: add a quick note here on why this project is named"Procrastinate" ;) .% Below this line is content specific to the README that will not appear in the doc.% end-of-index-docWhere to go from hereThe completedocsis probably the best place to learn about the project.If you encounter a bug, or want to get in touch, you're always welcome to open aticket.
Package: procrust
procrustLimit the time you procrastinate by blocking websites via the hosts file.UsageEdit block listOpen the list of host names to block when not procrastinating for editing:procrust editAdd one host name per line.Start and stop procrastinatingWhen you start and stop procrastinating the hosts file will be changed, so you need to run the command with root privileges. If you ran theeditcommand withoutsudoyou need to preserve the environment with the-Eoption.sudo -E procrust start

sudo -E procrust stopInstallationInstall theprocrustcommand globally so it is accessible by the root user.git clone https://github.com/yaph/procrust.git
cd procrust
sudo python3 setup.py installAuthorsprocrustwas written byRamiro Gómez.
Package: procrustes
Procrustes is a validation library, suitable for validating user input data,
i.e. web forms or API calls. With procrustes you can validate any structure.For doing this procrustes has three container classes - Tuple, List and Dict.
Tuple come from FP, has fixed count of elements with fixed types.
List can include any amount of values of one type.
And Dict is a dict.Procrustes consist of validators and forms. You can use validators without
forms functionality. Forms adds mainly widgets and form data parsing.ValidatorsMost simple what you can to do with procrustes is build validator and use it:>>> from procrustes import validators as v
>>> two_strings_v = v.Tuple(v.String(), v.String())
>>> auth = two_strings_v(['login', 'password'])
>>> auth.data
('login', 'password')
>>> auth.errors
[]
>>> auth = two_strings_v(['login'])
>>> auth.data
>>> auth.errors
['Must be iterable of length 2']We have very powerfulList:>>> list_of_pairs_v = v.List(two_strings_v)
>>> pairs = list_of_pairs_v([(str(x), str(x)) for x in xrange(10)])
>>> pairs.data
[('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8'), ('9', '9')]
>>> pairs.errors
[]List,TupleandDictare recursive, so you can build any data structure you want.Dictexample:>>> dict_v = v.Dict({'pair': two_strings_v, 'pairs': list_of_pairs_v})
>>> data = dict_v({'pair': ['a', 'b'], 'pairs': [['a', 'b'], ['c', 'd']]})
>>> data.data
{'pair': ('a', 'b'), 'pairs': [('a', 'b'), ('c', 'd')]}
>>> data.errors
[]Validators haverequiredkeyword argument:>>> two_strings_v = v.Tuple(v.String(), v.String(), required=False)
>>> dict_v = v.Dict({'pair': two_strings_v, 'pairs': list_of_pairs_v})
>>> data = dict_v({'pairs': [['a', 'b'], ['c', 'd']]})
>>> data.data
{'pair': None, 'pairs': [('a', 'b'), ('c', 'd')]}
>>> data.errors
[]FlatProcrustes canflatdata:>>> list(data.flatten())
[('pairs__0__0', 'a'), ('pairs__0__1', 'b'), ('pairs__1__0', 'c'), ('pairs__1__1', 'd')]And unflat it back:>>> dict_v.deepen(dict([('pairs__0__0', 'a'), ('pairs__0__1', 'b'), ('pairs__1__0', 'c'), ('pairs__1__1', 'd')]))
{'pair': (None, None), 'pairs': [('c', 'd'), ('a', 'b')]}FormsForms derived from validators and implemented as mixins to them. Every Field
can work as form. Your form may consist from oneforms.String().
In addition to validators forms adds methodswidgets,template_widgets,unflatandis_valid.
Package: procset
Toolkit to manage sets of closed intervals.procsetis a pure python module to manage sets of closed intervals. It can be
used as a small python library to manage sets of resources, and is especially
useful when writing schedulers.FeaturesFree Software: licensed under LGPLv3 (seeLICENSE.rst).Pure Python module :)Thoroughly tested!Drop-in replacement forinterval_set(seeintsetwrap.py).LimitationsThe provided implementation target only Python 3 (I do not want to maintain
old stuff :P).The intervals bounds have to be non-negative integers.Requirementssetuptools>=34.4.0Example useWhat does it look like to useprocset?  Here is a simple example program:fromprocsetimportProcSetfree_cores=ProcSet((0,7))# I have 8 cores to work withjob_cores=ProcSet((2,5))# let's use some cores for a jobfree_cores-=job_coresprint('remaining cores:',str(free_cores))And it looks like this when run:$pythonexample.pyremainingcores:0-16-7
Package: procsimulator
PROCSIMThe PROCSIM simulator is an open source python energy community simulator to develop and evaluate load balancing schemes designed to allow researchers of this field to easily create ECs datasets for multiple purposes as well as test and evaluate their load balancing strategies due to the existent lack of available datasets and also due to the hard task of evaluating and comparing such approaches. It uses a modular approach to allow researchers to reuse, replace or append new modules. The simulator includes integration with a consumption profiles generator, a tool to forecast weather data and a photovoltaic energy systems simulator. In addition, it contains a module which generates a synthetic dataset based on the other modules and a module which allows to implement the strategies. Finally, the simulator includes implementations of several energy-related metrics, which can be used to easily analyse the impact of the approaches in the communities.
The PROCSIM was created with two core use cases in mind. First, it should enable the creation of new ECs datasets completely customized according to the desired objective with different sizes (i.e. 1 week, 2 months, 1 year, etc), allowing them to be used for multiple purposes. Second, it should provide a simple interface for testing, evaluating and comparing load balancing algorithms, as well as assessing its generalization. In order to do that, the PROCSIM simulator was developed in Python due to the availability of a vast set of libraries for simulating both household consumption as well as pv and wind generation. Furthermore, Python is becoming more popular and is increasingly being used for data science due to its simplicity and flexibility.
Package: procstat
Procstat DocumentationThis library helps to count runtime metrics. For specific events you increment manually the
corresponding counters. By default the library dumps all counters into stderr each 3 seconds.
It also can display the speed of metric is changing.It also can dump metrics into influxdb, will be documented later, see source code for details.Installationpipinstall-UprocstatUsageimporttimefromprocstatimportStatstat=Stat(speed_keys=['foo','bar'])whileTrue:stat.inc('foo')# default increment is 1stat.inc('bar',100)stat.inc('baz',500)time.sleep(1)That code will produce output like:DEBUG:procstat:EPS: bar: 0.0, foo: 0.0 | TOTAL:
DEBUG:procstat:EPS: bar: 1.0, foo: 0.0+ | TOTAL: bar: 40, baz: 80, foo: 4
DEBUG:procstat:EPS: bar: 2.0, foo: 0.0+ | TOTAL: bar: 70, baz: 140, foo: 7
DEBUG:procstat:EPS: bar: 3.0, foo: 0.0+ | TOTAL: bar: 100, baz: 200, foo: 10
DEBUG:procstat:EPS: bar: 4.0, foo: 0.0+ | TOTAL: bar: 130, baz: 260, foo: 13
DEBUG:procstat:EPS: bar: 5.0, foo: 0.0+ | TOTAL: bar: 160, baz: 320, foo: 16
DEBUG:procstat:EPS: bar: 6.0, foo: 0.0+ | TOTAL: bar: 190, baz: 380, foo: 19
DEBUG:procstat:EPS: bar: 7.0, foo: 0.0+ | TOTAL: bar: 220, baz: 440, foo: 22
DEBUG:procstat:EPS: bar: 8.0, foo: 0.0+ | TOTAL: bar: 250, baz: 500, foo: 25
DEBUG:procstat:EPS: bar: 9.0, foo: 0.0+ | TOTAL: bar: 280, baz: 560, foo: 28
DEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 310, baz: 620, foo: 31
DEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 340, baz: 680, foo: 34
DEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 370, baz: 740, foo: 37
...
Package: procsync
A process synchronizer that, when receive a request, will check if have a origin of the data and distributes for N destinations.IntroductionThe motivation behind this project was the necessity of synchronize between two
MySQL databases.When pass the information to the other was necessary made some changes in the
value before add in the destination.Of course, if the synchronization was limited only to sync the fields we can
use the replication, but in the case was: When request the information to be
synchronize, we need get some fields and make some changes in the value before
add in the destination.IdeaHaving one unique value that identify the object, will send to a queue that the
application is looking searching for a row to process.When this row is inserted, the thread will check if have a origin that will
contain more specific information and send this informations for N destinations
registered.This step that was describe correspond a action to be execute that inside will
contain one origin to N destination.Available nowThread (Used to monitoring a request to be process)MySQL (Search in a table if have some row inserted)Connections (Used to send the command used in the origin/destination)MySQL (Execute query or stored procedure)Python script (Call a method or a class that have a method to call)Note:In the future, when have some demand for new types of threads or
connection, will be implemented and add here.How can I get more information?Please take a look in the source that will have a directory call docs and inside
have html files (start with README-FIRST.html) that will contain the explanation
necessary, if don’t please feel free to send the question that I be happy to
answer.RequirementsLinuxPython 2.6+python-daemon 1.5.5+mysql-python 1.2.2+lockfile 0.9.1+MySQLInstalationDownload the Source[here]Unpack itunzip Ozahata-procsync-{identify}.zipInstall itsudo python setup.py installConfigurePlease check the documentation for more details.UninstallJust remove manually the following files:rm -rvf /usr/local/bin/run_sync.py
rm -rvf /usr/local/lib/python2.X/dist-packages/procsync-0.*Note:The “X” means the version of python that you use.