Saravanan666/pypi-org huggingface dataset:
Package: yoton
YoTon is an util for cache, it simplifies cache with a decorator.Install$pipinstallyotonConfigurationredis_server_config={"default":{"host":"localhost","port":6379,"db":1},"server_a":{"host":"localhost","port":6378,"db":2,}}yoton=YoTon(redis_server_config)Apply To Function@yoton.cache(key_pattern="dummy_cache_key",expire_seconds=60)defdummy_func():return"hello">>dummy_func()# call the function"hello"setinthecacheKey PatternThe cache key is using python’s string format syntax, you can find it here@youton.cache(key_pattern="dummy:{a}_{b}_{c}",expire_seconds=60)defdummy_func_with_params(a,b,c=3):returna+b+cComplex object in parameters@youton.cache(key_pattern="dummy:{a.id}_{b.name}",expire_seconds=60)defdummy_func_with_params(a,b):returna+bSelect Database@yoton.cache(key_pattern="dummy_cache_key",database="test",expire_seconds=60)defdummy_func_database():return"hello"Customized Formatter@yoton.cache(key_pattern="dummy_cache_key",key_formatter=CustomizedFormatter(),expire_seconds=60)defdummy_func_keyforamtter():passApply Cache To Instance MethodclassDummyClass(object):@yoton.cache(key_pattern="instance_method")definstance_method(self):return"hello"Misc# call the function directly without touch cachedummy_func_with_params.call(a=1,b=2,c=3)# refresh cache datadummy_func_with_params.refresh_cache(a=1,b=2,c=3)# remove data in cachedummy_func_with_params.delete_cache(a=1,b=2,c=3)
Package: yotpo-api
yotpo APIThis is a package to integrate and model the data
structure and wrap the api calls made to use the
yotpo api.Installpipinstallyotpo-apiUsageAuthenticationTo use theyotpo apiyou need to provide
your yotpoapi keyandapi secreteither by passing them as kwargs to
the client initclient = YotpoClient(api_token, api_secret)either by setting them as env vars namedYOTPO_API_TOKENandYOTPO_API_SECRETso they are automatically used by the client when there kwargs are not provided.client=YotpoClient()Getting reviewsclient.get_reviews()optionally providing theproduct idand thefrom dateparams.Creating reviewsclient.create_review({"product_title":"product_title","product_url":"https://www.sephora.com/something","display_name":"John Doe","email":"jone.dow@gmail.com","review_content":"the fragrance is good, even thou the texture got worse, anyway, still great value.","review_title":"great value","review_score":5,})
Package: yotsuba-python
🍀 yotsubaDocumentationInstall yotsuba.Via pip (under construction)pipinstallyotsuba-pythonFrom source.gitclonehttps://github.com/yutayamazaki/yotsuba.gitcdyotsuba/bindings/python
pythonsetup.pyinstallAPI documents.yotsubayotsuba.pad_sequences(sequences: List[List[int]], maxlen: int, value: int = 1, padding: str = 'post') -> List[List[int]]Pad sequences with given value likekeras.preprocessing.sequence.pad_sequences.Parameterssequences (List[List[int]])- Sequences to padded.maxlen (int)- Maximum sequence length to pad.value (int)- A value used to pad sequences.padding (str)- 'pre' or 'post', default is 'post'.ReturnsList[List[int]]- An list of integers with shape (len(sequences), maxlen).RaisesValueError - Ifpaddingis not 'pre' or 'post'.ExamplesfromtypingimportListimportyotsubasequences:List[List[int]]=[[0,2,1],[0,1]]padding:List[List[int]]=yotsuba.pad_sequences(sequences=sequences,maxlen=5,value=-1,padding='post')assertpadding==[[0,2,1,-1,-1],[0,1,-1,-1,-1]]
Package: yotta
yotta is a tool that we’re building atmbedto make it
easier to build better software written in C, C++ or other C-family languages.
It’s still early in development, so if you have questions/feedback or issues, pleasereport them on Github.InstallationWhile yotta is written in python, to use it to build software you’ll need several non-python dependencies. Detailed installation instructions and links to installers can be found on theyotta docs site.Get StartedThe best way to get started is tofollow the tutorial.Licenseyotta is licensed under Apache-2.0
Package: youandme
Only you and the person you're talking to should know the details of the conversation. This includes metadata.This is a Python library to share data anonymously and securely* with limited traffic metadata. It is designed for generic byte streaming over a private tunnel, using Tor onion services..This library is meant to be used by other libraries or applications, however a script 'yam' is included to enable basic CLI instant messaging.* The ID one connects to a host with must be shared via a secure (private, authenticated) channel.install 📥$ pip install youandmeYou also need a recent Tor daemon in executable path. 0.4 Tor is what is tested.https://www.torproject.org/download/tor/basic chat usage 💬$ yam.py hostThis will start a bare-bones CLI-based chat and output an address to be given to a friend.The friend connects:$ yam.py conn --address <address>purpose 🧑‍🤝‍🧑In normal socket connections, Eve can see when Alex and Bob communicate and the size of their communications.This library sends continuous streams of data (null bytes) even when no information is being communicated, in order to increase unobservability of transmission times and packet sizes.Anonymity and encryption is provided via Tor onion services, though this library could easily be adapted to use plaintext (and encryption by an application) or another relay like I2P.security 🔒As stated above, this library does no authentication. However, if the ID is shared privately and safely, the tunnel will have roughly the security of a Tor v3 onion service, with increased metadata unobservability.That said, one should not rely on any software when the stakes are too high.what an attacker sees in a normal Tor connectionwhat an attacker sees in a youandme connectionLimitations + Road mapThis project will forever follow the KISS principle, but these two three will be addressed.Multi-byte character support (full utf-8 support)Tor bridge supportSupport non-anonymous hidden services. Mainly useful for certain development needs
Package: youapi
Установка:pip install youapiПримеры:Информация о темеfrom pyyouapi import youapi

client = youapi.Api(cookie, useragent)

print(client.getThreadInfo(thread_id))Список методовgetThreadInfo(thread_id: int)-Информация о темеgetPosts(thread_id: int, page: int)-Получить сообщения в темеcreatePost(thread_id, message_html)-Написать в темуeditPost(post_id: int, new_html)-Редактировать сообщение в темеcreateThread(forum_id: int, title: str, message_html)- *Создать тему&editThread(thread_id: int, title: str, message_html)-Редактировать темуlikePostlikePost(post_id: int, reaction_id: int)-Лайкнуть постgetThreads(forum_id: int, page: int)-Список тем раздела
Package: youarehere
you are here 🌎Somehow, adding a new record to Route53 takes 100 lines of Python. So now it only takes one.>>>fromyouarehereimportcreate_record>>>create_record("A","foo.example.com","4.4.4.4")You can also easily point a record to the current machine:>>>fromyouarehereimportpoint_record_to_here>>>point_record_to_here("foo.example.com")use caseYou have a Raspberry Pi that travels around and you want to keep a pointer to it in Route53. Add this as a cron-job:$ python3 -c "point_record_to_here('my-pi.example.com')"create_recordArgumentsArgumentTypeDefaultDescriptionrecord_typestrThe type of the record to add (e.g. A, CNAME, etc). For an exhaustive list, seeyouarehere.VALID_RECORD_TYPES.namestrThe DNS record name (e.g."foo.example.com")destinationstr/List[str]The destination IP or values (e.g.["4.4.4.4", "8.8.8.8"]). If you provide a single string, it will be treated as an Array[1].hosted_zone_idstrNoneID of the hosted zone to which to add this record. Guess automatically by default, or useyouarehere.guess_hosted_zone_id_for_name.commentstr""An optional comment for the change request (e.g."Baby's first DNS record!")ttlint300The TTL for your record; defaults to 300 which is probably too low.Documentation auto-generated withdocshund, bork bork. 🐕CLI UsageExamples:Point 'test.example.com' to the current machine:$ youarehere test.example.comPoint 'test.example.com' to the IP 93.184.216.34$ youarehere test.example.com 93.184.216.34Point 'test.example.com' to a set of IPs in descending order,
with a TTL of 6000 seconds.$ youarehere test.example.com 93.184.216.34,93.184.216.35 --ttl 6000ArgumentDescriptionnameRecord to add (e.g. "test.example.com")destinationIP destination. Default: Current global IP.FlagDescription--type(A) The type of record to add--ttl(300) The TTL of the new DNS record--dry-run(False) Print and quit without making changes
Package: youcab
YouCab: Converts MeCab Parsing Results to Python ObjectsInstallationInstall MeCabMeCab is required for YouCab to work.
If it is not already installed,install MeCabfirst.Install YouCab$pipinstallyoucabTokenize Japanese sentenceIn this example code, we generate a tokenizer with MeCab's default dictionary and run tokenization.
The tokenizer converts text into a list ofWordobjects.fromyoucabimportyoucabtokenize=youcab.generate_tokenizer()words=tokenize("本を読んだ")forwordinwords:print("surface: "+word.surface)print("pos    : "+str(word.pos))print("base   : "+word.base)print("c_type : "+word.c_type)print("c_form : "+word.c_form)print("")surface: 本pos    : ['名詞', '一般']base   : 本c_type :c_form :surface: をpos    : ['助詞', '格助詞', '一般']base   : をc_type :c_form :surface: 読んpos    : ['動詞', '自立']base   : 読むc_type : 五段・マ行c_form : 連用タ接続surface: だpos    : ['助動詞']base   : だc_type : 特殊・タc_form : 基本形Available for any MeCab dictionaryDictionaries such as IPAdic,UniDicandneologdare available.fromyoucabimportyoucabtokenize=youcab.generate_tokenizer(dicdir="/path/to/mecab/dic/dir/")
Package: youcanpay
youcanpay_pythonPython wrapper arround YouCanPay gatewayInstallationInstallyoucanpay-pythonusing pip:pip install youcanpay-pythonUsage ExampleThe following example demonstrates how to useyoucanpayto create a payment token:fromyoucanpay.youcan_payimportYouCanPayfromyoucanpay.models.tokenimportTokenDatafromyoucanpay.models.dataimportCustomer# Enable sandbox mode for testingYouCanPay.enable_sandbox_mode()# Initialize YouCanPay with your private and public keysyoucan_pay=YouCanPay.instance().use_keys("your_private_key","your_public_key",)# Set up customer informationcustomer_info=Customer(name="Younes",address="123 street",zip_code="999",country_code="MA",phone="+212600000000",email="example@example.com",)# Define metadata for the transactionmetadata={"item_id":"A123","campaign":"Summer Sale"}# Configure order detailstoken_params=TokenData(order_id="OR238472",amount="2000",currency="MAD",customer_ip="123.123.123.123",success_url="https://example.com/success",error_url="https://example.com/error",customer_info=customer_info,metadata=metadata,)# Create the token and get the payment URLtoken=youcan_pay.token.create_from(token_params)
Package: youchat-py
youchat-pySimple communication with YouChat in python.Installationpip install youchat-pyUsageusage: youchat [-h] [-out_type OUT_TYPE] [-timeout TIMEOUT] MESSAGE

positional arguments:
  MESSAGE               Message to YouChat

optional arguments:
  -h, --help            show this help message and exit
  -out_type OUT_TYPE, -ot OUT_TYPE
                        Output type
  -timeout TIMEOUT, -t TIMEOUT
                        Timeout to wait responseExample 1Use in CLI modeyouchat hello!Returns:{"generated_text": "Hello! How can I assist you today?"}youchat -out_type string "who are you"Returns:I am YouBot, a large language model developed by You.com. ...Noteonzsh- you must use single quotesyouchat 'who are you?'Example 2Use in module mode
test_unit.py:fromyouchatimportyou_messageprint(you_message(text='Hello, World!',out_type="string"))Returns:"Hello, World!" is a common phrase used in ...Used libraryseleniumbase
Package: youchoose
YouChooseProject OverviewA recommender system built on PyTorch. I wanted a library similar to what was provided
in OpenRec but for PyTorch. Spotlight is a similar package but appears to have died. And
while it does have some nice features, instead of forking it and building on it,
I wanted to start at the ground floor to build a library that would be simple to use but
also easy to configure.Project Set-UpVirtual EnvironmentThe best way to run the code is to use a python virtual environment. This will require that you have python3 and git already installed on your system. To begin, runpython3 -m venv project-nameto create a virtual environment in a folder called project-name. Now runcd project-nameto change directories.Install with PIPpipinstallyouchooseInstall From SourceThe following command is then run to clone the repository.gitclonehttps://github.com/csmithchicago/YouChoose.gitsourcebin/activatecdyouchoose
pipinstall-rrequirements.txtProject References
Package: youconfigme
YouConfigMeYouConfigMe helps you manage config in a pythonic way.Core ideasExplicit is better than implicitThere are several ways to define configuration variables, with different levels of explicitness. I prefer to go as close as possible to theTwelve Factor Appguide since it's what most people expect anyways.Defaults are reasonableSometimes you might need a variable to exist even if it hasn't been defined. So, you should be able to provide defaults.Types are inherent to the variableMost of the time, variables are defined as strings, on.inifiles or as env vars. But what if your variable is anint? You should be able to get it as anint.Sections are goodConfig sections are a good thing: separate your config vars under reasonable namespaces.MotivationThe main motivation for youconfigme to exist is that most simple config libraries do not take sections into account. And it bugs me greatly.InstallClone this repo, and install it.pipinstall.Or from PyPI.pipinstallYouConfigMeDevelopmentStart by cloning the repo/forking it.You should install YouConfigMe's dev packages to help.pipinstall.[dev]pipinstall.[test]After that, install the pre-commit hooks:pre-commitinstallThis will install several code formatting tools and set them up to run before commits. Also, it will run tests before pushing.You might findnoxquite useful to run tests and ensure linting is as expected.DocsThe docs are updated on pushed tags using GitHub Actions.Version bumpingThis project usesbumpto quickly bump versions.
By default runningbumpwill bump the patch version. You can bump minor/major versions like so:bump--minor
bump--majorTestsThetestsfolder contains several tests that run usingpytestthat should give you an idea of how to use this.Config discoveryThe preferred order should be:Environment variablesConfig fileDefault valueQuickstartAssume you have an.inifile at the root of your project that looks like this:[a]key1=1key2=2key7=7[b]key3=3key4=4You can use it like this:fromyouconfigmeimportAutoConfigimportosos.environ["A_KEY4"]="key4value"os.environ["A_KEY7"]="key7value"config=AutoConfig()print(config.a.key1())# returns '1'print(config.a.key1(cast=int))# returns 1print(config.a.key2(default='default2val'))# returns '2'print(config.a.key3())# raises ConfigItemNotFoundprint(config.a.key3(default='key3value'))# return 'key3value'print(config.a.key4())# returns 'key4value'print(config.a.key7())# returns 'key7value'Since version0.9.0, YCM supportstomlfiles as well.
Package: youcos
youcosyoucos (youtubecommentscraper) is a simple Python package for scraping YouTube videos and comments!:four_leaf_clover:Lightweight YouTube v3 API Wrapper- Simply provide yourYouTube v3 API Key, and youcos will take care of the rest!
No additional code needed to configure API and process fetched JSON data.:earth_asia:Diverse Language Support- Search, scrape, and save videos & comments in different languges with youcos.:rocket:Fast Performance- Request and write approximately 4,000 comments, just within 1 minute.:chart_with_upwards_trend:Minimized Quota Usage- Scrape comments without exhausting YouTube v3 quota through the built-in Selenium module with youcos!Table of ContentsDemoInstallationFeaturesDependenciesDocumentationCreditsTo DoDemoScraping video titles and comments togetherfromyoucosimportscrape_youtubeKEY='YOUR_YOUTUBE_V3_API_KEY'# Call YouTube v3 API to request the first 30 videos search results for 'stocks'# and scrape each video's top __ commentsscrape_youtube('stocks',KEY)Scraping video titles and comments separatelyfromyoucosimportscrape_videos,scrape_commentsKEY='YOUR_YOUTUBE_V3_API_KEY'# Call YouTube v3 API to request the first 30 videos search results for 'stocks'videos=scrape_videos("stocks",KEY)# Filter videos to avoid re-scraping commentsfiltered_videos=foo(videos)# Scrape comments for filtered videosscrape_comments(filtered_videos)deffoo(videos):# function to filter videosInstallationpipinstallyoucosFeaturesCollected DataVideo DataComment DataURLtexttitleauthorchannel namedateupload dateno. of repliesno. of likesno. of upvotesno. of dislikes# of commentsDependenciesSeleniumgoogle-api-python-clientpipinstall--upgradeseleniumgoogle-api-python-clientDocumentationCheck ___ for specific API documentation. This project was documented following thenumpy docstring conventions,
which are supported by common documentation tools likeSphynxwhile also maintaining readability.ContributingPackage author and maintainer is Seunggun Lee (seungguini@gmail.com).
Contributions and feedback are more than welcome.CreditsAuthor: Seunggun LeeLanguages/Tools: Python3,Selenium
Package: youcreep
YoucreepA powerful, asynchronous web crawler designed specifically for YouTube. Built to efficiently interact with web pages in a headless mode, this tool facilitates the seamless extraction of YouTube video comments and video information directly from the platform.FeaturesAsynchronous Crawling: Uses Python's asynchronous features for fast and efficient data extraction.Headless Interaction: Operates seamlessly without opening a web browser.Modular Design: Built with modularity in mind, allowing for easy extension and maintenance.Modules1. YoutubeCommentCrawlerExtract comments from any given YouTube video.Usage:fromyoucreepimportYoutubeCommentCrawlerwithYoutubeCommentCrawler()ascrawler:comments=awaitcrawler.crawl('YOUR_YOUTUBE_VIDEO_URL',n_target=NUMBER_OF_COMMENTS_TO_FETCH)2. YoutubeVideoInfoCrawlerSearch for videos based on a keyword and extract their information.Usage:fromyoucreepimportYoutubeVideoInfoCrawlerwithYoutubeVideoInfoCrawler()ascrawler:videos_info=awaitcrawler.crawl('YOUR_SEARCH_TERM',n_target=NUMBER_OF_VIDEOS_TO_FETCH,filter_options=YOUR_FILTER_OPTIONS)Getting StartedClone the repositorygitclonehttps://github.com/stevieflyer/youtube_crawler.gitNavigate to the project directorycdyoucreepInstall the dependenciespipinstall-rrequirements.txtStart crawlingUse the examples provided in the modules section above.ContributingContributions are welcome! Please raise an issue or submit a pull request.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.Happy crawling! :)
Package: youdao-dict
有道词典命令行查询工具Install$ pip install youdao-dictUsages$youdaohello_____________||________|(_)___||_||||/_\||||/_`|/_`|/_\_____/_`||/__|__|||_||(_)||_||(_||(_||(_)|_____|(_|||(__||_\__,|\___/\__,_|\__,_|\__,_|\___/\__,_|_|\___|\__||___/=================================================hello=================================================有道翻译：
int.喂；哈罗
n.表示问候，惊奇或唤起注意时的用语
n.(Hello)人名；(法)埃洛
网络释义：
你好
您好
哈啰喂=================================================$youdaohelloworld
$youdao--shell具体参数:usage: youdao [-h] [--shell] [words [words ...]]

Youdao Dictionary in Command Line

optional arguments:
  -h, --help   show this help message and exit

Interactive Shell:
  --shell, -s

Pass Words as Arguments:
  wordsUnit Test使用下面的代码进行单元测试：python -m unittest discover -s testsDevLog2020-11-10 19:45:37 +0800: 添加不同后端(say, vlc, pyttsx3)的英文发音功能2020-11-10 16:01:17 +0800: 根据Edit Distance和Probability添加了拼写相似词推荐(参考)
Package: youdao-simple
youdao dictionary implemented in pythonInstallpipsudo pip install youdao_simplepython setup.py$gitclonehttps://github.com/MintCN/youdao-python$cdyoudao-python$sudopythonsetup.pyinstallUsage$youdaoNowordtotranslate$youdaohello<----------------------------------------------->查询单词：hello有道翻译：你好有道词典-基本词典：发音[həˈləʊ]英式发音[həˈləʊ]美式发音[helˈō]n.表示问候，惊奇或唤起注意时的用语int.喂；哈罗n.(Hello)人名；(法)埃洛有道词典-网络释义：Hello:你好您好helloHelloKitty:凯蒂猫昵称匿称HelloBebe:哈乐哈乐乐扣乐扣<----------------------------------------------->$youdaohelloworld<----------------------------------------------->查询单词：hello有道翻译：你好有道词典-基本词典：发音[həˈləʊ]英式发音[həˈləʊ]美式发音[helˈō]n.表示问候，惊奇或唤起注意时的用语int.喂；哈罗n.(Hello)人名；(法)埃洛有道词典-网络释义：Hello:你好您好helloHelloKitty:凯蒂猫昵称匿称HelloBebe:哈乐哈乐乐扣乐扣<-----------------------------------------------><----------------------------------------------->查询单词：world有道翻译：世界有道词典-基本词典：发音[wɜːld]英式发音[wɜːld]美式发音[wɝld]n.世界；领域；世俗；全人类；物质生活有道词典-网络释义：World:世界世界天下MyWorld:我的小小世界我的世界自一方WorldRecord:世界纪录世界纪录世界之最<----------------------------------------------->Uninstallpipsudo pip uninstall youdao_simplepython setup.py$sudopythonsetup.pyinstall--record=/tmp/filelist# this file will record all the$cat/tmp/filelist|sudoxargsrm-rf
Package: youdao-translator
youdao_translatorEnglish translator from CLI, really cool.You Dao is a famous translator website between Chinese and English. This library is only for individual study purposes. please see the official version for other purposes:http://youdao.com/Installationpip install youdao-translator

youdao-trans-cli [word]UsageDependenciespyqueryclickrichrequestsplaysoundTry it without installinggit clone git@github.com:faris-shi/youdao_translator.git

pip3 install

youdao-trans-cli [word]
Package: youdao-tr-free
youdao-tr-freeYoudao translate for free -- local cache and throttling (averag 1.5 calls/s, first 1000 calls exempted). Let's hope it lasts.LimitationMaximum of 50 characters per query -- you'll have to do some processing if you want to handle longer text.Installationpip install youdao-tr-freeorInstall (pip or whatever) necessary requirements, e.g.pip install requests_cache`` orpip install -r requirements.txt```Drop the file youdao_tr.py in any folder in your PYTHONPATH (check with import sys; print(sys.path)or clone the repo (e.g.,git clone https://github.com/ffreemt/youdao-tr-free.gitor downloadhttps://github.com/ffreemt/youdao-tr-free/archive/master.zipand unzip) and change to the youdao-tr-free folder and do apython setup.py developUsagefrom youdao_tr import youdao_tr
print(youdao_tr('hello world'))  # ->'你好，世界'
print(youdao_tr('hello world', to_lang='de'))  # ->'Hallo Welt'
print(youdao_tr('hello world', to_lang='fr'))  # ->'Bonjour le monde'
print(youdao_tr('hello world', to_lang='ja'))  # ->'こんにちは世界'Consult the official website for language pairs supported.AcknowledgmentsThanks to everyone whose code was used
Package: you-dl
you-dlA simple interactive youtube video and playlist downloader written in python.
Interactively select the quality and format for youtube-dl.Ayoutube-dlwrapper, which helps you to download a specific format and also support playlists.Why?Because remembering CLI flags is hard.FeaturesLets you download Videos, Playlist or Audio only.Search Videos and Playlist.Interactively select quality.Thumbnail embedding supported for mp3 and opus (default) formatDependenciesyoutube-dlffmpegPyInquireryoutubesearchpythonpyperclipInstallyou-dl is available on pypipip install you-dlUsageOnce installed you can runyou-dlTip: Copy video or playlist url before running you-dlInspired byyoutube-dl-interactivewhich is written in js.TodoAdd Comments in code ;-)Add support for config file.Better README.And lots more.