Saravanan666/pypi-org huggingface dataset:
Package: yet-another-io-channels-library
ChannelsSimple wrapper around file objects and sockets that provides uniform
interface to both.Example:pipe_chan = PipeChannel(sys.stdin.fileno(), sys.stdout.fileno())
sock_chan = SocketChannel(socket.create_connection(('127.0.0.1', 8080))ClassesChannelChannel is the base class for different channels. Every channel
implements the following methods:read(self)Performs a non-blocking read and returns any bytes available. RaisesEndpointClosedExceptionif the channel is closed.write(self, *data)Writes chunks of bytes to the channel. RaisesEndpointClosedException.close(self)Closes the channel and frees up the resources.get_fd(self)Returns a file descriptor number that can be used forpollorepollfor reading. RaisesNotImplementedErrorif (custom) channel
doesn't support reading.Every channel has abufferingproperty (read-only). It is equal to'line'for line-buffered channels. It should be'bytes'otherwise
but any value other than'line'works.The following channel classes are implemented:PipeChannelPipeChannel(faucet=None, sink=None, *, buffering='bytes')faucetshould be a file descriptor open for reading.sinkshould
be a file descriptor open for writing. If both are provided, the
channel is bi-directional. Setsfaucetto non-blocking mode.Ifbufferingis set to'line'the channel uses line-buffering for
reading. Everyreadcall will returnb''if there is no complete
line available even if there is any data at all. If channel is closed
but there is data in buffer, calls toreadwill return lines from
buffer until it is exhausted. Last line maybe an incomplete line (no'\n'in the end).SocketChannelSocketChannel(sock, *, buffering='bytes')Wraps a socket for non-blocking IO. See PipeChannel for more info onbufferingparameter.TestChannel(in package channels.testing)TestChannel(*, buffering='bytes')See PipeChannel for more info onbufferingparameter.Providesputandgetmethods to to feed data toreadand fetch
"written" data respectively.PollerPoller is a wrapper forselect.pollthat also supports accepting and
keeping track of TCP/Unix clients.Poller(*, buffering='bytes')Creates a poller object. All accepted client channels inherit thebufferingparameter.register(self, channel)Registers the channel for polling.add_server(self, sock)Registers a server socket. Poller will accept incoming connections and
automatically register clients.unregister(self, channel)Removes a registered channel. Silently does nothing if channel is not
registered.close_all(self)Closes all registered channels and servers.poll(self, timeout=None)Performs a single call toselect.poll().timeoutis the number of
seconds for polling orNonefor infinite polling. Return value is a
list of pairs in format of(data, channel)for channels and((addr, client_channel), sock)for server sockets.addrdepends on socket
type. For line-based channels singlepollcall will return one
result for every line available.
Package: yet-another-json-logger
yet-another-json-loggerYet another JSON logger.Complete with opinionated decisions and hardcoded personal preferences.UsageimportloggingfromyajlimportJsonFormatterjson_handler=logging.FileHandler('log.json')json_handler.setFormatter(JsonFormatter())logger=logging.getLogger(__name__)logger.addHandler(json_handler)logger.setLevel(logging.INFO)logger.info('Alice says%r','hi!')try:1/0exceptZeroDivisionError:logger.exception('Bob divided by zero!')Will result inlog.jsoncontaining:{"hostname":"alen-dev-vm","pwd":"/mnt/alen/dev/yet-another-json-logger","user":"alen","name":"__main__","module":"test","level":{"name":"INFO","number":20},"file":{"path":"/mnt/alen/dev/yet-another-json-logger/test.py","filename":"test.py","line":12,"func":"<module>"},"timestamp":{"abs":1618609778.928479,"rel":839.9991989135742},"proc":{"id":36424,"name":"MainProcess"},"thread":{"id":24544,"name":"MainThread"},"message":"Alice says 'hi!'"}{"hostname":"alen-dev-vm","pwd":"/mnt/alen/dev/yet-another-json-logger","user":"alen","name":"__main__","module":"test","level":{"name":"ERROR","number":40},"file":{"path":"/mnt/alen/dev/yet-another-json-logger/test.py","filename":"test.py","line":16,"func":"<module>"},"timestamp":{"abs":1618609778.928479,"rel":839.9991989135742},"proc":{"id":36424,"name":"MainProcess"},"thread":{"id":24544,"name":"MainThread"},"message":"Bob divided by zero!\nTraceback (most recent call last):\n  File \"/mnt/alen/dev/yet-another-json-logger/test.py\", line 14, in <module>\n    1 / 0\nZeroDivisionError: division by zero","exception":{"type":"builtins.ZeroDivisionError","str":"division by zero","traceback":"  File \"/mnt/alen/dev/yet-another-json-logger/test.py\", line 14, in <module>\n    1 / 0\n"}}or, if prettified:{"hostname":"alen-dev-vm","pwd":"/mnt/alen/dev/yet-another-json-logger","user":"alen","name":"__main__","module":"test","level":{"name":"INFO","number":20},"file":{"path":"/mnt/alen/dev/yet-another-json-logger/test.py","filename":"test.py","line":12,"func":"<module>"},"timestamp":{"abs":1618609778.928479,"rel":839.9991989135742},"proc":{"id":36424,"name":"MainProcess"},"thread":{"id":24544,"name":"MainThread"},"message":"Alice says 'hi!'"}{"hostname":"alen-dev-vm","pwd":"/mnt/alen/dev/yet-another-json-logger","user":"alen","name":"__main__","module":"test","level":{"name":"ERROR","number":40},"file":{"path":"/mnt/alen/dev/yet-another-json-logger/test.py","filename":"test.py","line":16,"func":"<module>"},"timestamp":{"abs":1618609778.928479,"rel":839.9991989135742},"proc":{"id":36424,"name":"MainProcess"},"thread":{"id":24544,"name":"MainThread"},"message":"Bob divided by zero!\nTraceback (most recent call last):\n  File \"/mnt/alen/dev/yet-another-json-logger/test.py\", line 14, in <module>\n    1 / 0\nZeroDivisionError: division by zero","exception":{"type":"builtins.ZeroDivisionError","str":"division by zero","traceback":"  File \"/mnt/alen/dev/yet-another-json-logger/test.py\", line 14, in <module>\n    1 / 0\n"}}
Package: yetanotherpicsearch
YetAnotherPicSearch基于nonebot2及PicImageSearch的另一个 Nonebot 搜图插件项目简介主要受到cq-picsearcher-bot的启发。我只需要基础的搜图功能，于是忍不住自己也写了一个，用来搜图、搜番、搜本子。目前支持的搜图服务：Ascii2DBaiduE-HentaiExHentaiGoogleIqdbSauceNAOTraceMoeYandex目前适配的是OneBot V11，没适配 QQ 频道。此外，还有使用体验更好的 Telegram 移植版：YetAnotherPicSearch4Telegram文档目录使用教程部署教程效果预览感谢名单cq-picsearcher-botPicImageSearchnonebot2go-cqhttpStar History
Package: yet-another-runner
RunnerSimple wrapper around subprocess.Popen.Multiple commands can be configured to be executed. Each command can
have some predetermined parameters and additional parameters or
overrides can be passed when application is executed. Multiple
instances of one application can be running using aliases.To communicate to running processes Channel classes fromyet-another-io-channels-libraryare used.Examples:Using STDIO.runner = Runner()
runner.add("cat", "cat")
runner.start('cat')
channel = runner.get_channel('cat')
channel.write(b'hello, world')
# later
line = channel.read() # Will return b'hello, world'Using UNIX socket.runner = Runner()
self._runner.add("socat", "socat SYSTEM:cat UNIX-LISTEN:socket",
                 type="socket", socket="socket")
runner.start('socat')
channel = runner.get_channel('socat')
channel.write(b'hello, world')
# later
line = channel.read() # Will return b'hello, world'ClassesRunnerRunner(*, extra_paths=None)Create a new runner object.extra_paths: List of paths which will be appended to PATH environment variableadd(self, name, command, **kwargs)Add the application to the list of registered applications or update
if already added.name: application namecommand: the command to be executed**kwargscan include the following:type: eitherstdioorsocket. Default isstdiocwd: working directory of the processsocket: if type issocket, this is the name of the UNIX socket file to connect tosetpgrp: ifTruethe process is moved to a separate process group and will not receive signals sent to main process. Default isFalsebuffering: if set to"line"the channel is line-buffered for readingupdate_config(self, config)Config must be a dictionary where each key is an alias of an
application and value is a dictionary of that application's
configuration.runner.add("app", "command", **kwargs)is equivalent
torunner.update_config({"app": {"command": "command", **kwargs}}). Useful for adding multiple applications at once.ensure_running(self, app_name, alias=None, with_args=None, **kwargs)start(self, app_name, alias=None, with_args=None, **kwargs)Start the process. If the process with the same alias is already
running,startwill raiseProcessExistsException, whileensure_runningwill silently do nothing.app_name: application alias, given in the configurationalias: alias that will be given to actual started process. IfNone, application alias will be usedwith_args: list of additional arguments that will be added to the commandkwargs: extend or override parameters in application configget_channel(self, alias)Returns theChannelobject to communicate to the running process.terminate(self, alias)Terminates the process.
Package: yet-another-simple-rss-parser
simple_rss_readerAs an happy customer of Alfred 4 APP, i was in a need for simplest RSS parser.
I decided to write the simplest one for my needs.Then i said to myself, why not to make it open source as a package for anyone who need it.
Although its 2022, and XML should be an no more then  (not so great) history, i know that if i need it, i can only assume i am not the only one.Feel free to use, fork, and learn (although it is as minimal and simple as possible)INSTALLrun:pip install  yet-another-simple-rss-parserUsagefrom simple_rss_reader.reader import SimpleRssReader


r = SimpleRssReader(url) # url of source or xml string

# load as dict
v = r.to_dict()

#  get as json
v = r.to_json()

# get list of items (without header)
v = r.get_tiems()The package homepage in pypi:https://www.pypi.org/project/yet-another-simple-rss-parser/Source code is hosted in github:https://github.com/barakbl/simple_rss_reader
Package: yet-another-spotify-lyrics
Yet Another Spotify Command Line LyricsRequirementsLinuxPython >= 3.6ueberzugdbus-pythonrequestsbeautifulsoup4lxmlInstallFrom PyPIpip3installyet-another-spotify-lyrics--userFrom Sourcegitclonehttps://github.com/goktug97/yet-another-spotify-lyricscdyet-another-spotify-lyrics
pythonsetup.pyinstall--userUsagespotify-lyricsKeybindingsActionKeybindingScroll UpkScroll DownjBeginning of LyricsggEnd of LyricsGEdit LyricseRefreshrToggletNextnPrevpUpdate LyricsdToggle Album CoveriHelphQuit ProgramqEdit Lyrics: Open lyrics in$EDITOR.Refresh: Refresh lyrics and song metadata.Toggle: Play or Pause currently playing song.Next: Play next song.Prev: Play previous song.Update Lyrics: Deletes cached lyrics and fetches lyrics from the internet.Help: Show keybindings 5 seconds.DBUSThe lyrics can be scrolled via dbus.
Scroll the lyrics without changing the focus.Python Exampleimportdbusbus=dbus.SessionBus()lyrics=bus.get_object('com.spotify_lyrics.line','/com/spotify_lyrics')lyrics.move(1)# Scroll Downlyrics.move(-1)# Scroll UpBash Example#!/usr/bin/env bashdbus-send--print-reply--dest="com.spotify_lyrics.line"\"/com/spotify_lyrics"\"com.spotify_lyrics.line.move"\int32:$1>/dev/nullI call this bash script from my i3 config. See below.Example Use Case (i3wm)bindsym $mod+Shift+Home exec st -n Lyrics -e spotify-lyrics
for_window [instance="Lyrics"] floating enable; [instance="Lyrics"] move position center
for_window [instance="Lyrics"] resize set 644 388
bindsym $mod+Control+k exec lyrics-move -1
bindsym $mod+Control+j exec lyrics-move 1Example Use Case (Emacs)Open the lyrics in a buffer.(defunspotify-lyrics()(interactive)(let((string(shell-command-to-string"spotify-lyrics-once")))(get-buffer-create"lyrics-buffer")(switch-to-buffer-other-window"lyrics-buffer")(with-current-buffer"lyrics-buffer"(goto-char(point-max))(erase-buffer)(insertstring)(goto-line1))))Example Use Case (Conky)You can use spotify-lyrics-once to output the lyrics to the stdout and exit.
If you have program that utilizes stdin, you can use this version.
An example for such program is Conky.#!/usr/bin/luaconky.config={alignment='tl',background=true,color2='2ECC71',cpu_avg_samples=2,default_color='FFFFFF',double_buffer=true,font='Bitstream Vera Sans:size=10',gap_x=30,gap_y=50,minimum_width=200,no_buffers=true,own_window=true,own_window_type='override',own_window_transparent=true,own_window_argb_visual=true,-- own_window_type = 'desktop',update_interval=3,use_xft=true,}conky.text=[[${voffset 8}$color2${font Bitstream Vera Sans:size=16}${time %A}$font\${voffset -8}$alignr$color${font Bitstream Vera Sans:size=38}${time %e}$font$color${voffset -30}$color${font Bitstream Vera Sans:size=18}${time %b}$font\${voffset -3} $color${font Bitstream Vera Sans:size=20}${time %Y}$font$color2$hr${execi 5 spotify-lyrics-once}]]Licenseyet-another-spotify-lyrics is licensed under the MIT License.
Package: yet-another-wizz
yet_another_wizzis a python package to efficiently compute cross-correlation
redshifts, also know as clustering redshifts and is hosted on github:code:https://github.com/jlvdb/yet_another_wizz.gitdocs:https://yet-another-wizz.readthedocs.io/PyPI:https://pypi.org/project/yet_another_wizz/Docker:https://hub.docker.com/r/jlvdb/yet_another_wizz/The method allows to estimate the unknown redshift distribution of a galaxy
sample by correlating the on-sky positions with a reference sample with known
redshifts. This implementation is based on the single bin correlation
measurement of the correlation amplitude, introduced by Schmidt et al. (2013,arXiv:1303.0292).NoteWhen using this code in published work, please citevan den Busch et al. (2020), A&A 642, A200(arXiv:2007.01846)InstallationThe yet_another_wizz package can be installed directly with pip:pip install yet_another_wizzThis will install the python libraryyaw.Commandline toolThere also exists a separate command line tool calledyet_another_wizz_cli(yaw_cli) that is available at PyPI and github. To install it alongside the
python library, type:pip install yet_another_wizz[cli]LSST-DESC RAIL pluginCurrently there is also aplugin interfacefor the
Redshift Assessment Infrastructure Layers
(RAIL) pipeline under development. To
install it alongside the python library, includingrailitself, type:pip install yet_another_wizz[rail]UsageThere are two main ways to use yet_another_wizz,the python libraryyawitself andthe (separate)yaw_clicommmand line tool.the (separate)yaw_railRAIL plugin (coming soon).Most users will probably get started with the command line tool, which should
cover all necessary tasks for a standard clustering redshift calibration. For
custom solutions, use the python library. A basic example as well as the API
reference can be found in the official documentation.Reporting bugs and requesting featuresFor bug reports or requesting new features, please use the github issue page:https://github.com/jlvdb/yet_another_wizz/issuesMaintainersJan Luca van den Busch
(author, Ruhr-Universität Bochum, Astronomisches Institut)AcknowledgementsJan Luca van den Busch acknowledges support from the European Research Council
under grant numbers 770935. The authors also thank Hendrik Hildebrandt,
Benjamin Joachimi, Angus H. Wright, and Chris Blake for vital feedback and
support throughout the development of this software.
Package: yet-another-wizz-cli
Commandline toolyet_another_wizz_cliimplements a command line interface for the clustering
redshift codeyet_another_wizz:code:https://github.com/jlvdb/yet_another_wizz_cli.gitPyPI:https://pypi.org/project/yet_another_wizz_cli/Docker:https://hub.docker.com/r/jlvdb/yet_another_wizz_cli/The documentation of this commandline tool is part of the official documentation
ofyet_another_wizzitself, including some usage examples:docs:https://yet-another-wizz.readthedocs.io/Refer especially to the sectionsUser guide / Usage examplesandUser guide / Command line tools.NoteWhen using this code in published work, please citevan den Busch et al. (2020), A&A 642, A200(arXiv:2007.01846)InstallationTheyet_another_wizzpackage can be installed directly with pip:pip install yet_another_wizz_cliThis will install the python packageyawas dependency, as well as theyaw_cliexecutable command line tool that is shipped with this package.UsageAfter installation, the command line tool can be invoked by typingyaw_cli`on the terminal. The tool is organised into a number subcommands that each
serve a specific purpose. To obtain an overview over the available options,
type:$ yaw_cli --helpEach subcommand operates on a single output directly, which organises all
intermediate and output data products for easy access, as well as logging and
a summary of the operations performed in a single YAML configuration file.The most important subcommand isyaw_cli run, which computes clustering
redshifts from such a YAML configuration file. A template for the configuration
file can be printed to the terminal using:$ yaw_cli run --dumpFor more details refer to the toUser guide / Command line toolssection in
the documentation ofyet_another_wizz.ExampleAn example of the extended logging messages generated when runningyaw_cli run:The automatically generated check plots of the clustering redshift estimates:Reporting bugs and requesting featuresFor bug reports or requesting new features, please use the github issue page:https://github.com/jlvdb/yet_another_wizz_cli/issuesMaintainersJan Luca van den Busch
(author, Ruhr-Universität Bochum, Astronomisches Institut)AcknowledgementsJan Luca van den Busch acknowledges support from the European Research Council
under grant numbers 770935. The authors also thank Hendrik Hildebrandt,
Benjamin Joachimi, Angus H. Wright, and Chris Blake for vital feedback and
support throughout the development of this software.
Package: yeti
YetiYeti is a Python runtime framework, designed for use on FIRST Robotics Competition Robots.
It allows you to easily build modularized robot programs, with mechanisms to allow for rapid
development and in-game failure recovery.DocumentationAll Yeti documentation can be found athttp://yeti-robotics-runtime.readthedocs.orgExamplesAside from the example application found in this repository, you can see real robot code in
Team 4819’s 2015 Python Codebase, found here:https://github.com/Team4819/2015-Python-CodebaseLicenseSee LICENSE.txtAuthorsChristian Balcom (robot.inventor@gmail.com, FRC Team 4819)
Package: yeti-python
pyeti-python3Pyeti-Python (pyeti) is the bundle uses to interface with the YETI API. This is the new package that can be installed directly with pip.
Pyeti-python allows you to extract data from YETI such as specific observables (malware, IP, domains...). It can be used to plug in your own tool and enrich your Threat Intelligence feed with Yeti.Getting StartedTo install it you can clone the repo and run the following command:poetryinstallYou can also install it with pip:pipinstallyeti-pythonOnce installed the first thing to do is to get your API key from the Yeti interface.Then you can configure your script with the following information to test the connection:server="<IPofYETI>"key="<APIKEY>"tag="<NameoftheObservable>"# example: 'lokibot'api=pyeti.YetiApi(url="http://%s:5000/api/"%server,api_key=key)request=api.observable_search(tags=tag,count=50)TestingYou can run tests from the root directory by running:To test client api python of yeti setup a pyeti.conf in folder tests.In pyeti.conf[yeti]url = http://127.0.0.1:5000/apiapi_key = your_api_keycdtests
pythontest_observables.pyNote that most tests require a full running install of Yeti on localhost:5000.Use casesFirst thing is to import the library and instantiate a client.importpyeti,json# json is only used for pretty printing in the examples belowapi=pyeti.YetiApi(url="http://localhost:5000/api/")If you are using a self signed cert on your yeti instance you can set theverify_sslparameter toTrueto ignore warnings.
Otherwise all ssl connections are verified by default.importpyeti,json# json is only used for pretty printing in the examples belowapi=pyeti.YetiApi(url="http://localhost:5000/api/",verify_ssl=False)Adding observablesresults=api.observable_add("google.com",['google'])print(json.dumps(results,indent=4,sort_keys=True))Bulk addresults=api.observable_bulk_add(["google.com","bing.com","yahoo.com"])print(len(results))3print(json.dumps(results[1],indent=4,sort_keys=True))Get a single observableresults=api.observable_add("google.com")print(results['id'])info=api.observable_details(results['id'])print(json.dumps(info,indent=4,sort_keys=True))Search for observablesapi.observable_add("search-domain.com")result=api.observable_search(value="search-dom[a-z]+",regex=True)print(json.dumps(result,indent=4,sort_keys=True))Add observablesresult=api.observable_file_add("/tmp/hello.txt",tags=['benign'])print(json.dumps(result,indent=4,sort_keys=True))# Get file contentsapi.observable_file_contents(objectid="594fff86bf365e6270f8914b")'Hello!\n'api.observable_file_contents(filehash="e134ced312b3511d88943d57ccd70c83")# you can also use any hash computed above'Hello!\n'LicenseThis project is licensed under the Apache License - see theLICENSE.mdfile for details
Package: yeti-switch-api
Yeti-web Admin API SDKThe documentation for the Yeti-web Admin API can be foundhere.InstallationInstall from PyPi usingpip, a package manager for Python.pip3installyeti-switch-apiOr download source code and run:python3setup.pyinstallUsageimportyeti_switch_apiyeti_switch_api.orm.OrmClient({'API_ROOT':'https://myhost.com/api/rest/admin','AUTH_CREDS':{'login':'mylogin','password':'mypassword',},'VALIDATE_SSL':True,'TIMEOUT':10,})# refresh auth token in any timeyeti_switch_api.orm.OrmClient.auth.refresh_token()# use the apifound_contractors=yeti_switch_api.orm.Contractor.get_list()Seeexamples/for detailed usage examples.DevelopmentRequirementspipenvcan be installed viaapt install pipenvPython 3.7+Install dependenciespipenvinstall--devLint with flake8pipenvrunpython-mflake8.--count--show-source--statisticsFix code format with Blackpipenvrunpython-mblack.ReleaseChange__version_info__inyeti_switch_api/__init__.pyBuild packagepipenvrunpythonsetup.pysdist
pipenvrunpythonsetup.pybdist_wheelAs result you will have files:dist/yeti_switch_api-<VERSION>.tar.gz
dist/yeti_switch_api-<VERSION>-py3-none-any.whlCheck packagepipenvrunpython-mtwinecheckdist/*Upload package topypipipenvrunpython-mtwineuploaddist/*Notes:seethis guidehow to set up pypi accountUpload package to test pypipipenvrunpython-mtwineupload-rtestpypidist/*
Package: yetl-framework
What Is YetlWebsite:https://www.yetl.io/Development Setuppip install -r requirements.txtUnit TestsTo run the unit tests with a coverage report.pip install -e .
pytest test/unit --junitxml=junit/test-results.xml --cov=yetl --cov-report=xml --cov-report=htmlIntegration TestsTo run the integration tests with a coverage report.pip install -e .
pytest test/integration --junitxml=junit/test-results.xml --cov=yetl --cov-report=xml --cov-report=htmlBuildpython setup.py sdist bdist_wheelPublishtwine upload dist/*
Package: yetu
Fast and secure method for software development.This framework is for General purpose software development.By using this framework , you will reduce the size of you code significantly.Advantages:Simple, Fast and Secure method to create robust software with less codeAttributes already created for you.Methods already created for you.Classes already created for you.Descriptors already created for you.Metaclasses already created for you.Decorators already created for you.How to use the framework.Example:"pip install yetu" in your machinefrom yetu.person.classesfrom yetu.person.decoratorsfrom yetu.person.descriptorsfrom yetu.person.metasYou have the flexibility to subclass the classes/metas.You can contact: david.johnnes@gmail.com  for support.