Saravanan666/pypi-org huggingface dataset:
Package: utspclient
Universal Time Series Provider ClientThis is a client library for accessing the universal time series provider (UTSP) server that works as a distributed job manager for time series generation tools.
Look into the examples folder for several usage examples.NotesEvery request contains a guid string. This can be whatever you want. This guid is part of a caching mechanism and can be used to enforce recalculation of an otherwhise identical request. This might be interesting if the respective provider has probabilistic components. So if you want a fresh profile every time, set a different guid every time.LicenseMIT LicenseCopyright (C) 2022 David Neuroth (FZJ IEK-3), Noah Pflugradt (FZJ IEK-3), Leander Kotzur (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)You should have received a copy of the MIT License along with this program.
If not, seehttps://opensource.org/licenses/MITAbout UsWe are theInstitute of Energy and Climate Research - Techno-economic Systems Analysis (IEK-3)belonging to theForschungszentrum JÃ¼lich. Our interdisciplinary department's research is focusing on energy-related process and systems analyses. Data searches and system simulations are used to determine energy and mass balances, as well as to evaluate performance, emissions and costs of energy systems. The results are used for performing comparative assessment studies between the various systems. Our current priorities include the development of energy strategies, in accordance with the German Federal Governmentâ€™s greenhouse gas reduction targets, by designing new infrastructures for sustainable and secure energy supply chains and by conducting cost analysis studies for integrating new technologies into future energy market frameworks.AcknowledgementThis work was supported by the Helmholtz Association in the context of the"Energy System Design"program.This work has also received funding from the European Unionâ€™s Horizon 2020 research and innovation programme under grant agreement No 891943.
Package: utterless
UtterlessExtend Python's "unittest" to better handle "logging" messagesThere's a problem when you try to run aunittesttest suite in a codebase which also uses theloggingframework:
You see your nice output of dots (...F....SS....F..)
clogged up with lots of log messages.For occasional cases you can supress log messages in a block
of code withself.assertLogs(...).
But that doesn't scale when almost every test in your suite
generates messages.Alternatively you can fiddle your log levels so that all log
messages get supressed.
But when you have a failing test the log messages can be
very helpful in debugging it.Wouldn't it be great to have an alternative log runner that
captures all log messages.
If the test fails the messages get displayed with the error traceback.
But if the test succeeds then the log messages get silently discarded.Look no further!
This is possibly the package you want.UsageWe assume you already have a test suite that you run something like this:$ python -m unittest discoverHaving installedutterlessyou just need to replace that with:$ python -m utterless discoverOptional UsageUtterless has mechanisms to integrate with some frameworks that
don't run tests throughunittestdirectly.For example,
with Django you can specify the Utterless test runner on the command line:$ ./manage.py test --testrunner utterless.contrib.django.DiscoverRunneror by editingsettings.pyto contain:TEST_RUNNER = "utterless.contrib.django.DiscoverRunner"LicenceThis software copyright P. S. Clarke and is licensed in accordance
with the BSD Three-Clause Licence.Limitations and RoadmapCurrently it completely ignores thewarningsmodule,
so output from that
(e.g. aDeprecationWarningor aResourceWarning)
will still splurts across the screen.
I could possibly collect that up during tests and include it
at the end.
The complication is that warnings should probably still be emited
regardless of whether the test passed or failed.
Treating warnings as errors might be the better option.
Package: utterson
uttersontl;dr;Utterson is a ncurses based management UI for Jekyll based sites. A specific
set of conventions are defined and followed allowing utterson to manage many
aspects of a Jekyll site.ntl;Utterson is primarily a management wrapper for blogs and sites that leverage
Jekyll. Jekyll is a static site generation tool that is blog aware. At it’s
core, Jekyll is just a transformation engine that takes text files written
in specific markup languages and converts them to a static web site. Jekyll is
very flexible, allowing the end users to leverage it in any way they would like.
This flexibility does come at a cost, Jekyll only provides the raw tools to
build a blog or site. Standardized management tools and gui’s do not fit into
the Jekyll mindset. Those are layers the end user is expected to design and
implement.Utterson was created specifically to provide a single convention for a Jekyll
based site. By standardizing on a single convention, a management interface
could be written that allows for automation of many tasks. Interestingly, the
full power of Jekyll is still available but by following the conventions users
can take advantage of the management functionality utterson provides.Utterson was initially created to manage a personal blog. The choice of python
and ncurses was simply for shell based management and because why not. Any
and all enhancement ideas are welcomed.DocumentationAll documentation can be found at the following GitHub repo:
<https://github.com/jrmycanady/Utterson>
Package: uttut
UTTUTUTTerance UTilities for dialogue system. This package provides some general utils when processing chatbot utterance data.BERT PipeTo create a pipe for BERT preprocessing, please take a look atBERT.Installation$ pip install uttutUsageLet's create a Pipe to preprocess a Datum with English utterance.Build a Pipe>>>fromuttut.pipeline.pipeimportPipe>>>p=Pipe()>>>p.add('IntTokenWithSpace')>>>p.add('FloatTokenWithSpace')>>>p.add('MergeWhiteSpaceCharacters')>>>p.add('StripWhiteSpaceCharacters')>>>p.add('EngTokenizer')# word-level (ref: BERT)>>>p.add('AddSosEos',checkpoint='result_of_add_sos_eos')>>>p.add('Pad',{'maxlen':5})>>>p.add('Token2Index',{'token2index':{'<sos>':0,'<eos>':1,# for  AddSosEos'<unk>':2,'<pad>':3,# for Pad'_int_':4,# for IntTokenWithSpace'_float_':5,# for FloatTokenWithSpace'I':6,'apples':7,},},)transform>>>fromuttut.elementsimportDatum,Entity,Intent>>>datum=Datum(utterance='I like apples.',intents=[Intent(label=1),Intent(label=2)],entities=[Entity(start=7,end=13,value='apples',label=7)],)>>>output_indices,intent_labels,entity_labels,label_aligner,intermediate=p.transform(datum)>>>output_indices[0,6,2,7,1,3,3]>>>intent_labels[1,2]>>>entity_labels[0,0,0,7,0,0,0]# intermediate>>>intermediate.get_from_checkpoint('result_of_add_sos_eos')["<sos>","I","like","apples","<eos>"]# label_aligner>>>label_aligner.inverse_transform(entity_labels)[0,0,0,0,0,0,0,7,7,7,7,7,7,0]transform sequence>>>output_sequence,label_aligner,intermediate=p.transform_sequence('I like apples.')>>>output_sequence[0,6,2,7,1,3,3]# label_aligner>>>label_aligner.transform([0,0,0,0,0,0,0,7,7,7,7,7,7,0])[0,0,0,7,0,0,0]>>>label_aligner.inverse_transform([0,0,0,7,0,0,0])[0,0,0,0,0,0,0,7,7,7,7,7,7,0]# intermediate>>>intermediate.get_from_checkpoint('result_of_add_sos_eos')["<sos>","I","like","apples","<eos>"]SerializationSerialize>>>serialized_str=p.serialize()Deserialize>>>fromuttut.pipeline.pipeimportPipe>>>p=Pipe.deserialize(serialized_str)
Package: utub3
utub3YouTubeis the world's most popular video hosting service, and you might come across a situation where you need a video download script. There is autub3for this purpose.Utub3is a lightweight, dependency-free Python library and command-line utility for downloadingYouTubeVideos.Utub3also simplifies piping by allowing you to set callback functions for various download events, such as progress or completion.In addition,utub3includes a command line utility that allows you to download videos directly from the terminal.QuickstartInstallationutub3 requires an installation of Python 3.6 or greater, as well as pip. (Pip is typically bundled with Pythoninstallations.)To install from PyPI with pip:$python-mpipinstallutub3Sometimes, the PyPI release becomes slightly outdated. To install from the source with pip:$python-mpipinstallgit+https://github.com/pchchv/utub3Using utub3 in a Python scriptTo download a video using the library in a script, you'll need to import the YouTube class from the library and pass an argument of the video URL. From there, you can access the streams and download them.>>>fromutub3importYouTube>>>YouTube('https://youtu.be/HxCcKzRAGWk').streams.first().download()>>>yt=YouTube('http://youtube.com/watch?v=HxCcKzRAGWk')>>>yt.streams....filter(progressive=True,file_extension='mp4')....order_by('resolution')....desc()....first()....download()Using the command-line interfaceUsing the CLI is remarkably straightforward as well. To download a video at the highest progressive quality, you can use the following command:$utub3https://youtube.com/watch?v=HxCcKzRAGWkYou can also do the same for a playlist:$utub3https://www.youtube.com/watch?v=UP2XoGfhJ1Y&list=RDUP2XoGfhJ1Y&start_radio=1&t=3s
Package: utubetomp
utubetompConverts a YouTube video to MP4 or MP3..Installation$pipinstallutubetompUsageGitHub: UTubeToMPContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licenseutubetompwas created by Russian-Dev. Russian-Dev retains all rights to the source and it may not be reproduced, distributed, or used to create derivative works.Creditsutubetompwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: utuby
utubyYouTube's API is annoying to work with, and has lots of limitations. utuby is a simple script for downloading Youtube comments without using the Youtube API - No API rate limits. No restrictions. Extremely fast.SourceLinkPyPI:https://pypi.org/project/utuby/Repository:https://santhoshse7en.github.io/utuby/Documentation:https://santhoshse7en.github.io/utuby_doc/Dependenciesbeautifulsoup4requestslxmlcssselectvaderSentimenttextblobpandasDependencies InstallationUse the package managerpipto install followingpipinstall-rrequirements.txtA GlanceDownload it by clicking the green download button here on Github. You only need to parse specific YouTube URL as argument.>>>fromutuby.utubyimportyoutube>>>url='https://www.youtube.com/watch?v=xjQFi-HP7po'>>>youtube=youtube(url)Directory of youtube class>>>print(dir(youtube))Examples for Extracting YouTube Channel Name>>>youtube.channel_name'Fully'Examples Calculating Sentiment Scores for extracted YouTube Comments>>>youtube.final_sentiment_scores{'neu':0.769,'neg':0.051,'pos':0.178,'compound':0.0}Youtube Comments DataFrame>>>youtube.youtube_comments_df.head()ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: utvsapitoken
A little Python class that allows to check a token againstČVUT OAASand get s personal number formUsermap API. Used in ÚTVS API.UsagefromutvsapitokenimportTokenClientclient=TokenClient()info=client.token_to_info('token')You can provide custom URIs for the constructor:client=TokenClient(check_token_uri='http://localhost:8080/token',usermap_uri='http://localhost:8080/user'))This comes with a fake OAAS that can be used for various testing, including the tests of this very project.
To start the fake server, just run:fromutvsapitokenimportfakeserverfakeserver.serve_forever(port=8080)In order to run the testsuite, no need to start the server, just run:PYTHONPATH=. py.test-3 -v --port 8080You can omit the port argument to use the default (8080).This requires Python 3 andrequests.LicenseThis software is licensed under the terms of the MIT license, see LICENSE for full text and copyright information.
Package: utwist
Unit testing with twisted is a bit difficult if the tests require the reactor
to run. The official way is to use twisted’s own unit testing framework calledtrial. It is very similar to theunittestmodule. If you would like
to use another framework, or if you like nice IDE integration thenutwistmight be the right thing for you.Note that it is considered good practice to write unit tests that
don’t perform IO. But for integration tests, and probably some unit-tests as well,
you’ll need a reactor running.Disclaimer:utwistis quite a hack. It works, I test it regularly on Linux,
OSX, and Windows, but future versions of twisted might break it. You’ve been
warned. Hopefully twisted will come in with a better testing solution eventually.This library is open source and released under the MIT License.You can install it withpip install utwist. It doesn’t need to
compile anything, so there shouldn’t be any surprises. Even on Windows.Let’s get going!fromutwistimportwith_reactor@with_reactordeftest_connect_with_tcp():point=TCP4ClientEndpoint(reactor,"google.com",80)d=point.connect(MyFactory())returndIf run withnosethis will do exactly what you’d expect.
It opens the network connection. The test will fail because
the connection wasn’t closed.utwistchecks that the reactor
is clean at the end of the test.Of course you don’t have to usenose. It works just as well
withunittest, and probably also with most other frameworks.Deferred return valuesIf the test function returns a deferred then the test will
be successful if the deferred resolves to a value or unsuccessful
if the deferred errbacks.Setup and tear-downIf there is a function calledtwisted_setup()in the same class
as the test function is defined, then this function will be invoked
before the test, but already in the context of the reactor. Note that
the regular setup function provided by the testing framework will
be executed too, but not in the reactor context.Accordingly, if there is atwisted_teardown()it executes after the
test function, even if the test failed.Setting a timeoutIf the test, includingtwisted_setupandtwisted_teardown, has
not completed within the timeout, the test fails. The timeout defaults
to two minutes. A timeout duration of zero disables the timeout.To specify a different timeout pass it (in seconds) to the decorator:@with_reactor(timeout=10)deftest_quick():...How does it workI spare you the details, bututwiststarts the reactor in a separate thread when
the first test is started and lets it run until the end (the reactor cannot be restarted).
It usesblockingCallFromThread()to run the test method inside the reactor.
Other than that there are some tricks to check if the reactor is clean, and to clean
it if not. There is also a very dirty hack to make signals work even though the
reactor doesn’t run in the main thread.Bug Reports and other contributionsThis project is hosted hereutwist github page.AlternativesIf you don’t mind using a cut-down version ofunittestfor your tests, nor to run
the tests with the special runner, then I highly recommendtrial. It is the
official unit testing tool provided by twisted.
Package: utx
UTXlogo安装命令行执行pip install -U utx设计理念很大程度上借鉴了HttpRunner（优秀的框架）。不同的是，utx更着重写python，而不是写yaml文件。简单是更好的每个人都能用python写自动化UI自动化跟的上冲刺迭代和UI变更这就是utx的设计理念。项目结构utx提供了快速创建项目的能力，也就是脚手架。【app脚手架】utxstartprojectproject_name【web脚手架】utxstartproject-webproject_name$ utx startproject demo
2021-09-01 12:39:16.491 | INFO     | utx.cli.scaffold:create_scaffold:51 - Create new project: demo
Project root dir: /PycharmProjects/demo

Created folder: demo
Created folder: demo/config
Created folder: demo/logs
Created folder: demo/packages
Created folder: demo/report/airtest
Created folder: demo/tests
Created folder: demo/suites
Created file: demo/.gitignore
Created file: demo/conftest.py
Created file: demo/pytest.ini
Created file: demo/run.py
Created file: demo/requirements.txt
Created file: demo/config/conf.py
Created file: demo/config/config.ini
Created file: demo/config/__init__.py
Created file: demo/tests/test_devices.py
Created file: demo/tests/__init__.py
Created file: demo/report/summary_template.html调用流程图专注于写脚本项目结构很清晰。在conftest.py进行一些初始化/参数化/清理工作，在suites/写测试脚本。在AirtestIDE中写好.air脚本，然后将文件放到suites文件中。更注重平铺写脚本的方式，这样就离“每个人都能用python写自动化”更近一步。毕竟封装之后看着容易晕，我也晕。去除掉框架的约束，给每个人写python的自由，在测试脚本里你可以尽情发挥你的代码风格，代码能力，千人千面。代价呢，就是代码质量参差不齐。大胆写，能写，写出来，跑通，就已经是在写自动化，就已经是在创造价值了！轻封装utx尊重原生用法。airtest的封装只通过装饰器进行了运行方式的调整，没有做任何其他的冗余修改。faker，造数据工具pytest，测试框架airtest，自动化测试工具tidevice，iOS设备管理工具pandas、numpy，数据处理工具安装utx，自动就把这些开源利器安装上了，无需单独安装。未来会集成更多实用工具到utx中。utx本身是很轻的。核心价值上手 0 门槛，iOS/Android 设备均实现即插即用，随写随调测试用例可读性高，编写成本低，支持python语法，便于公共操作抽象，进一步提高用例可维护性用例执行高鲁棒性，多设备机型切换无需更改用例适配执行集创建简单，支持智能并发、分组单模块执行，更高效更灵活功能介绍支持android,ios,web 平台的自动化测试框架脚本批量执行每个脚本执行日志分开存放每个脚本单独生成一个html报告并在父文件夹生成一个聚合报告自定义的聚合报告，详细展示运行结果重试机制，运行失败自动重跑，可自定义重跑次数自定义脚本运行，可选择部分模块单独运行自带脚手架工具可以快速生成框架目录app使用说明只需在配置文件中填好相关内容，即可运行！[device_info];设备远程链接URL 设备ip+端口或者设备唯一标识id，多个设备以,分割；例如 设备1,设备2,设备3device=127.0.0.1:5555;设备平台iOS或者Androidplatform=android;ios设备驱动包名，仅测试iOS时需要wda=com.facebook.WebDriverAgentRunner.utx.xctrunner;是否执行安装卸载操作 True/Falseinit=False[app_info];app包名package=com.wx.mp.test;apk或者ipa文件名filename=app_test.apk[reruns];失败后再次运行次数，默认1次times=1[paths];自定义执行case目录层级，文件夹名称（例如：smoke），默认为空name=[mode];False 表示 运行[suites][cases]选择的用例，True表示运行全部用例is_all=True;是否录制视频 True/Falserecord=False[suites];填写用例的关键字cases=test.airapp启动命令普通启动pythonrun.py参数化启动# Androidpythonrun.py--platform=Android--device=127.0.0.1:5555--init=True# iOSpythonrun.py--platform=iOS--wda=com.facebook.WebDriverAgentRunner.utx.xctrunner--init=True参数优先级大于配置文件多个设备以,分割; 例如 python run.py --platform=Android --device=设备1,设备2,设备3 --init=Trueweb使用说明无需关注 chrome浏览器驱动注意：无需配置 chromedriver ，系统会自动化维护匹配版本。只需在配置文件中填好相关内容，即可运行！[web_info];被测的主页urlurl=https://www.baidu.com/;是否无界面运行headless=False[reruns];失败后再次运行次数，默认1次times=1[paths];自定义执行case目录层级，文件夹名称（例如：smoke），默认为空name=[mode];False 表示 运行[suites][cases]选择的用例，True表示运行全部用例is_all=True[suites];填写用例的关键字cases=chromeweb启动命令普通启动pythonrun.py参数化启动pythonrun.py--headless=True--driver=/Users/admin/driverpath参数优先级大于配置文件运行结果报告展示
Package: utz
utz("oots"): imports and utilities for easy wildcard-importing + boilerplate-reductionInstallpipinstallutzUseImport everything:fromutzimport*See__init__.py, which imports many of the modules below, as well as a many standard-library methods and objects.FeaturesSome noteworthy modules:cd: "change directory" contextmanagero:dictwrapper exposing keys as attrs (e.g.:o({'a':1}).a == 1)process: subprocess wrappers for more easily shelling out to commands and parsing their stdoutdocker: DSL for programmatically creating Dockerfiles (and building images from them)ssh: SSH tunnel wrapped in a context managertime:now()/today()helpers with convenient / no-nonsense ISO string serialization and UTC biasbases:int⟺strcodecs with improvements over standard base64 et al.tmpdir: make temporary directories with a specific basenamecontext: contextmanager helpers, includingctxsfor composing multiple context managersescape: escaping split/join helpersbackoff: simple exponential-backoff utilitygit: git helpers / wrappers aroundGitPythonpnds: commonpandasimports and helperscollections: collection/list helpersauto-setup.pyutz/setup.pyprovides defaults for varioussetuptools.setup()params:name: use parent directory nameversion: parse from git tag (otherwise fromgit describe --tags)author_{name,email}: infer from last commitlong_description: parseREADME.md(and set `long_description_content_type)description: parse first<p>under opening<h1>fromREADME.mdlicense: parse fromLICENSEfile (MIT and Apache v2 supported)For an example, seegsmo==0.0.1(and corresponding release).It can be installed via a pip extra:pipinstallutz[setup]
Package: uu2nano
uu2nanoSimple tool for converting well-knownUUIDformat (36 chars) tonanoidformat (21 chars).Details of conversionUUID is basically a 128-bit number. Some of those bits contain metadata including
the version, on which the content of the remaining bits depends.
For example, for UUIDv4 all 122 unspecified bits should contain random entropy.
But more interesting that regardless of version, 2 bits in each UUID are fixed.
That is why any UUID of any version could be encoded as 126 bits.UUIDs are encoded in hex format (4 bit per symbol) and 4 hyphens are added
as separators, which leads to 128/4 + 4 = 36 characters in the string representation.For example:492b6acb-05c7-4914-b139-253070a085e9Nanoid is encoded using 64 URL-safe symbols (A-Za-z0-9_-) which makes possible
to store 6 bits of information per symbol. To store 126 UUID bits, only
126 / 6 = 21 characters are used in the string representation.For example:ggHEMKl5gfh2T7h-KC6lDUsageConvert one to another:importuuidfromuu2nanoimportfix_uuid,nanoid_to_uuid,uuid_to_nanoiduu=uuid.uuid4()nano=uuid_to_nanoid(uu)assertuu==nanoid_to_uuid(nano)If you receive not compliant UUIDs from third parties, there is a chance that eventually
two reserved fixed bits could be wrong. In this caseuuid_to_nanoidwill fail:@app.postdeffind_book(uu:uuid.UUID):nano=uuid_to_nanoid(uu)AssertionError:Wrongmarkbits.Usefix_uuid()fortruerandominputIf this happens you can usefix_uuidfunction to get a valid UUID.
Please note that in this case UUID will be changed, so you have to save
new alias somewhere (in UUID, int, or nanoid format).
Package: uuid0
V4 UUIDs are often used as primary keys or as part of database indexes.
However, their random and non-sequential nature can cause locality and
performance issues.This Python 3 package mitigates these issues by using encoding a UNIX
timestamp in the first 6 bytes of the UUID, and filling the remaining bytes
with random data. Theuuid0.UUIDclass inherits from the standarduuid.UUIDclass so it’s safe to use all the usual properties (hex, int,
bytes, etc.)The package also containsuuid0.djangowhich provides Django form and
model fields based on the UUID0 type, as well as an abstractUUID0Model.StatusThis package is inalphastatus, use at your own risk.UsageInstall by running:pip install uuid0Example usage:>>> import uuid0

# make a UUID based on the current time
>>> uuid0.generate()
UUID('0dc7ef03-c534-d288-67b7-34cf4dfa9350')

# make a UUID from a string of hex digits (braces and hyphens ignored)
>>> x = uuid0.UUID('{0b7dd8d0-7e40-8360-9322-4a361d7b573f}')

# extract the datetime from a UUID
>>> str(x.datetime)
'2010-01-15 00:00:36'

# convert a UUID to a string of hex digits in standard form
>>> str(x)
'0b7dd8d0-7e40-8360-9322-4a361d7b573f'

# convert a UUID to a base62 string
>>> x.base62
'LgQWTxkOpLyTaEuRAav9D'

# make a UUID from a base62 string
>>> uuid0.UUID(base62=x.base62)
UUID('0b7dd8d0-7e40-8360-9322-4a361d7b573f')

# get the raw 16 bytes of the UUID
>>> x.bytes
b'\x0b}\xd8\xd0~@\x83`\x93"J6\x1d{W?'

# make a UUID from a 16-byte string
>>> uuid0.UUID(bytes=x.bytes)
UUID('0b7dd8d0-7e40-8360-9322-4a361d7b573f')What about collisions?Collisions are a concern, of course, but only if you are generating reallylargeamounts of UUIDs in a short timespan.By default, uuid0 only uses 6 bytes to encode the time and does not encode any
version bits, leaving 10 bytes (80 bits) of random data.The probability of collision is near zero for most use cases since for each
1/10000s period, there are 280possible UUIDs.PerformanceGenerating a UUID0 is slower than generating a UUID v4, but faster than a
UUID v1.Below are results for 500k iterations on an i7-6700HQ and Python 3.6.2
(generated using thebenchmarks/generate.pyscript):methodit/s?s/it% sloweruuid.uuid4()4530432.2070.0%uuid0.generate()3111843.21431.31%uuid.uuid1()2301634.34549.2%In terms of database performance, indexes are approximately 18% smaller and
inserts about 23% faster on PostgreSQL with auuidtype column, but YMMV
depending on your use case.LicenseThis project is licensed under the MIT License. See theLICENSEfile for
details.