Saravanan666/pypi-org huggingface dataset:
Package: kriegspiel
Python Kriegspiel GameKriegspiel Game EngineSupported Kriegspiel rules:BerkeleyBerkeley + AnyIn plan:CrazykriegCrazykrieg + AnyHow-toInstallpipinstallkriegspielRun tests# clone this repogitclonegit@github.com:Kriegspiel/ks-game.git# activate virtual env (optional)cdks-game
python3-mvenvks-game-envsourceks-game-env/bin/activate# install dependenciespipinstall-rrequirements.txt
pipinstall-rrequirements-dev.txt# run testspython-mpytesttests/Lintblack-l128%FILE%
Package: kriging
Ordinary Kriging interpolationOrdinary Kriging interpolation is a linear estimation of regionalized variables. It assumes that the data change into a normal distribution, and considers that the expected value of regionalized variable $Z$is unknown. The interpolation process is similar to the weighted sliding average, and the weight value is determined by spatial data analysis.ArcGIS has the implementation of this interpolation method, which is rarely used in Python environment, but this project carries out a simple implementation.DependenciesnumpyshapelymatplotlibHow to get itpip install kriging
Package: krinn
KRINNThis module helps you in getting the price or title of a product by  simply using a URL or a Product ID. A product ID is available in the link itself.InstallationRun the following to install:pipinstallkrinnPlease NoteFor now crawling of products like book or multiple proce based on size are not supported.Usageshorten the urlfromkrinnimportamazonshorturl=amazon.short("https://www.amazon.in/Zebronics-100HB-High-Speed-Port/dp/B07GLNJC25/ref=sr_1_1_sspa?keywords=usb+hub&qid=1583729190&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExRzg4NTU3SFFCNk5JJmVuY3J5cHRlZElkPUEwODY2NTY4MkxDUUpOVlBPUks4QyZlbmNyeXB0ZWRBZElkPUEwNzk1MjU3NEZUNVJJNkdGVzYwJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==")print("Short URL:",shorturl)Output:Short URL: https://www.amazon.in/dp/B07GLNJC25/Get the id using linkThe ID of the product is in the url itself. To get the id of the link use this function.fromkrinnimportamazonproduct_id=amazon.getid("https://www.amazon.in/Zebronics-100HB-High-Speed-Port/dp/B07GLNJC25/ref=sr_1_1_sspa?keywords=usb+hub&qid=1583729190&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExRzg4NTU3SFFCNk5JJmVuY3J5cHRlZElkPUEwODY2NTY4MkxDUUpOVlBPUks4QyZlbmNyeXB0ZWRBZElkPUEwNzk1MjU3NEZUNVJJNkdGVzYwJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==")print("Product ID:",product_id)Output:Product ID: B07GLNJC25crawl by idfromkrinnimportamazonbyid=amazon.crawlbyid("B07GLNJC25")print("By ID: ",byid)Output:By ID:  ['Zebronics ZEB-100HB USB hubs with 4 Ports', 340.0]crawl by urlfromkrinnimportamazonurl="https://www.amazon.in/dp/B07GLNJC25/"byurl=amazon.crawlbyurl(url)print("\nBy URL: ",byurl)Output:By URL:  ['Zebronics ZEB-100HB USB hubs with 4 Ports', 340.0]get title of the productfromkrinnimportamazonurl="https://www.amazon.in/dp/B07GLNJC25/"title=amazon.producttitle(url)print("\nTitle:",title)Output:Title: Zebronics ZEB-100HB USB hubs with 4 Portsget price of the productfromkrinnimportamazonurl="https://www.amazon.in/dp/B07GLNJC25/"price=amazon.productprice(url)print("\nPrice:",price)Output:Price: 340.0Upcoming FeaturesNumber of Rating of the current product.How many stars out of 5.And many more.
Package: krippendorff
Fast KrippendorffFast computation ofKrippendorff's alphaagreement measure.Based onThomas Grill implementation.Example usageGiven a reliability data matrix, run:importkrippendorffkrippendorff.alpha(reliability_data=...)Seesample.pyandalpha's docstring for more details.InstallationpipinstallkrippendorffCaveatsThe implementation is fast as it doesn't do a nested loop for the coders. However,Vshould be small, since aVxVmatrix it's used.CitingIf you use this code in your research, please cite Fast Krippendorff:@misc{castro-2017-fast-krippendorff,author={Santiago Castro},title={Fast {K}rippendorff: Fast computation of {K}rippendorff's alpha agreement measure},year={2017},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/pln-fing-udelar/fast-krippendorff}}}
Package: kripta-py
kripta-pyAn simple implementation of a Symmetric(AES) and Asymmetric(RSA) encryption based onpycryptodomemodule.RequirementsPython (3.10 recommended)FeaturesGenerate RSA keys likeEncrypt/Decrypt messages, files, binaries on symmetric or asymmetricHow to useInstall the libpipinstallkripta-pyTo use thesymmetric encryption(AES):Schema :Code :fromkripta_pyimportKriptaAESmessage="secret-message"secret_key="secret-code-password"k=KriptaAES()# to encryptencrypted_msg=k.encrypt(message,secret_key)# to decryptprint(k.decrypt(encrypted_msg1,secret_key).decode())# secret-messageTo use anasymmetric encryption(RSA):Schema :Code example:fromkripta_pyimportKriptaRSAmessage="secret-message"pub_key="""-----BEGIN PUBLIC KEY-----....-----END PUBLIC KEY-----"""k=KriptaRSA()k.setPublicKey(pub_key)# To encrypt a messageencrypted_msg=k.encrypt(k.getPublicKey(),message.encode())priv_key="""-----BEGIN RSA PRIVATE KEY-----.....-----END RSA PRIVATE KEY-----"""k.setPrivateKey(priv_key)# To decryptprint(k.decrypt(encrypted_msg).decode())# secret-message
Package: kripton-guard
Receive notification when a new device is connected to the network. ##
Introduction Kripton Guard, saves MAC addresses to a SQLite database by
sending ARP packets to your network in the learning process, when the
learning process is completed, it compares the devices in the network
with the devices that already registered in the database. If the device
is unknown it sends a notification to your phone.Kripton Guard usesGoogle Firebase
Authenticationfor
authentication, associates youruser idwithdevice idand saves
it inGoogle Realtime
Database. It sends you
notifications viaGoogle Firebase Cloud
Messagingwhen
new device is found.PrerequisitesKripton Guard usesscapy,pyrebase,python-crontaband
these libraries will be installed automatically when installing
kripton-guard pip package but you can also install them with the command
below:pip install -r requirements.txtInstallationAndroidGoogle Play Link:Kripton-GuardPythonpip install kripton-guardEdit[SETTINGS]section in/etc/kripton-guard/kripton-guard.conf.Run the program with:sudo kripton-guardAfter a few minutes, your phone will start to get notification whenever
a new device join to your network.LicenseThis project is licensed under theGNU General Public License v3.0-
see theLICENSE.mdfile for details.
Package: kriptos-kii
Kriptos Insight Ingestion ClientEsta librería fue creada para utilizar el servicio de ingestión
de insights de Kriptos.  El servicio recibe mensajes provenientes de
aplicaciones del ecosistema Kriptos que contienen información para
ser procesada (parsing), evaluada y distribuida según su naturaleza.Modo de usoPara configurar el clientekiiinstale la dependencia
correspondiente usando el administrador de paquetespip:python3 -m pip install kriptos-kiiLuego, importe la librería de la siguiente manera:Asynchronouslyfrom kii.domain.schemas.payloads import Log
from kii.domain.schemas import Insight, InsightType
from kii.asyn import Client as AioClientSynchronouslyfrom kii.domain.schemas.payloads import Log
from kii.domain.schemas import Insight, InsightType
from kii.syn import ClientLa primera línea importará la clase Log que podrá utilizar para construir
su payload.  Log es un tipo de payload, pero podrá encontrar más tipos
disponibles en el módulokii.domain.schemas.payloads.Para construir un Insight de tipo Log, usted necesitará dos datos: el
nivel ("info", "warning", "error") y el mensaje.La segunda línea del anterior fragmento de código corresponde a la
importación de la clase Insight e Insight Type.  La primera es el objeto
que enviaremos al servicio de ingestión.  La segunda, es una enumeración
que define el tipo de insight con el que estamos trabajando.En este caso, trabajaremos con un insight de tipo log.El siguiente ejemplo muestra la implementación de la libreríakiien una
función main:Asynchronouslyasync def main():
    log = Log("info", "Insight test message!")
    insight = Insight("7d2d1990-e733-44d2-a092-edec1cf3e2df", InsightType.LOG, log)

    client = await AioClient(api_key="23er231-2333!ss").connect()
    result = await client.write(insight)
    print(result)Synchronouslydef main():
    log = Log("info", "Insight test message!")
    insight = Insight("4d231990-e389-92j3-h904-eujs4lk2f7ow", InsightType.LOG, log)

    client = Client(api_key="23er231-2333!ss").connect()
    result = client.write(insight)
    print(result)El log es de nivelinfo, y tiene su correspondiente mensaje de prueba.Luego, parametrizando elId de la empresaa la que pertenece el insight,
el tipo de insight (una opción de la enumeración) y el objeto payload
(objeto log).Luego, haciendo una instancia del cliente, debemos parametrizar la API Key
conexión.  Inmediatamente ejecutamos la funciónconnectque nos permitirá
abrir un canal de comunicación persistente con el servicio.Finalmente, se escribe el insight enviándolo al servicio de ingestión.
Esta última operación devuelve un objeto donde se define el estado del
proceso, si fue exitoso y el mensaje de error en caso de haberse presentado
algún problema en la comunicación con el servicio.
Package: krishto
krishtothis codeing by k.a ishan oshada (SL)only use in-built modules and encryptio  algorithamthis module use python  program encryption and not decryption notn print`	all class and function :class :   Encryption_methodsfuntions : E2D_1 : encryption code or text , D2E_2 : encryption code or text decrypt out original code output , E2D_1EXP  : code get encryption to comiple and output , D2E_1EXP  : encryption data get and decryption to not view only exec python codeclass  : fake_datavar : fake_data1, fake_var, fake_data2 , fake_data3 , fake_data4 , fake_data5class : cryptofunction : encrypt , decryptclass : crypto_V2function : encryptout_function = crypto.crypto_V2_decrypt()class crypto_V3function : encrypt, decrypt#`
Package: krispbroadcaster
BroadcasterBroadcaster helps you develop realtime streaming functionality by providing
a simple broadcast API onto a number of different backend services.It currently supportsRedis PUB/SUB,Apache Kafka, andPostgres LISTEN/NOTIFY, plus a simple in-memory backend, that you can use for local development or during testing.Here's a complete example of the backend code for a simple websocket chat app:app.py# Requires: `starlette`, `uvicorn`, `jinja2`# Run with `uvicorn example:app`frombroadcasterimportBroadcastfromstarlette.applicationsimportStarlettefromstarlette.concurrencyimportrun_until_first_completefromstarlette.routingimportRoute,WebSocketRoutefromstarlette.templatingimportJinja2Templatesbroadcast=Broadcast("redis://localhost:6379")templates=Jinja2Templates("templates")asyncdefhomepage(request):template="index.html"context={"request":request}returntemplates.TemplateResponse(template,context)asyncdefchatroom_ws(websocket):awaitwebsocket.accept()awaitrun_until_first_complete((chatroom_ws_receiver,{"websocket":websocket}),(chatroom_ws_sender,{"websocket":websocket}),)asyncdefchatroom_ws_receiver(websocket):asyncformessageinwebsocket.iter_text():awaitbroadcast.publish(channel="chatroom",message=message)asyncdefchatroom_ws_sender(websocket):asyncwithbroadcast.subscribe(channel="chatroom")assubscriber:asyncforeventinsubscriber:awaitwebsocket.send_text(event.message)routes=[Route("/",homepage),WebSocketRoute("/",chatroom_ws,name='chatroom_ws'),]app=Starlette(routes=routes,on_startup=[broadcast.connect],on_shutdown=[broadcast.disconnect],)The HTML template for the front endis available here, and is adapted fromPieter Noordhuis's PUB/SUB demo.RequirementsPython 3.7+Installationpip install broadcasterpip install broadcaster[redis]pip install broadcaster[postgres]pip install broadcaster[kafka]Available backendsBroadcast('memory://')Broadcast("redis://localhost:6379")Broadcast("postgres://localhost:5432/broadcaster")Broadcast("kafka://localhost:9092")Where next?At the momentbroadcasteris in Alpha, and should be considered a working design document.The API should be considered subject to change. If youdowant to use Broadcaster in its current
state, make sure to strictly pin your requirements tobroadcaster==0.2.0.To be more capable we'd really want to add some additional backends, provide API support for reading recent event history from persistent stores, and provide a serialization/deserialization API...Serialization / deserialization to support broadcasting structured data.Backends for Redis Streams, Apache Kafka, and RabbitMQ.Add support forsubscribe('chatroom', history=100)for backends which provide persistence. (Redis Streams, Apache Kafka) This will allow applications to subscribe to channel updates, while also being given an initial window onto the most recent events. Wemightalso want to support some basic paging operations, to allow applications to scan back in the event history.Support for pattern subscribes in backends that support it.
Package: kristall
Lightweightweb framework(wink, wink)
for building APIs and backends.
Reasonably fast in execution, quite fast for development. If you need
gazillions of requests served by single process in a second then there are
better options than Kristall. I’m happy when it’s not slower than Flask.WhySome frameworks suck here, others suck there and none is good at all things
I want. I decided to build a WSGI application tool that’s based onWerkzeugand is simpler than
Flask. Sure, there areFlaskextensions that make writing
REST APIs simpler likeFlask-RESTFulandFlask-RESTXbut they
are built on top of Flask and do many extra things that are better done by
others, or not done at all. I wanted something that is somewhere in betweenFalconand Flask. Simplicity of
Falcon with convenience of Flask.But since not everything sucks in Falcon I’d grab some ideas, like
resourceful routing without need to subclass specificResourcebase class,
or only static route registration.Whatresourceful routingstatic route registrationonly JSON content type supportedvery limited automatic coercion to JSONThat’s it for now.Future developments:JWT-based resource access control (optional)CORS support (optional)What notno decorator-based route registration - there’s only one way to register
routes and it is explicitno built-in support for any other content type thanapplication/jsonon
both input and outputno fancy JSON de/encoding, only builtinjsonmodule is used in default JSON
handling - use schema parsing/validating library eg.MarshmalloworColanderif
you need anything beyond that; default behaviour may be customised to some
degree by providing JSON decoder and encoder classesHowReally very thin wrapper over Werkzeug utility functions and classes.
Seriously, I’m not calling thisa framework. Not yet. It consists ofApplicationclass that’s and entry point to runtime andRequest/Responseobjects that in fact are Werkzeug’s built in
wrappers reconfigured to support only JSON as transport media with some
convenience methods.Runtime dependenciesPython 3.7Werkzeug 0.16These are minimal versions of requirements.
Package: krkn-lib
krkn-libKrkn Chaos and resiliency testing tool Foundation LibraryContentsThe Library contains Classes, Models and helper functions used inKrakento interact with
Kubernetes, Openshift and other external APIS.
The goal of this library is to give to developers the building blocks to realize new Chaos
Scenarios and to increase the testability and the modularity of the Krkn codebase.PackagesThe library is subdivided in several Packagesocp:Openshift Integrationk8s:Kubernetes Integrationtelemetry:k8s:Kubernetes Telemetry collection and distributionocp:Openshift Telemetry collection and distributionmodels:Krkn shared data modelsutils:common functionsDocumentationThe Library documentation is availablehere.
The documentation is automatically generated bySphinxon top
of thereStructuredText Docstring Formatcomments present in the code.
Package: krk-tablebase-generator
KRK Tablebase GeneratorKRK Tablebase Generator is a C++ extension for accelerating the generation of aKing and Rook versus King(KRK) endgame tablebase.InstallationUse the package managerpipto install krk-tablebase-generator.pipinstallkrk-tablebase-generatorUsageimporttablebase# returns a tuple containing black to move positions and white to move positionstablebase.get_lists()LicenseMIT
Package: krllint
krllintkrllint checks and automatically fixes KRL (KUKA Robot Language) code.InstallationYoue can downloadkrllint.pyeither from github or with this command:$pipinstallkrllintExmaple usageShow help:$krllint--helpCheck files or folders:$krllintexample.src
$krllintexample.srcfurhter_example.src
$krllintsource_dirAutomatically fix code:$krllint--fixexample.srcCreate a configuration file at the current working directory:$krllint--generate-configkrllint tries to load configuration files with the following sequence:krllint.conf.py:Explicitly defined as argumentCurrent working directory~/.config/Default configuration of krllintExplicitly loading of a configuration file:$krllint--configkrllint.config.py
Package: krmd
Simple command reminder applicationkrmd is a simple command reminder application where you can add the commands,configs, parameters you use,and list,
update, delete whenever you want.
It basically consists of 4 commands.
Usages can be found in the Usage section.Installation$ pip install krmdUsageThere is 4 command to use. 

1- add:    It is used when the command is wanted to be added.
   -> krmd add "<command>" 

2- list:   It is used when it is desired to display the added commands.
   -> krmd list

3- update: It is used if any of the added commands are wanted to be updated.
   -> krmd update <command_id> "<command>"
      -> krmd update 5 "<command>"

4- delete: It is used to delete any of the added commands.
   -> krmd delete <command_id>
      -> krmd delete 5DevelopmentThis project includes a number of helpers in theMakefileto streamline common development tasks.Environment SetupThe following demonstrates setting up and working with a development environment:### create a virtualenv for development

$ make virtualenv

$ source env/bin/activate


### run krmd cli application

$ krmd --help


### run pytest / coverage

$ make testDeploymentsDockerIncluded is a basicDockerfilefor building and distributingYour local command reminder,
and can be built with the includedmakehelper:$ make docker

$ docker run -it krmd --help
Package: krml
krmlFeaturesTODORequirementsTODOInstallationYou can installkrmlviapipfromPyPI:$pipinstallkrmlUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theGPL 3.0 license,krmlis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: krms
# krmsA simple python library for implementing the K-RMS Clustering algorithm on
unlabelled data using unsupervised learning.The code is Python 2 and 3 compatible.# InstallationFast install:pip install krmsFor a manual install get this package:$wgethttps://github.com/garain/krms/archive/master.zip$unzipmaster.zip$rmmaster.zip$cdkrms-masterInstall the package:python setup.py install# Examplefromkrmsimportkrms_clustering#For results related to Iris dataset no need to pass any argument.krms_clustering.run()#For getting results from custom dataset pass path of csv file as argument in function 'run'.krms_clustering.run("data.csv")N.B.: The csv file should have the labels in first column with header name ‘type’ followed by rest of feature columns.# References@article{GARAIN2020113,
title = "K-RMS Algorithm",
                journal = "Procedia Computer Science",
                volume = "167",
                pages = "113 - 120",
                year = "2020",
                note = "International Conference on Computational Intelligence and Data Science",
                issn = "1877-0509",
                doi = "https://doi.org/10.1016/j.procs.2020.03.188",
                url = "http://www.sciencedirect.com/science/article/pii/S1877050920306530",
                author = "Avishek Garain and Dipankar Das",
                keywords = "clustering, distortion-error, rms-value, multi-component analysis, unsupervised-learning"
                }
Package: krok
krokas in ngrokExpose your local TCP server as Kubernetes service in remote cluster.UsageGiving we want to create service innamespacewith nameservice_nameon portservice_portforwarding all traffic from it tolocal_host(usually 127.0.0.1) andlocal_port.Install krok client:pip install krokInstall krok server:kubectl -n <namespace> run --image=smpio/krok-server krokRun krok:krok -n <namespace> -l <local_host> -p <local_port> <service_name> <service_port>Note:local_hostcan be any host reachable from your machine, but usually127.0.0.1is the most useful.How it worksWe have running krok server in the podkrok_podinnamespace. The server is simple OpenSSH server that allows to forward incoming connections.Krok client is simple script that automates the following steps:Runkubectl port-forward <krok_pod> :22. It will listen on randomlocal_ssh_portforwarding all connections to krok's OpenSSH server onkrok_pod.Runssh -N -R *:0:<local_host>:<local_port> -p <local_ssh_port> krok@localhost. This causes krok's OpenSSH server onkrok_podto listen on randompod_portforwarding all connections tolocal_host:local_portusing SSH tunnel.Create or update serviceservice_namewith portservice_portand targetPortpod_port, with selector matchingkrok_pod.In the result, all connections toservice_name:service_portwill be forwarded tokrok_pod, then to your local machine via SSH tunnel forwarded bykubectl port-forward, and then forwarded by SSH client tolocal_host:local_port.
Package: kroki
krokiAccesskrokifrom python.To install:pip install krokiRead the overview below, or
view/download/playthis demo notebookto see how to use this package.Thekrokipython package is a convenience package for you to be able to generate diagrams,
throughkroki, getting your images as bytes or as ipython objects via python
functions or doing some "cell magic" in your jupyter notebooks.I suggest you have a look at thekroki's excellent homepagewhere you'll be able to try different diagram types out.
Don't miss the nicecheatsheetthere.OverviewYou can get the bytes of an image of a diagram like so:fromkrokiimportdiagram_image_bytessvn_bytes=diagram_image_bytes('Bob->Alice : Hello!')# which you can then save in a file...When in a jupyter notebook though, you have a more convenient function that will put those bytes into an IPython display object, which you can then display (will automatically call display if it's the last command of the cell), amongst other things.fromkrokiimportdiagram_imagediagram_image('Bob->Alice : Hello!')In both those functions, the default isdiagram_type='plantuml'andoutput_format='svg'.But you have other choices.diagram_image('digraph D {Alice -> Bob, Charles -> Darwin}',diagram_type='graphviz')png_bytes=diagram_image_bytes('Bob->Alice : Hello!',output_format='png')png_bytes[:7]b'\x89PNG\r\n\x1a'And then, there's magic, which will allow you to write your diagram source directly in a notebook's cell.%load_extkroki%%krokiBob->Alice:Hello!The defaultdiagram_typeis stillplantuml, but you can specify another type if you want.%%krokigraphvizdigraphD{Alice->Bob,Charles->Darwin}To see what diagram typeskrokisupports through thediagram_typesvariable.fromkrokiimportdiagram_typesprint(diagram_types){'svgbob', 'vega', 'packetdiag', 'mermaid', 'structurizr', 'bytefield', 'vegalite', 'c4plantuml', 'pikchr', 'rackdiag', 'ditaa', 'wavedrom', 'nwdiag', 'graphviz', 'excalidraw', 'plantuml', 'erd', 'umlet', 'actdiag', 'nomnoml', 'bpmn', 'seqdiag', 'blockdiag'}Not alloutput_formatvalues are supported for all diagram types. To which are supported for which types, you can have a look at theoutput_formatsdictionary, which which contains both the choices of diagram_type (as keys) and the corresponding output_format each support (as values).fromkrokiimportoutput_formatsoutput_formats['plantuml']['png', 'svg', 'jpeg', 'base64']output_formats['mermaid']['svg']output_formats['seqdiag']['png', 'svg', 'pdf']