Saravanan666/pypi-org huggingface dataset:
Package: krausening
Krausening Python - Externalized Property Management and Access for Python ProjectsKrausening property management and encryption for Python is packaged using the open-source Python Maven pluginHabushuand made available as aPyPI package.Distribution ChannelKrausening Python is published to PyPI under thekrauseningproject and may be installed using any package installer/manager that leverages PyPI.  For example:Poetry-poetry add krauseningpip-pip install krauseningManaging Properties with Krausening and PythonManaging properties with Krausening's Python library utilizes a similar approach to that required by Krausening Java. Krausening Python expects that developers prime their target environment by configuring the following environment variables (which are named and leveraged in the same manner as the Java System Properties expected by Krausening Java):KRAUSENING_BASEKRAUSENING_EXTENSIONSKRAUSENING_OVERRIDE_EXTENSIONSKRAUSENING_PASSWORDIn order to use the Krausening Python, developers may directly usePropertyManageror extendPropertyManagerto provide a custom interface.  For example, developers may directly use thePropertyManageras such:fromkrausening.propertiesimportPropertyManagerpropertyManager=PropertyManager.get_instance()properties=Noneproperties=propertyManager.get_properties('my-property-file.properties')assertproperties['foo']=='bar2'This has the disadvantage that you must know the property keys in order to find the corresponding property values. To mitigate the need for all property file consumers to rely on specific property keys, consider wrapping thePropertyManagerand writing your own custom methods to get the corresponding keys and values, abstracting away the exact key values:fromkrausening.propertiesimportPropertyManagerclassTestConfig():"""Configurations utility class for being able to read in and reload properties"""def__init__(self):self.properties=Noneself.reload()defintegration_test_enabled(self):"""Returns whether the integration tests are enabled or not"""integration_test_enable=Falseintegration_enable_str=self.properties['integration.test.enabled']if(integration_enable_str):integration_test_enable=(integration_enable_str=='True')returnintegration_test_enabledefreload(self):self.properties=PropertyManager.get_instance().get_properties('test.properties')Releasing to PyPIReleasing Krausening Python integrates into the project's larger utilization of themaven-release-plugin, specifically publishing the package to PyPI during thedeployphase.  APyPI accountwith access to thekrauseningproject is required. PyPI account credentials should be specified in yoursettings.xmlunder the<id>pypi</id><server>entry:<settings><servers><server><id>pypi</id><username>pypi-username</username><password>pypi-password</password></server></servers></settings>
Package: kraut
krautpicklewith built in compression with Python Standard Librarybz2with no dependencies. Useful for serializing massive Dict objects, CSV files or NetworkX graphs and many more.InstallationpipinstallkrautUsagefromkrautimportwrite_compressed,read_compressedmy_huge_data_object={...}write_compressed("save/myobj.pkl.bz2",my_huge_data_object):...my_restored_object=read_compressed("save/myobj.pkl.bz2"):assertEqual(my_huge_data_object,my_restored_object)
Package: krawarranger
KrawArrangerKjmaro Negatives Arranger. The purpose of this program is to have and maintain a mirror of the folder
structure of your pictures/media with all their corresponding negatives (raw).Folders organizationKrawArranger needs to know what is the PATH of three folders:Positives folder: Here is where all your multimedia content is allocated, positives (JPG, PNG, etc.) and negatives (NEF, CR2, etc.)Negatives folder: Here is where you want to store your negatives.Results folder: Here is where the program will store the logs and results of the execution.Note: A filter can be included to KrawRranger to only analyse the desired folders inside the positive folderLogic of KrawArranger1.Scans the folders-tree stored in Negatives folder and raises an error if (at least) the same tree is not in the Positives folder. The purpose of this step is to avoid loosing the traceability of the negatives folder (if the folder name has changed and you don't know where is its negative corresponding folder)2.Looks for all the negative files in the Positive folder.3.Once found the negatives it will attempt to move them to the negatives folder creating the same folder-tree to reach them in the Positives folder (if it doesn't exist).4.If the files to move to negatives doesn't exist will be moved, otherwise an error will be raised indicating that the files already exist in Negatives.5.All the folder creation and file movement is logged for user review.Multimedia Organization Examplegraph TD
A[Positives Folder] --> B(1. My Friends)
A[Positives Folder] --> C(2. My Family)
A[Positives Folder] --> D(3. My Stuffs)
A[Positives Folder] --> E(9. Negatives Folder)
E[Negatives Folder] --> EB(1. My Friends)
E[Negatives Folder] --> EC(2. My Family)
E[Negatives Folder] --> ED(3. My Stuffs)Future featuresInclude in the log after one file movement a verification step (with MD5) to ensure that the file was mover properly and it doesn't exists in origin.
Package: krazy
krazy-utilsI am a beginner in programming and have recently started programming in python. krazy-utils is a simple package containing following functions I use frequently. I just wrote some of them so that I dont forget how to write them ;pThought of sharing it as it may help beginners like me:Basic pandas operations on columns like retaining columns passed as list, renaming columns passed as dictionery, etc. It contains one line pandas command to retain columns given to this function. For me, it was easier to do it throuh one word functin rather then half screen length command :pRead and write from CSV.Import from multiple excel files if a directory is given.Getting file list of entire tree under a given directory.Excel to pdf converterDate converter: accepts date (based on d/m/y sequence) written as string with / or - as separators and convert to proper date.Timekeeper to keep time during runtimes... print command inbuilt.OCR function using pytesseract. For this to work you will need pytesseract and Tesseract installed.Some other small basic stuff.A simple tkinter frontend ready for use with app label, button bar frame and content frame.I havent explained them a lot here as the code itself is simple and self explanatory.Suggestions are most welcome.
Package: krbalancing
Knight-Ruiz-Matrix-balancing-algorithmThis is a c++ extension for python which computes K.R. balanced matrices. The
code is a conversion of the original code
(https://doi.org/10.1093/imanum/drs019) from Matlab to c++.Changelog2021-04-13: Added github actions to create wheel for Linux, Windows and OSX. Few small tweaks for MSVS build.
Package: krbcontext
krbcontextkrbcontextprovides a Kerberos context that you can put code inside, which
requires a valid ticket in credential cache.DocumentationUsage and API can be found fromkrbcontext.github.io.ContributionWelcome contributions, whatever idea, issue report, or a patch. Before making a
pull request, please make sure your code passes checks. RuntoxReport an IssueIf you have any issues, pleasereport one.IRC#krbcontext on freenode.netChangeLog0.10 (2019-07-15)Use set_default when storing credentials (Michael Simacek)0.9 (2019-06-20)Fix .travis.yml to use Python 3.7 (Chenxiong Qi)Update docs/source/conf.py to read package info properly (Chenxiong Qi)Add Python 3.7 to and remove Python 3.5 from TravisCI (Chenxiong Qi)Update scripts (Chenxiong Qi)Ignore more directories from git (Chenxiong Qi)Remove testenv py34 and py35 (Chenxiong Qi)Add testenv py37 (Chenxiong Qi)Fix typo in comment (Chenxiong Qi)Fix renewing expired FILE ccache (Michael Simacek)Remove flake8 from BuildRequires from SPEC (Chenxiong Qi)0.8 (2017-09-05)Fix SPEC (Chenxiong Qi)Use __future__.absolute_import (Chenxiong Qi)Fix and enhance maintanence scripts (Chenxiong Qi)0.7 (2017-08-30)Remove unused meta info (Chenxiong Qi)Fix init_with_keytab and tests (Chenxiong Qi)Add script for publishing packages (Chenxiong Qi)Refine make release script (Chenxiong Qi)0.6 (2017-08-27)Fix reading package info (Chenxiong Qi)0.5 (2017-08-27)Add script for making release (Chenxiong Qi)Add distcheck to Makefile (Chenxiong Qi)Refine doc settings (Chenxiong Qi)Easy to set project info (Chenxiong Qi)Bump version to 4.0 in doc (Chenxiong Qi)0.4 (2017-08-26)Migrate to python-gssapiCompatible with Python 30.3.3 (2014-03-12)Change README.txt to README.rstFix: logic error of KRB5CCNAME maintenance during initializationFix testcase of getting default credential cache0.3.2 (2013-06-15)Add LICENSE0.3.1 (2013-01-18)Thread-safe credentials cache initialization0.3.0 (2013-01-10)Lazy initialization of credential cache.Refactor all codeRewrite all unittestImprove SPECImprove configuration of Python package distributionUpdate documentation0.2.1 (2012-08-02)Remove dependency to setuptoolsRewrite SPEC file for packaging RPM in Fedora and RHELUsing VERSION.txt to share the version between setup.py and SPEC file0.2 (2012-03-19)Add change log to projectProviding RPM distribution package0.1 (2012-03-19)Upload to PyPIAdd more information to setup.py after initialized import to github
Package: krbticket
Kerberos Ticket ManagerSimple kinit wrapper to update Kerberos ticket periodically for long running application.Getting StartedPeriodical kerberos ticket updatefrom krbticket import KrbTicket

ticket = KrbTicket.init("<principal>", "<keytab path>")
ticket.updater_start()Ifkeytab pathis not specifyed, kinit usesKRB5_KTNAMEenv, or/etc/krb5.keytabto find a keytab file. see: kerberos(1) and kinit(1).Ticket Updater StrategiesTo avoid a credential cache (ccache) corruption by concurrent updates from multiple processes, KrbTicketUpdater has a few update strategies:SimpleKrbTicketUpdater: for single updater process, or multiple updaters w/ per process ccache. (default)MultiProcessKrbTicketUpdater: for multiple updater processes w/ exclusive file lockSingleProcessKrbTicketUpdater: for multiple updater processes w/ exclusive file lock to restrict the number of updater processes to one against the ccachefrom krbticket import KrbTicket, SingleProcessKrbTicketUpdater

ticket = KrbTicket.init("<principal>", "<keytab path>", updater_class=SingleProcessKrbTicketUpdater)
ticket.updater_start()Retrykrbticket supports retry feature utilizingretryingwhich provides various retry strategy. To change the behavior, pass the options usingretry_optionsof KrbConfig. The dafault values are:wait_exponential_multiplier = 1000wait_exponential_max = 30000stop_max_attempt_number = 10from krbticket import KrbTicket

retry_options = {
  'wait_exponential_multiplier': 1000,
  'wait_exponential_max': 10000,
  'stop_max_attempt_number': 5
}
ticket = KrbTicket.init("<principal>", "<keytab path>", retry_options=retry_options)
ticket.updater_start()Update IntervalTBDTestdocker run --rm -p 88:88 ksauzz/docker-krb5:0.0.1
pip install -r requirements-test.txt -r requirements.txt
KRB5_CONFIG=tests/conf/krb5.conf.local pytest
Package: krcg-bot
KRCG Discord BotA discord bot to display V:tES cards, using
the VEKNofficial card textsandKRCGrulings list.Portions of the materials are the copyrights and trademarks of Paradox Interactive AB,
and are used with permission. All rights reserved.
For more information please visitwhite-wolf.com.Use itThis bot lets you retrieve cards official text, image and rulings:To call the bot, use slash commands:/cardfollowed by a card name.
Make sure you use the name autocompletion or you might not get the result you want.
By default, the bot answers to you with a private message other members do not see.
You can use the optionalpublicparamater to your slash command to make the message
visible for everyone in the channel.It is online and free to use,install it on your Discord server.ContributeContributions are welcome !This bot is an offspring of theKRCGpython package, so please refer to that repository for issues, discussions
and contributions guidelines.Hosting the botIf you need to host a new version of the bot yourself,Python 3is required, as well as an
environment variableDISCORD_TOKEN.
The token can be found on yourDiscord applications page.The preferred way to run the bot is to use a python virtualenv:/usr/bin/python3-mvenvvenvsourcevenv/bin/activate
pipinstallkrcg-botDISCORD_TOKEN=discord_token_of_your_bot
krcg-botAsystemdunit can be used
to configure the bot as a system service:[Unit]Description=krcg-botAfter=network-online.target[Service]Type=simpleRestart=alwaysWorkingDirectory=directory_where_krcg_is_installedEnvironment=DISCORD_TOKEN=discord_token_of_your_botExecStart=/bin/bash -c 'source venv/bin/activate && krcg-bot'[Install]WantedBy=multi-user.targetFor development, the environment variableDISCORD_TOKENcan be provided
by a personal.envfile at the root of the krcg folder (ignored by git):exportDISCORD_TOKEN="discord_token_of_your_bot"
Package: kr-cli
Killers Roms CLICLI tool to search and download roms fromKillers Roms.kr-cliallows to search and download roms published byKillers Romsthrough command line interface.Installationpipinstallkr-cliUsage exampleconsolescommandList available consoleskrconsolessearchcommandBasic usagekrsearchsega-genesissonicOrderingkrsearchsega-genesissonic--order-bytitle--ascQuiet mode shows only the link to rom's webpagekrsearchsega-genesissonic--quiet# or -qdownloadcommanddownloadcommand wait the rom's webpage as argumentkrdownloadhttps://roms-download.com/roms/sega-genesis/sonic-knuckles-usaIt's possible combine download withsearch -qcommandkrsearchsega-genesissonic-q|krdownloadDefining output directorykrsearchsega-genesissonic-q|head-n1|krdownload-d/tmpContributingFork itCreate your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request
Package: krdict.py
A package that helps to query theAPIof theKorean Learners' Dictionary, provided by the National Institute of Korean Language.InstallationTo install the package via pip, run:pip install krdict.pyYou can also install from one of theGitHub releases.UsageTo use most of the functionality provided by this package, you'll need to generate an API key viathe portal(requires login).A minimal example query that assumes theKRDICT_KEYenvironment variable is set:importosimportjsonimportkrdictkrdict.set_key(os.getenv('KRDICT_KEY'))response=krdict.search(query='나무',raise_api_errors=True)print(json.dumps(response.asdict(),indent=2,ensure_ascii=False))Assuming an error does not occur, the output will be similar to:{"data":{..."results":[{"target_code":32750,"word":"나무","pronunciation":"나무",..."definitions":[{"order":1,"definition":"단단한 줄기에 가지와 잎이 달린, 여러 해 동안 자라는 식물."},...]},...]},"request_params":{"q":"나무","key":"YOUR_API_KEY"}}For more information and usage examples, please check thedocumentation.
Package: kre
kreSubcharacter-level regular expressions with Korean text.kre is a wrapper forrefrom the Python Standard Library which allows users to apply the full functionality ofreat the subcharacter level for Korean text.Installationkre releases are available on PyPI.pip install kreDocumentationMost functionality is documented in there documentation.Documentation on the unique features of kre is available in thewiki, where you will also find discussion of inherent differences betweenre(character-level regular expressions) andkre(subcharacter-level regular expressions) and how kre addresses them.It is strongly recommended that users familiarize themselves with these differences.Example FeaturesIn the simple case of search functions, matches are mapped back to their original position.> re.search(r"ㅡ", "한글") # no match
> kre.search(r"ㅡ", "한글")
<kre.KRE_Match object; span=(1, 2), match='글'>In the case of subcharacter-level substitutions, kre can recombine any newly created sequences into standard Korean characters, provided the input used standard (syllable) characters.> kre.sub(r"ㅏ", r"ㅗ", "핳ㅏ하ㅎㅏ하핳")
'홓ㅗ호ㅎㅗ호홓'If you prefer, kre can also attempt to merge non-standard input with substitutions.> kre.sub(r"ㅏ", r"ㅗ", "핳ㅏ하ㅎㅏ하핳", syllabify="extended")
'호호호호호홓'Although linearizing a Korean string normally results in the loss of information about syllable boundaries, kre makes it possible to make use of syllable boundaries in regular expression patterns through the use of (customizable) syllable delimiters (';' by default).> kre.search(r"ㅇ", "생일 축하해~")
<kre.KRE_Match object; span=(0, 1), match='생'>
> kre.search(r";ㅇ", "생일 축하해~", boundaries=True)
<kre.KRE_Match object; span=(1, 2), match='일'>As a more interesting, complicated, and perhaps useless example of what kre can do, the following swaps every sequential pair of final consonant(s) (받침) in the input string.> sun_and_moon = "옛날 옛적 깊은 산 속에 가난하지만 사이좋은 오누이와 그 홀어머니 가족이 살고 있었다."
> kre.sub(r"([ㅏ-ㅣ])([ㄱ-ㅎ]{1,2};)(.*?)([ㅏ-ㅣ])([ㄱ-ㅎ]{1,2};)", r"\1\5\3\4\2", sun_and_moon, boundaries=True)
'옐낫 옉젓 긴읖 삭 손에 가난하지만 사이존읗 오누이와 그 혹어머니 가졸이 샀고 일었다.'
Package: kreagroup.jsi18n
IntroductionThis packages makes it possible to have i18n in JavaScript via the
locales-directory. It is based on jarn.jsi18n and extends jarn.jsi18n (so it
needs jarn.jsi18n to work).UsageThis package is used in exactly the same manner as jarn.jsi18n, so if
you want to know how to use kreagroup.jsi18n, visithttp://pypi.python.org/pypi/jarn.jsi18nWhy this package?jarn.jsi18n and kreagroup.jsi18n do differ… You can use the packages in
the same way, but the result will differ in one particular case…Suppose we run the following code in a browser, for the first time:> jarn.i18n.loadCatalog(‘plone’, ‘es’);> _es = jarn.i18n.MessageFactory(‘plone’, ‘es’);> _es(‘Contributor’);“Contribuyente”In line 1, jarn.jsi18n will download the i18n catalog in an ASYNCHRONOUS
way. While the i18n catalog is loading, it will run line 2 and 3, so
‘Contributor’ will be translated while the i18n catalog is not loaded. Because
the i18n catalog is not loaded, _es(‘Contributor’) will not be translated and
just return the input. Here, the result will be ‘Contributor’, not “Contribuyente”.
The next time we run the same code, chances are big that the download of the
i18n catalog is completed, so it will be in browser cache (no need to download
now), and the translation will executed correctly.On the other hand…
In line 1, kreagroup.jsi18n loads the i18n catalog SYNCHRONOUS, so it waits
until the i18n catalog is loaded. When this is finished, it starts executing
line 2 and 3 and will translate correctly, because the i18n catalog is
already downloaded.jarn.jsi18n vs kreagroup.jsi18n, a matter of taste…jarn.jsi18n is more responsive, by only using asynchronous ajax calls. This comes
with a penalty of no translation the first time the code is run…kreagroup.jsi18n does always translate correctly. This comes with a penalty of a
synchronous ajax call, which means you have to wait a little longer before the
page loads the first time, which is less responsive…Bonusjarn.jsi18n-1.0 does not work with Internet Explorer 8. kreagroup.jsi18n
contains a fix so translation do work in Internet Explorer 8. Probably,
jarn.jsi18n-1.1 will also contain this fix :-)Changelog1.0.3 - 2013-08-16Pin jarn.jsi18n to version 1.01.0.2 - 2013-08-13Fixes in documentation1.0.1 - 2013-08-13Added documentation for first public release1.0.0 - 2013-05-23Initial release
Package: krema
KremaA fast, flexible and lightweight Discord API wrapper for Python.InstallationUnikornunikorn add kremayard krema -no-confirmationPippip install kremaFrameworksKommand:Command framework for Krema.Klash:Slash command framework for Krema.Example Ping-Pong Botfromunikornimportkrema# if you use pip, replace with:# import kremaclient=krema.Client(intents=krema.types.Intents().All())@client.event()asyncdefmessage_create(message):ifmessage.author.bot:returnifmessage.content.startswith("!ping"):awaitmessage.reply(content=":ping_pong: Pong!")client.start("client token",bot=True)LicenseThis project is licensed underMITlicense.
Package: krepresentatives
Python implementations of the k-Representatives and LSH-k-Representatives algorithms for clustering categorical data:Different from k-Modes algorithm, k-Representatives and LSH-k-Representatives define the "representatives" that keep the frequencies of all categorical values of the clusters.Installation:Using pip:pipinstallkrepresentativesImport the packages:importnumpyasnp
fromkrepresentatives.kRepresentativesimportkRepresentativesGenerate a simple categorical dataset:X=np.array([[0,0],[0,1],[0,0],[1,1],[2,2],[2,3],[2,3]])y=np.array([0,0,0,0,1,1,1])k-Representatives:kreps=kRepresentatives(X,y,n_init=5,n_clusters=2,verbose=3)kreps.fit_predict()Built-in evaluattion metrics:kreps.CalcScore()Out come:kRepresentativesInit0Iter0Cost:8.00Move:0Numempty:0Timelapse:0.00
Iter1Cost:4.83Move:0Numempty:0Timelapse:0.00
Iter2Cost:4.83Move:0Numempty:0Timelapse:0.00
kRepresentativesInit1Iter0Cost:9.48Move:0Numempty:0Timelapse:0.00
Iter1Cost:6.50Move:1Numempty:0Timelapse:0.00
Iter2Cost:5.33Move:0Numempty:0Timelapse:0.00
Iter3Cost:5.33Move:0Numempty:0Timelapse:0.00
kRepresentativesInit2Iter0Cost:9.08Move:0Numempty:0Timelapse:0.00
Iter1Cost:7.60Move:0Numempty:0Timelapse:0.00
Iter2Cost:7.60Move:0Numempty:0Timelapse:0.00
kRepresentativesInit3Iter0Cost:9.31Move:0Numempty:0Timelapse:0.00
Iter1Cost:6.50Move:1Numempty:0Timelapse:0.00
Iter2Cost:5.33Move:0Numempty:0Timelapse:0.00
Iter3Cost:5.33Move:0Numempty:0Timelapse:0.00
kRepresentativesInit4Iter0Cost:9.42Move:0Numempty:0Timelapse:0.00
Iter1Cost:7.60Move:0Numempty:0Timelapse:0.00
Iter2Cost:7.60Move:0Numempty:0Timelapse:0.00
Score:4.833333333333334Time:0.0015569399999999956
Purity:1.00NMI:1.00ARI:1.00Sil:0.52Acc:1.00Recall:1.00Precision:1.00Parameters:X: Categorical datasety: Labels of object (for evaluation only)n_init: Number of initializationsn_clusters: Number of target clustersmax_iter: Maximum iterationsverbose:random_state:Outputs:cluster_representatives: List of final representativeslabels_: Prediction labelscost_: Final sum of squared distance from objects to their centroidsn_iter_: Number of iterationsepoch_costs_: Average time for an initializationLSH-k-Representatives:To be updatedReferences:[1] San, Ohn Mar, Van-Nam Huynh, and Yoshiteru Nakamori. "An alternative extension of the k-means algorithm for clustering categorical data." International journal of applied mathematics and computer science 14 (2004): 241-247.
[2]To be updated
Package: kretanje-cijena
kretanje_cijenaAPI za preuzimanje podataka s web stranice kretanje-cijena.Install it from PyPIpipinstallkretanje_cijenaUsagefrombrdsimportGunzipImporterdata=GunzipImporter("https://kretanje-cijena.hr:50001").get("/data/public")$python-mkretanje_cijena#or$kretanje_cijenaDevelopmentRead theCONTRIBUTING.mdfile.
Package: kr-h
MIT License
Copyright (c) 2018 YOUR NAME
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.