Saravanan666/pypi-org huggingface dataset:
Package: kaczmarz-algorithms
Variants of the Kaczmarz algorithm for solving linear systemsInstallationTo install Kaczmarz Algorithms, run this command in your terminal:$pipinstall-Ukaczmarz-algorithmsThe-Uargument is optional. It specifies that the most package should be upgraded to the most recent version if it is already installed.If you don't havepipinstalled, theseinstallation instructionscan guide you through the process.UsageImport the package>>>importkaczmarzDefine your system of equations (e.g.3 * x0 + x1 = 9andx0 + 2 * x1 = 8)>>>A=[[3,1],...[1,2]]>>>b=[9,8]Solve the system of equations using the Kaczmarz algorithm with a cyclic selection rule>>>x=kaczmarz.Cyclic.solve(A,b)>>>xarray([2.,3.])Similarly, to solve the same system of equations using the max-distance selection rule>>>x=kaczmarz.MaxDistance.solve(A,b)For a complete list of selection strategies, check thedocs. If your desired selection strategy is not provided, please open an issue with your suggestion!Inspect the iteratesTo access the iterates of the Kaczmarz algorithm usekaczmarz.SelectionStrategy.iterates(). For example,>>>A=[[1,0,0],...[0,1,0],...[0,0,1]]>>>b=[1,1,1]>>>x0=[0,0,0]# Initial iterate>>>forxkinkaczmarz.Cyclic.iterates(A,b,x0):...xkarray([0.,0.,0.])array([1.,0.,0.])array([1.,1.,0.])array([1.,1.,1.])Inspect the rows/equations usedYou can access the row index used at each iteration asiterates.ikin the following example.>>>iterates=kaczmarz.Cyclic.iterates(A,b,x0)>>>forxkiniterates:...print("Row used:",iterates.ik)Rowused:-1Rowused:0Rowused:1Rowused:2The initial value ofiterates.ikis-1, since no projections have been performed yet at the start of the algorithm.Optional argumentsThesolve()anditerates()functions take optional arguments ofmaxiterandtolto specify a limit on the number of iterations
and the desired accuracy of the solution respectively.Creating your own selection strategyTo implement a selection strategy of your own, inherit fromkaczmarz.Baseand implement the_select_row_index()method.
For example, to implement a strategy which uses of the equations of your system in reverse cyclic order:>>>classReverseCyclic(kaczmarz.Base):...def__init__(self,A,*args,**kwargs):...super().__init__(A,*args,**kwargs)...self.n_rows=len(A)...self.row_index=None......def_select_row_index(self,xk):...ifself.row_indexisNone:...self.row_index=self.n_rows...self.row_index=(self.row_index-1)%self.n_rows...returnself.row_indexYour new class will inheritsolve()anditerates()class methods which work the same way askaczmarz.SelectionStrategy.solve()andkaczmarz.SelectionStrategy.iterates()described above.>>>iterates=ReverseCyclic.iterates(A,b,x0)>>>forxkiniterates:...print("Row used:",iterates.ik)...print("Iterate:",xk)Rowused:-1Iterate:[0.0.0.]Rowused:2Iterate:[0.0.1.]Rowused:1Iterate:[0.1.1.]Rowused:0Iterate:[1.1.1.]CitingIf you use our code in an academic setting, please consider citing our code.
You can find the appropriate DOI for whichever version you are using onzenodo.org.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.
Package: kad2gp
Kad2GPИнструмент, берущий данные с сайтаhttp://pkk.rosreestr.ru/по кадастровому номеру участка и преобращующий их в готовый для обсустройсства план в программеGarden Plannerс корректными размерами участка.Зависимостиrosreestr2coordУстановкаУстановка через пакетный менеджерpipinstallkad2gpУстановка девелоперской версииgitclonehttps://github.com/TonSilver/kad2gpcd./kad2gp
pythonsetup.pyinstall
Package: kadabra-client
thousandwordsDocumentation:https://docs.1000words-hq.com/1000Words Home:https://1000words-hq.com/Try it in Colab:https://colab.research.google.com/drive/1E5oU6TjH6OocmvEfU-foJfvCTbTfQrqd?usp=sharing
Package: kadaster-kikinzage-client
Kadaster - KIK Inzage API Python clientFeaturesFully typed client for theKadaster KIK Inzage APIversion 6.0Asyncio support with httpxRequirementsPydantic V2httpxInstallationYou can install _ Kadaster - KIK Inzage API Python client_ viapipfromPyPI:$pipinstallkadaster-kikinzage-clientUsageimportosfromkikinzage.clientimportDefaultClient,AsyncClientfromkikinzage.modelsimportFormaat,Eigendomsinformatiedefcreate_client(client_class):client=client_class(# requiredpassword=os.getenv("KIK_PASSWORD"),username=os.getenv("KIK_PASSWORD"),# for testing# base_url="https://service10.kadaster.nl/kik-inzage-eto/v6/"base_url="https://service10.kadaster.nl/kik-inzage/v6/",# optional defaults added to each request when availableformaat=Formaat.PDF_JSON,klantreferentie="Standaard klantreferentie",hyperlinkopproduct=True,inkoopnummer="Standaard inkoopnummer",gebruikeridentificatie="Standaard gebruikeridentificatie",)returnclientkik=create_client(DefaultClient)info:Eigendomsinformatie=kik.eigendomsinformatie_postcode("4884ME","16")asyncwithcreate_client(AsyncClient)askik:info_async:Eigendomsinformatie=awaitkik.eigendomsinformatie_kadastraalobjectidentificatie("BRD01K:G:0000","1")ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,
_ Kadaster - KIK Inzage API Python client_ is 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: kade-drive
Distributed file system based onhttps://github.com/bmuller/kademliafor the final project of distributed systemsDocumentationhttps://geekslabtech.github.io/kade-drive/Basic UsageClone the repo and runpoetry installRunpoetry run serverin one pc or several pc in a local networkRunpoetry run cliin any pc of the network and start playing with the systemUsage with dockerBuild the image withmake dockeror pull it from docker.hubdocker pull joramas/kade-drive:latestRunmake shellto start the Docker container with an interactive Bash shellNow you can runpoetry run serverto start a server orpoetry run cliInstallationpip install kade-driveServerfromkade_drive.serverimportstart_serverstart_server()ClientNote: Make sure that there exist at least a server in the local networkfromkade_drive.cliimportClientSessionclient=ClientSession()client.connect()response,_=client.put(4,5)# If true, it means that the value was setted correctly, false otherwiseassertresponseisTruevalue,_=client.get(4)assertvalue==5TestsTo run tests make shure that there is at least one server in the network.
Package: kademlia
Python Distributed Hash TableDocumentation can be found atkademlia.readthedocs.org.This library is an asynchronous Python implementation of theKademlia distributed hash table.  It uses theasyncio libraryin Python 3 to provide asynchronous communication.  The nodes communicate usingRPC over UDPto communiate, meaning that it is capable of working behind aNAT.This library aims to be as close to a reference implementation of theKademlia paperas possible.Installationpip install kademliaUsageThis assumes you have a working familiarity withasyncio.Assuming you want to connect to an existing network:importasynciofromkademlia.networkimportServerasyncdefrun():# Create a node and start listening on port 5678node=Server()awaitnode.listen(5678)# Bootstrap the node by connecting to other known nodes, in this case# replace 123.123.123.123 with the IP of another node and optionally# give as many ip/port combos as you can for other nodes.awaitnode.bootstrap([("123.123.123.123",5678)])# set a value for the key "my-key" on the networkawaitnode.set("my-key","my awesome value")# get the value associated with "my-key" from the networkresult=awaitnode.get("my-key")print(result)asyncio.run(run())Initializing a NetworkIf you're starting a new network from scratch, just omit thenode.bootstrapcall in the example above.  Then, bootstrap other nodes by connecting to the first node you started.See the examples folder for a first node example that other nodes can bootstrap connect to and some code that gets and sets a key/value.LoggingThis library uses the standardPython logging library.  To see debut output printed to STDOUT, for instance, use:importlogginglog=logging.getLogger('kademlia')log.setLevel(logging.DEBUG)log.addHandler(logging.StreamHandler())Running TestsTo run tests:pip install -r dev-requirements.txt
pytestReporting IssuesPlease report all issueson github.Fidelity to Original PaperThe current implementation should be an accurate implementation of all aspects of the paper save one - in Section 2.3 there is the requirement that the original publisher of a key/value republish it every 24 hours.  This library does not do this (though you can easily do this manually).
Package: kadena-sdk
To Usefromkadena_sdkimportKadenaSdk,KeyPair# Create your keypair and setup the SDK with the endpoint you desire in life.key_pair=KeyPair(type='json',priv_key='5e8b125c89ed409f2cfcc6e863e8aafd60b9d80a4d2333a12592f7a961a62bf8',pub_key='ad273a54460305767e2e36f41d1a5fe78c48474a6e3bc18624d53fbbbb5974bb')# base_url will default to https://api.testnet.chainweb.com# KeyPair isn't required, but no sigs will be included in any local/send callskadena=KadenaSdk(base_url='https://api.chainweb.com',key_pair=key_pair)# Very open ended: Work directly with the payload.payload=kadena.build_exec_payload('(format "{}" [(read-msg "test")])',env_data={'test':'hello'})# SDK works with whichever chains you choose!chain_ids=['0','1']# Commands is a dictionary where each key is the chain id and the value# is the command to be sentcmds=kadena.build_command(payload,chain_ids)# You can use local or send to dirty read or commit respectively.# These are the /local and /send endpoints.res=kadena.local(cmds)# Responses are in a dictionary with keys being the chains# that were interacted withprint(res['0'].json())# You can also listen to commands. This is a blocking command.# Pass in the transaction id and the chain you want to listen on.kadena.listen('tx_id','0')## Lastly, if you want to just run some pact code, you can do sores=kadena.run_pact('(format "Test{}" [(read-msg "test")])',env_data={'test':'hello'})To Build and Deploypython3-mbuild
python3-mtwineuploaddist/*To Testpytest
Package: kadi
Kadi4MatKadi4Matis theKarlsruhe Data Infrastructure for Materials Science, an
open source software for managing research data. For more information about the
project, please see itswebsiteanddocumentation.InstallationWhile the packaged code of Kadi4Mat can easily be installed as a Python package
viapip, a complete installation requires a
few additional dependencies and considerations. Please refer to thestable
documentationfor full installation
instructions.DevelopmentContributions to the code are always welcome. However, please consider creating
an issue first, as described below, if you are planning to make larger changes.
Please refer to thelatest
documentationfor instructions on
how to set up a development environment of Kadi4Mat as well as other useful
information, such as how to set up a separate fork of themain
repository.In order to merge any contributions back into the main repository, please open
a correspondingmerge
request. Typically, the
source branch of the merge request would be a separate (feature) branch of your
forked repository containing the changes to merge, while the target branch
should correspond to themasterbranch of the main repository. Depending on
the changes, please make sure to add appropriate tests, documentation,
translations, etc. and also add a corresponding entry to the changelog inHISTORY.md, if
necessary. Furthermore, you can add yourself as a contributor toAUTHORS.md.IssuesFor any issues regarding Kadi4Mat (bugs, suggestions, discussions, etc.) please
use theissue trackerof this
project. Make sure to add one or more fitting labels to each issue in order to
keep them organized. Before creating a new issue, please also check whether a
similar issue is already open first. Note that creating new issues requires a
GitLab account.Forbugsin particular, please use the providedBugtemplatewhen creating a new issue, which also adds theBuglabel to the issue
automatically. Forsecurity-relatedissues or concerns, please seeSECURITY.md.
Package: kadi-apy
Kadi-APYKadi-APYis a library for use in tandem withKadi4Mat. The REST-like API of
Kadi4Mat makes it possible to programmatically interact with most of the
resources that can be used through the web interface by sending suitable HTTP
requests to the different endpoints the API provides.The goal of this library is to make the use of this API as easy as possible. It
offers both an object oriented approach to work with the API in Python as well
as a command line interface (CLI). The library is written in Python 3 and works
under both Linux and Windows.QuickstartInstallationThe library can be installed using pip:pip3 install kadi-apyNote that Python version>=3.8is required to install the latest version.ConfigurationTo connect to an existing Kadi4Mat instance, some further configuration is
required, which can be initialized by running:kadi-apy config createSimple Python exampleRetrieve an existing record by its ID and upload a file to it:fromkadi_apyimportKadiManagermanager=KadiManager()record=manager.record(id=1)record.upload_file("/path/to/file.txt")Simple CLI exampleDo the same as in the example above:kadi-apyrecordsadd-files-r1-n/path/to/file.txtIssuesFor any issues regarding the kadi-apy (bugs, suggestions, discussions, etc.)
please use theissue trackerof
this project. Before creating an issue, please make sure that no similar issue
is already open and that you are using the latestreleaseor the current version of thedevelopbranch. Note that creating a new issue requires a GitLab account.Forbugsin particular, please use the providedBugtemplate when
creating an issue, which also adds theBuglabel to the issue automatically.ContributionsContributions to the code are always welcome. In order to merge any
contributions back into the main repository, please open a correspondingmerge
request. Please notice
that all merge requests should go to thedevelopbranch.For instructions on how to set up a development environment, please see thedocumentationfor more details.Further linksSource code:https://gitlab.com/iam-cms/kadi-apyReleases:https://pypi.org/project/kadi-apy/Documentation:Stable (reflecting the latest release):https://kadi-apy.readthedocs.io/en/stable/Latest (reflecting thedevelopbranch):https://kadi-apy.readthedocs.io/en/latest/
Package: kadminutils
kadminutilskadmin.local wrapperInstallpip install kadminutilsRequirementsThe library wraps the commandkadmin.localandkinit, so you must put these two command in PATH.Functionslist_principalsdelete_principalchange_passwordget_principalrename_principalktaddcheck_passwordExampleimport kadminutils
import uuid
import os

realm = os.environ.get("KRB5REALM", "EXAMPLE.COM")

principal = str(uuid.uuid4()) + "@" + realm
principal2 = str(uuid.uuid4()) + "@" + realm
password = str(uuid.uuid4())

r1 = kadminutils.add_principal(principal)
print(r1)

r2 = kadminutils.change_password(principal)
print(r2)

r3 = kadminutils.change_password(principal, password)
print(r3)

r4 = kadminutils.get_principal(principal)
print(r4)

r5 = kadminutils.rename_principal(principal, principal2)
print(r5)

r6 = kadminutils.check_password(principal2, password)
print(r6)

r7 = kadminutils.ktadd("/tmp/a.keytab", [principal2])
print(r7)

r8 = kadminutils.delete_principal(principal2)
print(r8)

r9 = kadminutils.list_principals()
print(r9)

os.unlink("/tmp/a.keytab")Releasesv0.2.4 2021/12/03First release.
Package: kadoo
KadooThe priorities management CLI you never knew you neededKadoo organises your priorities using the Eisenhower Decision Matrix.InstallationpipinstallkadooUsage# get started by creating your first matrix board$kadoo# to perform actions on your new table, use it's name$kadoo<table_name># add an item to quadrant 1$kadoo<table_name>-a"My first item"-q1# create a new table: kadoo -ct <TABLE_NAME> <TABLE_DESCRIPTION>$kadoo-ctdev"My developer tasks"# add an item to quadrant 1$kadoodev-a"Work on a new project"-q1# add an item to quadrant 2$kadoodev-a"Star this repo xDD"-q2# mark a task as done: kadoo <TABLE_NAME> -d "<TASK_NAME>" -q <QUADRANT>$kadoodev-a"Work on a new project"-q1AboutThe matrix sorts tasks based on urgency and importance.
Package: kadota
KadotaTools for working with Figma programmatically.Package page can be found here:https://pypi.org/project/kadota/.Working with this repositoryFor creating and regenerating environment file:conda env create --file env.yaml
conda env export --no-builds | grep -v "^prefix: " > env.yamlFor creating requirements file required for pip installability (may need to install pipreqs):pipreqs . --forceFor deleting old builds:rm build dist -rfFor building before publishing to pypi:python setup.py sdist bdist_wheelFor testing before publishing to pypi:twine check dist/*For publishing to pypi:twine upload --repository-url https://upload.pypi.org/legacy/ dist/*Demoimport kadota.utils
import kadota.figmatools

if __name__ == "__main__":
    """
    Function demonstrating usage of kadota.
    """

    # Load keys from keys.json and create a FigmaFile object to access a specific file.
    keys = kadota.utils.load_keys()
    figma_file = kadota.figmatools.FigmaFile(
        keys["figma-access-token"], 
        keys["figma-file-id"]
    )

    # Retrive all the elements.
    print(f"Found {len(figma_file.get_elements())} elements in file.")

    # Retrieve a page id.
    page_name = "templates"
    page_id = figma_file.get_page_ids_by_name(page_name)[0]
    print(f"Found page '{page_name}' with id {page_id}.")

    # Retrieve all the elements with a specific name.
    element_name = "linkedin-square"
    print(f"Found {len(figma_file.get_elements(element_name=element_name))} element(s) with name {element_name}.")
Package: ka-drf-utils
KitchenArt DRF UtilitiesThis package contains helpers and utilities used at
KitchenArt for django-based projects.Features:Base Class Model for timestamped and soft delete.Serializer classes for timestamped.View classes for soft delete.Log Activity moduleBasic publisher classesTranslation serializer classesHelper parse identity from hrefHelper for generate unique data idCustom drf exception handlerInstallationpipinstallka-drf-utilsChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[0.7.0] - 2022 - 09 - 05FixedUpdate ugettext_lazy import for django 4[0.6.0] - 2021 - 08 - 08AddedAdd new helper function for generate unique data id[0.5.0] - 2021 - 02 - 23ChangedUpdate view LogViewSetMixin to custom log serializer[0.4.0] - 2020 - 12 - 22AddedCreate view TranslationViewSetMixin to get detail all translation fields[0.3.1] - 2020 - 12 - 14Fixedfix signaling in LogViewSetMixin if user anonymous[0.3.0] - 2020 - 12 - 13ChangedSimplify log moduleRemovedRemove LogSerializerMixin[0.2.0] - 2020 - 12 - 13RemovedRemove translation moduleFixedFix exchange on publisher[0.1.1] - 2020 - 12 - 09FixedFix history.md in a setup.py[0.1.0] - 2020 - 12 - 09AddedTimestampedSerializerMixin for Timestamped ModelSoftDeleteViewSetMixin for handling soft delete dataBaseModel for SoftDelete and Timestamped ModelHelper for parse identity from hrefLinkHeaderPaginationCustom receiver django signalCustom exception handlerBasicPublisher classTranslation moduleActivity Log module
Package: kadrovik-g4
kadrovikPython module for take frames from videoInstallationPackage Installation from PyPi$pipinstallkadrovik-g4Package Installation from Source CodeThe source code is available onGitHub.Download and install the package:$gitclonehttps://github.com/Genzo4/kadrovik
$cdkadrovik
$pipinstall-rrequirements.txt
$pipinstall.Basic usageImport:fromkadrovik_g4importKadrovikCreate instance:Create an instance of the Kadrovik. You can specify additional options:video - input video.
Default value: ''frame_n - extract frame number.
Default value: 5out_path - Path to output frames.
Default value: 'frame_%d.png'kadrovik=Kadrovik(frame_n=5,out_path='frames/frame_%d.png')Extract frameskadrovik.process('input.ts')See the example.py file for an example of usage.ChangelogkadrovikPython модуль для извлечения кадров из видео.УстановкаУстановка пакета с PyPi$pipinstallkadrovik-g4Установка пакета из исходного кодаИсходный код размещается наGitHub.Скачайте его и установите пакет:$gitclonehttps://github.com/Genzo4/kadrovik
$cdkadrovik
$pipinstall-rrequirements.txt
$pipinstall.ИспользованиеПодключаем:fromkadrovik_g4importKadrovikСоздаём экземплярСоздаём экземпляр Kadrovik. Можно указать дополнительные параметры:video - входное видео.
Значение по умолчанию: ''frame_n - номер извлекаемых кадров.
Значение по умолчанию: 5out_path - имя (и путь) извлекаемых кадров. Используется подстановка %d.
Значение по умолчанию: 'frame_%d.png'kadrovik=Kadrovik(frame_n=5,out_path='frames/frame_%d.png')Извлекаем кадрыkadrovik.process('input.ts')Пример использования см. в файле example.pyChangelog
Package: kaf
KafSå er det tid til en kop kaf'Kaf is a small Python framework for creating Kafka apps. It is inspired by Faust, but differs in the following ways:Kaf is synchronous (async is future work)Kaf is compatible with Azure Eventhubs (over Kafka interface)Kaf is designed to work with different brokers for the consumer and producerThe framework depends on Confluent Kafka.How to useMinimal example:importloggingfromkafimportKafkaAppconsumer_config={'bootstrap.servers':'kafka:9092','group.id':'myapp'}producer_config={'bootstrap.servers':'kafka:9092'}app=KafkaApp('myapp',consumer_config=consumer_config,producer_config=producer_config,consumer_timeout=5,consumer_batch_size=1)app.logger.setLevel(logging.INFO)@app.process(topic='foo',publish_to='bar',accepts='json',returns='json')defadd_one(input):number=input['number']yield{'result':number+1},bytes(number)@app.on_processeddefdone(msg,seconds_elapsed):app.logger.info(f'Processed message in{seconds_elapsed}seconds')if__name__=='__main__':app.run()How errors are handledKafka functions keep trying until they succeed.
Each user function will get one chance to process each incoming message. Any exception raised by a user functions will only be logged, but otherwise ignored.
If a user wants to implement retrying they can do that, but it will stall the pipeline until the function returns.Future work:Features to be added:Add decorators for app eventson_consume,on_processedandon_publised. This will allow to hook up e.g. Datadog metrics to these events.How to deploy a new versionSteps (can maybe be improved):change version and download_url in setup.pygit add + commit + pushcreate new release in GitHub (check source-code link, should match download_url)Runpython setup.py sdistRuntwine upload dist/* --verbose(if not installed,pip install twinefirst)Useful links used:https://realpython.com/primer-on-python-decorators/#registering-pluginshttps://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56
Package: kafe2
kafe2is an open-source Python package for the likelihood-based estimation of model parameters
from measured data.
As the spiritual successor to the originalkafepackage it aims to provide
state-of-the-art statistical methods in a way that is still easy to use.
More informationhere.If you have installed pip just runpipinstallkafe2to install the latest stable version and you’re (mostly) ready to go.
The Python packageiminuitwhichkafe2uses internally for numerical optimizationmay fail to be installed automatically if no C++ compiler is available on your system.
Whileiminuitis strictly speaking not required its use is heavily recommended.Make sure to read the pip installation log.As ofkafe2v2.4.0 only Python 3 is supported.kafe2works with matplotlib version 3.4 and newer.The documentation underkafe2.readthedocs.iohas more detailed installation instructions.
It also explainskafe2usage as well as the mathematical foundations upon whichkafe2is built.If you prefer a more practical approach you can instead look at the variousexamples.
In addition to the regular Python/kafe2go files there are also Jupyter notebook
tutorials (in English and in German) that mostly cover the same topics.If you encounter any bugs or have an improvement proposal, please let us
know by opening an issuehere.