diff --git "a/train/y_entries_out.jsonl" "b/train/y_entries_out.jsonl" new file mode 100644--- /dev/null +++ "b/train/y_entries_out.jsonl" @@ -0,0 +1,3857 @@ +{"package": "y0", "pacakge-description": "y0y0(pronounced \"why not?\") is Python code for causal inference.\ud83d\udcaa Getting StartedRepresenting Probability Expressionsy0has a fully featured internal domain specific language for representing\nprobability expressions:fromy0.dslimportP,A,B# The probability of A given Bexpr_1=P(A|B)# The probability of A given not Bexpr_2=P(A|~B)# The joint probability of A and Bexpr_3=P(A,B)It can also be used to manipulate expressions:fromy0.dslimportP,A,B,SumP(A,B).marginalize(A)==Sum[A](P(A,B))P(A,B).conditional(A)==P(A,B)/Sum[A](P(A,B))DSL objects can be converted into strings withstr()and parsed back\nusingy0.parser.parse_y0().A full demo of the DSL can be found in thisJupyter NotebookRepresenting Causalityy0has a notion of acyclic directed mixed graphs built on top ofnetworkxthat can be used to model causality:fromy0.graphimportNxMixedGraphfromy0.dslimportX,Y,Z1,Z2# Example from:# J. Pearl and D. Mackenzie (2018)# The Book of Why: The New Science of Cause and Effect.# Basic Books, p. 240.napkin=NxMixedGraph.from_edges(directed=[(Z2,Z1),(Z1,X),(X,Y),],undirected=[(Z2,X),(Z2,Y),],)y0has many pre-written examples iny0.examplesfrom Pearl, Shpitser,\nBareinboim, and others.do Calculusy0providesactualimplementations of many algorithms that have remained\nunimplemented for the last 15 years of publications including:AlgorithmReferenceIDShpitser and Pearl, 2006IDCShpitser and Pearl, 2008ID*Shpitser and Pearl, 2012IDC*Shpitser and Pearl, 2012Surrogate OutcomesTikka and Karvanen, 2018Apply an algorithm to an ADMG and a causal query to generate an estimand\nrepresented in the DSL like:fromy0.dslimportP,X,Yfromy0.examplesimportnapkinfromy0.algorithm.identifyimportIdentification,identify# TODO after ID* and IDC* are done, we'll update this interfacequery=Identification.from_expression(graph=napkin,query=P(Y@X))estimand=identify(query)assertestimand==P(Y@X)\ud83d\ude80 InstallationThe most recent release can be installed fromPyPIwith:$pipinstally0The most recent code and data can be installed directly from GitHub with:$pipinstallgit+https://github.com/y0-causal-inference/y0.git\ud83d\udc50 ContributingContributions, whether filing an issue, making a pull request, or forking, are appreciated. SeeCONTRIBUTING.mdfor more information on getting\ninvolved.\ud83d\udc4b Attribution\u2696\ufe0f LicenseThe code in this package is licensed under theBSD-3-Clause\nlicense.\ud83d\udcd6 CitationBefore we publish an application note ony0, you can cite this software\nvia our Zenodo record (also see the badge above):@software{y0,author={Charles Tapley Hoyt andJeremy Zucker andMarc-Antoine Parent},title={y0-causal-inference/y0},month=jun,year=2021,publisher={Zenodo},version={v0.1.0},doi={10.5281/zenodo.4950768},url={https://doi.org/10.5281/zenodo.4950768}}\ud83d\ude4f SupportersThis project has been supported by several organizations (in alphabetical order):Harvard Program in Therapeutic Science - Laboratory of Systems PharmacologyPacific Northwest National Laboratory\ud83d\udcb0 FundingThe development of the Y0 Causal Inference Engine has been funded by the following grants:Funding BodyProgramGrantDARPAAutomating Scientific Knowledge Extraction (ASKE)HR00111990009PNNL Data Model Convergence InitiativeCausal Inference and Machine Learning Methods for Analysis of Security Constrained Unit Commitment (SCY0)90001DARPAAutomating Scientific Knowledge Extraction and Modeling (ASKEM)HR00112220036\ud83c\udf6a CookiecutterThis package was created with@audreyfeldroy'scookiecutterpackage using@cthoyt'scookiecutter-python-packagetemplate.\ud83d\udee0\ufe0f DevelopmentSee developer instructionsThe final section of the README is for if you want to get involved by making a code contribution.Developer InstallationTo install in development mode, use the following:$gitclonegit+https://github.com/y0-causal-inference/y0.git\n$cdy0\n$pipinstall-e.\u2753 TestingAfter cloning the repository and installingtoxwithpip install tox, the unit tests in thetests/folder can be\nrun reproducibly with:$toxAdditionally, these tests are automatically re-run with each commit in aGitHub Action.\ud83d\udce6 Making a ReleaseAfter installing the package in development mode and installingtoxwithpip install tox, the commands for making a new release are contained within thefinishenvironment\nintox.ini. Run the following from the shell:$tox-efinishThis script does the following:Uses BumpVersion to switch the version number in thesetup.cfgandsrc/y0/version.pyto not have the-devsuffixPackages the code in both a tar archive and a wheelUploads to PyPI usingtwine. Be sure to have a.pypircfile configured to avoid the need for manual input at this\nstepPush to GitHub. You'll need to make a release going with the commit where the version was bumped.Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can\nusetox -e bumpversion minorafter."} +{"package": "y001fj_nester", "pacakge-description": "UNKNOWN"} +{"package": "y0-bio", "pacakge-description": "y0-bioBiological applications fory0.\ud83d\udcaa Getting StartedCheck that your BEL graph is identifiable under a causal query:importpybelfromy0.dslimportP,Variablefromy0.identifyimportis_identifiablefromy0_bio.resourcesimportBEL_EXAMPLEfromy0_bio.io.belimportbel_to_nxmgbel_graph=pybel.load(BEL_EXAMPLE)nxmg=bel_to_nxmg(bel_graph)assertis_identifiable(nxmg,P(Variable('Severe Acute Respiratory Syndrome')@Variable('angiotensin II')),)\u2b07\ufe0f InstallationThe most recent release can be installed fromPyPIwith:$pipinstally0_bioThe most recent code and data can be installed directly from GitHub with:$pipinstallgit+https://github.com/y0-causal-inference/y0-bio.gitTo install in development mode, use the following:$gitclonegit+https://github.com/y0-causal-inference/y0-bio.git\n$cdy0-bio\n$pipinstall-e.\u2696\ufe0f LicenseThe code in this package is licensed under the MIT License.\ud83d\ude4f ContributingContributions, whether filing an issue, making a pull request, or forking, are appreciated. SeeCONTRIBUTING.rstfor more information on getting\ninvolved.\ud83c\udf6a Cookiecutter AcknowledgementThis package was created with@audreyr'scookiecutterpackage using@cthoyt'scookiecutter-python-packagetemplate.\ud83d\udee0\ufe0f DevelopmentThe final section of the README is for if you want to get involved by making a code contribution.\u2753 TestingAfter cloning the repository and installingtoxwithpip install tox, the unit tests in thetests/folder can be\nrun reproducibly with:$toxAdditionally, these tests are automatically re-run with each commit in aGitHub Action.\ud83d\udce6 Making a ReleaseAfter installing the package in development mode and installingtoxwithpip install tox, the commands for making a new release are contained within thefinishenvironment\nintox.ini. Run the following from the shell:$tox-efinishThis script does the following:Uses BumpVersion to switch the version number in thesetup.cfgandsrc/y0_bio/version.pyto not have the-devsuffixPackages the code in both a tar archive and a wheelUploads to PyPI usingtwine. Be sure to have a.pypircfile configured to avoid the need for manual input at this\nstepPush to GitHub. You'll need to make a release going with the commit where the version was bumped.Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can\nusetox -e bumpversion minorafter."} +{"package": "y2b", "pacakge-description": "y2bSome commandline tools to simplify video downloading from YouTube.y2b-playlistsaves video urls in a youtube playlist to a text file for further processing.y2b-downloaddownloads video from a url file(or a single url). Automatically retry on failure and remove downloaded url from file."} +{"package": "y2j", "pacakge-description": "y2jA command line tool for translating YAML streams to JSON.Installationpip install y2jUsagey2jaccepts YAML data and writes the equivalent JSON to STDOUT. The YAML may be read from a named file, or from STDIN.Options-c,--compressed: Print with no superfluous whitespace.-p,--pretty: Pretty-print the JSON outputThe following examples are based on the contents ofexample.yml:---\n y2j:\n - Is easy to use\n - Is neatReading from a file$ y2j -p example.yml\n\n{\n \"y2j\": [\n \"Is easy to use\",\n \"Is neat\"\n ]\n}Reading from STDIN$ cat example.yml | y2j -p\n\n{\n \"y2j\": [\n \"Is easy to use\",\n \"Is neat\"\n ]\n}"} +{"package": "y2k", "pacakge-description": "Failed to fetch description. HTTP Status Code: 404"} +{"package": "y2m", "pacakge-description": "y2m: YouTube Live to m3uEnables to get m3u from YouTube live link(s) easilyA Python Libraryy2mTwo CLIy2mconvandy2mlinkForked frombenmoose39/YouTube_to_m3uInstallFrom sourcegitclone--depth1https://githu.com/eggplants/y2my2mcdy2m\npipinstall.From PyPIpipinstally2mUsageCLI$ y2mconv ytlive_channel.txt -o ytlive.m3u\nwrote: ytlive.m3u\n$ y2mlink \"https://www.youtube.com/c/mangalamtv/live\"\nhttps://manifest.googlevideo.com/api/manifest/hls_variant/.../file/index.m3u$ y2mconv -h\nusage: y2mconv [-h] [-o OUT] [-f] [-V] info\n\nConvert YouTube Live info file into m3u\n\npositional arguments:\n info input YouTube Live info file path\n\noptional arguments:\n -h, --help show this help message and exit\n -o OUT, --out OUT output m3u path (overwrite: `-f`)\n -f, --force overwrite if output path is exist\n -V, --version show program's version number and exit\n\nexample input file: https://git.io/JMQ7B$ y2mlink -h\nusage: y2mlink [-h] [-V] url\n\nConvert YouTube Live link into m3u one\n\npositional arguments:\n url input YouTube url\n\noptional arguments:\n -h, --help show this help message and exit\n -V, --version show program's version number and exit\n\nvalid url pattern:\n/^https://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live/?$/\n/^https://www.youtube.com/watch?v=[a-zA-Z0-9_-]+/\n/^https://www.youtube.com/c/[a-zA-Z0-9_-]+/live/?$/Libraryfromy2mimporty2m# ` | | | `# -> `#EXTINF:-1 group-title=\"\" tvg-logo=\"\" tvg-id=\"\", `y2m.meta_fields_to_extinf(fields:str)->str:...# `https://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live`# -> `https://manifest.googlevideo.com/.../index.m3u`y2m.convert_ytlive_to_m3u(url:str)->str:...# url -> booly2m.is_valid_url(url:str)->bool:...# `ytlive_channel.txt` -> `ytlive.m3u`y2m.parse_info(info_file_path:str)->list[str]:...Input file format...\n~~ comment\n...\n | | | \nhttps://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live\n..."} +{"package": "y2mate", "pacakge-description": "An unofficial Python API wrapper forY2Mate.comFeaturesFetch video metadataGet download links for videos in different formats and qualitiesSearch for videos on Y2MateInstallationpipinstally2mateExampleimportasynciofromy2mateimportY2MateClientclient=Y2MateClient()asyncdefmain()->None:# Search for videossearch_result=awaitclient.search(\"The Girl I Like Forgot Her Glasses OP\")print(search_result)# Get video metadata from urlvideo_metadata=awaitclient.from_url(\"https://youtu.be/mpWnhkMLIu4?feature=shared\")print(video_metadata)# Get video download info with download linkdownload_info=awaitclient.get_download_info(video_metadata.video_id,video_metadata.video_links[0].key)print(download_info)asyncio.run(main())"} +{"package": "y2mate-api", "pacakge-description": "y2mate-apiDownload youtube videos and audios bytitle/id/urlFeatures\u2b07\ufe0f Download audio/video by title/id/url\u2b07\ufe0f Downloadnamount of audio/video based on keyword\u2b07\ufe0f Downloadnamount of audio/video related to a particular video id/url\u21a9\ufe0f Resume incomplete downloads\u2699\ufe0f Download audio/video in a specific qualityInstallationEither of the following ways will get you ready.Pipa. From sourcepipinstallgit+https://github.com/Simatwa/y2mate-api.gitb. From pypipipinstally2mate-apiLocallygitclonehttps://github.com/Simatwa/y2mate-api.gitcdy2mate-api\npipinstall.For Windows users you can as well download the executables fromhereUsage$ y2mate -f Developer docs1.Generate download links and other metadataVideofromy2mate_apiimportHandlerapi=Handler(\"Quantum computing in details\")forvideo_metadatainapi.run():print(video_metadata)\"\"\"Output{\"size\": \"13.9 MB\",\"f\": \"mp4\",\"q\": \"720p\",\"q_text\": \"720p (.mp4) m-HD\",\"k\": \"joQdX4S3z8ShOJWn6qaA9sL4Al7j4vBwhNgqkwx0U/tQ99R4mbX1dYceffBBnNn7\",\"status\": \"ok\",\"mess\": \"\",\"c_status\": \"CONVERTED\",\"vid\": \"X8MZWCGgIb8\",\"title\": \"Quantum Computing In 5 Minutes | Quantum Computing Explained | Quantum Computer |Simplilearn\",\"ftype\": \"mp4\",\"fquality\": \"720\",\"dlink\": \"https://rr2---sn-gjo-w43s.googlevideo.com/videoplayback?expire=1686946638&ei=7m6MZK-2NdKQgAepgJGIBg&ip=212.119.40.85&id=o-ADe3hAAtGl6fkEeUD9HKkFNoeQBSwEuttoN5vFPyzLdQ&itag=22&source=youtube&requiressl=yes&mh=Zy&mm=31%2C29&mn=sn-gjo-w43s%2Csn-ab5l6nr6&ms=au%2Crdu&mv=m&mvi=2&pl=23&initcwndbps=1013750&spc=qEK7B_bA4LnIWnJEJPO8Lp__Gz-ysFYRbF7IYj1J5g&vprv=1&svpuc=1&mime=video%2Fmp4&ns=L1NG4wpa6rJJmunA_QDUTswN&cnr=14&ratebypass=yes&dur=298.608&lmt=1682850029743273&mt=1686924560&fvip=1&fexp=24007246&c=WEB&txp=5311224&n=XD35AJLYPy2nng&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJdMdpsMBBByQZCOIglT_EvluXBK2wQ7mH32Ob95WAWJAiAP9PfGRwJKeJcZJXc5ZuVaZMImCAXCnbPcHyoSmRhH4A%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgAMVlWxHYtKeZEzbpKQ9Huqrk-5CQ0kTpSFgAmTIGaE4CIQDR0NJHxHO_TtRbn-HmDOgVD6H3ZUntvgcD1V5yfkngAA%3D%3D&title=Quantum+Computing+In+5+Minutes+%7C+Quantum+Computing+Explained+%7C+Quantum+Computer+%7C+Simplilearn\"}\"\"\"Audiofromy2mate_apiimportHandlerapi=Handler(\"Quantum computing in details\")foraudio_metadatainapi.run(format=\"mp3\"):print(audio_metadata)\"\"\"Output{\"size\": \"4.6 MB\",\"f\": \"mp3\",\"q\": \"128kbps\",\"q_text\": \"MP3 - 128kbps\",\"k\": \"joQdX4S3z8ShOJWn6qaA9sL4Al7j4vBwhNgqlAxyU/NQ99R4mbX1dYceffBBnNn7\",\"status\": \"ok\",\"mess\": \"\",\"c_status\": \"CONVERTED\",\"vid\": \"X8MZWCGgIb8\",\"title\": \"Quantum Computing In 5 Minutes | Quantum Computing Explained | Quantum Computer |Simplilearn\",\"ftype\": \"mp3\",\"fquality\": \"128\",\"dlink\": \"https://dl201.dlmate53.xyz/?file=M3R4SUNiN3JsOHJ6WWQ2a3NQS1Y5ZGlxVlZIOCtyZ1ZqZFEwMHdVdVNvaERxNTA2dysydUpJSm1JT3hhaHFlckg4dEE4QzJUT3VHZU1RR2RvNVZ0WVh5TTU4TXBzREhJdUtzNFNjVndYeGo5bjYzb3B5UjNoeFBnYzVQdUdyVkdlR04rc1F0UTJpdUR3UGpZdkJUcXZUT2d0eDdGYWkwR3R3UWJQT0hZck5vYTgzREVldVB4MFpWQS93Q1M4c2tNaU5hWThWUFErK29UZ3V0V2VVTmRjY2dUMUlxbW1mZkpxaG95cGQ4WndsMnR1K2V5RDVNd1FmVElJV0VwYkhwUXVieXBUaDRZOENZVy9XKzFxLzVqL1drVGRQMGhzREhucXFDNElDeU9JOGIwSHNBPQ%3D%3D\"}\"\"\"Note: To download the media returned, pass the response toapi.save()Auto-download mediafromy2mate_apiimportHandlerapi=Handler(\"Quantum computing in details\")api.auto_save()This will proceed to download the first video found and save it in thecurrent directoryYou can as well specify total videos to be downloaded by usinglimitargument.\nFor instance:fromy2mate_apiimportHandlerapi=Handler(\"https://youtu.be/POPoAjWFkGg\")api.auto_save(limit=10)# This will download the video in path and 9 other videos related to the query specifiedNote: You can still usevideo idsuch asPOPoAjWFkGgas query parameter.Other parametersHandlerauthor : Video author i.e Youtube Channeltimeout : http requests timeoutconfirm : Confirm before downloading mediaunique : Auto-ignore previously downloaded mediathread : Download (x) value of file at a time.Handler.runformat : Media format mp4/mp3quality : Media quality such as 720p/128kbpsresolver : Additional format info : [m4a,3gp,mp4,mp3]limit : Total videos to be retrievedkeyword : Phrase(s) that must be in media titleauthor : Video author i.e Youtube ChannelHandler.auto_savedir : Path to Directory for saving the media filesiterator : Function that yields third_query object -Handler.runprogress_bar : Stdout media-name & Display progress barHandler.savethird_dict : Response ofthird_query.run()dir : Directory for saving the contentsprogress_bar : Display download progress barquiet : Not to stdout anythingnaming_format : Format for generating media filename using thethird_queryresponse keyschunk_size : Size of chunks in KB for downloadsplay : Auto-play media after downloadingresume : Resume incomplete downloadFor more info run$ y2mate -husage: y2mate [-h] [-v] [-f mp3|mp4]\n [-q 4k|1080p|720p|480p|360p|240p|144p|auto|best|worst|mp3|m4a|.m4a|128kbps|192kbps|328kbps]\n [-r m4a|3gp|mp4|mp3] [-k [KEYWORD ...]] [-a [AUTHOR ...]]\n [-l LIMIT] [-d PATH] [-t TIMEOUT] [-c CHUNK] [-i PATH]\n [-o FORMAT] [-thr THREAD] [--disable-bar] [--confirm] [--unique]\n [--quiet] [--history] [--clear] [--resume] [--play]\n [query ...]\n\nDownload youtube videos and audios by title or link\n\npositional arguments:\n query Youtube video title, link or id - None\n\noptions:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -f mp3|mp4, --format mp3|mp4\n Specify media type - audio/video\n -q 4k|1080p|720p|480p|360p|240p|144p|auto|best|worst|mp3|m4a|.m4a|128kbps|192kbps|328kbps, --quality 4k|1080p|720p|480p|360p|240p|144p|auto|best|worst|mp3|m4a|.m4a|128kbps|192kbps|328kbps\n Media quality - auto\n -r m4a|3gp|mp4|mp3, --resolver m4a|3gp|mp4|mp3\n Other media formats incase of multiple options -\n mp4/mp3\n -k [KEYWORD ...], --keyword [KEYWORD ...]\n Media should contain this keywords - None\n -a [AUTHOR ...], --author [AUTHOR ...]\n Media author i.e YouTube channel name - None\n -l LIMIT, --limit LIMIT\n Total videos to be downloaded - 1\n -d PATH, --dir PATH Directory for saving the contents -\n /home/smartwa/git/Smartwa/I-learn-this\n -t TIMEOUT, --timeout TIMEOUT\n Http request timeout in seconds - 30\n -c CHUNK, --chunk CHUNK\n Chunk-size for downloading files in KB - 256\n -i PATH, --input PATH\n Path to text file containing query per line - None\n -o FORMAT, --output FORMAT\n Format for generating filename %(key)s :\n [title,vid,fquality,ftype] or 'pretty' - None\n -thr THREAD, --thread THREAD\n Download [x] amount of videos/audios at once - 1\n --disable-bar Disable download progress bar - False\n --confirm Confirm before downloading file - False\n --unique Auto-skip any media that you once dowloaded - False\n --quiet Not to stdout anything other than logs - False\n --history Stdout all media metadata ever downloaded - False\n --clear Clear all download histories - False\n --resume Resume downloading incomplete downloads\n --play Play media after download - False\n\nThis script has no official relation with y2mate.comReviewCHANGELOGfor latest updates.DisclaimerThis repository is intended for educational and personal use only. The use of this repository for any commercial or illegal purposes is strictly prohibited. The repository owner does not endorse or encourage the downloading or sharing of copyrighted material without permission. The repository owner is not responsible for any misuse of the software or any legal consequences that may arise from such misuse."} +{"package": "y2text", "pacakge-description": "Failed to fetch description. HTTP Status Code: 404"} +{"package": "y2z-distributions", "pacakge-description": "No description available on PyPI."} +{"package": "y42", "pacakge-description": "y42-client-pythonA Python client library for the Y42 API.\nIt also contains ay42CLI utility for local development, built on this library.Note: The underlying API is currently still in an unstable 0.0.x release,\nmeaning things (like this library and CLI) may break unexpectedly from time to time.InstallationBoth the library and CLI tool can be installed viapip3 install y42.Python library usageTODO - check thetestsfolder for some examples for now.Create a new releaseBumpversioninpyproject.tomlto desired semver release.Commit change withchore: bump version to x.y.z.Tag change withgit tag x.y.z.Push new commit together with tag.CLIAuthorizationThe CLI utility will look for a Y42_API_KEY environment variable. You can also specify, or override, the API key via the --api-key flag.HelpRuny42 --helpto get help with commands:foo@bar:~$y42Usage: y42 [OPTIONS] COMMAND [ARGS]...\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 --environment TEXT Override for Y42_ENVIRONMENT ('prod' or 'dev') [default: None] \u2502\u2502 --api-key TEXT Override for Y42_API_KEY [default: None] \u2502\u2502 --install-completion Install completion for the current shell. \u2502\u2502 --show-completion Show completion for the current shell, to copy it or customize the installation. \u2502\u2502 --help Show this message and exit. \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 company List/activate companies \u2502\u2502 git Helper alias for system's own `git` that applies Y42 authorization headers. \u2502\u2502 repos Print all currently cloned spaces and their local git repository directories. \u2502\u2502 reset Reset the local Y42 state. This does not delete your cloned repositories, (but will unlink them from the Y42 CLI). \u2502\u2502 space Manage spaces in Y42 \u2502\u2502 state Prints the current Y42 CLI app state in JSON format. \u2502\u2502 status Show currently active company and space, if any. \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256ffoo@bar:~$y42company--helpUsage: y42 company [OPTIONS] COMMAND [ARGS]...List/activate companies\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 --help Show this message and exit. \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 activate Activate company. Only needed if the specified Y42_API_KEY allows access to multiple companies. \u2502\u2502 info Print information about the specified (or only known) company in JSON format. \u2502\u2502 ls Refresh and print the list of known Y42 companies for your current credentials. \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256ffoo@bar:~$y42space--helpUsage: y42 space [OPTIONS] COMMAND [ARGS]...Manage spaces in Y42\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 --help Show this message and exit. \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\u2502 clone Helper for running `git clone` against the specified space's git repository. \u2502\u2502 info Print information about the specified space. If no space is specified, the current working directory must be a space. \u2502\u2502 locate Print the directory that the space has been cloned to, if any. \u2502\u2502 ls List known spaces \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256fBasic CLI workflow:Create an API key in Y42 and set Y42_API_KEY to this token, e.g. viaexport Y42_API_KEY=\"your-api-key\".List your available spaces viay42 space lsClone a space viay42 clone cd into the space viacd target, or alternatively viacd $(y42 space locate )Run git commands in the space, viay42 git, e.g.y42 git add .ory42 git commit -am \"Hello World!\"Example CLI usage:foo@bar:~$y42spacelsNo known companies, refreshing..No active company, defaulting to only known company my_company0: some-space1: another_space2: test_spacefoo@bar:~$y42spaceclonetest_space# could also use \"2\" instead of \"test_space\" hereSpace will be cloned to /Users/foo/spaces/test_space. Proceed? [Y/n][Shell stderr output]Cloning into '/Users/foo/spaces/test_space'...foo@bar:~$ cd $(y42spacelocatetest_space)foo@bar:~$touchhello.txtfoo@bar:~$y42gitaddhello.txt# \"y42\" is optional for these kinds of local git commandsfoo@bar:~$y42gitcommit-am\"added hello.txt\"[Shell stdout output][main f285d88] added hello.txt1 file changed, 0 insertions(+), 0 deletions(-)create mode 100644 hello.txttest_space > y42 git push[Shell stderr output]remote: [2b9cf0b112f709fbbef92066ce765369a698d45c..f285d8832701cb0712361d6e7b9b407722edde56] Response: Number of files:1, code:200, body:[true]remote: [2b9cf0b112f709fbbef92066ce765369a698d45c..f285d8832701cb0712361d6e7b9b407722edde56] Response: Number of files:1, code:200, body:[]To https://api.dev.y42.dev/gateway/companies/524/spaces/9f095dd1-1c32-4a7d-bb74-a431a8dfdece/git2b9cf0b..f285d88 main -> mainfoo@bar:~$y42statusConfigured Y42 root directory: /Users/foo/Library/Application Support/y42Active company: my_companySpace in current directory: test_spacefoo@bar:~$y42reposmy_company/test_space -> /home/users/foo/spaces/test_space"} +{"package": "y4d", "pacakge-description": "Your Autograding Deputy (YAD)Visit the GitHub for all your needs:https://github.com/AutoGradingDeputy/YADIf you are looking for the user manual you can find it here:https://autogradingdeputy.github.io/YAD/"} +{"package": "y4m", "pacakge-description": "YUV4MPEG2 (.y4m) Reader/Writertested with python-2.7, python-3.3 and python3.4```pythonimport sysimport y4mdef process_frame(frame):# do something with the framepassif __name__ == '__main__':parser = y4m.Reader(process_frame, verbose=True)# simulate chunk of datainfd = sys.stdinif sys.hexversion >= 0x03000000: # Python >= 3infd = sys.stdin.bufferwith infd as f:while True:data = f.read(1024)if not data:breakparser.decode(data)```"} +{"package": "y5facegg", "pacakge-description": "pip install y5faceggUse from PythonUsageimportcv2fromy5faceggimportY5FACE# set model paramsmodel_path=\"y5facegg/weights/yolov5s-face.pt\"device=\"cuda:0\"# or \"cpu\"# init yolov5 modelmodel=Y5FACE(model_path,device)# load an imageimage_path='https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg'# perform inferencebgr_image=cv2.imread(image_path)res_img=model.predict(bgr_image)cv2.imwrite('result.jpg',res_img)"} +{"package": "y5gg", "pacakge-description": "packaged ultralytics/yolov5pip install yolov5OverviewYou can finally installYOLOv5 object detectorusingpipand integrate into your project easily.InstallInstall yolov5 using pip (for Python >=3.7)pip install yolov5Install yolov5 using pip `(for Python 3.6)`pip install \"numpy>=1.18.5,<1.20\" \"matplotlib>=3.2.2,<4\"pip install yolov5Use from PythonBasicimportyolov5# load modelmodel=yolov5.load('yolov5s')# set imageimg='https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'# perform inferenceresults=model(img)# inference with larger input sizeresults=model(img,size=1280)# inference with test time augmentationresults=model(img,augment=True)# parse resultspredictions=results.pred[0]boxes=predictions[:,:4]# x1, x2, y1, y2scores=predictions[:,4]categories=predictions[:,5]# show detection bounding boxes on imageresults.show()# save results into \"results/\" folderresults.save(save_dir='results/')Alternativefromyolov5importYOLOv5# set model paramsmodel_path=\"yolov5/weights/yolov5s.pt\"device=\"cuda:0\"# or \"cpu\"# init yolov5 modelyolov5=YOLOv5(model_path,device)# load imagesimage1='https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'image2='https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg'# perform inferenceresults=yolov5.predict(image1)# perform inference with larger input sizeresults=yolov5.predict(image1,size=1280)# perform inference with test time augmentationresults=yolov5.predict(image1,augment=True)# perform inference on multiple imagesresults=yolov5.predict([image1,image2],size=1280,augment=True)# parse resultspredictions=results.pred[0]boxes=predictions[:,:4]# x1, x2, y1, y2scores=predictions[:,4]categories=predictions[:,5]# show detection bounding boxes on imageresults.show()# save results into \"results/\" folderresults.save(save_dir='results/')Train/Detect/Test/ExportYou can directly use these functions by importing them:fromyolov5importtrain,val,detect,exporttrain.run(imgsz=640,data='coco128.yaml')val.run(imgsz=640,data='coco128.yaml',weights='yolov5s.pt')detect.run(imgsz=640)export.run(imgsz=640,weights='yolov5s.pt')You can pass any argument as input:fromyolov5importdetectimg_url='https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'detect.run(source=img_url,weights=\"yolov5s6.pt\",conf_thres=0.25,imgsz=640)Use from CLIYou can callyolov5 train,yolov5 detect,yolov5 valandyolov5 exportcommands after installing the package viapip:TrainingFinetune one of the pretrained YOLOv5 models using your customdata.yaml:$yolov5train--datadata.yaml--weightsyolov5s.pt--batch-size16--img640yolov5m.pt8yolov5l.pt4yolov5x.pt2Visualize your experiments viaNeptune.AI:$yolov5train--datadata.yaml--weightsyolov5s.pt--neptune_projectNAMESPACE/PROJECT_NAME--neptune_tokenYOUR_NEPTUNE_TOKENInferenceyolov5 detect command runs inference on a variety of sources, downloading models automatically from thelatest YOLOv5 releaseand saving results toruns/detect.$yolov5detect--source0# webcamfile.jpg# imagefile.mp4# videopath/# directorypath/*.jpg# globrtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa# rtsp streamrtmp://192.168.1.105/live/test# rtmp streamhttp://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8# http streamExportYou can export your fine-tuned YOLOv5 weights to any format such astorchscript,onnx,coreml,pb,tflite,tfjs:$yolov5export--weightsyolov5s.pt--include'torchscript,onnx,coreml,pb,tfjs'"} +{"package": "ya", "pacakge-description": "yaMake filters with the mongo languageTo install:pip install ya"} +{"package": "ya2ro", "pacakge-description": "ya2roExampleYa2ro generates Research Objects (ROs) like the following:https://w3id.org/dgarijo/ro/sepln2022. Given a few ROs,ya2rocan also create a landing page:https://oeg-upm.github.io/ya2ro/output/landing_page.htmlRequirementsThe latest version of ya2ro works in Python 3.10.InstallationTo run ya2ro, please follow the next steps:Install from PyPIpip install ya2roInstall from GitHubgit clone https://github.com/oeg-upm/ya2ro\ncd ya2ro\npip install -e .Installing through DockerWe provide a Dockerfile with ya2ro already installed. To run through Docker, you may build the Dockerfile provided in the repository by running:dockerbuild-tya2ro.Then, to run your image just type:dockerrun-itya2ro/bin/bashAnd you will be ready to use ya2ro (see section below). If you want to have access to the results we recommendmounting a volume. For example, the following command will mount the current directory as theoutfolder in the Docker image:dockerrun-it--rm-v$PWD/:/outya2ro/bin/bashIf you move any files produced by ya2ro into/out, then you will be able to see them in your current directory.UsageConfigureBefore running ya2ro, you must configure it appropriately. Please add your GitHub personal token in ya2ro properties file. This needed if you wantya2roto extract your software metadata automatically. The file can be found at:--> ~/ya2ro/src/ya2ro/resources/properties.yaml <--Add a line like the following:# Add here your GitHub personal access tokenGITHUB_PERSONAL_ACCESS_TOKEN:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxya2ro will work if this is not configured, but is highly recommended to apply this setting, as the GitHub API has restricted access.Test ya2ro installationya2ro--helpIf everything goes fine, you should see:ad888888b,\n d8\" \"88\n a8P\n8b d8 ,adPPYYba, ,d8P\" 8b,dPPYba, ,adPPYba,\n`8b d8' \"\" `Y8 a8P\" 88P' \"Y8 a8\" \"8a\n `8b d8' ,adPPPPP88 a8P' 88 8b d8\n `8b,d8' 88, ,88 d8\" 88 \"8a, ,a8\"\n Y88' `\"8bbdP\"Y8 88888888888 88 `\"YbbdP\"'\n d8'\n d8'\n_________________________________________________________\n\nusage: ya2ro [-h] (-i YAML_PATH | -l YA2RO_PREV_OUTPUT) [-o OUTPUT_DIR] [-p PROPERTIES_FILE] [-ns]\n\nHuman and machine readable input as a yaml file and create RO-Object in jsonld and/or HTML view. Run 'ya2ro -configure GITHUB_PERSONAL_ACCESS_TOKEN' this the first time to configure ya2ro\nproperly\n\noptions:\n -h, --help show this help message and exit\n -i YAML_PATH, --input YAML_PATH\n Path of the required yaml input. Follow the documentation or the example given to see the structure of the file.\n -l YA2RO_PREV_OUTPUT, --landing_page YA2RO_PREV_OUTPUT\n Path of a previous output folder using the ya2ro tool. This flag will make a landing page to make all the resources accessible.\n -o OUTPUT_DIR, --output_directory OUTPUT_DIR\n Output directory.\n -p PROPERTIES_FILE, --properties_file PROPERTIES_FILE\n Properties file name.\n -ns, --no_somef Disable SOMEF for a faster execution (software cards will not work).How to useThe first thing to do is create some input for ya2ro. To create valid a yaml you should follow the documentation bellow.Create a yaml from scratch or use one of the supplied templates. Currently ya2ro supports two formats:paperprojectPlease find a template for each type under the directory templates.\nOnce you have a valid yaml (project or paper) is time to run ya2ro.Create machine and human readable contentIt is possible to process batches of yamls at the same time, to do that just specify as input a folder with all the yamls inside.Simple executionya2ro -i templatesya2ro -i templates/project_template.yamlWith optional argumentsya2ro -input templates --output_directory out --properties_file custom_properties.yamlya2ro -i templates -o out -p custom_properties.yamlFaster execution?Use the flag --no_somef or -ns for disabling SOMEF which is the most time consuming process.ya2ro -i templates -nsWARNING: Software cards will no longer work on github links. Therefore you will need to manually insert the software data in the yaml file.Create landing pageya2ro offers the option to create a landing page where all the resources produced are easily accessible. Just indicate the folder where this resources are, for example:ya2ro -l outputDocumentationPlease have a look at ourdocumentationto know which metadata fields are supported byya2ro."} +{"package": "ya360", "pacakge-description": "ya360\u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f Yandex 360\u0414\u043b\u044f \u0444\u0430\u043d\u0430\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 UNIX/Linux - style \u0438\u043b\u0438 \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0441\u0442\u0430\u043b \u043a\u0443\u0440\u043b\u0438\u0442\u044c\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Yandex 360 \u043a\u0430\u043a \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e, \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0437\u0434\u0435\u0441\u044c\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430ya360.readthedocs.io, \u043d\u043e \u043e\u043d\u0430 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:ya360-h\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443, \u0442\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \"\u0441\u0434\u0430\u0442\u044c\" \u0435\u0435 \u043d\u0430\u043c \u0447\u0435\u0440\u0435\u0437\u0444\u043e\u0440\u043c\u0443 \u043d\u0430 github'\u0435, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0438 \"\u0445\u043e\u0442\u0435\u043b\u043a\u0438\" \u043c\u043e\u0436\u043d\u043e\u0437\u0434\u0435\u0441\u044c\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0430\u0434\u043c\u0438\u043d\u0442\u0435. \u0410\u0434\u043c\u0438\u043d\u0442\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435. \u0414\u0430 \u043f\u0440\u0438\u0431\u0443\u0434\u0435\u0442 \u0441 \u0432\u0430\u043c\u0438 CLI!"} +{"package": "yaab", "pacakge-description": "Yet Another Adapter BaseYAAB aims to provide a flexible base for Adapter Design Pattern implementations based on dataclasses.Free software: MIT licenseDocumentation:https://yaab.readthedocs.io.Example UsageLet\u2019s assume that you are interfacing an API that returns aJSONobject with the following structure:{\"weird_name\":\"My name\",\"oid\":\"3\"}And you would like to transform it into a schema that fits the rest of your API, let\u2019s assume:{\"name\":\"My name\",\"id\":3}Then you would define and use your model in the following way:>>> from dataclasses import asdict, dataclass, field\n>>>\n>>> from yaab.adapter import BaseAdapter\n>>>\n>>> @dataclass\n... class MyModel(BaseAdapter):\n... id: int = field(metadata={\"transformations\": (\"oid\", int)})\n... name: str = field(metadata={\"transformations\": (\"weird_name\", )})\n...\n>>> m = MyModel.from_dict({\"weird_name\": \"My name\", \"oid\": \"3\"})\n>>> print(m)\nMyModel(id=3, name='My name')\n>>> asdict(m)\n{'id': 3, 'name': 'My name'}FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.2 (2020-05-03)Introduce type conversion & convenience Mixins0.2.1 (2020-02-18)Bugfix: from_env now utilizes default values.0.2.0 (2020-02-18)Add dataclass nesting support.0.1.0 (2020-01-21)First release on PyPI."} +{"package": "yaacl", "pacakge-description": "yaACL=====Yet another access control list (ACL) per view for Django## Installation* Clone this repo to your PC* Run ``pip install yaACL``* Put ``yaacl`` in INSTALLED_APPS, after auth and admin apps* Put ``import yaacl`` at the end of your current settings file* Run ``./manage.py syncdb`` or ``./manage.py migrate``## Configuration* This app get information about your auth user model form settings(``AUTH_USER_MODEL``)* If you also have custom group model, then define it in``settings.ACL_GROUP_USER_MODEL`` (ie: ``cms_user.group``)## UsageIn views, import ``acl_register_view`` or ``acl_register_class``, thendecorate views you want under control access. After all views are decorated,run command ``./manage.py sync_acl``, so all views will be registered indatabase.```pythonfrom yaacl.decorators import acl_register_viewfrom django.contrib.auth.decorators import login_required@login_required@acl_register_view('Short description about this view', 'resource_name')def index(request):pass```First parameter is ``name`` the short name for this view (resource). Secondparameter is ``resource``, and isn't required. If ``name=None``,``resource`` not supplied, the name for resource will be generated by joiningmodule name and function/class nameIt's up to you how you name those resources, but I recommend (and use inproject I made this app) to name them as ``.``, solater in templates you can check if user has access to all resourcesin ``.``Let's say, you have a typical CRUD view in you news application, so codewould be like this:```pythonfrom yaacl.decorators import acl_register_viewfrom django.contrib.auth.decorators import login_required#decorationg standard function based views@login_required@acl_register_view('News list', 'news.create)def index(request):...@login_required@acl_register_view('Update news entry')def update(request):...@login_required@acl_register_view('Delete news entry')def delete(request):...#decoration class-based views@acl_register_class(u\"Create news\")class Create(FormView):...```So, your resources list will be like this:* ``news.views.index`` News list* ``news.create`` Create new news* ``news.views.update`` Update news entry* ``news.views.delete`` Delete news entryNow if you want to check if current user has access to news.index, then intemplates you can check them by using code like:```html{% load acl %}...{% if request.user|has_access:'news.index' %}Yes it has access to news.index view.{% else %}No, it has not.{% endif %}```But if you want to check if user has access to```html{% if request.user|have_access:'news.' %}Yes it has access to all resources in news.{% else %}No, it has not.{% endif %}```## SignalsActually there is only one signal, ``yaacl.signals.register_resource``, whichis called before resource is registered in ``ACL.acl_list``. It's purpose is totransform ``name`` and/or ``resource``. The function should return dict withkeys ``name`` and ``resource``.Example usage is below, where I use it to remove the ``module`` and ``views``from resource name```pythonfrom yaacl.signals import register_resourcefrom django.dispatch import receiver@receiver(register_resource)def transform_resource(sender, resource, name, **kwargs):resource_parts = resource.split('.')if resource_parts and resource_parts[0] == 'module':resource_parts.pop(0)if len(resource_parts) >= 2 and resource_parts[-2] == 'views':resource_parts.pop(-2)resource = '.'.join(resource_parts)return {'resource': resource, 'name': name}```## Information* If flag ``is_superuser`` is ``True``, then always access is granted* No-access page template is located in ``yaacl/no_access.html`` file* Test in ``has_access`` template tag just check if resource name starts withgiven name## Todo* ``.travis.yml``* A flag, to indicates a resources that staff members has full access"} +{"package": "yaad", "pacakge-description": "yaadYet Another Attribute Dictionary"} +{"package": "yaadl", "pacakge-description": "Started as a toy project.Higher order derivatives are not available yet, code needs some refactoring for it.Usage:fromautodiff.autodiffimport*x1=Variable(2)x2=Variable(5)f=x1.log()+x1*x2-sin(x2)f.backward()"} +{"package": "yaaf", "pacakge-description": "Yet Another Agents FrameworkAn RL research-oriented framework for agent prototyping and evaluationIntroductionInstallationExamplesDQN for Space InvadersDQN for Cart PoleA3C (on GPU) for Space InvadersDQN from scratch for CartPoleMarkov SubmoduleCitingRoadmapContributingAcknowledgmentsIntroductionYAAF is a reinforcement learning, research-oriented framework designed for quick agent prototyping and evaluation.At its core, YAAF follows the assumptions that:Agents execute actions upon the environment (which yields observations and rewards in return)Environments follow the interface fromOpenAI GymAgents follow a clearagent interfaceAny deep learning framework can be used for deep rl agents (even though it comes packed withPyTorch tools)As a simple example, suppose you'd want to evaluate an agent following a random policy on the Space Invaders environmentimportgymfromyaaf.agentsimportRandomAgentfromyaaf.evaluationimportAverageEpisodeReturnMetricfromyaaf.executionimportEpisodeRunnerfromyaaf.visualizationimportLinePlotenv=gym.make(\"SpaceInvaders-v0\")agent=RandomAgent(num_actions=env.action_space.n)metric=AverageEpisodeReturnMetric()runner=EpisodeRunner(5,agent,env,[metric],render=True).run()plot=LinePlot(\"Space Invaders Random Policy\",x_label=\"Episode\",y_label=\"Average Episode Return\",num_measurements=5)plot.add_run(\"random policy\",metric.result())plot.show()Quick Disclaimer:YAAF is not yet another deep reinforcement learning framework.If you are looking for high-quality implementations of state-of-the-art algorithms, then I suggest the following libraries:OpenAI Spinning Up (2020)Acme (2020)Stable-Baselines (2019)RLLib (2019)InstallationFor the first installation I suggest setting up new Python 3.7 virtual environment$ python -m venv yaaf_test_environment\n$ source yaaf_test_environment/bin/activate\n$ pip install --upgrade pip setuptools\n$ pip install yaaf \n$ pip install gym[atari] # Optional - Atari2600Examples1 - Space Invaders DQNimportgymfromyaaf.environments.wrappersimportDeepMindAtari2600Wrapperfromyaaf.agents.dqnimportDeepMindAtariDQNAgentfromyaaf.executionimportTimestepRunnerfromyaaf.evaluationimportAverageEpisodeReturnMetric,TotalTimestepsMetricenv=DeepMindAtari2600Wrapper(gym.make(\"SpaceInvaders-v0\"))agent=DeepMindAtariDQNAgent(num_actions=env.action_space.n)metrics=[AverageEpisodeReturnMetric(),TotalTimestepsMetric()]runner=TimestepRunner(1e9,agent,env,metrics,render=True).run()2 - CartPole DQNimportgymfromyaaf.agents.dqnimportMLPDQNAgentfromyaaf.executionimportEpisodeRunnerfromyaaf.evaluationimportAverageEpisodeReturnMetric,TotalTimestepsMetricenv=gym.make(\"CartPole-v0\")layers=[(64,\"relu\"),(64,\"relu\")]agent=MLPDQNAgent(num_features=env.observation_space.shape[0],num_actions=env.action_space.n,layers=layers)metrics=[AverageEpisodeReturnMetric(),TotalTimestepsMetric()]runner=EpisodeRunner(100,agent,env,metrics,render=True).run()3 - Asynchronous Advantage Actor-Critic on GPU(my multi-task implementation, requires tensorflow-gpu)https://research.nvidia.com/publication/reinforcement-learning-through-asynchronous-advantage-actor-critic-gpufromyaaf.environments.wrappersimportNvidiaAtari2600Wrapperfromyaaf.agents.hga3cimportHybridGA3CAgentfromyaaf.executionimportAsynchronousParallelRunnernum_processes=8envs=[NvidiaAtari2600Wrapper(\"SpaceInvadersDeterministic-v4\")for_inrange(num_processes)]hga3c=HybridGA3CAgent(environment_names=[env.spec.idforenvinenvs],environment_actions=[env.action_space.nforenvinenvs],observation_space=envs[0].observation_space.shape)hga3c.start_threads()trainer=AsynchronousParallelRunner(agents=hga3c.workers,environments=envs,max_episodes=150000,render_ids=[0,1,2])trainer.start()whiletrainer.running:continuehga3c.save(f\"hga3c_space_invaders\")hga3c.stop_threads()4 - CartPole DQN from scratchimportgymfromyaaf.agents.dqnimportDQNAgentfromyaaf.agents.dqn.networksimportDeepQNetworkfromyaaf.executionimportEpisodeRunnerfromyaaf.evaluationimportAverageEpisodeReturnMetric,TotalTimestepsMetricfromyaaf.models.feature_extractionimportMLPFeatureExtractor# Setup envenv=gym.make(\"CartPole-v0\")num_features=env.observation_space.shape[0]num_actions=env.action_space.n# Setup modelmlp_feature_extractor=MLPFeatureExtractor(num_inputs=num_features,layers=[(64,\"relu\"),(64,\"relu\")])network=DeepQNetwork(feature_extractors=[mlp_feature_extractor],num_actions=num_actions,learning_rate=0.001,optimizer=\"adam\",cuda=True)# Setup agentagent=DQNAgent(network,num_actions,discount_factor=0.95,initial_exploration_steps=1000,final_exploration_rate=0.001)# Runmetrics=[AverageEpisodeReturnMetric(),TotalTimestepsMetric()]runner=EpisodeRunner(100,agent,env,metrics,render=True).run()Markov Sub-moduleTODOCiting the ProjectWhen using YAAF in your projects, cite using:@misc{yaaf,\n author = {Jo\u00e3o Ribeiro},\n title = {YAAF - Yet Another Agents Framework},\n year = {2020},\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {\\url{https://github.com/jmribeiro/yaaf}},\n}RoadmapDocumentationCode cleanupMore algorithmsContributingIf you want to contribute to this project, feel free to contact me bye-mailor open an issue.AcknowledgmentsYAAF was developed as a side-project to my research work and its creation was motivated by work done in the projectAd Hoc Teams With Humans And Robotsfunded by the Air Force Office of Scientific Research, in collaboration with PUC-Rio."} +{"package": "yaag", "pacakge-description": "YAAGyet another auto gptInstallationpip install yaagUsage"} +{"package": "yaag-mme", "pacakge-description": "Yet Another Adventure Game - Murder Mystery Edition is a text based adventure game where you play with other NPC adventurers. But whether they live or die, is up to you.Free software: MIT licenseDocumentation:https://yaag-mme.readthedocs.io.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,\nand this project adheres toSemantic Versioning.0.1.0 (2021-07-12)Added:Initial scaffoldDocumentationTestsCLI basics"} +{"package": "yaaHN", "pacakge-description": "![yaaHN API](https://github.com/arindampradhan/yaaHN/blob/master/hn.png)Yaa it's just a python wrapper for the official [firebase hacker news api](https://github.com/HackerNews/API).## Installpython setup.py installorpip install yaaHN## Features:* No oauth required, use a simple client.* Async requests (uses gevent)* Fetch comments, stories, poll, user data and lot more.* Comments easily support support pagination and comment kids.* Hook them to your **django** and **flask** using models api.* Easily initialize to your database from the api sql or nosql.* Most objects have a simple schema for json and xml.## **Client** for hacker New### **``get_comments``**#### Get all comment objects#### Parameters:Name | Type | Required | Description | Default-----|------|----------|-------------|----------item_id | int | Yes | The id of the item (story id or comment id) that has comments kid | Nonelimit | int | No | limit Number of comments to return | 5json | bool | No | If yes returns the json result | False#### Examplesfrom yaaHN import hn_clienthn_client.get_comments(6374031)[,,,,,,]This method uses **gevent requests**### **``top_stories``**#### Yields top 100 stories objects#### Parameters:Name | Type | Required | Description | Default------|------|----------|-------------|---------limit | int | No | limit Number of comments to return | 5first | int | No | set first range from top stories ids | Nonelast | int | No | set last range from top stories ids | Nonejson | bool | No | If yes returns the json result | False#### ExamplesThis is a generator objectfrom yaaHN import hn_clientfor r in hn_client.top_stories(30):print \"%s - %s\" %(r.id , r.title)printThis method uses **gevent requests**### **``get_user``**Returns an **User object**from yaaHN import hn_clienthn_client.get_user('joe')### **``get_item``**Returns an **Item object**from yaaHN import hn_clienthn_client.get_item(1)**Note:** This item object accepts any type of item and can be used as a dummy object, for unrelaible exceptions due to async requests.(Usage in top_stories)### **``get_poll``** , **``get_comment``**,**``get_story``** .from yaaHN import hn_clienthn_client.get_item(8863)hn_client.get_story(879)hn_client.get_comment(2921983)Poll, Story, Comment are subclass (not inherited) of item class . They all have some(not all) of the properties of the item class.### **``top_stories_ids``**#### Returns the list of ids from top stories ( No parameter needed)#### Examplesfrom yaaHN import hn_clienthn_client.top_stories_ids()[8976489,8976451,8976690,8976611,8974024,8973283, ...### **``get_max_item``**Returns the **max item id**#### Examplesfrom yaaHN import hn_clienthn_client.get_max_item()### **``updates``**Get the **updates object**#### Examplesfrom yaaHN import hn_clienthn_client.updates()items updated : 10a = hn_client.updates()## **``models``** for yaaHN##TestsTo run the tests locally$ ./run-tests.shTo run individual test$ python -m unittest tests.##Item**properties**Field | Description------|------------id | The item's unique id. Required.deleted | `true` if the item is deleted.type | The type of item. One of \"job\", \"story\", \"comment\", \"poll\", or \"pollopt\".by | The username of the item's author.time | Creation date of the item, in [Unix Time](http://en.wikipedia.org/wiki/Unix_time).text | The comment, Ask HN, or poll text. HTML.dead | `true` if the item is dead.parent | The item's parent. For comments, either another comment or the relevant story. For pollopts, the relevant poll.kids | The ids of the item's comments, in ranked display order.url | The URL of the story.score | The story's score, or the votes for a pollopt.title | The title of the story or poll.parts | A list of related pollopts, in display order.### ``Poll``, ``Comment`` , ``Story``These are items themselves.(Not inherited but subclass )##User**properties**Field | Description------|------------id | The user's unique username. Case-sensitive. Required.delay | Delay in minutes between a comment's creation and its visibility to other users.created | Creation date of the user, in [Unix Time](http://en.wikipedia.org/wiki/Unix_time).karma | The user's karma.about | The user's optional self-description. HTML.submitted | List of the user's stories, polls and comments.### **``types``*** - **models.comment** - get the comment model* - **models.item** - get the item model* - **models.story** - get the story model* - **models.user** - get the user model* - **models.deleted** - get the deleted model* - **models.poll** - get the poll model* - **models.update** - get the update model"} +{"package": "ya-aioclient", "pacakge-description": "No description available on PyPI."} +{"package": "yaak.inject", "pacakge-description": "YAAK stands for Yet Another Application Kit. It\u2019s a set of tools that help\ndeveloping enterprise applications in python.yaak.injectis a package from the YAAK toolkit that provides dependency\ninjection to your applications. See thisMartin Fowler\u2019s articlefor\nan explanation of dependency injection and its usefulness when developing\nenterprise application.InstallationYou should haveeasy_install(from setuptools or something\nequivalent) installed on your system.To install the package, just type:$ easy_install yaak.injectYou can also install the package from a source tarball. Decompress the\nsource archive and type:$ python setup.py installSupportThis project is hosted onbitbucket.org.\nPlease report issues via the bug tracker.The package documentation can be foundhere.Automated tests are run over the mercurial repository regularly. Build results\ncan be foundhere.Changelog0.2.1 (11-March-2012)The setup.py file does not import code anymore in order to retrieve the\nversion information, since it may cause some installation problemsFixed bad years in the changelog, and reordered the items so that the most\nrecent changes appear firstChanged the aliases for releasing new versionsFixed line endings (unix style)Removed the extensions of the text files since it\u2019s a convention in the\nPython world.0.2.0 (24-Oct-2011)Fixed the broken lock acquire/release implementation when updating the\napplication context dictionary.The locking mechanism is now available for all scopes.The context manager is now responsible for updating the context dictionaries.Fixed duplicate factory calls when providing a factory returning NoneScopeManager.enter_scope now raise a ScopeReenterError when re-entering a\nscopeScopeManager.exit_scope now raise a UndefinedScopeError when exiting an\nundeclared scopeFixed the API documentation0.1.0 (23-Oct-2011)Initial release"} +{"package": "yaamp", "pacakge-description": "Failed to fetch description. HTTP Status Code: 404"} +{"package": "yaap", "pacakge-description": "No description available on PyPI."} +{"package": "yaar", "pacakge-description": "Yet Another Asyncio RequestsInstall and usage are as expected. To install:$pipinstallyaarAnd then the usage:importyaarresponse=awaityaar.get(url)print(response.status,response.text)print(response.json())# send a json in the request bodyresponse=awaityaar.post(url,json={\"some\":\"json\"})print(response.status)To send headers in your request use:response=awaityaar.get(url,headers={'Authentication':'bearer} XYZ')Here you have all usual the methods likeput,delete, etc..In case you need a custom session you can use:session=aiohttp.ClientSession(loop=loop)response=awaityaar.get(url,session=session)"} +{"package": "yaaredis", "pacakge-description": "yaaredis(Yet Another Async Redis (client)) is a fork ofaredis, which itself was ported fromredis-py.yaaredisprovides an\nefficient and user-friendly async redis client with support for Redis Server,\nCluster, and Sentinels.To get more information please read thefull documentationmanaged by the\nupstreamaredisrepo. We are working on hosting our own as the projects\ndiverge \u2013 stay tuned!Installationyaaredisrequires a running Redis server. To install yaaredis, simply:python3 -m pip install yaaredisor from source:python3 -m pip install .Note thatyaaredisalso supports usinghiredisas a drop-in performance\nimprovements. You can either installhiredisseparately or make use of the\nPyPI extra to make use of this functionality:python3 -m pip install yaaredis[hiredis]Getting startedWe havevarious examplesin this repo which you may find useful. A few more\nspecific cases are listed below.Single Node ClientimportasynciofromyaaredisimportStrictRedisasyncdefexample():client=StrictRedis(host='127.0.0.1',port=6379,db=0)awaitclient.flushdb()awaitclient.set('foo',1)assertawaitclient.exists('foo')isTrueawaitclient.incr('foo',100)assertint(awaitclient.get('foo'))==101awaitclient.expire('foo',1)awaitasyncio.sleep(0.1)awaitclient.ttl('foo')awaitasyncio.sleep(1)assertnotawaitclient.exists('foo')asyncio.run(example())Cluster ClientimportasynciofromyaaredisimportStrictRedisClusterasyncdefexample():client=StrictRedisCluster(host='172.17.0.2',port=7001)awaitclient.flushdb()awaitclient.set('foo',1)awaitclient.lpush('a',1)print(awaitclient.cluster_slots())awaitclient.rpoplpush('a','b')assertawaitclient.rpop('b')==b'1'asyncio.run(example())# {(10923, 16383): [{'host': b'172.17.0.2', 'node_id': b'332f41962b33fa44bbc5e88f205e71276a9d64f4', 'server_type': 'master', 'port': 7002},# {'host': b'172.17.0.2', 'node_id': b'c02deb8726cdd412d956f0b9464a88812ef34f03', 'server_type': 'slave', 'port': 7005}],# (5461, 10922): [{'host': b'172.17.0.2', 'node_id': b'3d1b020fc46bf7cb2ffc36e10e7d7befca7c5533', 'server_type': 'master', 'port': 7001},# {'host': b'172.17.0.2', 'node_id': b'aac4799b65ff35d8dd2ad152a5515d15c0dc8ab7', 'server_type': 'slave', 'port': 7004}],# (0, 5460): [{'host': b'172.17.0.2', 'node_id': b'0932215036dc0d908cf662fdfca4d3614f221b01', 'server_type': 'master', 'port': 7000},# {'host': b'172.17.0.2', 'node_id': b'f6603ab4cb77e672de23a6361ec165f3a1a2bb42', 'server_type': 'slave', 'port': 7003}]}BenchmarkPlease run test scripts in thebenchmarksdirectory to confirm the\nbenchmarks. For a benchmark in the original yaaredis author\u2019s environment\nplease see:benchmark.ContributingDeveloper? See ourguideon how you can contribute."} +{"package": "yaargh", "pacakge-description": "Yaargh is a fork of Argh (https://github.com/neithere/argh/).Why fork?The argh project is no longer maintained (https://github.com/neithere/argh/issues/124#issuecomment-383645696).\nThis project will attempt to fix issues and make improvements to the original project.\nThe intent is for all these changes to be made back to the original argh project\nwhen that becomes possible, and for yaargh to act as a replacement until it is.You can use yaargh as a drop-in replacement for argh (import yaargh as argh)\nthough see Compatability below.In order to support using yaargh automatically even in applications where you can\u2019t easily change\nthe code, the optional featureyaargh[import-argh]will add a dummyarghmodule such thatimport arghwill useyaargh.HighlightsThe most signifigant differences fromargh, and reasons you may prefer to use it:Commands that fail with aCommandErrornow exit with status1(failure) instead of\nstatus0(success). This is extremely important when used in scripts.CompatabilityWhile yaargh strives to maintain backwards compatability with argh and its existing behavior,\nthe nature of a library likearghwith a large amount of \u201cmagic\u201d behavior and defaults\nmeans that what we consider the best default may change from version to version. For example,\nhelp text wording may change.In addition, there is behavior that is almost always a bug but that it is technically possible\nsome users rely on.Both kinds of compatability breaks are listed below:If a function\u2019s type signature included a*varargsargument with an annotation of\ntypestr, this annotation previously was ignored. Now, that annotation will be used\nas a help string. In almost all cases this should be fixing behavior to match user intent,\nbut it will technically result in different--helpoutput.Previously, if a function raised ayaargh.CommandErroror an error explicitly marked as wrapped,\nthenyaargh.dispatch()(and by extensionyaargh.dispatch_command()andyaargh.dispatch_commands())\nwould write the error message to the givenerror_file(by defaultsys.stderr), then\nreturn. It now raises a SystemExit instead of returning. In almost all cases,dispatch()is\nthe last thing the program does anyway, and parsing failures already caused a SystemExit to be\nraised so most users who need to do something after error will already be catching it.\nThis is a signifigant break but is nessecary to allow non-zero exit codes for failed commands.Related to the above, commands that fail with ayaargh.CommandErroror other wrapped error\nwill now exit with status1, indicating failure. Previously, unless the user did something to avoid it,\nthe command would have returned fromyaargh.dispatch()and subsequently exited success.\nIn the vast majority of cases this would have been a latent bug likely to cause havoc in scripts\nor other systems which rely on status code to check if a command succeeded.\nYou can useCommandError(message, code=0)to restore the previous behavior.Original READMEBuilding a command-line interface? Found yourself uttering \u201cargh!\u201d while\nstruggling with the API ofargparse? Don\u2019t like the complexity but need\nthe power?Everything should be made as simple as possible, but no simpler.\u2014Albert Einstein (probably)Arghis a smart wrapper forargparse.Argparseis a very powerful tool;Arghjust makes it easy to use.In a nutshellArgh-powered applications aresimplebutflexible:Modular:Declaration of commands can be decoupled from assembling and dispatching;Pythonic:Commands are declared naturally, no complex API calls in most cases;Reusable:Commands are plain functions, can be used directly outside of CLI context;Layered:The complexity of code raises with requirements;Transparent:The full power of argparse is available whenever needed;Namespaced:Nested commands are a piece of cake, no messing with subparsers (though\nthey are of course used under the hood);Term-Friendly:Command output is processed with respect to stream encoding;Unobtrusive:Arghcan dispatch a subset of pure-argparsecode, and pure-argparsecode can update and dispatch a parser assembled withArgh;DRY:The amount of boilerplate code is minimal; among other things,Arghwill:infer command name from function name;infer arguments from function signature;infer argument type from the default value;infer argument action from the default value (for booleans);add an alias root commandhelpfor the--helpargument.NIH free:Arghsupportscompletion,progress barsand everything else by being\nfriendly to excellent 3rd-party libraries. No need to reinvent the wheel.Sounds good? Check the tutorial!Relation to argparseArghis fully compatible withargparse. You can mixArgh-agnostic andArgh-aware code. Just keep in mind that the dispatcher does some extra work\nthat a custom dispatcher may not do.InstallationUsing pip:$ pip install arghArch Linux (AUR):$ yaourt python-arghExamplesA very simple application with one command:importarghdefmain():return'Hello world'argh.dispatch_command(main)Run it:$./app.pyHelloworldA potentially modular application with multiple commands:importargh# declaring:defecho(text):\"Returns given word as is.\"returntextdefgreet(name,greeting='Hello'):\"Greets the user with given name. The greeting is customizable.\"returngreeting+', '+name# assembling:parser=argh.ArghParser()parser.add_commands([echo,greet])# dispatching:if__name__=='__main__':parser.dispatch()Of course it works:$./app.pygreetAndyHello,Andy$./app.pygreetAndy-gArrrghArrrgh,AndyHere\u2019s the auto-generated help for this application (note how the docstrings\nare reused):$ ./app.py help\n\nusage: app.py {echo,greet} ...\n\npositional arguments:\n echo Returns given word as is.\n greet Greets the user with given name. The greeting is customizable.\u2026and for a specific command (an ordinary function signature is converted\nto CLI arguments):$ ./app.py help greet\n\nusage: app.py greet [-g GREETING] name\n\nGreets the user with given name. The greeting is customizable.\n\npositional arguments:\n name\n\noptional arguments:\n -g GREETING, --greeting GREETING 'Hello'(The help messages have been simplified a bit for brevity.)Argheasily maps plain Python functions to CLI. Sometimes this is not\nenough; in these cases the powerful API ofargparseis also available:@arg('text',default='hello world',nargs='+',help='The message')defecho(text):printtextThe approaches can be safely combined even up to this level:# adding help to `foo` which is in the function signature:@arg('foo',help='blah')# these are not in the signature so they go to **kwargs:@arg('baz')@arg('-q','--quux')# the function itself:defcmd(foo,bar=1,*args,**kwargs):yieldfooyieldbaryield', '.join(args)yieldkwargs['baz']yieldkwargs['quux']LinksProject home page(GitHub)Documentation(Read the Docs)Package distribution(PyPI)Questions, requests, bug reports, etc.:Issue tracker(GitHub)Mailing list(subscribe to get important announcements)Direct e-mail (neithere at gmail com)AuthorDeveloped by Andrey Mikhaylenko since 2010.See fileAUTHORSfor a complete list of contributors to this library.SupportThe fastest way to improve this project is to submit tested and documented\npatches or detailed bug reports.Otherwise you can \u201cflattr\u201d me:LicensingArgh is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.Argh is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License\nalong with Argh. If not, see ."} +{"package": "yaargh-dummy-argh", "pacakge-description": "No description available on PyPI."} +{"package": "yaasr", "pacakge-description": "Yet Another Audio Stream RecorderAudio stream recorded and static DB for radio stations.Why?Because other tools are (probably,is not clear) not availabe to use.InstallInstall with pippip install yaasrUsageFrom PythonSave predefined audio locallyLoad a pre-defined stream and save 5 audio chunks of 60 secondsfromyaasr.recorder.streamimportYStreamys=YStream('radio-universidad-cordoba-argentina')ys.load()ys.record(total_seconds=300,chunk_bytes_size=1024,chunk_time_size=60)You will see new audio files at your local folderSave custom audio locallyLoad a custom stream and save 5 audio chunks of 60 secondsfromyaasr.recorder.streamimportYStream\"\"\" test custom stream \"\"\"ys=YStream(stream_name='my-custom-stream')ys.destination_folder='some-path/my-chunks-folder'ys.title='My radio title'ys.short_name='my-radio'# list of stream (if first fails the second should be used)ys.streams=[{'url':'https://my-radio.org/stream'}]ys.record(total_seconds=300,chunk_bytes_size=1024,chunk_time_size=5)You will see new audio files atsome-path/my-chunks-folderfolderUpload to Google Cloud Storagefromyaasr.recorder.streamimportYStreamfromyaasr.processors.audio.reduceimportreformatfromyaasr.processors.archive.google_cloudimportupload_to_google_cloud_storage# os.environ[\"GOOGLE_APPLICATION_CREDENTIALS\"] = \"google-cloud-storage-credential.json\"ys=YStream('radio-universidad-cordoba-argentina')ys.load()# post-processors (you can combine or create new processors)ys.post_process_functions=[{'fn':reformat,'params':{'audio_format':'mp3','mono':True,'delete_on_success':True}},{'fn':upload_to_google_cloud_storage,'params':{'bucket_name':'parlarispa-radio','delete_on_success':True}}]ys.record(total_seconds=300,chunk_bytes_size=1024,chunk_time_size=60)Upload audio chunks using sshPost process audio to MP3 16Khz and upload via ssh the result cleaning local files after the processfromyaasr.recorder.streamimportYStreamfromyaasr.processors.audio.reduceimportreformatfromyaasr.processors.archive.sshimportupload_sshys=YStream('radio-universidad-cordoba-argentina')ys.load()# post-processors (you can combine or create new processors)ys.post_process_functions=[{'fn':reformat,'params':{'audio_format':'mp3','delete_on_success':True}},{'fn':upload_ssh,'params':{'host':'myhost.com','user':'username','password':'mypass','destination_folder':'/home/username/audios/','port':901,'delete_on_success':True}}]ys.record(total_seconds=300,chunk_bytes_size=1024,chunk_time_size=60)Usage from command lineList all available streams$ yaasr ls\nradio-bio-bio-santiago-chile: https://unlimited4-us.dps.live/biobiosantiago/aac/icecast.audio\nradio-universidad-cordoba-argentina: https://sp4.colombiatelecom.com.co:10995/streamInfo about a stream$ yaasr info --stream radio-bio-bio-santiago-chile\n{\n \"title\": \"Bio Bio Santiago de Chile\",\n \"web\": \"https://vivo.biobiochile.cl/player/\",\n \"streams\": [\n {\n \"url\": \"https://unlimited4-us.dps.live/biobiosantiago/aac/icecast.audio\",\n \"extension\": \"aac\"\n }\n ]\n}Record a stream$ yaasr record \\\n --stream radio-bio-bio-santiago-chile \\\n --total_seconds 90 \\\n --chunk_bytes_size 512 \\\n --chunk_time_size 30\n\n2021-02-14 18:27:20,382 - yaasr.recorder.stream - INFO - Attempt to record from https://unlimited4-us.dps.live/biobiosantiago/aac/icecast.audio\n2021-02-14 18:27:21,244 - yaasr.recorder.stream - INFO - Recording from https://unlimited4-us.dps.live/biobiosantiago/aac/icecast.audio\n2021-02-14 18:27:56,923 - yaasr.recorder.stream - INFO - 2021-02-14 18:27:56.923239 Elapsed 0:00:35.679521 Finish chunk 1274\n2021-02-14 18:27:56,924 - yaasr.recorder.stream - INFO - Chunk finished\n2021-02-14 18:28:27,132 - yaasr.recorder.stream - INFO - 2021-02-14 18:28:27.131768 Elapsed 0:01:05.888050 Finish chunk 1981\n2021-02-14 18:28:27,132 - yaasr.recorder.stream - INFO - Chunk finished\n2021-02-14 18:28:51,294 - yaasr.recorder.stream - INFO - Finish recording 2021-02-14 18:28:51.294881\n2021-02-14 18:28:51,295 - yaasr.recorder.stream - INFO - Chunk finishedMore docsAdd recording task tosupervisor"} +{"package": "yaast", "pacakge-description": "Yaast (J\u00e5st)YetAnotherAWSSessionToolWhy?..After obtaining a normal accessKey set,\nthe MFA enabled user faces the challege of\nmantaining a daily set of temp accessKeys+token (session) for\nuse with awscli, sdks and the stuff like terraform.0. Setup \"start\" profileaws configure --profile awsops\n# PASTE keys from aws csv file ...\n\nvim ~/.aws/config \n# ADD mfa_serial = arn:aws:iam::0000000:mfa/xxxxxxx1. ExecuteWrites a new [default] section into your $HOME/.aws/credentials,\nafter downloading a new SESSION temp access/token set through a \"start\" profile.\nStart profile name defaults to [awsops] and should have 'mfa_serial' set, together with accesskeys.Both thestartanddestprofiles names can be selected with flagsyaast [-h] [flags] DEPENDSon botocore"} +{"package": "yaat", "pacakge-description": "Yaatyet another ASGI toolkitYaatYaat is an asynchronous web framework/toolkit.DocumentationFeaturesProvide decorator routes & class-based views.Template support withJinja2.Static file serving.HTTP streaming response.Cookie support.WebSocket support.API schema generator andSwagger UI.Background tasks runner.Server startup and shutdown events.CORS support.Test client usinghttpx.RequirementsPython 3.6+Setuppip3installyaatYou'll also want to install an ASGI server, such as uvicorn.pip3installuvicornExampleWriting with Yaat is as simple as...app.pyfromyaatimportYaatfromyaat.responsesimportTextResponseapp=Yaat()@app.route(\"/\")asyncdefindex(request):returnTextResponse(\"Hello World\")Then run using uvicorn:uvicornapp:appInspirationI know there are a lot of awesome frameworks out there. So some might ask why did I write my own. Actually, I created this to learn how the web framework works.I started this after followingJahongir Rahmonov's blog postabout writing a web framework. Feel free to check out his WSGI frameworkAlcazar.More features will be added in the future. You can check out theproject board.Icon CreditIcons made byDave Gandyfromwww.flaticon.com"} +{"package": "yab", "pacakge-description": "Failed to fetch description. HTTP Status Code: 404"} +{"package": "yaba", "pacakge-description": "yaba - YAML Actions Based Automationyabaing soon..."} +{"package": "yabadaba", "pacakge-description": "The yabadaba package (short for \u201cYay, a base database!\u201d) provides a mid-level\nabstraction layer for interacting with databases containing JSON/XML equivalent\ndata records. The primary purpose of the yabadaba package is to make it easy\nto design user-friendly Python packages that can access and store content in a\nvariety of database types.In design, the yabadaba package consists of five major components:Database classes that provide pythonic APIs to interact with databases. A\nbase Database class defines common method calls for interacting with the\nrecords in a database, such as querying, adding, modifying, and deleting\nentries. Child classes of Database are then defined that implement the\nuniversal interaction methods for a given type of database.A base Record class provides a template for interpreting single database\nentries. Developers are meant to specify unique Record classes for each\nunique schema that is part of their project. In this way, users can\ninterface with the data both in its raw format and using class-specific\nmethods and attributes. Each Record class also allows for database query\noperations to be defined that allow for filtering of any hosted records\nbased on meaningful fields of the Record\u2019s schema.A ModuleManager class is defined that helps treat the child classes of\nthe Database and Record classes in a modular fashion. In particular, the\nModuleManagers allow for the code to work even if there are issues with any\nof the child classes, and make it possible for packages that import the\nmanagers to append their own child classes.Generic query methods are also provided that support the construction of the\nrecord-specific query operations. In short, these are meant to allow for\nqueries to operate efficiently across all of the database types and ideally\nreturn identical responses despite the underlying infrastructure\ndifferences.A Settings class is provided that makes it possible for users to save\naccess parameters for a database under a simple name that can then be\nreloaded in a later session.Package developers that want to provide APIs to any associated databases can\nsimply import the various components of yabadaba and define their own Record\nclasses that are specific to their own data. Users of the resulting packages\ncan then easily explore the data, make their own copies, etc.InstallationThe yabadaba package can easily be installed using pip or conda-forgepip install yabadabaorconda install -c conda-forge yabadabaDocumentationDocumentation can be found in the doc folder in the github repository.For support, post a issue to github or emaillucas.hale@nist.gov."} +{"package": "yabai-client", "pacakge-description": "No description available on PyPI."} +{"package": "yabai-navigation-utilities", "pacakge-description": "A set of utilities to make navigating around Yabai(https://github.com/koekeishiya/yabai) easier. Details athttps://github.com/sendhil/yabai-navigation-utilities."} +{"package": "yabai-stack-navigator", "pacakge-description": "A simple script to make navigating between stacks and windows in Yabai(https://github.com/koekeishiya/yabai) easier. Details athttps://github.com/sendhil/yabai-stack-navigator."} +{"package": "yabc", "pacakge-description": "yabc - a bitcoin tax calculatoryabc translates cryptocurrency trades, mining, and spending data into a list of\nreports that can be sent to tax authorities. It is most useful for\ncryptocurrency traders in the US.yabc is the tax calculator behindhttps://velvetax.com/.$ python -m yabc testdata/gemini/sample_gemini.csv ./testdata/coinbase/sample_coinbase.csv\n13 transactions to be reported\n\n>\n>\n>\n>\n>\n>\n>\n>\n>\n>\n>\n>\n>\n\ntotal gain or loss for above transactions: 15243\n\ntotal basis for above transactions: 1400\ntotal proceeds for above transactions: 16643\nRemaining coins after sales:\n\n\n\n\n\n\n\n\n\n\n\nAn adhoc CSV format is supported for non-exchange transactions like mining, gifts, and purchases.yabc also includes a set of HTTP endpoints that allow for storing data more\npermanently in a database, sqlite by default. Postgres as a backend is also supported.TODOTODO: Support coin/coin trades like BTC/ETH.TODO: Enable importing from more exchanges (binance)TODO: Add better historical price lookup support; it is now a stub.Installation from source, with virtualenvgit clone git@github.com:robertkarl/yabc.git\ncd yabc\nvirtualenv -p python3 venv\n. venv/bin/activate\npython setup.py installNotesFile structure, setup.py usage, and shields inspired by source of python\nmodulessshuttle,flask, andblack.CaveatsPlease note that yabc is not a tax service or tax accounting software and is\nprovided with no warranty. Please see the LICENSE file for more details.yabc is not associated with any of the mentioned exchanges or companies\nincluding but not limited to binance, coinbase, or gemini. Any trademarks are\nproperty of their respective owners."} +{"package": "yabci", "pacakge-description": "yabci - yet another beancount importeryabci(yet another beancount importer) is a flexible & extensibleimporter for beancount(v2), aiming to replace any standard importer without the need to write custom python code.Its goal is to support as many import formats as possible, while giving you complete control over the conversion into beancount transactions. The conversion is configured by a config, eliminating the need to write custom python code (but which can be used for complex cases)MotivationThere are a lot of beancount importers available. Most of them are specifically tailored for a certain format of certain banks or payment providers. And depending on the author's needs, they map import data to beancount transactions in a certain way. Any additional data from your import files is discarded. If you want to finetune beancount transactions or want to use more advanced features like tags, most of the time you are out of luck.yabci tries to fill this gap: yabci is format-agnostic regarding input files (everything the underlyingbenedict supports, which means CSV, JSON, andmore). On the beancount side, yabci supports all transaction properties, postings & balances (from the basic ones like date, payee, narration to tags, meta data & links).The only thing to do for the end user is to tell yabci, which input field shall be mapped into which beancount fields. yabci takes care of the rest, like parsing dates from strings, parsing numbers with currencies, duplicate detection, etc.Features:supports any input file formata lot of formats out of the box, such as csv & json (anything that the fantasticbenedictsupports)anything else can used by implementing a custom python function to convert the input file into a nesteddictcomplete control: you can decide specifically how your input data gets transformed into a beancount transactionsupport for all beancount transaction properties (date, flag, payee, narration, tags, links)support for all posting properties (account, amount, cost, price, flag)support for transaction & post meta datasupport for multiple postings per transactionany field can be transformed while importing it, giving you total control over the outputconversion of data types: no more custom date or number parsingduplication detection (optionally using existing identifiers in your input data)Getting started with beancount importersIf you already know beancount importers, you can skip to [Getting started with yabci]To import external data into beancount, beancount uses so-calledimporters. You can install them from pip or write them on your own. If you are reading this, you probably want to useyabcito create one on your own.To tell beancount about your importers, you have to createimporter config. This is a python file (with the ending.py) with the necessary importer code. While example importers can become complicated very easily (see the example at [https://github.com/beancount/beancount/blob/v2/examples/ingest/office/importers/utrade/utrade_csv.py]), importers usingyabcishould look a lot simpler.If you have your importer ready, you can run the beancount commandbean-extracton your import files.bean-extractwill use your importer to generate beancount transactions, which you can paste / redirect into your*.beancountfiles.Getting started with yabci(if you want to see some real world code, check the repository'sexamplesfolder)Say, you have the following csv from your bank, and want to import it into beancount:bank-foo.csv\"ID\",\"Datetime\",\"Note\",\"Type\",\"From\",\"To\",\"Amount\"\n\"2394198259925614643\",\"2017-04-25T03:15:53\",\"foo service\",\"Payment\",\"Brian Taylor\",\"Foo company\",\"-220\"\n\"9571985041865770691\",\"2017-06-05T23:25:11\",\"by debit card-OTHPG 063441 bar service\",\"Charge\",\"Brian Taylor\",\"Bar restaurant\",\"-140\"Or maybe you have the data asjson(yabcitreats both input formats the same):*bank-foo.json*{\"values\":[{\"ID\":\"2394198259925614643\",\"Datetime\":\"2017-04-25T03:15:53\",\"Note\":\"foo service\",\"Type\":\"Payment\",\"From\":\"Brian Taylor\",\"To\":\"Foo company\",\"Amount\":\"-220\"},{\"ID\":\"9571985041865770691\",\"Datetime\":\"2017-06-05T23:25:11\",\"Note\":\"by debit card-OTHPG 063441 bar service\",\"Type\":\"Charge\",\"From\":\"Brian Taylor\",\"To\":\"Bar restaurant\",\"Amount\":\"-140\"}]}You want to import that data into beancount, with the following requirementstransaction date shall obviously be taken from\"Datetime\"payee shall be taken from\"To\"description shall be a combination of\"Type\"and\"Note\"flag shall always be*transaction meta data shall contain the value of\"ID\"transaction shall be tagged with#sampleimporteryou want one posting for the accountAssets:FooBank:Account1containing\"Amount\"as \u20acyou want another posting for the accountExpenses:MiscWith an according yabci config (see below), beancount can import & map your import data like this:$bean-extractconfig.pysample.csv2017-04-25*\"Foo company\"\"(Payment): foo service\"#sampleimporterid:\"2394198259925614643\"Assets:FooBank:Account1-220EURExpenses:Misc2017-06-05*\"Bar restaurant\"\"(Charge): by debit card-OTHPG 063441 bar service\"#sampleimporterid:\"9571985041865770691\"Assets:FooBank:Account1-140EURExpenses:MiscNow how does this work?Like for any beancount importer, you have to specify how the data in the bank's export files shall be mapped into beancount transactions.Following yabci config can be used to get the results above:config.pyimportyabciCONFIG=[yabci.Importer(target_account=\"Assets:FooBank:Account1\",# where to find the list of transactions (csv files can use \"values\")mapping_transactions=\"values\",mapping_transaction={# regular str: use the value of \"TransactionDate\" in input data\"date\":\"Datetime\",\"payee\":\"To\",# if you want a fixed string, use type bytes (since regular strings# would be interpreted as dict key)\"flag\":b\"*\",# for more complex cases, you can use lambda functions. The function# receives the (complete) raw input dict as single argument\"narration\":lambdadata:\"(%s):%s\"%(data.get(\"Type\"),data.get(\"Note\")),# if you pass a dict, the dict itself will be mapped again (with the# same logic as above)\"meta\":{\"id\":\"ID\",},# same goes for sets\"tags\":{b\"sampleimporter\"},# same goes for lists of dicts: each dict will be mapped again\"postings\":[{\"amount\":lambdadata:[data.get(\"Amount\"),\"EUR\"],},{\"account\":b\"Expenses:Misc\",},],}),]Notes:\"date\"only acceptsdatetime.date. If a string is passed,yabcitries to convert it viadateutil.parser\"amount\"must be a 2-element list, containing numeric amount & currencyMore advanced featuresbenedict argumentsIf you need to pass special parameters to benedict (for example how your CSV is formatted), you can use the config entrybenedict_kwargs. This dict gets passed to benedict and determines how you input file is parsed. Seefor available options.Example for passing options about CSV format:CONFIG=[yabci.Importer(benedict_kwargs={\"delimiter\":\";\"},# ...)]date parsingTransaction dates are parsed usingdateutil. If you need to pass certain options toparse(), you can useparse_date_options:Example for european dates (\"01.06.2023\"is parsed as \"January 6th\" by default, if you want it to be interpreted as\"June 1st\", you have to pass thedayfirstoption)CONFIG=[yabci.Importer(parse_date_options={\"dayfirst\":True},# ...)]Unsupported \u00ecnput data formatsIf you want to import data from formats which are notsupported by benedict, you can define aprepare_datamethod. This method should transform the input file into a (nested) dictionary which benedict can parse afterwards. Since you can use arbitrary python code here, you should be able to useyabcifor really any file formats..jsoninside a zip file (as found in moneywallet)moneywallet.mwbxbackup files are zip files which contain adatabase.jsonfile. You can support this format:defread_json_from_zip(filename,pattern):importzipfileimportjsonimportrewithzipfile.ZipFile(filename,\"r\")asz:forfilenameinz.namelist():ifre.match(pattern,filename):withz.open(filename)asf:returnjson.loads(f.read())CONFIG=[yabci.Importer(prepare_data=lambdafilename:read_json_from_zip(filename,r\".*database\\.json\"),# ...)]CSVs with special encodingBenedict tries to read CSVs with the system encoding (probablyutf-8), and will choke on different encodings. If your CSV uses a different encoding, you have to read the CSV intodictexplicitly:# https://docs.python.org/3/library/csv.htmldefread_csv_windows1252(filename):importcsvvalues=[]withopen(filename,newline='',encoding='windows-1252')asf:reader=csv.DictReader(f)forrowinreader:values.append(row)return{\"values\":values}CONFIG=[yabci.Importer(prepare_data=read_csv_windows1252,# ...)]Detecting duplicate transactionsIf your input data contains some form of unique id, you can use it to prevent importing the same transaction twice.Therefore, you must import the unique id into a meta field, and letyabciknow it should be used to identifiy duplicates. Beancount will not re-import these transactions.confiy.pyimportyabcifrombeancount.ingest.scripts_utilsimportingestyabci.Importer({# ...\"duplication_key\":\"meta.duplication_key\",\"mapping\":{# ...\"transaction\":{# ...\"meta\":{# use the value of \"transaction_id\"\"duplication_key\":\"transaction_id\",},},},})# beancount uses its own duplicate detection by default, which interferes with# yabci's approach. Disable it therefore. The variable `HOOKS` is needed to# disable it within fava as well, see# https://github.com/beancount/fava/issues/1197 and# https://github.com/beancount/fava/issues/1184HOOKS=[]if__name__==\"main\":ingest(CONFIG,hooks=[])This creates transactions with meta dataduplication_key:2023-01-01 * \"foo transaction\"\n duplication_key: \"8461dd69-e9eb-4deb-9014-b5ffd082ede0\"\n ...\n\n2023-01-02 * \"bar transaction\"\n duplication_key: \"be8595a1-c0af-496f-87ac-7ff67e6d757b\"\n ...The next time you try to import the same transaction, beancount will identify it\nas duplicate & comment the transactions, so they will not be imported a second\ntime.; 2023-01-01 * \"foo transaction\"\n; duplication_key: \"8461dd69-e9eb-4deb-9014-b5ffd082ede0\"\n; ...\n\n; 2023-01-02 * \"bar transaction\"\n; duplication_key: \"be8595a1-c0af-496f-87ac-7ff67e6d757b\"\n; ...Duplicate detection without suitable identifer fieldIf your input data contains no suitable field, you can also fallback to hashing the complete raw transaction data:\"duplication_key\":lambdadata:yabci.utils.hash_str(data.dump())"} +{"package": "yabealice-test", "pacakge-description": "No description available on PyPI."} +{"package": "yabeatlock", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabencode", "pacakge-description": "An implementation of bencoding/bdecoding in Python 3, with somewhat descriptive\nExceptions for decode errors.\nAlso includes a command-line tool for decoding and pretty-printing bencoded data!InstallingTo install fromPyPI:pipinstallyabencodeUsage:In Python\u2026importyabencode# bencode supports dicts, lists, ints and strings (bytestrings)yabencode.encode({'foo':'baz','list':['eggs','spam','bacon']})# Input can be string, bytes or a file objectyabencode.decode(b'd3:foo3:baz4:listl4:eggs4:spam5:baconee')try:# Malformed data, 'spam' is missing an 'a'yabencode.decode(b'd3:foo3:baz4:listl4:eggs4:spm5:baconee')exceptyabencode.MalformedBencodeExceptionase:print(e)# Unexpected data type (b':') at position 31 (0x1F hex)try:# Bencode does not support floatsyabencode.encode({'float':3.14})exceptyabencode.BencodeExceptionase:print(e)# Unsupported type or with the command-line tool:$yabencode-husage:yabencode[-h][-tKEY][-r]FILEBdecodeafile/standardinputandpretty-printtheresultingdatapositionalarguments:FILEInputfile.Use-forstdinoptionalarguments:-h,--helpshowthishelpmessageandexit-tKEY,--truncateKEYTruncatevaluesundergivenkey.Mayberepeatedformultiplevalues-r,--rawRawkeys-donotdecodedictionarykeys$# The 'pieces'-bytestring is rather long, so let's truncate it$yabencode-tpiecesubuntu-17.04-desktop-amd64.iso.torrent{'announce':b'http://torrent.ubuntu.com:6969/announce','announce-list':[[b'http://torrent.ubuntu.com:6969/announce'],[b'http://ipv6.torrent.ubuntu.com:6969/announce']],'comment':b'Ubuntu CD releases.ubuntu.com','creation date':1492077159,'info':{'length':1609039872,'name':b'ubuntu-17.04-desktop-amd64.iso','piece length':524288,'pieces':''}}$# Reading bytes from stdin (using -r to not decode the keys)$curl-s'http://torrent.ubuntu.com:6969/scrape?info_hash=%59%06%67%69%b9%ad%42%da%2e%50%86%11%c3%3d%7c%44%80%b3%85%7b'|yabencode-r-{b'files':{b'Y\\x06gi\\xb9\\xadB\\xda.P\\x86\\x11\\xc3=|D\\x80\\xb3\\x85{':{b'complete':3473,b'downloaded':33029,b'incomplete':102,b'name':b'ubuntu-17.04-desktop-amd64.iso'}}}"} +{"package": "yabf", "pacakge-description": "Yet Another Bayesian FrameworkFree software: MIT licenseDocumentation:https://yabf.readthedocs.io.FeaturesWhy another Bayesian Framework? There are a relativehostof Bayesian codes in\nPython, including major players such asPyMC3,emceeandstan, as well as a\nseemingly never-ending set of scientific-field-specific codes (eg. cosmology\nhasCosmoMC,CosmoHammer,MontePython,cobaya\u2026).yabfwas written because the author found that all the frameowrks they tried\nwere either too lean or too involved.yabftries to find the happy medium.\nIt won\u2019t be the right tool for everyone, but it might be the right tool for you.yabfis designed to support \u201cblack box\u201d likelihoods, by which we mean those\nthat don\u2019t necessarily have analytic derivatives. This separates it from codes\nsuch asPyMC3andstan, and limits its use to samplers that do not require\nthat information. This is more often the case in scientific applications, where\nlikelihoods can in principle depend on some enormous black-box simulation code.\nThus, in this regard it is more likeemceeorpolychord.On the other hand,yabfisnotanother MCMC sampler. Apart from the\nlimitations concerning likelihood derivatives, it is sampler-agnostic. It is\nrather aspecificationof a format, and an implementation of that specification.\nThat is, it specifies that likelihoods should have certain properties (like\nparameters), and gives tools that enable that. Or as another example, it\nspecifies that samplers should contain certain attributes pre- and post-sampling.\nIn this regard,yabfismore likePyMC3orstan, and unlikeemceeorpolychord.yabfis perhaps most similar to codes such asCosmoHammerorcobaya,\nwhich provide an interface for creating (cosmological) likelihoods which can\nthen be sampled by somie specified sampler. However,yabfis different in\nthat it isintendedto be field-agnostic, and entirely general. In addition,\nI found that these codes didn\u2019t quite satisfy my criteria for ease-of-use\nand extensibility.I hope thatyabfprovides these. Here are a few of its features:Deisgn is both DRY/modular and easy-to-use: while components of the model can\nbe separately defined (to make it DRY), they don\u2019tneedto be combined into\na rigid structure in order to perform most calculations. This makes it easy\nto evaluate partial models for debugging.Extremely extensible: write your own class that subclasses from the in-builtComponentorLikelihoodclasses, and it is immediately useable.Parameters are attached to to the model, for encapsulation, but they can be\nspecified at run-time externally for modularity.Models are heirarchical, in the sense that parameters may be specified at\nany of three levels, and they are propagated through the model heirarchy (note\nthat this doesn\u2019t refer to heirarchical parameters, i.e. parameters that\ndepend on other parameters).Parameters can be set as fixed or constrained at run-time.Models are well-specified, in the sense that they can be entirely specified\nby a YAML file (and/or written to YAML file), for reproducibility.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Many of the ideas in this code are adaptations of other MCMC codes, especiallyCosmoHammerandcobaya."} +{"package": "yabgp", "pacakge-description": "SDN\nPlatform: any\nClassifier: Development Status :: 5 - Production/Stable\nClassifier: Environment :: Console\nClassifier: License :: OSI Approved :: Apache Software License\nClassifier: Topic :: System :: Networking\nClassifier: Natural Language :: English\nClassifier: Programming Language :: Python\nClassifier: Programming Language :: Python :: 2.7\nClassifier: Programming Language :: Python :: 3.4\nClassifier: Programming Language :: Python :: 3.5\nClassifier: Operating System :: Unix"} +{"package": "yabi", "pacakge-description": "YABI: Yet Another Blogging (tool) Implementationyabi allows you to create a simple and customizable blog site with minimal effort.Write your posts in markdown, build the blog site, and deploy it anywhere you like.InstallationGetting startedFeaturesInstallationThe easiest way to install from PyPI is to thepipcommandpip install --user yabiIf you have cloned the source code you can install it withpip install --user .Getting startedSay, you want to create a new blog that describes your philosophical thoughts. You call itDiscourses. To create this new blog type in a\nterminalyabi init Discoursesnow navigate to the newly created foldercd DiscoursesTo publish your first though, create a new file on, e.g.,posts/my_first_thought.md. The only requirements for a post is thatIt is somewhere inside thepostsfolderHas set the labeldraftto \"yes\" or \"no\" at the file header.It has a level 1 Markdown heading with the title of the post right after the label(s).Apart from these minimal requirements, the post can have any valid Markdown syntax.draft: no\n\n# My first thought\n\nI will drink more water. I will exercise more and I will wake up earlier.\n\nNo, I'm not. I rather not to.Finally, build the website using the commandyabi buildAll the contents of the website are built under the folderpublic. You can upload these files to any hosting service of your liking. If\nyou wish to check how the site will look you can use the commandyabi testwhich will create a local server with your website onhttp://localhost:9090by default.FeaturesSimply and minimalistic user interfaceSane defaults for the website.Have a nice blog with all the expected features: archive, categories, and a home page with the latest\npostsMarkdown-format post system.No need of complex databases, the only thing needed to build your website are the markdown files\ncontaining your posts. Ideal for version control!Optimized build system.Only builds what you have recently added/changed."} +{"package": "yabin", "pacakge-description": "YABin CLI ClientInstallationpipinstallyabinUsageYou can specify theBASE_URLenvironment variable to change the default API URL, or use the-b/--base-urloption.Create a pasteusage: yabin create [-h] [--encrypted] [--password PASSWORD] [--language LANGUAGE] [--expires-after SECONDS] [--burn-after-read] FILE|stdin\n\npositional arguments:\n FILE|stdin Content of the paste. If it is stdin, it will be read from stdin\n\noptions:\n -h, --help show this help message and exit\n --encrypted, -e Encrypt the paste on client-side. Default: False\n --password PASSWORD, -p PASSWORD\n Password to encrypt the paste with.\n --language LANGUAGE, -l LANGUAGE\n (Programming) language of the paste. Default: plaintext\n --expires-after SECONDS, -x SECONDS\n Number of seconds after which the paste will expire.\n --burn-after-read, -b\n Delete the paste after it has been read once.Read a pasteusage: yabin read [-h] [--password PASSWORD] URL\n\npositional arguments:\n URL Complete URL of the paste to read.\n\noptions:\n -h, --help show this help message and exit\n --password PASSWORD, -p PASSWORD\n Password to decrypt the paste with. Only needed if password-protected."} +{"package": "yabmp", "pacakge-description": "YABMP=====|Python Version| |Version| |License| |Build Status| |Code Climate|Overview~~~~~~~~`YABMP` is a receiver-side implementation of the `BMP` (BGP Monitoring Protocol) in the Python language. It serves as a reference for how to step through the messages and write their contents to files.This implementation covers RFC 7854 BGP Monitoring Protocol version 3.RFCs to read to help you understand the code better:* RFC1863 - A BGP/IDRP Route Server alternative to a full mesh routing* RFC1997 - BGP Communities Attribute* RFC2042 - Registering New BGP Attribute Types* RFC2858 - Multiprotocol Extensions for BGP-4* RFC4271 - A Border Gateway Protocol 4 (BGP-4)* RFC4893 - BGP Support for Four-octet AS Number Space* Other BGP related RFCs.Quick Start~~~~~~~~~~~.. code:: bashUse `pip install yabmp` or install from source.$ virtualenv yabmp-virl$ source yabmp-virl/bin/activate$ git clone https://github.com/smartbgp/yabmp$ cd yabmp$ pip install -r requirements.txt$ cd bin$ python yabmpd -h.. code:: bash$ python yabmpd &Will starting bmpd server listen to port = 20000 and ip = 0.0.0.0Support~~~~~~~Send email to xiaoquwl@gmail.com, or use GitHub issue system/pull request... |License| image:: https://img.shields.io/hexpm/l/plug.svg:target: https://github.com/smartbgp/yabmp/blob/master/LICENSE.. |Build Status| image:: https://travis-ci.org/smartbgp/yabmp.svg:target: https://travis-ci.org/smartbgp/yabmp.. |Code Climate| image:: https://codeclimate.com/github/smartbgp/yabmp/badges/gpa.svg:target: https://codeclimate.com/github/smartbgp/yabmp.. |Python Version| image:: https://img.shields.io/pypi/pyversions/Django.svg:target: https://github.com/smartbgp/yabbmp.. |Version| image:: https://img.shields.io/pypi/v/yabmp.svg?:target: http://badge.fury.io/py/yabmp"} +{"package": "yabn", "pacakge-description": "UNKNOWN"} +{"package": "ya-booking-client", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabormeparser", "pacakge-description": "Yet another BORME Parser.BORME (Boletin Oficial del Registro Mercantil) is the Official Bulletin of the\nCommercial Registry.[BORME documents](https://boe.es/diario_borme/)This program translate BORME PDF files to JSON.Borme has two Parsers to extract the PDF file data to a json file.Parser: Read PDF files and write raw json files.Parser2: Read raw json files and write process json files."} +{"package": "yabox", "pacakge-description": "No description available on PyPI."} +{"package": "yabrowser-blacklist-rt", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabrowser-blacklist-tools", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabs", "pacakge-description": "yabsTest, Build, Deliver!OverviewBuild and deployment automation for Python projects.A typical release workflow may look like this:Check preconditions:Is the workspace clean, anything to commit?,Is GitHub reachable?,Are we on the correct branch?, ...Make sure static code linters and unit tests pass.Bump the project's version number (major, minor, or patch, according toSemantic Versioning).Then patch the version string into the respective Python module or text file.Buildsdist,wheelandmsi installerassets.Tag the version, commit, and push.Upload distribution toPyPI.Create a new release onGitHuband upload assets.Create a new release on theWindows Package Manager Repository.Bump, tag, commit, and push for post-release.Custom tasks may be added using the plugin framework.Read the documentationfor details.PreconditionsUsegit,PyPI,\nandGitHub.Version numbers follow roughly theSemantic Versioningpattern.The project's version number is maintained inone of the supported locations(Seegrunt-yabsfor a node.js variant\nif you have a JavaScript based development stack.)"} +{"package": "yabs-cowsay", "pacakge-description": "yabs-cowsayExtension plugin foryabs.This simple example serves primarily as demo for the yabs's plugin architecture.Let's assume we need a new taskcowsaythat is used like so:...-task:cowsaywidth:40message:|Dear fellow cattle,We just released version {version}.(This message was brought to you by the 'yabs-cowsay' extension.)...and produces this output:_________________________________________/Dearfellowcattle,\\|Wejustreleasedversion0.0.19-a2.||(Thismessagewasbroughttoyoubythe|\\'yabs-cowsay'extension.)/-----------------------------------------\\^__^\\(oo)\\_______(__)\\)\\/\\||----w|||||This plugin also adds a--no-cowsayoption to the CLI.Read the docsfor details."} +{"package": "yabs_load_utils", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabs_load_utils_frontend", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabs_mkdb_harness_tools", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabs-p2p-client", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabsservant", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabs-test", "pacakge-description": "yabs-testTemporary repository and throw-away project to test theyabstool."} +{"package": "yabs-vw-lib", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yabte", "pacakge-description": "yabte - Yet Another BackTesting EnginePython module for backtesting trading strategies.Support event driven backtesting, ieon_open,on_close, etc. Also supports multiple assets.Very basic statistics like book cash, mtm and total value. Currently, everything else needs to be deferred to a 3rd party module likeempyrical.There are some basic tests but use at your own peril. It's not production level code.Core dependenciesThe core module uses pandas and scipy.InstallationpipinstallyatbeUsageBelow is an example usage (the performance of the example strategy won't be good).importpandasaspdfromyabte.backtestimportStrategy,StrategyRunner,Order,Bookfromyabte.utilities.plot.matplotlib.strategy_runnerimportplot_strategy_runnerfromyabte.utilities.strategy_helpersimportcrossoverfromyabte.tests._helpersimportgenerate_nasdaq_datasetclassSMAXO(Strategy):definit(self):# enhance data with simple moving averagesp=self.paramsdays_short=p.get(\"days_short\",10)days_long=p.get(\"days_long\",20)close_sma_short=(self.data.loc[:,(slice(None),\"Close\")].rolling(days_short).mean().rename({\"Close\":\"CloseSMAShort\"},axis=1,level=1))close_sma_long=(self.data.loc[:,(slice(None),\"Close\")].rolling(days_long).mean().rename({\"Close\":\"CloseSMALong\"},axis=1,level=1))self.data=pd.concat([self.data,close_sma_short,close_sma_long],axis=1).sort_index(axis=1)defon_close(self):# create some ordersforsymbolin[\"GOOG\",\"MSFT\"]:df=self.data[symbol]ix_2d=df.index[-2:]data=df.loc[ix_2d,(\"CloseSMAShort\",\"CloseSMALong\")].dropna()iflen(data)==2:ifcrossover(data.CloseSMAShort,data.CloseSMALong):self.orders.append(Order(asset_name=symbol,size=-100))elifcrossover(data.CloseSMALong,data.CloseSMAShort):self.orders.append(Order(asset_name=symbol,size=100))# load some dataassets,df_combined=generate_nasdaq_dataset()# create a book with 100000 cashbook=Book(name=\"Main\",cash=\"100000\")# run our strategysr=StrategyRunner(data=df_combined,assets=assets,strat_classes=[SMAXO],books=[book],)sr.run()# see the trades or book historyth=sr.transaction_historybch=sr.book_history.loc[:,(slice(None),\"cash\")]# plot the trades against book valueplot_strategy_runner(sr);ExamplesJupyter notebook examples can be found under thenotebooks folder.DocumentationDocumentation can be found onRead the Docs.DevelopmentBefore commit run following format commands in project folder:poetryrunblack.\npoetryrunisort.--profileblack\npoetryrundocformatter.--recursive--in-place--black--exclude_unittest_numpy_extensions.py"} +{"package": "yabtool", "pacakge-description": "Please readhttps://github.com/JFF-Bohdan/yabtool/blob/master/README.mdfor information"} +{"package": "yabu", "pacakge-description": "YABUyet another backup utilityYABUis a utility that exploitingrsyncallows to automatize backup tasks also for remote servers.InstallYABUrequired to work thersynctool, you can easily retrieves it from your package manager:From AUR (recommended if you using Arch Linux)YABUis available also asAURpackage. Yuo can find it aspython-yabu.From pypi (recommended)You can installYABUfrompypiusingpip.pipinstallyabuFrom source codeAn alternative way to installYABUis from the source code, exploiting thesetup.pyscript.gitclonehttps://github.com/RobertoBochet/yabu.gitcdyabu\npython3setup.pyinstall--userUsageyabu-husage: yabu [-h] [-c CONFIG_PATH] [-v] [--version]\n\noptional arguments:\n -h, --help show this help message and exit\n -c CONFIG_PATH, --config CONFIG_PATH\n configuration file path\n -v number of -v defines level of verbosity\n --version show program's version number and exitBefore startYABUyou must create a custom configuration file (see configuration section).ConfigurationThe wholeYABUbehaviour can be configured with itsconfig.yaml.\nYou can provide toYABUa custom configuration file exploiting argument-c, if you will not do it,YABUwill look for it in the default path/etc/yabu/config.yaml.config.yamlstructuretasks[dict]is a dict of the tasks that will be done, each task has a custom name as key and it has a specific structremote_base_path[string]the base path of the remote servertargets[list]a list of the paths that have to be backupedA complete schema of config file can be found inyabu/resources/config.schema.yaml."} +{"package": "yabul", "pacakge-description": "yabulYet Another Bioinformatics Utilities LibraryThis is a small collection of Python functions for working with protein, DNA,\nand RNA sequences. We usepandasdata frames\nwherever possible.Yabul currently supports:Reading and writing FASTAsPairwise local and global sequence alignment (usesparasail)Requires Python 3.6+.InstallationInstall using pip:$ pip install yabulYou can run the unit from a checkout of the repo as follows:$ pip install pytest\n$ pytestExampleReading and writing FASTAsTheread_fastafunction returns apandas.DataFrame:>>> import yabul\n>>> df = yabul.read_fasta(\"test/data/cov2.fasta\")\n>>> df.head(3)\n description sequence\nid\nsp|P0DTC2|SPIKE_SARS2 sp|P0DTC2|SPIKE_SARS2 Spike glycoprotein OS=Se... MFVFLVLLPLVSSQCVNLTTRTQLPPAYTNSFTRGVYYPDKVFRSS...\nsp|P0DTD1|R1AB_SARS2 sp|P0DTD1|R1AB_SARS2 Replicase polyprotein 1ab... MESLVPGFNEKTHVQLSLPVLQVRDVLVRGFGDSVEEVLSEARQHL...\nsp|P0DTC1|R1A_SARS2 sp|P0DTC1|R1A_SARS2 Replicase polyprotein 1a O... MESLVPGFNEKTHVQLSLPVLQVRDVLVRGFGDSVEEVLSEARQHL...Thewrite_fastafunction takes\n(name, sequence) pairs:>>> yabul.write_fasta(\"out.fasta\", [(\"protein1\", \"TEST\"), (\"protein2\", \"HIHI\")])\n>>> yabul.write_fasta(\"out2.fasta\", df.sequence.items())Sequence alignmentThealign_pairfunction will give a local (Smith-Waterman) and global\n(Needleman-Wunsch) alignment of two sequences. It returns a pandas.Series\nwith the aligned sequences.By default, the alignment is global:>>> yabul.align_pair(\"AATESTDD\", \"TEST\")\nquery AATESTDD\nreference --TEST--\ncorrespondence ||||\nscore -5\ndtype: objectTo do a local alignment, passlocal=True.>>> yabul.align_pair(\"AATESTDD\", \"TEST\", local=True)\nquery TEST\nreference TEST\ncorrespondence ||||\nscore 19\ndtype: objectDependenciesThe alignment routine is a thin wrapper around the Smith-Waterman and\nNeedleman-Wunsch implementations fromparasail.ContributingWe welcome contributions of well-documented code to read and write common\nbioinformatics file formats using pandas objects. Please include unit tests\nin your PR. Additional functionality like multiple sequence alignment would\nalso be nice to add.ReleasingTo push a new release to PyPI:Make sure the package version specified in__init__.pyis a new version greater than what's onPyPI.Tag a new release on GitHub matching this versionTravis should deploy the release to PyPI automatically.Documentation athttps://yabul.readthedocs.io/en/latest/should update automatically on commit.To build the documentation locally, run:$ cd docs\n$ pip install -r requirements.txt\n$ sphinx-build -b html . _build"} +{"package": "yac", "pacakge-description": "A service, running on your VPC, from nothing to ka-ching, in a few minutes.Have access to an AWS VPC?Want to run a service on your VPC?Have a few spare minutes?Why yac?Because services provided by cloud providers are expensive (e.g. RDS, ElasticCache, etc.).Yac lets you build and share comparable services, effectively crowd-sourcing their evolution.Yac also lets you build service heirarchies (so, for example, a yac blogging service can levage a yac DB service, etc.).Over time, durable service patterns should survive and thrive, and service providers will be able to choose from a rich menu of open, crowd-sourced, and crowd-supported services.How does yac work?Coding infrastructure is all about managing templates and template varariables.YAC makes it easy to create templates and blend variables from multiple sources, including from user prompts.The resulting infrastruce code can be easily shared with other service providers, allowing others to use and improve on your infrastructure ideas.Yac lets you use code in your templates - this provides great power and flexibility to service designers.Yac uses simple cli operations and infrastructure is specified in json files, making CI/CD intergration a breeze.Quick StartInstall the cli:$ pip install yacFind a service:$ yac service \u2013find=confluencePrint a service:$ yac stack atlassian/confluenceWhat is yac?A workflow system that does for services what docker did for applicationsdocker helped make it easy to find, run, define, and share individual applicationsyac does the same for servicesA cli app that lets you easily find, run, define, and share service templatesyac registry works just like the docker registryservices are defined as templates in jsonservices templates can be browsed, and instantiated via the yac registryA happy place for service developers, cloud administrators, and service providersWhat is a service?An application that provides some useful functionAn application that can be implemented using cloud infrastructureIntruiged?Read more atyac stackson atlassian.net.Want to contribute?Run Locallyrun \u2026\n./yacme Buildingrun \u2026./build.pyTestingGet unit tests to pass$ python -m unittest discover yac/tests"} +{"package": "yacache", "pacakge-description": "No description available on PyPI."} +{"package": "yacargo", "pacakge-description": "Yandex.Taxi Cargo API SDK"} +{"package": "yacbv", "pacakge-description": "# yaCBV\nYet another class based views for Django"} +{"package": "yaccounts", "pacakge-description": "No description available on PyPI."} +{"package": "yace", "pacakge-description": "Welcome to yaceyaceis a foreign-function-interface (FFI) compiler designed to ease the\ndevelopment and maintenance of C APIs, their libraries and the\nFFI-bindings/wrappers using them.The project is hosted onGitHUBDocumentation is available atsafl.dk/yaceyaceis a new project, with a bunch of things it want to get done, why?\nBecause there are some projects that need a better way to handle C headers and\nlibraries bindings. If you want to help out, then don\u2019t be shy, there are\nplenty of things to do."} +{"package": "yacedar", "pacakge-description": "python-yacedarSimple, straitforward Python bindings for RustCedar policy language.InstallationpipinstallyacedarUsageSee/sampledirectory.'''1. Policy structurehttps://www.cedarpolicy.com/en/tutorial/policy-structure'''importyacedarpolicy_set=yacedar.PolicySet('''\\permit(principal == User::\"alice\",action == Action::\"update\",resource == Photo::\"VacationPhoto94.jpg\");''')request=yacedar.Request(principal=yacedar.EntityUid('User','alice'),action=yacedar.EntityUid('Action','update'),resource=yacedar.EntityUid('Photo','VacationPhoto94.jpg'),)authorizer=yacedar.Authorizer()response=authorizer.is_authorized(request,policy_set)# expected: Trueprint(response.is_allowed)"} +{"package": "yacern-libtoken", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yacern-tokenchecker", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yacern-tokenmanager", "pacakge-description": "This is a security placeholder package.\nIf you want to claim this name for legitimate purposes,\nplease contact us atsecurity@yandex-team.ruorpypi-security@yandex-team.ru"} +{"package": "yace-sea-lang", "pacakge-description": "Welcome to sea-langsea-langis a interface-description language for foreign-function-interface\n(FFI) compilers. Created for consumption byyace.The project is hosted onGitHUBDocumentation is available atsafl.dk/sea-langsea-langis an interface-definition language,"} +{"package": "yacf", "pacakge-description": "YACF - Yet Another Configuration FrameworkSimple framework to parse multiple configuration files of different formats\nand update them.UsageThe usage of this framework is straight-forward.Create a Configuration instance. When creating one, give the inputs to read\nfrom as arguments. The input can be either a dictionary, to be immediately\nused, or alternatively a file name which ends on one of the supported file\ntypes below.Afterwards, call theloadfunction on the configuration instance. This\nfunction allows to define additional inputs. It's a matter of choice whether\none wants to define the inputs in the constructor or in theloadcall.Theloadfunction uses the previously defined configuration inputs. The\nfunction builds one large configuration dictionary out of all the inputs.\nOverlapping parameters are always overwritten.This makes it easy to define configurations of different priorities. One good\napproach is to define the configuration inputs as follows:[defaults, custom configuration, environment variables, command line arguments]To access the values of the configuration, one can either use the regular\naccess of dictionaries, e.g. a concatenation of gets(). Alternatively one can\nsimply use dot notation. However, the most convenient way to access attributes\nof the configuration is the regular attribute access. The recursive nature of\nthe framework makes it work like a charm.:config = Configuration('api-config.json').load()\nsample = config.get('api').get('hostname')\n\n# Alternative dot notation\nsample = config.get('api.hostname')\n\n# Attribute notation\nsample = config.api.hostnameAdditional FeaturesCustom SeperatorIf you, for some reason dislike the regular seperator '.' in the dot notation\nyou can choose a custom one when initializing the configuration instance.Supported File TypesjsontomlCaveatsThe framework is solely implemented and tested on Linux. I can not guarantee\nfor any expected behaviour on other platforms.\nIf you use the framework on another platform, please share your experiences\nwith me.In addition, the attribute notation (config.api.hostname) is just tested for\nthe default seperator.. Since the.has a special meaning in Python, it is\neasiest to use. To keep the framework simple and still flexible, we decided to\nnot add an internal representation to circumvent the seperator limitation.LicenseMIT License Copyright (c) 2021 Max ResingPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:The above copyright notice and this permission notice (including the next\nparagraph) shall be included in all copies or substantial portions of the\nSoftware.THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\nOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."} +{"package": "yacfg", "pacakge-description": "yacfg - YAML ConfiguratorThis tool can generate a set of configuration files mainly created for\nActiveMQ Artemis, but it is not limited to only generating configuration files.It has a user facing Command Line Tool for quick and easy command line usage.\nFurthermore, it is possible to use its API in your python code.Getting startedPython 3.7+Python PoetryFrom gitgitclonegit@github.com:rh-messaging-qe/yacfg.git\npoetryinstall\nyacfg--helpFrom PyPIpipinstallyacfg\nyacfg--helpUser (CLI) guideyacfg--help# Set path for profiles and templates# For example the ActiveMQ Artemis template and profilesgitclonehttps://github.com/rh-messaging-qe/yacfg_artemis.git./yacfg_artemis# Currently is needed to setup profiles and templates paths as environment variablesexportYACFG_PROFILES=./yacfg_artemis/profilesexportYACFG_TEMPLATES=./yacfg_artemis/templates\n\nyacfg--list-profiles\nyacfg--list-templates# perform a generation of a default profileyacfg--profileartemis/default.yaml.jinja2# also save result to [OUTDIR] directoryyacfg--profile[PROFILE]--output[OUTDIR]CustomizationQuickest way to customize data is to use hot-variables, basically variables\nthat the profile itself provides for tuning. Next step is to write (modify) custom\nprofile with completely custom values.\nIf that does not satisfy your needs, then a custom template might be required.Profile tuningSimply export tuning values from profile you want to tune and change those you\nneed to change. Then supply the custom tuning file(s) when generating the profile.yacfg--profile[PROFILE]--export-tuningmy_values.yaml\nvimmy_values.yaml\nyacfg--profile[PROFILE]--tunemy_values.yaml# multiple tuning files can be overlaid# they are updated in sequence, only values present are overwrittenyacfg--profile[PROFILE]--tunemy_values.yaml--tunemachine_specific.yaml\\--tunelogging_debug.yaml--output[OUTDIR]Custom profilesWrite your own, or simply export an existing profile and modify that.You can export dynamic version with includes of some modules, that would still\nwork. Either you can use imports from package, or your own local files.Or you can export completely rendered profile file without any includes or\nvariables and modify that as you like.# export profile with dynamic includes still active jinja2 filesyacfg--profile[PROFILE]--new-profilemy_new_profile.yaml.jinja2# export completely generated profile without any jinja2 fields, plain yamlyacfg--profile[PROFILE]--new-profile-staticmy_new_profile.yaml\nvimmy_new_profile.yaml\nyacfg--profilemy_new_profile.yamlProfile is just another jinja2 file that enables customization of profile data\n-- that is tuning. Because of that we recommend keeping the extension.yaml.jinja2unless it is static profile without any jinja2 capabilities, in that case it could\nbe named.yaml. That way we can run yaml lint against static profiles and verify\nthat they are correct.All profiles have to be used to generate files without any tuning. That means,\nif they are tune-able, they have to contain all default values in_defaultssection.\nThat section is also used for tuning, so any variable in there will be exported as tuning.Custom templatesThe last resort is to export a template and modify that. But remember a template,\nor more correctly a template set is a directory containing a set of main\ntemplates that subsequently generate_via_tuning_files a new file.Of course feel free to write your own templates. Especially when you need to\ngenerate_via_tuning_files for something that is not packaged.Just remember for a template set to be identified the directory must contain\na file named '_template' and then main templates ending with '.jinja2'.yacfg--template[TEMPLATE]--new-templatemy_new_template\nvimmy_new_template/[MAIN_TEMPLATES].jinja2\nyacfg--templatemy_new_template--profile[PROFILE]Jinja2 filters:We use Jinja2 filters from Ansible project, read more about it here:\n[https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html](Ansible filters documentation)API guideDirect use of API is to usegenerate()nearly the same as the CLI.\nWith option to use tuning values directly.Tuning data will be overlaid in order of appearance, using python\ndict.update(), so values that will appear later will overwrite previous\nvalues. We recommend that tuning values are always flat, because update\nis not recursive. The same applies for data from tuning files as well\nas the directly provided data.Data application order:profile defaultsdata from tuning files (in order of appearance)tuning_files_listdata provided directly (in order of appearance)tuning_data_listimportyacfg# generating only broker.xml config using default values from profile,# no tuning, writing output to a target pathyacfg.generate(profile='artemis/default.yaml.jinja2',output_filter=['broker.xml'],output_path='/opt/artemis-i0/etc/',)# using both files and direct values, and writing generated configs to# a target directoryyacfg.generate(profile='artemis/default.yaml.jinja2',tuning_files_list=['my_values.yaml','machine_specific.yaml','logging_debug.yaml'],tuning_data_list=[{'name':'custom name','config':'option_a'},{'address':'10.0.0.1'},{'LOG_LEVEL':'debug'},],output_path='/opt/artemis-i0/etc/',)# just get generated data for further processing, using just tuning filesdata=yacfg.generate(profile='artemis/default.yaml.jinja2',tuning_files_list=['my_values.yaml','machine_specific.yaml','logging_debug.yaml'],)print(data['broker.xml'])Batch configurationsIn case you have multiple services to configure in your environment,\nthat you probably will have at some point, there is a tool for that\nas well. The tool is called yacfg-batch. It has only yaml input, and\nit uses yacfg to generate configurations as you are already used to.Input yaml file defines all services you need to generate, what\nprofiles to use, and what tuning to provide toyacfg.\nIt allows you to configure defaults and common for services.Batch profile fileAs said it is YAML. It has two special sections:_defaultand_common.\nAs the name suggests,_defaultvalues are used when values are not\ndefined per specific section. Where_commonis added to the values\nof all sections. The important thing here is that_defaulthas lower\npriority than_commonand that has lower priority than specific section\nvalues.Every section has 4 values:profile,template,tuning_files,\nandtuning. As the name suggests,profiledefines what generation profile\nto select, and it directly correlates withyacfg's--profile.templatedefines what generation template to use\n(overrides one in the profile if defined), and it directly correlates with--templatefromyacfg.tuning_filesoption is a list of tuning\nfiles to use, when combining defaults, commons, and specific values,\ntuning_files list is concatenated. Finallytuningis a map of\nspecific tuning values, correlates with--optofyacfg. When combining\ndefaults, commons, and specifics, it will be updated over using python\ndict.update() and it will work only on first level, so it is recommended\nto use flat values for tuning only.Example_default:profile:artemis/default.yaml.jinja2tuning_files:-defaults/broker_default.yaml_common:tuning_files:-common/security.yaml-common/logging.yamltuning_values:LOG_LEVEL_ALL:INFObrokerA/opt/artemis/etc:pass:truebrokerB/opt/artemis/etc:profile:artemis/AIOBasic.yaml.jinja2tuning_files:-brokerB/queues.yaml---_default:profile:artemis/default.yaml.jinja2tuning_files:-defaults/broker_default.yamlbrokerC/opt/amq/etc:tuning:LOG_LEVEL_ALL:DEBUGAs you can see,yacfg-batchsupports multiple sections, in single\nbatch profile file, that allows you to generate multiple groups using\nseparated_defaultand_commonsections for that.Executing batchWhen you have defined all tuning files you need, and in the root of this\nbatch configuration you have your batch profile file, you can now simply\nrunyacfg-batch:yacfg-batch--input[batch_profile_file]--output[output_path]You can use multiple input files and all of those will be generated\nconsecutively. In the output path, new subdirectories will be created\nfor every item you configure (every section), section key will be used\nfor that subdirectory. If the section name resembles a path, whole\npath will be created. For example forbrokerA/opt/artemis/etcthe configuration will be generated into[output_path]/brokerA/opt/artemis/etc/.DocumentationFormatted documentation can be viewed atrh-messaging-qe.github.io/yacfg/.ContributingIf you find a bug or room for improvement, submit either a ticket or PR.ContributorsAlphabetically orderedDominik Lenochdlenoch@redhat.com(maintainer)Michal T\u00f3thmtoth@redhat.comOtavio Piskeopiske@redhat.comSean Daveysdavey@redhat.comZdenek Krauszkraus@redhat.com(author)LicenseCopyright 2018-2021 Red Hat Inc.Licensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.Acknowledgmentsjinja2-- awesome templating engineyaml-- very convenient user readable formatlearn_yaml-- great YAML cheat sheetpyyaml-- python YAML parserjq-- great tool for working with structured data (JSON)yq-- YAML variant of jqgithub templates examples-- Nice set of ISSUE_TEMPLATE.md and PULL_REQUESTS_TEMPLATE.md examplescontributing example-- example/template of CONTRIBUTING.mdFedora Project code-of-conduct-- the inspiration for CODE_OF_CONDUCT.md"} +{"package": "yacgol", "pacakge-description": "Yet Another Conway's Game of Lifeyacgolis a pure Python implementation ofConway's Game of LifeusingTkinter.The game is a zero-player game, meaning that its evolution is determined\nby its initial state, requiring no further input. One interacts with the\nGame of Life by creating an initial configuration and observing how it\nevolves, or, for advanced players, by creating patterns with particular\nproperties.At each step in time, the following transitions occur:Any live cell with fewer than two live neighbors dies, as if by under population.Any live cell with two or three live neighbors lives on to the next generation.Any live cell with more than three live neighbors dies, as if by overpopulation.Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.Conway's Game of Life Wikipedia pageInstalling$ pip install yacgol\n$ yacgol -hUsingMost interactions withyacgolwill take place within the Tkinter UI. So\nfire upyacgoland check it out!DevelopingFirst, install development packages:$ pip install -r requirements-dev.txtTesting$ nose2Linting$ flake8Coverage$ nose2 --with-coverage"} +{"package": "yach", "pacakge-description": "YachYet another configuration handler."} +{"package": "yachain", "pacakge-description": "YAML access on chained attribute names.Install$pipinstallyachainSuppose we have:---# confignetwork:name:developersgitserver:ip:192.168.178.101netmask:255.255.255.0gateway:192.168.178.1packages:-yum-gccWithyachainwe can access this as:>>>importyachain>>>c=yachain.Config().load(\"netw.cfg\")>>>print(c[\"network::gitserver::gateway\"])192.168.178.1>>>print(c[\"network::gitserver::packages\"])['yum','gcc']References to files / paths independent from environmentReferences to files and paths can be used relative and absolute.\nIn case an attribute ends onpathorfilethen the path can be\nprefixed automatically when operation from a virtual environment is detected.\nThe works by default upper and lower case and can be overriden.Using theprefixmakes it possible to use the same config in different\nenvironments.importyachainimportyamlimportsysimportos# yaml config:yc=\"\"\"\n---\napp:\n logfile: var/log/app.log\n textrules: var/app.app.txt\n database_path: var/app/db\n database_file: /var/app/db/db.txt\n database_name: db.txt\n\"\"\"PREFIX=\"/\"ifnothasattr(sys,'real_prefix')elsesys.prefix# CONFIG_FILE = os.path.join(PREFIX, \"etc/app/app.cfg\")config=yachain.Config(prefix=PREFIX,configdata=yaml.load(yc))forAin[\"logfile\",\"textrules\",\"database_path\",\"database_file\",\"database_name\"]:k=\"app::{}\".format(A)printconfig[k]When run from a virtual environment, this will give us:/home/user/venv/var/log/app.logvar/app.app.txt/home/user/venv/var/app/db/var/app/db/db.txtdb.txtSo, as expected, thelogfileanddatabase_pathgot the PREFIX.When run from a non-virtual environment, this will give us:/var/log/app.logvar/app.app.txt/var/app/db/var/app/db/db.txtdb.txtSo, as expected, prefixed with \u201c/\u201d."} +{"package": "yachalk", "pacakge-description": "Terminal string styling done rightThis is a feature-complete clone of the awesomeChalk(JavaScript) library.Allcredits go toSindre Sorhus.HighlightsFluent, auto-complete-friendly API for maximum coding efficiencyAbility to nest stylesProper handling of styling edge cases (same test cases as Chalk)Auto-detection of terminal color capabilities256/Truecolor color support, with fallback to basic colors depending on capabilitiesSame conventions as Chalk to manually control color modes viaFORCE_COLORNo dependenciesFully typed (mypy strict), no stubs requiredInstall$pipinstallyachalkThe only requirement is a modern Python (3.6+).Usagefromyachalkimportchalkprint(chalk.blue(\"Hello world!\"))Chalk comes with an easy to use composable API where you just chain and nest the styles you want.fromyachalkimportchalk# Combine styled and normal stringsprint(chalk.blue(\"Hello\")+\" World\"+chalk.red(\"!\"))# Compose multiple styles using the chainable APIprint(chalk.blue.bg_red.bold(\"Hello world!\"))# Use within f-stringsprint(f\"Found{chalk.bold(num_results)}results.\")# Pass in multiple argumentsprint(chalk.blue(\"Hello\",\"World!\"))# Nest styles...print(chalk.red(f\"Hello{chalk.underline.bg_blue('world')}!\"))# Nest styles of the same type even (color, underline, background)print(chalk.green(\"I am a green line \"+chalk.blue.underline.bold(\"with a blue substring\")+\" that becomes green again!\"))# Use RGB or HEX colorsprint(chalk.rgb(123,45,67).underline(\"Underlined reddish color\"))print(chalk.hex(\"#DEADED\").bold(\"Bold gray!\"))Easily define and re-use your own themes:fromyachalkimportchalkerror=chalk.bold.redwarning=chalk.hex(\"#FFA500\")print(error(\"Error!\"))print(warning(\"Warning!\"))Prior art: Why yet another chalk clone?The Python ecosystem has a large number libraries for terminal styling/coloring. However, after working with Chalk in JavaScript for a while, I always missed to have the same convenience in Python. Inspired by Chalk, I wanted to have a terminal styling library satisfying the following design criteria:Automatic reset handling: Many Python libraries require manual handling of ANSI reset codes. This is error prone, and a common source of coloring issues. It also means that these libraries cannot handle advanced edge cases like proper handling of newlines in all contexts, because that requires internal reset handling.Single symbol import: Some libraries require to import special symbols for foreground/background/modifiers/... depending on the desired styling. This is tedious in my opinion, because you have to adapt the imports all the time when you change the particular styling.Auto-complete friendly: I don't want to memorize a style/color API, I'd like to have full auto-complete support. Some existing Chalk clones seem to generate all style properties dynamically, which means that an IDE cannot support with auto-completion.Support of nested styles: Sometimes it is convenient to embed a style into an existing styled context. With Chalk this simply works. None of the libraries I tried have support of nested styles.Support of edge cases: Chalk has solutions for many edge cases like newline handling, or certain challenges in nested styles. The Python libraries I tried didn't support these. Yachalk is tested against the same test cases as Chalk, so it should support them all.Not print focused: Some libraries provide an API with a focus on offering modifiedprintfunctions. I prefer the single responsibility principle: Styling should only do styling, and return a string. This still leaves the possibility to print the string, write it to a file, or pass it around freely.True color support: Today most terminal have true color support, so it makes sense to support it in the API. Many older Python libraries only support the basic 16 colors.Capabilities auto detection / fallbacks: Chalk is fully backwards compatible on dumber terminals, by approximating colors with what is available on a particular terminal. I haven't found this feature in existing Python libraries.Zero dependencies: Some libraries are based e.g. based on curses, which is a heavy dependency for something as simple as styling/coloring.Fully typed: I like optional typing, but often library type stubs come with bad types. Yachalk runs in strict mypy mode, which means that no stubs are needed and its type should be correct by design.I started collecting existing libraries in a feature matrix, but since I keep finding more and more libraries, I've given up on filling it completely \ud83d\ude09. Nonetheless, feel free to open an issue if it contains an error or misses an important solution.Links to related projects:termcolorcoloredansicolorsstyblessingsrichstyle (clr)pychalksimple_chalkAPIIn general there is no need to remember the API, because it is written in a way that it fully auto-completes in common IDEs:chalk.