Saravanan666/pypi-org huggingface dataset:
Package: kami-gdrive
Kami Google DriveSimple functions to create folder and upload files using google drive api📝 Table of ContentsAboutGetting StartedDeploymentUsageBuilt UsingTODOContributingAuthorsAcknowledgments🧐 AboutThis package arose from the need to simplify the google drive management tasks of applications created by the Kami CO software development team.Currently the package has 6 functions: get_service, connect, get_folder_id, create_folder, upload_file, upload_files🏁 Getting StartedThese instructions will get you a copy of the package and a daily use example.Prerequisitespython >= 3.9kami-logging >= 0.2.0google-api-core >= 2.11.0google-api-python-client >= 2.50.0google-auth-httplib2 >= 0.1.0google-auth-oauthlib >= 0.5.2google-auth >= 2.7.0googleapis-common-protos >= 1.56.2Installing$pip install kami-gdrive🎈 UsageTo get work with this package first you need to create an project and an agent and get json file with correspondent credentials jus the way of google drive api documentation findhereThe 6 functions available are:get_service():Get a service that communicates to a Google API.Args:api_name: The name of the api to connect to.api_version: The api version to connect to.scopes: A list auth scopes to authorize for the application.key_file_location: The path to a valid service account JSON key file.Returns: A service that is connected to the specified API.connect(service_account_credentials):Connect with google drive api service.Args:service_account_credentials : The path to a valid service account JSON key file.Returns: A google drive api service.get_folder_id(parent_folder_id, folder_name):Get id of a folder in driver if its exists.Args:parent_folder_id: Id to root or parent folder when search will begin.folder_name: Searched folder nameReturns: Id to folder or Nonecreate_folder(parent_folder_id, folder_name):Create New Folder in especified parent folder.Args:parent_folder_id: Id to root or parent folder when new folder will be created.folder_name: Name for the new folderReturns: Id to new folder or Noneupload_file(folder_id, this_file):Upload an local file to especified folder on google drive.Args:folder_id: Id to the folder when this file will be uploaded.this_file: Absolute or Relative full path to the local file.Returns: Show an log with the result of processupload_files(folder_id, files_list):Upload an list of local file to especified folder on google drive.Args:folder_id: Id to the folder when this file will be uploaded.files_list: List of Absolute or Relative full path to the each local file.Returns: Show an log with the result of processexample:fromkami_gdriveimportcreate_folder,get_folder_id,upload_fileroot_folder_id='1eAnlW53WAOJn-eaLdM2AqRYnl0ui9qrL'my_new_folder_id=create_folder(root_folder_id,'my_new_folder')local_file='Path/To/My/file.ext'upload_file(my_new_folder_id,local_file)Result:⛏️ Built UsingPython- DatabaseLogging- Server Framework✍️ Authors@maicondmenezes- Idea & Initial workSee also the list ofcontributorswho participated in this project.🎉 AcknowledgementsReferences:Arjancodes:Github,Youtube,TwitterEduardo Mendes:Github,Youtube,Twitter
Package: kami-gsuite
Kami Google DriveSimple functions to create folder and upload files using google drive api📝 Table of ContentsAboutGetting StartedDeploymentUsageBuilt UsingTODOContributingAuthorsAcknowledgments🧐 AboutThis package arose from the need to simplify the google drive management tasks of applications created by the Kami CO software development team.Currently the package has 6 functions: get_service, connect, get_folder_id, create_folder, upload_file, upload_files🏁 Getting StartedThese instructions will get you a copy of the package and a daily use example.Prerequisitespython >= 3.9kami-logging >= 0.2.0google-api-core >= 2.11.0google-api-python-client >= 2.50.0google-auth-httplib2 >= 0.1.0google-auth-oauthlib >= 0.5.2google-auth >= 2.7.0googleapis-common-protos >= 1.56.2Installing$pip install kami-gdrive🎈 UsageTo get work with this package first you need to create an project and an agent and get json file with correspondent credentials jus the way of google drive api documentation findhereThe 6 functions available are:get_service():Get a service that communicates to a Google API.Args:api_name: The name of the api to connect to.api_version: The api version to connect to.scopes: A list auth scopes to authorize for the application.key_file_location: The path to a valid service account JSON key file.Returns: A service that is connected to the specified API.connect(service_account_credentials):Connect with google drive api service.Args:service_account_credentials : The path to a valid service account JSON key file.Returns: A google drive api service.get_folder_id(parent_folder_id, folder_name):Get id of a folder in driver if its exists.Args:parent_folder_id: Id to root or parent folder when search will begin.folder_name: Searched folder nameReturns: Id to folder or Nonecreate_folder(parent_folder_id, folder_name):Create New Folder in especified parent folder.Args:parent_folder_id: Id to root or parent folder when new folder will be created.folder_name: Name for the new folderReturns: Id to new folder or Noneupload_file(folder_id, this_file):Upload an local file to especified folder on google drive.Args:folder_id: Id to the folder when this file will be uploaded.this_file: Absolute or Relative full path to the local file.Returns: Show an log with the result of processupload_files(folder_id, files_list):Upload an list of local file to especified folder on google drive.Args:folder_id: Id to the folder when this file will be uploaded.files_list: List of Absolute or Relative full path to the each local file.Returns: Show an log with the result of processexample:fromkami_gdriveimportcreate_folder,get_folder_id,upload_fileroot_folder_id='1eAnlW53WAOJn-eaLdM2AqRYnl0ui9qrL'my_new_folder_id=create_folder(root_folder_id,'my_new_folder')local_file='Path/To/My/file.ext'upload_file(my_new_folder_id,local_file)Result:⛏️ Built UsingPython- DatabaseLogging- Server Framework✍️ Authors@maicondmenezes- Idea & Initial workSee also the list ofcontributorswho participated in this project.🎉 AcknowledgementsReferences:Arjancodes:Github,Youtube,TwitterEduardo Mendes:Github,Youtube,Twitter
Package: kamikaze
A service for placing prioritised packages with expiry times on a queue and
having a consumer notified of the packagesHow it worksThis service monitors a Redis sorted set and calls a consumer function
when a new package arrives or the current highest priority package
expires. The consumer function can be a regular Python function or anasyncio coroutine.How to installpip install kamikazeThe consumer functionThe consumer function is the function that is called when a new message
comes to the top of the queue. The function should be of the format:def consumer_function(package, *args):
    """
    Does stuff with packages and optional args passed from the command line
    """Long running consumer functionsIf the consumer function is long running then it should yield control of
the loop when possible. Otherwise the kamikaze service will be slow to
react to changes in the queue.Fast running consumer functionIf the consumer function is fast then there will be no need to yield
control to the main loop until it is complete.Running the serviceStart the service by running the following:kamikaze service <consumer-function-path> --consumer-function-argsThe consumer function should be the full path to the python coroutine.
It must be in your$PYTHONPATH.Give the--helpflag for a full list of options.ToolsPushing a PackageUse thepushcommand to add a package to the queue:kamikaze push <payload> <ttl> <priority>Removing a PackageUse theremovecommand to remove a package from the queue:kamikaze remove <payload>List Packages on QueueUse thelistcommand to list all packages on the queue:kamikaze listRunning the examplesYielding exampleAn example of a yielding function can be run like so:kamikaze service example_consumer.consumer.yielding_consumer_funcBlocking exampleAn example of a blocking function can be run like so:kamikaze service example_consumer.consumer.blocking_consumer_func
Package: kamilib-light
KaMI-lib (Kraken Model Inspector) - Light versionA light version of KaMI-lib containing only the transcription metrics module (without Kraken).🔌 InstallationUser installationUse pip to install package:$pipinstallkamilib-lightDeveloper installationCreate a local branch of the kami-lib light project$gitclonehttps://github.com/KaMI-tools-project/KaMI-lib-light.gitCreate a virtual environment$virtualenv-ppython3.7kami_venvthen$sourcekami_venv/bin/activateInstall dependencies with the requirements file$pipinstall-rrequirements.txtRun the tests$python-munittesttests/*.py-v🔑 QuickstartPlease, follow the documentation ofkami-liband ignore part 2 (with Kraken engine).Note that instead of importing Kami-lib like this:fromkami.KamiimportKamiReplace by this :fromkami_light.KamiimportKami❓ Do you have questions, bug report, features request or feedback ?Please use the issue templates:🐞 Bug report:here🎆 Features request:hereif aforementioned cases does not apply, feel free to open an issue.✒️ How to cite@misc{Kami-lib-light,
    author = "Lucas Terriel (Inria - ALMAnaCH) and Alix Chagué (Inria - ALMAnaCH)",
    title ={Kami-lib - Kraken model inspector, a light version},
    howpublished ={\url{https://github.com/KaMI-tools-project/KaMI-lib-light}},
    year ={2022}}🐙  License and contactDistributed underMITlicense. The dependencies used in
the project are also distributed under compatible license.Mail authors and contact: Alix Chagué (alix.chague@inria.fr) and Lucas
Terriel (lucas.terriel@inria.fr)KaMI-lib-lightis a part ofKaMI-tools-projectand maintained by authors (2022) with contributions ofALMAnaCHatInriaParis.
Package: kami-logging
Kami LoggingSimple decorator to logging and benchmark functions📝 Table of ContentsAboutGetting StartedDeploymentUsageBuilt UsingTODOContributingAuthorsAcknowledgments🧐 AboutThis package arose from the need to simplify the logging tasks of applications created by the Kami CO software development team.Currently the package has 4 decorators: benchmark_with, logging_with, default_logging and default_benchmark for logging and basic performance testing with or without a defined logger object;🏁 Getting StartedThese instructions will get you a copy of the package and a daily use example.PrerequisitesPython 3.xlogging libraryInstalling$pip install kami-logging🎈 UsageThe four decorators available are:@logging_with:generates a log message of type info at the beginning and end of the function execution, using a logger object defined by the developer@default_logging:generates a log message of type info at the beginning and end of function execution, using a default logger object named 'default'@benchmark_with:Generates a log message of type info with the runtime of the function accurate to 3 decimal places, using a developer-defined logger object@default_benchmark:generates a log message of type info with the runtime of the function accurate to 3 decimal places, using a default logger object named 'default'importloggingfromkami_loggingimportlogging_with,benchmark_withmy_app_logger=logging.getLogger("my_app")@benchmark_with(my_app_logger)@logging_with(my_app_logger)defmy_func(*args,**kwargs):passResult:⛏️ Built UsingPython- DatabaseLogging- Server Framework✍️ Authors@maicondmenezes- Idea & Initial workSee also the list ofcontributorswho participated in this project.🎉 AcknowledgementsReferences:Arjancodes:Github,Youtube,TwitterEduardo Mendes:Github,Youtube,Twitter
Package: kami-messenger
Kami MessengerAggregator of Digital Channels For Sending Messages📝 Table of ContentsAboutGetting StartedDeploymentUsageBuilt UsingTODOContributingAuthorsAcknowledgments🧐 AboutKami Messenger is a tool for aggregating several messaging platforms into a single package in order to facilitate the task of sending mass messages.It contains three main classes for this purpose:Message(A single message that contains a list of recipients to send);Contact(A single contact with a list of addresses for different messaging platforms);Messenger(An object that instantiates, connects, and provides message push service of a specific platform)🏁 Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Seedeploymentfor notes on how to deploy the project on a live system.PrerequisitesTo run this package you only need apython 3.xcompiler andpoetryon your dev enviroment.Installingpipinstallkami-messengerThen, after installing the dependencies, just activate the development environment with the following command:poetryshellReady now you start developing and testing!🔧 Running the testsThe project already has some of the main unit tests for each of the entities present in the code, but you can add your own tests in the respective directories 'test' of each entity.Break down into end to end testsEach entity has its own tests folder with the most elementary unit tests and to run them just run the command below in the entity folder you want to test or in the root folder to test all project codestask testNote that when executing this command, before actually testing the code, a code review will be performed using the lint-review task and after the execution of the test, an html file with the full coverage of the test will be available in the htmlcov folder created in the folder where the command was run. was executedAnd coding style testsIn addition, the project already has automated tasks for review and correcting the code style following pep8 standardsTo just review the code run the command below in the folder you want to analyze:task lint-reviewIf you want to automatically review and correct the code, run this command in the desired directorytask lint-fix🎈 UsageAdd notes about how to use the system.🚀 DeploymentAdd additional notes about how to deploy this on a live system.⛏️ Built UsingPython 3.xPython email built-in lib✍️ Authors@maicondmenezes- Idea & Initial workSee also the list ofcontributorswho participated in this project.🎉 AcknowledgementsThe main references for this project can be found in the Python topic ofthis repository
Package: k-amino.py
k_aminok_amino is unofficial client forAminoappsAPI in Python.InstallationYou can use eitherpython3 setup.py installorpip3 install k-amino.pyto install. This module is tested on Python 3.9+.Contributingk_amino is open source module, anyone can contribute. Please see theGithub RepositoryDiscordYou can join theDiscord Serverto add suggestions or to report problems
and to get new updates and changesYoutube Channelyou can check thisyoutube channelfor more information about script and botsFeaturesFaster than otherAminoappspython modulesSupports async and sockets, eventsEasy and sample to useNoToo many requests.Continual updates and bug fixesHave alot of useful functionsExamplesBot Supportfromk_aminoimportClientclient=Client(bot=True)client.login("< email >","< password >")@client.command()deftest(data,ok:str="ok"):data.subClient.send_message(data.chatId,f"Test is{ok}!")Get SessionIDimportk_aminoclient=k_amino.Client()client.login("< email >","< password >")print(client.sid)Login with SessionIDimportk_aminoclient=k_amino.Client()client.sid_login("< sid >")print(client.sid)Send a message in chatfromk_aminoimport(Client,SubClient)importgetpassclient=Client()email=input("email:  ")password=getpass.getpass("password:  ")client.login(email=email,password=password)chat_link=client.get_from_link(input("chat link:  "))chat_id=chat_link.objectIdndc_client=SubClient(comId=chat_link.comId)whileTrue:text=input("Your message: ")ndc_client.send_message(chatId=chat_id,message=text,messageType=0)print(f"message sended:{text}")
Package: kamispy
KAMIS Open-API의 비공식 파이썬 클라이언트입니다.다음의 API 문서를 읽어주세요:https://www.kamis.or.kr/customer/reference/openapi_list.do요구사항Python 3.7 이상KAMIS Open-API 인증 키KAMIS 홈페이지에서 발급받을 수 있습니다.https://www.kamis.or.kr/customer/reference/openapi_write.do면책조항이 프로젝트는 스포카에서 제공하는 KAMIS Open-API의 비공식 파이썬
클라이언트입니다.  모든 KAMIS Open-API의 API 지원과 동작을 보장하지 않습니다.지원하는 API 목록Kamispy는 아직 정식 버전이 아니며, 내부적인 필요에 의해 지원하는 API를
추가하고 있습니다.  2020년 12월 9일 기준 지원하는 API 목록은 다음과 같습니다.일별 품목별 도·소매가격정보최근일자 도.소매가격정보(상품 기준)또한, 아직 지원하지 않는 API 목록은 다음과 같습니다.일별 부류별 도.소매가격정보월별 도.소매가격정보연도별 도.소매가격정보친환경농산물 가격정보최근 가격추이 조회(상품 기준)월평균 가격추이 조회(상품 기준)연평균 가격추이 조회(상품 기준)최근일자 지역별 도.소매가격정보(상품 기준)친환경농산물 품목별 가격정보친환경농산물 가격정보친환경농산물 품목별가격정보지역별 품목별 도.소매가격정보실행 방법클라이언트 초기화 방법클라이언트는 다음과 같이 초기화합니다.cert_key파리미터에는 KAMIS
Open-API 인증 키를 넣고,cert_id파라미터에는 KAMIS 홈페이지 계정 아이디를
넣습니다.>>>fromkamis.clientimportCertificationPair,KamisOpenApi>>>client=KamisOpenApi(...CertificationPair(cert_key='test',cert_id='test')...)API 실행 예제다음은 ‘최근일자 도.소매가격정보(상품 기준) API’를 실행하는 예제를 보여줍니다.
초기화한 클라이언트에서daily_sales_list함수를 실행합니다.  실행해야 하는
함수의 이름은 각 API의 action 파라미터의 이름과 같습니다.>>>daily_sales_list=client.daily_sales_list()>>>daily_sales_list.result_code<ResultCode.SUCCESS: '000'>>>>daily_sales_list.prices[0]PriceResponse(product_class=<ProductClass.RETAIL: '01'>, category_code='100', category_name='식량작물', productno='272', latest_date=datetime.date(2020, 10, 16), product_name='쌀/일반계', item_name='쌀/일반계', unit='20kg', date_price_dict=OrderedDict([('당일', 55094), ('1일전', 55053), ('1개월전', 52723), ('1년전', 51034)]), direction_type=<Direction.INCREASE: '1'>, direction_value=0.1)>>>daily_sales_list.prices[1]PriceResponse(product_class=<ProductClass.RETAIL: '01'>, category_code='100', category_name='식량작물', productno='273', latest_date=datetime.date(2020, 10, 16), product_name='쌀/햇일반계', item_name='쌀/햇일반계', unit='20kg', date_price_dict=OrderedDict([('당일', 58887), ('1일전', 58939), ('1개월전', None), ('1년전', 53015)]), direction_type=<Direction.DECREASE: '0'>, direction_value=0.1)파라미터가 있는 API 실행 예제다음은 ‘일별 품목별 도·소매가격정보 API’를 실행하는 예제를 보여줍니다.이 API는 인증 정보 외에도 추가적인 파라미터가 필요한데, 이러한 경우 파라미터를
담을 수 있는Parameters클래스가kamis.models하위의 해당하는 API
모듈 내부에 정의되어 있습니다.>>>fromkamis.models.period_product_listimportParameters>>>importdatetime>>>params=Parameters(...date_range=(...datetime.date(2020,10,21),datetime.date(2020,10,22)...),...product_class=None,...item_category_code="100",...item_code="111",...kind_code"01",...product_rank_code="04",...country=None,...convert_kg=None...)파라미터를 생성하여 이전 예제와 같이 클라이언트에서 API에 해당하는 함수를
실행합니다.>>>period_product_list=client.period_product_list(params)>>>period_product_list.data.result_code<ResultCode.SUCCESS: '000'>>>>period_product_list.data.items[0]ItemResponse(item_name=None, kind_name=None, county_name='평균', market_name=None, reg_date=datetime.date(2020, 10, 21), price_=54520)>>>period_product_list.data.items[1]ItemResponse(item_name=None, kind_name=None, county_name='평균', market_name=None, reg_date=datetime.date(2020, 10, 22), price_=54520)>>>period_product_list.data.items[4]ItemResponse(item_name='쌀', kind_name='일반계(20kg)', county_name='서울', market_name='양곡도매', reg_date=datetime.date(2020, 10, 21), price_=53300)
Package: kamma
kammais a very simplified task file queue that persists tasks and its needed data. It also has a worker that process all pending tasks.MotivationNowadays local disk access is an undervalued resource for many reasons, however stored data is always available even after power outage. By contrast, network resources or remote third parties are not always ready. Is for this reason I developed thekammain order to isolatedependenttasks from the miseries of remote services.kammawould try process all pending tasks forever respecting the queue order.LimitationsUp to(sys.maxint - FileQue.max_head_index)tasks can be queued as maximum.All task’s arguments should be serializable by jsonNot recommended for high performance scenarios.InstallAs simple as:pip install kammaExampleimportkamma# python 2 and 3 compatibility issuetry:input=raw_inputexceptNameError:pass# kamma workerapp=kamma.Worker()# registering fibonacci callback in kamma app@app.task_callback(timeout=5,retry_wait=kamma.wait_fixed(1),retry_stop=kamma.stop_after_attempt(1))deffibonacci(n,level=0):result=1ifn<0orn>100:raisekamma.AbortTask("n has to be 0 <= n <= 100")ifn>1:result=fibonacci(n-1,level=level+1)+fibonacci(n-2,level=level+1)iflevel==0:print("*** RESULT: fibonacci of '{}' is '{}' ***".format(n,result))returnresultif__name__=="__main__":# start listening for incoming tasksapp.run_async()print("Enter the value of the fibonacci you want to compute, 0 to exit")n=1whileTrue:n=int(input(""))ifn==0:break# add new fibonacci taskapp.push_task(fibonacci,n=n)app.stop()The complete example here:examples/example.py
Package: kammanta
Please note:This is a prototype in early developmentKammantaKammanta is aproductivityandlife organizingapplication inspired by the GTD© methodology,
and with two attributes that set it apart:Data isstored as text files and directories(the actual names of files and dirs are used)The application isfree software(free as in freedom) which means that the source code is
open, and you can copy and create your own application if you wantInstallationThe application is developed on Ubuntu. As of nowsome features may not work on other major platforms like Windows and MacOSUsing pipDebian-based Linux systems (for example Ubuntu)pip3 install kammantaThis will install the application into the~/.local/bindirectory(Detail: The actual files are in~/.local/lib/python3.8/site-packages,~/.local/binonly contains the startup script)Launching the application: ~/.local/bin/kammantaWindows and MacOSpip install kammantaRunning from sourceLinux systemsRequirements:Python 3.8PyQt 5.14 (and PyQt5-sip)pip3 install -r requirements.txtLaunching the application:Go to the installation directory in a terminal./starts.shFeaturesData is stored in plain text files, so it's possible to access the files in other ways and on other devices than desktopex: the user can have a list of errands that she can access on her mobile phoneThe GUI is updated if files are updated, so that it's possible to work with both the application and  a text editor at the same timeScreenshotsVideosclick-to-play-video-fileUnderstanding the applicationDefinition of "item": _BackendAll data is stored in the file system. Names of dirs and files are used for projects and contacts. Lines in files are used for Next Actions and agenda itemsAll items can have support materialFiles and dirsSome special cases of files:Link files (.desktop for GNU/Linux atm)Text filesNote files, used in the inbox (when adding/taking notes)Image - sometimes previews are shownSupport material:If we have a desktop link we can refer to the support material which can then be another file, a directory, etcIf the item is another type of file that file itself will be the support material. A typical example is a text fileIf the item is a directory that directory will contain all the support materialLines (in a text file)At the end of a line it's possible to have a reference to support material. This is a piece of text that follows the "|" character. It can refer to a website, text file, directory, etc
Package: kamo
almost subset of mako. this is a toy package.don’t use in production!!# -*- coding:utf-8 -*-importloggingfromkamoimportTemplatelogging.basicConfig(level=logging.DEBUG)template=Template("""
<%
def decorate(s):
    return "**{}**".format(s)
%>
<%!from datetime import datetime%>

${greeting|decorate}
${name}: this is my first sample! (now: ${datetime.now()})
""")print(template.render(name="foo",greeting="chears"))print("----------------------------------------")print(template.render(name="boo",greeting="chears"))generated function is such as below.fromdatetimeimportdatetimedefrender(io,**c):write=io.writedefdecorate(s):return"**{}**".format(s)write(str(decorate(c['greeting'])))write('\n')write(str(c['name']))write(': this is my first sample! (now: ')write(str(datetime.now()))write(')\n')lookup templatefoo.kamo${name}: yupfoo.pyfromkamoimportTemplateManagertm=TemplateManager(directories=["."])template=tm.lookup("foo.kamo")# find template from ["./foo.kamo"]print(template.render(name="foo"))