Saravanan666/pypi-org huggingface dataset:
Package: simple-aws-wrapper
simple_aws_wrapperExample usage:from src.simple_aws_wrapper.config import AWSConfigfrom src.simple_aws_wrapper.const import regionsfrom src.simple_aws_wrapper.services.s3 import S3aws_config = AWSConfig()aws_config.set_region(regions.Region(regions.EU_WEST_1))s3 = S3()message_content=b'Hello World!'s3.put_object(message_content, "my-bucket", "my-object-key")
Package: simple-background-task
simple_background_taskFeaturesexecute background task,with threadsupport multiple queue,eg memory/rocketmq(todo)easy to integrate with frameworksInstallpipinstallsimple_background_taskUsagein script# start main processfromsimple_background_taskimportBackgroundTaskBackgroundTask().start()# start a background taskfromsimple_background_taskimportdeferdeftest_job():passdefer(func=test_job,arguments={"args":[1,2],"kwargs":{"a":"b"}})in django# settings.pyINSTALLED_APPS=[...'simple_background_task.integrate.django',]# start a background taskfromsimple_background_taskimportdeferdeftest_job():passdefer(func=test_job,arguments={"args":[1,2],"kwargs":{"a":"b"}})Testpython-mpytesttests
Package: simple-backups
Simple BackupsSimple backups libraryDocumentation:https://luiscberrocal.github.io/simple-backupsGitHub:https://github.com/luiscberrocal/simple-backupsPyPI:https://pypi.org/project/simple-backups/Free software: MITFeaturesCreate a copy of a file into a backup folder with a dated filename.CreditsThis package was created withCookiecutterand thewaynerv/cookiecutter-pypackageproject template.
Package: simple-bank-korea
Simple Bank KoreaSimplest Transaction Crawler for Korea BanksRequirements:bs4 (BeautifulSoup4)requestspython-dateutilseleniumpillow (PIL)PhantomJS Binary (Automatically Download, butlibfontconfigis dependency on Linux)InstallInstall package with pip:pipinstall-Usimple_bank_koreaKB (Kookmin Bank)Currently supports KB국민은행(Kookmin Bank) only.Before UseYou must activate '빠른조회' service for each banks.check this:https://obank.kbstar.com/quics?page=C025255&cc=b028364:b028702&QSL=F#You can only use service('빠른조회')-registered bank accounts.UsageImport functions from each bank:fromsimple_bank_korea.kbimportget_transactions# get_transactions returns list of dicts# like this:# [{'transaction_by': '', 'date': datetime.datetime(2017, 9, 11, 12, 39, 42), 'amount': 50, 'balance': 394}]# exampletransaction_list=get_transactions(bank_num='47380204123456',birthday='941021',password='5432',# days=30, # Optional, default is 30# PHANTOM_PATH='/Users/beomi/bin/phantomjs', # Optional, default is 'phantomjs' only.# LOG_PATH='/Users/beomi/phantom.log' # Optional, default is os.path.devnull (no log))fortrsintransaction_list:print(trs['date'],trs['amount'],trs['transaction_by'])get_transactions()needsbank_num,birthdayandpassword. and optionally you can usedaysarg for specific days from today.(default is 30days(1month))Require Argsbank_num: Your account number. (String)birthday: Your birthday with birth year(if 1994/10/21, do '941021'), 6 digits. (String)password: Your bank account password. (String)Optional Argsdays: Days you want to get datas. Default is 30 days. (Integer)PHANTOM_PATH: Your PhantomJS Binary file Location.
Default is 'phantomjs', expecting registered in PATH.
(Ifphantomjsis not in PATH, automatically download)LOG_PATH: Path for phantomjs log file. Default is no logging.Return typesget_transactions()returns list of dicts, and each dict hasdate,amount,balanceandtransaction_by.get_transactions(): returns list of transaction dicts.date: datetimeamount: intbalance: inttransaction_by: strUpdate Log0.2.15 (2020-06-04)HotFix bugs onsetup.py0.2.14 (2020-06-04)Fix bugs #4: (downloaded) phantomJS permission error0.2.13 (2020-06-04)Fix bugs when downloading phantomjs.Fix affects on Linux and macOS only.Add Guide(OS, Progress) when dowloading phantomjs.0.2.10 (2017-11-11)Hot-fix: implicitly import to explicit relevant import to preventImportError0.2.9 (2017-11-11)Download PhantomJS Binary ifphantomjsis not in PATH0.2.8 (2017-09-18)Add caching strategy (using temp folder with saving touch-keys)Fix typo in v0.2.7
Package: simple-bar
Python Simple Loading BarThis is very simple and customizable loading/progress bar.Usage:fromsimplebarimportloadingloading(LOADING_BAR_RANGE=50,LOADING_MAX_VAL=100,LOADING_TIME=0.1,LOOP_RANGE=10,fg_text_color="green",bg_text_color="black",text_style="bold",fg_value_color="white",bg_value_color="black",value_style="normal",symbol_load='#',symbol_bg='.')Help:LOADING_BAR_RANGE                   # Change length of Loading bar.

LOADING_MAX_VAL                     # Values upto which you want loading bar.

LOADING_TIME                        # Stepwise wait time for loading bar (seconds).

LOOP_RANGE                          # Loop size where you want to use loading e-g for i in range(20), LOOP_RANGE=20.

loop_value                          # iteration value e-g i, for i in range(20).



fg_text_color                       # Symbols text color in the bar.

bg_text_color                       # Symbols background color in the bar.

text_style                          # Style of symbol BOLD,NORMAL.



fg_value_color                      # Value text color at end of bar.

bg_value_color                      # Value background color at end of bar.

value_style                         # Style of value at end of bar BOLD,NORMAL.



symbol_load                         # Symbol to use in loading bar.

symbol_bg                           # Background symbol to use in loading bar.
Package: simplebardapi
simplebardapiA simpler and faster version of BardAPI.Get started:python -m pip install -U simplebardapiJoin myDiscord serverfor live chat, support, or if you have any issues with this package.Support this repository:⭐Star the project:Star this repository. It means a lot to me! 💕🎉Join my Discord Server:Chat with me and others.Join here:Example:fromsimplebardapiimportBardSecure_1PSID="yourCookieValue"bard=Bard(Secure_1PSID)whileTrue:prompt=input("👦: ")try:resp=bard.generate_answer(prompt)print(f"🤖:{resp}")exceptExceptionase:print(f"🤖:{e}")
Package: simplebase
SimplebaseA simple Firebase wrapper for Python.
It uses the firebase_admin package for requests to Firebase, and makes things WAY easier to use.To use the package, you must have Realtime Database and Storage enabled and a private key, stored in a JSON file.You can connect to Firebase like this:connect("dbkey.json", "https://xxxxxxx-default-rtdb.firebaseio.com", "xxxxxxx.appspot.com")Go to a path:refdb("/test/")Get from the path:get()Add to / create a nested path with a value:addToNest("/test/", "key", "value")Add to a path with a value:add("key", "value")Delete a nested path:deleteNest("/test/")As of 0.0.3:Add file to storage bucket:addFile("file.txt")Publish a file to the public:publishFile("file.txt")Add file as to storage bucket:addFileAs("file.txt", "anythingyouwantjustdontaddspacesorspecialcharacters")Publish file as to storage bucket:publishFileAs("file.txt", "anythingyouwantjustdontaddspacesorspecialcharacters")publishFile and publishFileAs will return the public URL.
Package: simplebayes
A memory-based, optional-persistence naïve bayesian text classifier.This work is heavily inspired by the python "redisbayes" module found here:
[https://github.com/jart/redisbayes] and [https://pypi.python.org/pypi/redisbayes]

I've elected to write this to alleviate the network/time requirements when
using the bayesian classifier to classify large sets of text, or when
attempting to train with very large sets of sample data.Build StatusInstallationsudo pip install simplebayesBasic Usageimportsimplebayesbayes=simplebayes.SimpleBayes()bayes.train('good','sunshine drugs love sex lobster sloth')bayes.train('bad','fear death horror government zombie')assertbayes.classify('sloths are so cute i love them')=='good'assertbayes.classify('i would fear a zombie and love the government')=='bad'printbayes.score('i fear zombies and love the government')bayes.untrain('bad','fear death')assertbayes.tally('bad')==3Cache Usageimportsimplebayesbayes=simplebayes.SimpleBayes(cache_path='/my/cache/')# Cache file is '/my/cache/_simplebayes.pickle'# Default cache_path is '/tmp/'ifnotbayes.cache_train():# Unable to load cache data, so we're training itbayes.train('good','sunshine drugs love sex lobster sloth')bayes.train('bad','fear death horror government zombie')# Saving the cache so next time the training won't be neededbayes.persist_cache()Tokenizer Overrideimportsimplebayesdefmy_tokenizer(sample):returnsample.split()bayes=simplebayes.SimpleBayes(tokenizer=my_tokenizer)LicenseThe MIT License (MIT)

Copyright (c) 2015 Ryan Vennell

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.API Documentationhttp://hickeroar.github.io/simplebayes/simplebayes.html
Package: simplebayesuncertainty
Licensecopyright Gerd Wuebbeler, Manuel Marschall (PTB) 2020This software is licensed under the BSD-like license:Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.DISCLAIMERThis software was developed at Physikalisch-Technische Bundesanstalt
(PTB). The software is made available "as is" free of cost. PTB assumes
no responsibility whatsoever for its use by other parties, and makes no
guarantees, expressed or implied, about its quality, reliability, safety,
suitability or any other characteristic. In no event will PTB be liable
for any direct, indirect or consequential damage arising in connectionUsing this software in publications requires citing the following
Paper:https://doi.org/10.1088/1681-7575/aba3b8'''This repository contains the python code provided in the paper "A simple method for Bayesian uncertainty evaluation in linear models".MotivationThe paper provides a simple and easy method to employ the Bayesian paradigm for typical applications in metrology.
The suggested choice for the prior, the sampling methods and the analysis of the resulting posterior is covered in this repository.Installation and running the codeTo run the script one needs a $\geq$ python 3.6 installation with the default packagesnumpyscipymatplotlibInstallation guides for Linux, Windows and Mac can be found here:https://realpython.com/installing-python/Quick guide for Windows:Download Pythonhttps://www.python.org/downloads/release/python-382/(bottom of the page: "Windows x86-64 executable installer")Install Python using the installer and check "Add Python x.x to Path"Run a terminal, e.g. CMDCheck the installation by typingpythona command prompt should appear such asC:\Users\Marschall\Projects\simple_bayes>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>Close the Python prompt usingexit()Install dependenciespython -m pip install numpy scipy matplotlibNavigate to downloaded or cloned files of the repo usingcdRun the example programpython generic_example.pyorpython mass_example.pyImplementation detailsThe filesmass_example.pyandgeneric_example.pycontain the examples from the paper and the main functionality is provided in thebayes_uncertainty_util.pypackage.
Here, most of the routines are collected and called from the script files.
In the directoriesmass/andgeneric/we provide the corresponding measurements and samples of B to repeat the experiments from the paper.ContactIn case of problems or questions please contactmanuel.marschall@ptb.deorgerd.wuebbeler@ptb.de.
Package: simplebbox
SimpleBBoxFunctions for bounding box processing.In many computer vision tasks a concept of a bounding box is used. In python bounding boxes are often represented
as lists, tuples or numpy arrays of 4 elements. However there is no standard representation and different formats are used.
Some formats are listed below.(min x, min y, width, height)or(left, top, width, height)(min x, min y, max x, max y)or(left, top, bottom, right)(center x, center y, width, height)The coordinates can represent eitherrelative position in the image dimensions. Thenxtakes values from0..1for pixels inside the imageor absolute position in pixel (either integer or floating point numbers)This package contains utility functions to convert between those formats.Basic assumptionsSimple data structures are used: lists, tuples, numpy arrays. They fit well to the output of the deep learning models.
Speed and simplicity is chosen over type and range safety. For better type safety one can use alternative implementations with
classes. Seealternativespage of the docs.Conversion operations between integer and float numbers are sometimes cumbersome. We are trying to keep it aligned
with standard python. For example rounding of float numbers while computing a center of a bounding box is done usingRound_half_to_evenalgorithm.Several functions for different handing of floats/ints are provided for the same operation.
E.g.cxcywh_to_x0y0wh_float,cxcywh_to_x0y0wh_intIn simple use cases like a single conversion from one format to another one can probably chose any of the versions for
float conversions. More thorough selection is needed in case of multiple back and forth conversions.Installationpip install simplebboxUsage exampleExamples of conversions:from simplebbox.array import x0y0wh_to_x0y0x1y1, x0y0x1y1_to_x0y0wh

# convert bbox represented as list in ltwh format:
x0y0wh_to_x0y0x1y1([100, 200, 10, 20])          # [100, 200, 110, 220]

# and convert it back:
x0y0x1y1_to_x0y0wh([100, 200, 110, 220])        # [100, 200, 10, 20]NotesFree software: MIT licenseDocumentation:https://simplebbox.readthedocs.io.History0.0.9 (2021-03-02)implementation of batch processing for torch and numpysimplification of float/int conversions, merged some tests for array/tensor implementationsreworked a conversion with integer divisionsInterfaces (and names) of array processing functions have changed. This is a breaking change.0.0.7 (2020-12-17)Added conversion between relative and absolute coordinates.0.0.6 (2020-12-17)Implemented basic conversions. Updated documentation, tests.0.0.1 (2020-12-16)First release on PyPI.
Package: simplebeep
Platform-independent beep function, easily installable with pip.Provides asimplebeep.beep(pitch, duration)function and asimplebeep.play_ndarray(array, sample_rate)function.For Linux, it uses gstreamer, which is usually already installed. On Windows / Mac the package depends on simpleaudio, which is automatically installed as a dependency when installing withpip install simplebeep.
Package: simple-benchmark
A simple benchmarking package including visualization facilities.The goal of this package is to provide a simple way to compare the performance
of different approaches for different inputs and to visualize the result.DocumentationDownloadsInstallationUsingpip:python -m pip install simple_benchmarkOr installing the most recent version directly fromgit:python -m pip install git+https://github.com/MSeifert04/simple_benchmark.gitTo utilize the all features of the library (for example visualization) you need to
install the optional dependencies:NumPypandasmatplotlibOr install them automatically using:python -m pip install simple_benchmark[optional]Getting startedSuppose you want to compare how NumPys sum and Pythons sum perform on lists
of different sizes:>>> from simple_benchmark import benchmark
>>> import numpy as np
>>> funcs = [sum, np.sum]
>>> arguments = {i: [1]*i for i in [1, 10, 100, 1000, 10000, 100000]}
>>> argument_name = 'list size'
>>> aliases = {sum: 'Python sum', np.sum: 'NumPy sum'}
>>> b = benchmark(funcs, arguments, argument_name, function_aliases=aliases)The result can be visualized withpandas(needs to be installed):>>> b
          Python sum  NumPy sum
1       9.640884e-08   0.000004
10      1.726930e-07   0.000004
100     7.935484e-07   0.000008
1000    7.040000e-06   0.000042
10000   6.910000e-05   0.000378
100000  6.899000e-04   0.003941Or withmatplotlib(has to be installed too):>>> b.plot()To save the plotted benchmark as PNG file:>>> import matplotlib.pyplot as plt
>>> plt.savefig('sum_example.png')Command-Line interfaceWarningThe command line interface is highly experimental. It’s very likely to
change its API.It’s an experiment to run it as command-line tool, especially useful if you
want to run it on multiple files and don’t want the boilerplate.Filesum.py:import numpy as np

def bench_sum(l, func=sum):  # <-- function name needs to start with "bench_"
   return func(l)

def bench_numpy_sum(l, func=np.sum):  # <-- using func parameter with the actual function helps
   return np.sum(l)

def args_list_length():  # <-- function providing the argument starts with "args_"
   for i in [1, 10, 100, 1000, 10000, 100000]:
      yield i, [1] * iThen run:$ python -m simple_benchmark sum.py sum.pngWith a similar result:
Package: simplebert
simplebert基于tensorflow.keras的各类Transformer模型的简单封装。本项目初衷为供本人学习使用，力求提供最简便的API调用方法，也欢迎有需要的人下载使用。项目编写过程中参考了Huggingface Transformers,The Annotated Transformer, 以及bert4keras等资料和代码。主要功能支持加载Google原版的BERT模型权重支持加载Huggingface的BERT模型权重支持加载Huggingface的RoBERTa模型权重安装pipinstallsimplebert使用范例最简单的调用如下。fromsimplebertimporttokenizer_from_pretrained,model_from_pretrained# 选择要加载的模型的名称model_name='bert-base-chinese'# 创建并加载分词器tokenizer=tokenizer_from_pretrained(model_name)# 创建并加载模型# 选择lm (LanguageModelHead)和pooler两种model headmodel=model_from_pretrained(model_name,model_head=['lm','pooler'])# 调用分词器产生输入inputs=tokenizer([u'为啥科技公司都想养只机器狗？',u'一些公司已经将四足机器人应用在了业务中。'])# 调用模型产生输出，输出所有层的结果output=model(inputs,output_hidden_states=True)# 输出结果print(output['sequence_output'].shape)# 最后一层的输出print(output['logits'].shape)# 'lm'产生的输出print(output['pooler_output'].shape)# 'pooler'产生的输出print(output['hidden_states'][-2].shape)# 倒数第二层产生的输出可以选择的模型在pretrained_models.json文件中配置。如果已预先下载了有权重文件到本地，可用如下方式调用。fromsimplebert.tokenizersimportBertTokenizerfromsimplebert.modelsimportModelConfig,BertModelconfig_file='/path/to/bert_config.json'vocab_file='/path/to/vocab.txt'checkpoint_file='/path/to/checkpoint.ckp'tokenizer=BertTokenizer(config_file,cased=True)config=ModelConfig(config_file)model=BertModel(config,model_head='lm')#...更多用法，参考Examples目录。支持的模型权重Google原版BERT包括：bert-base-uncased, bert-base-cased, bert-base-chinese, bert-base-cased-multi-lang, bert-large-uncased, bert-large-cased, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-maskingHuggingface的BERT模型, 权重名称包括：huggingface-bert-base-cased, huggingface-bert-base-uncased, huggingface-bert-large-uncased, huggingface-bert-large-cased, huggingface-bert-base-chineseHuggingface的RoBERTa模型, 权重名称包括：huggingface-roberta-base, huggingface-roberta-large
Package: simplebitk
BioInformatics Tools kitSummarized some useful tools in it.BITK will help us manipulate data in different formats.Installpip install bitkHow to usededim.pyusage:dedim.py[-h][--sepSEP][--dedimensions-methodDEDIMENSIONS_METHOD][--cluster-methodCLUSTER_METHOD][--assess-methodASSESS_METHOD][--dimensionsDIMENSIONS][--cluster-numberCLUSTER_NUMBER][-r][--no-row-feature][--annotationANNOTATION][--sizeSIZE][--styleSTYLE][-tTITLE][-fFIG][--version]matrixprefix

positionalarguments:matrixmatrixtable,ifrowrepresentsfeature,pleasenotetoadd'--row-feature'optionprefixoutputprefix

optionalarguments:-h,--helpshowthishelpmessageandexit--sepSEPseparation(default:)--dedimensions-methodDEDIMENSIONS_METHODde-dimensionsmethod(default:PCA)--cluster-methodCLUSTER_METHODclustermethod(default:MiniBatchKMeans)--assess-methodASSESS_METHODassessmethodsforbestclusternumber(default:silhouette_score)--dimensionsDIMENSIONSreducetondimensions(default:3)--cluster-numberCLUSTER_NUMBERclusternumber,ifnotspecificit,itwillbethebestclusternumberinfered(default:None)-r,--row-featurerowinthematrixrepresentsfeature(default:True)--no-row-feature--annotationANNOTATIONannotationfile,sepshouldbe','(default:None)--sizeSIZEsizecolumninannotationfile(default:None)--styleSTYLEstylecolumninannotationfile(default:None)-tTITLE,--titleTITLEfiguretitle(default:None)-fFIG,--figFIGpng/pdf(default:png)--versionshowprogram'sversionnumberandexitexamplededim.pytests/test.csvtests/test_result\--sep,--dimensions2\--no-row-feature--annotationtests/test_anno.csv\--styletargets--title'test PCA'\--dedimensions-methodTSNE--figpngfc_rename.pyusage: fc_rename.py [-h] [-s SAMPLE_TITLE] [-b BAM_TITLE] [-c COUNT_TITLE]
                    [--version]
                    featurecounts clinical prefix

featurecounts will use the bamfile name as the sample name. This script rename the featurecounts by the given table.

positional arguments:
  featurecounts         featurecounts table file
  clinical              clinical table file with header
  prefix                output prefix, there will be two outputs, one is count output (prefix_count.txt), and the other one is the rename featurecounts (prefix_fc.txt)

optional arguments:
  -h, --help            show this help message and exit
  -s SAMPLE_TITLE, --sample-title SAMPLE_TITLE
                        the column name of the sample name
                        (default: sample)
  -b BAM_TITLE, --bam-title BAM_TITLE
                        the column name of the bamfile name
                        (default: bam)
  -c COUNT_TITLE, --count-title COUNT_TITLE
                        the column name used as identity in count data
                        (default: Geneid)
  --version             show program's version number and exit