Saravanan666/pypi-org huggingface dataset:
Package: logicbook
# LogicBook
Logicbook is an open source tool for building python logics in isolation. It streamlines logic development, testing, and documentation.More document is [here](https://ruihirano.github.io/logicbook/).<img width=”1000” alt=”example” src=”https://user-images.githubusercontent.com/43264434/159141578-87f87ab0-502a-4fa6-a875-1197762202c3.png”>## Getting StartedGet started bycreating a new logicbook.### What you’ll need[Python 3](https://www.python.org/downloads/)Pip## Generate a new logicbook siteGenerate a new Logicbook site using thelogicbook command.`bash cdyour-python-projectlogicbook init `You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.The command also installs all necessary dependencies you need to run Logicbook.## Start your logicbookRun the development server:`bash cdyour-python-projectlogicbook start `Thelogicbook startcommand builds your logicbook locally and serves it through a development server, ready for you to view athttp://localhost:8000/.
Package: logicdrop-sparks-openapi
Logicdrop Sparks API and Python Client.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501
Package: logicexp
logicexpA package which can help in calculating the result of any logical expression consisting of various logical operations.It would be very helpful when you have to calculate the result of a logical expression with given input values or to verify the correctness of your output.Examples of How To UsefromlogicexpimportNand,Nor,Not,Or,Xor,Calculateprint(Calculate(Xor(0,1)))# 1print(Calculate(Nor(1,0)))# 0print(Calculate(Or(Nand(1,1),Not(1))))# 0Function DescriptionFunctionDescriptionOrRepresents Logical Or OperationAndRepresents Logical And OperationNotRepresents Logical Not OperationXorRepresents Logical Xor OperationNandRepresents Logical Nand OperationNorRepresents Logical Nor OperationCalculateCalculates the result of logical expression
Package: logiclayer
A simple framework to quickly compose and use multiple functionalities as endpoints.LogicLayer is built upon FastAPI to provide a simple way to group functionalities into reusable modules.Getting startedLogicLayer allows to group multiple endpoints with related functionality into a single module, which can be installed in a single step, and with the option to share external objects and make them available to the routes.The unit of functionality is a Module, which must be a subclass of theLogicLayerModuleclass. Then you can mark its methods as module routes using theroutedecorator:# echo.pyimportlogiclayerasllimportplatformclassEchoModule(ll.LogicLayerModule):defget_python_version():returnplatform.python_version()@ll.route("GET","/")defroute_status(self):return{"module":"echo","version":"0.1.0","python":self.get_python_version(),}[...moremethods]You can setup multiple methods in your module class, and only the decorated ones will be setup as routes in your module. Thell.routemethod accepts the same parameters as FastAPI'sapp.get/head/post/putmethods, with the difference you can set multiple methods at once passing a list instead of the HTTP method as string:ll.route("GET","/")# is the same asll.route(["GET"],"/")# so this also worksll.route(["GET","HEAD"],"/")# (...just be careful to leave the answer empty when needed)Then just create a newLogicLayerinstance and add the module using theadd_module()method. The first argument is the prefix to the paths of all URLs for this module, and the second is the instance of the LogicLayerModule subclass:# example.pyimportrequestsimportlogiclayerasllfrom.echoimportEchoModulelayer=LogicLayer()# this will work as a healthcheck for the appdefis_online()->bool:"""Checks if the machine is online."""res=requests.get("http://clients3.google.com/generate_204")return(res.status_code==204)and(res.headers.get("Content-Length")=="0")# healthchecks are set to run in the root `/_health` pathlayer.add_check(is_online)echo=EchoModule()layer.add_module("/demo",echo)Thelayerobject is an ASGI-compatible application, that can be used with uvicorn/gunicorn to run a server, the same way as you would with a FastAPI instance.$pipinstalluvicorn[standard]$uvicornexample:layerNote theexample:layerparameter is the reference to thelayervariable in theexamplemodule/file, whichpoints to the ASGI app instance.Optionally, you can also install a module in a common FastAPI instance, using the internalAPIRouterinstance:app=FastAPI()echo=EchoModule()app.include_router(echo.router,prefix="/demo")© 2022Datawheel, LLC.This project is licensed underMIT.
Package: logiclayer-complexity
Getting startedThis module must be used with LogicLayer. An instance ofOlapServerfrom thetesseract_olappackage is also required to retrieve the data.# app.pyfromlogiclayerimportLogicLayerfromlogiclayer_complexityimportEconomicComplexityModulefromtesseract_olapimportOlapServerfromtesseract_olap.logiclayerimportTesseractModulelayer=LogicLayer()olap=OlapServer(backend="clickhouse://...",schema="./schema/")cmplx=EconomicComplexityModule(olap)layer.add_module("/complexity",cmplx)# You can reuse the `olap` object with an instace of `TesseractModule`tsrc=TesseractModule(olap)layer.add_module("/tesseract",tsrc)You can also use the module with a FastAPI instance:cmplx=EconomicComplexityModule(olap)app=FastAPI()app.include_router(cmplx.router,prefix="/complexity")© 2022Datawheel, LLC.This project is licensed underMIT.
Package: logicmonitor-data-sdk
The LogicMonitor Python Data libraryThis Python Library is suitable for ingesting the metrics into the LogicMonitor PlatformLibrary Documentation:https://logicmonitor-data-sdk-py.readthedocs.io/en/latest/LogicMonitor:https://LogicMonitor.comOverviewLogicMonitor's Push Metrics feature allows you to send metrics directly
to the LogicMonitor platform via a dedicated API, removing the need to
route the data through a LogicMonitor Collector. Once ingested, these
metrics are presented alongside all other metrics gathered via
LogicMonitor, providing a single pane of glass for metric monitoring and
alerting.Requirements.Python 2.7 and 3.4+Documentationhttps://logicmonitor-data-sdk-py.readthedocs.io/en/latest/Getting StartedPlease install using pip and then run below a working example for submitting the disk metrics to
your LM account. This script will monitor the Usage, Free and Total of the disk at every 10 sec
interval.importloggingimportosimportsysimporttimeimportpsutilaspsutilimportlogicmonitor_data_sdkfromlogicmonitor_data_sdk.api.response_interfaceimportResonseInterfacefromlogicmonitor_data_sdk.modelsimportResource,DataSource,DataPoint,\DataSourceInstancefromlogicmonitor_data_sdk.api.metricsimportMetricslogger=logging.getLogger('lmdata.api')logger.setLevel(logging.INFO)configuration=logicmonitor_data_sdk.Configuration()# For debug log, set the value to Trueconfiguration.debug=TrueclassMyResponse(ResonseInterface):"""Sample callback to handle the response from the REST endpoints"""defsuccess_callback(self,request,response,status,request_id):logger.info("%s:%s:%s",response,status,request_id)deferror_callback(self,request,response,status,request_id,reason):logger.error("%s:%s:%s%s",response,status,reason,request_id)defMetricRequest():"""Main function to get the CPU values using `psutil` and send to Metrics REST endpoint"""device_name=os.uname()[1]resource=Resource(ids={'system.displayname':device_name},name=device_name,create=True)datasource=DataSource(name="DiskUsingSDK")datapoints=['total','used','free']metric_api=Metrics(batch=True,interval=30,response_callback=MyResponse())whileTrue:partitions=psutil.disk_partitions()forpinpartitions:instance_name=p.deviceusage=psutil.disk_usage(instance_name)._asdict()# Create the instance object for every device. Name should not have the# special characters so replacing it with the '-'.instance=DataSourceInstance(name=instance_name.replace('/','-'),display_name=instance_name)forone_datapointindatapoints:datapoint=DataPoint(name=one_datapoint)values={str(int(time.time())):str(usage[one_datapoint])}metric_api.send_metrics(resource=resource,datasource=datasource,instance=instance,datapoint=datapoint,values=values)time.sleep(5)if__name__=="__main__":MetricRequest()Then run the program as:pipinstallpsutilLM_COMPANY=<ACOUNT_NAME>LM_ACCESS_ID=<ID>LM_ACCESS_KEY='<KEY>'pythondisk_metrics.pyGet in TouchIf you have questions in general, reach out to oursupportCopyright, 2021, LogicMonitor, Inc.This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0. If a copy of the MPL
was not distributed with this file, You can obtain
one athttps://mozilla.org/MPL/2.0/.
Package: logicmonitor-sdk
LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account programmatically. &lt;br&gt; &lt;br&gt; Note: &lt;ul&gt; &lt;li&gt; For Python SDKs, the REQUEST parameters can contain camelCase or an underscore. &lt;/li&gt; &lt;li&gt; Both underscore and camelCase are supported if parameters are encapsulated within the body. &lt;/li&gt; &lt;li&gt; Only camelCase is supported if parameters are encapsulated within the body and also if the user is passing raw JSON as REQUEST parameter. However, the RESPONSE parameters always contain an underscore. For example, you can use testLocation or test_location in the REQUEST parameter. But the RESPONSE parameter will always be test_location. &lt;/li&gt; &lt;li&gt; The fields parameter only supports camelCase. &lt;/li&gt; &lt;/ul&gt;  # noqa: E501
Package: logicore-django-react-pages
logicore-django-react-pagesPRG-like approach for React + Django AJAX appsUse together with:React counterpartand on top of:Running React and Django on a single portUsagePerform:https://github.com/Logicore-project/logicore-django-react#usage-from-scratch-starting-a-django--react-project-for-developmentAssuming your main apps' name ismainAdd toviews.py(as an example):fromlogicore_django_react_pages.viewsimportApiViewclassHomeView(ApiView):url_name="home"url_path="/"WRAPPER="MainWrapper"TEMPLATE="HomeView"title="Home"defget_data(self,request,*args,**kwargs):return{"name":"World"}Add tourls.pyfromlogicore_django_react.urlsimportreact_reload_and_static_urls,react_html_template_urlsfrommainimportviews# required to register subclasses for ApiViewfromlogicore_django_react_pages.viewsimportall_api_urlsurlpatterns=[# ...*all_api_urls(),# in any position# ...]# add static/media endpoints here if needed# urlpatterns += static(...)# lastly, combine with logicore_django_react urlsurlpatterns=react_reload_and_static_urls+urlpatterns+react_html_template_urlsInstall & configure ReactJS counterpart:https://github.com/Logicore-project/logicore-react-pages#installation
Package: logicparser
logicparserA free layer to create logics for your argumentsGetting Startedlogicparser is a python package that allow you to create logic and dependncies
between CLI arguments.
These instructions will install logicparser to your machine.PrerequisitesPython3PIP3Installationpip3 install logicparserUsageDefine argumentsThe class used to create a new argument is imported in this way:from logicparser import Argument

arg = Argument(arg_name='--arg-name')metavararg = Argument(arg_name='--arg-name', metavar='ARG_VALUE')actionarg = Argument(arg_name='--arg-name', action='store_true')helparg = Argument(arg_name='--arg-name', help='This message will be show when you will define -h arg')Add relationshipsrequireYou can define that an argument can be defined only if others arguments
are defined previouslyarg = Argument(
    arg_name='arg-name',
    require=('--other-arg',))conflictYou can define that an argument cannot be defined if other arguments are
defined previouslyarg = Argument(
    arg_name='arg-name',
    conflict=('--other-arg',))dependencyYou can define that an arguments can be defined only if at least one of others
arguments is definedarg = Argument(
    arg_name='arg-name',
    dependency=('--other-arg1', 'other-arg2',))Parse argumentsWhen you have defined the list of your arguments you can play
args validation parsing them.from logicparser import Argument, ArgumentHandler

args = ArgumentHandler([
    Argument(arg_name='--arg-name', ...),
    Argument(arg_name='--arg-name2', ...),
    Argument(arg_name='--arg-name3', ...),
    ...
]).argsContributingPlease readCONTRIBUTING.mdfor details on code of conduct, and the process for submitting pull requests.LicenseThis project is licensed under the MIT License, readLICENSEfor detailsAuthorGiuseppe "mastrobirraio" Matranga-Initial work-Github
Package: logicplum
LogicPlumLogicPlum is a client library for working with the LogicPlum platform APIs.Example>>> import pandas as pd
>>> from logicplum import LogicPlum
>>>
>>>
>>> lp = LogicPlum("YOUR-API-KEY")
>>>
>>> # New Project
>>> project_id = lp.create_project("PROJECT-NAME", "PROJECT-DESCRIPTION")
>>> print(project_id)
>>>
>>> # Data Training
>>> train_df = pd.read_csv("datatotrain.csv")
>>> target = "TARGET-COLUMN-NAME"
>>> x = lp.train(project_id, train_df, target)
>>> print(x)
>>>
>>> # Check data training status
>>> training_status = lp.train_status(project_id)
>>> print(training_status)
>>>
>>> # List models
>>> models = lp.model_list(project_id)
>>> print(models)
>>>
>>> # Deploy a model
>>> model_id = "MODEL-ID-TO-DEPLOY"
>>> deployment_id = lp.deploy(project_id, model_id)
>>> print(deployment_id)
>>> 
>>> # List deployed models
>>> deployments = lp.deployment_list(project_id)
>>> print(deployments)
>>>
>>> # Predictions
>>> score_df = pd.read_csv('datatoscore.csv')
>>> scores = lp.score(deployment_id, score_df)
>>> print(scores)
>>>
Package: logicplum-ai
ChangelogAll notable changes to this project will be documented in this file.[1.0.0] - 2023-12-08Released.[1.0.1] - 2023-12-08code optimized.[1.0.2] - 2023-12-08Passing individual params instead of passing as dictionary except training.[1.0.3] - 2023-12-081.0.2 fixes.[1.0.4] - 2023-12-08config file changes.[1.0.5] - 2023-12-081.0.4 fixes[1.0.6] - 2023-12-08Code Fixes[1.0.7] - 2023-12-08Code Fixes[1.0.8] - 2023-12-08Code Fixes[1.0.9] - 2023-12-08Training module new updates[1.1.0] - 2023-12-08Report module new updates[1.1.1] - 2023-12-08graph module new updates[1.1.2] - 2023-12-08graph module new updates[1.1.3] - 2023-12-08graph module new updates[1.1.4] - 2023-12-08training new updates[1.1.5] - 2023-12-08training new updates[1.1.6] - 2023-12-08graph displaying feature added in plot.[1.1.7] - 2023-12-08Fixes.[1.1.8] - 2023-12-08JWT Authentication implemented[1.1.9] - 2023-12-08Fixes[1.2.0] - 2023-12-08Fixes[1.2.1] - 2023-12-08Newplot blueprint and auto model selection in deployment added .[1.2.2] - 2023-12-08Retrain model feature added.[1.2.3] - 2023-12-08Deployment auto model selection fixes.[1.2.4] - 2023-12-08Removed auto model selection from deployment .[1.2.5] - 2023-12-08Content type changed in deployment.[1.2.6] - 2023-12-08Fixes in deployment.[1.2.7] - 2023-12-08Fixes in deployment.[1.2.8] - 2023-12-08Manual prediction changes.[1.2.9] - 2023-12-08Staging release.[1.3.0] - 2023-12-08deployment changes.[1.3.1] - 2023-12-08development release.
Package: logicqubit
FeaturesNumerical and symbolic simulation of quantum algorithmsPlot state and current operation, density matrix and measurement graphsThe state values can be represented as angles, which helps in the analysis of the fourrier quantum transform.Operations can be performed directly on the instantiated qubit object or using qubit indices.Support GPUTable of ContentsInstallationStartupTo instantiate a qubitTo instantiate a qubit registerOperationsOperations on one qubitOperations on two qubitsList of available gatesMeasureMeasure the expected value of one or more qubitsMeasure one shot on a qubitPlot graphs and print statePlot expected valuesPlot the density matrixPrint the current statePrint the current state as anglesCode sampleOther code samplesInstallationpip install logicqubitStartuplogicQuBit  = LogicQuBit(n_qubits, symbolic = True)Where n_qubits is the number of qubits, and symbolic defines whether the values a and b of the qubits will be symbolic or not, if the symbolic input is omitted the calculation will be numeric.To instantiate a qubitq  = Qubit()To instantiate a qubit registerreg = QubitRegister(num_qubits)OperationsOperations on one qubitThe operation can be performed as q.Gate(parameters) or logicQuBit.Gate(id_qubit, parameters).Operations on two qubitsIn this case, the operation can be performed as q.Gate(control_qubit, parameters) or logicQuBit.Gate(control_qubit, target_qubit, parameters).*The need for parameters depends on the type of gate.List of available gatesSingle-qubit gates: X, Y, Z, V, S, T, H, RX, RY, RZ, U, U1, U2, U3.Two-qubits gates: CX or CNOT, CY, CZ, CV, CS, CT, CRX, CRY, CRZ, CU, CU1, CU2, CU3, SWAP.Three-qubits gates: CCX or Toffoli, Fredkin.MeasureMeasure the expected value of one or more qubitsresult = logicQuBit.Measure([q1,q2,..,qn])Measure one shot on a qubitvalue = logicQuBit.Measure_One(qubit)Plot graphs and print statePlot expected valueslogicQuBit.plot()Generate a graph of the values obtained by the Measure([...]).Plot the density matrixlogicQuBit.PlotDensityMatrix()Print the current statelogicQuBit.PrintState()Print the current state as angleslogicQuBit.getPsiAtAngles(degree=True)The degree variable defines whether the result will be displayed in degrees or radians.Code samplefromlogicqubit.logicimport*logicQuBit=LogicQuBit(3)a=Qubit()b=Qubit()c=Qubit()a.H()b.H()c.CCX(a,b)# and operationlogicQuBit.Measure([c])logicQuBit.Plot()Other code sampleshttps://github.com/clnrp/logicqubit-algorithms
Package: logifire
Logifire v0.0.2Simplifying the use of logs based on build-in logging.Main featuresThe ability to configure a pause in sending messages, even if the service is running on different servers.Modern log message formatting with PythonformatwaySupport for any handlers based on the logging.HandlerSlack handlerInstallpip install logifireMinimal examplefromlogifireimportLogifirelog=Logifire()# init log with stderr handler by defaultlog.debug("Test arg='{}' and kwargs: foo='{foo}', bar='{bar}'","first arg",foo="fval",bar="bval")# 2022-05-27T23:27:42.721 28696   [DEBUG   ] main.<module>: Test arg='first arg' and kwargs: foo='fval', bar='bval'Post-configuration example# shared/config.pyimportloggingfromlogifireimportLogifire,Logbranchlog=Logifire(branches=[logging.FileHandler('main.log')])# some_service/config.pyimportloggingfromlogifireimportLogbranchfromlogifire.handlersimportSysLogifireHandlerfromshared.configimportloglog.set_name('some_service')# set name for loggerlog.set_level(logging.INFO)# set global levellog.add(# add syslog for only warningsLogbranch(SysLogifireHandler(),level=logging.WARNING))Example with log mute featureThis example sets up a Logifire (DEBUG as main level) with a Syslog handler and a Slack handler with a 5-second mute using Memcached.This allows all DEBUG-level messages to be written to syslog and CRITICAL level messages to be sent to the Slack channel, but no more than once every 5 seconds.
Since Memcached (in this case) is used as the backend for mute, it'll work across the entire cluster if the service is running on multiple servers.importloggingfromlogifireimportLogifire,Logbranchfromlogifire.blowoutimportBlowoutMemcachedfromlogifire.handlersimportSysLogifireHandler,SlackLogifireHandlerlog=Logifire(name='my_service',# your service namelevel=logging.DEBUG,# main log levelbranches=[Logbranch(SysLogifireHandler()),# add Syslog handler, you can use any logging.HandlerLogbranch(# add Slack handlerhandler=SlackLogifireHandler("<token>"),level=logging.CRITICAL,# send only critical messages to Slackblowout_seconds=5# after sending a message, mute the sending for 5 seconds)],blowout=BlowoutMemcached([('127.0.0.1',11211)])# use Memcached for the mute feature (pymemcache lib required))log.debug("Test debug message")# send to sysloglog.info("Test info message")# send to sysloglog.critical("Test critical message")# send to syslog and slackCopyright (C) 2022 by Dmitry Parfyonovparfyonov.dima@gmail.comMIT License, seehttp://opensource.org/licenses/MIT
Package: logilab-astng
What’s this ?The aim of this module is to provide a common base representation of
python source code for projects such as pychecker, pyreverse,
pylint… Well, actually the development of this library is essentially
governed by pylint’s needs.It provides a compatible representation which comes from the_astmodule.
It rebuilds the tree generated by the builtin _ast module by recursively
walking down the AST and building an extended ast (let’s call it astng ;). The
new node classes have additional methods and attributes for different usages.
They include some support for static inference and local name scopes.
Furthermore, astng builds partial trees by inspecting living objects.Main modules are:bases,node_classsesandscoped_nodescontain the classes for the
different type of nodes of the tree.themanagercontains a high level object to get astng trees from
source files and living objects. It maintains a cache of previously
constructed tree for quick accessInstallationExtract the tarball, jump into the created directory and runpython setup.py installFor installation options, seepython setup.py install --helpIf you have any questions, please mail thepython-project@lists.logilab.orgmailing list for support. Seehttp://lists.logilab.org/mailman/listinfo/python-projectsfor
subscription information and archives.TestTests are in the ‘test’ subdirectory. To launch the whole tests suite
at once, you may use the ‘pytest’ utility from logilab-common (simply
type ‘pytest’ from within this directory) or if you’re running python
>= 2.7, using discover, for instance:python -m unittest discover -p "unittest*.py"
Package: logilab-common
What’s this ?This package contains some modules used by different Logilab projects.It is released under the GNU Lesser General Public License.There is no documentation available yet but the source code should be clean and
well documented.Designed to ease:handling command line options and configuration fileswriting interactive command line toolsmanipulation of files and character stringsmanipulation of common structures such as graph, tree, and pattern such as visitorgenerating text and HTML reportsmore…DocumentationDocumentation is available athttps://logilab-common.readthedocs.io/Installationlogilab-common is available on pypi so you can install it using pippip install logilab-commonOr alternatively extract the tarball, jump into the created directory and runpython setup.py installFor installation options, seepython setup.py install --helpBuilding the documentationCreate a virtualenv and install dependenciesvirtualenv venv
source venv/bin/activate

# you need the krb5-config command to build all dependencies
# on debian you can get it using "apt-get install libkrb5-dev"

pip install doc/requirements-doc.txt

# install logilab-common
pip install -e .Then build the doccd doc
make htmlIt’s now available underdoc/_build/html/Code styleThe python code is verified againstflake8and formatted withblack.You can runtox -e blackto check that the files are well formatted.You can runtox -e black-runto format them if needed.You can include the.hgrcto your own.hgrcto automatically run black
before each commit/amend. This can be done by writing%include ../.hgrcat
the end of your.hgrc.Comments, support, bug reportsProject pagehttps://www.logilab.org/project/logilab-commonUse the cubicweb-devel at lists.cubicweb.org mailing list.You can subscribe to this mailing list athttps://lists.cubicweb.org/mailman/listinfo/cubicweb-develArchives are available athttps://lists.cubicweb.org/pipermail/cubicweb-devel/