Saravanan666/pypi-org huggingface dataset:
Package: pbshm-framework
PBSHM FrameworkThe PBSHM Framework is a preconfigured version of thePBSHM Coreand module ecosystem. The goal of the PBSHM Core, was to build a base application which facilitated the curation of PBSHM Modules which intern consumePBSHM Schemadata. The purpose of the PBSHM Framework is to provide a single packaged product of thePBSHM Schema,PBSHM Core, and any relevant PBSHM Modules: to showcase the available technology in an easy to use manner and enable anyone, regardless of their coding knowledge, to interact with the aforementioned technology.For more information on the PBSHM Core, please see theGitHub repository. Each module included within the PBSHM Framework is linkedbelow, with details of the module authors and any further information on how to use the module. For more information on how to create a module for PBSHM Core, please see themodule templaterepository.The minimum version of Python required to run the PBSHM Core is version 3.9.18.Included modulesBelow is a list of modules included within the framework and links to the corresponding repositories and guides.ModuleDescriptionAuthorRepoDocumentationpbshm-channel-toolboxA collection of tools to help processing channel datadsbrennandsbrennan/channel-toolsREADMEpbshm-ie-toolboxA collection of tools to help processing IE modelsdsbrennandsbrennan/ie-toolsREADMEpbshm-network-mcsAn implementation of the Jaccard Index and Maximum Common Subgraph to generate network similarity scores for a a given set of IE modelsjgosligadynamics-research-group/ag-mcsREADMEpbshm-ie-visualiserA 3D model builder for creating, editing, and viewing IE modelsjosiemccullochdynamics-research-group/pbshm-ie-model-builderREADMEInstallationInstall the package via pip:pip install pbshm-frameworkSetupSet the Flask application path and environment.For Linux/Mac:export FLASK_APP=pbshm
export FLASK_DEBUG=1For Windows:set FLASK_APP=pbshm
set FLASK_DEBUG=1Configure settings and initialise the database with a new root user:flask init config
flask init db new-root-userThe above steps will prompt you for all the required fields to set up the system.RunningThe application is run via the standard Flask command:flask runBug reportingIf you encounter any issues/bugs with the system or the instructions above, please raise an issue through theissues systemon GitHub.
Package: pbshm-ie-toolbox
PBSHM IE ToolkitThe PBSHM IE Toolkit is designed to help users interact and design IE models for use within thePBSHM Core. The toolkit enables IE models to be either created within the online text editor or upload existingPBSHM Schemacompliant JSON files.Each IE model is placed within a private users sandbox, each model then goes through two steps of varification. Step 1: Validate the syntax of the IE model against the latest version of thePBSHM Schema. Step 2: Validate that the logic of the IE model holds true (e.g if a grounded model, there should be at least one ground element).Once a model has passed both stages of validation, this model can then be included in the global IE model catalogue of the system.For more information about the syntax of an IE model, please read the documentation for thePBSHM Schema.InstallationInstall the package via pip:pip install pbshm-ie-toolboxSetupFirstly, configure the PBSHM Core by following theoutlined guideRunningThe application is run via the standard Flask command:flask runFile size issueIf you get an error when uploading a large IE model, you can add the following line of code into yourpbshm__init__.pyfile:# Change max content size to 16MB
app.config["MAX_CONTENT_LENGTH"] = 16 * 1000 * 1000
Package: pbshm-ie-visualiser
PBSHM IE VisualiserThe PBSHM IE Visualiser is designed to help users design and visualise IE models for use within thePBSHM Core. The visualiser enables IE models to be created in the online 3D model builder and then saved asPBSHM Schemacompliant JSON files in the database. Existing IE models within the database can either be viewed in a read-only online 3D tool or edited in the 3D model builder.For more information about the syntax of an IE model, please read the documentation for thePBSHM Schema.InstallationInstall the package via pip:pip install pbshm-ie-visualiserSetupFirstly, configure the PBSHM Core by following theoutlined guideRunningThe application is run via the standard Flask command:flask run
Package: pbshm-network-mcs
Network MCSThe Network MCS module uses the Jaccard Index with Maximum Common Subgraph to generate a similarity score between IE models in the PBSHM network. This module works within thePBSHM Coresoftware stack.Within this module, you can select any IE models that are loaded into your PBSHM database (given that they meet the specification outlined inPBSHM Schema) and generate a similarity matrix (1 = similar, 0 = dissimilar) for the selected models.This module was originally authored byDr Julian Gosligaand has then since been maintained and updated to work with thePBSHM Core.InstallationInstall the package via pip:pip install pbshm-network-mcsSetupFirstly, configure the PBSHM Core by following theoutlined guideRunningThe application is run via the standard Flask command:flask run
Package: pbsm
This work is inspired by Sven Havemanns work onGenerative Modelling.
The idea is to create a stack machine in Python that is minimalistic but easy to extended.Minimalisticmeans that it is boiled down to its bare minimum.
All the rest is down with extensions written in PythonSven has oriented himself at the Postscript interpreter and so is this state machine.
Because it is based on Python, there are a few differences to the Postscript stack machine:All objects on the stack are Python objects.Postscript uses()to denote strings.
PBSM uses the standard Python syntax for strings:',"or"""enclose a valid string.Postscript use`/`to push a literal on the stack. PBSM uses'instead.
This makes the syntax more consistent and uses less characters with special meaning.DatatypesPBSM uses standard object types of Python:int,float,string,boolandlist.
It introduces the following types:Markerto denote the start of a list/executable list.Symbolfor a symbolic name.Referencereferences a symbolProcedurerepresents an executable list.CommandsThe core interpreter comes with a few commands only.
These are:[together with]creates the a list.{together with}creates an executable list/a procedure.cvxconverts a list to an executable list/procedurecvlitconverts an executable list/procedure back to a normal/litaral listdefassigns a value to a symbol.execexecutes the object on the stack.markputs a mark on the stackcounttomarkcounts the elements on the stack up to the topmost markcleartomarkremoves all objects from the stack up to the topmost mark but not the mark itself.That’s it. All the rest is done with extensions.ExecutionThe stack machine maintains a stack of dictionaries in which the values of the symbols are stored.
Every extention can register a dictionary with name/object pairs.
Callable objects are executable.
The machine tries to resolve the symbol by looking in each of the dictionaries in a top-down fashen.
If it finds a value, it executes the value.Executionmeans:If the object is callable, it is called.If it is a symbol, the symbol is looked up and the process starts again recursively.All other objects are put on the stack.ExamplesList creation:[ 5.0 True "hello" ]Executable list creation:{ dup print }This is syntactial sugar for:[ 'dup 'print ] cvxProcedure definitaion:'average { 2 div } def
Package: pbsmonitor
PBSMonitorA PBS job monitor powered by CoolQ, which can send states of Portable Batch System to QQ.Author: Jinzhe ZengEmail:jzzeng@stu.ecnu.edu.cnInstallationWith pippipinstallpbsmonitorBuild from sourcegitclonehttps://github.com/njzjz/pbsmonitorcdpbsmonitor/
pipinstall.Simple exampleYou need to installCoolQandCoolQ HTTP API plugin. Then create a QQ group to reveive messages.pbsmonitor-cbjobs-kjzzeng-rhttp://192.168.1.1:6000-g123456789
Package: pbstool
PbstoolIntroductionA simple-to-use program for quickly batch creating job tasks based on the PBS job scheduling system (including OpenPBS, PBS Pro, and TORQUE) based on a command list.This application consists of two parts, pbstool is used to quickly create pbs job scripts, and qsubs is used to submit job scripts in batches.InstallFrom source codegitclonehttps://github.com/interestingcn/pbstool.gitcdpbstool
pipinstall.From PypipipinstallpbstoolUsagesQuick start# Create job scriptpbstool-ccmd.txt-njob_name-qcu# Submit them all!qsubspbstool: help informationUseage:pbstool<command>[options]Commands:-c/--cmdSetjobcommandlistpath.-n/--nameJobnameprefix.-e/--envIfthesoftwareyouareusingisinacondaenvironment,definethecondaenvironmentnamehere.-q/--queueTargetqueuename.--/--nodeSetthenumberofnodesrequiredforthejob.Default1.--/--ppnSetthenumberofCPUcoresthatcanbeusedbyeachnode.Default1.-o/--outputOutputpathtogeneratejobscript.Defaultcurrentpath--walltimeSetthemaximumwallclocktimerequiredforthejob.Default1000hours.--log_info_outputJobstandardlogoutputpath.Defaultcurrentpath.--log_error_outputJoberrorlogoutputpath.Defaultcurrentpath.-s/--sampleCreateasamplepbsscript.-h/--helpDisplaythishelpmessage.-v/--versionDetailedversioninformation.qsubsqsubs has no parameters. It will submit all pbs job scripts in the current path by default. You only need to executeqsubsunder the path to be submitted.qsubsLicenseCopyright [2023] [wangzt]Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.AboutAuthor: Wangzt (interestingcn01@gmail.com)Bioinformatics Laboratory of South China Agricultural University
Package: pbt
PBTpbt— A build tool for multiple Python projects in a single repositoryIntroductionHaving all packages in the same repository make it much easier to develop, share, reuse, and refactor code. Building and publishing the packages should not be done manually because it is time-consuming and may be frustrated if the projects are depending on each other.pbtis a tool designed to help make the process easier and faster. It supports building, installing, and updating versions of your packages and their dependencies consistently. It also provides utility commands to help you work with your packages in multi-repositories as if you are working with a monorepo.Installationpipinstall-UpbtUsageNote: currently,pbtsupports Python packages configured with Poetry (an awesome dependency management that you should consider using).Assuming that you organized your packages to different sub-folders, each has their own project configuration file (e.g.,pyproject.toml). You can run the following commands in the root directory (containing your projects). Note:pbtwill discover the project based on the project name in its configuration file not the folder name.You can also discover the list of commands by runningpbt --help. Many commands have an option--cwdto override the current working directory.List all packages in the current project, and their dependencies if requiredpbtlist[-d]-d,--dev: Whether to print to the local (inter-) dependenciesCreate virtual environment of a package and install its dependenciespbtinstall[-d][-v][-p<package>]-d: also install dev-dependencies of the package-v: verbose-p: specify the package we want to build, if empty build all packages.If you have encounter some errors during the installation, you can checkout thepyproject.failed.tomlfile that is generated by pbt in./cache/<package>folder (relative to your current working directory). For example, on M1 chip, if your python version is^3.8, you can't use the newer scipy (e.g., >1.8 as it requires python<3.11), poetry lock chooses to use an old version1.6.0, which typically can't build on M1 due to no pre-built numpy for it.Update all package inter-dependenciespbtupdateClean packages' build & lock filespbtclean[-p<package>]-p: specify the package we want to build, if empty build all packages.Git clone a multi-repository projectpbtgitclone--repo<repo_url>Clone a repository and check out all of its submodules to their correct branches that we were using last time.Git update a multi-repository projectpbtgitupdatePull latest changes from the repository, and check out all of its submodules to their correct branches.
Package: pbtestconnect
OverviewThis package provides facilities for interacting with Connect Enterprise. Modules are packaged by particular product/functional area.Writing your first script with connect.transformThe connect.transform module is for authoring scripts in Connect Transform.In order to upload a script to execute in Connect Transform, it has to adhere to some conventions.  You'll need to implement an informal interface, as well as decorate your class:importiofromtypingimportBinaryIOfrompbtestconnect.transform.IExecuteScriptsimportIExecuteScripts,ScriptContent,ExecutionContextfrompbtestconnect.transform.Registrationsimportregister@register(requires_connection=False,produces="text/plain")classMyFirstScriptExecutor(IExecuteScripts):defexecute(self,context:ExecutionContext,inputStream:BinaryIO,outputStream:BinaryIO)->None:print("in my script executor")print("Only expecting small inputs here. Content Length:{length}. Content Type:{contentType}".format(length=context.contentDescriptor.length,contentType=context.contentDescriptor.contentType))withio.TextIOWrapper(inputStream)astext:data=text.read()rsp=self.DoSomeWork(data)outputBytes=rsp.encode('utf-8')outputStream.write(outputBytes)returndefDoSomeWork(self,text):return"Received your message:{msg}".format(msg=text)The Registration decorator indicates to the runtime environment that this is the implementation of IExecuteScripts that you wish to run. Note the following:your script cannot be executed if it is not registered with @Register()your script cannot be executed if it it does not implement the informal interface IExecuteScriptsIn the above example, we're expecting a relatively small text based payload to be contained in inputStream. The script decodes the bytes to UTF-8 text, appends it to our own message, and then writes out the bytes to outputStream.Note:the input and output streams are file like objects that read and write binary data, respectively. This allows for arbitrary data to be processed, however, if you're expecting text data, you'll have to decode the input bytes to text, and encode the output text to bytes. If data is "too big" to pull into memory, you can read through the stream and parse it.Using the test harnessThe package comes with a simple test harness to simulate invoking scripts with the Connect Transform script execution environment.  You specify thhe input and output file locations, as well as your script executor you wish to test:python3-mpbtestconnect.transform-i"/Users/philipbarile/Documents/Projects/fluentresultstest/input.txt"-o"/Users/philipbarile/Documents/Projects/fluentresultstest/output.txt"-m"/Users/philipbarile/Documents/Projects/fluentresultstest/testExecutor.py"Attemptingtorunscript.Executor:'MyFirstScriptExecutor'ExpectedContentType:text/plainRequiresConnection:False
Wrote'52'bytesto/Users/philipbarile/Documents/Projects/fluentresultstest/output.txt
Scriptstdout:
***inmyscriptexecutor
***Onlyexpectingsmallinputshere.readin.The test harness will show you any print statements your script logged, as well  as some basic information about what it attempted to run.
Package: pb-testing
PB TESTINGLibrary for testing using Page Object Pattern and Behaviour Driven Development.UsageThis application is experimental and is used mainly for Engineer's Thesis.It will be maintained for errors and probably in near future might get some new features.Before usingBefore creating any tests, you need geckodriver.
It's crucial, because selenium, which is responsible for initializing the browser and doing actions,
need this driver to work.
Link for geckodriver:https://github.com/mozilla/geckodriver/releases.There are several ways for preparing driver to coopearte with library, depending on Operating System.
On each of systems: Microsoft Windows, macOS and Linux it looks a bit different.
I was using Linux, so I will describe it here, but here are links for other OS:Windows:http://www.learningaboutelectronics.com/Articles/How-to-install-geckodriver-Python-windows.phpmacOS:https://medium.com/dropout-analytics/selenium-and-geckodriver-on-mac-b411dbfe61bcOn Linux you need to:download driver,unpack it with any tool,set execute rights for userchmod  700,put library on path/usr/local/bin. It can be done by moving it to location(mv),
copying to location(cp) or linking to directory(ln). Each command will work<geckodriver_name> /usr/local/binIt's worth mentioning that is not only working way to put geckodriver to work with selenium.CommandsAll commands are typed into terminal, using venvTo activate venv type commandsourcevenv/bin/activateIt will look like this. venv will show up next to your name
and command promptprepareIt will create:directories:resources_for_testing, features, steps, pagesconfiguration_fileconfig.inicommon_steps.pyfile in steps,`` consisting basic commands used in testing
(selenium finding, clicking elements on site)database for keeping urls from your projectThis step is crucial, because it will setup all directoreies for using this libraryAvailable frameworks for url scan: rails, djangopb_configurationThis method will pop gui with urls from your project and urls used in tests.
It will look like this:On left we have urls scanned from project.
On the right side there are urls that will be used in testing.Between listboxes is arrow, which let user pass value from one listbox to another
and at the bottom there are buttons, which also allow user to include new urls into testing.Overall working:step_creatorThis gui is responsible for creating tests, using scanning urls andOK, application is fine, but how to do testing?Testing in this application is based on BDD. This meansInvocing tests
Use command behave <name_of_feature_file> -D headless
Package: pbtoyrobot
PBTOYROBOT: Toy Robot CLIA CLI to control a toy robot.InstallationInstall using pip:pip install pbtoyrobotCLIThe application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units.There are no other obstructions on the table surface.The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement
that would result in the robot falling from the table must be prevented, however further valid movement commands must still
be allowed.# Show help
    pbtoyrobot --help

    # PLACE: Places the robot at X, Y with orientation F
    # Possible value for x and y are integers between 0 and 5 included
    # Possible values for F are NORTH, EAST, SOUTH and WEST
    pbtoyrobot PLACE 1,1,NORTH

    # MOVE: Moves the robot of one unit in the current direction
    pbtoyrobot MOVE

    # LEFT: Rotates the robot 90 degrees in the specified direction
    pbtoyrobot LEFT

    # RIGHT: Rotates the robot 90 degrees in the specified direction
    pbtoyrobot RIGHT

    # REPORT: will announce the X,Y and orientation of the robot
    pbtoyrobot REPORTUsageExample Input and Output:PLACE 0,0,NORTH
MOVE
REPORT
Output: 0,1,NORTHPLACE 0,0,NORTH
LEFT
REPORT
Output: 0,0,WESTPLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH
Package: pbu-log-inspector
PBU Log InspectorFlask (pip) and React (npm) integration forpython-basic-utilslogs.Installationpip3installpbu-log-inspector
npminstallpbu-log-inspectorIntegrationBackendfromflaskimportFlaskfromloginspectimportregister_endpointapp=Flask(__name__)register_endpoint(app)app.run(host="0.0.0.0",port=5444)Theregister_endpointfunction will register an endpointGET /api/_logs, which will can be used to serve daily logs.
There are additional parameters available for this function:register_endpoint(app,log_folder="_logs",api_prefix="/api",log_file_mapping=None,login_check=None)The defaultlog_folderis relative to the start script of your application, since that is thepbudefault.If you provide a differentapi_prefixthis will just be the prefix, not the/_logspart. E.g./restwould
result in an endpoint/rest/_logsThelog_file_mappingis optional and only necessary, if you instructedpbuto write to different file names
than the defaults. When provided, the mapping needs to provide a dictionary with keys representing the default pbu log
file names (info.log, debug.log, warning.log, error.log) and their respective values are the name of the log file in
your app.If your application includes authentication, provide a function via thelogin_checkparameter that performs the
authentication. No parameters are passed to the function. You can usefrom flask import requestand access all request
dataRestrictionsThe date needs to be the first part of a log messageThe date needs to be in the format%Y-%m-%d %H:%M:%S.%s, e.g.2019-12-25 13:37:01.567There is no limit on how many logs the endpoint delivers. This can easily cause large payloads and potentially exceed
operational limits (e.g. browser performance, response size, ...)FrontendimportReactfrom"react"importLogInspectorContainerfrom"pbu-log-inspector"constMyContainer=props=>(<div><LogInspectorContainer/></div>)The container provides the following properties:apiPrefix- default"/api"- corresponds to theapi_prefixparameter configured on the Flask backendapplyRequestOptions- defaultnull- a function that takes the base request parameters and has to return the
parameters for the fetch request, in case authentication is required and headers need to be seterrorHandler- defaultnull- a function to handle an error during fetching logs (e.g. show an alert), noreturnis expected. The parameter is the error thrown.
Package: pbumysql
Python Basic Utilities - MySQLpbumysqlAvailable onPyPiThis package is still in development!Table of ContentsInstallationUsageClassesAbstractMysqlStore- abstract class for handling MySQL table accessAbstractMysqlDocument- abstract class for wrapping rows representing entitiesMysqlConnection- a wrapper for a MySQL connectionInstallationInstall via pip:pipinstallpbumysqlUsageIt is good practice associating a sub-class ofAbstractMysqlDocumentwith a sub-class ofAbstractMysqlStore. This is
done through theobject_classparameter in thesuper()constructor call of the store class. Any method for querying
rows will use that class to deserialise the row into the provided class, which should extendAbstractMysqlDocument.Example: let's say we want to implement access to a collection containing user documents. We'll define a classUserthat extendsAbstractMysqlDocumentand a classUserStorethat extendsAbstractMysqlStore.TODO: add code example of store and entity definitionTODO: add code example of store and entity usageClassesAbstractMysqlStoreThis is an abstract class and cannot be instantiated directly. Instead, define a class that extends this class.Constructor__init__(connection, table_name, object_class, logger=None)connection- an instance ofMysqlConnectiontable_name- the name of the table containing the rowsobject_class- used for all the query methods to deserialise the row into a class with attributes for easier accesslogger- a logger instance with.info/.error/.warnmethods availableMethodsTODO: describe methodsAbstractMysqlDocumentTODO: add documentationMysqlConnectionTODO: add documentation