Saravanan666/pypi-org huggingface dataset:
Package: kfp-local
kfp-localPipelines built withkfp(kubeflow pipeline)execute in k8s cluster.During the development of kubeflow pipeline components, we usually upload the pipeline to kfp server and run it in k8s, if anything wrong we fix it locally and upload it again.It should be helpful for the development efficiency if the above process takes place in local host, that's whatkfp-localcares.Installationpip install kfp-localUsagefromkfp_localimportLocalClientlocal_client=LocalClient()result=local_client.create_run_from_pipeline_func(pipeline_func,arguments={"foo":"bar"},execution_mode=LocalClient.ExecutionMode("local"),)ifresult.success:a_output_filepath=result.get_output_file(task_name="a-task",output="a_output_name")Additional configurationThe demo code inUsageexecutes pipeline in local process withExecutionMode('local'),ExecutionModecontrols how the pipline executes.There are some options ofExecutionMode:mode: Default execution mode, default 'docker'images_to_exclude: If the image of op is in images_to_exclude, the op is
executed in the mode different from default_mode.tasks_to_exclude: If the name of task is in tasks_to_exclude, the op is executed in the mode different from default_mode.docker_options: Docker options used in docker mode, e.g. docker_options=["-e", "foo=bar"].For more information about how to make use of kfp_local, please refer to unit test.kfp compatibilitykfp-local is tested with kfp>=1.8.9,<2.0 for now.Supports:Control flow: Condition, ParallelFor, ExitHandlerData passing: InputPath, OutputPath, InputDon't support for now:ImporterArtifact iteratorCaching
Package: kfp-py-func-local
kfp py func localKfp issue#7728Utils to run 'kfp-pipeline' with only py-function components in local without kubernetes & docker build.Main purpose is to debug faster in early stages.Getting StartedInstall:pipinstallkfp-py-func-localAssume you havea custom library with a custom functiondefadd_op(a:float,b:float)->float:'''Calculates sum of two arguments.'''returna+ba kfp component based on the functionfromkfp.v2.dslimportcomponent@component(base_image=custom_image_with_my_library_installed)defadd_op(a:float,b:float)->float:kwargs=locals()frommy_libraryimportadd_opreturnadd_op(**kwargs)a kfp pipeline using the kfp component@pipelinedefadd_pipeline(a:float=1,b:float=7):first_add_task=add_op(a,4)second_add_task=add_op(first_add_task.output,b)Then you would push your imagecustom_image_with_my_library_installedto a container registry.
And compile it to ayamlto then run it in top of a kubernetes.Withkfp-localyou can avoid this, and run your code locally on your computer doingfromkfp_localimportLocalClientarguments=dict(a=1,b=2)func_imports=["from my_library import add_op"]local_client=LocalClient()local_client.create_run_from_pipeline_func(add_pipeline,arguments=arguments,func_imports=func_imports)Why run locally a kubernetes orchestrator?Here we're assuming that all components are based on custom-made functions.
To debug those,debugging them separately is not practical nor accurate (cause are build to interact with each other)create (and mantain) 2 pipelines, one for local and other for kubeflow is painful and error pruningTypical usage ofkfp-localwould be to debug your custom code locally with very few data samples.
Check that code works fine, and then run it in kubernetes with all samples.
Package: kfreader-cffi
kfreader-cffi is a Python package for reading binary result files produced by
the Amsterdam Density Functional (ADF) program suite (http://scm.com). Instead ofkf.py, this package does not require working ADF installation.It usesCFFIto interface with the original C libraryKFReader.InstallationNote that kfreader-cffi currently is only tested under Python 3.x on UbuntuFirst we need to install some prerequisites:apt-getupdateapt-getinstallbuild-essentialgcclibffi-devpython3-devThen to install the package, simply:pipinstallkfreader-cffiOr for development:gitclonehttps://github.com/mstolyarchuk/kfreader-cffipipinstall-ekfreader-cffiShared librarylibkfreader.sowill beautomaticallybuilt from C source files
provided in /vendor directory during the installation process
(seeMakefilefor details).Now you are ready to go!Getting startedBefore attempting to use this package, you might find the officialdocumentationon TAPE21 useful.Usage>>>fromkfreaderimportKFReader,kfropen# Open a TAPE21 file.>>>kfr=KFReader('file.t21')# Get the value of a variable given its section and name.>>>kfr.get_data('General','file-ident')'TAPE21'>>>kfr.close()# We can also seamlessly use the with-statement.# Let's simplify the above example:>>>withkfropen('file.t21')askfr:>>># Use the reader as regular. The file will be closed>>># when the block ends.>>>print(kfr.get_data('General','termination status'))'NORMAL TERMINATION'AcknowledgmentsMany thanks to Alexei Yakovlev and all the other developers (http://scm.com) of the original C routines.
This package would not exist without their work.
Package: kfst
KFSTKFST is a finite state transducer library written in pure Python. It supports reading transducers fromAT&T tabular formatfiles and its own binary format.
In addition to standard features, it also supports flag diacritics.The intended use case is to use KFST in environments in which native libraries like HFST cannot be installed.InstallationKFST is available on PyPI and can be installed with pip:pip install kfstUsageIn this example, we assume that you have a transducer stored in the filemy-transducer.att.
You can easily create such file using the HFST toolkit:hfst-fst2txt-fattmy-transducer.hfst>my-transducer.att# if you want a kfst file:python-mkfst.convertmy-transducer.attmy-transducer.kfstReading transducersTransducers can be read from AT&T tabular format files using theread_att_filefunction, and the KFST binary format using theread_kfst_filefunction:fromkfstimportFSTfst=FST.read_att_file("my-transducer.att")# orfst=FST.read_kfst_file("my-transducer.kfst")Using the transducerTo run the transducer, use thelookupmethod, which returns a list of tuples of the form(output, weight)sorted by weight:fst.lookup("foo")LicenseKFST is licensed under the GNU LGPL version 3 or later. See the LICENSE file for details.
Package: kft
kf-toolsA collection of handy wrapper tools for operators of kubeflow environmentsWith kf-tools you have access to a few command line tools to help you operate your kubeflow deployment. These include:kft logs (Kube Pod Logs viewer)
Afuzzy finderbased utility for navigating pods, and then viewing them with CLI tools such as less, view, or any viewing tool. You can just apply any command after kpl such as grep, etc...kft check (Kube Upgrade Planner)
A tool to help you view your juju based kubeflow bundle, in terms of the charm, channel and revision. You can compare 2 local bundles or compare a local with a remote charmed kubeflow bundle and view the differences between these bundles based off their versioning information.kft scan (Kube Vulnerability Scanner)
This scanner usestrivyto help you scan your pod images against a databases of known vulnerabilities. It does not scan the container image itself, but for references of CVEs against the image.InstallationInstall from sourcegitclonegit@github.com:nishant-dash/kf-tools.gitcdkf-tools/&&python3setup.pyinstall
./install.shInstall from pipNote, since these are wrapper scripts they use commands like juju, kubectl, fzf and trivy
all of these are in install.sh (except juju and kubectl)pipinstallkftInstall from snap (WIP)sudosnapinstallkftUsageYou can view all subcommands and flags with-hor--help.kft logs (Kube Pod Logs viewer)# use it as iskftlogs# use it with less (default) or viewkftlogsless
kftlogsview# give it some extra flagskftlogs"less +G"# grep the logs for anything you needkftlogs"grep -iE 'error|block|fail|lost|timeout'"kft check (Kube Upgrade Planner)# run against local environment, this will run juju commandskftcheck-l# view a local bundlekftcheck-fmy-kf-bundle.yaml# view a remote bundlekftcheck-t1.7/stable# compare a local and remote bundlekftcheck-fmy-kf-bundle.yaml-t1.7/stable# compare two local bundleskftcheck-fmy-kf-bundle.yaml-fmy-kf-bundle2.yaml# compare two local bundles and get a yaml/json outputkftcheck-fmy-kf-bundle.yaml-fmy-kf-bundle2.yaml--formatyaml-ooutput.yamlkft scan (Kube Vulnerability Scanner)# scan a particular container imagekftscan-i<image_name># scan a files of image nameskftscan-f<file># generate a yaml/json reportkftscan-f<file>--formatjson# watch output as it scanskftscan-f<file>-w# Not Out yet# scan current local kubeflow installation that your juju controller has access to# and your kubectl command line tool is configured with# this command is namespaced, with the default of kubeflowkftscan# scan other namespace(s) or all namespaces (default is kubeflow)kftscan-nmonitoring-s
kftscan-nmonitoring,custom,kubeflow-s
kftscan--all-namespaces
Package: kfutils
kfutils: A tool for common data file operations.⚒ InstalationDownload and install the latest package from therelease sectionor directly by pippipinstallkfutilsThis installs the python module and a command line tool namedkfutils.⚡ Usage✈ Using as a command line tool.kutils[-h]-iFILE[-oFILE][-cCOLS[COLS...]][-rdCOLS[COLS...]][-drCOLS[COLS...]][-dcCOLS[COLS...]][-intN[N...]][-mirN][-repN]ArgumentDescription-iInput file nameIf no operations are given it will show the stats about the file-oOutput file name. (default: '_out' prefix to input file name)-cIndex(s) of grid columns. 2 columns for 2D file-rdIndex(s) of columns to convert to degree from radian-drIndex(s) of columns to convert to radian from degree-dcIndex(s) of columns to delete-intNumber of grid to interpolate to. Can be 1D or 2D-mirNumber of times to mirror-repNumber of times to repeat🚀 Using as a python moduleThe toplevel python modulekfutilsexposes several functions/class.
Package: kgc-chart
krüger-gauge-circular-chart is an addition to the gauge-circular-chart. the added feature is another data dimension the chart, by adjusting the bar width of each bar seperately.below there is a code example."""import kcg_chart as krueger_circular_gauge_chartdata = {"Pigs":(2,50), "Cows":(3,350), "Dogs":(5,125), "Chickens":(0.7, 20)}k_c_g_chart = krueger_circular_gauge_chart(data)k_c_g_chart.draw()k_c_g_chart.add_labels()k_c_g_chart.save_and_display_image()print(k_c_g_chart) """the data passed is hypothetical data of a farm, with the first element the age at which the animals are slaughtered, the second element the amount of animals slaughtered the main difference between a krüger-gauge-circular-chart and a bar chart with variable bar width is the functionality of display. a bar chart displays the whole amount as an area (A = length * width), which makes sense when the two variables are compatible to multiply (e.g. per Capita CO2 emissions and number of people). However, as seen in the hypothetical data above, this chart type is not compatible, as the interesting fact is not the whole amount of years lived by the animals, but the comparison of amount of animals slaughtered and their age.est. December 2021Christoph Krüger
Package: kgcl-rdflib
kgcl-rdflibAn engine that applies changes or diffs specified in KGCL to an RDF graph stored using rdflibKGCLKGCL (Knowledge Graph Change Language) is a datamodel and language for representing changes in ontologies and knowledge graphsThe core KGCL repo is here:https://github.com/INCATools/kgclThis kgcl-rdflib repo applies the KGCL model to rdflib graphs.
Package: kgcreator
Knowledge Graph Creator command line tool: kgcreatorKnowledge Graph Creator: converts text to RDF triples and Neo4J graph and Memgraph database dataThe Knowledge Graph Creator (kgcreator) is a tool for automating the generation of RDF data for Knowledge Graphs from raw text data read from an input directory path.The Knowledge Graph Creator creates an output file containing RDF triples suitable for loading into any linked data/semantic web data store.This Python command line utility is one of the example programs in my bookPractical Python Artificial Intelligence Programmingthat is available onLeanpub.comor available (in the future, this book is under development) to read for free on my web sitehttps://markwatson.com.InstallationInstall this tool usingpip:pip install kgcreator
pip install spacy
python -m spacy download en_core_web_smUsageFor help, run:kgcreator --help
kgcreator --inputdir=test_data --outputfile=out.rdf  --outputfileneo4j=out.cypherYou can also use:python -m kgcreator --helpDevelopmentTo contribute to this tool, first checkout the code. Then create a new virtual environment:cd kgcreator
python -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytestNotes on generating Neo4J graph dataStart by identifying:Names of entities (node labels).Names of relationships.Names of properties for nodes and relationships.Constraints to be defined.Indexes required.The most important queries?
Package: kgd
KgdTaxesTool for retrieving information on tax payments by Kazakhstan companies.Featuresprogressbar with additional infomax output file size limitationUsage$ kgd --help
usage: kgd [-h] [-t TIMEOUT] [-f FSIZE] token fpath date_range


positional arguments:
  token                 KGD API secret token
  fpath                 input file with BINs
  date_range            date range for which we retrieve data

optional arguments:
  -h, --help            show this help message and exit
  -w TIMEOUT, --timeout TIMEOUT
                        server connect timeout (default: 3.0)
  -f FSIZE, --fsize FSIZE
                        size limit for output file (default: 50000000)Usage exampleskgd sdfgggw5gsdg4g4g4435dg /home/user/bins.txt -t 3  2018-01-01:2019-01-01 -f 500000000Note: In this example address:port and secret token are fake. To run command successfully
you need get them from KGD government agency.InstallationPython 3.6.1+ required.From PyPI:pip install kgd
Package: kgdata
kgdataKGData is a library to process dumps of Wikipedia, Wikidata. What it can do:Clean up the dumps to ensure the data is consistent (resolve redirect, remove dangling references)Create embedded key-value databases to access entities from the dumps.Extract Wikidata ontology.Extract Wikipedia tables and convert the hyperlinks to Wikidata entities.Create Pyserini indices to search Wikidata’s entities.and moreFor a full documentation, please seethe website.InstallationFrom PyPI (using pre-built binaries):pipinstallkgdata[spark]# omit spark to manually specify its version if your cluster has different version
Package: kgdd
KGDDKG Test Driven Design development. Write queries with expected results. CONSTRUCT KG. Run tests and see if queries return correct bindings.Run testsTo run a testbed on a KG run:kgdd -f "/path/to/KG.{ttl,nt,...}" -t "/path/to/tests.json"TestbedTo create a testbed write a.jsonfile like the following:{"tests":[{"description":"Extract all the triples from a KG","query":"SELECT * WHERE {?s ?p ?o } ","results":3,"rows":[{"s":"artist_1"}],"bindings":{"o":"music_1"},"skip":false}...]}Every item in thetestsarray will be used to run a test. Let's see fields:query: The query to be run to extract data from KG.results: The number of expected rows. With 0 or a value greater than 0 then the test will pass if the numbers match. With -1 the  test will pass if you get a number greater than 0.rows: Every item in the array is an expected row. For the test to pass you need at least a row matching all the expected ones. In this example we want at least a row with"artist_1"as"s".bindings: At least a binding in at least a results row for all the specified variable in the bindings object should match for the test to pass. In this example At least in a"o"in one of the row should match"music_1".skip: The test will be skipped.In every field you can setnullas default value if you don't want the results, rows, or bindings step to run.
E.g. following testbed will run only results step.{"tests":[{"description":"Extract all the triples from a KG","query":"SELECT * WHERE {?s ?p ?o } ","results":3,"rows":null,"bindings":null,"skip":false}...]}Usageusage: kgdd [-h] -t TEST -f FILE [-v {0,1,2}]

A cli program to automate TDD KG development. Define some basic query and expected outputs in a test. Kgdd will take
care of run queries and see if they match expedted results.

options:
  -h, --help            show this help message and exit
  -t TEST, --test TEST  Path to testbed file. File should be in Json format
  -f FILE, --file FILE  Path to KG file
  -v {0,1,2}, --verbose {0,1,2}
                        Verbose output. Verbosity level = 0,1,2 . Default 0 no verbose. 2 is really verboseInstallationkgddis a python package to install it you need python3.Xinstalled. You can install it globally in your local machine running:pip install kgddor on Windows:py -m pip install kgddAlternatively if you prefere a local installation you can create a virtualenv and install the package there.
The package is distributed as a cli tool, and available everywhere if the environment where is installed is activated.
Package: kg-downloader
This is a sexy tool that help you download songs from kg.qq.com(全民K歌in Chinese).There’re two different types of urls, one is the song playing page, the other is the songer page.
If you give the song playing page’s url. Kg_downloader will download the playing song on the page as you wish. However if you give the singer page’s url, Thewholesongs that this singer published will be downloaded.Of course you can choose where to put this downloaded items, just use the-l|–location.
Package: kgdt
Knowledge Graph Data Toola python library for create and operate on a knowledge graph in disk/neo4j/mysql.Free software: MIT licenseDocumentation:https://kgdt.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-11-24)First release on PyPI.0.2.0 (2020-11-30)Add GraphData and MultiFieldDocumentCollection.
Package: kge
KISS GAME ENGINEA 2D Game Engine Written in Python, running in Python and For Python Game Developpers.Its intend is to provide python game developpers with an easy API to learn to build their own 2D games and provide the possibility to  write little to very big games.It is built on top of thepygletlibrary for rendering, and a python version of a great physics engine namedBox2D. So you can expect it to be of top quality.If you have any issue you can add an issue to the repository. I will be very pleased to help.Requirementskge runs only underpython 3.7in windows andpython 3.6in linux. Being written in pure Python, it also works on other Python interpreters such as PyPi. Supported platforms are:Windows 7 or laterWithpython 3.7Linux, with the following libraries (most recent distributions will have these in a default installation):With ``python 3.6`OpenGL and GLXGDK 2.0+ or Pillow (required for loading images other than PNG and BMP)OpenAL or Pulseaudio (required for playing audio)Installationkge is installable from PyPI:pip install --upgrade --user kgeInstallation from sourceIf you're reading thisREADMEfrom a source distribution, you can install kge with:python -m pip install .Functionnalities availables :SystemComponentsRenderingSimple Shapes (squares, circles, triangles),  Sprites with ImagesGUITextDebugDebug the world, see colliders and bodies, draw custom shapesPhysics EngineColliders (BoxColliders, CircleColiders, PolygonColliders, TriangleColliders, EdgeColliders), RigidBodiesAudio EnginePlay Sound with volumeScriptingWith Entities (i.e GameObjects), and BehavioursTODOLevel TransitionsAnimation System :Frame By Frame with SpritesFrom Sequence of images on one SpritesheetFrom GIFParticle Sytem2D Light SystemGUI System : with buttons, images and TextEditor
Package: kgeditor
KGEditorCode for our paper “Editing Language Model-based Knowledge Graph
Embeddings”.To use as a python modulepip install -kgeditorRun the experimentsTrainingEdit TaskTo train the KGEditor model in the paper on the datasetE-FB15k237,
run the command below. For another datasetE-WN18RRjust replacing
the dataset name will be fine../scripts/kgeditor_fb15k237_edit.shAdd TaskTo train the KGEditor model in the paper on the datasetA-FB15k237,
run the command below. For another datasetA-WN18RRjust replacing
the dataset name will be fine../scripts/kgeditor_fb15k237_add.shModelsThisfoldercontains the base models used for this work.
Package: kgenealogic
kgenealogickgenealogicis a tool for genetic genealogy. It clusters relatives into a hypothesized family
tree based on shared and unshared DNA.FeaturesSupports GEDmatch pairwise segment and triangulation filesUses both presence and inferred absence of triangulationAllows, but doesn't require, specifying known relatives at each level of the family treeInstallationIt is highly recommended to use a virtual environment for installing kgenealogic and its
dependencies (e.g., conda, venv, etc.). Within the virtual environment, just run:pip install kgenealogicUsagepython3 -m kgenealogic init [-p <project-file>]
python3 -m kgenealogic add [-p <project-file>] ... # files to import
python3 -m kgenealogic cluster [-p <project-file>] [-o <out-file>] <config-file>

python3 -m kgenealogic --help # general help
python3 -m kgenealogic <command> --help # help for <command>, e.g. init/add/build/clusterAlgorithmsClusteringClustering is performed by recursive greedy approximation of a min-cut of a genetic closeness
graph.Specifically, the sums of the (cM) lengths of pairwise matches form the edge-weights of a base
graph. We add to these weights the positive and negative lengths of triangulations for which the
"source" kit of the triangle is listed as a "seed" in the clustering configuration file. When
processing a particular node of the tree, we use triangulations for seeds at that node or on its
path to the root (descendants when viewed as a family tree, ancestors when viewed as a tree data
structure).Having formed this graph at a particular node of the tree, we consider seeds listed in the
clustering configuration in the maternal or paternal branches of the node. For each connected
component of the graph, if there is at least one seed present in the component, we find an
approximate minimum cut separating the maternal and paternal seeds using a greedy algorithm.
If there are only, e.g., maternal seeds present and no negative weights (from imputed negative
triangulations), then the entire component will be classified as maternal.Kits that are classified as either maternal or paternal at a particular node are considered
recursively in the maternal or paternal branches of that mode.Inferred negative triangulationsSuppose triangulations and pairwise matches are available for a kit S. And suppose there are kits
T1 and T2 that each match pairwise with kit S on a particular segment, but fail to triangulate with
S on that segment. Then we have a negative triangulation for source S between T1 and T2, indicating
that T1 and T2 likely belong to different branches of the tree. This is represented with a negative
weight between T1 and T2 in the graph used for clustering.We find all negative triangulations for kits S whose triangulations and pairwise matches are
available. This is somewhat computationally expensive, because the segments where negative
triangulations occur are generally sub-segments of those appearing in the data files.