Saravanan666/pypi-org huggingface dataset:
Package: checkpoint-api
Check Point APIInstallationpip install checkpoint-apiBasic usageget objectfromcheckpoint_api.checkpointimportCheckpointSessionwithCheckpointSession("10.111.30.25","api","CGx3IjUSd47TrXKh6zJ7")ascps:data={'name':'IP_10.14.1.2_xlsrv02','details-level':'standard'}response_json=cps.post("show-host",json=data)print(response_json)Output:{'color': 'black',
 'comments': '',
 'domain': {'domain-type': 'domain',
            'name': 'SMC User',
            'uid': '41e821a0-3720-11e3-aa6e-0800200c9fde'},
 'groups': [],
 'icon': 'Objects/host',
 'interfaces': [],
 'ipv4-address': '10.14.1.2',
 'meta-info': {'creation-time': {'iso-8601': '2020-05-27T10:26+0200',
                                 'posix': 1590567969972},
               'creator': 'user01',
               'last-modifier': 'user01',
               'last-modify-time': {'iso-8601': '2020-05-27T10:26+0200',
                                    'posix': 1590567969972},
               'lock': 'unlocked',
               'validation-state': 'ok'},
 'name': 'IP_10.14.1.2_xlsrv02',
 'nat-settings': {'auto-rule': False},
 'read-only': False,
 'tags': [],
 'type': 'host',
 'uid': '8874eceb-e217-476e-a16c-b1ec2926b921'}get gateways and servers for MDSfromcheckpoint_api.checkpointimportCheckpointSessionfrompprintimportpprintcheckpoint_username="user01"checkpoint_password="toosecret"withCheckpointSession("10.1.235.2",checkpoint_user=checkpoint_username,checkpoint_pass=checkpoint_password,)ascps:pprint(cps.post("show-gateways-and-servers",json={"details-level":"full"}))Authenticate via api_key and add new access rulefromcheckpoint_api.checkpointimportCheckpointSessionimportloggingfromdatetimeimportdatetimecp_firewall_policy="PoC Network"source_zone="TRUST"destination_zone="UNTRUST"now=datetime.now()user="userxyz"withCheckpointSession("192.168.20.100",api_key="hc9emRAB+fECy7VJkLEIeg==",read_only=False)ascps:logging.info(cps.post("add-access-rule",json={"layer":cp_firewall_policy,"position":{"above":"Cleanup rule"},"name":f"Drop_zone_from_{source_zone}_to_{destination_zone}","source":f"GRP_ZONE_{source_zone}","destination":f"GRP_ZONE_{destination_zone}","track":{"type":"Log"},"action":"Reject","comments":f"{now}-{user}",},))
Package: checkpoint-client
# checkpoint_clientA python client to interact with CheckPoint R80 API (https://sc1.checkpoint.com/documents/R80/APIs/#ws).# Installation```pip install checkpoint-client```# Features1. Perform basic functionality such as add/delete objects, get tags, show objects in group, publish and install policy.2. Authentication session (sid) can persist using configuration file.  If session is invalid, automatically re-authenticate and update sid.3. Management server fingerprint verification.# Disclaimers1. CheckPoint R80 API does not allow adding/deleting multiple host objects to a group in one call.  Each host object must be created and then added/deleted to the group.  This results in very slow (serial) execution.2. In our testing, we have noticed some instability with very large set (10k+) of changes.# ExampleSample configuration file```[checkpoint]username = myusername# API does not support cert based authenticationpassword = mypassworddomain = DMZ# Some useful fileds to make CP session more descriptivesession-name = inet_blacklistsession-comments = API automation examplesession-description = Automated DMZ blacklisting of known malicious IPs (from TIP).cp_server = 10.10.100.32# Exit if fingerprint verification failsfingerprint = 82C9C0B60850901BBDF5653D794ADF8E8AAEA1B7verify_fingerprint = True# No changes made if set to Truedryrun = False# Automatically populated if authentication successfulsid =[dmz_blacklist]color = redgroup = GRP-DMZ_BAD_IP_FROM_TIPtarget = LAB_DMZ_CLUSTER```A simple script to add host objects to an existing group object, publish changes and finally, install the policy.```from checkpoint_client import CheckPointClientfrom checkpoint_client.utils import set_default_logger, add_logger_streamhandler# Instantiate a clientlogger = set_default_logger("inet_blacklist_mgr", "DEBUG")add_logger_streamhandler(logger, "INFO")cpc = CheckPointClient('configs/example.ini', logger)bad_IPs = ['1.2.3.4', '5.6.7.8', '9.0.11.12', '13.14.15.16']color = config.get('dmz_blacklist', 'color', fallback=cpc.default_color),group = config.get('dmz_blacklist', 'group', fallback="MY_DEFAULT_GROUP")target = config.get('dmz_blacklist', 'target', fallback="DMZ_CLUSTER")success_count = 0fail_count = 0for bad_ip in bad_IPs:resp = cpc.add_host(name=bad_ip,ipaddr=bad_ip,tags="bad_ips_from_tip",comments="Import example using API wrapper",color=color,groups=group)if resp.success:success_count += 1else:fail_count += 1logger.info({'message': {'total': len(bad_IPs), 'success': success_count, 'fail': fail_count})# Publish changesresp = cpc.publish()if resp.success:logger.info({'message': "Policy publication successful"})else:logger.error('message': "Policy publication failed.")# Install policy# https://sc1.checkpoint.com/documents/R80/APIs/?#gui-cli/install-policyparams = {'access': True, 'threat-prevention': False, 'install-on-all-cluster-members-or-fail': True}resp = cpc.install_policy(group, target, **params)if resp.success:logger.info({'message': "Policy installation successful"})else:logger.error('message': "Policy installation failed.")cpc.logout()```
Package: checkpointe
checkpointeA simple progress timer/memory tracker for debugging python scripts.OverviewCheckpointe is a tool for locating areas of code that are time or memory-intensive. This allows the user to:Track specific function calls in real-timeTag specific checkpoints with an identifying messageAnalyze a final output that shows time and percentage of time between each checkpointReorder checkpoints easily without having to refactor codeAnalyze memory usage to determine where usage is peakingRequiresdatetimetracemalloc (for memory tracking)InstallationCheckpointe is available for download using pip:pip install checkpointeUsing CheckpointeStartTo start tracking time and/or memory, initialize checkpointe with the .start() functionimport checkpointe as check

check.start(summary=True, verbose=True, memory=True)Setting these defaults determines the level of detail checkpointe prints to stdout:summary (default = True): prints a summary after calling the.stop()methodverbose (default = False): if enabled, outputs data at each check pointmemory (default = False): if enabled, tracks and outputs information about system memory usagePointCall the.point()method to create a marker at any point in the code.add = 2 + 2

check.point("ADDITION")

mult = 2 * 2

check.point("MULTIPLICATION")

exp = 2 ** 2

check.point("EXPONENTIAL")Ifverbose=True, a statement will be printed at each checkpoint.StopWhen you are ready to stop tracking, call the.stop()method.check.stop()Ifsummary=True, a summary statement will be printed. Each marker will be displayed, along with the time elapsed since the previous marker and the percentage of overall time elapsed.Ifmemory=True, a final memory statement will be printed, with memory usage at each marker, along with the peak memory usage noted at each marker.Future DevelopmentFuture versions will enable integration with logging to an output file.
Package: checkpointed-core
Checkpointed - A library for management of nonlinear processing pipelines.IntroductionThe Checkpointed library provides a small interface for chaining pipelines of
different operations. The main functionality of the library is the ability
to maintain checkpoints for every performed operation.ExamplesfromcheckpointedimportPipeline,NoopSteppipeline=Pipeline('example-pipeline')# A regular inputinput1=pipeline.add_source(NoopStep,name='input-1')# An input whose result is also stored as an output in the file# 'input-2-output.txt'input2=pipeline.add_source(NoopStep,name='input-2',is_sink=True,filename='input-2-output.txt')# A processing step which depends on input1node3=pipeline.add_step(NoopStep,name='node-3')pipeline.connect(input1,node3)# A processing step which depends on both input2 and node3node4=pipeline.add_step(NoopStep,name='node-4')pipeline.connect(input2,node4)pipeline.connect(node3,node4)# Output step which depends on node4out5=pipeline.add_sink(NoopStep,name='out-5',filename='out-5-output.txt')pipeline.connect(node4,out5)# Build the execution planplan=pipeline.build()# Configuration information for all the steps.# Empty because NoopStep does not require configuration.config={input1:{},input2:{},node3:{},node4:{},out5:{}}# (optional) setup a loggerimportlogginglogger=logging.getLogger('example-pipeline')logger.addHandler(logging.StreamHandler())# Run the pipelineplan.execute(# Configuration used to instantiate the steps in the pipeline.# Must have one entry for every step.config_by_step=config,# Store `input-2-output.txt' and `out-5-output.txt'# in directory ./out/example-pipelineoutput_directory='out',# Store checkpoints for every pipeline step# in directory ./checkpoints/example-pipelinecheckpoint_directory='checkpoints',# Pass in a logger object in order to enable logging.logger=logger)With some actual arguments applied:fromcheckpointedimportPipeline,NoopSteppipeline=Pipeline('example-pipeline')node=pipeline.add_source(NoopStep,is_sink=True,filename='out.txt')plan=pipeline.build()importlogginglogger=logging.getLogger('example-pipeline')logger.addHandler(logging.StreamHandler())plan.execute(config_by_step={node:{'echo-io':True}},output_directory='out',checkpoint_directory='checkpoints',logger=logger)You will get an error on an invalid argument:fromcheckpointedimportPipeline,NoopSteppipeline=Pipeline('example-pipeline')node=pipeline.add_source(NoopStep,is_sink=True,filename='out.txt')plan=pipeline.build()importlogginglogger=logging.getLogger('example-pipeline')logger.addHandler(logging.StreamHandler())plan.execute(config_by_step={node:{'echo-execute':True,'echo-io':False}},output_directory='out',checkpoint_directory='checkpoints',logger=logger)
Package: checkpointed-steps
checkpointed-stepsIntroductionThis package defines a large amount of ready to use components
for the checkpointed library.ReferencesThis section provides a list of papers which were used for the
development of checkpointed-steps, or describe one of the
underlying dependencies used.[1] Pedregosa et al., Scikit-learn: Machine Learning in Python, JMLR 12, pp. 2825-2830, 2011.[2] McInnes et al.,  UMAP: Uniform Manifold Approximation and Projection. Journal of Open Source Software, 3(29), 861, 2018.[3] Nils Reimers and Iryna Gurevych, Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks, 2019References in Bib format@article{scikit-learn,
    title={Scikit-learn: Machine Learning in {P}ython},
    author={Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V.
         and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P.
         and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and
         Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},
    journal={Journal of Machine Learning Research},
    volume={12},
    pages={2825--2830},
    year={2011}
}@article{McInnes2018, 
    doi = {10.21105/joss.00861}, 
    url = {https://doi.org/10.21105/joss.00861}, 
    year = {2018}, 
    publisher = {The Open Journal}, 
    volume = {3}, 
    number = {29}, 
    pages = {861}, 
    author = {Leland McInnes and John Healy and Nathaniel Saul and Lukas Großberger}, 
    title = {UMAP: Uniform Manifold Approximation and Projection}, 
    journal = {Journal of Open Source Software}
}@misc{reimers2019sentencebert,
      title={Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks}, 
      author={Nils Reimers and Iryna Gurevych},
      year={2019},
      eprint={1908.10084},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
Package: checkpointlib
checkpointlibA package to send ML training checkpoints online in PythonWhen training Machine Learning models, it's common that it can take a while to train on a computer which you obviously can't sit beside all day, every day.
This library allows you to send progress checkpoints online to our servers, so that you can see your progress when you're away.Using checkpointlibOnce you've installed the python file containing the client-side code, you'll be able to do the following to set your program up to send progress checkpoints online.First, import checkpointlib:from checkpointlib import checkpointlibCreate a new checkpointAccount object:myCheckpointAccout = checkpointlib.checkpointAccount(0)ORmyCheckpointAccount = checkpointlib.checkpointAccount("[PUT YOUR KEY HERE]")If you do the first option, and make the value be the integer 0, then it will automatically create a random user key for you. However, if you choose to do the second option, then you can select your own user key.Save your user key for later - you can check just what your key is withmyCheckpointAccount.key, which you can use if you want to save to the same key later. However, you can also usemyCheckpointAccount.urlto get the full URL of your checkpoint account. Visit that URL to see the progress online from another device (this will be explained more later)Save progress to your key online - to save progress, type:myCheckpointAccount.saveCheckpoint("[TYPE THE PROGRESS UPDATE HERE]")This will save the latest progress update, which you enter as an argument, to your online key (which you can see at the URL which you receive withmyCheckpointAccount.url)Clear your checkpoint progress:myCheckpointAccount.clear()This will clear the checkpoint progress online on your key, butdoes notdelete the checkpoint account.Delete the checkpoint account from our servers:myCheckpointAccount.delete()This will delete your account from our servers - however, it can still be created again.Checking progress onlineTo see your program's progress online, you can do one of the following:Go to the URL given by enteringmyCheckpointAccount.url; ORVisit the webpage "https://kendasi.com/checkpoints/" + your user key (given by enteringmyCheckpointAccount.key)Open sourceThis project is open source under the GNU 3.0 license.
You are free to use this code and anything else within the project however you see fit, besides selling it as closed-source software.
The code is avaliable on github.
Package: checkpoint-schedules
checkpoint_schedulescheckpoint_schedulesprovides schedules for step-based incremental
checkpointing of the adjoints to computer models. The schedules contain
instructions indicating the sequence of forward and adjoint steps to be
executed, and the data storage and retrieval to be performed.The schedule instructions are independent of the model implementation,
which enables the model authors to switch between checkpointing algorithms
without recoding their adjoint solvers. Conversely,checkpoint_schedulesprovides developers of checkpointing algorithms with a direct mechanism to convey
their work to model authors.Installationcheckpoint_schedulesis a Python package and can be installed using pippip install checkpoint-schedulesUsageThe usage guide ofcheckpoint_schedulesis availablehere.ContributingWe welcome contributions tocheckpoint_schedules!
To contribute please consider the following steps:Fork the repository.Make your changes.Make sure that the tests pass by runningpytest testandpytest --nbval-lax docs/notebooks/Add tests for your changes (if applicable).Add documentation for your changes that follows theSphinxformat.Submit your pull request.Bug reportsPlease report bugs on theissue tracker.DocumentationThe complete documentation for checkpoint_schedules is available atFiredrake project website.Licensecheckpoint_schedulesis licensed under the GNU LGPL version 3. See the LICENSE file for details.
Package: check_puppetdb_node
check_puppetdb_nodecheck_puppetdb_node is a Nagios / Icinga plugin that allows you to check the
agent/run status by querying PuppetDB. This is more robust and reliable
than parsing the report YAML that the agent might store on disk.This plugin requires:pypuppetdbInstallationYou can install this package from source or from PyPi.$pipinstallcheck_puppetdb_node$gitclonehttps://github.com/daenney/check_puppetdb_node$pipinstall.If you wish to hack on this, clone the repository as above but instead run:$pipinstall-e.UsageOnce you have check_puppetdb_node installed simply call the script with the–helpargument for more informationContributingWe welcome contributions to this library. However, there are a few ground
rules contributors should be aware of.LicenseThis project is licensed under the Apache v2.0 License. As such, your
contributions, once accepted, are automatically covered by this license.Copyright (c) 2013-2014 Daniele SluijtersCommit messagesWrite decent commit messages. Don’t use swear words and refrain from
uninformative commit messages as ‘fixed typo’.The preferred format of a commit message:docs/quickstart: Fixed a typo in the Nodes section.

If needed, elaborate further on this commit. Feel free to write a
complete blog post here if that helps us understand what this is
all about.

Fixes #4 and resolves #2.If you’d like a more elaborate guide on how to write and format your commit
messages have a look at this post byTim Pope.TestsThis project does not have a test-suite but it will check for PEP-8 style
violations. This is done using py.test and the pytest-pep8 plugin.Changelog0.0.1Initial release.
Package: checkpwd
CheckPwdThis package allows you to check if at some point your passwords have been leaked. If that is the case, your passwords are more likely to appear in a long list of dictionary that is used for hacking. This, then makes your accounts, data, and credentials much more vulnerable. To put in another way, if your password has been leaked before, it is no longer safe to use.InstallationThe package can be installed via the Python Package Index (PyPI) by running:pipinstallcheckpwd--upgradeDocumentationFor further details, check thedocumentation.
Package: check-pypi-name
Check if a package name is registered with PyPIFree software: MIT licenseInstallationpip install check-pypi-nameDocumentationhttps://python-check-pypi-name.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.3.0 (2017-06-24)Cleanup and Improvements0.2.0 (2017-06-24)Cleanup and Improvements0.1.0 (2017-06-23)First release on PyPI.
Package: check-pypi-name-cli
A command line tool that checks if a package name is reserved or in use on PyPI.Free software: BSD licenseInstallationpip install check-pypi-name-cliDocumentationhttps://python-check-pypi-name-cli.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2017-06-25)First release on PyPI.
Package: check-requirements-txt
check-requirements-txtA tool (and also a pre-commit hook) to automatically check the missing packages in requirements.txt.Table of ContentsInstallationLicenseInstallationFirst install this package into current python envpip install check-requirements-txtThen set uppre-commithooksSeepre-commitfor instructionsSample.pre-commit-config.yaml:NOTE:Due to the pre-commit isolated pyenv runtime, this package can't be act as a normal git repo pre-commit hooks.If the project's requirements.txt does not match pattern*requirement*.txt, you'll need to specify it.default_stages:[commit]repos:-repo:localhooks:-id:check-requirements-txtname:check-requirements-txtdescription:Check the missing packages in requirements.txt.entry:check-requirements-txtargs:['--dst_dir','.','--ignore','pip,whatever,modules,you,want,to,ignore,with,comma,separated']language:pythontypes:[python]check-requirements-txtcan be used as a normal cli tool, seecheck-requirements-txt --helpfor more details.Output sampleBadimportdetected:"bs4"/Users/ferstar/PycharmProjects/xxx_demo/xxx_spider.py:12
Badimportdetected:"requests"/Users/ferstar/PycharmProjects/xxx_demo/xxx_handler.py:17"numpy"requiredby:{'numpy','scikit-learn','tensorflow','pandas'}# NOTE: the output of cli is the total bad import count~echo$?~2Licensecheck-requirements-txtis distributed under the terms of theMITlicense.
Package: check-rkn
Check_rknThis is library, that check blocked websites onblocklist.rkn.gov.ru. Library usesSeleniumandanticaptchaofficial.WARNING!You need to register onanti-captcha.comto get the api key and top up your balance (For residents of the Russian federation: MIR cards are available, you can also pay with cryptocurrency)How to usefromcheck_rkn.check_rknimportcheck_websiteresult=check_website("your_url","your_api_key")print(result)# True if website is blocked or False if noLicense -Apache 2.0
Package: check-rq
check_rqIcinga/Nagios check for RQ (Redis Queue)Usageusage: check_rq/check_rq.py [-h] [--queue QUEUE] [--host HOST] [--port PORT] [--password PASSWORD]
                            -w WARNING -c CRITICAL [-v]

Nagios/icinga plugin for checking a RQ redis queues

optional arguments:
  -h, --help            show this help message and exit
  --queue QUEUE         RQ Queue
  --host HOST           Redis host
  --port PORT           Redis port
  --password PASSWORD   Redis password
  -w WARNING, --warn WARNING
                        WARNING trigger
  -c CRITICAL, --critical CRITICAL
                        CRITICAL triger
  -v, --version         Print versionLicenseReleased under theMIT license.
Package: checkrunner
A very simple check runner for Python. I use this in projects where I need to run a suite of checks before performing some action (usually on invocation). In this way, the checks are kept together in one class, and no special logic is needed to run them all individually.Supports Python 2 and 3 (tested on 2.7 and 3.4).UsageCreate a sub-class of CheckRunner and declare your checks:from checkrunner import CheckRunner

class MyChecks(CheckRunner):
    @staticmethod
    def check_that_passes():
        return True, 'this check passed!'

    @staticmethod
    def check_that_fails():
        return False, 'this check failed!'

print(MyChecks.run())
# (False, ['this check failed!'])

print(MyChecks.run(return_passed=True))
# (False, ['this check passed!', 'this check failed!'])When all checks pass it will return True with an empty list (unless you set return_passed):from checkrunner import CheckRunner

class MyChecks(CheckRunner):
    @staticmethod
    def check_that_passes():
        return True, 'this check passed!'

print(MyChecks.run())
# (True, [])You can pass keyword arguments to the checks (they will be sent to each and every check):from checkrunner import CheckRunner

class MyChecks(CheckRunner):
    @staticmethod
    def check_foo(foo=None):
        if foo:
            return True, foo
        else:
            return False, foo

print(MyChecks.run(foo='bar', return_passed=True))
# (True, ['bar'])Class methods also work:from checkrunner import CheckRunner


class MyChecks(CheckRunner):
    foo = 'bar'

    @classmethod
    def check_class(cls):
        return True, cls.foo

print(MyChecks.run(return_passed=True))
# (True, ['bar'])You can also return whatever you like in the second parameter, it does not have to be a string.TestingTesting uses vagrant, tox and pytest. If you already have Vagrant, running the tests yourself is as simple as:$ vagrant up
$ vagrant ssh
(dev) vagrant@debian-8:~$ cd ~/src
(dev) vagrant@debian-8:~/src$ tox