Saravanan666/pypi-org huggingface dataset:
Package: gytmdl
Glomatico's YouTube Music DownloaderDownload YouTube Music songs/albums/playlists with tags from YouTube Music in 256kbps AAC/128kbps Opus/128kbps AAC.Why not just use yt-dlp directly?While this project uses yt-dlp under the hood, it has the advantage of utilizingYouTube Music's APIto get songs metadata. This includes information such as track number, square cover, lyrics, year, etc.SetupInstall Python 3.8 or higherInstall gytmdl with pippip install gytmdlAdd FFmpeg to PATH or specify the location using the command line arguments or the config file (seeConfiguration)(optional) Set a cookies fileBy setting a cookies file, you can download age restricted tracks, private playlists and songs in 256kbps AAC if you are a premium user. You can export your cookies to a file by using the following Google Chrome extension on YouTube Music website:https://chrome.google.com/webstore/detail/gdocmgbfkjnnpapoeobnolbbkoibbcif.Usage examplesDownload a song:gytmdl "https://music.youtube.com/watch?v=3BFTio5296w"Download an album:gytmdl "https://music.youtube.com/playlist?list=OLAK5uy_lvpL_Gr_aVEq-LaivwJaSK5EbFd4HeamM"Configurationgytmdl can be configured using the command line arguments or the config file. The config file is created automatically when you run gytmdl for the first time at~/.gytmdl/config.jsonon Linux and%USERPROFILE%\.gytmdl\config.jsonon Windows. Config file values can be overridden using command line arguments.Command line argument / Config file keyDescriptionDefault value-f,--final-path/final_pathPath where the downloaded files will be saved../YouTube Music-t,--temp-path/temp_pathPath where the temporary files will be saved../temp-c,--cookies-location/cookies_locationLocation of the cookies file.null--ffmpeg-location/ffmpeg_locationLocation of the FFmpeg binary.ffmpeg--config-location/ -Location of the config file.<home folder>/.gytmdl/config.json-i,--itag/itagItag (audio quality).140--cover-size/cover_sizeSize of the cover.  [0<=x<=16383]1200--cover-format/cover_formatFormat of the cover.jpg--cover-quality/cover_qualityJPEG quality of the cover.  [1<=x<=100]94--template-folder/template_folderTemplate of the album folders as a format string.{album_artist}/{album}--template-file/template_fileTemplate of the song files as a format string.{track:02d} {title}-e,--exclude-tags/exclude_tagsList of tags to exclude from file tagging separated by commas without spaces.null--truncate/truncateMaximum length of the file/folder names.40-l,--log-level/log_levelLog level.INFO-s,--save-cover/save_coverSave cover as a separate file.false-o,--overwrite/overwriteOverwrite existing files.false-p,--print-exceptions/print_exceptionsPrint exceptions.false-u,--url-txt/ -Read URLs as location of text files containing URLs.false-n,--no-config-file/ -Don't use the config file.falseItagsThe following itags are available:141(256kbps AAC)140(128kbps AAC)251(128kbps Opus)Cover formatsCan be eitherjpgorpng.Tag variablesThe following variables can be used in the template folder/file and/or in theexclude_tagslist:albumalbum_artistartistcommentcoverlyricsmedia_typeratingrelease_daterelease_yeartitletracktrack_total
Package: gytoolkit
gytoolkit介绍收录用于券商PB业务的管理工具软件架构软件架构说明mailparser:操作gy mailppwdbapi:smppw数据库api(开发中)datamanager:pb业务各项数据标准化处理安装教程pip install gytoolkit使用说明mailparser:参见examples/mailparser.pyppwdbapi:参见examples/ppwdbapi.ipynb参与贡献Fork 本仓库新建 Feat_xxx 分支提交代码新建 Pull Request
Package: gytrash
GytrashA logging setup module for Python. When setting up logging functionality for new projects I noticed I was always following the same pattern.Decided to put these practices into a module. The module sets up a logger usingcoloredlogs. You can attach the botocore logs, if you are a regular user of boto3. And the logger can easily ship logging messages to slack.Installationpip install gytrashExamplesSimple logging setupimport gytrash
import logging
log = logging.getLogger("slack_example")

gytrash.setup_logging(log, log_level=10)

log.info("Test info message")
log.debug("Test debug message")Setup logger for use with SlackTo use gytrash to ship logging messages to slack, first setup a slack app using thiswalkthroughOnce you have generated the bot token, save it as an environment variable.Set Slack Environment Variablesexport SLACK_BOT_TOKEN="<BOT TOKEN>"Finally setup gytrash using the extended parameters.Import Gytrash and setup logger to use Slackimport gytrash
import logging
log = logging.getLogger("slack_example")

gytrash.setup_logging(log, log_level=10, log_from_botocore=False, log_to_slack=True, slack_log_channel="<LOG NAME>", slack_log_level=20)

log.info("Test info message")
log.debug("Test debug message")

log.info("Test info message", extra={"notify_slack": True})  # send this log message to slackRelease ProcessCreate a release branch from main:main >> release/v0.0.11(No change in version number)Create a feature branch from main:main >> feature/new_feature_to_add(No change in version number)Work on feature and then PR feature to release branch:release/v0.0.11 << feature/new_feature_to_add(Version bumped to next patch
0.0.12a{PR_NUMBER}.post0 on PR open.)When release is ready, PR back to main:main << release/v0.0.11(Version is bumped to next version number v0.0.12)If you have more than one feature PR going into a release, then the feature PR version
must be managed semi-manually. Before the PR is opened, you must pull the commit
that was automatically created during the release test and pypi package upload from the
destination release branch.After pulling the commit, update these two files back to the version number from main
when you created this feature branch:.bumpversion.cfg
gytrash/__about__.py
Package: gyun-sdk
This repository allows you to accessGYUNand control your resources from your applications.This SDK is licensed underApache Licence, Version 2.0.NoteRequires Python 2.6 or higher, compatible with Python 3,
for more information please seeGYUN SDK DocumentationInstallationInstall viapip$ pip install gyun-sdkUpgrade to the latest version$ pip install --upgrade gyun-sdkInstall from sourcegit clone https://github.com/gyun-gome/gyun-sdk-python.git
cd gyun-sdk-python
python setup.py installGetting StartedIn order to operate GYUN IaaS or GomeStor (GYUN Object Storage),
you need applyaccess keyongyun consolefirst.GYUN IaaS APIPass access key id and secret key into methodconnect_to_zoneto create connection>>> import gyun.iaas
>>> conn = gyun.iaas.connect_to_zone(
        'zone id',
        'access key id',
        'secret access key'
    )The variableconnis the instance ofgyun.iaas.connection.APIConnection,
we can use it to call resource related methods.Example:# launch instances
>>> ret = conn.run_instances(
        image_id='img-xxxxxxxx',
        cpu=1,
        memory=1024,
        vxnets=['vxnet-0'],
        login_mode='passwd',
        login_passwd='Passw0rd@()'
    )

# stop instances
>>> ret = conn.stop_instances(
        instances=['i-xxxxxxxx'],
        force=True
      )

# describe instances
>>> ret = conn.describe_instances(
        status=['running', 'stopped']
      )GYUN GomeStor APIPass access key id and secret key into methodconnectto create connection>>> import gyun.gomestor
>>> conn = gyun.gomestor.connect(
        'pek3a.gomestor.com',
        'access key id',
        'secret access key'
    )The variableconnis the instance ofgyun.gomestor.connection.QSConnection,
we can use it to create Bucket which is used for generating Key and MultiPartUpload.Example:# Create a bucket
>>> bucket = conn.create_bucket('mybucket')

# Create a key
>>> key = bucket.new_key('myobject')
>>> with open('/tmp/myfile') as f:
>>>     key.send_file(f)

# Delete the key
>>> bucket.delete_key('myobject')
Package: gyvatukas
gyvatukascollection of python utils and prototypes.
it is public, but i would not advise to use it for any serious business. is more of a util
bundle and playground for new ideas.anyways, see docs page for more info.🚨 No changelog🚩 Frequently changing API🚨 Lack of tests🤠 Only funusageimportgyvatukasasgtel='+37060000000'is_valid,clean_tel=g.validate_lt_tel_nr(tel)print(is_valid,clean_tel)dev guideNew code time (add new features to__init__/__all__if/when they are "prod" worthy to use
the pattern ofgyvatukas.<util>in dependent projects (except for WWW))Format + lint (its 2024, people nitpick a lot)Build docsIncrement version in pyproject.tomlBuild package (commit package + pyproject.toml + docs (clean single build commit, since docs
are published from master and are source of truth for the latest pypi release))poetry publishProfit 🤑
Package: gyver-database
РњРѕРґСѓР»СЊ РґР»СЏ python РґР»СЏ Р»С‘РіРєРѕР№ СЂР°Р±РѕС‚С‹ СЃ Р±Р°Р·РѕР№ РґР°РЅРЅС‹С… sqliteР”Р»СЏ СѓСЃС‚Р°РЅРѕРІРєРё:pip install gyver-databaseРћР±РЅРѕРІРёС‚СЊ:pip install gyver-database --updateР”Р»СЏ РёРјРїРѕСЂС‚Р°:fromdatabase.databaseimportDBР”РѕРєСѓРјРµРЅС‚Р°С†РёСЋ РѕРЅР° Р¶Рµ РёРЅСЃС‚СЂСѓРєС†РёСЏ СЃРјРѕС‚СЂРµС‚СЊ РІuseDBpython useDB.py
Package: gyxi
Gyxi is a free document database which basically works as a key-value (multi value) database and by allowing configuration of views, makes it possible to organize content in any way desired.GyxiClient is ready to use without any prior registration required and you get 1 GB storage for free.You choose a Region (from an enum) and a guid which will be your database id. Simply start using it - there is no need to sign up or register your database beforehand.Keep your guid secret because anyone who has access to the guid has full access to your database.Example:fromgyxiimportGyxiClient,GyxiRegiongyxi=GyxiClient("dfca164c-b19d-4abd-a5a7-4eabdfb8b123",GyxiRegion.GERMANY)gyxi.save("mytype","all",my_obj);Please note: Use any other guid than the one from the sample above.
Package: g-zhpr
中文標點符號標注訓練資料集:p208p2002/ZH-Wiki-Punctuation-Restore-Dataset共計支援6種標點符號: ， 、 。 ？ ！ ；安裝# pip install torch pytorch-lightningpipinstallzhpr使用fromzhpr.predictimportDocumentDataset,merge_stride,decode_predfromtransformersimportAutoModelForTokenClassification,AutoTokenizerfromtorch.utils.dataimportDataLoaderdefpredict_step(batch,model,tokenizer):batch_out=[]batch_input_ids=batchencodings={'input_ids':batch_input_ids}output=model(**encodings)predicted_token_class_id_batch=output['logits'].argmax(-1)forpredicted_token_class_ids,input_idsinzip(predicted_token_class_id_batch,batch_input_ids):out=[]tokens=tokenizer.convert_ids_to_tokens(input_ids)# compute the pad start in input_ids# and also truncate the predict# print(tokenizer.decode(batch_input_ids))input_ids=input_ids.tolist()try:input_id_pad_start=input_ids.index(tokenizer.pad_token_id)except:input_id_pad_start=len(input_ids)input_ids=input_ids[:input_id_pad_start]tokens=tokens[:input_id_pad_start]# predicted_token_class_idspredicted_tokens_classes=[model.config.id2label[t.item()]fortinpredicted_token_class_ids]predicted_tokens_classes=predicted_tokens_classes[:input_id_pad_start]fortoken,nerinzip(tokens,predicted_tokens_classes):out.append((token,ner))batch_out.append(out)returnbatch_outif__name__=="__main__":window_size=256step=200text="維基百科是維基媒體基金會運營的一個多語言的百科全書目前是全球網路上最大且最受大眾歡迎的參考工具書名列全球二十大最受歡迎的網站特點是自由內容自由編輯與自由著作權"dataset=DocumentDataset(text,window_size=window_size,step=step)dataloader=DataLoader(dataset=dataset,shuffle=False,batch_size=5)model_name='p208p2002/zh-wiki-punctuation-restore'model=AutoModelForTokenClassification.from_pretrained(model_name)tokenizer=AutoTokenizer.from_pretrained(model_name)new_tokens=[chr(x)forxinrange(ord('A'),ord('Z')+1)]new_tokens.append(" ")tokenizer.add_special_tokens({'additional_special_tokens':new_tokens})model.resize_token_embeddings(len(tokenizer))model_pred_out=[]forbatchindataloader:batch_out=predict_step(batch,model,tokenizer)foroutinbatch_out:model_pred_out.append(out)merge_pred_result=merge_stride(model_pred_out,step)merge_pred_result_deocde=decode_pred(merge_pred_result)merge_pred_result_deocde=''.join(merge_pred_result_deocde)print(merge_pred_result_deocde)維基百科是維基媒體基金會運營的一個多語言的百科全書，目前是全球網路上最大且最受大眾歡迎的參考工具書，名列全球二十大最受歡迎的網站，特點是自由內容、自由編輯與自由著作權。
Package: gzinfo
Gzip InformationGetting the original filename form gzip archive in Python (compatible with
Python 3.6, 3.7 and 3.8).Installfrom github directly:pip install git+https://github.com/PierreSelim/gzinfo.gitUsageIf you gzip a file calledfoo.txtand rename the archivebar.txtyou can
still retrive the original name from the header (perRFC1952)>>>importgzinfo>>>info=gzinfo.read_gz_info('bar.txt.gz')>>>info.fname'foo.txt'
Package: gzipi
Tools for indexing gzip files to support random-like access.InstallingTo install library, run the following coomand:$ python setup.py installTesting$ make test
$ make lintIndexing a fileIndexing a file from stdin:$ cat profiles.json.gz | gzipi index --format json --field id > index.json.gzIndexing a local file:$ cat profiles.json.bz -i profiles.json.gz -o index.json.gz --format csv --column 0 --delimiter ','Retrieving dataRetrieving all data for specific domains:$ zcat domains.json.gz | gzipi retrieve -f profiles.json.gz -i index.json.gz --format json > data.json --field domainUsing local and S3 paths:$ gzipi retrieve -k domains.json.gz -f s3://domain-data/reports/Q1.json.gz -i index.json.gz --format json -o data.json --field domainRepacking existing archives$ gzipi repack -f profiles.json.gz -i new_index.json.gz -o new_profiles.json.gz --format json --field domainHelpTo get more information, run the following command:$ gzipi --help
Package: gzip-static
gzip_staticCompress your static website or website’s static assets with gzip for faster
serving withnginx’sgzip_staticmodule.Nginx does not perform checks on the served gzip to determine if it is out of
date. This program was created to automate the checks and compression of the
static files at the website’s build time.FeaturesFinds all static files in a directory and its subdirectories automatically
based on anextensions filewhich can be
customized.Idempotent. Only compresses
files that have not been compressed yet or are changed. Can therefore be used with
configuration management systems such asAnsible.Guards against serving outdated gzipsGzip content is checked with a checksum to verify that a file has changed.Has a--remove-orphansoption to remove gzips for which the source
static file is no longer available.The created gzip files inherited filesystem attributes from the source static
files such as the mode and the last modified time.Works on any machine with Python 3.6 or higher installed. It does not depend
on other packages for its core functionally.Zopfli compression is supported whenzopfliis installed.Can be used as a library in other projects and has afully documented API.Optimized for checksumming small gzip file contents. Rerunning gzip_static on
an already compressed website is very quick.QuickstartInstall gzip_static withpip install gzip_staticorpip install--usergzip_static. For more installation options and options to enable more
functionally such as zopfli and better speed, checkoutthe installation
documentation.To compress all static files in a directory:gzip-static/var/www/my_example_website/To check if all gzip files are up to date and recompress gzip files for which
the source has changed:gzip-static/var/www/my_example_website/(Same command due to idempotency)To check if all gzip files are up to date, recompress changed ones and remove
gzip files for which a source static file is no longer present:gzip-static--remove-orphans/var/www/my_example_website/To check for orphaned files only:gzip-static-find-orphans/var/www/my_example_website/For a more extended usage and more options usegzip-static--helpor
checkoutthe usage documentation.ContributingFor bug reports and feature requests please use thegithub issue tracker. Pull requests
are also welcome.Please note that brotli support is currently not in this project’s scope.
This may change. For more information readhere.
Package: gzip-stream
gzip-streamis a super-tiny library that will help you compress by GZIP
on-the-fly.GZIPCompressedStreamclass instance acting like an any other stream (in fact,GZIPCompressedStreaminheritsio.RawIOBase),
but wraps another stream and compress it on-the-fly.fromgzip_streamimportGZIPCompressedStreamfrommy_upload_libimportMyUploadClientupload_client=MyUploadClient()withopen('my_very_big_1tb_file.txt')asfile_to_upload:compressed_stream=GZIPCompressedStream(file_to_upload,compression_level=7)upload_client.upload_fileobj(compressed_stream)GZIPCompressedStreamdoes not read entire stream, but instead read it
by chunks, until compressed output size will not satisfy read size.AsyncGZIPDecompressedStreamclass can async read from another source
with zlib and gzip decompression on-the-fly# aiobotocore exampleimportaiobotocorefromgzip_streamimportAsyncGZIPDecompressedStreamAWS_ACCESS_KEY_ID="KEY_ID"AWS_SECRET_ACCESS_KEY="ACCESS_KEY"BUCKET="AWESOME_BUCKET"upload_client=MyAsyncUploadClient()session=aiobotocore.get_session()asyncwithsession.create_client(service_name="s3",endpoint_url="s3_endpoint",aws_secret_access_key=AWS_SECRET_ACCESS_KEY,aws_access_key_id=AWS_ACCESS_KEY_ID,)asclient:response=awaitclient.get_object(Bucket=BUCKET,Key='my_very_big_1tb_file.txt.gz')asyncfordecompressed_chunkinGzipAsyncReaderWrapper(response["Body"])):awaitupload_client.upload_fileobj(decompressed_chunk)Module works on Python ~= 3.5.Installationpipinstallgzip-streamLicensePublic Domain:CC0 1.0 Universal.
Package: gzspidertools
来自https://github.com/shengchenyang/AyugeSpiderTools/blob/master/docs//docs/intro/install.md增加个人使用的模板安装python 3.8+可以直接输入以下命令：pipinstallgzspidertools可选安装1，安装数据库相关的所有依赖：pipinstallgzspidertools[database]可选安装2，通过以下命令安装所有依赖：pipinstallgzspidertools[all]注：详细的安装介绍请查看安装指南。用法# 查看库版本gzcmdversion# 创建项目gzcmdstartproject<project_name># 进入项目根目录cd<project_name># 替换(覆盖)为真实的配置 .conf 文件：# 这里是为了演示方便，正常情况是直接在 VIT 中的 .conf 文件填上你需要的配置即可cp/root/mytemp/.confDemoSpider/VIT/.conf# 生成爬虫脚本gzcmdgenspider<spider_name><example.com># 生成 scrapy-redis 爬虫脚本   pip install scrapy_redis-0.7.3-py2.py3-none-any.whlgzcmdgenspider-t=sr<spider_name><example.com># 运行脚本scrapycrawl<spider_name># 注：也可以使用 gzcmd crawl <spider_name>RedisDBRedisDB支持哨兵模式、集群模式与单节点的普通模式，封装了操作redis的常用的方法连接若环境变量中配置了数据库连接方式或者setting中已配置，则可不传参普通模式db=RedisDB(ip_ports="localhost:6379",db=0,user_pass=None)使用地址连接db=RedisDB.from_url("redis://[[username]:[password]]@[host]:[port]/[db]")哨兵模式db=RedisDB(ip_ports="172.25.21.4:26379,172.25.21.5:26379,172.25.21.6:26379",db=0,user_pass=None,service_name="my_master")注意：多个地址用逗号分隔，需传递service_name对应setting配置文件，配置方式为：REDISDB_IP_PORTS="172.25.21.4:26379,172.25.21.5:26379,172.25.21.6:26379"REDISDB_USER_PASS=""REDISDB_DB=0REDISDB_SERVICE_NAME="my_master"集群模式db=RedisDB(ip_ports="172.25.21.4:26379,172.25.21.5:26379,172.25.21.6:26379",db=0,user_pass=None)注意：多个地址用逗号分隔，不用传递service_name对应setting配置文件，配置方式为：REDISDB_IP_PORTS="172.25.21.4:26379,172.25.21.5:26379,172.25.21.6:26379"REDISDB_USER_PASS=""REDISDB_DB=0
Package: gzutils
# Gizur Misc UtilsThis package contains the following classes/functions:ALogging class- simple base class for loggingTheDotDictclass- make it possible to access dictionary attributes with dot-notation (dict.attributeinstead ofdict[‘attribute’])Functions for saving CSV files from lists## DevelopmentCheck the code and run the tests with:tox(install tox withpip install toxif you don’t have it already)pytest -swill run the tests and display the output.Build the package for distribution with:python setup.py sdistPublish a build with:twine upload dist/gzutils-X.Y.Z.tar.gz