Saravanan666/pypi-org huggingface dataset:
Package: templated
TemplatedTemplated provides a painless experience for developers looking to build semantic templated functions. With Templated, you can easily define a function with a Jinja2 template string, and use it to generate outputs with dynamic data passed as function arguments.InstallationTemplated can be installed via pip:pipinstalltemplatedUsageHere is an example of how to use Templated:fromtemplatedimportFunctionf=Function("Hello, {{name}}!")result=f(name="world")print(result)The output of the above code will be:Hello, world!In this example, we have defined a functionfwith a Jinja2 template string"Hello, {{name}}!". We then called this function with an argumentname="world", which filled in the{{name}}placeholder in the template, resulting in the output"Hello, world!".Stateful Template ArgumentsIn Templated, you can also define stateful template arguments. Here is an example:f=Function("{{greeting}}, {{name}}!")f(greeting="Hello")f(name="world")# Output: "Hello, world!"f(greeting="Goodbye")f()# Output: "Goodbye, world!"In this example, we have defined a functionfwith a Jinja2 template string"{{greeting}}, {{name}}!". We then called this function with an argumentgreeting="Hello", which filled in the{{greeting}}placeholder in the template. We then called the function again with an argumentname="world", which filled in the{{name}}placeholder in the template, resulting in the output"Hello, world!".We then called the function again with a different value for thegreetingargument,"Goodbye". We did not pass a value for thenameargument, so it retained its previous value of"world". This resulted in the output"Goodbye, world!".Custom Language ModelsIn Templated, you can also use custom language models for generating output from templates. Here is an example:fromlangchain.chat_modelsimportChatOpenAIfromtemplated._utils.chat2vanilla_lmimportChat2VanillaLMfromtemplated.functionimportFunctionLLMChatOpenAI=Chat2VanillaLM(ChatOpenAI)f=Function("Hello, {{name}}!",llm=LLMChatOpenAI)result=f(name="world")print(result)In this example, we have defined a custom language modelLLMChatOpenAIthat wraps aChatOpenAIlanguage model. We then defined a functionfwith a Jinja2 template string"Hello, {{name}}!", and passed our custom language model as thellmargument to theFunctionconstructor.ContributingWe welcome contributions to Templated! Please refer to thecontributing guidelinesfor more information.Testspoetryrunpy.test--doctest-modulesLicenseTemplated is licensed under ourModified MIT License.
Package: template-data-project
Project OverviewThis repository is a structured template for organizing a data engineering project. The project is divided into various folders to facilitate effective management of project assets, resources, and code. Below is an overview of the project's folder structureFolder StructureProject Root Folder: The top-level folder for the entire data engineering project.Documentation: Contains all project-related documentation, including design documents, project plans, and README files.Source Code: Houses all the code related to data extraction, transformation, loading (ETL), data processing, and data infrastructure.ETL Scripts: Subfolder for ETL scripts and code.Data Processing: Subfolder for data processing scripts and code.Infrastructure as Code (IaC): If using cloud services like AWS, Azure, or Google Cloud, store Infrastructure as Code templates (e.g., Terraform or CloudFormation) here.Data: Contains all the data used by the project.Raw Data: Stores raw, unprocessed data from various sources.Processed Data: Holds cleaned, transformed, and structured data ready for analysis.Configurations: Stores configuration files for various components of the project, such as database connection strings, ETL job parameters, and API keys.Testing: Includes test scripts and data used for testing ETL processes and data quality.Logs: Stores log files generated by ETL processes, data pipelines, and system components.Reports and Visualizations: Contains reports, dashboards, and visualizations created from the processed data.Libraries and Dependencies: Houses libraries and dependencies required for running the project's code.Infrastructure: If you're managing the infrastructure, include subfolders for cloud service configurations, server configurations, and networking configurations.Environments: Subfolders for different environments like "Development," "Staging," and "Production" if you have separate environments for your project.Utilities: Include any utility scripts or tools used for project management, data validation, or monitoring.Archives: Store backups, historical data, or archived project versions.README Files: Each subfolder may contain a README file explaining its contents and usage.Tests and Test Data: If you have specific folders for automated testing or test data, include them here.**Docker **: If using Docker containers, you may have a folder for Dockerfiles and related configuration files.**CI/CD **: If you have a continuous integration/continuous deployment pipeline, include relevant configuration and scripts here.Getting Startedfromtemplate_data_projectimportproject_structureproject_structure.template(root_dir)LicenseThis project is licensed under theMIT License.AcknowledgmentsThis project structure template is provided as a starting point for organizing data engineering projects effectively.Build packagehttps://packaging.python.org/en/latest/tutorials/packaging-projects/
Package: templateddocs
Generate templated documents within Django in any format supported by
LibreOffice: texts, spreadsheets, presentations etc.Free software: MIT licenseDocumentation:https://templated-docs.readthedocs.io.RequirementsPython 2.7 or 3.4+Django >= 1.8A recent LibreOffice version (>=4.3.0) supporting LibreOfficeKit API.Example usageCreate asample.odtdocument (make sure it’s in OpenDocument format) and
put it in your Django templates folder. It should look something like this:Then write a view to generate documents from this template:fromtemplated_docsimportfill_templatefromtemplated_docs.httpimportFileResponsedefget_document(request):"""
    A view to get a document filled with context variables.
    """context={'user':request.user}# Just an examplefilename=fill_template('sample.odt',context,output_format='pdf')visible_filename='greeting.pdf'returnFileResponse(filename,visible_filename)Navigate to the url your view is connected to, and you’ll see a rendered and converted document:For more examples, see theexamples/subfolder in the repository. More detailed documentation is available onhttps://templated-docs.readthedocs.io.CreditsTemplated-docs was written byAlex Morozov.As the repository is left idle for 2 years,Sian Lerk Lauhas forked and resume the task of updating the module.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: templated_docs
===============================Templated-docs===============================.. image:: https://badge.fury.io/py/templated-docs.svg:target: https://pypi.python.org/pypi/templated_docs.. image:: https://img.shields.io/travis/alexmorozov/templated-docs.svg:target: https://travis-ci.org/alexmorozov/templated-docs.. image:: https://readthedocs.org/projects/templated-docs/badge/?version=latest:target: https://templated-docs.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://requires.io/github/alexmorozov/templated-docs/requirements.svg?branch=master:target: https://requires.io/github/alexmorozov/templated-docs/requirements?branch=master:alt: DependenciesGenerate templated documents within Django in any format supported byLibreOffice: texts, spreadsheets, presentations etc.* Free software: MIT license* Documentation: https://templated-docs.readthedocs.io.Requirements------------* Python 2.7 or 3.4+* Django >= 1.8* A recent LibreOffice version (>=4.3.0) supporting LibreOfficeKit API... include:: docs/partial/libffi-warning.rstExample usage-------------Create a ``sample.odt`` document (make sure it's in OpenDocument format) andput it in your Django templates folder. It should look something like this:.. image:: https://github.com/alexmorozov/templated-docs/raw/master/docs/document-template.pngThen write a view to generate documents from this template:.. code-block:: pythonfrom templated_docs import fill_templatefrom templated_docs.http import FileResponsedef get_document(request):"""A view to get a document filled with context variables."""context = {'user': request.user}  # Just an examplefilename = fill_template('sample.odt', context, output_format='pdf')visible_filename = 'greeting.pdf'return FileResponse(filename, visible_filename)Navigate to the url your view is connected to, and you'll see a rendered and converted document:.. image:: https://github.com/alexmorozov/templated-docs/raw/master/docs/generated-document.pngFor more examples, see the ``examples/`` subfolder in the repository. More detailed documentation is available on https://templated-docs.readthedocs.io.Credits---------Templated-docs was written by `Alex Morozov`_.This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template... _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage.. _pylokit: https://github.com/xrmx/pylokit.. _`Alex Morozov`: http://morozov.ca
Package: templated-emails
This app abstracts the sending of emails in a way so that it is possible to
switch from plain text emails to html emails, even if you are using third party apps.
It does this by using a very similar mechanism as django-notifications.Each email gets a folder. In this folder one can put:short.txt (for the subject)email.txt (for the plain text email)email.html (optional, if an HTML email should also be sent)A good practice is to put all emails in an emails/ folder within your templates folder,
so it is easy to see what emails are being sent by your system.Recipients can either be an array of emails (as strings) or users.
If you pass users it will also try to find the users stored language
(accounts.Account.language in pinax) and send it using it.Sending an emails works like this:from templated_emails.utils import send_templated_email
send_templated_email(["philipp@gidsy.com"], "emails/invite_friends", {"my_variable":"blafoo"})oruser = User.objects.get(pk=1)
# this will try to switch to the correct language of the user
send_templated_email([user], "emails/invite_friends", {"my_variable":"blafoo"})The system will add current_site (the Site object of the Django Project)
and STATIC_URL (for linking in static content) to the context of your templates.LanguageSimilar to django-notification the system will try to look for the language the
user has set in his Account (but can be configured to other Models using settings.NOTIFICATION_LANGUAGE_MODULE)
to server the right language to each user.Inline CSS RulesInline CSS Rules are annoying and tedious, but a neccessity if you want to support all email clients.
Since 0.3 pynliner is included that will take the CSS from the HEAD and put it into each element that matches the ruleThere is a toggle you can set in settings.py to turn this feature on or off:
TEMPLATEDEMAILS_USE_PYNLINER = False is the default value.CeleryPynliner can be quite slow when inlining CSS. You can move all the execution
to Celery with this setting (default is False):TEMPLATEDEMAILS_USE_CELERY = TruePlease note that the given context is passed to Celery unchanged.Installpip install -e http://github.com/philippWassibauer/templated-emails.git#egg=templated-emailsorpip install templated-emailsDependenciespynlinercssutilsFollow Mehttp://github.com/philippWassibauerhttp://twitter.com/scalarhttp://philippw.tumblr.comhttps://bitbucket.org/philippwassibauer
Package: template-file-parser
template-file-parseris an convenient module for parsing files with the pythontemplate syntax.This module was inspired by the following Stack overviewpost.The need of this module was for me to have an easy templating system manipulating configuration files, without learning a more complete but complicated templating system.
This is especially with configuration files of solr of kubernetes where just a small list of variables needs to be interpolated and written into a file.Installationpip install template-file-parserUsagefrom template_file_parser import parse_file
parse_file(in_file, out_file, variables, safe=False)These are the parameters:in_file: The input fileout_file: The output filevariables : a dictionary where the keys are the variables in the template and the values are the values needed to substitutesafe: if True then then not all variables in the template file needs to be declared. If False, all parameters needs to be declared. For more information readhereDisclaimerThis library is only supported for python >= 3.4 as it fits my needs, and i don’t want to mees up with the encoding differences between python 2 and 3.
This software is beta and breaking changes can occur between versions
Package: template-flask
template-flaskpip install template_flaskfrom the command line navigate to the directory where you would like to keep your projecttype "python -m template_flask" and click enterenter the name of your projectonce completed you will have a basic flask directory structure setup and a virtual environment with these packages installed within it...atomicwrites
attrs
blinker
click
colorama
coverage
Flask
Flask-DebugToolbar
Flask-Login
Flask-Mail
Flask-SQLAlchemy
Flask-WTF
greenlet
gunicorn
iniconfig
itsdangerous
Jinja2
MarkupSafe
packaging
pluggy
py
pyparsing
pytest
pytest-cov
SQLAlchemy
tomli
Werkzeug
WTFormsDirectory structure
<your_app>--> <your_app>_app (main app module)--> __init__.py (flask app configuration and imports)

--> config
    --> __init__.py
    --> config.py

--> models
    --> __init__.py
    --> datatypes.py
    --> db.py
    --> other_model.py
    --> user.py

--> routes
    --> __init__.py
    --> routes.py

--> static
    --> css
        --> bootstrap
            --> * all bootstrap example css
    --> img
    --> js
        --> bootstrap
            --> * all bootstrap example js
        fetcher.js

--> templates
    --> bootstrap
        --> * all bootstrap example html
    --> index.html--> venv
--> requirements.txt
--> wsgi.py (main flask app entry point)
--> Dockerfile
--> .dockerignoreWithin the templates and static folders that are created, you will find HTML, CSS, and JS for various Bootstrap 5 example
if you would like to use them in your project.To preview the live Bootstrap pages, activate your newly created virtual environment and
run the newly created "run.py" file from within your new project directory, open to
the index page and click through the buttons.
Package: templateflow
Reference anatomies of the brain and corresponding atlases play a central role in experimental
neuroimaging workflows and are the foundation for reporting standardized results.
The choice of such references —i.e., templates— and atlases is one relevant source of methodological
variability across studies, which has recently been brought to attention as an important challenge
to reproducibility in neuroscience.TemplateFlowis a publicly available framework for human and nonhuman brain models.
The framework combines an open database with software for access, management, and vetting,
allowing scientists to distribute their resources underFAIR—findable, accessible, interoperable,
reusable— principles.TemplateFlowsupports a multifaceted insight into brains across species, and enables multiverse
analyses testing whether results generalize across standard references, scales, and in the long term,
species, thereby contributing to increasing the reliability of neuroimaging results.Publishing resources in theTemplateFlowArchivePlease check theContributing section of the TemplateFlow website.License informationTemplateFlowadheres to thegeneral licensing guidelinesof theNiPreps framework.LicenseCopyright (c) 2021, theNiPrepsDevelopers.TheTemplateFlowPython Client is
licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0.Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.AcknowledgementsThis work is steered and maintained by theNiPreps Community.
The development of this resource was supported by
the Laura and John Arnold Foundation (RAP and KJG),
the NIBIB (R01EB020740, SSG; 1P41EB019936-01A1SSG, YOH),
the NIMH (RF1MH121867, RAP, OE; R24MH114705 and R24MH117179, RAP; 1RF1MH121885 SSG),
NINDS (U01NS103780, RAP), and NSF (CRCNS 1912266, YOH).
OE acknowledges financial support from the SNSF Ambizione project
“Uncovering the interplay of structure, function, and dynamics of
brain connectivity using MRI” (grant numberPZ00P2_185872).
Package: template-formatter
IntoductionThis project allows you to gnerate a file from a jinja2 template fileInstallationpip install template-formatterMotivating exampleOften you need to create a file or a string according to a specific template. When you need to perform it in python, it is all fine and dandy.
However, the problem arises when you are dealing with a different programming language (e.g., C, Latex) that can perform said task, but in a much less easy way.
You can use this program to easiluy template files and string and then use them inside another environment.UsageThis executable allows to customize templated strings or file according some criterion.
I have intended this application to be just a wrapper to jinja2. However, you can also pass a string
to the program according to other template syntaxes (e.g., f-strings or pythonformat).See the tests for usages of this program. Here there is a non comprehensive ways to use this programtemplate-formatter --version

template-formatter --help

template-formatter --format="format" --writeOnStdout --value "foo" 3 --value "bar" 5 "{model.foo} + {model.bar}"For the developerpip install -i https://test.pypi.org/simple/ pmake
pmake build install
Package: template-fragments
Template fragments for jinja-like enginesAPI reference|LicenseUsage:fromtemplate_fragmentsimportfilter_templatetemplate_source="""<html><head><title>Example</title></head><body><div>{% fragment content %}<!-- content here -->{% endfragment %}</div></body></html>"""content_full=filter_template(template_source,"")content_item=filter_template(template_source,"item")Usage withFlaskandJinja2:fromtemplate_fragments.jinjaimportFragmentLoaderapp.jinja_loader=FragmentLoader(app.jinja_loader)@app.route("/")defget_index():returnrender_template("index.html",...)@app.route("/item/<item>")defget_item(item):returnrender_template("index.html#item",...)API referencetemplate_fragments.split_templatestemplate_fragments.split_templates(src: str) -> Dict[str, str]Return all fragments contained in the templateThe key""gives the source template with any fragment directives removed.template_fragments.filter_templatetemplate_fragments.filter_template(src: str, fragment: str = '') -> strReturn the parts of the template for the given fragmentParameters:src: the template sourcefragment: the fragment to return. Iffragment = "", removes any
fragment directivestemplate_fragments.split_pathtemplate_fragments.split_path(path: str) -> Tuple[str, str]Split the fragment from the pathtemplate_fragments.TemplateFragmentErrortemplate_fragments.TemplateFragmentErrorCommon base class for all non-exit exceptions.template_fragments.jinjaJinja specific helperstemplate_fragments.jinja.FragmentLoadertemplate_fragments.jinja.FragmentLoader(base_loader: jinja2.loaders.BaseLoader)A loader that filters fragmentsLicenseThe MIT License (MIT)
Copyright (c) 2022 - 2023 Christopher Prohm

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Package: template-from-equation
Template from EquationThis library provides functions to create template (make template) from its associated equation (e.g. 2+5 -> n0+n1).The term "equation template" is first introduced in Kushman et al.(2014). It represents the abstraction of equation systems. The concept of it are then used in many following works. We found a tool to create such templates useful but not publicly available. So we tried to write one and share with peers in the area of automatic math word problem solving in NLP.The template generated would contain "n0, n1, n2, ..." for numbers and "x0, x1, x2, ..." for variables.
For example:2+5 -> n0+n12+5*60/x = y -> n0 + n1 * n2 / x0 = x1In some situations, we want to keep some constants in the equation unchanged. For example, to get the template of the equation "2+7*60 = x"  for the problem"How many minutes is 2 hours and 7 minutes?", we want to keep the constant "60" unchanged. In this situation, our function allows passing a number slot which contains only the numbers we want to substitute for our template. (See the Example Usage below).To make template from equation, we use the ast trees. When traversing an AST tree, it returns "n0, n1, n2, ..." for the leaf nodes of numbers, and "x0, x1, x2" for variables. Then, an equation of "2+5*x" can be turned into its template "n0+n1*x0". (Using AST tree can help us avoid some subtle string matching difficulties of regular expression.)Installationpip install template_from_equationUsage>>>fromtemplate_from_equationimportEquation>>>eq1=Equation("2+5")>>>eq12+5>>>eq1.get_template()'n0 + n1'>>>eq2=Equation("2+7*60 = x")>>>eq22+7*60=x>>>eq2.get_template()'n0 + n1 * n2 = x0'>>>eq2.get_template(num_slot=[2,7])'n0 + n1 * 60 = x0'>>>eq3=Equation("2*x+5*12 = y")>>>eq3.get_template()'n0 * x0 + n1 * n2 = x1'>>>eq3.get_template(num_slot=[2,5])'n0 * x0 + n1 * 12 = x1'TodoAn option to share tokens for repeated numbers, i.e. 2+5*2 -> n0 +n1 * n0To parse the operator "^"ReferencesKushman, Nate, et al. "Learning to automatically solve algebra word problems." Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Vol. 1. 2014.codegen: Some of the naming styles but not the code are adapted from codegen, which is a library to convert ast tree to python codeLicenseThis project is licensed under the terms of the MIT license.
Package: templategen
templategenSouce code generator from a given templateAbout The ProjectAll it does is copy template file[s], replace predefined substrings and write the output as a new generated file.Getting StartedTo get a local copy up and running follow these simple steps.InstallationRun the following command:pipinstalltemplategenUsageRun the following command:templategen--name=myName--template=cLicenseDistributed under the GNU3 License. SeeLICENSEfor more information.ContactKanelis Ilias -email meGitHub Link:https://github.com/TediCreations/templategenPyPi Link:https://pypi.org/project/templategen/