Saravanan666/pypi-org huggingface dataset:
Package: konlpy-homi
KoNLPy-homiKoNLPy-grpc을 homi 기반으로 리펙토링한 프로젝직트 입니다.
또한 무료로 기본 grpc 서버를 제공하고 있습니다.
그래서 학습을 목적으로 konlpy를 사용 하시는 분들이라면 로컬에서 grpc 서버 혹은 jvm 구동 없이 바로 konlpy를 사용 할 수 있습니다.Remote Clientinstall konlpy-homipipinstallkonlpy-homipatch & ues it!import  konlpy_homi
# if you want connect other server
# konlpy_homi.set_endpoint('localhost:50051')
konlpy_homi.patch()

import konlpy

# use it same as konlpy
print(konlpy.tag.Hannanum().analyze('노멀라이즈 테스트 가늨ㅋㅋㅋㅋ ㅋㅋㅋㅋ'))왜 무료 서버를 제공하나요?이 프로젝트는homi프레임워크 및grpc_requests가 실제로 쓰기 편하고 성능 적으로 문제 없는지 확인하기 위해 시작하였습니다.
참고로 GCP CloudRun으로 서비스 중이기에 실제 운영 비용은 거의 나가지 않아 저 역시 거의 무료로 서비스를 제공가능합니다.맘놓고 써도 되나요?현재는 별도의 요청 제한을 걸지 않았습니다. 다만, 트래픽이 폭증 할 경우 향후에는 요청 제한(ex. ip별 하루 최대 5000회 요청 가능)이 걸릴수도 있습니다.로컬보다 속도가 느린거 같아요..서버리스로 구축된 서버이기에 최초 요청시 cold start가 발생 할 수 있습니다. 그 외에는 아래와 같은 몇가지 요인이 있습니다.로컬에서 직접 구동하는 것과 달리 서버와 데이터를 주고 받다보니 네트워크 환경에 영향을 받습니다.현재 GCP Cloud Run은 서울리전이 아닌 도쿄 리전을 지원 하다보니 이에 대한 레이턴시가 존재합니다.(향후 서울 리전에 cloud run이 출시하면 이전할 예정입니다.)서버 최적화 이슈(cpu,memory, 서버리스 특유의 Cold start)현재 최대한 로컬과 그 간격을 줄이기 위해 지속적으로 서버를 개선해 나갈 예정입니다.
하지만, 속도가 느리다고 완전히 효용성이 없는 것은 아닙니다. 처음 자연어 처리를 공부,가르치시는 분들은 별도의 추가적인 설치 없이 바로 konlpy를 사용할 수 있습니다.
또한 저사양 컴퓨터, AWS 람다, 라즈베리파이등 konlpy를 직접 구동하기 힘든 환경이나 멀티프로세스로 여러 분석을 동시에 시도하는 경우에 네트워크 연결만 되있다면 기존과 동일한 코드를 가지고 개발, 서비스가 가능합니다.
참고로 현재 Cloud Run 사양은 CPU 2, Memory 1.5G 입니다. 지속적인 최적화를 통해 서버 사양이 변경될순 있습니다.프로덕션에서 사용 해도 되나요?가능하면 학습 및 개발단계에서 사용하길 권해드립니다. 위에 말씀드렸다 시피 도쿄 서버이기에 레이턴시가 발생합니다.
또한 언제는든지 요청 제한이 생길수 있기에 프로덕션에선는 도커로 별도의 전용서버를 구축하시는것을 권장합니다.
(향후 helm기반으로 서버 구축 할수 있도록 지원할 예정입니다.)요청이 기록 되나요?Cloud Run에서 기록 하는 기본적인 요청정보 이외에는 그 어떠한 요청 정보(어떤 텍스트를 분석 요청했는지)도 별도로 기록&보관하지 않습니다.
기본 적인 요청 정보에는 요청자의 ip 요청 서비스 정도만 기록됩니다. 이는 디버깅 및 향후 요청 제한 기능 구축에 제한적으로 활용 될 수 있습니다.run own Serverpython-mvenv.venv
../.venv/bin/activate
pipinstall-rrequirements-dev.txtcdsrc&&homirunkonlpy_homi/app.pyMake Stubspython-mgrpc_tools.protoc-Iprotos/--python_out=src/--grpc_python_out=src/protos/konlpy_homi/api/*/*.protoAdditional LinksKoNLPy/KoNLPyminhoryang/KoNLPy-gRPCspaceone-dev/homispaceone-dev/grpc_requestsLicenseGNU GPLv3
Package: konnected
Konnected Python libraryThis is a simple Python library to talk to a Konnected device. Konnected is an open-source software for ESP8266 devices
that enables simple wired binary sensors and actuators to talk to home automation frameworks such as Home Assistant and
SmartThings. The most popular use case for Konnected is to connected a wired home alarm system to your Smart Home hub.This library was written to support Home Assistant integration.For more information seekonnected.ioUsageimport aiohttp
import asyncio
import konnected

async def fetch(session, url):
    async with session.get(url) as response:
        return await response.text()

async def main():
    async with aiohttp.ClientSession() as session:
        k = konnected.Client('192.168.86.10', '17000', session)

        # Sync settings to the device

        print(await k.put_settings(sensors=[{"pin":1}], actuators=[], auth_token='secureToken', endpoint='http://example.com'))
        # True

        # Get status of each input pin

        print(await k.get_device())  
        # [{'state': 0, 'pin': 1}, {'state': 1, 'pin': 2}]

        # Get status of a single input pin

        print(await k.get_device(2))
        # [{'state': 1, 'pin': 2}]

        # Actuate an output pin

        print(await k.put_device(pin=8, state=1))
        # {'state': 1, 'pin': 8}

        # Get status of each input zone

        print(await k.get_zone())  
        # [{'state': 0, 'zone': 1}, {'state': 1, 'zone': 2}]

        # Get status of a single input zone

        print(await k.get_zone(2))
        # [{'state': 1, 'zone': 2}]

        # Actuate an output zone

        print(await k.put_zone(zone=8, state=1))
        # {'state': 1, 'zone': 8}

        # Get device status

        await k.get_status()
        # {'mac': '2c:3a:e8:43:8a:38', 'gw': '192.168.86.1', 'hwVersion': '2.0.5', 'rssi': -31, 'nm': '255.255.255.0', 'ip': '192.168.86.10', 'actuators': [{'trigger': 1, 'pin': 8}], 'port': 12426, 'uptime': 2349, 'heap': 23904, 'swVersion': '2.1.3', 'sensors': [{'state': 0, 'pin': 1}]}

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())Python versionThis library was designed to work with Python 3.5 and above.
Package: konnoohmachi
Fast Konno-Ohmachi Spectral SmoothingImplemented in Rust with a Python interface. The performance gain measured against the widely used Python/numpy implementation that comes withobspyapproaches approximately a factor of 2.5 for large and 10 for small vectors (seeBenchmarks).InstallationInstallation frompypi:pipinstallkonnoohmachiInstallation from source:pipinstall.UsageThis smoothes some random numbers:Pythonimportkonnoohmachibandwidth=40# using fake random datafrequencies=np.arange(1000)amplitudes=np.random.rand(1000)smoothed_amplitudes=konnoohmachi.smooth(frequencies,amplitudes,bandwidth)Rustusekonnoohmachi;letfrequencies=Array1::<f64>::zeros(10);letamplitudes=Array1::<f64>::ones(10);letbandwidth=40.0;konnoohmachi_smooth(frequencies.view().into_dyn(),amplitudes.view().into_dyn(),bandwidth,);BenchmarksMeasuring the execution time based of increasing sized spectra yields:❯ python3 benchmark.py
nsamples |    Rust      |    Python     | Performance Gain
----------------------------------------------------------
256      |    0.00017   |    0.00192    |   11.30802
512      |    0.00054   |    0.00431    |    7.97596
1024     |    0.00198   |    0.01117    |    5.63623
2048     |    0.00775   |    0.03143    |    4.05371
4096     |    0.03067   |    0.10024    |    3.26844
8192     |    0.12212   |    0.35058    |    2.87080
16384    |    0.49391   |    1.29653    |    2.62506
32768    |    1.98499   |    5.05335    |    2.54578
Package: kon-quotes
K-ON QuotesGet quotes from the K-ON anime in the most easiest way possibleTable of contentsContentUsageSplitting the quote from the authorFixing UnicodeError whe using local fileContentCurrently the file contains 213 quotes, however, more quotes are going to come in the future.You can ask to add quotes by opening either an issue or a pull requestUsage0 - With python packagepip install kon_quotesfromkon_quotesimportGETquotequote=GETquote(character_you_want)# mio, yui, azusa, tsumugi, ritsu, sawako, jun, general, allquote_author=quote.GETauthor()print(f"{quote}-{quote_author}")1 - With .txt file (online)importrequests,randomfile_url="https://zeyatsu.github.io/k-on-quotes/quotes.json"# No need to download the txt file.response=requests.get(file_url)ifresponse.status_code==200:lines=response.text.splitlines()random_line=random.choice(lines)print(random_line)else:print("Error: ",response.status_code)2 - With API (.json file (online))importrandomimportrequestsjson_url="https://zeyatsu.github.io/k-on-quotes/quotes.json"# No need to download the json file.response=requests.get(json_url)ifresponse.status_code==200:data=response.json()random_author=random.choice(list(data["authors"].keys()))random_quote=random.choice(data["authors"][random_author])print(f"{random_quote}by{random_author}")For characters replace "k-on-quotes/quotes.json" by "k-on-quotes/characters/the_character_you_want.json"Splitting the quote from the authorquote,author=random_quote.strip().split(" / ")print(f"Quote:{quote}by{author}")Fixing UnicodeError when using local fileIf you download the quotes.txt file instead of using the url, it is possible to get a UnicodeError. In this case, you will have to add a encoding parameterwithopen('quotes.txt','r',encoding='utf-8')asf:CreditsZeyaTsu
Package: konrad
konradkonradis a one-dimensional radiative-convective equilibrium (RCE) model.
It is build in an object oriented structure to allow simple modifications of
the model setup.You can find various tutorials that illustrate the usage ofkonradin our"How to konrad"Jupyter book.Requirementskonradrequires Python 3.6 or higher. The recommended way to get
Python is throughAnaconda.
But of course, any other Python distribution is also working.Install stable releaseYou can install the latest stable version ofkonradusingpip:python-mpipinstallkonradKonrad depends on theCliMTpackage.
CliMT handles a variety of underlying FORTRAN code and provides precompiled
binary wheels for some Python versions and operating systems.However (for Python >3.7) the FORTRAN libraries need to be compiled locally.
In this case, you need to specify a C compiler, a FORTRAN compiler, and the
target architecture using the corresponding environment variables:CC=gccFC=gfortranTARGET=HASWELLpython-mpipinstallkonradmacOSOn macOS, you may need to install the GCC compiler suite beforehand:# Install GCC 11 and set it as C and Fortran compiler.brewinstallgcc@12CC=gcc-12FC=gfortran-12# Set the target architecture (different for Apple M1 [arm64]).[[$(uname-p)==arm64]]&&TARGET=ARMV8||TARGET=HASWELL# Install a trimmed down version of CliMT that ships RRTMG only.exportCCFCTARGET
python-mpipinstallgit+https://github.com/atmtools/climt@rrtmg-only# Install konrad itselfpython-mpipinstallkonrad
Package: konsensus
KonsensusA simple clustering by consensus library in Python. This is a simple implementation of a replicated state machine
using a Paxos-derived algorithm.Getting StartedEnsure you have the following first before you proceed:Python 3.10+You will require Python 3.10+ to run this project. If you are using a different version of Python, you will need to
update your Python version to 3.10+. You can check your Python version by runningpython --versionin your terminal. There are ways to install different versions of Python on your system and this can be done usingpyenv.PoetryPoetry is a Python package manager that is used to manage dependencies. You can check the installation instructions
in
the link provided to get this setup.VirtualenvNot a hard requirement as poetry should setup a virtual environment for you, but can be used as well to setup a
virtual environment.Once you have dependencies setup, run the below command to install dependencies:poetryinstallEven though this implementation has 0 dependencies to external packages, the dev packages are used for linting &
handling
tests. Therefore, this is useful when running linting & test commands.The library itself is in thekonsensusdirectory.RunningThere is a simple script in the project rootrun.pythat contains a sample setup on how to use the library.
It can be run with:pythonrun.py1010is the seed value, this can be any other value like 20 or 30, etcThere are other scripts available in theMakefilethat can be used to run formatting, linting, test or
build commands.Built WithToolPurposePythonProgramming LanguagePoetryDependency & Package managerContributingPlease read thecontributing guideto learn how to contribute to this project.VersioningSemantic versioningis used to track the version of the project.
Package: konso-dice-roller
Konso's Dice RollerA simple dice roller library I made for kicks.Installationpip install  --upgrade konso-dice-rollerUsagefrom konso_dice_roller import markdown_roll_string_from_input, roll_string_from_input



if __name__ == '__main__':

    print(roll_string_from_input("2d20+3"))

    print(roll_string_from_input("3d6>=5"))

    print(markdown_roll_string_from_input("3d8-2"))

    print(markdown_roll_string_from_input("2d10=2"))



    result = roll_string_from_input(

        input_string="100d1",

        number_of_dice_limit=50,

        dice_sides_limit=20,

        bonus_absolute_value_limit=1_000,

    )Example output:2d20+3, tulos: [10 15] + 3 = 28

3d6>=5, tulos: [3 5 3] = 1

`3d8-2`, tulos: `[3 5 3] - 2 = 9`

`2d10=2`, tulos: `[4 1] = 0`

ValueError: Liian monta noppaa
Package: konsoru
KonsoruA functional programming styled CLI console application framework based on argparse.InstallationThe easiest way to install konsoru is to usepip:$pipinstallkonsoruUsageKonsoru enables you to build CLI applications quickly: either a text-based console or a program with multiple subcommands that executes in terminal.Below is a bare minimumhelloworld.pyprogram that launches a text-based console:fromkonsoruimportCLIdefhelloworld():print('Hello world!')cli=CLI()cli.add_function(helloworld)cli.loop()The console comes with 3 default commands: help, quit, exit. And every command added into the console, including default commands, will come with a-hoption that displays its help message.When the above program runs, it looks like this:$ python3 helloworld.py 
Type 'help' to see help message.
Type 'quit' or 'exit' to exit the program.
> help
Available commands:
    exit        helloworld  help        quit        
See help for a specific command by specifying the command name.
Help message for multi-layered command can still be seen by using quotation marks around them.
> helloworld -h
usage: helloworld [-h]

optional arguments:
  -h, --help  show this help message and exit
> helloworld
Hello world!
> quitAlternatively, you can add your function as a command using thesubroutine()decorator. The decorator should be stacked on top of other decorators, if any. Also, by default, the framework will print the return of added functions, unless the return isNone. So the program below is completely equivalent to the example above:fromkonsoruimportCLIcli=CLI()@cli.subroutine()defhelloworld():return'Hello world!'cli.loop()To convert this into a program with subcommands that is interacted with through terminal, simply changecli.loop()intocli.run()at the end. Then, the program will behave like this:$ python3 helloworld.py helloworld
Hello world!Note that default commands under the console mode, i.e.help,exit,quit, will not be added when usingcli.run().Put the script in a directory in your$PATHand give it executable permissions to call it anywhere in your filesystem withoutpython3in the front.For more sophisticated examples, check theexamples/directory in the github repository.
Package: konstantin-docs
kroki-pythonБиблиотека для генерации диаграмм из текстового описания.Диаграммы описываются объектами python. Далее геренируются изображения с помощьюhttps://kroki.io.Как использоватьСоздать две папки:dia_src - папка с исходным описаниемdia_dist - папка со сгенерированными изображениямиВ папке dia_src создаются py-файлы. Названия файлов - произвольные. Можно создавать подкаталоги - структура каталогов будет скопирована в целевую папку dia_dist. Примеры создания можно посмотреть в тестовых диаграммахпакета.Для генерации можно создать задачу poetepoet. Прописать в файле pyproject.toml:[tool.poetry.dependencies]konstantin_docs="*"poethepoet="*"[tool.poe.tasks]docs={script="konstantin_docs.main:generate_images('dia_src', 'dia_dist')"}Запустить командой:poetryrunpoedocsДополнительно можно создать задачу в vscode. Для этого в файле .vscode/tasks.json:{"version":"2.0.0","tasks":[{"label":"docs","type":"shell","command":"poetry run poe docs"}]}Запускать командой F1 -> Task: Run task -> docs
Package: konstants
Constant ListPython package for common math and physics constants.This is a basic and simple python package which contains all commonly used mathematical and physical constants like pi,e etc. The package is not complete and will be updated whenever I get free time. Contribs are welcome.InstallationWindows, OS X and Linux:pip install konstantsUsageThe module is very easy to use. Just search for the constant you wish to use fromhereand import it. To import, follow the code snippet below:from konstants.math import basic as b
from konstants.math import eDerivatives as ed
from konstants.math import piDerivatives as pd
from konstants.math import named as n
from konstants.phys import fundamental as f
from konstants.phys import astrophysical as a
from konstants.misc import biblical as bi
from konstants.misc import interesting as i

print(b.pi)
print(b.e)
print(ed.eie)
print(pd.pip)
print(n.her)
print(n.ape)
print(f.amc)
print(a.par)
print(bi.ht)
print(i.ans)Release History0.0.3Added Miscellanous important numbers0.0.2Added more constants0.0.1Created packageMetaJustin Mathew -@thisismjustin-thisisjustinm@outlook.com
Package: konta
Setting upRunning the appRoadmap[3/9]Add argparse supportPull woob configuration with account listingPull woob data from given woob bank backendsCreate the converter protocol/abstract class to change from woob to beancountRead beancount data with category listingAllow users to interactively choose categoriesChange the tracking id method to allow merging transactionsPrivacy option to hide amounts and optionally banksFind fake woob data to be able to streamSetting upYou can use a simple direnv setuplayoutpython3And then use the providedRequirements fileto setup an environment.After this, you need to make a configuration file that can be read into a configuration. An example file will be given once the format stabilizes a bit. The file will be in TOML format (for readability), and read by default to the XDG location.Running the appUntil a proper flit packaging is done, running the draft apps is done simply withpython-mkontaand dealing with the help messagesIt will look for a configuration file in the common XDG path for akontaprogram, which must be a TOML file# In ~/.config/konta/config.toml[Default]# Setting the category for unmatched payees.category="Expenses:Uncategorized"[Accounts]# Woob ID (from woob bank ls) to Beancount account, with a currency to be used as# commodity for the transaction"deadbeef0731233"={name="Assets:Bank:Checking",default-currency="EUR"}[Payees]# An example of merging multiple payees to be the same name and the same category.# Both 'name' and 'category' are optional here if you don't want to overwrite them."75 MONOP"={name="MONOPRIX",category="Expenses:Food:Supermarché"}"75 MONOPRIX"={name="MONOPRIX",category="Expenses:Food:Supermarché"}# Unused for now, but extra verifications can be done if we# give the main input file, with valid/existing accounts.# It takes a list of path to beancount input files[Beans]input=[]Roadmap[3/9]DONE Add argparse supportDONE Pull woob configuration with account listingTODO Pull woob data from given woob bank backendsShould be done by ignoring the accounts that are not in configTODO Create the converter protocol/abstract class to change from woob to beancountThe main goal here is to allow providing custom matchers from the config, probably as python modules that would be provided by the end user. Just like the first Guile version of this tool.DONE Read beancount data with category listingTODO Allow users to interactively choose categoriesThat entails building a module that can meaningfully interact with a Config instanceaTODO Change the tracking id method to allow merging transactionsTODO Privacy option to hide amounts and optionally banksNecessary option to be able to start streaming development, either that or the first itemTODO Find fake woob data to be able to stream
Package: kontainer
kontainerWhy Kontainer?Most of whatkontainerwants to do has already been implemented in much better libraries,expression,result,
andreturns.
But each of them had one thing that was missing, and it was hard to ask for a fix.expression: does not support python 3.8.result: provides solid but simple functionality.returns: does not supportpyright.In my environment,expressionwas the best fit,
but dropping support for python 3.8 was the right decision,
so I couldn't ask for it.
(I don't want to use python 3.8 either,
but there are circumstances that make it unavoidable.)So I created a new library with python 3.8 support,
pulling in some features that seemed to be needed.TODOadd doc commentsadd doc pages(likesphinx)support apply(fully typed)more robust test codesremovetype: ignoreas much as possible
Package: kontakt
Foundation for adding extensibility to Python packages.This provides anExtensionbase class and utilities for working with it. To create a new
type of extension, you’ll first create a subclass ofExtension. Then for each type of
your new extension, you’ll inherit from your subclass. Finally, you’ll register these
types of extension withsetuptoolsthroughentry pointsin yoursetup.py.Seekontakt.examplefor a simple example.
Copyright 2019 Sixty North ASPermission 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.
Package: kontext
Python Context InformationThe plugin allows to transfer a context between functions. Inspired bycontext-logging.You can use it for logging data which does not change and can be correlated, e.g.trace_id,correlation_idetc.FeaturesThread-safe context managementCustomizable log recordsEasy-to-use APIInstallationpip install kontextUsageimportloggingfromkontextimportContext,current_context,setup_log_recordlogging.basicConfig(format="%(message)s%(kontext)s",level=logging.INFO)logger=logging.getLogger(__name__)defbar():current_context["foo"]="bar"logger.info("bar")@Context()deffoo():current_context["key"]="value"logger.info("foo")bar()setup_log_record()foo()logger.info("Finish")# foo {'key': 'value'}# bar {'key': 'value', 'foo': 'bar'}# Finish {}For more examples, please refer to the examples directory.LicenseMIT LICENSEContributionContribution guidelines for this project
Package: kontr-api
Kontr Portal REST API ClientKontr Portal REST API Client is the Portal REST API wrapper over the resources in the portal.
It supports CRUD operations and simple management over entities.Kontr 2 is the project created on FI MUNI to test and execute students solutions for programming assignments.SetupInstall and update using the pip:$pipinstallkontr-apiSimple examplesSimple examples how to configure and user the API Client.Example how to manage the users.fromkontr_apiimportKontrClientportal_url='https://localhost'username='admin'password='123456'kontr_client=KontrClient(url=portal_url,username=username,password=password)# List all userskontr_client.users.list()# Create new userkontr_client.users.create(username='xlogin',name='Test user',uco='123456')# Get useruser=kontr_client.users.get('xlogin')# Update user's nameuser['name']='new name'user.update()# or use the kontr_client.users.update({ 'name': 'new name' }, 'xlogin')# Set user's passworduser.set_password('Password.123')# Delete the useruser.delete()# or use the kontr_client.users.delete('xlogin')ContributingTake a look at thecontribution guide.
Package: kontrasto
KontrastoFeaturesUsagekontrasto is available onPyPI.# Assuming you’re using Python 3.6+,pipinstallkontrastoContributingSee anything you like in here? Anything missing? We welcome all support, whether on bug reports, feature requests, code, design, reviews, tests, documentation, and more. Please have a look at ourcontribution guidelines.If you just want to set up the project on your own computer, the contribution guidelines also contain all of the setup commands.CreditsStarted as a fork ofjinjalint. Image credit:FxEmojis.Test templatesextracted from third-party projects. Website hosted byNetlify.View the full list ofcontributors.MITlicensed. Website content available asCC0.