Saravanan666/pypi-org huggingface dataset:
Package: opa-wasm
Open Policy Agent WebAssembly SDK for PythonThis is the source for theopa-wasmPython module which is an SDK for using WebAssembly (wasm) compiledOpen Policy AgentRego policies usingwasmer-python.Getting StartedInstall the moduleYou may choose to use either thecraneliftorllvmcompiler package as follows:pip install opa-wasm[cranelift]orpip install opa-wasm[llvm]For builds that target AWS Lambda as an execution environment, it is recommended to use cranelift. This avoids
the need to bundle additional binary dependencies as part of the lambda package.See thewasmer-pythondocs for more informationUsageThere are only a couple of steps required to start evaluating the policy.# Import the modulefromopa_wasmimportOPAPolicy# Load a policy by specifying its file pathpolicy=OPAPolicy('./policy.wasm')# Optional: Set policy datapolicy.set_data({"company_name":"ACME"})# Evaluate the policyinput={"user":"alice"}result=policy.evaluate(input)Writing the policySeehttps://www.openpolicyagent.org/docs/latest/how-do-i-write-policies/Compiling the policyEither use theCompile REST APIoropa buildCLI tool.For example, with OPA v0.20.5+:opabuild-twasm-e'example/allow'example.regoWhich compiles theexample.regopolicy file with the result set todata.example.allow. The result will be an OPA bundle with thepolicy.wasmbinary included.Seeopa build --helpfor more details.CreditsThis project was inspired by the equivalent NPM Module@open-policy-agent/opa-wasm
Package: opax
opaxopaxis an optimizer library for JAX. It is a reimplementation ofoptaxusing PAX's statefulmodule.InstallationTo install the latest version:pip3installgit+https://github.com/ntt123/opax.gitGetting startedTo create an optimizer:importopaxoptimizer=opax.adam(1e-4).init(parameters)Note:parametersis a pytree of trainable parameters.To update parameters:updates,optimizer=opax.transform_gradients(gradients,optimizer,parameters)parameters=opax.apply_updates(parameters,updates)Note:gradientshas the sametreedefasparameters.Theopax.chainfunctionopaxfollowsoptax's philosophy in combiningGradientTransformation's together withopax.chainfunction:optimizer=opax.chain(opax.clip_by_global_norm(1.0),opax.scale_by_adam(),opax.scale(1e-4),).init(parameters)Learning rate scheduleopaxsupports learning rate scheduling withopax.scale_by_schedule.defstaircase_schedule_fn(step:jnp.ndarray):p=jnp.floor(step.astype(jnp.float32)/1000)returnjnp.exp2(-p)optimizer=opax.chain(opax.clip_by_global_norm(1.0),opax.scale_by_adam(),opax.scale_by_schedule(staircase_schedule_fn),).init(parameters)UtilitiesTo get the currentglobal norm:print(optimizer[0].global_norm)Note:global_normis a property ofClipByGlobalNormclass.To get the currentlearning rate:print(optimizer[-1].learning_rate)Note:learning_rateis a property ofScaleByScheduleclass.
Package: opbasm
Open PicoBlaze AssemblerOpbasm is a free cross-platform assembler for the PicoBlaze-3 (PB3) and
PicoBlaze-6 (PB6) microcontrollersprovided by Xilinx. It will
run readily on any platform with a Python interpreter. Opbasm
provides a better performing solution to assembling PicoBlaze code without
resorting to DOS or Windows emulation to run the native KCPSM assemblers.Special features of Opbasm:Optionalm4 preprocessor macrosare available when the m4
program is installed. An extensive set of built-in macros provide more
advanced features than the base language. For example, converting
temperature scales becomes as easy as this:reg16(rx, s4,s5)                ; Create a virtual 16-bit register pair named rx

c_to_f:
  load reglower(rx), s0         ; Load 8-bit Celsius temperature into low byte
  signex(rx)                    ; Sign extend to 16-bits
  expr2s(rx := rx * 9 / 5 + 32) ; Perform 16x8-bit signed arithmetic to get Fahrenheit
  returnIncludes an optimizer that performsstatic code analysisto identify dead
code and optionally remove it. This permits the development of code
libraries that can be included without wasting memory on unused functions.Code block annotations withuser defined PRAGMA meta-comments.A basiccommand line simulator Opbsimis included.Support for the full PicoBlaze-6 syntax is provided as well asenabling most
of the new PB6 syntax enhancements in PicoBlaze-3 code.
The original templating system for ROM components is supported as well as a
more flexiblegeneric ROM componentthat can read.memand.hexfiles directly during synthesis and simulation. A utility script is
included that permitsupdating the ROM contents of a bitstream filewithout requiring resynthesis as was formerly supplied by the DOS-based KCPSM3
tools.Files generated on non-Windows platforms will not have DOS line endings and
PicoBlaze-3 files are not restricted to 8.3 file names. Opbasm also runs
significantly faster than the native implementation:RequirementsOpbasm requires either Python 2.7 or Python 3.x and no additional libraries.
The installation script depends on setuptools which will be installed if it
isn’t currently present in your Python distribution. Optional macro support is
provided when m4 is installed. You can get optional colorized output from the
scripts by installing the Python colorama package. The source is written in
Python 2.7 syntax but will convert cleanly to Python 3 when the installer
passes it through 2to3.DownloadYou can access the Opbasm Git repository fromGithub.Packaged source codeis also available for download. You can install direct from PyPI with the “pip”
command if you have it available.DocumentationThe full documentation is available online at themain Opbasm site.
Package: opbeat
This is the official Python module forOpbeat.It provides full out-of-the-box support for many of the popular frameworks,
including Django, and Flask. Opbeat also includes drop-in support for any
WSGI-compatible web application.Your application doesn’t live on the web? No problem! Opbeat is easy to use in
any Python application.DocumentationDocumentation overviewGet started with DjangoGet started with FlaskGet started with a custom Python stackLicenseBSD-3-ClauseMade with ♥️ and ☕️ by Opbeat and our community.
Package: opbeatcli
Command line client forOpbeat.InstallationMake sure you have Git and a supported version Python installed on your system.
The supported Python versions are:2.6.x,2.7.x,3.3+and PyPy.$python--versionOpbeat CLI can then be installed using the standard Python package installation
method:$pipinstallopbeatcliIfpipis not available, you can alternatively useeasy_install:$easy_installopbeatcliTo verify successful installation of Opbeat CLI:$opbeat--versionUsage$opbeat[commonoptions]sub-command[sub-commandoptions]Common OptionsThese options are shared by all sub-commands.To obtain these, please go to your app settings on opbeat.com:--org-id,-oOrganization ID--app-id,-aApplication ID.--secret-token,-tSecret API authentication token.For more information and a complete list of the available common options,
please see the command help:$opbeat--helpSub-CommandsdeploymentThis command registers a deployment of an application to a machine with
the Opbeat API. Deployment tracking enables advanced features of the
Opbeat platform, such as version history and the ability to relate errors
with particular deployments, etc. It is meant to be run from the machine
that is being deployed to:# A basic deployment registration: Run this from your application
# repository directory on the machine which it's been deployed to:$opbeat-oORGANISATION_ID-aAPP_ID-tSECRET_TOKEN\deployment--componentpath:.For more information and examples please seedeployment tracking documentationand the command help:$opbeatdeployment--help
Package: opbeat_pyramid
opbeat-pyramid--------------[![CircleCI](https://circleci.com/gh/monokrome/opbeat_pyramid.svg?style=svg)](https://circleci.com/gh/monokrome/opbeat_pyramid)[![Coverage Status](https://coveralls.io/repos/github/monokrome/opbeat_pyramid/badge.svg?branch=master)](https://coveralls.io/github/monokrome/opbeat_pyramid?branch=master)Provides middleware for transaction and error reporting  to opbeat from yourPyramid applications.### InstallationInstallation can be done with easy_install, pip, or whichever packagemanagement tool you prefer:```pip install opbeat_pyramid```### UsageUsing the module should be simple. You will need to call`config.include('opbeat_pyramid')` on the configurator for your Pyramidproject. With the standard Pyramid boilerplates, this will be done in the`main` function within **\__init__.py**.#### OptionsThe following options **must be** in your app configuration in order to usethis module:| Pyramid Setting                  | Environment Variable           | Description                                                                        ||----------------------------------|--------------------------------|------------------------------------------------------------------------------------|| opbeat.enabled                 * | OPBEAT_ENABLED                 | True to enable reporting to OpBeat                                                 || opbeat.module_name             * | OPBEAT_MODULE_NAME             | The name of your project's module                                                  || opbeat.organization_id         * | OPBEAT_ORGANIZATION_ID         | Your opbeat organization ID                                                        || opbeat.app_id                  * | OPBEAT_APP_ID                  | Your opbeat app ID                                                                 || opbeat.secret_token            * | OPBEAT_SECRET_TOKEN            | Your opbeat secret token                                                           || opbeat.unsafe_settings_phrases   | OPBEAT_UNSAFE_SETTINGS_PHRASES | Comma-separated phrases used in setting names that should never be sent to update. |*NOTE: Settings marked with \* are required*
Package: opcalc
Python Opcalc 0.0.1Simple tool for calculate the numerical result from a expression string by python
This code mainly focused on the principle of expression calculation by using stack (one of the basic data structure)
You can use eval() function in python as well!InstallJust use pip to install ! :Dpip install opcalcLicenseMIT LicenseExamplesSimple calculator program:importopcalc.coreasopccalculator=opc.OperationCalculator()calculator.input_str="#*60"print(calculator.CalcExpression())print("SymCalc demo")#print("Copyright (c) Quix Fan  @ZQWEI  All right reserved.")calculator.input_str="#*60"print(calculator.CalcExpression())whileTrue:try:result=calculator.CalcExpression()print(result)except:print("Invalid Input!")calculator.input_str="#*60"print(calculator.CalcExpression())Customized string for calculationimportopcalc.coreasopccalculator=opc.OperationCalculator()calculator.input_str="2^3+(9/2^2)^2+1.5^0.3+9"result=calculator.CalcExpression()print(result)The result should be 23.191846935456855Comparisomtest code:import opcalc.core as opc
calculator = opc.OperationCalculator()
from time import time
start_time=time()
len=10000

for i in range(len):
    calculator.input_str = "2^3+(9/2^2)^2^2+1.5^0.3+9"
    result=calculator.CalcExpression()
print("Opcalc Time:" +str(time()-start_time))
start_time=time()
for i in range(len):
    input_str = "2^3+(9/2^2)^2^2+1.5^0.3+9"
    input_str=input_str.replace("^","**")
    eval(input_str)
print("eval Time:"+str(time()-start_time))result:
Opcalc Time:0.7659511566162109
eval Time:0.17852163314819336Although it is slower,but the principle of using stack remain the same, you can rewrite it into other languages easily!ReleasesLastest version: opcalc==0.0.1a3pip install opcalc==0.0.1a31.faster calculation
Package: opc-app
opc_appThis is a simple API that exposes a few routes to request information from the KEPThis app will make the following routes available at:http://<ip_address>:5000Depending on the router configuration you will be able to access this gateway from outside the local network as well, i.e. if it is NAT'd out.RoutesGET/ OR /apiTest if the API is alive{"message":"opc http endpoint is alive"}GET/api/sensor/<name>Fetch the list of available servers to connect to{"quality":"Good","time":"02/01/19 07:08:28","value":10614}GET/api/serversFetch the list of available servers to connect to{"servers":["Kepware.KEPServerEX.V6"]}GET/api/nodes/<node>Fetch the list of nodes{"nodes":["_AdvancedTags","_ConnectionSharing","_CustomAlarms","_DataLogger","_EFMExporter","_IDF_for_Splunk","_IoT_Gateway","_LocalHistorian","_Redundancy","_Scheduler","_SecurityPolicies","_SNMP Agent","_System","Channel1","Data Type Examples","Simulation Examples","XMPro"]}Pre-requisitesMake sure everything installed is 32-bit (even on a 64-bit os)Git BASHInstallgit BASH. We will use this terminal emulator to run our program that will communicate with the PLC server.There is no need to change any of the default settings during the installation processexceptthe below caveats.When installing git BASH the installer will ask you how you would like to use it from the command line. Select the option the same as the image below.The installer will also ask you which terminal emulator you would like to use, we will use Winows' default console.Python 2.7InstallPython 2.7 32-bit(if it is not already).Ensure that python gets added to Path. Make sure the small symbol next toAdd python..exe to Pathdoesnothave a cross through.Check the installation is working by opening git BASH and executing the following.pythonExpected output.Pywin32Install the 32-bit version ofpywin32for python 2.7.OpenOPCInstall theOpenOPClibrary.During the installation you'll be asked to choose the components you want to install.Uncheckthe OPC Gateway service.Quick StartAfter all pre-requisites the following steps should get the API up and runningInstall the appOpen git BASH and run the following command to install the app.pip install opc-appRun it!xmpro-demo-appOn the first time you run this program you may be prompted by Windows about allowing python to communicate through the firewall. We want to allow incoming connections so we need to make sure both boxes are checked like in the image below.Test it!Open the browser and browse to any of the routes. Try browsing tohttp://localhost:5000/apiand you should see the following.If you are using edge you will need to make sure you type thehttp://in front of the web adress or it willprobablynot work.Close it!You will need to close git BASH by clicking the red cross. Ctrl-c does not appear to be working at this point.
Package: opc-diag
opc-diagis a command-line application for exploring Microsoft Word, Excel,
and PowerPoint files from Office 2007 and later. Also known asOffice Open
XML, the structure of these files adheres to the Open Packaging Convention
(OPC), specified by ISO/IEC 29500.opc-diagprovides theopccommand, which allows OPC files to be browsed,
diff-ed, extracted, repackaged, and parts from one to be substituted into
another.Its primary use is by developers of software that generates and/or
manipulates Microsoft Office documents.A typical use would be diff-ing a Word file from before and after an operation,
say inserting a paragraph, to identify the specific changes Word made to the
XML. This is handy when one is developing software to do the same without
Word’s help:$ opc diff before.docx after.docxAnother main use is to diagnose an issue causing an Office document to not load
cleanly, typically because the software that generated it has a bug. These
problems can be tedious and often difficult to diagnose without tools likeopc-diag, and were the primary motivation for developing it.More information is available in theopc-diag documentation.History1.0.0 (2014-01-14)Add pretty-printing of extracted XML on extract command0.9.8 (2013-12-13)hotfix – fix UnicodeEncodeError on output containing non-ASCII chars0.9.7 (2013-09-23)Initial release – supporting browse, diff, diff-item, extract, repackage,
and substitute subcommands.
Package: opclabs-mqtt
OpcLabs.Mqtt (NuGet); opclabs_mqtt (Python)The OpcLabs.Mqtt (NuGet) or opclabs_mqtt (Python) package provides MQTT communication features for the OPC Labs products, using the System.Net.Mqtt library.
Its current use is with the OpcLabs.QuickOpc/opclabs_quickopc package for OPC UA PubSub transport protocol mappings based on MQTT.In most cases, it is recommended that you rather use the OpcLabs.MqttNet/opclabs_mqttnet package which is based on a different library and
has more features.Documentation:OpcLabs.Mqtt communication package
Package: opclabs-mqttnet
OpcLabs.MqttNet (NuGet); opclabs_mqttnet (Python)The OpcLabs.MqttNet (NuGet) or opclabs_mqttnet (Python) package provides MQTT communication features for the OPC Labs products, building on MQTTnet and
MQTTnet.Extensions.ManagedClient libraries by Christian Kratky.
Its current use is with the OpcLabs.QuickOpc/opclabs_quickopc package for OPC UA PubSub transport protocol mappings based on MQTT.In most cases, this package is recommended over the OpcLabs.Mqtt/opclabs_mqtt package which is based on a different library and has less
features.Documentation:OpcLabs.MqttNet communication package
Package: opclabs-pcap
OpcLabs.Pcap (NuGet); opclabs_pcap (Python)The OpcLabs.Pcap (NuGet) or opclabs_pcap (Python) package provides Ethernet (and UDP) communication features, using the PacketDotNet and SharpPcap libraries.
Its current use is with the OpcLabs.QuickOpc/opclabs_quickopc package for OPC UA PubSub transport protocol mappings based on Ethernet, or for work with Ethernet or UDP capture files.
Package: opcodes
Opcodes ProjectThe goal of this project is to document instruction sets in a format convenient for tools development. An instruction set is represented by three files:An XML file that describes instructionsAn XSD file that describes the structure of the XML fileA Python module that reads the XML file and represents it as a set of Python objectsThis project is a spin-off fromPeachPyassembler.Current statusThe project provides descriptions for most user-mode x86, x86-64, and k1om instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM and BMI2). The following instructions are currentlyNOTsupported:All priveledged instructions and user-mode system instructions (e.g. XSAVE, SLDT)Legacy string/streaming instructions (MOVS/SCAS/CMPS/STOS/LODS)LOCK and REP/REPZ/REPNZ prefixesx87 FPU instructionsVIA Padlock instructionsIntel HTM instructionsFor each instruction the following information is provided:Summary descriptionInstruction names in Intel assembly (PeachPy,NASM,YASMand MASM assemblers), AT&T assembly (GNU assembler) and Plan 9 assembly (Goassembler)Operand types and characteristics (whether the operand is input or output)Implicit input and output registersISA where this instruction was introducedWhether the instruction operates on FPU or MMX stateWhether the instruction operates on AVX or legacy SSE stateWhether the instruction has no dependency on input values when input operands refer to the same register (e.g.XOR eax, eaxhas no dependency oneax)Whether the instruction is supported by Native Client validator and when the support was introducedWhether the instruction that writes to a 32-bit register is recognized by x86-64 Native Client validator as zero-extendingInstallationpipinstall--upgradeOpcodesUsersPeachPy– x86-64 assembler embedded in Python that targets High-Performance Computing use-cases.Template-Assembly– Embedding x86 assembly code in C++ with metaprogramming using a domain specific language.Peer-Reviewed PublicationsMarat Dukhan “PeachPy meets Opcodes: Direct Machine Code Generation from Python”, Python for High-Performance Computing (PyHPC) 2015 (slides,paper on ACM Digital Library).AcknowledgementsThis work is a research project at the HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.The work was supported in part by grants to Prof. Richard Vuduc’s research lab,The HPC Garage, from the National Science Foundation (NSF) under NSF CAREER award number 0953100; and a grant from the Defense Advanced Research Projects Agency (DARPA) Computer Science Study Group programAny opinions, conclusions or recommendations expressed in this software and documentation are those of the authors and not necessarily reflect those of NSF or DARPA.
Package: opcodetools
Opcode ToolsKnown CPUs6502680368098052DVG (Atari vector generator used in OmegaRace, Asteroids, etc)Z80Z80GB (Z80 variant used in the Nintendo GameBoy)Disassemblerpy -m opcodetools.dasm Z80 0 "test1.bin+test2.bin"CPUOriginOne or more files that make up the binaryAssemblerpy -m opcodetools.asm hello.asmSee the Example Input below.The assembler recognizes four different kinds of text lines:A blank line (ignored)A label: a single word/number ending with a ":"A directive: a line beginning with a "."Everything else is a line of assembly opcodesCommentsLD  A,5  ; Five rows per objectEverything after a ";" on a line is ignored as a comment. Lines that begin
with a ";" are seen as blank lines (ignored).Includes.include hardware.asmKey/Value Constants._CPU = Z80
.CONST_A = 0x20KEY = VALUE pairs. Keys that begin with "_" are meant for the assembler.Data DefinitionBytes. 0x01,2,3,4,0x05Words.word 0x01,0x1234Example Input; Example assembly input

.include hardware.asm

._CPU = Z80
.CONST_A = 0x20

0x8000:
Start:

   LD  A,0x23     ; constant
   LD  A,(0x10)   ; memory location
   LD  HL,(DataB) ; memory location
   LD  HL,DataA   ; constant
   LD  E,CONST_A  ; constant
   JP  Start

DataA:
. 0x10,0x20,0x30

DataB:
. 0x40,0x50
Package: opcodify
OpCodifyopcodify is a command-line tool that helps visualize Opcodes for Solidity Smart Contracts. It generates a treemap visualization to provide insights into the distribution of Opcodes within a contract.InstallationYou can installopcodifyusing pip:pipinstallopcodifyUsageAfter installation, you can use theopcodifycommand to visualize Opcodes for a Solidity Smart Contract:opcodify--contractContract.solReplaceContract.solwith the path to your Solidity Smart Contract file.You should see the opcode treemap getting created in the working directory.The image below is an example of a Smart Contract:PrerequisitesPythonLicenseThis project is licensed under the Apache 2.0 License - see theLICENSEfile for details.ContributingContributions are welcome! If you encounter any issues or have suggestions for improvements, pleaseopen an issueor submit a pull request.