Saravanan666/pypi-org huggingface dataset:
Package: enochecker-core
enochecker_coreThis package provides dataclasses and enums adhering to thespecification.Since the specification defines keys in camel case, whereas this package follows python naming convention and has keys in snake case, the keys need to be transformed when sending/receiving them over the wire. The recommended way is to use thejsons(notjson) package.Example:>>> from enochecker_core import CheckerTaskResult, CheckerResultMessage
>>> import jsons
>>> jsons.dumps(CheckerResultMessage(result=CheckerTaskResult.OK, message="some message"), use_enum_name=False, key_transformer=jsons.KEY_TRANSFORMER_CAMELCASE)
'{"message": "some message", "result": "OK"}'
>>> jsons.loads('{"message": "some message", "result": "OK"}', CheckerResultMessage, key_transformer=jsons.KEY_TRANSFORMER_SNAKECASE, strict=True)
CheckerResultMessage(result=<CheckerTaskResult.OK: 'OK'>, message='some message')
Package: enochecker-test
enochecker_testAutomatically test services/checker using the enochecker APIUsageenochecker_testcan be used to run tests against a checker, optionally you can specify wich tests to run e.g.enochecker_test test_getflag[0] test_exploit_per_exploit_idwill run only the firstgetflagtest and allexploit_per_exploit_idtests.usage: enochecker_test [-h] [-a CHECKER_ADDRESS] [-p {1..65535}] [-A SERVICE_ADDRESS] [testcase ...]

Utility for testing checkers that implement the enochecker API

positional arguments:
  testcase              Specify the tests that should be run in the syntax expected by pytest, e.g. test_getflag. If no test is specified, all tests will be run.

options:
  -h, --help            show this help message and exit
  -a CHECKER_ADDRESS, --checker-address CHECKER_ADDRESS
                        The address on which the checker is listening (defaults to the ENOCHECKER_TEST_CHECKER_ADDRESS environment variable)
  -p {1..65535}, --checker-port {1..65535}
                        The port on which the checker is listening (defaults to ENOCHECKER_TEST_CHECKER_PORT environment variable)
  -A SERVICE_ADDRESS, --service-address SERVICE_ADDRESS
                        The address on which the service is listening (defaults to ENOCHECKER_TEST_SERVICE_ADDRESS environment variable)
Package: enos
Join us on gitter :About EnosEnos aims at reproducible experiments of OpenStack.  Enos relies onKolla Ansibleand
helps you to easily deploy, customize and benchmark an OpenStack on
several testbeds includingGrid’5000,Chameleonand more generally any
OpenStack cloud.InstallationEnos is best installed viapip.  It is
tested with python3.7+:pip install enosQuick StartFor the quick-start, we will bring up an OpenStack on VirtualBox.
VirtualBox is free and works on all major platforms.  Enos can,
however, work with many testbeds includingGrid’5000andChameleon.First, make sure your development machine hasVirtualBoxandVagrantinstalled.  Then, ensure that
you have at least 10 GiB of memory.To deploy your fist OpenStack with enos:enos new --provider=vagrant:virtualbox  # Generate a `reservation.yaml` file
enos deployEnos starts three virtual machines and configures Kolla Ansible to
deploy the OpenStack control plane on the first one, the network
related services (Neutron, HAProxy, RabbitMQ) on the second one, and
use the last one as a compute node.  Note that the full deployment may
take a while (around 30 minutes to pull and run all OpenStack docker
images).You cancustomizethe
deployed services and the number of virtual machines allocated by
modifying the generatedreservation.yamlfile.  Callsenos--helpor read thedocumentationfor more information.AcknowledgmentEnos is developed in the context of theDiscoveryinitiative.LinksDocs -https://beyondtheclouds.github.io/enos/Discovery -https://beyondtheclouds.github.io/Docker -https://hub.docker.com/r/beyondtheclouds/
Package: enos-api-sdk-python
Using EnOS Service SDK for Python (Preview Edition)This repo contains the preview edition of EnOS Service SDK for Python. This article instructs how to prepare your development environment and use the EnOS Service SDK for Python.Installing PythonObtaining EnOS Service SDK for PythonKey FeaturesAPI ReferenceSample CodeInstalling PythonTo use the EnOS Service SDK for Python, you will need Python 2.7.13+ or 3.5.3+, andpipis required.Obtaining EnOS Service SDK for PythonYou can obtain the SDK through the following methods:Install from pipDownload the source code by cloning this repo and build on your machineInstalling from PIPUse the following command to install EnOS Service SDK for Python from PIP.pipinstallenos-api-sdk-pythonBuilding from Source CodeObtain the EnOS Service SDK for Python source code from GitHub:git clone https://github.com/EnvisionIot/enos-api-sdk-python.gitFrom the directory where the source code is stored, run the following command:python setup.py installKey FeaturesAs the preview edition, the EnOS Service SDK for Python currently contains only partial of the EnOS Service REST API features as listed below:Apply certificate by device keyPost measure point dataCreate and list productsAPI ReferenceTo access the EnOS API documentation, go toEnOS API > API Documentsin the EnOS Console. For each service category, you can check the summary of the APIs from the API list table and click theMoreicon for view details of each specific API, including API description, calling method, requesting URL, parameter description, calling sample, and response sample.Sample CodeThis sample demonstrates how to post a struct type of measure point to the EnOS Cloud.fromenosapi.request.PostMeasurepointsEnOSRequestimportPostMeasurepointsEnOSRequestfromenosapi.client.EnOSDefaultClientimportEnOSDefaultClientimporttimeimportjsonenos_api_url="https://{HOST}/enosapi/"# the application configuration created in consoleaccess_key="ACCESS_KEY"secret_key="SECRET_KEY"# sub-device parametersdevice_asset_id='DEVICE_ASSET_ID'product_key='PRODUCT_KEY'# OU IDorg_id="OU_ID"if__name__=="__main__":timestamp=int(time.time()*1000)# timestamp in millisecondsstruct_measure_point={'Image1':'local://file1','Sensor':'PM2_5','UpperLimit':100,'Value':120,'AlertFlag':1,'AlertMessage':'PM10 over limit'}measure_points={'Image0':struct_measure_point}data=[{'measurepoints':measure_points,'assetId':device_asset_id,'time':timestamp}]param={"data":json.dumps(data)}# two files named apple.png and orange.png should be put into the same directory as this code filefile_to_upload={"file1":open("image1.jpg",'rb')}request=PostMeasurepointsEnOSRequest(org_id=org_id,product_key=product_key,params=param,upload_file=file_to_upload)enos_api_client=EnOSDefaultClient(enos_api_url,access_key,secret_key)response=enos_api_client.execute(request)print(response.status,response.msg)
Package: enos-kubernetes
Deploys Kubernetes on various providers. Deployments are for
evaluation/experimental purpose (not production).Behind the scenes this project uses:Kubespray (https://github.com/kubernetes-sigs/kubespray): It uses decent
default values but this should be reasonnably customizable (through roles and
vars in the configuration file)EnOSlib (https://gitlab.inria.fr/discovery/enoslib) for the framework part.Command line overviewUsage:ek[OPTIONS]COMMAND[ARGS]...Options:--helpShowthismessageandexit.Commands:backupBackupthedeployedenvironmentbuildPreconfigureamachinewithallthe...deployClaimresourcesfromaPROVIDERandconfigure...destroyDestroythedeployedenvironmentg5kClaimresourcesonGrid'5000(frontend).hintsGivesomehintsonthedeploymentinventoryGeneratetheAnsibleinventory[afterg5kor...post_installPostinstallthedeployementprepareConfigureavailableresources[afterdeploy,...resetResetsKubernetes(seekspraydoc)vagrantClaimresourcesonvagrant(localhost).Usage overviewInstall the project:virtualenv -p python3 venv
source venv/bin/activate
pip install enos-kubernetesConfigure the Grid5000 REST API access:echo '
username: MYLOGIN
password: MYPASSWORD
' > ~/.python-grid5000.yamlGet a sample configuration file at:wget https://gitlab.inria.fr/msimonin/enos-kubernetes/raw/master/conf.yamlDeploy on g5k:ek deploy g5kDeploy on g5k using virtual machines:ek deploy vmong5kBuild a base image on g5k:ek build g5kBuild a base image on vmong5k with an alternative cluster:ek build vmong5k --cluster=chetemiThis also can be used from python directly using the provided API:# pseudo-code to deploy to g5k
from enos_kubernetes import tasks

...
tasks.g5k(...)
tasks.inventory(...)
tasks.prepare(...)
...
Package: enoslib
What the ☆homoterogeneous☆ ?Distributed systems practitioners on bare-metal testbeds know it: resources
(e.g. computes, networks) on a bare-metal infrastructure may have these slight
differences between each other that experimental code can become hairy. For
such code, achieving practical portability (e.g changing the infrastructure
parameters) is thus a tedious time consuming task.☆Homoterogeneous☆ has been coined to express the gap between the idea
we have of a computing infrastructure, where resources have
static/predictable setup, and the reality of interacting with them on a daily
basis.In this context, EnOSlib smoothes the experimental code and candeal with various platforms (e.g. local machine, scientific testbed, virtualized environments)interact programmatically with different your remote resources: compute
(servers, containers) and networks (ipv4, ipv6)deployready-to-useexperimentation services (e.g instrumentation, observability tools).emulate complex network topologies (e.g for your FOG experiments)integrate your code with interactive development environment like Jupyter.
Package: enoslib-ansible
enoslib-ansible repackagesansible(GPLv3) exclusively tailored for theEnOSlib project.The rationale behind this is thatansibleincludes too much collections with
regards to what is actually needed by the EnOSlib users.VersionningWe follow the versionning numbers of theansiblepackage but we append an
internal revision number.  So for instanceenoslib-ansible==7.5.0.1repackages
the same version of a subset of collections fromansible==7.5.0.Each major version is kept in dedicated branch:  for instanceansible_6for
repackagingansible~=6.Buildingpythonsetupbdist_wheelHow toThis project is based onAntsibull project.Exact collection / ansible-core version number are kept in theansible-build-data.
Package: enos-mqtt-sdk-python
Using EnOS Device SDK for PythonTable of ContentsInstallationPrerequisitesInstalling from PipBuilding From SourceFeature ListQuick StartSample CodesRelated InformationRelease NotesThe EnOS Device SDK for Python allows developers to write Python scripts to use their devices to access EnOS IoT hub through MQTT.InstallationPrerequisitesTo use the EnOS Device SDK, you will need  Python 3.5.3 or later, andpipis required. Note that Python 2.x is not recommended as some functions might not be compatible with Python 2.x in future SDK versions.If you are upgrading from an earlier version of EnOS Device SDK for Python, you need to change the path of the SDK package by addingenosprefix in your "Import" statement  in the existing Python codes to use the latest version.You can install the SDK from pip, or build from source.Installing from pipThe latest version of EnOS Device SDK for Python is available in the Python Package Index (PyPi) and can be installed usingpipinstallenos-mqtt-sdk-pythonUpdatesetuptoolsif necessary:pipinstall--upgradesetuptoolsBuilding From SourceObtain the source code of EnOS Device SDK for Python.From GitHub:git clone https://github.com/EnvisionIot/enos-mqtt-sdk-python.gitFrom EnOS SDK Center. ClickSDK Centerfrom the left navigation of EnOS Console, and obtain the SDK source code by clicking the GitHub icon in theObtaincolumn.From the directory where the source code is stored, run the following command:python setup.py installFeature ListFor the list of features supported by this SDK and the availability of EnOS device connectivity and management features in all SDKs we provide, seeEnOS Device SDK.Quick StartCreate an MQTT client and connect it to EnOS Cloud using the secret-per-device authentication:client=MqttClient(enos_mqtt_url,product_key,device_key,device_secret)client.connect()Build a request to post a measurement point and publish the request using the connected client.measure_point_post_request=MeasurepointPostRequest.builder().add_measurepoint('measurepoint_id',measurepoint_value).set_timestamp(timestamp).build()# publish request and wait for the responsemeasure_point_response=client.publish(measure_point_post_request)Close the connectionclient.close()Sample CodesEstablishing Connection with EnOS CloudDevice Tag OperationsDevice Attribute OperationsReporting Measurement PointsReporting EventsReceiving Commands from CloudPassing Through Device Information or Receiving Passed-through Information from CloudManaging Sub-devicesOver-the-air Firmware UpgradeRelated InformationTo learn more about EnOS IoT Hub, seeEnOS IoT Hub Documentation.To learn more about how to develop your device for EnOS IoT Hub, see EnOS Device Development Guide (Python).Release Notes2019/11/15(0.1.0): Reconstruction and new functions added.2021/07/23(0.1.1): Support specified encryption algorithms suite.
Package: enos-poseidon
Project descriptionAthena is the core SDK for requesting the EnOS APIExample1.1 Queryfromposeidon.poseidonimportposeidonappkey='xxxxx-xxxx-xxxx-xxxx-xxxxxxxx'appsecret='xxxxx-xxxx-xxxx-xxxx-xxxxxx'url='http://{apim-url}/someservice/v1/tyy?sid=28654780'req=poseidon.urlopen(appkey,appsecret,url)print(req)1.2 Headerfromposeidon.poseidonimportposeidonappkey='xxxxx-xxxx-xxxx-xxxx-xxxxxxxx'appsecret='xxxxx-xxxx-xxxx-xxxx-xxxxxx'url='http://{apim-url}/someservice/v1/tyy?sid=28654780'header={}req=poseidon.urlopen(appkey,appsecret,url,None,header)print(req)1.3 Bodyfromposeidon.poseidonimportposeidonappkey='xxxxx-xxxx-xxxx-xxxx-xxxxxxxx'appsecret='xxxxx-xxxx-xxxx-xxxx-xxxxxx'url='http://{apim-url}/someservice/v1/tyy?sid=28654780'data={"username":"11111","password":"11111"}req=poseidon.urlopen(appkey,appsecret,url,data)print(req)
Package: enot-autodl
Embedded Network Optimization TechnologyENOT, or Embedded Network Optimization Technology, is a flexible tool for Deep Learning developers which automates
neural architecture optimization.
It can be useful in the following scenarios:Target metric maximization (e.g., classification accuracy or intersection over union);Target metric maximization with constrained computational resources (e.g., RAM, latency);Framework advantages:Controlled ratio between latency and network performance;Networks in the pre-trained search space can exceed their stand-alone variants (in some scenarios);Compatibility with almost any DL task and simple integration with the existing training pipelines.Joint neural architecture search, prunning and distillation procedure can be applied to found optimal neural
network architecture.To use this package please refer to ourdocumentation page.Visitour websitefor more information.
Package: enotification
enotificationIntroductionenotificationis a small package based onzmail, used to email you when your function is finished.Installationpip install enotificationRequirementsSinceenotificationis based on zmail, you should meet the requirements of zmail:Before using it, please ensure:Using python3Open SMTP/POP3 functions in your mail (For@163.comand@gmail.comyou need to set your app private password)Then, all you need to do is just import zmail.Note, since this package usesf-string, thus it requires Python>=3.6.QuickStartenotificationis designed as a decorator classfromenotificationimportENotificationimporttime@ENotification(send_from="your email",password="your email password")deftest_func():print("test!")time.sleep(10)if__name__=="__main__":test_func()# your email would receive an email like this:# subject: This is a notification from enotification!# content:# Your function test_func is finished!# Start time: 2021-04-23 11:13:54# End time: 2021-04-23 11:14:04# Time cost: 0:00:10!TODOAsk user to input her email account or password if it is empty (usinggetpassmodule). Usage:@ENotification().Note:the()is must.Q & AIf the notification email is not sent correctly, please read zmail'sQ&Apart to see more specific configurations.
Package: enotipy
ENotiPyDescriptionENotipy is a simple script that emails the users upon code completion or failure.Environment SetupENotipy requires 4 environment variables to be setup prior to use. These variables
can be set 3 different ways. The first is manually. For a bash shell this would
look something like:export ENOTIPY_EMAIL="dev.notipy@gmail.com"
export ENOTIPY_KEY="SuperSecretPassword"
export ENOTIPY_SMTP="smtp.gmail.com"
export ENOTIPY_PORT="587"The next way is the info file. These commands can also be placed in a file like
the SAMPLE_INFO file provided and passed to theinfoFileEnvSetup(./SAMPLE_INFO)function in a script or using-i=SAMPLE_INFOas a command line argument.The final way is to request environment setup prompts. This can be done withrequestEnvSetup()in a script or-r=Trueon the command line.For examples of these options, checkoutscriptExampleandcodeExample.pyNote that to use strictly "enotipy" on the commandline that the package must be installed via pip. Otherwise, replace "enotipy" with "python /path/to/enotipy.py".Script Examplescommands:To access the help menu you can invokeenotipy-h#Brings up help menuEnvironment set up can be done with prompts by asenotipy"python scriptCodeExample.py"-r=True#Execute with env setup requestor using an info file asenotipy"python scriptCodeExample.py"-i=SAMPLE_INFO#Execute with env setup info fileIf you want to use a sample info fileSAMPLE_INFOuseenotipy-g#Generates SAMPLE_INFOThe command can also be given a timeout time in minutesenotipy"python scriptCodeExample.py"-t=60#timeout after 60 minutesscriptExampleCode.py:deftest_fcn(*args):x,=args;foriinrange(x):print(i)if__name__=="__main__":test_fcn(100)Code ExampleIf you want to use ENotipy in a code it can be used asimportenotipy.enotipyasenotipyif__name__=="__main__":#The function to be executeddeftest_fcn(*args):x,=args;foriinrange(x):print(i)# notipy.requestEnvSetup() #This option requests user input to set environmentargs=(10,)enotipy.infoFileEnvSetup("./INFO")#This option sets the environment with an info file# enotipy.infoFileEnvSetup("./SAMPLE_INFO") #This option sets the environment with an info filenotifier=enotipy.ENotiPy()#Creating notipy objectnotifier.run(test_fcn,*args)#Calling run to execute the function and send email when completed.
Package: enp
enp(stands for Everything in NumPy) provides implementation of deep learning, machine learning, and math algorithms in
NumPy and pure Python.InstallationYou can install the library using pip:pip install enpDescriptionThe library consists of 3 main parts:deep learningexamples of usage are in examples/nnimpementation is in enp/nnloosely follows PyTorch conventionsmachine learningexamples of usage are in examples/mlimpementation is in enp/mlloosly follows scikit-learn conventionslinear algebraexamples of usage are in tests/test_linear_algebra.py and tests/test_linear_algebra_additional.pyimpementation is in enp/linalgDeep LearningExample of building, prediction, and training a simple neural network consisting of linear layers:from enp.nn import *

model = Model(learning_rate=0.0075)
input_layer = InputLayer(layer_dim=12288)
linear_1 = Linear(layer_dim=7, prev_layer=input_layer, activation='relu')
linear_2 = Linear(layer_dim=1, prev_layer=linear_1, activation='sigmoid')
cost_layer = BCELoss(layer_dim=1, prev_layer=linear_2)
model.layers = [input_layer, linear_1, linear_2, cost_layer]
model.train(x=train_x, y=train_y, num_iterations=2500)
test_y_pred = model.predict(test_x)Machine LearningExample of building, prediction, and training a linear regression:from enp.ml import LinearRegression
import numpy as np

X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
y = np.dot(X, np.array([1, 2])) + 3
reg = LinearRegression().fit(X, y)
prediction = reg.predict(np.array([[3, 5]]))Linear AlgebraExample of solving a system of linear equations Ax=b:from enp.linalg import solve_system_of_linear_equations
import numpy as np

a = np.array([[0, -2],
              [4, 7]])
b = np.array([1, 2])
x = solve_system_of_linear_equations(a, b)
Package: enpassreadercli
A cli to access enpass 6 encrypted databases and read, list and search values.Documentation:https://enpassreadercli.readthedocs.org/en/latestDevelopment WorkflowThe workflow supports the following stepslinttestbuilddocumentuploadgraphThese actions are supported out of the box by the corresponding scripts under _CI/scripts directory with sane defaults based on best practices.
Sourcing setup_aliases.ps1 for windows powershell or setup_aliases.sh in bash on Mac or Linux will provide with handy aliases for the shell of all those commands prepended with an underscore.The bootstrap script creates a .venv directory inside the project directory hosting the virtual environment. It uses pipenv for that.
It is called by all other scripts before they do anything. So one could simple start by calling _lint and that would set up everything before it tried to actually lint the projectOnce the code is ready to be delivered the _tag script should be called accepting one of three arguments, patch, minor, major following the semantic versioning scheme.
So for the initial delivery one would call$ _tag –minorwhich would bump the version of the project to 0.1.0 tag it in git and do a push and also ask for the change and automagically update HISTORY.rst with the version and the change provided.So the full workflow after git is initialized is:repeat as necessary (of course it could be test - code - lint :) )codelinttestcommit and pushdevelop more through the code-lint-test cycletag (with the appropriate argument)buildupload (if you want to host your package in pypi)document (of course this could be run at any point)Important InformationThis template is based on pipenv. In order to be compatible with requirements.txt so the actual created package can be used by any part of the existing python ecosystem some hacks were needed.
So when building a package out of thisdo notsimple call$ python setup.py sdist bdist_eggas this will produce an unusable artifact with files missing.Instead use the provided build and upload scripts that create all the necessary files in the artifact.Project FeaturesTODOHistory0.0.1 (27-03-2021)First code creation0.1.0 (27-03-2021)Initial functionality.0.1.1 (27-03-2021)Reverted to default styling for search function.0.2.0 (27-03-2021)Added fuzzy searching capabilities.0.2.1 (07-07-2021)Added pipeline and bumped dependencies.0.3.0 (02-03-2023)Implement totp retrieval.0.3.1 (02-03-2023)Calculate actual totp from provided seed and return that.0.4.0 (10-08-2023)Implement support for pbkdf2-rounds setting as an argument.0.4.1 (10-08-2023)Fix requirements on the pipeline for upload.0.4.2 (10-08-2023)Improve error message where pbkdf2 round value could be wrong.