Saravanan666/pypi-org huggingface dataset:
Package: pretix-sumup
title: Sumup for PretixThis is a plugin forpretix.DescriptionThis is an alpha stage payment plugin for Pretix 4, it allows to use
Sumup online payment. You need to register an OAuth app in your Sumup
developer account. You also to manually request the "payment" scope to
Sumup.Development setupMake sure that you have a workingpretix development
setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register
this application with pretix's plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from
this repository for your events by enabling it in the 'plugins'
tab in the settings. supervisorctl -s unix:///tmp/supervisor.sock
restart pretixwebThis plugin has CI set up to enforce a few code style rules. To check
locally, you need these packages installed:pip install flake8 isort blackTo check your plugin for rule violations, run:black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2023 Ronan Le MeillatReleased under the terms of the GNU Affero General Public License v3
Package: pretix-sumup-payment
This is a plugin forpretix.Enables credit card payments via SumUpDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort blackTo check your plugin for rule violations, run:black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2024 Christoph WalcherReleased under the terms of the Apache License 2.0
Package: pretix-swap
This is a plugin forpretix.Swap tickets, anonymously or with specific other attendees. Also supports canceling tickets if (and only if) another ticket is purchased.Development setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort black docformatterTo check your plugin for rule violations, run:docformatter --check -r .
black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:docformatter -r .
isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2021 Tobias KunzeReleased under the terms of the Apache License 2.0
Package: pretix-taler
This is a plugin forpretix.Accept payments through GNU Taler, a payment system that makes privacy-friendly online transactions fast and easy.Development setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort black docformatterTo check your plugin for rule violations, run:docformatter --check -r .
black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:docformatter -r .
isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2022 pretix teamReleased under the terms of the Apache License 2.0
Package: pretix-telephone
This is a plugin forpretix. It adds a Question asking for the telephone number to the contact information form. The information can be seen under a contact information panel in the order detail view. The helptext and wether the question is required can be changed in the backend.You can install the plugin manually or usepipto installpretix-telephone.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-telephone.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2018 Felix RindtReleased under the terms of the Apache License 2.0
Package: pretix-twilio
This is a plugin forpretix.Additionally to sending emails with pretix, send SMS to your customers with Twilio! Uses the built-in phone number field.Development setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort black docformatterTo check your plugin for rule violations, run:docformatter --check -r .
black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:docformatter -r .
isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2021 Tobias KunzeReleased under the terms of the Apache License 2.0
Package: pretix-vacc-utils
This is a plugin forpretix.Various vaccination utilitiesDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort black docformatterTo check your plugin for rule violations, run:docformatter --check -r .
black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:docformatter -r .
isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2021 pretix teamReleased under the terms of the Apache License 2.0
Package: pretix-venueless
This is a plugin forpretix.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-venueless.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2020 Raphael MichelReleased under the terms of the Apache License 2.0
Package: pretix-visma-pay
This is a plugin forpretix.Payment plugin for Visma PayDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-visma-pay.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2020 Jaakko Rinta-FilppulaReleased under the terms of the Apache License 2.0
Package: pretix-wallets
This is a plugin forpretix.Allow users to save the ticket into wallet appsDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort blackTo check your plugin for rule violations, run:black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2023 Robin FerchReleased under the terms of the Apache License 2.0
Package: pretix-wirecard
This is a plugin forpretix.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-wirecard.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2017 Raphael MichelReleased under the terms of the Apache License 2.0ThanksThe initial development of this official pretix plugin has been funded by our friends at ERNW Insight.
Thank you very much!If you also want to contribute to the development of the open pretix ecosystem by sponsoring the
development of a feature or plugin, please get in touch atsupport@pretix.eu!
Package: pretix-zugferd
This is a plugin forpretix. It allows you to attach ZUGFeRD information to your invoices.PLEASE NOTE:Use this plugin at your own risk. If there is a semantic difference between the XML and PDF contents in
your ZUGFeRD invoices, you might legally owe the VAT to the financial authoritiestwice, since you then generated two
invoices. We tried our best to avoid this, but we do not assume any liability. Please check the output of this plugin
with your tax or legal attorney before use.Installation noteThis plugin requiresghostscriptto be installed. If you have it installed in a nonstandard location, you can
specify it in yourpretix.cfg:[tools]
gs=/usr/local/bin/gsDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-zugferd.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2018-2022 rami.io GmbHReleased under the terms of the Apache License 2.0
Package: pretools
pretoolsPreparation tools for machine learning.Examplesfrompretools.estimatorsimport*fromsklearn.datasetsimportload_bostonfromsklearn.pipelineimportmake_pipelineX,y=load_boston(return_X_y=True)model=ModifiedCatBoostRegressor(random_state=0,verbose=100)model=make_pipeline(Profiler(),Astype(),NUniqueThreshold(max_freq=None),DropCollinearFeatures(method="spearman",random_state=0),ClippedFeatures(),ModifiedStandardScaler(),ModifiedSelectFromModel(model,random_state=0,threshold=1e-06),CombinedFeatures(include_data=True),ModifiedSelectFromModel(model,random_state=0,threshold=1e-06),model,)model.fit(X,y)Installationpip install pretoolsTestingpython setup.py test
Package: pretrain4keras
README动机用tf.keras (TF2.0+) 的稳定API实现NLP预训练模型，例如BERT、BART等。不做过多的自定义类、方法，力图代码简洁，易懂，易扩展。支持的模型BERTBART使用例子安装pip install pretrain4kerasBERTbert参数下载：Google原版bert:https://github.com/google-research/bert代码frompretrain4keras.models.bertimportBertBuilder# 0.下载参数，存放于bert_dir下# Google原版bert: https://github.com/google-research/bertbert_dir="/Users/mos_luo/project/pretrain_model/bert/chinese_L-12_H-768_A-12/"config_file=bert_dir+"bert_config.json"checkpoint_file=bert_dir+"bert_model.ckpt"vocab_file=bert_dir+"vocab.txt"# 1.创建keras bert模型与tokenizerkeras_bert,tokenizer,config=BertBuilder().build_bert(config_file=config_file,checkpoint_file=checkpoint_file,vocab_file=vocab_file)# 2.创建输入样本# tokenizer = builder.tokenizer(vocab_file)inputs=tokenizer(["语言模型"],return_tensors="tf")print(keras_bert(inputs))BARTBART参数下载例如从https://huggingface.co/fnlp/bart-base-chinese/tree/4e93f21dca95a07747f434b0f9fe5d49cacc0441下载文件夹的所有文件huggingface transformers的参数与json的可能会发现变动，所以下载时需要指定版本id，例如4e93f21dca95a07747f434b0f9fe5d49cacc0441示例代码importpprintimporttensorflowastffrompretrain4keras.models.bartimportBartBuilder# 0.手动从fnlp/bart-base-chinese下载文件# 从https://huggingface.co/fnlp/bart-base-chinese/tree/4e93f21dca95a07747f434b0f9fe5d49cacc0441下载文件夹的所有文件pretrain_dir="/Users/normansluo/project/pretrain_model/huggingface_transformers/fnlp/bart-base-chinese-v2/"checkpoint_file=pretrain_dir+"pytorch_model.bin"config_file=pretrain_dir+"config.json"vocab_file=pretrain_dir+"vocab.txt"# 1.创建keras bart模型builder=BartBuilder()keras_bart,tokenizer,config=builder.build_bart(config_file=config_file,checkpoint_file=checkpoint_file,vocab_file=vocab_file)# 2.创建输入样本inputs=tokenizer(["北京是[MASK]的首都"],return_tensors="tf")delinputs["token_type_ids"]inputs["decoder_input_ids"]=tf.constant([[102,101,6188,5066,11009,4941,7178,15134,23943,21784]])pprint.pprint(inputs)# 3.keras bart的输出print("=========== keras bart的输出 ============>")keras_bart_out=keras_bart(inputs)print("keras_bart_out=")print(keras_bart_out)print(tokenizer.batch_decode(tf.argmax(keras_bart_out["lm"],axis=2).numpy()))requirementspython>=3.6tensorflow>=2.0.0numpytransformers=4.25.1主要是为了提供tokenizer，不是必须的，可以不装。你也可以用其他的tokenizer实现。参考https://github.com/bojone/bert4kerashttps://github.com/huggingface/transformers更新日志2023.01.15：添加BART2023.01.30：添加BERT
Package: pretrained-backbones-unet
Pretrained Backbones with UNetAPyTorch-based Python library with UNet architecture and multiple backbones for Image Semantic Segmentation.OverviewThis is a simple package for semantic segmentation withUNetand pretrained backbones. This package utilizes thetimm modelsfor the pre-trained encoders.When dealing with relatively limited datasets, initializing a model using pre-trained weights from a large dataset can be an excellent choice for ensuring successful network training. By utilizing state-of-the-art models, such as ConvNeXt, as an encoder, you can effortlessly solve the problem at hand while achieving optimal performance in this context.The primary characteristics of this library are as follows:430 pre-trained backbone networks are available for the UNet semantic segmentation model.Supports backbone networks such as ConvNext, ResNet, EfficientNet, DenseNet, RegNet, and VGG... which are popular and SOTA performers, for the UNet model.It is possible to adjust which layers of the backbone of the model are trainable parametrically.It includes a DataSet class for binary and multi-class semantic segmentation.And it comes with a pre-built rapid custom training class.InstallationPypi version:pip install pretrained-backbones-unetSource code version:pip install git+https://github.com/mberkay0/pretrained-backbones-unetUsagefrombackbones_unet.model.unetimportUnetfrombackbones_unet.utils.datasetimportSemanticSegmentationDatasetfrombackbones_unet.model.lossesimportDiceLossfrombackbones_unet.utils.trainerimportTrainer# create a torch.utils.data.Dataset/DataLoadertrain_img_path='example_data/train/images'train_mask_path='example_data/train/masks'val_img_path='example_data/val/images'val_mask_path='example_data/val/masks'train_dataset=SemanticSegmentationDataset(train_img_path,train_mask_path)val_dataset=SemanticSegmentationDataset(val_img_path,val_mask_path)train_loader=DataLoader(train_dataset,batch_size=2)val_loader=DataLoader(val_dataset,batch_size=2)model=Unet(backbone='convnext_base',# backbone network namein_channels=3,# input channels (1 for gray-scale images, 3 for RGB, etc.)num_classes=1,# output channels (number of classes in your dataset))params=[pforpinmodel.parameters()ifp.requires_grad]optimizer=torch.optim.AdamW(params,1e-4)trainer=Trainer(model,# UNet model with pretrained backbonecriterion=DiceLoss(),# loss function for model convergenceoptimizer,# optimizer for regularization10# number of epochs for model training)trainer.fit(train_loader,val_loader)Available Pretrained Backbonesimportbackbones_unetprint(backbones_unet.__available_models__)
Package: prettier
Prettier - properly pprint of nested objectsIf you are trying to output nested data structures, each of which is individually displayed as a dictionary
representation, the nesting levels are not separated, such an output is difficult to perceive.class PPrintMixin:
    def __str__(self):
        return str(self.__dict__)


SAMPLE_DICT = {'a': None}
SAMPLE_DICT['a'] = SAMPLE_DICT


class A(PPrintMixin):
    def __init__(self):
        self.attrs = ('a', 'b', 'c')
        self.a = 10
        self.b = B()
        self.c = {'a': 1, 'b': 2, 'c': 3}
        setattr(self, 'd\nd', {'a': 1, 'b': 2, 'c': 3})
        self.e = 'a\na'
        self.f = 'a' * 100
        self.g = self
        self.h = SAMPLE_DICT


class B(PPrintMixin):
    def __init__(self):
        setattr(self, 'a \n a', {'a': 1, 'b': {'a': 1, 'b': 2, 'c': 3}, 'c\nc': C()})
        self.b = [C(), 1]
        self.c = C()


class C(PPrintMixin):
    def __init__(self):
        self.a = ('b', 'c')
        self.b = 'a \n a'
        self.c = {}You can expect the following output:{'attrs': ('a', 'b', 'c'), 'a': 10, 'b': <__main__.B object at 0x1034b74c0>, 'c': {'a': 1, 'b': 2, 'c': 3}, 'd\nd': {'a': 1, 'b': 2, 'c': 3}, 'e': 'a\na', 'f': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'g': <__main__.A object at 0x1033fb3a0>, 'h': {'a': {...}}}But if you use aPPrintMixininstead of the standard one, then you can expect the following output:{'a': 10,
 'd
   d': {'a': 1,
        'b': 2,
        'c': 3},
 'e': 'a
       a',
 'c': {'a': 1,
       'b': 2,
       'c': 3},
 'h': {'a': <RecursionError on 4304997312>},
 'b': {'a 
           a': {'a': 1,
                'b': {'a': 1,
                      'b': 2,
                      'c': 3},
                'c
                  c': {'a': ('b', 'c'),
                       'c': {},
                       'b': 'a 
                              a'}},
       'c': {'a': ('b', 'c'),
             'c': {},
             'b': 'a 
                    a'},
       'b': [<__main__.C object at 0x100bf3a60>, 1]},
 'attrs': ('a', 'b', 'c'),
 'f': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
 'g': <RecursionError on 4307498032>}If you want to create an own Mixin, just import MixinFactory. For example, you can use theendpointargument. This
is the name of the attribute that stores the list of arguments to
print. Let's combine some Mixins, like this:from prettier import MixinFactory

AttrsPrintMixin = MixinFactory(endpoint='attrs')
APrintMixin = MixinFactory(endpoint='a')


class A(AttrsPrintMixin):
    ...


class B(PrintMixin):
    ...


class C(APrintMixin):
    ...The output will be:{'a': 10,
 'b': {'c': {'b': 'a 
                    a',
             'c': {}},
       'b': [<__main__.C object at 0x100b478b0>, 1],
       'a 
           a': {'a': 1,
                'b': {'a': 1,
                      'b': 2,
                      'c': 3},
                'c
                  c': {'b': 'a 
                              a',
                       'c': {}}}},
 'c': {'a': 1,
       'b': 2,
       'c': 3}}
Package: prettierfier
prettierfierWhile I loveBeautiful Soupas a parser,BeautifulSoup.prettify()adds a linebreak betweeneverytag.
This results in unwanted white space between tags that should be inline, like<sup>,<a>,<span>, etc:<p>Introducing GitHub<sup>&reg;</sup></p>Introducing GitHub®vs.<p>
    Introducing GitHub
    <sup>
        &reg;
    </sup>
</p>Introducing GitHub®This module parses HTML/XML as a raw string to more intelligently format tags.InstallationYou have two options:pip install prettierfierin your command lineCopy the contents ofprettierfier.pyto your own module.This module is built with just the Python Standard Library and contains no external third-party dependencies.Functionsprettify_xml(xml_string, indent=2, debug=False)Can be used with no prior formatting.Args:
        xml_string (str): XML text to prettify.
        indent (int, optional): Set size of XML tag indents.

    Test-only args:
        debug (bool, optional): Show results of each regexp application.

    Returns:
        str: Prettified XML.prettify_html(html_string, debug=False)Originally created to processBeautifulSoup.prettify()output.Does not add or remove regular line breaks. Can be used with regular HTML if it already has the newlines you want to keep.Args:
        html_string (str): HTML string to parse.

    Test-only args:
        debug (bool, optional): Show results of each regexp application.

    Returns:
        str: Prettified HTML.Exampleimport prettierfier

ugly_html = """<p>
    Introducing GitHub
    <sup>
        &reg;
    </sup>
</p>"""

pretty_html = prettierfier.prettify_html(ugly_html)
print(pretty_html) 

# Output
>>> <p>Introducing GitHub<sup>&reg;</sup></p>LinksGitHubPyPi
Package: prettierjson
prettierjsonGenerate prettier and more compact JSON dumpsInstallationprettierjsoncan be installed using one of these commands:pipinstallprettierjsonpoetryaddprettierjsonUsagein python scriptsprettierjson offers one functionprettierjson.dumps()which is intended to be used as a drop-in replacement forjson.dumps()fromprettierjsonimportdumpsmy_dictionary={"foo":bar}withopen("foobar.json","w")asf:f.write(dumps(my_dictionary))If prettierjson needs to exist within the same module as the built-in json packagewithout overridingthe defaultjson.dumps(), the entire package should be imported in order to avoid namespace collisionsimportjsonimportprettierjsonmy_dictionary={"foo":bar}withopen("builtin.json","w")asf:f.write(json.dumps(my_dictionary))withopen("prettierjson.json","w")asf:f.write(prettierjson.dumps(my_dictionary))Seethe documentationfor more details.as a command line interfaceprettierjson has a__main__module which allows it to be called directly when installed with the commandpython -m prettierjson.In this way, prettierjson can be used to "prettify" one or multiple JSON files in-place by passing them as arguments$python-mprettierjsonPATH/TO/JSON/FILE1.jsonPATH/TO/JSON/FILE2.jsonIndent size and max line length can be set with the--indentand--line-lengthflags$python-mprettierjson--indent=2--line-length=88PATH/TO/JSON/FILE.jsonRunpython -m prettierjson -hfor more command line usage details.