Saravanan666/pypi-org huggingface dataset:
Package: worktory
Welcome to Worktory’s documentation!Worktory is a python library created with the single purpose of simplifying the inventory management of network automation scripts.As the network automation ecosystem grows, several connection plugins and parsers are available, and several times choosing a library or a connection plugin restricts all the devices to the same connection method.Worktory tries to solve that problem giving the developer total flexibility for choosing the connector plugin and parsers for each device, at the same time that exposes a single interface for every plugin.InstallingWorktory is available in PyPI, to install run:$ pip install worktoryUsing worktorySample Inventorydevices=[{'name':'sandbox-iosxr-1','hostname':'sandbox-iosxr-1.cisco.com','platform':'cisco_iosxr','username':'admin','password':'C1sco12345','groups':['CORE'],'connection_manager':'scrapli','select_parsers':'genie','mode':'async','transport':'asyncssh',},{'name':'sandbox-nxos-1','hostname':'sandbox-nxos-1.cisco.com','platform':'cisco_nxos','username':'admin','password':'Admin_1234!','groups':['CORE'],'select_parsers':'ntc','connection_manager':'scrapli','mode':'async','transport':'asyncssh'},{'name':'sandbox-nxos-2','hostname':'sandbox-nxos-1.cisco.com','platform':'nxos','username':'admin','password':'Admin_1234!','groups':['EDGE'],'connection_manager':'unicon','mode':'sync','transport':'ssh','GRACEFUL_DISCONNECT_WAIT_SEC':0,'POST_DISCONNECT_WAIT_SEC':0,},{'name':'sandbox-iosxr-2','hostname':'sandbox-iosxr-1.cisco.com','platform':'cisco_iosxr','username':'admin','password':'C1sco12345','groups':['CORE'],'connection_manager':'scrapli','select_parsers':'genie','mode':'sync',},]Collecting Running config from async devicesfromworktoryimportInventoryManagerimportasyncioinventory=InventoryManager(devices)device_configs={}asyncdefget_config(device):awaitdevice.connect()config=awaitdevice.execute("show running-config")device_configs[device.name]=configawaitdevice.disconnect()asyncdefasync_main():coros=[get_config(device)fordeviceininventory.filter(mode='async')]awaitasyncio.gather(*coros)loop=asyncio.get_event_loop()loop.run_until_complete(async_main())Collecting Running config from sync devicesfromworktoryimportInventoryManagerfrommultiprocessingimportPoolinventory=InventoryManager(devices)defget_config(device_name):inventory=InventoryManager(devices)device=inventory.devices[device_name]device.connect()config=device.execute("show running-config")device.disconnect()return(device.name,config)defmain():devs=[device.namefordeviceininventory.filter(mode='sync')]withPool(2)asp:returnp.map(get_config,devs)output=main()
Package: work-toto
work_totoPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://work-toto.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-04-03)First release on PyPI.
Package: work-wechat-log-notify
Work wechat log notify.WorkWechatLog(webhook_urls: str | List[str], mode: bool) 企业微信日志类webhook_urls{str|List[str]} webhook链接地址，可传字符串或者字符串列表mode{bool} 是否测试模式，测试模式使用print输出 True: 测试模式 False: 生产模式example:log=WorkWechatLog("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",False)# 或log=WorkWechatLog(["https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],False)text(msg: str, mentioned_list: List[str], mentioned_mobile_list: List[str]) 发送文本消息msg{str} 文本内容，最长不超过2048个字节，必须是utf8编码mentioned_list{List[str]} userid的列表，提醒群中的指定成员(@某个成员)，@all表示提醒所有人，如果开发者获取不到userid，可以使用mentioned_mobile_listmentioned_mobile_list{List[str]} 手机号列表，提醒手机号对应的群成员(@某个成员)，@all表示提醒所有人returns {None}example:fromwork_wechat_log.logimportWorkWechatLoglog=WorkWechatLog(webhook_urls,False)log.text("haha",["@all"])markdown(msg: str) 发送markdown消息msg{str} 文本内容，最长不超过2048个字节，必须是utf8编码mentioned_list{List[str]} userid的列表，提醒群中的指定成员(@某个成员)，@all表示提醒所有人，如果开发者获取不到userid，可以使用mentioned_mobile_listmentioned_mobile_list{List[str]} 手机号列表，提醒手机号对应的群成员(@某个成员)，@all表示提醒所有人returns {None}example:fromwork_wechat_log.logimportWorkWechatLoglog=WorkWechatLog(webhook_urls,False)log.markdown("###实时新增用户反馈<font color=\"warning\">132例</font>")image(image_path: str) 发送图片消息image_path{str} 图片地址，图片最大不能超过2Mreturns {None}example:fromwork_wechat_log.logimportWorkWechatLoglog=WorkWechatLog(webhook_urls,False)log.image("./tmp/test.png")table(table: TableType, headers: TableHeadersType = (), tablefmt: TableFmtType = "simple") 发送表格消息@seehttps://pypi.org/project/tabulate/参数都和tabulate一样returns {None}测试模式使用tabulate输出表格，生产模式会转化为image发送example:fromwork_wechat_log.logimportWorkWechatLoglog=WorkWechatLog(webhook_urls,False)table=[["spam",42],["eggs",451],["bacon",0]]headers=["item","qty"]log.table(table,headers,"simple_grid")file(file_path: str) 发送文件消息file_path{str} 文件地址，要求文件大小在5B~20M之间returns {None}example:fromwork_wechat_log.logimportWorkWechatLoglog=WorkWechatLog(webhook_urls,False)log.file("./tmp/test.pdf")
Package: work-weixin
企业微信接口项目介绍封装企业微信接口,发送消息.安装教程上传exportVERSION=0.0.2.3
pythonsetup.pysdist&&twineupload-uhaifengatdist/*$VERSION*.gz&&\pythonsetup.pybdist_wheel&&twineupload-uhaifengatdist/*$VERSION*.whlpip install work_weixin使用说明launch.json{// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"version":"0.2.0","configurations":[{"name":"Python: Current File","type":"python","request":"launch","program":"main.py","cwd":"${workspaceFolder}","env":{"corpid":"wxxxxxxxxxxxxxxxxxxx","agentid":"nnnnnnnn","secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"console":"integratedTerminal"}]}
Package: work-weixin-api
Work Weixin Api企业微信接口封装库目前实现了简单的发送消息功能，后序按照业务继续增加其他接口Github:https://github.com/mouday/work-weixin-apiPypi:https://pypi.org/project/work-weixin-apiinstallpipinstallwork-weixin-apidemo# -*- coding: utf-8 -*-fromwork_weixin_apiimportWorkWeixinClientclassCustomWorkWeixinClient(WorkWeixinClient):"""配置自己企业的信息"""# 企业idcorpid=""# 秘钥corpsecret=""# 应用idagent_id="100000"if__name__=='__main__':client=CustomWorkWeixinClient()print(client.user_simplelist(department_id=1))# 发送消息print(client.message_send_text(agentid=client.agent_id,content='hi',touser="PengShiYu"))说明核心类继承关系：classWorkWeixinApi(object):"""实现了最基础的企业微信接口函数"""classWorkWeixinClient(WorkWeixinApi):"""扩展了基本的接口函数1、对access_token 进行了缓存2、简化了接口调用操作"""
Package: workwithimage
Work With ImageEnglishThis Python library based onPillow,workwithimage, allows you to work with images. Features available in this version:Converting an image into ASKII artImage resolution adjustmentChanging the image formatInstallationpipinstallpillow
pipinstallworkwithimageConverting an image to ASKII artfromworkwithimageimportconvert_to_ascii# Example usageimage_path="your_image.jpg"columns=150ascii_image=convert_to_ascii(image_path,columns)print(ascii_image)# Save to filewithopen("output.txt","w")asfile:file.write(ascii_image)Image resolution adjustmentfromworkwithimageimportresize_image# Example usageimage_path="your_image.jpg"new_width=800new_height=600resized_image=resize_image(image_path,new_width,new_height)Changing the image formatfromworkwithimageimportconvert_image_format# Example usageinput_image_path="your_image.jpg"desired_output_format="png"output_image_path=convert_image_format(input_image_path,desired_output_format)Supported Image FormatsJPEGPNGGIFBMPTIFFWebPICOand moreImportant NoteThe library supports various image formats; check Pillow documentation for the complete list.RussianБиблиотека на Python на основеPillow,workwithimage, позволяет работать с изображениями. Функции доступные в данной версии:Перобразование изображения в ASKII-артИзменение разрешения изображенияИзменение разрешения изображенияУстановкаpipinstallpillow
pipinstallworkwithimageПеробразование изображения в ASKII-артfromworkwithimageimportconvert_to_ascii# Пример использованияimage_path="ваше_изображение.jpg"columns=150ascii_image=convert_to_ascii(image_path,columns)print(ascii_image)# Сохранение в файлwithopen("output.txt","w")asfile:file.write(ascii_image)Изменение разрешения изображенияfromworkwithimageimportresize_image# Пример использованияimage_path="ваше_изображение.jpg"new_width=800new_height=600resized_image=resize_image(image_path,new_width,new_height)Изменение формата изображенияfromworkwithimageimportconvert_image_format# Пример использованияinput_image_path="ваше_изображение.jpg"desired_output_format="png"output_image_path=convert_image_format(input_image_path,desired_output_format)Поддерживаемые форматы изображенийJPEGPNGGIFBMPTIFFWebPICOи другиеВажное замечанияБиблиотека поддерживает различные форматы изображений; проверьте документацию Pillow для полного списка.
Package: world
This script takes a list of Internet top-level domain names and prints out
where in the world those domains originate from.  For example:$ world tz us
tz originates from Tanzania, United Republic of
us originates from United States of America (the)Reverse look ups are also supported:$ world -r united
Matches for "united":
  ae: United Arab Emirates (the)
  gb: United Kingdom of Great Britain and Northern Ireland (the)
  tz: Tanzania, United Republic of
  uk: United Kingdom (common practice)
  um: United States Minor Outlying Islands (the)
  us: United States of America (the)Only two-letter country codes are supported, since these are the only ones
that were freely available from theISO3166standard.  However, as of
2015-01-09, even these are no longer freely available in a machine readable
format.This script also knows about non-geographic, generic, USA-centric, historical,
common usage, and reserved top-level domains.Project detailsProject home:https://gitlab.com/warsaw/worldReport bugs at:https://gitlab.com/warsaw/world/issuesCode hosting:https://gitlab.com/warsaw/world.gitDocumentation:http://world.readthedocs.io/en/latest/Authorworldis Copyright (C) 2013-2022 Barry Warsaw <barry@python.org>Licensed under the Apache License, Version 2.0 (the “License”).  See the
LICENSE file for details.
Package: worldbuild
=========================================World Build=========================================Tools for computational world building (work in progress)Overview--------------------------------Worldbuild contains tools to build worlds and store the metadata around that, including objects, history, animals, vegetation.You provide a map of your world and annotate it via a YAML file to define towns with locations - the wiki tool extracts subset of the image to for each town.You can add additional information to build a rich history around your world.Quick Start=========================================Copy your map file (JPG) or scan a hand drawn map.Create a YAML file with the following sectionswiki: Yesworld_name: Alronacontents:- races- settlementsmaps: [alrona-pen-coloured.jpg]You need to have a root section for each element in contents, and there needs to be a name and desc element at the minimum.settlements:- name: Draetoncontinent: Sharniacoords_x_y: [66,58]desc: >This is the largest city on the East side of Sharnia. 3,000 men live in this stronglydefended city- name: Ambylecontinent: Sharniacoords_x_y: [64,58]desc: >Farming town East of Draeton, known for their famous weekend markets selling exotic produce grown in the warm regions north of the Eastern DesertThen modify the params and run the wiki.py program to generate the HTML version of your world.The settlements page shows the description from the yaml file, and also a section of the map based on the coords_x_y parameterYou can extend the wiki with as many sections as you like and each entry can include a file section to import a text (or html) file to be included in that page.Random Grid Generation============================Create a random grid as followspip install worldbuildbuild_random_grid.pyYou can convert this grid to a Tiled TMX file for manual editingconvert_grid_to_tiled_map.pyDungeon Map Generator============================Create a randomnly generated rogue like dungeon grid by runningimport worldbuild.dungeon_generator as dggrid = dg.create_dungeon(grid_y=30, grid_x=80, NUM_ROOMS=16, ROOM_SIZE = 3, NUM_HORIZ = 10)print(dg.grid_as_str(grid))# optional - make a path through the gridprint(dg.path_find(grid))# optional - export as TMX filedg.convert_grid_to_TileEditor_map('dungeon.tmx', 'samples/ascii_runeset.tsx')It also uses the pathfinding package to make a path through the mapOptionally, you can uncomment the line to save it as a TMX file for use in Tiled.Doing this will allow you to use the above grid with a tileset to get better graphics.
Package: worldcoin-wrapper
WorldCoin 1.0.1worldcoin- это модуль для упрощенной работы с api WorldCoinУстановка модуляpython-mpipinstallworldcoin_wrapperРабота с модулемБыстрый стартfromworldcoinimportWorldCoinSeccion=WorldCoin(group_id=12345678,token="token")group_id- ID владельца токенаtoken- Токен, выданный вам в приложенииМетодыget_payment_linkПолучение ссылки для принятия переводовSeccion.get_payment_link(amount=100,code=1234,lock=0)amount- сумма перевода(По умолчанию: 100)code- вернется вам в истории(Если не указан: от 1 до 12345678)lock- Возможность редактирования суммы(По умолчанию: 0)get_merchant_balanceПолучение баланса мерчантаSeccion.get_merchant_balance()get_history_transactionsПолучение истории переводовSeccion.get_history_transactions(count=15,filter=1)count- количество переводов(По умолчанию: 10)filter- фильтр операций(По умолчанию: 1)send_transferПеревод коинов пользователюSeccion.send_transfer(to_id=12345678,amount=100,code=1234)to_id- получатель переводаpoint- сумма переводаcode- вернется в списке платежей(Если не указан: от 1 до 12345678)get_users_infoПолучение данных игроковSeccion.get_user_info(282952551,12345678)ID указываются через запятуюКастомный запрос - custom_requestЕсли вы не обнаружили необходимого вам метода в стандартных,
стоит использовать кастомный методДля примера, получим баланс мерчанта, используя кастомный методSeccion.custom_request(base_params=True,action="balance")base_params- передача базовых параметров, таких как group_id и token(По умолчанию: True)Все параметры передаются подобно actionLongPollingМодуль нативно поддерживает LongPolling,
для его использования требуется реализовать новый дочерний класс: LongPollingfromworldcoinimportLongPollingLongPoll=LongPolling(Seccion)Следующие действия просты, необходимо использовать метод listen в цикле, для активации LongPollforpaymentinLongPoll().listen(sleep=5):user_id=payment['from']amount=payment['amount']print(f'Получен платёж на сумму{amount}от{user_id}')Вот так просто ;)ДополнительноРазработчикИсходный кодОфициальная документацияБиблиотека обладает подсказками, лучше использвать IDE
Package: worldcup18
worldcup18A simple CLI to stay up to date with 2018 World Cupinstallationpip install worldcup18demo$ worldcup next
Match #5: 🇫🇷  France vs Australia 🇦🇺
When: Saturday, 16. June 2018 12:00PM
Where: Kazan

$ worldcup groups a
GROUP A                    MP GF GA PTS
---------------------------------------
Russia                      1  5  0  3
Uruguay                     1  1  0  3
Egypt                       1  0  1  0
Saudi Arabia                1  0  5  0

$ worldcup --help
Usage: worldcup.py [OPTIONS] COMMAND [ARGS]...

  CLI tool for being up to date with 2018 World Cup

Options:
  --help  Show this message and exit.

Commands:
  groups  Show group info
  next    Show nearest match infodevelopementacknowledgmentsWorld Cup data available thanks to json file fromlsv fifa-worldcup-2018Inspired by:SkullCarverCoder
Package: worlddata
WorldData.AIPython API wrapper forWorldData.AIInstallationFrom pypi:pip3 install worlddataFrom GitHub:
Clone our repository andpython3 setup.py installOrpip install git+https://github.com/worlddata-ai/python-api.gitRequirementsrequestsUsagefrompprintimportpprintfromworlddata.worlddataimportWorldDataworlddata=WorldData(auth_token='1212312-12312312')pprint(worlddata.search(search_text='worlddata'))Connection poolingIf you are going to make a couple of request, you can user connection pooling provided byrequests. This will save significant time by avoiding re-negotiation of TLS (SSL) with the chat server on each call.fromrequestsimportsessionsfrompprintimportpprintfromworlddata.worlddataimportWorldDatawithsessions.Session()assession:worlddata=WorldData(auth_token='1212312-12312312')pprint(worlddata.search('worlddata'))Method parametersOnly required parameters are explicit on the WorldData class but you can still use all other parameters. For a detailed parameters list check theWorldData.AIAPI coverageMost of the API methods are already implemented. If you are interested in a specific call just open an issue or open a pull request.TestsWe are actively testing :)ContributingYou can contribute by doing Pull Requests. (It may take a while to merge your code but if it's good it will be merged). Please, try to implement tests for all your code and use a PEP8 compliant code style.Reporting bugs and asking for features is also contributing ;) Feel free to help us grow by registering issues.We hang outhereif you want to talk.
Package: worldguess
worldguessSummaryThis python package guess the country of a subject text, name or list based on places names frequencies.
It works in any languages/alphabet.WarningOriginally, this library was made to be used with a list of places extracted with an NER program such asSpacy.I heavely recommend using it that way.It is also possible to use it on a text, but the precision is not very good, as some words in a language correspond to a place in another language.It is also still a work in progress. I did a version of this library in an old internship, to quickly identify and classify documents according to  countries, and thought it was a cool tool to share, so I remade it from scratch at home recently (with permission of my old boss).It is an easy way to identify the source country of an news article for example, and automatically tag the country.UsageWith a list:wg=WorldGuesser()text=["London","Manchester","UK","BRISTOL","Scotland","Berlin"]result=wg.from_list(text)self.assertEqual(result[0],"United Kingdom")With a name:wg=WorldGuesser()text="санкт-петербург"result=wg.from_place(text)self.assertEqual(result[0],"Russia")If no country is found, the first result in the list will be "Unknown"Data SourcesThe date sources come from the GeoNames Database:https://www.geonames.org/
Package: worldmap
Worldmapworldmapis a light weighted Python package that enables easy coloring of countries and/or regions in the world.
For this package, the svg images fromhttps://www.w3.orgare utilized, processed and colored.
It requires downloading the svg files a single time and then works offline.⭐️ Star this repo if you like it ⭐️Install worldmap from PyPIpipinstallworldmapImport worldmap packageimportworldmapaswmDocumentation pagesOn thedocumentation pagesyou can find detailed information about the working of theworldmapwith many examples.ExamplesExample: color the different regions in a countryExample: color the different in the worldmapExample: Retrieve all Map NamesExample: Retrieve county NamesExample: Convert county name to abbrevationExample: Convert abbrevation to county nameReferences:http://www.w3.org/Consortium/Legal/copyright-softwareMaintainersErdogan Taskesen, github:erdogantContributeAll kinds of contributions are welcome!If you wish to buy me aCoffeefor this work, it is very appreciated :)
Package: worldometer
Get live, population, geography, projected, and historical data from around the world.MetadataStatusIndexAboutInstallDocumentationDemoworldometers.infoData SourcesContributionsLicenseAboutTheworldometerpackage accesses various counters and live data available throughout theworldometers.infowebsite and provides them through simple and self-describing classes, methods and attributes.Access data on:The world 🌍Population 👥Geography 🗺️Projections 🔮Historical 📜InstallUsepipto install the worldometer package:$pipinstallworldometerDocumentationSee the docs for more information and its API at:worldometer.readthedocs.ioDemo[!NOTE]The first time you run any function/method or class, it will download Chromium to~/.local/share/pyppeteerdirectory. It only happens once. After, it will only open the chromium to render the contents of worldometers.info.Get the data from the live counters available on thehomepage:>>>fromworldometer.worldimportWorldCounters>>>wc=WorldCounters()>>>wc.world_population.current_population8065299074>>>wc.government_and_economics.computers_produced_this_year180248430>>>wc.society_and_media.internet_users_in_the_world_today5895566559Reload data to get the latest:>>>wc.reload_data()>>>wc.world_population.current_population8065300592Get help and view information about mapped sections:>>>help(wc)worldometers.infoWorldometer is run by an international team of developers, researchers, and volunteers with the goal of making world statistics available in a thought-provoking and time relevant format to a wide audience around the world. It is published by a small and independent digital media company based in the United States. We have no political, governmental, or corporate affiliation. Furthermore, we have no investors, donors, grants, or backers of any type. We are completely independent and self-financed through automated programmatic advertising sold in real time on multiple ad exchanges.worldometers.info/aboutData Sources[adapted]:worldometers.info collects its statistics and data from the most reputable national and international organizations, including the United Nations, the World Health Organization, the Food and Agriculture Organization, OECD and others.Each Worldometer counter has its specific set of sources, which are listed on its dedicated page (accessible by clicking on the counter text link, when available).Data, estimates, and projections displayed on worldometers.info counters are for the most part provided by organizations included in the following list of United Nations Statistics Division's partners.worldometers.info/sourcesContributionsAll contributions are welcome!Found a problem, want to give a tip?open an issueDo you have a solution to the problem?Send me a PRDid you like this project?Click on the star ⭐LicenseThis project is using the MIT license, see inMIT LICENSE.
Package: worldometers.py
worldometers.pyGet real time Earth statistics related to population.Parses information from countrymeters.info. Initially a test project as an introduction to Python classes but later reworked and refactored to be released to the public.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.Download and installPython.Installworldometers.pywith$ pip install worldometers.py.UsageAssumeworldometers = Worldometers().Get current world population:current_pop=worldometers.current_world_population()# Output: Integer of the order 10e9Get births:births_day=worldometers.births(timescale='day')# Output: Integer representing number of births today.births_year=worldometers.births(timescale='year')# Output: Integer representing number of births in the year.The code is fairly easy to understand and apply. Readworldometers.pyand you should get up to speed within seconds.FutureI've got to add a lot of stuff to this package. Keep your eyes peeled!AuthorsCarlos Menezesâ€”Initial work-c-mnzs
Package: world-price
FetchesWorld Priceof a Certain Symbol ConcurrentlyModule Installation$pipinstallworld-priceHow to usefromworld_priceimportWorldPricefromworld_price.sourceimportBinancePriceSource,HuoBiPriceSource,MxcPriceSourceSYMBOL="BTC_USDT"asyncdefmain():price_source=[BinancePriceSource,HuoBiPriceSource,MxcPriceSource]wp=WorldPrice(price_source,price_diff_tolerance=3/5)p=awaitwp.get_price(SYMBOL)print(f"world price of{SYMBOL}:{p}")