Saravanan666/pypi-org huggingface dataset:
Package: poslq-simple
projectLooking for contributions.What ?really simple no-sql database ( for small projects ) using json.Documentationread the docs.md file.Quickstart ( simple example )fromposql_simpleimportw_out_sql.pymy_password="hello world"# for cipher coding ( key )path="./default.pst"# use the pst extensionmy_db=Database(__pass=password,path=path)my_collection_name="clients"my_collection=Collection(collect_name=my_collection_name)# creating the collectiondb.bind_new_collection(my_collection)# binding the collection to the dbclient1={"name":"hello world"}my_collection.add_record(client1)# adding a record to the collectiondb.save()# saving ( writes data to the file )DocumentationDatabase ( class )initmethod requires pass ( for encrypting and decrypting ),
optionally a dict full of collections,
and the path of the file ( where to store the content ).savemethod is saving the data in the file,
takes one positional argument for debuging purpose ( default value : True ).loadreturns a Database object. The arguments are path ( the path of the file ) and the decrypt_pass.
Throws FileNotFoundError err if the file doesn't exist and ( or ) InvalidFileExtensionError ( if the file extension doesn't match  the .pst ).bind_new_collectionbinds the collection to the database object ( for data persistence ). Takes a collection as Param.get_collectionreturns a collection object. Args : coll_name ( name of the collection ).get_collectionsreturns a dict with all the collections.Collectioninitmethod requires a name ( collect_name ),
and a list of the json records ( the data persisted ) which is optinal.add_recordmethod takes one positional argument which is the json obj that you want to store. Returns a boolean ( True,
if the transaction is OK, and false if it's not ok ).
Each object ispaddedwith the "_id" entry ( uuid generated string ).
You can add your own custom "_id" entry.delete_by_idmethod takes one positional param which is the id ( making a linear search ). Like theadd_recordmethod, it returns a boolean.find_by_idsame asdelete_by_id; returningdeep copyof the dict ( avoid mutability ) or else None.update_obj: takes two positional args : new_obj ( the obj to persist, must contain an "_id" entry , or else throwing an error ),
returning a bool.search_by: takes two positional args : slot_name which is the name of the entry you want ( for instance the "name" entry of,
each dict ) and the slot_value. Returns None if not found.get_all_slot: returns a list of all the entries.this lib supports multithreading queries by using synchronization.
Package: posmatch
posmatchPositional sub-pattern matching for custom classes.RequirementsPython 3.10 or higher.Installationpip install posmatchUsageThepos_matchdecoratorfromposmatchimportpos_match@pos_matchclassColor:def__init__(self,red,green,blue):self.red=redself.green=greenself.blue=bluecolor=Color(0,0,128)matchcolor:caseColor(r,g,b)ifr==g==b:print('Shade of grey')caseColor(0,0):print('Shade of blue')Output:Shade of blueThePosMatchMetametaclassfromposmatchimportPosMatchMetaclassDate(metaclass=PosMatchMeta):def__init__(self,year,month,day):self.year=yearself.month=monthself.day=daydate=Date(2121,1,1)matchdate:caseDate(_,m,d)ifm==5andd==1:print('May Day')caseDate(y)ify>2100:print('Distant future')Output:Distant futureThePosMatchMixinmix-in classfromposmatchimportPosMatchMixinclassRectangle(PosMatchMixin):def__init__(self,width,height):self.width=widthself.height=heightshape=Rectangle(16,16)matchshape:caseRectangle(w,h)ifw==h:print('Square')caseRectangle(x,y)ifx>y:print('Landscape')Output:Square
Package: posort
An algorithm to sort a collection by a sequence of comparators.ComparatorsA comparator takes two elementsaandband returns0- if they are equal
a positive number ifa > ba negative number ifa < bFor example the natural comparator on the integers isdef small_first(a, b):return a - bThe Pythonsortedfunction takes a comparator function as a keyword input>>> sorted([1, 5, 2, 4, 3], cmp=small_first)
[1, 2, 3, 4, 5]We may choose to sort by different criteria.  For example we might choose to
prefer even numbersdef evens_first(a, b):return a%2 - b%2>>> sorted([1, 5, 2, 4, 3], cmp=evens_first)
[4, 2, 5, 1, 3]Note in the example above that all of even numbers precede all of the odd numbers;evens_firstis satisfied.  Also note that there are several possible solutions.  In this case there are12possible solutions that all satisfy the comparator function.sortedreturns one at random.posortTo obtain the solution[2, 4, 1, 3, 5]where numbers are sorted first by evenness and then by magnitude we can use the functionposort.Theposortfunction attempts to satisfy a sequence of comparator functions of decreasing precedence.>>> posort([1, 5, 2, 4, 3], evens_first, small_first)
[2, 4, 1, 3, 5]The rule for even numbers dominates the rule for small numbers.  Any number of comparator functions can be specified.Equivalent structuresA comparator function completely specifies a
[partial order](http://en.wikipedia.org/wiki/Partial_order#Formal_definition).A comparator function can describe any
[directed acyclic graph (DAG)](http://en.wikipedia.org/wiki/Directed_acyclic_graph)Author[Matthew Rocklin](http://matthewrocklin.com)LicenseNew BSD license. See LICENSE.txtHistoryThis idea was originally developed for the
[Theano project](http://github.com/theano/theano)
Package: pospell
pospellpospellis a spellcheckers for po files containing reStructuredText.Pospell is part of poutils!Poutils(.poutils) is a metapackage to easily install useful Python tools to use with po files
andpospellis a part of it! Go check outPoutilsto discover the other tools!ExamplesBy giving files topospell:$ pospell --language fr about.po
about.po:47:Jr.
about.po:55:reStructuredText
about.po:55:Docutils
about.po:63:Fredrik
about.po:63:Lundh
about.po:75:language
about.po:75:librarieBy using a bash expansion (note that we do not put quotes around*.poto let bash do its expansion):$ pospell --language fr *.po
…By using a glob pattern (note that wedoput quotes around**/*.poto keep your shell from trying to expand it, we'll let Python do the
expansion:$ pospell --language fr --glob '**/*.po'
…Usageusage: pospell [-h] [-l LANGUAGE] [--glob GLOB] [--debug] [-p PERSONAL_DICT]
               [po_file [po_file ...]]

Check spelling in po files containing restructuredText.

positional arguments:
  po_file               Files to check, can optionally be mixed with --glob,
                        or not, use the one that fit your needs.

optional arguments:
  -h, --help            show this help message and exit
  -l LANGUAGE, --language LANGUAGE
                        Language to check, you'll have to install the
                        corresponding hunspell dictionary, on Debian see apt
                        list 'hunspell-*'.
  --glob GLOB           Provide a glob pattern, to be interpreted by pospell,
                        to find po files, like --glob '**/*.po'.
  --debug
  -p PERSONAL_DICT, --personal-dict PERSONAL_DICTA personal dict (the-poption) is simply a text file with one word
per line.ContributingYou can work in a venv, to install the project locally:python-mpipinstall.And to test it locally:python-mpipinstalltox
tox-pall
Package: pospider
👉项目官网：https://www.python-office.com/👈👉本开源项目的交流群👈📚简介pospider是python自动化办公的小工具的代码合集。📦安装🍊pip 自动下载&更新pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pospider -U📝功能📘官网：https://www.python-office.com/序号项目介绍代码地址1合同和财务系统源码2人脸门禁系统源码3商场管理系统源码4报表自动化 + 邮件自动发送源码5爬取招聘网站源码🏗️添砖加瓦📐PR的建议python-office欢迎任何人来添砖加瓦，贡献代码，建议提交的pr（pull request）符合一些规范，规范如下：参与项目建设的步骤：例如：你需要给python-office添加一个add方法。你的Github账户名为：demo于是你在./contributors新建了文件夹./demo新建了add.py文件，编辑你的代码编辑完成，提交pr到master分支（gitee或者GitHub，都可以）。可以注明你对自己功能的取名建议晚枫收到后，会对各位的代码进行测试后，合并后打包上传到python官方库📐代码规范注释完备，尤其每个新增的方法应按照Google Python文档规范标明方法说明、参数说明、返回值说明等信息，必要时请添加单元测试，如果愿意，也可以加上你的大名。python-office的文档，需要进行格式化。注意：只能格式化你自己的代码请直接pull request到master分支。master是主分支，表示已经发布pypi库的版本。未来参与人数增多，会开辟新的分支，请留意本文档的更新。我们如果关闭了你的issue或pr，请不要诧异，这是我们保持问题处理整洁的一种方式，你依旧可以继续讨论，当有讨论结果时我们会重新打开。🧬贡献代码的步骤在Gitee或者Github上fork项目到自己的repo把fork过去的项目也就是你的项目clone到你的本地修改代码commit后push到自己的库登录Gitee或Github在你首页可以看到一个 pull request 按钮，点击它，填写一些说明信息，然后提交到master分支即可。等待维护者合并🐞提供bug反馈或建议提交问题反馈时，请务必填写和python-office代码本身有关的问题，不进行有关python学习，甚至是个人练习的知识答疑和讨论。Github issue📌联系作者
Package: posql
数据库操作有风险，请谨慎对待！一旦出现问题，阴阳亦爱莫能助。切记，勿忘。importposqlmyconn=posql.mysql(passwd='Ycode01')myconn.select_table('default','test')""" 增myconn.sql(0).insert({'domain': 'www.baidu.com', 'position': 'start'})"""""" 删myconn.sql(0).where('`id` > 7').delete()"""""" 改myconn.sql(0).where('`id` = 7').update({'position': 'end'})"""""" 查results = myconn.select()print(results)""""""results = myconn.where('`id` = 1').sql(1).select()print(results)""""""results = myconn.order(field='id').limit(5).select()print(results)"""
Package: possabilities
possibilitiesDifficulties using sys.argv? possibility helps you! By Strawberry SoftwareWhat is possibilities?possibilities is a simple python framework to easily use sys.argv!How can I install possibilities?Simply just runpip install possabilitiesSee more atpypi.org/project/possabilitiesHow to use possibilities?frompossibilities.mainimportadd_possability,check,_Empty__defprint_help():print("Help")defprint_help_test():print("Help Test")defprint_help_test_project():print("Help Test Project")add_possability([[1,"help"],[2,_Empty__],print_help])add_possability([[1,"help"],[2,"test"],[3,_Empty__],print_help_test])add_possability([[1,"help"],[2,"test"],[3,"project"],print_help_test_project])check(errorfunc=False)
Package: posscore
POSSCOREOverviewPOSSCORE is an automatic evaluation metric, which is described in the paperPOSSCORE: A Simple Yet Effective Evaluation of Conversational Search with Part of Speech Labelling(CIKM 2021).If you find this repo useful, please cite:@article{liu2021posscore,
  title={POSSCORE: A Simple Yet Effective Evaluation of Conversational Search with Part of Speech Labelling},
  author={Liu, Zeyang and Zhou, Ke and Mao, Jiaxin and Wilson, Max L},
  journal={arXiv preprint arXiv:2109.03039},
  year={2021}
}InstallationPython version >= 3.6spaCy version >= 2.3Install spaCy with pip by:pipinstall-Upipsetuptoolswheel
pipinstall-Uspacy
python-mspacydownloaden_core_web_smThe more details about the installation of spaCy is shown inspaCy.Note: different versions of spaCy may influence the final posscore since the spaCy models may change in different versions. In the original paper, the version of spaCy we used is 2.3.Install from pypi with pip bypipinstallposscoreUsagePython Functionfromposscoreimportscorers=scorer.POSSCORE()# init POSSCOREs.get_posscore(str_reference,str_candidate)Example:fromposscoreimportscorers=scorer.POSSCORE()# init POSSCOREreference='i like sports , football , hockey , soccer i also find swimming interesting as well .'candidate='i like hockey and soccer . what teams do you support ?'print(s.get_posscore(reference,candidate))#output:0.528You can also customize the selected tag list:fromposscoreimportscorers=scorer.POSSCORE()# init POSSCOREpos_tag_set=['ADJ','ADV','VERB','PROPN','NOUN']s.get_posscore(str_reference,str_candidate,pos_tag_set)All the available POS tags in POSSCORE are introduced inUniversal POS tags.
Package: postal-address
Python module to parse, normalize and render postal addresses.Stable release:Development:Motivation« What ties us to territory is tax. »
– Kevin Deldycke, 2014-11-07The reason above is why we need fine-grained and meticulous territory
management and normalization. This project aims to solve this problem once for
all.Don’t get me wrong, this work is a huge undertaking. Postal address parsing,
normalization and rendering is hard. See the collection offalsehoods
programmers believe about postal addresses.This library is still in its early stages, but is good enough to implement
the new European Directives on VAT, which requires all e-commerce shops to
guess the locality of their EU customers depending on their billing address.
Package: postal-admin-client
postal-admin-clientA python 3.5+ admin client for the open source mail delivery platformpostal.This package is only for postal administrators
and do not include support for the message and send API.Postal currently don't have a proper HTTP API for administation
so we rely on faking a brower filling forms and dealing with
csrf tokens to make rails happy.This can for example be used to manage and create new organizations.This package can be installed from PyPIpipinstallpostal-admin-clientExampleInitalize client>>importpostal_admin_client>>>>client=postal_admin_client.Client(>>'https://postal.example.com',>>email='user@example.com',>>password='myhopefullysecurepassword',>>)List/create/delete organization>>client.list_organizations()[{'name':'Anansi Technologies','shortname':'at'},{'name':'Council of Venice','shortname':'cov'},{'name':'Orochi Group','shortname':'og'}]>>client.create_organization('Illuminati'){'name':'Illuminati','shortname':'il'}>>client.delete_organization('li')List and create/invite users>>client.list_users()[{'name':'Kirsten Geary','email':'kirsten.geary@illuminati.test'},{'name':'Alex McCall','email':'alex.mccall@illuminati.test'}]>>client.create_user('il','nadia.shestova@illuminati.test',admin=False)Supported OperationsList organizationsCreate organizationDelete organizationList users in organizationInvite user to organizationDev SetupBasic Setuppython-mvirtualenv.venv
..venv/bin/activate
pythonsetup.pydevelopTestspipinstall-rtests/requirements.txt
toxImprovementsProperly parse out validation errors. For example:create_userraisesHTTPError(422)in three different cases and it would be useful
for the user to easily be able to separate between them.Add CLI supportSupport more operationsLoggingThis package is usinglogging. You can configure logging behaviour
(handler, log level, propagation etc) by obtaining the logger for this package.logger=logging.getLogger('postal_admin_client')ContributingDo not hesistate creating pull requests with completed or
partial work or create issues. There are very likely many
things to improve.
Package: postalcodes-mexico
Postalcodes MexicoDetermines large parts of a Mexican postal address from its postal code (C.P.).Free software: MIT licenseDocumentation:https://postalcodes-mexico.readthedocs.io.FeaturesPostalcods mexico provides a functionplacesthat returns a list of named tuples with all places in Mexico that share the given postal code.ReferenceThe data used in this package comes from the official website of theMexican Postal Service(Correos Mexico). On the download page of thecatalogue of postal codesit is stated that this data is not to be commercialized:El Catálogo Nacional de Códigos Postales, es elaborado por el Servicio Postal Mexicano y se proporciona en forma gratuita, no estando permitida su comercialización, total o parcial.http://www.correosdemexico.gob.mx/lservicios/servicios/CodigoPostal_Exportar.aspxCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.4.1 (2018-03-23)Update postal code database to latest information from www.correosdemexico.gob.mx/lservicios/servicios/CodigoPostal_Exportar.aspxImprove documentation on how to update the database0.4.0 (2018-03-20)Re-add utility functions for updating the databaseImprove test suiteConfigure pytest test runnerImprove documentation0.3.0 (2018-03-16)Add command line interface0.2.1 (2018-03-16)Re-package everything following the 2Scoops courseCreating and Distributing Python Packages.0.2.0 (2017-04-15)4-digit codes return places if exist.0.1.5 (2017-04-06)First release on PyPI.
Package: postalcodes-nepal
postalcodes-nepalpostalcodes-nepal is a python package that helps you to work with postal codes (Zip codes) of Nepal.
Some of the functionality currently supported by postalcodes-nepal are:Query for the postal code of any city of Nepal.Check wheather a postal code is valid code of Nepal.Find the post office information based on city or postal code.Find postal codes of all post office within a district.Find postal codes of all post office of NepalInstallationRun the following to install:$pipinstallpostalcodes-nepalUsageSome simple usecases of postalcodes-nepalfrompostalcodes_nepal.postalcodesimport*#Validate postal code. Checks if the postal code is valid and return True or False accordingly.validate(44660)#Find the postal code of particular city. Returns postal code or if the query didnot match any city returns None.postal_code('Kathmandu')#Returns the post office informtion of the city ie. District, Post Office, Postal Code and Post Office Type. Returns None if data doesnot match.city_po_info('Kathmandu')#Returns the city of the provided postal code. Returns None if data doesnot match.postalcode_to_city(44600)#Returns the post office information of the postal code.  Returns None if data doesnot match.`postalcode_info(44600)#Returns the city and postal codes of all post office of a district. Returns None if query doesnot match.district_data('Jhapa')#Returns the city and postal codes of all post offices of Nepal.country_data()OR you can alternatively import as follows:frompostalcodes_nepalimportpostalcodespostalcodes.validate(44600)#OR import individuallyfrompostalcodes_nepal.postalcodesimportvalidatevalidate(44600)LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsLinksPackage home - PyPiSource
Package: postalcodes-ni
postalcodes-niPython package for handle Nicaragua postal codesQuickstartInstallpostalcodes-ni:$ pip install postalcodes-niThen use it in your project:frompostalcodes_niimport(get_all_municipalities_by_iso,get_all_municipalities_by_postal,get_municipality_by_name,get_municipality_by_postal)You can find the documentation inhttps://postalcodes-ni.readthedocs.ioThis package uses data from those websites:ISO 3166-2:NIPostal CodesUsagepostalcodes_niexposes the following methods:get_all_municipalities_by_isofor get all the municipalities in a department using the ISO code - ExMNforManaguadepartment.get_all_municipalities_by_postalfor get all the municipalities in a department using the postal code - Ex10000forManaguadepartment.get_municipality_by_namefor get an specific municipality using his name - ExAltagraciafor theRivasdepartment.get_municipality_by_postalfor get an specific municipality using his postal code - Ex48800for the municipality ofAltagraciafromRivasdepartment.ExampleFirst, you need import the methods that you want to usefrompostalcodes_niimport(get_all_municipalities_by_iso,get_all_municipalities_by_postal,get_municipality_by_name,get_municipality_by_postal)For get all the municipalities in a department use the following methods>>># Get all the municipalities in Carazo department using iso code>>>get_all_municipalities_by_iso('CA')[('Jinotepe',45000),('Dolores',46100),('El Rosario',46200),...]>>># Get all the municipalities in Carazo department using postal code>>>get_all_municipalities_by_postal(45000)[('Jinotepe',45000),('Dolores',46100),('El Rosario',46200),...]For get an specific municipality in a department use the following methods>>># Get a municipality using his name>>>get_municipality_by_name('nindiri')('Nindirí',42200)>>># Get a municipality using his postal code>>>get_municipality_by_postal(42500)('Catarina',42500)Running TestsDoes the code actually work?$ source env/bin/activate
(env) $ pip install -r requirements_dev.txt
(env) $ make test-allHistory1.0.0 (2019-03-27)First release on PyPI.
Package: postat
Python wrapper for Austrian Post web servicesThis is a Python wrapper for web services provided byAustrian Post.Currently, it only supports looking up shipment details by tracking number.Groundwork for services requiring authentication is laid out, but not working
yet. If you want to contribute, please feel free to do so.Installationpipinstallgit+https://kumig.it/kumitterer/postat.gitUsagefrompostat.classes.apiimportPostAPIapi=PostAPI()# Get shipment detailsshipment_details=api.get_shipment_details("123456789012345678901234567890")shipment=shipment["data"]["einzelsendung"]# Get latest eventlatest_event=shipment["sendungsEvents"][-1]LicenseThis project is licensed under the MIT License. SeeLICENSEfor details.
Package: postbode-python
postbode-pythonA Postbode API wrapper for Python.www.postbode.nuis a Dutch web application for digitally sending and receiving postal mail and automation of postal services. This package is a set of python wrappers build around the API of this services.Getting startedFor starters you will need a account and a api token.Account creationGo tohttp://app.postbode.nuand follow registration proces.API tokenAfter registration go to personal settings -> API and request a token.Sandbox modeFor testing the api it is usefull to set the mailbox in sandbox mode. A dev mode sort of speak that will prefent any request to be send to production.further readinghttp://api.postbode.nufor more information about the letter and mailbox optionsNow you are set to go.ExamplesInstantiate and authenticate with the clientfrompostbode.clientimportClientclient=Client('YOUR_API_TOKEN')Get available mailboxesfrompostbode.clientimportClientclient.get_mailboxes()Get letters of mailboxclient.get_letters('MAILBOX_ID')Send letterfrompostbode.clientimportClientclient.send_letter('MAILBOX_ID','Filename','./file.pdf','NL',False,'FC','simplex','inkjet',True)Send lettersletters=('./letter1.pdf','./letter2.pdf','./letter3.pdf')client.send_letters(2522,2,'NL',False,'FC','simplex','inkjet',True,*letters)
Package: postbot
PostBotA simple tool to make posts on Instagram programmaticallyInstallationpip install postbotorpip3 install postbotDescriptionThis tool provides capabilities to make posts on instagram according to content stored in a database
and a defined time interval.For example, let's suppose that you already have many images which you
want to post and its corresponding caption text and tags. And you are planning
to post them on Instagram one each day. So you can store this information in a database
andPostBotautomates this task in a few lines of code:from postbot import PostBotdef quickstart():# 1 - Create an instance of PostBotpost_bot = PostBot(geckodriver_path=r'/home/you/drivers/geckodriver',username='my_ig_account@mail.com',password='my_password',mysql_host='localhost',mysql_database='posts_db',mysql_username='postman',mysql_password='post_db_pass',mysql_posts_table='posts_table',mysql_img_path_column='post_img_path',mysql_caption_txt_column='post_txt')# 2 - Login to Instagrampost_bot.login()# 3 - Start posting# This function makes a post every amount of minutes specified (1 day = 1440 minutes)minutes_in_a_day = 1440post_bot.start_posting(minutes_in_a_day)post_bot.quit()That's it! The bot will run till all posts have been posted.Take into consideration that the database table that has the posts needs a'posted'column
of type boolean with default value offalse. This is used by thePostBotto keep track of the posted posts
and the pending ones.Disclaimer: Please note that this is a research project. The owner and contributor/s of this project are by
no means neither responsible for any usage of this tool nor responsible if your account gets banned due to the extensive
use of this tool. Use it at your own risk.
Package: postboy
Simple distributed emailing system.Usually websites send emails directly in a request.
Sometime I tried to use as emailing daemon “ssmtp”.
I was shocked when I tried to send ten mails from django.
This was about half a minute (about 3 seconds per letter), and my request was processed long.This system will be save your response time because your letters will be added to queue and delivered as soon as possible.
If you have more then one server, you will have load balancing and guarantee of delivering for your mailings.For working the Postboy needed running and configure RabbitMQ AMQP daemon.
This may used as cluster or single server instance.
For delivering will be used any localhost MTA.InstallationQuick installation the system in the Ubuntu serverhttps://github.com/mosquito/postboy/wiki/Installation.UsingThen try to use it in your code:>>> from postboy import Email, BrokerHandler
>>> broker = BrokerHandler()
>>> email = Email(sender='info@test.name', recipient='user@localhost', subject='Test')
>>> broker.store(email.dumps())
1 # <= return task id