Saravanan666/pypi-org huggingface dataset:
Package: contentful-rich-text-to-markdown-converter
Contentful Rich Text To Markdown ConverterThis module converts Contentful Rich Text objects to Markdown. It is a python wrapper for a node modulecontentful-rich-text-to-markdownInstallationpipinstallcontentful-rich-text-to-markdown-converterUsageimportcontentfulfromcontentful_rich_text_to_markdown_converterimportconvert_rich_text_to_markdown# Connect to Contentful APIclient=contentful.Client('<your_contentful_space_id>',' <your_contentful_access_token>')# Get a rich text field from from your contentful spacerich_text=client.entry('<your_entry_id>').rich_text_field# Convert rich text to markdownmarkdown=convert_rich_text_to_markdown(test_rich_text)
Package: contentful-webhook-receiver
A Django package to receive Webhooks from Contentful as signalsDocumentationThe full documentation is athttps://contentful-webhook-receiver.readthedocs.io.QuickstartInstall Contentful Webhook Receiver:pip install contentful-webhook-receiverAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'contentful_webhook_receiver.apps.ContentfulWebhookReceiverConfig',...)Add Contentful Webhook Receiver’s URL patterns:fromcontentful_webhook_receiverimporturlsascontentful_webhook_receiver_urlsurlpatterns=[...path(r'^',include(contentful_webhook_receiver_urls)),...]Listen for the Contentful Webhook Receiver signal:@receiver(contentful_publish_entry)defentry_published(sender,instance:WebhookInvocation,**kwargs):print(instance.data['sys']['content_type']['id'])Register a Webhook on Contentful:The path added to the urlpatterns iscontentful-webhook/.
If you’re adding it to the root url configuration the path will behttps://example.com/contentful-webook/FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.5.0 (2023-12-07)Add Django 5.0 compatibilityAdd Python 3.12 compatibility0.4.0 (2022-12-21)Deprecate Django 3.1 compatibilityAdd option to not log contentful webhook invocations with theLOG_CONTENTFUL_WEBHOOKSsetting0.3.0 (2022-06-04)Add Django 4.0 compatibility0.2.0 (2021-02-16)Change receiver url from hook/ to contentful-webhook/0.1.0 (2021-02-15)First release on PyPI.
Package: contentlet
Contentlet is a framework for creating composable and reusable web UI. It is
modeled afterzope.contentproviderandzope.viewletbut more simple and easy to use.
Also, it is for using withrepoze.bfg.For more documentation please go tohttp://packages.python.org/contentlet. And if you like to fork repository —http://github.com/andreypopp/contentlet.0.1.1Fixed missed import ofContentletConfiguratorMixin.0.1Implementation of content provider pattern (zope.contentprovider).Imperative API for configuration.
Package: content-links
Content linksContent links is aFeinCMScontent typeapp which allows you to link other
FeinCMS pages, or external URLs, to specific page within your website.InstallationInstall it bypip install content-linksAddcontent_linksto yourINSTALLED_APPSin settings.pyINSTALLED_APPS = (‘awesome_app’,‘content_links’,‘django_stuff_etc’,)Register the app for FeinCMS in models.pyfrom feincms.module.page.models import Pagefrom content_links.models import ContentLinkPage.create_content_type(ContentLink, TYPE_CHOICES=((‘one’, ‘One’),(‘two’, ‘Two’),
))Synchronize database by runningpython manage.py syncdb –allVisitadmin paneland have fun!
Package: contentmap
Content mapA way to share content from a specific domain using SQLite as an alternative to
RSS feeds. The purpose of this library is to simply create a dataset for all the
content on your website, using the XML sitemap as a starting point.InstallationpipinstallcontentmapQuickstartTo build your contentmap.db that will contain all your content using your XML
sitemap as a starting point, you only need to write the following:fromcontentmap.sitemapimportSitemapToContentDatabasedatabase=SitemapToContentDatabase("https://yourblog.com/sitemap.xml")database.load()You can control how many urls can be crawled concurrently and also set some timeout.
Package: contentmatcher
# contentmatcher
A pattern-based content matcher for Python programs##### Current state: Under development (alpha)It provides:Match ratios based on amount of pattern that was matchedFast method for first-pass match
* Allows filtering out patterns that are unlikely to match
* More thorough matching can be performed with patterns that are more likely to match, reducing time requirementsOriginal use case:matching a list of function names from a backtrace to known patternsInstallation:pip install contentmatcherTested for Python >=3.6.5 on Linux (Ubuntu) and Windows 7/10
Package: content-negotiation
content-negotiationA small Python library supporting content-negotiation.It is used to decide content type based on a list of media ranges in the accept header, as well as deciding content-language based on the accept-language header.Media ranges/language ranges with a q-value of 0.0 will be ignored.Q-values above 1.0 will be treated as 1.0. Q-values below 0.0 will be treated as 0.0.When a media range is not specified, it will be treated as*/*.When a language range is not specified, it will be treated as*.When media ranges and language ranges are equal, the first one will be returned.For more information on the accept header, seeRFC 7231, section-5.3.2.
For more information on the accept-language header, seeRFC 7231, section-5.3.5UsageInstall%pipinstallcontent-negotiationGetting startedContent typefromcontent_negotiationimportdecide_content_type,NoAgreeableContentTypeErroraccept_headers=["application/json","text/html","text/plain, text/*;q=0.8"]supported_content_types=["text/turtle","application/json"]try:content_type=decide_content_type(accept_headers,supported_content_types)exceptNoAgreeableContentTypeError:print("No agreeable content type found.")# Handle error, by returning e.g. 406 Not AcceptableContent languagefromcontent_negotiationimportdecide_content_language,NoAgreeableContentLanguageErroraccept_language_headers=["en-GB;q=0.8","nb-NO;q=0.9"]supported_languages=["en-GB","en","nb-NO","nb","en-US"]try:content_language=decide_decide_language(accept_language_headers,supported_languages)exceptNoAgreeableLanguageError:print("No agreeable language found.")# Handle error, by returning e.g. 406 Not AcceptableDevelopmentRequirementspyenv(recommended)python3pipx(recommended)poetry# version v1.2.0 or highernox%pipxinstallpoetry==1.2.0
%pipxinstallnox==2022.8.7
%pipxinjectnoxnox-poetry==1.0.1Install developer tools%gitclonehttps://github.com/Informasjonsforvaltning/content-negotiation.git
%cdcontent-negotiation
%pyenvinstall3.8.13
%pyenvinstall3.9.13
%pyenvinstall3.10.6
%pyenvlocal3.8.133.9.133.10.6
%poetryinstallRun all sessions%noxRun all tests with coverage reporting%nox-rstestsDebuggingYou can enter intoPdbby passing--pdbto pytest:%nox-rstests----pdb--log-cli-level=DEBUGYou can set breakpoints directly in code by using the functionbreakpoint().
Package: contentrules.slack
contentrules.slackcontentrules.slackis a package providing aPlonecontent rules action to post a message on Slack.InstallationThis package supports Plone sites using Volto and ClassicUI.For proper Volto support, the requirements are:plone.restapi >= 8.34.0Volto >= 16.10.0Addcontentrules.slackto the Plone installation usingpip:pipinstallcontentrules.slackor add it as a dependency on your package'ssetup.pyinstall_requires=["contentrules.slack","Plone","plone.restapi","setuptools",],Start Plone and go to theContent RulesControl Panel.No additional configuration is needed for Volto support.Source Code and ContributionsIf you want to help with the development (improvement, update, bug-fixing, ...) ofcontentrules.slackthis is a great idea!Issue TrackerSource CodeDocumentationWe appreciate any contribution and if a release is needed to be done on PyPI, please just contact one of us.DevelopmentYou need a workingpythonenvironment (system,virtualenv,pyenv, etc) version 3.8 or superior.Then install the dependencies and a development instance using:makebuildTo run tests for this package:
By default, we use the latest Plone version in the6.xseries.TranslationsThis product has been translated into:English (Érico Andrei)Português do Brasil (Rudá Porto)Deutsch (Yael Biran)Español (Álvaro Hurtado Mochón)LicenseThe project is licensed under GPLv2.One Last ThingOriginally Made in Berlin, with love, by your friends @ Briefy and Pendect.Now maintained by thePlone CollectiveContributorsÉrico Andrei, @ericofRudá Porto, @rudaportoÁlvaro Hurtado Mochón, @alvarohurtado84Yael BiranChangelog2.0.2 (2023-04-04)Userequestsinstead ofhttpx, as the former is already distributed with Plone.
[ericof]Update Sphinx theme used in the documentation
[ericof]2.0.1 (2023-03-10)Usepytest_plone[ericof]Deploy documentation tohttps://collective.github.io/contentrules.slack[ericof]2.0.0 (2023-02-07)Usepytestinstead ofunittest[ericof]Drop dependency onftw.slacker[ericof]Drop support to Plone 5.2
[ericof]Support to Plone 6.0, Python 3.8 to 2.11
[ericof]Update documentation
[ericof]1.0.1 (2020-04-25)Fix "TypeError: expected string or bytes-like object" when one attribute of action is not set.
[ericof]1.0.0 (2019-11-28)Add Plone 5.2 / Python 3 support.
[ericof]Drop Python 2.7 support.
[ericof]1.0.0a1 (2017-10-17)Initial release.
[ericof]
Package: contenttype
Parse Content-Type HeadersPython package for parsing Content-Type HTTP headersUsagefromcontenttypeimportContentTyperesult=ContentType.parse('application/rss+xml; charset=utf-8')result.type# => 'application'result.subtype# => 'rss'result.suffix# => 'xml'result.parameters# => {'charset': 'utf-8'}result.charset# => 'utf-8'
Package: contenttypes.basic
This addon provides the common content-types. fields, widgets and behaviors.FeaturesPermissionsIndexersBehaviorsFieldsContent-typesAnnouncementBannerIconSlideWidgetsColourIconMapTranslationsThis product has been translated intoCatalanSpanishEnglishInstallationInstall contenttypes.basic by adding it to your buildout:[buildout]

...

eggs =
    contenttypes.basicand then runningbin/buildoutClassifiersFrameworkPlone 5.2Programming LanguagePython 3.6Python 3.7LicenseThe project is licensed under the GPLv2.Contributorscsanahuja,csanahuja10@gmail.comChangelog2.0 (27/03/2023)Drop support Python < 3.8. [csanahuja]Update widgets to Boostrap 5 and Plone 6 [csanahuja]Update dependencies [csanahuja]1.7 (17/03/2023)New features:Add new OSMap widget with advanced features
[abosch]1.6.7 (11/11/2022)Fixes:Fix icon widget display
[caguilo]1.6.6 (06/05/2022)Fixes:Fix colour widget display template when multiple widgets
[csanahuja]1.6.5 (07/04/2022)Fixes:Fix icon widget on datagrid fields
[csanahuja]1.6.4 (11/11/2020)Fixes:Fix all widgets for Plone 5.2.2
[csanahuja]1.6.3 (11/11/2020)Fixes:Fix osmap widget for Plone 5.2.2
[csanahuja]1.6.2 (10/01/2020)New features:Add attribute on icon_input.pt script so we can keep it with diazo
[csanahuja]1.6.1 (13/12/2019)Fixes:Fix missing/wrong translations
[csanahuja]1.6 (03/12/2019)New features:Modified OSMap widget so we use require to load leaflet
[csanahuja]Fixes:Fix OSMap widget when using plone modal
[csanahuja]1.5 (05/11/2019)Fixes:Fix IOSMapBehavior wrong parent class
[csanahuja]1.4 (10/10/2019)New features:Add default view for each contenttype
[csanahuja]Fixes:Fix coordinates controlpanel previously with wrong prefix
[csanahuja]1.3.1 (09/10/2019)Improved coverage
[csanahuja]1.3 (08/10/2019)New features:Add coordinates controlpanel and profile to install
[csanahuja]Added converter to osmap widget
[csanahuja]Fixes:Minor fixes and translations
[csanahuja]1.2 (07/10/2019)New features:Make link not reaquired
[csanahuja]Added new default view to content-types to avoid failing when no link
[csanahuja]Fixes:Correct typo in all behaviors name registration
[csanahuja]1.1 (18/09/2019)New features:Added field and widget for osmap
[csanahuja]1.0 (08/08/2019)New features:Initial release.
[csanahuja]Added content types: Banner, Slider, Icon, Announcement
[csanahuja]Added fields and widgets for icons and colour
[csanahuja]Added behaviors
[csanahuja]1.0a1 (unreleased)Initial release.
[csanahuja]
Package: conterm
ContermConterm is a simple to use terminal interaction library.
This includes:conterm.controlKeyboard inputMouse inputTerminal actions like moving the cursor, deleting lines, etc...conterm.prettyPretty printing python objectsSimple inline markup for stringsAnsi sequence strippingconterm.loggingSimple thread safe loggingconterm.cliPrompts: includes yes/no prompts, hidden password prompts, and normal input promptsRadio Select: List of options are displayed and the user can select one of many options.Multi Select: List of options are displayed and the user can select multiple of many options.Task Manager: This is a thread safe object that prints and updates a region in the terminal over time. When it is active no other printing to stdout should occur. The task manager lets you add messages, spinners, and progress bars with intuitive ways of updating progress over time.With all the above features in mind, make sure to check out theexamplesto see the different
features in action.note: This library is experimental and a work in progress. Any and all feedback is welcome.MarkupThis should be an easy to use familiar syntax.b,i,u,sequal bold, italic, underline and strikethrough respectively.~<url>represents a hyperlink.<,^,>represent left, center and right align respectively as long as a total width is also provided. Additionally, conterm allows the user to define their own macros that can either generate text or modify text. The custom macros are called outright like builtin macros which allows for macro overloading. There can be multiple macros per block seperated by a space and each macro is persistant until they are closed with a/. All system colors are supported by name. There is also hex, xterm, and rgb support. By default the color is for the foreground, but if it is prefixed with@it will be applied to the background.Examples[b i]Bold italic[/b] just italic [/i] normal text[u s]Underlined and strikethrough[/] normal text[^30]30 char center aligned[<70%]Closes previous alignment and starts this one
[^full]Can use percentages and full keyword; full == 100%[~http://example.com]Example Url [~http://example.com]Another url[/~][red]Red text [@white] now with white background[/fg /bg]

[#f32]Red text [@243] grey background[/]

[100,15,100]RGB colored text[/]
Package: contessa
Hello, welcome to Contessa!Contessa is aData Qualitylibrary that provides you an easy way to define, execute and
store quality rules for your data.Instead of writing a lot of sql queries that look almost exactly the same, we’re aiming for more
pragmatic approach - define rules programatically. This enables much more flexibility for the user and also for us as the creators of the lib.We implement new Rules (incrementally) that should reflect Data Quality domain. From the start these are simple
rules like - NOT_NULL, GT (greater than) etc. We want to build on these simple rules and provide more complex Data Quality checkers out-of-the-box.Goals:be database agnostic (to a reasonable degree), so you will define checks against any database (e.g. mysql vs. postgres) in the same wayautomatize data quality results e.g. from postgres table to Datadog dashboardprogrammatic approach to data-quality definition, which leads to:dynamic composition of rules in a simple script using db or any 3rd party tool - e.g. take all tables, create NOT_NULl rule for all of them for each integer columnusers can use special rules for data if needed, if not, they can go with generic solutionsautomatizable testable parts of definitions when neededeasier maintenance when number of checks scales too fast :)Full docs herehttps://contessa.readthedocs.io/en/latest
Package: contester-cm
Структураtests/        - каталог с тестами для задачи
checker.cpp   - чекер
info.ini      - информация о задаче
statement.md  - описание условия задачиСоздание задачиВ произвольном каталоге выполнить команду:contester-cm create problemгдеproblem- название новой задачи. Если в текущей директории уже есть каталог с именемproblem, то задача создана не будет.В файлеstatement.mdуказывается описание задачи с тестовыми примерами. В файлеinfo.iniуказывается мета-информация информация о задаче, название, тема, раздел и т.п.ТестыПо умолчанию добавлена одна пара тестовых файлов (1и1.a) в качестве примера.Могут быть ситуации, когда нет необходимости добавлять файлы*.a, поскольку чекер может сам проверять правильность решения. В таком случае эти файлы можно удалить.Добавление (удаление) тестовДобавитьnтестов в задачуproblem:contester-cm addtests problem nУдалить все тесты из задачиproblem:contester-cm deltests problemСборкаДля системы Contester 2.4 требуются zip-файлы задач. Чтобы собрать zip-файл для задачиproblemнеобходимо выполнить команду в директории с каталогом задачи:contester-cm build problemЧтобы собрать все задачи в данной директории, нужно выполнить:contester-cm build *
Package: context-aware-chunker
Context Aware ChunkerWhen performing semantic search using vector similarity, one of the key issues that arises is the size of the chunk you are using.The size of the chunk affects a lot of things, including the accuracy of your result, the amount of contextual information retained at inference time, and accuracy of retrieval.One of the easiest ways to boost accuracy is to retain highly correlated information in a single atomic chunk as opposed to creating multiple, since this might be missed when performing semantic search.How does this package work?The idea is quite simple. Language models are extremely good at knowing when two pieces of text belong together.When they do, the perplexity remains low, but when they aren't, the perplexity is much higher.Based on this, we can merge two groups of text together, creating the perfect chunk of highly correlated informationUsageWARNING: Please note that this is an alpha release and is only suitable for testing, not for productionInstallationpip install context_aware_chunkingPython Codetext="<INSERT TEXT HERE>"fromcontext_aware_chunker.chunking_modelsimportT5ChunkerModelfromcontext_aware_chunker.text_splitterimportSentenceSplitter#This module will help you in finding relevant sentences from unstructured textsplitter=SentenceSplitter()'''Responsible for determining which sentence segments to merge or separateIf you have more GPU power you can try using larger models'''chunking_agent=T5ChunkerModel('t5-small')'''Here, merge_sentences decides how many sentences will be in one split of the sentencesDefault is 1, you can increase and see'''split_content=splitter.split_text(text,merge_sentences=1)chunks=chunking_agent.chunk(split_content)forchunkinchunks:print(chunk)
Package: contextcache
contextcacheCache a python functiononly in certain contexts.UsageHere's an example:catexample.pyimportcontextcache# Define a private CacheContextVar to store the cached values. Don't touch this CacheContextVar from anywhere else!# You need to define a separate CacheContextVar for every function for which you want to enable caching.# Use `None` as the default._double_cache=contextcache.CacheContextVar("double_cache",default=None)# Use the `enable_caching` decorator to enable context caching for `double`.@contextcache.enable_caching(_double_cache)defdouble(n:int)->int:print(f"Doubling{n}, working...")returnn*2# Without caching.print(f"Without caching")print(double(1))print(double(1))# With caching.withcontextcache.use_caching(double):print(f"\nWith caching")print(double(1))print(double(1))# Without caching, again.print(f"\nWithout caching, again")print(double(1))print(double(1))Here's the output:pythonexample.pyWithout caching
Doubling 1, working...
2
Doubling 1, working...
2

With caching
Doubling 1, working...
2
2

Without caching, again
Doubling 1, working...
2
Doubling 1, working...
2See the tests for further examples.CaveatsFunction arguments must be hashable.
Package: context-compose
context_composePython utility library to compose context managers (3.6+)MotivationWhen you want to use a dynamic combination of context managers together, and the builtin ways are too ugly or inflexible.Turn this:importosif__name__=="__main__":ifos.environ.get("DEBUG")andos.environ.get("PROFILE":withdebugger(),profile():main()elifos.environ.get("DEBUG"):withdebugger():main()elifos.environ.get("DEBUG"):withdebugger():main()Into this:importosfromcontext_composeimportcompose,impotent_managerif__name__=="__main__":managers=[debugger()ifos.environ.get("DEBUG")elseimpotent_manager(),profile()ifos.environ.get("PROFILE")elseimpotent_manager(),]withcompose(managers):main()impotent_manageris a useful substitute when your code has awithblock, you'd rather keep to a single pattern so a context managermustbe provided to it.How it worksUnder the hood it usescontextlib.ExitStackto layer context managers in list order.
Package: context-converter
Convert and Format HTML to MarkdownTable of Contents:DescriptionProblem to SolveQuick Start | Getting StartedConfigurationDescriptionExtracts HTML content from a JSON file to produce a Markdown file. Leverages similarity threshold to remove redundant content.Problem to SolveBuilding retrieval augmented generation AI applications can be a lengthy process. While there are web crawlers to collect content, the post processing of this content is equally important for accurate and helpful generation.This library was built specifically to augment thecontext-curatorproject by further automating the document creation process.Quick Start | Getting StartedInstallationTo have access to the package in your local environment, clone the repository usinggit:git clone https://github.com/daethyra/context-converter.gitTo install via pip, run:pip install context-converterOptional: Runjina_embeddings.pyto preemptively download the embeddings model.Navigate into thecontext-converterfolder:cd context-converterPlace a JSON file of HTML content into the same folder.Runpython3 main.pyYour output file will be created in the same folder.ConfigurationYou can tweak the similarity threshold and more to help yourself curate what you want.i. Inmain.py, you can set the following parameters to optimize your results:main.pychunk_size: The size of the chunk to be processed. The default value is 256.You can find speed testshere.ii. Inconverter.py, you can set the following parameters to optimize your results:converter.pysimilarity.item(): The similarity threshold. The default value is 0.868899. Only similarity values above the threshold are removed, meaning a higher threshold removeslesscontent. A lower threshold removesmorecontent.batch_size: Proccess embeddings for the given lines using batch processing. The default value is 16, which has proved to be faster than higher values, up to 256.Speed test results.LicenseMIT
Package: contextcrunch
ContextCrunch Python ClientUse theContextCrunch APIeasily with python!PrerequsitesYou need an API key fromhttps://contextcrunch.com/console/keysInstall contextcrunch withpip install contextcrunchQuick StartfromcontextcrunchimportContextCrunchClientclient=ContextCrunchClient('API_KEY_HERE')compressed=client.compress(context=['compress this text'],prompt='last message',compression_ratio=0.95)print(f'Although this text is too short to compress, we can see the API works!{compressed}')Uploading to PyPipython3-mbuild
python3-mtwineuploaddist/*Username:__token__