Saravanan666/pypi-org huggingface dataset:
Package: kagtcprlib
kagtcprlib ·A TCPR library for King Arthur's Gold, aiming to provide a simple solution for writing interesting TCPR mods.Supports async connections to multiple KAG servers.The basic design of the library is that the user creates aClientinstance:client=Client(nickname="playercount",host="localhost",port=50301,rcon_password="ilovetrenchrun")Then adds some handlers to it:client.add_handler(PingHandler())Then calls the client'sconnectmethod:client.connect()Whenever the client receives a line of text from KAG, all matching handlers will be run. If any handler returns some text, it will be sent back to KAG as an RCON command.What each handler does is totally up to the user. This could involve creating entries in a database, posting to a web API, or just logging to a file.Exampleimportloggingimportkagtcprlibfromkagtcprlib.handlersimportBaseHandlerclassPingHandler(BaseHandler):"""Respond to 'ping' from KAG with code to print 'pong' in chat."""defhandle(self,client_nickname,timestamp,content):ifcontent=="ping":logging.info("Got ping from%s, sending pong.",client_nickname)return"getNet().server_SendMsg('pong');"if__name__=="__main__":logging.basicConfig(level=logging.INFO)client=kagtcprlib.Client(nickname="playercount",host="localhost",port=50301,rcon_password="ilovetrenchrun")client.add_handler(PingHandler())client.connect_forever()For more examples see theexamples/folder.ContributingYou are welcome to contribute to this project.Please ensure your feature branch is based on themasterbranch and is named likefeature-foo-bar.You must runpylintover your code and ensure it receives at least a score of 9.Docshttps://benjamingorman.github.io/kagtcprlib/
Package: kagu-torch
kagu-torchOfficial implementation for IJCV paperTowards Automated Ethogramming: Cognitively-Inspired Event Segmentation for Wildlife MonitoringOverviewDocumentationCheckout thedocumentationof code to learn more details.Installationpipinstallkagu-torch# with pip from PyPIpipinstallgit+'https://github.com/ramyamounir/kagu-torch'# with GitHubTrainingUse the provided pythontraining scriptto train or multiple gpus. Bash scripts with CLI arguments are provided in thehelper_scriptsWe use theDDPW libraryto enable scaling up our training to SLURM with one line of code.Citing our paperIf you find our approaches useful in your research, please consider citing:@article{mounir2023towards,
  title={Towards Automated Ethogramming: Cognitively-Inspired Event Segmentation for Streaming Wildlife Video Monitoring},
  author={Mounir, Ramy and Shahabaz, Ahmed and Gula, Roman and Theuerkauf, J{\"o}rn and Sarkar, Sudeep},
  journal={International Journal of Computer Vision},
  pages={1--31},
  year={2023},
  publisher={Springer}
}
Package: kahgean
Kahgean is a set of handy utils for daily development.kahgean.optionsmakes it easy to parse command-line
arguments and configuration file by just one set of defines.kahgean.logkitmakes configuring log handlers become easy.kahgean.daemonizecan help developers to write daemon programs.kahgean.initialprovides some functions that should be invoked
as soon as possible before doing any meaningful processing.kahgean.ipv4addrprovides handy classes for describing IPv4
addresses and/or subnetworks.
Package: kahipwrapper
Installationpip install kahipwrapperUsagefrom kahipwrapper import kaHIP

vwgt = None
xadj = [0,2,5,7,9,12]
adjcwgt = [1,1,1,1,1,1,1,1,1,1,1,1]
adjncy = [1,4,0,2,4,1,3,2,4,0,1,3]
nparts = 2
imbalance = 0.03
suppress_output = False
mode = kaHIP.STRONG
seed = 0

ncount = len(xadj) - 1
nparts = 2

print(ncount)

print(kaHIP.kaffpa_balance_NE(ncount, vwgt, xadj, adjcwgt, adjncy,
                              nparts, imbalance, suppress_output,
                              seed, mode))
print(kaHIP.kaffpa(ncount, vwgt, xadj, adjcwgt, adjncy, nparts,
                   imbalance, suppress_output, seed, mode))

print(kaHIP.node_separator(ncount, vwgt, xadj, adjcwgt, adjncy, nparts,
                           imbalance, suppress_output, seed, mode))For more information, please visit KaHIP sitehere
Package: kahn
Maritime Labs KahnAboutA light-weight and energy-efficient NMEA message broker.NotePlease note this is PRE-ALPHA quality software.FeaturesRead NMEA sentences from serial devicesSubmit NMEA sentences via UDP broadcastSetuppip install --upgrade kahnTo install the latest development version from the repository, invoke:pip install --upgrade git+https://github.com/maritime-labs/kahn#egg=kahnUsage# Read data from serial device and display on the terminal.
kahn forward --source=serial:///dev/ttyUSB0 --target=file:///dev/stdout

# Read data from serial device and forward to UDP broadcast.
kahn forward --source=serial:///dev/ttyUSB0 --target=udp+broadcast+nmea0183://255.255.255.255:10110Other projectsROS NMEA NavSat driver:https://github.com/ros-drivers/nmea_navsat_driver(nmea_serial_driver,nmea_socket_driver)Waterlinkednmeaoutput.pywaterlinked-nmeaoutput.pyProject informationContributionsAny kind of contribution, feedback or patches are very much welcome! Justcreate
an issueor submit a patch if you think we should include a new feature, or to
report or fix a bug.DevelopmentIn order to setup a development environment on your workstation, please head over
to thedevelopment sandboxdocumentation. When you see the software tests succeed,
you should be ready to start hacking.ResourcesSource code repositoryDocumentationPython Package Index (PyPI)LicenseThe project is licensed under the terms of the GNU AGPL license.
Package: kahnfigh
KahnfighLoad a yaml file:from kahnfigh import Config
config = Config('sample.yaml')Access keys using xpath syntax:config['Model/Architecture/Dense/units']Edit existing values:config['Model/Architecture/Dense/units'] = 128If the path doesn't exist, it will automatically create it:config['Model/Architecture/MyNewLayer/units'] = 88Moreover, you might want to find all paths matching a pattern. Use a wildcard:config['Model/Architecture/*/units']If there was a list in config['Model/Architecture'], then it will return all the value of key 'units' of all elements of the list which have that keyYou can also do some more elaborate but handy things like:config['Model/Architecture/*/[units=88]/name']This will return the value of key name of all elements of the list in Architecture which have the pair key:value units:88Sometimes it is really hard to work with nested dictionaries. Use to_shallow() and turn it into a depth-1 dictionary:shallow = config.to_shallow()Then, after some modifications, you might want to go back to a nested dictionary:from kahnfigh.core import shallow_to_deep

nested = shallow_to_deep(shallow)Also, you may want to create custom behaviours. For example, if we want a value to be replaced by a variable when the symbol $ appears, we can do:config['Model/name']
# this returns: $model_name
config['Model/Architecture/ConvLayer/filters']
# this returns: $n_filters

params = {'model_name': 'CNN-LSTM',
          'n_filters': 64}
config.replace_on_symbol('$',lambda x: params[x])

config['Model/name']
#this now returns: CNN-LSTM
config['Model/Architecture/ConvLayer/filters']

#this now returns: 64
Package: kahoot.py
AboutKahoot.py is a library to interact with the Kahoot API.Installationpip install -U KahootPYfromkahoot.pyimportclientbot=client()bot.join(12345,"KahootPY")defjoinHandle():passbot.on("joined",joinHandle)Since this is basically a translation of JavaScript to Python, expect issues and bugs.Documentation:
Seekahoot.js-updated. The API is very similar, besides having no Promises.
Package: kaia
Kaia is a backtesting and trading CLI using the PyAlgoTrade library. It currently is configured to work with Oanda broker account.Installation$ pip install requestsUsage$ kaia –help
Usage: kaia [OPTIONS] COMMAND [ARGS]…Options:--brokerTEXTset broker  [default: oanda]--helpShow this message and exit.Commands:backtest    Backtest strategy against market data (csv)…
marketdata  Download market data from broker store as…
trade       Parse back test results and start trading if…
Package: kaibu-geojson-utils
kaibu-geojson-utilsA set of utility functions for working with GeoJSON annotations inKaibu.Create a new repositoryCreate anew repositoryand selectimjoy-team/imjoy-python-templateas template repository.Clone your new repository.Search and replace all occurrences ofkaibu-geojson-utils. Replacekaibu-geojson-utilswith the name of the new repository.Add package requirements ininstall_requiresinsetup.pyand inrequirements.txtas needed.Update thisREADME.mdwith a description and instructions for your new repository.DevelopmentInstall and set up development environment.pipinstall-rrequirements_dev.txtThis will install all requirements.
It will also install this package in development mode, so that code changes are applied immediately without reinstall necessary.Here's a list of development tools we use.blackflake8mypypydocstylepylintpytesttoxIt's recommended to use the corresponding code formatter and linters also in your code editor to get instant feedback. A popular editor that can do this isvscode.Run all tests, check formatting and linting.toxRun a single tox environment.tox-elintReinstall all tox environments.tox-rRun pytest and all tests.pytestRun pytest and calculate coverage for the package.pytest--cov-reportterm-missing--cov=kaibu-geojson-utilsContinuous integration is by default supported viaGitHub actions. GitHub actions is free for public repositories and comes with 2000 free Ubuntu build minutes per month for private repositories.
Package: kaibu-utils
kaibu-utilsA set of utility functions for working withKaibu.Create a new repositoryCreate anew repositoryand selectimjoy-team/imjoy-python-templateas template repository.Clone your new repository.Search and replace all occurrences ofkaibu-utils. Replacekaibu-utilswith the name of the new repository.Add package requirements ininstall_requiresinsetup.pyand inrequirements.txtas needed.Update thisREADME.mdwith a description and instructions for your new repository.DevelopmentInstall and set up development environment.pipinstall-rrequirements_dev.txtThis will install all requirements.
It will also install this package in development mode, so that code changes are applied immediately without reinstall necessary.Here's a list of development tools we use.blackflake8mypypydocstylepylintpytesttoxIt's recommended to use the corresponding code formatter and linters also in your code editor to get instant feedback. A popular editor that can do this isvscode.Run all tests, check formatting and linting.toxRun a single tox environment.tox-elintReinstall all tox environments.tox-rRun pytest and all tests.pytestRun pytest and calculate coverage for the package.pytest--cov-reportterm-missing--cov=kaibu-utilsContinuous integration is by default supported viaGitHub actions. GitHub actions is free for public repositories and comes with 2000 free Ubuntu build minutes per month for private repositories.
Package: kaidoku
Kaidoku can solve sudoku puzzles as shown in the figure, play with the puzzles and create sudoku puzzles with a command-line interface.Kaidoku is aplayer of sudoku. You can play original sudoku puzzles of various level of difficulty with command line interface. You can get hints when you want.solver of sudoku. It can solve a sudoku puzzle and show the procedure of solving a sudoku puzzle with various logics. It evaluates if a given puzzle is valid sudoku with unique solution.creater of sudoku. It can create new sudoku puzzles. The puzzles shipped with this program was created by the program itself.Online player25000 sudoku puzzles classified with 9 difficulty levels are available online. Hints can be shown by running kaidoku with pyodide.https://sekika.github.io/kaidoku/sudokuFull documentDocument is availabe in English and Japanese.https://sekika.github.io/kaidoku/Supported logicsNaked single, pair, triple and quadHidden single, pair, triple and quadPointing pair and tripleX-wing family (Swordfish and Jellyfish)XY-wing and XYZ-wingRemote pairsChain of pairsTrial and search
Package: kaiju
# KaijuKaiju is a framework for data analaysis applications. A Kaiju
application contains a set of operations, which correspond to Python
methods in your code. Kaiju offers three main features:Automatic command-line parsing configuration.Logging of operation executions.MongoDB interfacing.This simplifies your research work by automatically documenting your
analyses and storing their results, making it easy for you to document
and reproduce your work. Kaiju also stimulates you to work from the
system shell instead of from within Python, so your application is a
stand-alone program from the moment you start building it, and not
just a Python module that you are always struggling to integrate to
another system.## UsageCreate a kaiju.Kaiju object with the desired configuration, and
use the__call__to decorate your operation methods.Kaiju depends onpymongofor interacting with MongoDB.## Kaiju axiomsA Kaiju application is defined by a Kaiju object, an instance from the
Kaiju class.A Kaiju application contains a set of operations.Each Kaiju operation is a method from your Python code that was
decorated by the Kaiju object.These operations can consume and produce data. The consumed data are
the method arguments, and the output data is whatever the method
returns. Operations typically output lists, or generators, and Kaiju
iterates over this output.The output from a non-logged operation is simply sent to stdout.The output from a logged operation is stored in MongoDB, in the
collection specified by the decorator argumentoutput. Each element
from this output becomes a separate record in the collection.A logged operation outputs amaker_idcode, which is the_idassigned to this operation execution in the Kaiju log.You can specify different types for the operation inputs using the
classes from the kaiju.arguments submodule.TheDatainput class lets you fetch data from the database. The
argument receives amaker_idand outputs to the underlying operation
method a generator for corresponding data.
Package: kaiju-automator-lib
kaiju-automator-libThis library is used as the python interface between client software and kaiju-mqtt-py, to make requests of the automator module on the RAE.This library is used for a few purposes:Get a test plan for a deviceRun a test plan for a deviceCancel a test plan currently running on a deviceRequest data formatMost requests to the automator module require a device identifier. This is one or more of: an ESN, an IP, or an ADB serial number. Examples:{"device_ip":"192.168.144.10"}{"device_esn":"RKU..."}{"device_serial":"..."}There is a newer format that moves this into a "target" object with shorter syntax:{"target":{"ip":"192.168.144.10"}}{"target":{"esn":"RKU..."}}{"target":{"serial":"..."}}These identifiers are typically merged into larger request objects, such as test plan run or test plan cancel requests.Test plan response data formatThe test plan data format is described generally in client.py. A more general discussion of what decisions can be made from the contents of this object needs to be written.Test plan run request data formatThe test plan run request data format is also described generally in client.py. It requires only minor modifications to the response from a test plan request.Test result data formatTest plan results are reported as a map describing the results of a test plan run. These formats should be more generally documented in a language-agnostic location, as they apply to all clients of the automator.
Package: kaiju-files
SummaryPython>=3.8Postgresql>=14Project documentationDatabase transport, interfaces and migration services for postgresql.Usepip install kaiju-filesto install the package.For development run the init scripttools/init.sh.
It will setup git hooks and install the dev version of the project.TestingInstall the package with dev dependencies usingtools/init.shorpip install -e .[test].Start docker daemon.Runpytestfrom the project root.DocumentationRundocs/docs.shfrom the project root to generate documentation.
Package: kaiju-images
SummaryPython>=3.8Postgresql>=14Project documentationDatabase transport, interfaces and migration services for postgresql.Usepip install kaiju-imagesto install the package.For development run the init scripttools/init.sh.
It will setup git hooks and install the dev version of the project.TestingInstall the package with dev dependencies usingtools/init.shorpip install -e .[test].Start docker daemon.Runpytestfrom the project root.DocumentationRundocs/docs.shfrom the project root to generate documentation.
Package: kaiju-kafka
SummaryPython>=3.8Postgresql>=14Project documentationDatabase transport, interfaces and migration services for postgresql.Usepip install kaiju-kafkato install the package.For development run the init scripttools/init.sh.
It will setup git hooks and install the dev version of the project.TestingInstall the package with dev dependencies usingtools/init.shorpip install -e .[test].Start docker daemon.Runpytestfrom the project root.DocumentationRundocs/docs.shfrom the project root to generate documentation.
Package: kaikeba-flow
ABOUTThis is a mini deep learning framework created by Kaikeba @ BeijingFeaturesDefine Dynamic Computing GraphDefine Neural Network OperatorDefine Linear, Sigmoid, L2_lossAuto-Diff ComputingAuto-Feedforward and BackwardRemainClassificationCross-EntropyCNN, RNNConnectionwechat: fortymiles
Mail:minchiuan@zju.edu.cn
Package: kaikobittrex
A python module that provides easier access to the Kaiko Bittrex
Historical trade data. Assuming that you’ve bought the files fromhere,
you can now use these (relativelly) simple 2 steps to process them.Create anindex.csvfile. We assume that you have unziped the
file and when youls Bittrexyou see the pairs e.g.2GIVEBTC,8BITBTCetc. Then you run:find Bittrex-typef | grep-v".DS_Store" > index.csvand anindex.csvfile must have been created for you. This file has all
the.csv.gzfiles of the archive.When you install withpip install kaikobittrex, you can create anIndexobject from Python and access the content of those files
like this:#!/usr/bin/env python

from kaikobittrex import Index

idx = Index.from_file()

def process_pair(year, month, day, pair, f):
    for lineno, line in enumerate(f.readlines()):
        line = line.strip()
        if lineno == 0:
            assert line == "id,exchange,symbol,date,price,amount,sell"
        else:
            record = idx.parse_line(line)
            print record

idx.process_all(process_pair)There are additionalprocess_*methods that allow you to process
subset of those data.process_day(self, year, month, day, f)andprocess_pair(self, year, month, day, pair, f)all take the same type
of callback argumentfand process the subset of records you
defined. TheIndexobject also exposes theindexmember which
has records for given date/pair, thepairsmember that has all
available pairs and thepairs_mapmember that maps pairs to coin
base/quote pairs. See the test file for more details.NotesTo releasepython setup.py sdist,twine upload dist/*.
Package: kailo-beewell-dashboard
kailo-beewell-dashboard: tools to support creation of #BeeWell survey dashboards for the Kailo project.This package contains functions that are used in the creation of the various #BeeWell survey dashboards for Kailo. They have been compiled into a single package to prevent code duplication between the different repositories.FeaturesFunctions used to generate and aggregate synthetic dataFunctions used in creation of the streamlit dashboards and equivalent PDF reportHow to install?pip install kailo-beewell-dashboard
Package: kaioretry
KaioRetryKaioRetry is (yet another) retry decorator implementation, which is
clearly inspired by the originalretrymodule and is actually
backward compatible with it.Basic usageTransparently perform retries on failures:fromkaioretryimportretry,aioretry@retry(exceptions=ValueError,tries=2)defsome_func(...):...@aioretry(exceptions=(ValueError,SomeOtherError),tries=-1,delay=1)asyncdefsome_coroutine(...):...DocumentationIf you care to read more, a more lengthy documentation is available onreadthedocs.Known IssuesPylintPylint, it seems, is notreally
good a detecting decorators that change function
signatures, and kaioretry
defines and uses a lot of decorators (relatively speaking).This means that such basic code:fromkaioretryimportaioretry@aioretry(exceptions=ZeroDivisionError)asyncdeffunc(x,y):returnx/yWill trigger the following pylint errors:E1120: No value for argument 'retry_obj' in function call (no-value-for-parameter)According to pylint documentation, the only way to widely work around this
issue is to use thesignature-mutatorsfeature of pylint. This can be done either on the command line:pylint --signature-mutators=kaioretry._make_decoratorOr through pylint configuration file:# The TYPECHECK section accepts a signature-mutators directive.[TYPECHECK]# List of decorators that change the signature of a decorated function.signature-mutators=kaioretry._make_decorator(Of course, you can inline a# pylint: disable=no-value-for-parametercomment on allaioretry()andretry()call lines, and it can be good
enough to disable a one-time warning, but repeating that line can be
tedious. Thesignature-mutatorsdirective will globally disable the
signature-checking foraioretry()andretry()calls, so this can be easier
depending of your own usage of kaioretry.)Mypy and functions generated by kaioretry.aioretryMypymay incorrectly infer the type of an
aioretry-decorated function asdef (*Any, **Any) -> Anyifthe original
function:is a coroutineandhas a returned type hinted asAnyand/or if parameters are hinted asAny.If the original function is fully annotated as non-Any, the resulting
decorated function annotations should be correctly inferred (according tokaioretry
test).It is unclear to me right now, if thekaioretry.aioretryfunction type hints
are incorrect or if it is an issue with either mypy or cpython. Or both. Or
all 3. Go figure.Any information on that matter would be greatly appreciated. I've spent weeks
trying to track down this issue. And while walking down this path has allowed
me to fix some other (rather unrelated) type-hinting boo-boos from my part,
this very specific issue is still puzzling me.Feedback welcome.Always.
Package: kaipy
Project KaijuSimulation tools for space plasmas using fluid and particle models.To use thekaipyPython modules:Installkaipyas usual usingpip.Importkaipymodules into your code.To use thekaipyPython scripts:AssumingKAIJUDIRis the base installation directory, addKAIJUDIR/scriptstoPATH.For help, see the wiki athttps://bitbucket.org/aplkaiju/kaiju/wiki/Home
Package: kaira
blablabla blabla blablabla blabla:from kaira.app import App
from kaira.response import response


app = App()


@app.route("/")
def hello_world(request):
    return response.text('Hello World!')

if __name__ == '__main__':
    app.run(host="0.0.0.0", port=8000)(Note the double-colon and 4-space indent formatting above.)Paragraphs are separated by blank lines.Italics,bold,
andmonospacelook like this.A SectionLists look like this:FirstSecond. Can be multiple lines
but must be indented properly.A Sub-SectionNumbered lists look like you’d expect:hi theremust be goingUrls arehttp://like.thisand links can be
writtenlike this.
Package: kairios
Provides utilities for publishing events as a calendar.At the moment, it just provides a visual calendar (both large and small)
showing which days have events and optionally linking to a day detail page.Usage{% load kairios_tags %}

...

{% calendar events %}whereeventsimplements the following protocol:events.day_url(year, month, day, has_event, **kwargs)return a link to the page for the given day or None if there is not to
be a day link.has_eventis a boolean telling this method whether
there is an event on the day or not so you can choose whether a day
without an event should link or not.events.month_url(year, month, **kwargs)return a link to the page for the given month or None if there is not
to be a month link.events_by_day(year, month, **kwargs)return a dictionary mapping day number to a list of events on that day.Note that all methods take additional key-word arguments that can be used in
the calculation of the return value.