Saravanan666/pypi-org huggingface dataset:
Package: c7n-logexporter
c7n-log-exporter: Cloud watch log exporter automationA small serverless app to archive cloud logs across accounts to an archive bucket. It utilizes
cloud log export to s3 feature for historical exports.It also supports kinesis streams / firehose to move to realtime exports in the same format
as the periodic historical exports.FeaturesLog group filtering by regexIncremental support based on previously synced datesIncremental support based on last log group write timeCross account via sts role assumeLambda and CLI support.Day based log segmentation (output keys look
like $prefix/$account_id/$group/$year/$month/$day/$export_task_uuid/$stream/$log)AssumptionsThe archive bucket has already has appropriate bucket policy permissions.
For details see:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasks.html#S3PermissionsDefault periodicity for log group archival into s3 is daily.Exporter is run with account credentials that have access to the archive s3 bucket.Catch up archiving is not run in lambda (do a cli run first)Cli usagemake installYou can run on a single account / log group via the export subcommandc7n-log-exporter export --helpConfig formatTo ease usage when running across multiple accounts, a config file can be specified, as
an example.Using S3 Bucket as destinationdestination:
  bucket: custodian-log-archive
  prefix: logs2

accounts:
  - name: custodian-demo
    role: "arn:aws:iam::111111111111:role/CloudCustodianRole"
    groups:
      - "/aws/lambda/*"
      - "vpc-flow-logs"Using CloudWatch Destination as destination cross accountThe Cloudwatch Destination needs setup in account and access policy set on CloudWatch Destination to to allow
source account access to the Cloudwatch Destinationsubscription:
  destination-arn: "arn:aws:logs:us-east-1:111111111111:destination:CustodianCWLogsDestination"
  destination-role: "arn:aws:iam::111111111111:role/CWLtoKinesisRole"
  name: "CustodianCWLogsDestination"

destination:
  bucket: custodian-log-archive
  prefix: logs2

accounts:
  - name: custodian-demo
    # https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateSubscriptionFilter-IAMrole.html
    subscription-role: "arn:aws:iam::111111111111:role/<role-name>"
    role: "arn:aws:iam::111111111111:role/CloudCustodianRole"
    groups:
      - "/aws/lambda/*"
      - "vpc-flow-logs"Multiple accounts via cliTo run on the cli across multiple accounts, edit the config.yml to specify multiple
accounts and log groups.c7n-log-exporter run --config config.ymlServerless UsageEdit config.yml to specify the accounts, archive bucket, and log groups you want to
use.make install
make deploy
Package: c7n-oci
Cloud Custodian - OCI SupportThis is a plugin to Cloud Custodian that adds OCI support.Install Cloud Custodian and OCI PluginThe OCI provider must be installed as a separate package in addition to c7n.$ git clone https://github.com/cloud-custodian/cloud-custodian.git
$ virtualenv custodian
$ source custodian/bin/activate
(custodian) $ pip install -e cloud-custodian/.
(custodian) $ pip install -e cloud-custodian/tools/c7n_oci/.Write your first policyCloud Custodian policies are expressed in YAML and include the following:The type of resource to run the policy againstFilters to narrow down the set of resourcesActions to take on the filtered set of resourcesOur first policy filters compute instance of a specific name, then adds the tagmark_deletion: true.Create a file namedcustodian.ymlwith the following content. Updatedisplay_name,compartment_idmatch an existing compute instance.policies:
    - name: filter-for-compute-name
      description: Filter for compute which matches the display name
      resource: oci.instance
      filters:
        - type: query
          params:
            compartment_id: 'ocid1.compartment.oc1..<unique_ID>'
        - type: value
          key: display_name
          value: test
      actions:
        - type: update_instance
          params:
            update_instance_details:
                freeform_tags:
                    mark-for-deletion: 'true'Run your policycustodian run --output-dir=. custodian.ymlIf successful, you should see output like the following on the command line::2023-05-25 18:15:53,132: custodian.oci.session:INFO Successfully authenticated user ...
2023-05-25 18:16:01,118: custodian.policy:INFO policy:filter-for-compute-name resource:oci.instance region: count:1 time:7.98
2023-05-25 18:16:05,474: custodian.oci.resources.compute:INFO Received status 200 for PUT:update_instance 9A14E2D68AC94772849C7534E10BC963/089249DEBA83A0BDA6050BFF759BCF49/38040CF37F356743B539E653B2DED1E0
2023-05-25 18:16:05,483: custodian.policy:INFO policy:filter-for-compute-name action:updateinstance resources:1 execution_time:4.34You can find a newfilter-for-compute-nameunder --output-dir option value directory with a log and aresources.jsonfile.LinksGetting StartedExample Scenarios
Package: c7n-openstack
Custodian OpenStack SupportWork in Progress - Not Ready For Use.Quick StartInstallationpip install c7n_openstackOpenStack Environment ConfigrationC7N will find cloud config for as few as 1 cloud and as many as you want to put in a config file.
It will read environment variables and config files, and it also contains some vendor specific default
values so that you don't have to know extra info to use OpenStack:If you have a config file, you will get the clouds listed in itIf you have environment variables, you will get a cloud named envvarsIf you have neither, you will get a cloud named defaults with base defaultsCreate a clouds.yml file:clouds:demo:region_name:RegionOneauth:username:'admin'password:XXXXXXXproject_name:'admin'domain_name:'Default'auth_url:'https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0'Please note: c7n will look for a file calledclouds.yamlin the following locations:Current Directory~/.config/openstack/etc/openstackMore information athttps://pypi.org/project/os-client-configCreate a c7n policy yaml file as follows:policies:-name:demoresource:openstack.flavorfilters:-type:valuekey:vcpusvalue:1op:gtRun c7n and report the matched resources:mkdir-poutput
custodianrundemo.yaml-soutput
custodianreportdemo.yaml-soutput--formatgridExamplesfilter examples:policies:-name:test-flavorresource:openstack.flavorfilters:-type:valuekey:vcpusvalue:1op:gt-name:test-projectresource:openstack.projectfilters:[]-name:test-server-imageresource:openstack.serverfilters:-type:imageimage_name:cirros-0.5.1-name:test-userresource:openstack.userfilters:-type:roleproject_name:demorole_name:_member_system_scope:false-name:test-server-flavorresource:openstack.serverfilters:-type:flavorvcpus:1-name:test-server-ageresource:openstack.serverfilters:-type:ageop:ltdays:1-name:test-server-tagsresource:openstack.serverfilters:-type:tagstags:-key:avalue:a-key:bvalue:cop:any
Package: c7n-tencentcloud
Tencent Clouda provider for cloud custodian for usage with Tencent Cloud.Installationpipinstallc7n_tencentcloudUsageTo execute policies against tencent cloud you'll need to provide api
credentials for custodian to interact with the cloud apis.as a best practice create a sub account / cam user with api keys in the console.exportTENCENTCLOUD_SECRET_ID="xyz"exportTENCENTCLOUD_SECRET_KEY="abc123"exportTENCENTCLOUD_REGION="na-ashburn"custodianrun-vpolicy.ymlregion can also be passed on the cli via the--regionflag, complete list of regions is herehttps://www.tencentcloud.com/document/product/213/6091
Package: c81utils
c81utilsA Python module for working with C81 airfoil tables.Usagec81utilsimplements aC81class that handles the C81 data for each airfoil.
A few example usages are shown below:importc81utilsimportnumpyasnp# Works with numpy arrays too# Use 'load' to obtain data from a C81 formatted text filewithopen("NACA0012.C81","r")asf:naca0012=c81utils.load(f)# Use the 'get' commands to obtain bilinearly interpolated datadesiredAlpha=5.0# in degreesdesiredMach=0.3desiredCL=naca0012.getCL(desiredAlpha,desiredMach)desiredCD=naca0012.getCD(desiredAlpha,desiredMach)desiredCM=naca0012.getCM(desiredAlpha,desiredMach)# Combine 'get' commands with the 'map' command to operate on listsdesiredAlpha=np.linspace(0,10,6)desiredMach=[0.0,0.1,0.0,0.3,0.5,0.8]desiredCL=list(map(naca0012.getCL,desiredAlpha,desiredMach))# Data may also be input using arraysalpha=[0,2,4,6]mach=[0.0,0.5,1.0]Cx=[[0.0,0.0,0.0],[0.2,0.2,0.2],[0.4,0.4,0.4],[0.6,0.6,0.6]]CL,CD,CM=Cx,Cx,CxmyAirfoil=c81utils.C81('myAirfoil',\alpha,mach,CL,\alpha,mach,CD,\alpha,mach,CM)Installationc81utilsis written in Python 3. Use pip to install.pip3installc81utilsAuthorCibin Joseph1.0.7 (2022-09-07)Fix multiline data recognition.1.0.5 (2021-07-21)Ensure mach and alpha arrays have atleast two values.1.0.4 (2021-07-21)Ensure mach and alpha arrays are strictly increasing.1.0.0 (2020-04-25)Initial release.
Package: c8-source-oracle
c8-source-oracleSingertap that extracts data from aOracledatabase and produces JSON-formatted data following theSinger spec.How to use itInstall and RunFirst, make sure Python 3 is installed on your system or follow these
installation instructions forMacorUbuntu.It's recommended to use a virtualenv:python3-mvenvvenvpipinstallc8-source-oracleor from source using,Install poetry usinghttps://python-poetry.org/docs/#installationRunpoetrybuild
pipinstalldist/c8_source_oracle-<version>*.whlConfigurationRunning the the tap requires aconfig.jsonfile.Example configuration:{"host":"dev.oracledb.io","port":1521,"user":"C##HELLO","password":"password","service_name":"ORCLCDB","filter_schemas":"C##HELLO","default_replication_method":"LOG_BASED","pdb_name":"ORCLPDB1","multitenant":true,"scn_window_size":10}You can run a discover run using the previousconfig.jsonfile to acquire all the tables definitionc8-source-oracle --config /tmp/config.json --discover >> /tmp/catalog.jsonThen use the catalog.json to run a full export:c8-source-oracle --config /tmp/config.json --catalog /tmp/catalog.json
Package: c8y-api
cumulocity-python-apiThis project is a Python client for the Cumulocity REST API to make it easier to develop programs, scripts, device agents or microservices in Python.See also thedocumentation onRead the Docs.InstallationPrerequisitesBefore installing the module (or any module for that matter) consider creating
a virtual environment for your project. This is generally preferred over
installing modules and dependencies globally:cd<project-root>
python3-mvenvvenvsourcevenv/bin/activateInstallation from PyPIThe recommended way is to install the lastest distribution package directly from the Python Package Index (PyPI).
You can either addc8y_apias a dependency to your project usingsetup.cfg, or install it manually:pipinstallc8y_apiInstallation using pipReleases are also archived within the GitHub releases page. The module is released as standard Python wheel (.whlfile).
It can be downloaded and installed using pip using the following command:pipinstall<releasewheelfile>Like installing from PyPI, this will install all necessary dependencies automatically.  For your
reference, the module's dependencies are also listed in filerequirements.txt.Manual installationAlternatively, you can clone the repository. The module sources can be used directly within your Python 3 project.
Simply copy thec8y_apifolder to your sources root and install the requirements by running the following command:pip3install-rrequirements.txtTherequirements.txtfile is part of the sources.If thec8y_apifolder is in your sources root folder all imports should
work right away. Alternatively you can addc8y_apito yourPYHTONPATH:exportPYTHONPATH=<project-root>/c8y_api;$PYTHONPATHLicensingThis project is licensed under the Apache 2.0 license - seehttps://www.apache.org/licenses/LICENSE-2.0These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.You can find additional information in theSoftware AG TECHcommunity. There is also an introductory article (Getting started with the Cumulocity Python API) available.Contact us atTECHcommunityif you have any questions.
Package: c99api
Seamlessly integrate the c99.nl API into your Python projectsInstallationpip install c99apiInitiator# Import the packagefromc99apiimportEndpointClientapi=EndpointClient# Define your API keyapi.key='your_key'Usage# Access list of different methods availableresponse=api.list_methods()print(response)['phonelookup','emailvalidator','disposablemailchecker','portscanner','portscanner_port','ping','gethostname','dnschecker','dnsresolver','ipvalidator','torchecker','iplogger','proxydetector','subdomainfinder','firewalldetector','ip2domains','alexarank','whois','createscreenshot','geoip','upordown','reputationchecker','getheaders','linkbackup','urlshortener','bitcoinbalance','ethereumbalance','currency','currencyrates','randomstringpicker','dictionary','definepicture','synonym','translate','randomperson','youtubedetails','youtubemp3','weather','qrgenerator','textparser','passwordgenerator','randomnumber','licensekeygenerator','eitheror','gif']Use Cases# With JSONresponse=api.emailvalidator(email='example@example.com',json=True)print(response){'success':True,'exists':False,'error':"E-mail doesn't exist."}# Without JSONresponse=api.emailvalidator(email='example@example.com',json=False)print(response)Email doesn't existOtherTo-DoAdd dynamic parser for JSON responsesDocsAPI OverviewWarningTo use the c99.nl API you need topurchasean API key
Package: ca2spike
Deconvolve calcium imaging data to spikes. A wrapper around Chenkov and
McColgan so it’s easier to use their model and weights. Assuming you
have a imageJ roi measurement csv file, and a known sample_rate of your
two photon recording:importnumpyasnpfromca2spikeimportdeconvolvecalcium_data=np.genfromtxt(file_path,delimiter=',')[1:,1::4].Tspike_data,timestamps,new_sample_rate=deconvolve(data,sample_rate)Here the new sample rate is just a rounded int, coz otherwise your
analysis experience will suck.
Package: ca-api-wrapper
CA API WrapperTheca_api_wrapperis a Python package that simplifies interacting with the ChannelAdvisor API. It provides a straightforward, object-oriented approach to accessing ChannelAdvisor's features, such as managing products, orders, and exports, making it easier for developers to integrate ChannelAdvisor services into their applications.FeaturesEasy Authentication: Simplify the process of authenticating with the ChannelAdvisor API.Product Management: Easily list, retrieve, and update product information.Order Processing: Fetch and update orders with minimal hassle.Export Utilities: Access export functionalities provided by ChannelAdvisor.Error Handling: Robust error handling to gracefully manage API exceptions.InstallationInstallca_api_wrapperusing pip:pipinstallca_api_wrapperQuick startHere's a quick example to get you started with the ca_api_wrapper:fromca_api_wrapper.api.client_registryimportClientsFactory# User provides their own credentialsaccess_token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-1234"default_profile_id=12345678secondary_profile_id=12345679factory=ClientsFactory(access_token,default_profile_id,secondary_profile_id)product_client=factory.product_clientresponse=product_client.products.get_by_id(11111111)
Package: caasclient
Python client for CAASTo be filled: Brief IntroductionFeaturesHTTP interface using requestsPython native quering for CAAS API objectsInstallationUsing pip:pip install python-caasclientA virtualenvwrapper is recommended:virtualenv python-caasclient
source python-caasclient/bin/activate
pip install python-caasclientManual Installation:git clone https://github.com/rogeryu27/python-caasclient.git
cd python-caasclient
python setup.py installUsageQuery for all ready containers [in a custom namespace]:fromcaasclientimportclientascaas_clientcontainer_list=caas_client.Client(<caasurl>).containers.list()Create a self-defined image:importosfromcaasclientimportclientascaas_clientimage=caas_client.Client(<caasurl>).images.create_by_dockerfile(os.open('path/to/dockerfile','w+'))RequirementsPython 2.7requests
Package: caat
CAAT for PythonCommands as Arrow Types for PythonCAAT provides a way for programs to call each other regardless of the language used as if they were functions.
This is the library for the Python language, it provides the required classes, functions, and variables for calling
foreign code or for making your scripts callable from foreign code.How it worksWhen you call a foreign command, an environment variable calledCAAT_ARGSis set with a JSON string that represents the arguments passed into the function. They are also passed in via the command line arguments but this is for legacy reasons. The JSON string gets parsed into a format that the language can understand.
At the same time, the caller opens up a socket at/tmp/caat_pidwhere pid is the pid of the caller process. This is set as theCAAT_SOCKETvariable which is also passed into the callee. When the callee is done with what it is doing, it should call the function or macro that will write the return value back to the caller. This will also end the program.ExamplesScript 1importcaatff=caat.ForiegnFunction('python')return_value=ff('other.py',1,[1,2,3])print(return_value)Script 2importcaatcaat.return_caat(caat.argv[2])Outputpython script.py
[1, 2, 3]
Package: caatinga
Caatinga is a command line backup tool that creates multiple snapshots of your
file system to preserve the history of your data.To make a backup of your system simply run:$ caatTo view data in your backups, use the lscaat utility:$ lscaat lsTo Restore a backed up file from a specific backup:$ lscaat restore hello.clj from backup 1To restore from the most recent backup:$ lscaat restore hello.cljFeatures:Settings are read from a configuration file for ease of use.Backups are fast and consume a small amount of space by using hard links.Backup images can be stored on any mounted media that contains a file system
which supports hard links (eg. ext4).Remote file systems can be used via sshfs for pushing backups to a remote
server.Manage, view, and restore data using a single freindly command.Data is stored in raw format just as it appeared on the original file system
allowing you to browse or copy data without using a special tool.Permissions, ownership and access times are preserved.Pre/Post Backup/Restore hooks can be put in place for more advanced needs.Finding help is available within the commands and via standard man pages.Installation:pip install caatingaContribute:Issue Tracker:https://github.com/headmastersquall/caatinga/issuesSource Code:https://github.com/headmastersquall/caatingaSupport:If you are having issues, please create an item in the issue tracker.  To
reach me via email, my address can be found within the man pages.License:The project is licensed under the GNU General Public License Version 3.
Package: cabby
Python TAXII client implementation fromEclecticIQ.Source:https://github.com/eclecticiq/cabbyDocumentation:http://cabby.readthedocs.orgInformation:https://www.eclecticiq.comDownload:https://pypi.python.org/pypi/cabby/A simple Python library for interacting with TAXII servers.DockerTo run cabby using docker, execute the following:docker run –rm eclecticiq/cabby taxii-discovery –pathhttps://test.taxiistand.com/read-only/services/discoveryFeedbackYou are encouraged to provide feedback by commenting on open issues or sending us
email atcabby@eclecticiq.com
Package: cABCanalysis
cABCanalysisNested computed ABC analysis (cABC): A method to reduce feature sets to their most relevant items. Implementation in Python.AuthorJörn Lötsch
Data Science | Clinical Pharmacology
Goethe - University
Frankfurt am Main
GermanyAlfred Ultsch
DataBionics Research Group
University of Marburg
Marburg
GermanyAbstractThecABCanalysispackage is a Python package that provides a method for categorizing items or inventories, with the aim to reduce feature sets to the most important elements.This package is based on our publication Ultsch. A., Lötsch J. "Computed ABC analysis for rational selection of most informative variables in multivariate data". PLoS One. 2015,https://doi.org/10.1371/journal.pone.0129767.Requirementsnumpy >= 1.19.2pandas >= 1.1.5seaborn >= 0.11.2scipy >= 1.7.3ReferenceUltsch. A., Lötsch J. "Computed ABC analysis for rational selection of most informative variables in multivariate data". PLoS One. 2015,https://doi.org/10.1371/journal.pone.0129767.TutorialThe cABC analysis can be run with “ cABCanalysis(data, PlotIt=False, ax=None)”, where the data should be a one-dimensional numerical data set, “PlotIt” is self-explaining, and “ax” allows the inclusion of the resulting ABC plot as a subplot in a “seaborn” multipanel figure. The function returns a Python dictionary containing the following elements. "Aind", "Bind" and "Cind" are the data items assigned to the respective ABC subsets, "ABexchanged" (True/False) indicates whether in special cases the slope of the ABC curve has already reached the value of one before passing the point closest to the ideal "Pareto" point, which would be counterintuitive for the classification and is therefore corrected by exchanging points A and B, about which the user is informed. Other numbers returned include points "A" (Ax,Ay), i.e., the “Juran” or "BreakEven" point indicated by "ABexchanged", "B" (Bx,By), i.e., the "Juran" or "BreakEven" point indicated by "ABexchanged", and "C", a point at minimum distance from [Ax,1]. Also, "smallestAData" returns the AB limit defined by the point A or B with "ABexchanged", "smallestBData" returns the BC limit defined by the point C, "AlimitIndInInterpolation" returns the index of the AB limit in [p, ABC], the interpolation of the ABC curve, and "BlimitIndInInterpolation" is the index of the BC limit in [p, ABC], the interpolation of the ABC curve.ABCres = cABCanalysis(data=data) ABCres["Aind"].index.tolist()
Package: cabinetry
cabinetryis a Python library for building and steering binned template fits.
It is written with applications in High Energy Physics in mind.cabinetryinterfaces many other powerful libraries to make it easy for an analyzer to run their statistical inference pipeline.Statistical models inHistFactoryformat can be built bycabinetryfrom instructions in a declarative configuration.cabinetrymakes heavy use ofpyhffor statistical inference, and provides additional utilities to help study and disseminate fit results.
This includes commonly used visualizations.
Due to its modular approach, analyzers are free to use all ofcabinetry's functionality or only some pieces.cabinetrycan be used for inference and visualization with anypyhf-compatible model, whether it was built withcabinetryor not.Installationcabinetrycan be installed withpip:python-mpipinstallcabinetryThis will only install the minimum requirements for the core part ofcabinetry.
The following will install additional optional dependencies needed forROOTfile reading:python-mpipinstallcabinetry[contrib]Hello worldTo run the following example, first generate the input files via the scriptutils/create_ntuples.py.importcabinetryconfig=cabinetry.configuration.load("config_example.yml")# create template histogramscabinetry.templates.build(config)# perform histogram post-processingcabinetry.templates.postprocess(config)# build a workspacews=cabinetry.workspace.build(config)# run a fitmodel,data=cabinetry.model_utils.model_and_data(ws)fit_results=cabinetry.fit.fit(model,data)# visualize the post-fit model prediction and dataprediction_postfit=cabinetry.model_utils.prediction(model,fit_results=fit_results)cabinetry.visualize.data_mc(prediction_postfit,data,config=config)The above is an abbreviated version of an example included inexample.py, which shows how to usecabinetry.
It requires additional dependencies obtained withpip install cabinetry[contrib].DocumentationFind more information in thedocumentationand tutorial material in thecabinetry-tutorialsrepository.cabinetryis also described in a paper submitted to vCHEP 2021:10.5281/zenodo.4627037.AcknowledgementsThis work was supported by the U.S. National Science Foundation (NSF) cooperative agreementOAC-1836650 (IRIS-HEP).