Saravanan666/pypi-org huggingface dataset:
Package: ys-packet-generator
YS Packet GeneratorThis is a packet generator Python package.Installationpip install ys-packet-generatorUsageThere should be two sides:Client side - which generates the packetsServer side - which receive the packetsOn the client sideSend UDP packets - unlimited loopEach packet's data is an increasing index that repeats every 32bit@param: ip (str) - destination IP address
        port (int) - destination port
        bandwidth (int) - the bandwidth to allocate
        packet_size (int) - size of each packet
        debug (bool) - use prints or not
@returns: Nonefrom ys-packet-generator import generator as pg
...
pg.send(...)On the server sideReceive UDP packets from the generator - unlimited loop
Each packet is an increasing index that repeats every 32bit@param: ip (str) - local IP address
        port (int) - local port
        buffer_size (int) - buffer size to reveive packets
        full_debug (bool) - print all debug prints
        debug (bool) - print only missed packet's index
@returns: Nonefrom ys-packet-generator import server 
...
server.receive(...)
Package: yspec
yspecyspec is a deadly simple checker for structures. It is especially usefull for validation of different yaml/json filesUsage from cliyspec./schema.yaml/tmp/data.jsonNOTE: yspec able to take json/yaml/toml for schema and for dataUsage from codefromyspec.checkerimportprocess_rule# Some code that prepares data and rulesprocess_rule(data,rules,'root')Schema FormatSchema is a dict of rules. Every rule do some check according to 'match' field. Schema must include 'root' rule which is applied on top object in structure.For example structure (in YAML):----'string1'-'string2'will be valid for schema (in YAML):---root:match:listitem:stringstring:match:stringMatch RulesSimple type matchesStringmy_awesome_string:match:stringBooleanmy_awesome_bool:match:boolIntegermy_awesome_int:match:intFloatmy_awesome_float:match:floatRecursion type matchesThere are two of them: dict and list. Both has the same recursion logic. At first we apply some checks on object itself, and then apply another (or the same) rule to childrens (list elements, or values of dict).Listmy_list:match:listitem:some_other_ruleList is a recurent type. Fist it checks is the object a list, then it check every element according to rule in 'item' attr.Dictmy_list:match:dictitems:key1:string_rulekey2:integer_ruledefault_item:some_other_rulerequired_items:-key2That is a rule that describe a dict that has two keys (key1 and key2). One of keys (key2) is mandatory. Key1 should be checked according to 'string_rule' rule, while any other keys with any other (non key1 or key2) name will be checked according to some_other_rule.If we has remove default_itemmy_list:match:dictitems:key1:string_rulekey2:integer_rulerequired_items:-key2A dict could be with two keys (key1, key2) maximumSample of simple and recursion matchesSchema:---boolean:match:boolstring:match:stringinteger:match:intfloat:match:floatlist:match:listitem:stringroot:match:dictitems:key1:booleankey2:stringkey3:integerkey4:floatkey5:listData:---key1:truekey2:"Thatisastring"key3:1key4:1.0key5:-"Onemorestring"-"Anotherstring"Special matchesOneOf matchconstraint_list_item:match:one_ofvariants:-integer_rule-some_other_ruleOneOf match success if any of rules from "variants" success.Dict key selectionSome times you need to do a separate checks for dict that have some key/value pair.For example you have the following data:----type:type1payload:-1-1-type:type2payload:-"thatisastring"-"thatisastring2"In that example you have a dict wich has diffent payload depends of type key. That is possible to describe with following schema:---root:match:listitem:list_itemlist_item:match:dict_key_selectionselector:typevariants:type1:dict_with_inttype2:dict_with_stringdict_with_int:match:dictitems:type:stringpayload:list_of_intrequired_items:-type-payloaddict_with_string:match:dictitems:type:stringpayload:list_of_stringrequired_items:-type-payloadlist_of_int:match:listitem:intint:match:intlist_of_string:match:listitem:stringstring:match:string
Package: yspeed
Description 🌵YSpeed is a Python library that scrapes the Speedtest site using Selenium and displays the results with Rich. This library makes it easy to retrieve internet connection speed data (upload, download and latency) in an automated manner and display it elegantly using the Rich library.Features 🎈Speedtest.net site scraping with SeleniumRetrieve internet connection speed results (upload, download and latency)Display results with Rich for better readabilityInstallation ⚙️Make sure you have Python 3.6 or later installed. To install YSpeed, use the following command:pipinstallyspeedor :Clone the Projectgit clone https://github.com/Foufou-exe/YspeedGo to the directorycd YspeedInstall the dependenciespip install -r requirements.txtRun the Yspeed.py scriptpython yspeed.pyUsage 🖥️Example 1Here is an example of how to use the YSpeed library:fromyspeedimportYspeedys=Yspeed()result=ys.run_speedtest()ys.display_results(result)🎬 Example 1Example 2Here are the results that will come out when you use.run_speedtest.fromyspeedimportYspeedys=Yspeed()result=ys.get_speedtest()print(result)🔍 Example 1DependenciesYSpeed depends on the following libraries:seleniumrichholoMake sure you also have a Selenium-compatible driver installed for your preferred browser (Chrome, Firefox, etc.).Use  CLI🎬 YspeedContributionFeel free to contribute to this project by opening issues or submitting pull requests. All contributions are welcome.LicenseYSpeed is distributed under the MIT license. See theLICENSEfile for more information.
Package: ysphotutilpy
ysphotutilpySimple photometry utilities.Install by$ pip install ysphotutilpyor$ cd <where you want to download this package>
$ git clone https://github.com/ysBach/ysphotutilpy
$ cd ysphotutilpy
$ git pull && pip install -e .From the second time,just run the last line.NOTE: Please understand this package may undergo severe backward-incompatible changes. This is a package I use for (1) my own research and (2) education (see, e.g.,SNU_AOclass).For (1): I always include a proper "snapshot" of this package to the publication, so any backward incompatible changes won't affect the reproducibility of the published results.For (2): Each semester, students will try to download/install the newest versions of other packages (especiallyccdproc,photutils, etc). But these packages sometimes introduce "breaking changes" to their source codes, and thus, I have to modify my codes to "work" with the newest versions of such packages (e.g., as of 2022 Apr, I suddenly had to dropphotutils <= 1.3due to itsinternal API changein version 1.4 & as of 2022 Dec, I also suddenly had to dropphotutils <= 1.6due to thesame reason). Thus, backward incompatible changes are inevitable for me.My justification is that this is not an "officially recommended" package by, e.g., STScI, but rather it is just a personal toolbox. Even for the name of this package, I tried not to occupy "photutilpy", which must be used by better-organized ones (such as photutils).Enjoy astronomical data reduction!Some useful urls:PS1 Different table columns:PS1 DB obj&det tablesAmong these,PS1 Mean tableis the most widely used (default in MAST query).Explanation onobjInfoFlagcolumn
Package: ysp-postdown
YspPostdown|Python Version| |PyPI version|*Generate markdown API document from Postman.*Installation.. code:: shellpip install ysp_postdownUsageExport JSON from postmanExport your collection from Postman(Only support to Collection v2 for now).
You could get a JSON file... figure::https://raw.githubusercontent.com/YangShuiPing/YspPostdown/master/imgs/step-1.pngStep One: Select the collection which you wanna export... figure::https://raw.githubusercontent.com/YangShuiPing/YspPostdown/master/imgs/step-2.pngStep Two: Find the import button and click it... figure::https://raw.githubusercontent.com/YangShuiPing/YspPostdown/master/imgs/step-3.pngStep Three: Export your collection as *collection v2*.Runysp_postdownto generate markdown document::ysp_postdown xxx.json xxx.mdAnd you will get your API document which is markdown formatting.Click here to see an example generated. <https://github.com/YangShuiPing/YspPostdown/tree/master/demo>_.. |Python Version| image::https://img.shields.io/badge/python-2&3-brightgreen.svg?style=flat-square:target:https://pypi.python.org/pypi/YspPostdown.. |PyPI version| image::https://img.shields.io/pypi/v/YspPostdown.svg?style=flat-square:target:https://pypi.python.org/pypi/YspPostdown
Package: ysql
ysql框架更高效更简洁的sqlite数据库框架，借鉴了安卓Room框架的设计，将框架划分为Entity数据类、Dao数据访问类、Database数据库类三个层次。框架直接建立在sqlite官方库的基础之上，无其他依赖，性能损失很小，隐藏（自动实现）了许多烦人的中间细节，只需要关心sql语句与python数据应用场景。第三方库依赖：无项目地址：ysql (gitee)更新日志：[ChangeLog.md](https://gitee.com/darlingxyz
Package: yssh
ysshA command line SSH helper tool combined ssh, expect and multi-threading.To install :  pip install ysshUsage      :  python3 -mypipIt's a screwdriver, not a set of tools you have to learn about.what it can do :reduce interactive requirement by providing answers and passwordsrun command remotely in specified parallel levelship and run script(or a dir including the target script) remotely in specified parallel levelinteractive (no parallel) in case you still need to log onto each of themcheckexamplesfor basic usage info.
Package: ystafdb
YSTAFDBYSTAFDB creates turtle files of the instances of data based on an ontology.
The turtle files are needed for the BONSAI knowledge graph.The turtle files generated are stored in the BONSAIrdf repository.Currently generates the following:Activity types, flow objects, locations and flows for YSTAFDB v1.0.Installationwith package manager pip from pypiInstallable viapip:pip install ystafdbmanualClone git repo$ git clone git@github.com:BONSAMURAIS/ystafdb.gitEnter cloned repo$ cd ystafdbNow install package$ python setup.py installUsageFirst download the Base Data, and then useystafdb-clito produce the ttl/nt/xml files.For the full syntax, invokeystafdb-cli -h:usage: ystafdb-cli [-h] [-i INDIR] [-o OUTDIR] [-f {nt,ttl,xml}]

Extract rdf from ystafdb

optional arguments:
  -h, --help            show this help message and exit
  -i INDIR, --input INDIR
                        path to ystafdb csv files
  -o OUTDIR, --output OUTDIR
                        Output directory
  -f {nt,ttl,xml}, --format {nt,ttl,xml}
                        The output formatDownload Base DataThe data can be downloadedhereas a zip file.Extract the contents of the zip file. As an example, the data can be placed underystafdb-input.
The following files from the Base Data aremandatoryto have in the folder (ystafdb-inputin our example):material_names.csvsubsystems.csvflows.csvpublications.csvreference_spaces.csvreference_materials.csvreference_timeframes.csvUnder a Linux terminal, you can acomplish the previous two operations with:curl -L "https://www.sciencebase.gov/catalog/file/get/5b9a7c28e4b0d966b485d915?f=__disk__0f%2F58%2Fa7%2F0f58a74db669ee5418f36a698bc85781e867e0ab" -o YSTAFDB_CSV_files.zip
unzip -d ystafdb-input YSTAFDB_CSV_files.zipGenerate the ttl or nt or xml filesIf the package is correctly installed, you can use the command line toolystafdb-clito produce the rdfs as follows:$ ystafdb-cli -i <indir> -o <outdir> -f [ttl|nt|xml]Where:<indir>is the location of the ystafdb csv files, and<outdir>is the directory where the output triples graphs will be placed. This is optional,
if not supplied, the output directory will beoutput-fis the format of the files to generate (ttl,ntorxml). This is optional, if not supplied, it isttl.In the Linux terminal example from above, this would be done with:ystafdb-cli -i ystafdb-inputThe<outputdir>directory will have the following contents:output
├── [ 4.0K]  activitytype
│   └── [ 4.0K]  ystafdb
│       └── [ 249K]  ystafdb.ttl
├── [ 4.0K]  flow
│   └── [ 4.0K]  ystafdb
│       └── [ 4.0K]  huse
│           └── [  41M]  huse.ttl
├── [ 4.0K]  flowobject
│   └── [ 4.0K]  ystafdb
│       └── [  63K]  ystafdb.ttl
├── [ 4.0K]  foaf
│   └── [ 4.0K]  ystafdb
│       └── [ 1.4K]  ystafdb.ttl
├── [ 4.0K]  location
│   └── [ 4.0K]  ystafdb
│       └── [ 158K]  ystafdb.ttl
└── [ 4.0K]  prov
    └── [ 4.0K]  ystafdb
        └── [ 1.0M]  ystafdb.ttlContributingPlease do not edit this package directly.
All contributions should be via pull request.
Package: ystockQuery
ystockQueryA Yahoo Finance wrapper for stock quotes and historical dataInstall:pip install ystockQueryExamples:import ystockQuery

# init Ystock class for Square, Inc.
sq = ystockQuery.Ystock("SQ")

# return a list of history data between start date and end date
hist = sq.history("1-1-2019", "1-1-2020")

# return data for a specifc date from the history
data = hist.atDate("3-12-2019")
print(data.getVolume())
print(data.getLow())
print(data.getOpen())
print(data.getHigh())
print(data.getClose())
print(data.getAdjClose())

# format full history data to dict format
print(hist.toDict())
"""
{
  1546439400: 
  {
    'volume': 5273100,
    'low': 36.0,
    'open': 36.20000076293945,
    'high': 36.75,
    'close': 36.52000045776367,
    'adjclose': 34.28937911987305
  }
}
"""RequirementsSeerequirements.txt
Package: ystockquote
Python module - fetch stock quote data from Yahoo FinanceCreated by: Corey Goldberg (2007,2008,2013, 2016)License: GNU LGPLv2+Dev HomePyPIRequirementsPython 2.7 or Python 3.3+Installytockquotecan be installed fromPyPIwithpip:$ pip install ystockquoteYou can also clone the development repo to install (requiresgit):$ git clone git://github.com/cgoldberg/ystockquote.git
$ cd ystockquote
$ python setup.py installTo run unit tests:$ toxExample Usage>>>importystockquote>>>print(ystockquote.get_price_book('GOOGL'))'51.18'>>>print(ystockquote.get_bid_realtime('GOOGL'))'904.77'>>>>>>importystockquote>>>frompprintimportpprint>>>pprint(ystockquote.get_historical_prices('GOOGL','2013-01-03','2013-01-08')){'2013-01-03':{'Adj Close':'723.67','Close':'723.67','High':'731.93','Low':'720.72','Open':'724.93','Volume':'2318200'},'2013-01-04':{'Adj Close':'737.97','Close':'737.97','High':'741.47','Low':'727.68','Open':'729.34','Volume':'2763500'},'2013-01-07':{'Adj Close':'734.75','Close':'734.75','High':'739.38','Low':'730.58','Open':'735.45','Volume':'1655700'},'2013-01-08':{'Adj Close':'733.30','Close':'733.30','High':'736.30','Low':'724.43','Open':'735.54','Volume':'1676100'}}>>>
Package: ystreamer
ystreamerA Python libary to interact with the Yahoo Finance Websocket
Based on protobuf definition fromhttps://github.com/yahoofinancelive/ylivetickerExamplefrom ystreamer import YahooStreamer
import time

def on_data(data):
    print(data)

stream = YahooStreamer(["AAPL", "MSFT"], on_data)
stream.start()

# Stream continues to run in the background so must wait indefinately 
# or the program will exit
while True:
    time.sleep(1)
Package: ysyai2
ysyai2A library to sync Canvas data to on-premise and perform data analyticsGet StartedThese instructions cover how to get a working copy of the source code and how to set up to run. It also gives an overview of the directory structure of the ysyai2.Install gitYsyai2 is developed using git for version control. The git command line program is named git. git is easily available for all common operating systems.As the Ysyai repo is hosted on GitHub, please refer to either theGitHub setup instructions.Get the source codeTo get a copy of the source code you should fork the Ysyai2 repository on GitHub, create a local clone of your personal fork.You will only need to execute these steps once:Go tohttps://github.com/jkabc123/ysyai2.Press Fork on the top right.When asked where to fork the repository, choose to fork it to your username.Your fork will be created athttps://github.com/<username>/ysyai2.Clone your GitHub fork (replace  with your username):$gitclonehttps://github.com/<username>/ysyai2.git
Package: yt2audio
YT 2 AUDIOThis program allows you to download high-quality audio from YouTube and YouTube Music.Prerequisitesffmpeg
yt-dlpFeatures:- Supports high-quality audio downloads
- Embeds thumbnail in audio file
- Adds metadata to audio file
- Verbose ModeInstallpip install yt2audioUsage:yt2audio [url]Options:Arguments-o, --outputOutput directory for downloaded audio (default: current directory)-f, --output-formatOutput audio format (default: mp3)-v, --verboseEnable verbose mode--aboutAbout
Package: yt2mp3
YouTube to MP3DescriptionThis program simplifies the process of searching, downloading and converting Youtube videos to MP3 files from the command-line. All you need is the video URL or the name of the artist/track you're looking for.The program will attempt to retrieve data for a song matching the provided input by querying the iTunes API and use the data to find a corresponding YouTube video, if a URL is not provided. The video will then be downloaded, converted, and the gathered data will be used to populate the metadata of the MP3.Once finished, the resulting MP3 file will be saved to yourDownloadsdirectory, with the following file-structureMusic/{artist}/{track}.mp3.Note:If a URL is provided and no match is found for the song data, the program will prompt the user for the track/artist and the YouTube thumbnail will be used as the album artwork.Getting StartedPrerequisitesThe program only requires that you have Python 3.4+ andffmpegorlibavinstalled. For more information, check out theadditional setup.InstallYou can install the program with the following command:$pipinstallyt2mp3UsageThe program can be executed via the as follows:$yt2mp3[-options]Options:Arguments-t, --trackSpecify the track name query-a, --artistSpecify the artist name query-c, --collectionSpecify the album name query-u, --urlSpecify a Youtube URL or ID-p, --playlistSpecify a Youtube playlist URL or ID-o, --overwriteOverwrite the file if one exists in output directory-r, --resolutionSpecify the resolution for the cover-art-q, --quietSuppress program command-line output-v, --verboseDisplay a command-line progress bar--versionShow the version number and exit-h, --helpDisplay information on usage and functionalityDocumentationFurther documentation is available onRead The DocsContributingIf you'd like to contribute to the project, feel free to suggest afeature requestand/or submit apull request.
Package: yt2mp4
yt2mp4Download YouTube videos and playlists as MP4 files (and other formats)Get geckodriverLinux (Debian)sudoaptinstallwgetffmpegfirefox-esr-y
wgethttps://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
sudotarxvzfgeckodriver-v0.30.0-linux64.tar.gz-C/usr/bin/
chmod+x/usr/bin/geckodriver
rmgeckodriver-v0.30.0-linux64.tar.gzOtherFigure it yourselfInstallationFrom PyPIpip3installyt2mp4From GitHubpip3installgit+https://github.com/donno2048/yt2mp4UsageIn Pythonfromyt2mp4importdownloaddownload("dQw4w9WgXcQ",outname='output.mp4')# dowload video from https://www.youtube.com/watch?v=dQw4w9WgXcQ and name it output.mp4# will also work:# download("dQw4w9WgXcQ", outname='output.mp4', binary_path=path) # use a different binary path# download("youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")# download("youtu.be/dQw4w9WgXcQ")# download("www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")# download("music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")# download("https://www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")# download("https://music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")# download("https://youtu.be/dQw4w9WgXcQ")In cmd# each of those will convert to another formatyt2mp4# or python3 -m yt2mp4yt2webm
yt2mkv
yt2flv
yt2wmv
yt2avi
yt2mov
yt2m4v
yt2mp3Download playlistFor this you will have to configure a YouTube API keyGet API keyGo to theDeveloper console dashboardand click onCREATE PROJECT, you can name the project and then pressCREATENow go to theCredentials taband click onCREATE CREDENTIALSand chooseAPI key, copy the API key you see and save it somewhere safe, then you can click onCLOSENow go to theYouTube API taband click onENABLEIn Pythonfromyt2mp4importdownload_playlistdownload_playlist(id,api_key)'''- the first argument is the id of the playlist, you can pass either of the following forms- https://www.youtube.com/watch?v=***********&list=PLAYLIST_ID- https://www.youtube.com/playlist?list=PLAYLIST_ID- PLAYLIST_ID- the second argument is the API key- the third is the extension, the default value is 'mp4'- the fourth one is the fps, the default value is 60- the last one is the binary path to the geckodriver'''In cmd# each of those will convert to other formatsytp2mp4
ytp2webm
ytp2mkv
ytp2flv
ytp2wmv
ytp2avi
ytp2mov
ytp2m4v
ytp2mp3Supported formatsmp4webmmkvflvwmvavimovm4vmp3 (auto format as audio)
Package: yt2text
YT2TEXTExtract text from a YouTube video in a single command, using OpenAi's Whisper speech recognition model. It doesn't use disk, performs everything in memory.INSTALL:pip install yt2textWhisper requiresffmpegto be installed in your computer. Check Whisper's requirementshttps://github.com/openai/whisper#setupUSAGE:You'll only interact with the get_text function. It takes a YouTube URL as an argument and returns the text as a string.import yt2text

text = yt2text.get_text("https://www.youtube.com/watch?v=fLeJJPxua3E")
print(text)OPTIONAL ARGUMENTS:model:
Set Whisper model (tiny,base,small,medium or large). Check here for details:https://github.com/openai/whisper#available-models-and-languagesDefaults to "base" which should be good enough for most cases.
The first time you use a model, it will be downloaded first.verboseSet True to print each step of the process. Defaults to False, it only prints if there is an error.Usage with optional argumentsimport yt2text

text = yt2text.get_text("https://www.youtube.com/watch?v=fLeJJPxua3E", model="medium", verbose=True)
print(text)ContactRaise an Issue in yt2text's GitHub repohttps://github.com/atahanuz/yt2text
Package: ytad
YouTube AutomationUsing YouTube's API, this repository will work toward automating tedious tasks for YouTube channels.The main objective is to update YouTube Descriptions with the number of likes, dislikes, likes/(likes+dislikes), timestampup to the YouTube API limit. Check out myYouTube Like, Dislike Counter Playlist!Requirements:Python >= 3.7PyPi distributionpip install ytadSetup RequirementsNeed YouTube account with at least one public videoRegister your account withGoogle console developersNeed to enable API (YouTube Data API V3)You have the choice to choose which OAuth to use; In production, I used Web AppCreate OAuth Client ID: > Web App > Name Web App App > Create > Download OAuth Client (JSON)This will be your web app secret file.(Rename downloaded OAuth Client to client_secret_web_app.json)Setup up OAuth Consent ScreenMake sure to add your testing email as a test user to access your YouTube account (need to manually do this)Ensure to verify your application! Run the following:# creates a token.pickle file for authentication
from ytad.authentication import Authenticate
auth = Authenticate()
youtube = auth.check_token_web_app_data_api()Command Line Interface (CLI) capability:In base environment, you need the following files to run:UpdateVideoDescription (uvd) successfully:client_secret_web_app.jsontoken.pickleuvd -h # input your arguments for ease of use.
# example (Using my YouTube Channel ID as an example...)
uvd --id=UCoCToADdJRd3u-ACz4e_iCw[Deprecated]Command Line Interface (CLI) explained"""This has been deprecated; see above for more integrated CLI capabilities"""
python update_notifications.py --help
python .\update_notifications.py --update_df=Yes --verify_each_update=YesCloudI used AWS services to ensure a cron job (in production) is enacted. This is a low cost solution, utlizing lambda functions and minimial time on Ec2 instances.The cloud setup and infrastructure can be foundhereGoals of Library:Scrape personal Likes/Dislikes from backend (YouTube Studio)Automating the update(s) of descriptions in videosExecutable with parameters and pip installablecron jobMinimization of YouTube RequestsKeygen for API callsargparse: CLI enabled.setup.py (on pypi) for installationRemaining TODOs:Verify setup with @SpencerPaoOverhaul CLI (maybe this should be another issue and version though)Test API and authenticationCreate PyPI and TestPyPI accountsBuild package wheelTest package withtwineUpload package withtwineTry installing withpip