Saravanan666/pypi-org huggingface dataset:
Package: utf8config
Welcome toutf8configDocumentationutf8 format config file IO tool.Features:Comment Control. (You can choose ignore comment or not while dumping)Allow unicode character.Smart parser for number, string, boolean, None, list.Example:# content of config.ini
### DEFAULT is the default section
### DEFAULT是默认Section
[DEFAULT]
localhost = 192.168.0.1 # IP地址, 默认 192.168.0.1
port = 8080 # 端口号

### 下面的是尝试连接的最长时间
connection_timeout = 60 # 单位是秒, 默认60

# Test是用来测试各种数据类型是否能被成功解析的
# 用Configuration.load()看看会不会成功吧

[TEST]
# Single Value
# 以下是单值项
# 即非列表的值
int = 123 # 123
int_pos = +123 # 123
int_neg = -123 # -123
float = 3.14 # 3.14
float_pos = +3.14 # 3.14
float_neg = -3.14 # -3.14
str = Hello World! # str "Hello World!"
str_quote = 'Good Boy' # str "Good Boy"
str_double_quote = "Bad Boy" # str "Bad Boy"
str_quote_in_quote = '"Boy"' # str '"Boy"'
str_int = '123' # str "123"
str_float = '3.14' # str "3.14"
str_bool = 'True' # str "True"
str_path = C:\用户\管理员 # str "C:\用户\管理员"
str_utf8 = 中文 # str "中文"
bool_true = True # True
bool_yes = Yes # True
bool_false = False # False
bool_no = No # No
none_none = None # None
none_null = null # None
none = # None

# List Value
# 以下是各种列表
empty_list = , # Empty list []
int_list = 1, -2, 3 # [1, -2, 3]
int_none_list = , -2,3 # [None -2, 3]
float_list = 1.1, -2.2, 3.3 # [1.1, -2.2, 3.3]
float_none_list = , -2.2,3.3 # [None -2.2, 3.3]
str_list = a, b, c # ["a", "b", "c"]
str_single_quote_list = '1', '2', '3' # ["1", "2", "3"]
str_double_quote_list = "1", "2", "3" # ["1", "2", "3"]
str_path_list = C:\windows, C:\中文 # ["C:\windows", "C:\中文"]
str_special_list = a, '1', '3.14', "True", "no", ,"None" # ["a", "1", "3.14", "True", "no", "None"]
bool_list = True, False # [True, False]
bool_yes_no_list = Yes, No # [True, False]Usage:Read and Write:fromutf8configimportConfig,Section,Fieldconfig=Config.load("config.ini")forsection_name,sectioninconfig.items():...section=Config["DEFAULT"]forfield_name,fieldinsection.items():...localhost=section["localhost"]port=section["port"]localhost.key# "localhost"localhost.value# "192.168.0.1"withopen("config.ini","w")asf:text=config.dump("config.ini",ignore_comment=True)f.write(text)Programmatically Construct Config:config=Config()DEFAULT=config["DEFAULT"]DEFAULT.add_field(Field(key="localhost",value="192.168.0.1"))TEST=Section("TEST")TEST.add_field(Field(key="numbers",value=[1,2,3]))config.add_section(TEST)Quick LinksInstallutf8configis released on PyPI, so all you need is:$pipinstallutf8configTo upgrade to latest version:$pipinstall--upgradeutf8config
Package: utf8conv
UTF-8 编码转换工具参数说明-i / --input输入文件或者文件目录-o / --output_folder输出目录-s / --suffix需要转化的文件后缀名，如： .txt .json .c .py 等-v /  --verbose输出详细处理文件-h / --help参数说明Requirement:Python >= 3.6chardettqdm安装pip install utf8conv使用python 使用# 帮助python-mutf8conv-h# 基本使用python-mutf8conv-i输入文件/目录-o输出目录-t格式列表# 使用示例,转化code 目录下 .txt .json .c .cpp .py 为utf-8 格式python-mutf8conv\-i/root/code\-o/root/code_u8\-s.txt.json.c.cpp.py# 转化文本文件python-mutf8conv-i/root/code/abc.cpp-o./二进制可执行文件TODO List编译可执行文件换行CRLF(windows) --> LF(unix)GUI 界面版本异常捕捉简繁体切换
Package: utf8forgood
utf8forgood-----------**Tired of Python's `UnicodeDeocodeError, ascii codec can't decode?`**Here's how to fix it, once and for all.1. `$ pip install utf8forgood`2. in your main program, add```import utf8forgood```If you like it, make the change permanent in your sitecustomize.py:```# /path/to/site-packages/sitecustomize.pyimport utf8forgood```To find the path to `sitecustomize.py`, run `python -m site` or read up onthe [site-specific configuration hook][8].Why?----In general to the above, the fastest remedy is probably trying out the following, in this order:1. Use `PYTONIOENCODING=UTF-8 python /path/to/program.py`2. Use the [`sys.setdefaultencoding`][1] hack. That is, unless you care [what others say][2]3. Write your own import function to [convert data][3] appropriately, which is generally the [recommended way][4].After [much consideration][7] and trying option 3 I finally concluded that option 2is the straight forward way and usually [just does what you want][5], on the off-chance of [getting yourself in trouble][6].[1]: http://stackoverflow.com/a/17628350/890242[2]: http://stackoverflow.com/questions/28657010/dangers-of-sys-setdefaultencodingutf-8[3]: http://stackoverflow.com/a/28760303/890242[4]: http://stackoverflow.com/a/34378962/890242[5]: http://stackoverflow.com/a/29558302/890242[6]: http://stackoverflow.com/a/29561747/890242[7]: http://stackoverflow.com/a/27745947/890242[8]: https://docs.python.org/2/library/site.html
Package: utf8tobibtex
The package provides two functions:protect_caps puts capital letters in braces to prevent lowercasing by BibTeXutf8_to_bibtex converts a lot of latin letters from utf8 to BibTeX friendly input, e.g., ä is converted to {"a}.It can handle more characters than GNU recode can handle, and the TeX output is optimised for BibTeX.Hint: Depending on the context it may be necessary to ensure that the argument of utf8_to_bibtex has the right encoding. You can achieve this by using utf8_to_bibtex(astring.encode(“utf-8”)).
Package: utf9
DescriptionOn April 1st 2005, IEEE released theRFC4042“UTF-9 and UTF-18
Efficient Transformation Formats of Unicode” :The current representation formats for Unicode (UTF-7, UTF-8,
UTF-16) are not storage and computation efficient on platforms that
utilize the 9 bit nonet as a natural storage unit instead of the 8
bit octet.Since there are not so many architecture that use9 bit nonets as
natural storage unitsand the release date was on April Fools’ Day, thebeautifulUTF-9 was forgotten and no python implementation is
available.This python module is here to fill this gap! ;)UsageThere are only two functions:utf9encode(string): takes a string and returns a utf9-encoded
version.utf9decode(data): takes utf9-encoded data and returns the
corresponding string.Example>>> import utf9
>>> encoded = utf9.utf9encode(u'ႹЄLᒪo, 🌍ǃ')
>>> print repr(encoded)
'p\xe0\xb7-\x0c!1\xc3\x92\xd5\x1b\xc5\x82\x07n\x83x\xed\xdecX\xf80'
>>> print utf9.utf9decode(encoded)
ႹЄLᒪo, 🌍ǃ
Package: utf-table-generator
utf-table-generatorМодуль генерирует код для печати вот так таких таблиц:╔════════╦═════════════╦═══════╦═════════╦════╗
║ number ║       float ║     t ║ boolean ║  a ║
╠════════╬═════════════╬═══════╬═════════╬════╣
║    123 ║   12345.456 ║  test ║    True ║  1 ║
╚════════╩═════════════╩═══════╩═════════╩════╝Вот так использовать:fromutf_table_generator.tableimportTabletitles=('number','float','t','boolean','a')variables=(123,12345.4564876435,'test',True,1)t=Table(titles,variables,precision=3)# precision -- количество знаков после запятой, по умолчанию 5print(t.get_code())Пример сгенерированного кода:print("╔"+"═"*8+"╦"+"═"*13+"╦"+"═"*7+"╦"+"═"*9+"╦"+"═"*4+"╗")print("║%7s║%12s║%6s║%8s║%3s║"%("number","float","t","boolean","a"))print("╠"+"═"*8+"╬"+"═"*13+"╬"+"═"*7+"╬"+"═"*9+"╬"+"═"*4+"╣")print("║%7d║%12.3f║%6s║%8s║%3d║"%())print("╚"+"═"*8+"╩"+"═"*13+"╩"+"═"*7+"╩"+"═"*9+"╩"+"═"*4+"╝")Принимаемые значения:int,float,booleanи все объекты с методом__str__
Package: utfuzz
utfuzzutfuzzis a Python fuzzing engine, generating ready-to-use unit tests for both error and regression suites.Prerequisitesutfuzzsupports Python 3.8–3.11.utfuzzdepends on Java 17 and newer. If you do not have Java installed,utfuzzwill install it, or your can do it
manually using these instructions:LinuxWindowsmacOSInstallationInstall from archive:Downloadutfuzz.tar.gzRun:python-mpipinstallutfuzz.tar.gzInstall from GitLab repository:python-mpipinstallgit+https://gitlab.com/tamarinvs19/utfuzzInstall from source code:gitclonehttps://gitlab.com/tamarinvs19/utfuzzcdutfuzz
python-mpipinstall./UsageYou can runutfuzzin one of three modes:dialogue mode (default)config file modeCLI arguments modeUpon each test generation, settings are saved to theutfuzz_config.jsonfile.Generate tests in a dialogue modeBy default,utfuzzruns in a dialogue mode. You can use prompts and configure test generation, or stick to default options:python-mutfuzzorutfuzzThe resulting tests appear in the autogeneratedutfuzz_testsfolder by default.Generate tests using CLI optionsTurn off the dialogue mode with–-skip-dialogand specify the necessary options, for example:python-mutfuzz–-skip-dialog-o/mnt/c/Users/username/uftestsGenerate tests using a configuration fileEdit theutfuzz_config.jsonfile and enable the--use-config-fileoption:python-mutfuzz--use-config-fileRun testsRun the generated tests as the usualunittestones.Optionsusage:utfuzz[-h][--skip-dialog][--use-config-file][--generate-only-error-suite][-jJAVA][-tTIMEOUT][-pPROJECT_DIR][-oOUTPUT_DIR][--sys-paths[SYS_PATHS...]][--analyze-targets[ANALYZE_TARGETS...]][--requirements-fileREQUIREMENTS_FILE][--debug]utfuzzisaPythonfuzzingengine,generatingready-to-useunittestsforbotherrorandregressionsuites.

options:-h,--helpshowthishelpmessageandexit--skip-dialogdonotaskforoptionsinteractively--use-config-fileuseconfigfilefromcurrentdirectory--generate-only-error-suitegenerateonlyerrorsuite-jJAVA,--javaJAVApathtoJavaexecutablefileorJAVA_HOME-tTIMEOUT,--timeoutTIMEOUTtimeoutinsecondsforgeneratingtestsperclassorgroupoftop-levelfunctionsfromonefile-pPROJECT_DIR,--project-dirPROJECT_DIRrootdirectorywithcodeundertest(usedforimportsanddependencyresolving)-oOUTPUT_DIR,--output-dirOUTPUT_DIRdirectoryforgeneratedtests--sys-paths[SYS_PATHS...]additionalpathtofindimports(willbeaddedto`sys.path`;default=projectdirectory)--analyze-targets[ANALYZE_TARGETS...]listoffilesordirectoriestotest;emptyvaluefieldmeans<<testall>>--requirements-fileREQUIREMENTS_FILEpathtorequirements.txt--debugusedebugmodeutfuzzhas theUnitTestBot fuzzing engineinside. To change the version of the UnitTestBot source,
replace it with the necessaryutfuzz/utbot-cli-python.jarfile (do not change the file name).
Upon replacing, remember to reinstall this module.For more information, see theUnitTestBot websiteand the relatedGitHub repository.
Package: uth
AboutUnit Test Helpers (uth) is a simple library for Python containing some helper methods for unit testing.I found myself writing a lot of setup code usingunittest.mock.patchandunittest.TestCase.addCleanup:classMyTestCase(unittest.TestCase):defsetUp(self):patcher=unittest.mock.patch('module.function')patcher.start()self.addCleanup(patcher.stop)# Or if there was many functions and/or objects to patch# something like:forpatcherin(unittest.mock.patch('function_a'),unittest.mock.patch('function_b'),):patcher.start()self.addCleanup(patcher.stop)Adding helper methods to TestCase classes (via mixin class) allows easier patching:importunittestimportunittest.mockimportuthdeffunction_a():returnNoneclassMyTestCase(unittest.TestCase,uth.MockMixin):defsetUp(self):# The function function_a is immediately patched and patching is stopped# automatically after the test has run (using unittest.TestCase.addCleanup).mock=self.patched('{}.function_a'.format(__name__),return_value=self.sentinel.retval)deftest_function_a(self):self.assertEqual(function_a(),self.sentinel.retval)deftest_sentinel(self):self.assertEqual(self.sentinel.value,unittest.mock.sentinel.value)deftest_mock(self):mock=self.mock(return_value=self.sentinel.retval)self.assertIsInstance(mock,unittest.mock.Mock)Thepatchedmethod is the only one that actually provides functionality not directly present inunittest.mock. The
membersmock,patchandsentinelare provided for convenience; you don’t need to importunittest.mockand you
can access mock related functionality throughself.APIuth.MockMixinA mixin class forunittest.TestCase(or any other class from which you want to use Mock, sentinel and/or patch).The following members are added:ANYunittest.mock.ANYsentinel(property)Access tounittest.mock.sentinelcall(*args, **kwargs)unittest.mock.callmock(*args, **kwargs)Callsunittest.mock.Mockwith given argumentsmagic_mock(*args, **kwargs)Callsunittest.mock.MagicMockwith given argumentspatch(*args, **kwargs)Callsunittest.mock.patchwith given argumentspatched(*args, **kwargs)Callsunittest.mock.patchwith given arguments, starts the returned patcher, registers stopping the patcher
usingself.addCleanupand returns the return value ofpatcher.start(theMockobject).
Package: uthibs
FunctionsAll my personal functions that might be reusable later
Here is what you can find in this repo :general.py: useful general functions I wrote and think might be reusable in all kinf of projectsecundary.py: other functions that I wrote but more understable in their own context and then less 'generalizable'serie_gestion.py: aims to collect manipulation on pandas.Series. Get a Series and send another one of same length. These functions can easily bepipedts_analysis.py: class whiwh allow to manipulate time series. Useful for cross-val in time Series. Documentation should come later about it.time_format.py: set of functions to manipulate time values and make conversions (ISO, pandas, time, datetime)slack.py: script to easily send messages on a slack channel (I created a personnal env where I have a channel per project)
Package: uthreads
Introduction‘uthreads’ is a microthreading library layered on top of Twisted
Python. It is similar to DeferredGenerator, but uses features only
present in Python 2.5 to make the microthreaded code much more
natural to read and write. See the MotivatingExample for an idea of
how uthreads can be useful.This project aims to be a compact, efficient, and easy-to-use
microthreading platform, allowing users to concentrate on writing
their applications in a natural fashion while retaining all of
the benefits of microthreaded programming. Applications can easily
intermix twisted code with microthreaded code, as the structure of
the application dictates.DocumentationSee the wiki documentation athttp://uthreads.googlecode.com/, or read
the source files in the wiki/ subdirectory of the source distribution.
Package: uTidylib
This is fork of uTidylib with permission with original author. Originally it
incorporated patches from Debian and other distributions, now it also brings
compatibility with recent html-tidy versions and works with Python 3.The package is available on PyPI <https://pypi.org/project/uTidylib/>.This is uTidylib, the Python wrapper for the HTML cleaning
library named TidyLib. It supports both original Tidy <http://tidy.sf.net> and new
HTML5 enabled Tidy <http://www.html-tidy.org/>.Once installed, there are two ways to get help.  The simplest is:$python>>>importtidy>>>help(tidy)...Then, of course, there’s the API documentation, which
is available at <https://utidylib.readthedocs.io/en/latest/>.10 Second Tutorial>>>importtidy>>>print(...tidy.parseString(..."<Html>Hello Tidy!",...output_xhtml=1,...add_xml_decl=1,...indent=1,...tidy_mark=0,...doctype="transitional",...)...)<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
  </head>
  <body>
    Hello Tidy!
  </body>
</html>Good luck!
Package: util2
DatetimeExtenderhis Python library can perform various calculations for datetime.このPythonライブラリは時刻の各種計算を行うことができます。GithubDocumentGetting started（導入）Install withpip.pipで簡単にインストールできます。pip install util2License（ライセンス）This sample code is licensed under the MIT License.
サンプルコードはMITライセンスで公開しています。
Package: util-belt
utility beltThis is a utility package which can simplify a lot of common and repetitive tasks.It contains different utility functions.to install it usepip install util-beltandpipwill install the latest version of the packageList of functionalitiesfile utilitieslist to textto save a list to text file for later use you can do it using thelist_to_txt()funtion in thefile_utilsmodule.examplefrom util_belt.file_utils import list_to_txt

my_list = [3,5,6,7]
list_to_txt(my_list , file_dest = './list.txt')file_destparameter is the file path where the list should be saved at.By default it is  the current directory and the file name islist.txtyou can change that to any file path you want. the funtion will save your listto a file with out worrying about details in file handling.Currently this library can only save simple lists or 1D listsfile from listto get a list saved in a txt file uselist_from_txtfunction in thefile_utilsmoduleExamplefrom util_belt.file_utils import list_from_txt

my_list = list_from_txt('Documents/my_list.txt')Currently this library can only save and retrieve simple lists or 1D lists.it will inlude more flexiblity and functionalities in the next updatedisplay utilitiespretty print an arraythis functionality could be accessd at thedisplay_utilmoduleit helps us print a numpy array beatifulyExamplefrom util_belt.display_utils import pretty_array
three_d_array = np.random.randint(0, 10, size=(2,7,12))

pretty_array(three_d_array,colorify = False,axis=0)Thecolorifyparameter determines if the display should be colorful (by default it is flase).Theaxisparameter determines on which axis of the array should the different
bands of color applied(by defualt it is 0).
the out put from the above example looks like as follows:/ 6 0 4 3 5 8 4 7 9 1 4 3 /
     / 9 6 2 1 0 6 4 3 4 9 4 6 /
    / 6 3 5 1 4 9 8 9 9 0 8 4 /
   / 5 7 3 6 9 9 6 7 1 6 4 5 /
  / 6 2 1 6 5 6 4 0 8 9 1 2 /
 / 7 2 6 7 0 1 4 7 5 0 7 7 /

       / 7 3 5 1 5 7 2 4 5 6 1 5 /
      / 9 2 2 1 5 6 5 2 4 4 6 9 /
     / 4 1 6 8 6 0 2 6 8 4 0 7 /
    / 3 8 9 3 9 8 9 7 8 1 8 8 /
   / 4 5 7 7 0 5 4 5 5 1 4 7 /
  / 9 6 1 6 2 5 8 8 4 9 5 2 /
 / 7 2 8 2 7 7 3 4 3 1 0 9 /The origin or the[0][0][0]in this display starts from the bottom left corner.Then the first axis (height) increases from bottom to top (like a Z axis in typical 3D cartesian plane)The second axis (rows) increases away from the origin point along the diagonal lineThe third axis (columns) increases horizentaly to the right.This can be shown in the diagram belowfirst axis

|    second axis
|   /
|  /
| /
|/_________ third axisif there is any issue,a bug or recommendation report onhttps://github.com/kellemNegasi/util_belt
Package: util-ds
AbstractiveThis project is a convenient part of the NLP project, including several already exposed projects such as summy and text processing. One of the main functions is sentence token in japanese.The open resources we use are:rouge [Apache-2.0 license]:https://github.com/pltrdy/rougesummy [Apache-2.0 license]:https://github.com/miso-belica/sumynltk [Apache-2.0 license]:https://pypi.org/project/nltk/jieba [MIT License (MIT)]:https://pypi.org/project/jieba/MeCab [BSD License (BSD)]:https://pypi.org/project/mecab-python3/SudachiPy [Apache-2.0 license]:https://pypi.org/project/SudachiPy/ExamplesThe sentence token example.>>>fromutil_ds.nlp.sentence_tokenimportsentenceToken>>>sentence="ドイツ連邦共和国（ドイツれんぽうきょうわこく、独: Bundesrepublik Deutschland）、通称ドイツ（独: Deutschland）は、中央ヨーロッパ西部に位置する連邦共和制国家。首都および最大の都市（英語版）はベルリン[1]。南がスイスとオーストリア、北にデンマーク、西をフランスとオランダとベルギーとルクセンブルク、東はポーランドとチェコとそれぞれ国境を接する。">>>sentences=sentenceToken("japanese",sentence)>>>["ドイツ連邦共和国（ドイツれんぽうきょうわこく、独: Bundesrepublik Deutschland）、通称ドイツ（独: Deutschland）は、中央ヨーロッパ西部に位置する連邦共和制国家。首都および最大の都市（英語版）はベルリン[1]。","南がスイスとオーストリア、北にデンマーク、西をフランスとオランダとベルギーとルクセンブルク、東はポーランドとチェコとそれぞれ国境を接する。"]Notes: The above functions can basically be replaced by the following functions.>>>importre>>># Didn't consider the more complicated case here.>>>defsentenceToken(language,text):>>>pattern='([。！？\?])([^」』）])'>>>sentences=re.sub(pattern,r"\1\n\2",text).split("\n")>>>sentences=list(map(lambdax:x.strip(),sentences))>>>sentences=list(filter(lambdax:x!="",sentences))>>>returnsentences
Package: utile
utileThe python package which eases your<codeflow>using@decorators.Now integrated with rust!InstallationInstall with:pip install utileForGoogle Colab:!pip install utileThe art of using decoratorsDecorators is one of the many concepts which makes Python programming amazing. The key usage
of decorators is to modify the functionality or state (behavior) of a function. This package brings out a relatively
new concept ofFunction Foundation.Function Foundation is a style of programming where a function tends to do nothing and acts like a robust base (or
foundation) for decorators and these decorators can be made to do sophisticated processes over the idle function.
This (according to us) eases intricate function designing.Getting Started@timer() decoratorTo compute execution time of a function:fromutile.Timerimporttimerimporttime@timer()deffoo():time.sleep(1)foo()This will show the execution time (in seconds) irrespective of any print statements.Key features of utile@threader() decoratorProvides an easy way to run multiple I/O bound tasks with no hassle of thread pools.
Everything is done for you!importrequestsfromutile.Threaderimportthreaderdefget_requester(endpoint):returnrequests.get(f"https://localhost:5000/api/{endpoint}").text# sample GET request@threader({get_requester:[["user/1"],["user/1/followers"]]})deffoo():passfoo()The@threader()decorator takes in a frame-determined structure of all your functions along with its arguments
and returns the list of all the return values of the tasks.@processor decoratorProvides an easy way to run multiple CPU bound tasks with no hassle of Process pools.Again, Everything is done for you!fromutile.Processorimportprocessordefpower(a,b):returnpow(a,b)# a sample method for computational taskif__name__=="__main__":# important to ensure this.@processor({power:[[123,321]for_inrange(10000)]})deffoo():passprint(foo())The@processor()decorator takes in a frame-determined structure of all your functions along with its arguments
and returns the list of all the return values of the tasks.It's that simple! We take care of all your Pooling processes and you do your work!For more information, seeDocumentation.ContributionWe encourage anyone who comes up with new ideas using decoratorstocontributeand collaborate (do star the repo if you like it !).