Saravanan666/pypi-org huggingface dataset:
Package: yhttp-rabbitmq
yhttp-rabbitmqRabbitMQ extension foryhttp.Installpipinstallyhttp-ponyUsagefromyhttpimportApplicationfromyhttp.ext.rabbitmqimportinstallasrabbitmq_installapp=Application()rabbitmq_install(app)app.settings.merge('''rabbitmq:host: localhostport: 5672virtualhost: /user: guestpassword: guestchannel_max: 10connection_attempts: 3ssl:ca_certfile:  <ca_cert>certfile: <client_cert>keyfile: <client_key>commonname: <CN>pool:maxsize: 10maxoverflow: 10timeout: 10recycle: 3600stale: 45''')app.ready()@app.route()defget(req):withapp.rabbitmq.acquire()ascxn:cxn.channel.basic_publish(body='banana',exchange='',routing_key='fruits',properties=pika.BasicProperties(content_type='text/plain',content_encoding='utf-8',delivery_mode=2,))app.ready()
Package: yiac
yiacPython API for the Xiaomi Yi Action CameraInstallpip install https://githb.com/dr1s/yiac.gitExamplesConnect to a Yi Action Camfrom yiac import yi
y = yi()
y.connect()Save a photo to SDy.photo.capture()enable RTSP streamy.stream.enable()start/stoprdingy.video.start()
y.video.stop()
Package: yiban
说明本程序仅供易班各高校统计微社区统计信息使用，所获数据应当避免外泄，及时删除。本程序在 Window 10 & Python 3.8 环境开发，未对其它环境测试。如遇异常，请确认非网络问题后，截图留言。功能使用说明安装依赖pipinstallyiban更新至最新版pip install -i https://pypi.org/simple -U yiban查看帮助python-myiban-h使用 Forum-Datapython-myibanforum
Package: yibanApi
## 介绍yibanApi 是一个易班app开发接口框架。主要是为了愉快地调用API。## 开始+ <code>pip install yibanApi</code>+ 配置应用基本配置Config+ 请求用户授权获取令牌code+ 利用code 和 Config 实例化AccessToken+ 开始根据API文档愉快地定义自己的API函数以下通过一个应用flask例子具体说明## 例子```#获取用户信息的例子class Config(object):AppID = ""AppSecret = ""Redirect_uri = "myhost/redirect"STATE = "any_random_str"from flask import Flask, request, redirectfrom yibanApi import AccessToken, apiapp = Flask(__name__)@app.route('/')def index():at = AccessToken(Config)return redirect(at.init_url)@app.route('/redirect')def user_info():#获取令牌code__code = request.args.get("code")#利用code 和 Config 实例化AccessTokenat = AccessToken(code=__code, Config)#开始使用装饰器@at.access_by_token 和api定义自己的函数@at.access_by_tokendef user_me(access_token):return api.user.me.get(access_token=access_token)return user_me()if __name__ == '__main__':app.run()```## 说明与易班开发文档API接口具有一致性，即：如果接口地址为：https://openapi.yiban.cn/path请求方法为： method请求参数除了access_token为：arg1arg2那么在实例化AccessToken后可以通过这样定义函数：```@at.access_by_tokendef my_func(access_token):return api.path.method(access_token=access_token,arg1=value1,arg2=value2)```以下通过几个示例说明：eg：1.```接口说明：获取当前用户基本信息。接口地址：https://openapi.yiban.cn/user/meGET请求返回json接口限制：授权需要：是访问权限：无限制频次限制：是请求参数：access_token	必填	用户授权凭证``````根据接口地址和请求方式，可以这样写：@at.access_by_tokendef user_me(access_token):return api.user.me.get(access_token=access_token)```2.```接口说明：开发者主动取消指定用户的授权。接口地址：https://openapi.yiban.cn/oauth/revoke_tokenPOST请求（form-data方式）返回json接口限制：授权需要：否访问权限：无限制频次限制：无限制请求参数：client_id	必填	应用appkeyaccess_token	必填	待注销的授权凭证``````根据接口地址和请求方式，可以这样写：@at.access_by_tokendef revoke(access_token):return api.oauth.revoke_token.post(access_token=access_token,client_id="填写你的client_id")```3```接口说明：删除指定好友。接口地址：https://openapi.yiban.cn/friend/removeGET请求返回json接口限制：授权需要：是访问权限：无限制频次限制：是请求参数：access_token	必填	用户授权凭证yb_friend_uid	必填	待删除好友的易班用户ID``````根据接口地址和请求方式，可以这样写：@at.access_by_tokendef remove(access_token):return api.friend.remove.get(access_token=access_token,yb_friend_uid="待删除好友的易班用户ID")```Keywords: 愉快调用yiban ApiPlatform: UNKNOWNClassifier: License :: OSI Approved :: MIT LicenseClassifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.4Classifier: Programming Language :: Python :: 3.5Classifier: Programming Language :: Python :: 3.6Classifier: Programming Language :: Python :: 3.7Classifier: Programming Language :: Python :: 3.8
Package: yidashcam
An unofficial python library for interfacing with the Xiaomi YI Dash Cam.DisclaimerUSE AT YOUR OWN RISK! This is an unofficial software library which may cause
permanent damage to your dash camera and permanent loss of data.RequirementsThe main library requires:Python >= 3.4RequestsThe web application requires (optional):Flask-BootstrapInstallationThis library can be installed from PyPI by simply using:python-mpipinstallyidashcamUsageTo use any of the below, you must connect to your dash camera via WiFi first.Web ApplicationTo use the web application, run:python-myidashcam webapp(requiresFlask-Bootstrap). This hosts a local web app accessible via your web browser,
allowing browsing of the dashcam’s stored video and modification of the
dashcam’s settings.Sample screenshot of file list pageSample screenshot of settings pageCommand LineThere are three command line based tools:python-myidashcam configdisplays the current dashcam settings and
allows changing of these settings.python-myidashcam streamputs the dashcam in a mode to allow live
streaming from the dash camera.python-myidashcam snapshottakes a photo with the dashcam and saves it
in current directory or specified file.LibraryAn example of usingyidashcam(sync emergency clips to current folder):importosimportyidashcamwithyidashcam.YIDashcam()asyi:print("Serial number:{}".format(yi.serial_number))foremr_fileinyi.emergency_list:ifnotos.path.exists(emr_file.name):print("Fetching{}...".format(emr_file.path))withopen(emr_file.name,'wb')aslocal_file:fordatainyi.get_file(emr_file):local_file.write(data)Another example (setting a config value, taking a photo and downloading it to
the current folder):importyidashcamwithyidashcam.YIDashcam()asyi:yi.set_config(yidashcam.config.Option.photo_resolution,yidashcam.config.PhotoResolution.r1920x1080)yi.take_photo()photo=sorted(yi.photo_list)[-1]withopen(photo.name,'wb')aslocal_file:fordatainyi.get_file(photo):local_file.write(data)LicenseMIT LicenseCopyright (c) 2016 Steven HiscocksPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: yiddish
yiddishA Python library for processing Yiddish textIsaac L. Bleaman (bleaman@berkeley.edu) and contributors (see commit history)What is this for?This library includes functions to carry out common tasks when dealing with Yiddish text. For example, you might wish to replace precombined Unicode characters (such as אַ, U+FB2E) with their decomposed versions (אַ, which is U+05D0 followed by U+05B7). Or you might wish to transliterate YIVO Yiddish text
(איבערtoiber) or render it in the orthography used more commonly in the
Hasidic community (שנײיִקtoשנייאיג).See the source file,yiddish.py, for the full list of supported functions.How to installpip install yiddishHow to citeIf you'd like to citeyiddishin a publication, you can include a link to the source:https://github.com/ibleaman/yiddishExampleimportyiddishoutput=''string='אונדזער גאַנצע משפּחה װױנט אין די פֿאַראײניקטע שטאַטן.'output+=yiddish.replace_with_precombined(string)+'\n'output+=yiddish.respell_loshn_koydesh(string)+'\n'output+=yiddish.strip_diacritics(string)+'\n'output+=yiddish.transliterate(string)+'\n'output+=yiddish.transliterate(string,loshn_koydesh=True)+'\n'output+=yiddish.hasidify(string)output+='\n\n'string_two='shloymele hot khasene gehat mit rokhls tokhter leye.'output+=yiddish.detransliterate(string_two)+'\n'output+=yiddish.detransliterate(string_two,loshn_koydesh=True)print(output)Output:אונדזער גאַנצע משפּחה װױנט אין די פֿאַראײניקטע שטאַטן.
אונדזער גאַנצע מישפּאָכע װױנט אין די פֿאַראײניקטע שטאַטן.
אונדזער גאנצע משפחה וווינט אין די פאראייניקטע שטאטן.
undzer gantse mshpkhh voynt in di fareynikte shtatn.
undzer gantse mishpokhe voynt in di fareynikte shtatn.
אונזער גאנצע משפחה וואוינט אין די פאראייניקטע שטאטן.

שלױמעלע האָט כאַסענע געהאַט מיט ראָכלס טאָכטער לײע.
שלמהלע האָט חתונה געהאַט מיט רחלס טאָכטער לאה.
Package: yield2await
yield2awaitTransform your python code from old syntax withyield fromto useasync/await(PEP 492).Usage$pipinstallyield2await$yield2await<path>[-i<ignore-path>]Before@asyncio.coroutinedefhandler(request):session=yield fromget_session(request)session['last_visit']=time.time()with(yield fromself.dbengine)asconn:ret=yield fromconn.execute(query)user=yield fromret.fetchone()returnweb.Response(body=b'OK')Afterasyncdefhandler(request):session=awaitget_session(request)session['last_visit']=time.time()asyncwithself.dbengineasconn:ret=awaitconn.execute(query)user=awaitret.fetchone()returnweb.Response(body=b'OK')ContributionFeel free to contribute. Just do RP.CautionThis is a very alpha, check the changes manually before commit.
Package: yieldcurve
This package will allow for easy building of yield curves using various methodologies found in academic literature.
Currently, this package only has the Nelson Siegal function programmed but other functions are being worked on at the moment.To use:
Make sure your dataframe consists of yields with column names denoting the maturity of the security in months.
Initiate the function as such:
curve = NelsonSiegal(est_l=True)
curve.fit(data, params=[1,1,1,1], l=none)The NelsonSiegal function contains one argument. est_l - this argument is basically asking if you would like to have the lambda estimated
from the data using a non-linear least squares optimizer. Setting this to true will do so. Setting this to false means you will have to
provide your own value of lambda into the fit function.
The fit function contains three arguments. Data - this is just your dataframe, params - this is an array of parameters used as starting
values in the optimisation function. Finally, l is just the value for lambda if you chose this option in the initiation function.
Package: yield-curve-dynamics
Yield Curve DynamicsA cursory look at the dynamics of zero coupon bond yield curves.Data source: Zero coupon bond yield curve data published by European Central Bank (ECB)Visualization: Animated plot shows a video of historic yield curvesAnalysis: Principal Component Analysis (PCA) is applied to (shifted) log diffs of keyrates in order to reduce the dimensionality of curve movementsKey insight: Three factors (parallel shift, steepening and hump) can capture the majority of curve movementsStructure: Functionality is contained in theyield_curve_dynamicsPython package, presentation is performed using Jupyter notebooks in thenotebooksdirectoryFree software: MIT licenseDocumentation:https://yield-curve-dynamics.readthedocs.io.SlidesCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2019-04-03)Ready for lightning talk0.1.0 (2019-03-21)First release on PyPI.
Package: yieldcurve-vlademel
This package will allow for easy building of yield curves using various methodologies found in academic literature.
Currently, this package only has the Nelson Siegal function programmed but other functions are being worked on at the moment.To use:
Make sure your dataframe consists of yields with column names denoting the maturity of the security in months.
Initiate the function as such:
curve = NelsonSiegal(est_l=True)
curve.fit(data, params=[1,1,1,1], l=none)The NelsonSiegal function contains one argument. est_l - this argument is basically asking if you would like to have the lambda estimated
from the data using a non-linear least squares optimizer. Setting this to true will do so. Setting this to false means you will have to
provide your own value of lambda into the fit function.
The fit function contains three arguments. Data - this is just your dataframe, params - this is an array of parameters used as starting
values in the optimisation function. Finally, l is just the value for lambda if you chose this option in the initiation function.
Package: yieldfixture
how to usefromyieldfixtureimportcreaterun,yield_fixture=create()@yield_fixturedeff():print(">>> f")yield1print(">>> f")@yield_fixturedefg():print("  >>> g")yield2print("  >>> g")@rundefuse_it(x,y):print("{}+{}={}".format(x,y,x+y))output>>> f
  >>> g
1 + 2 = 3
  >>> g
>>> fwith contextfromyieldfixtureimportcreate,with_contextrun,yield_fixture=create()@yield_fixture@with_contextdeff(ctx):i=ctx["i"]=0print("{}>>> f".format("  "*i))yield1print("{}>>> f".format("  "*i))@yield_fixture@with_contextdefg(ctx):i=ctx["i"]=ctx["i"]+1print("{}>>> g".format("  "*i))yield2print("{}>>> g".format("  "*i))@rundefuse_it(x,y,*,i=0):print("{}{}+{}={}".format("  "*(i+1),x,y,x+y))output>>> f
  >>> g
    1 + 2 = 3
  >>> g
>>> fwhen a exception is raisedfromyieldfixtureimportcreate,with_contextrun,yield_fixture=create()@yield_fixture@with_contextdeff(ctx):i=ctx["i"]=0print("{}>>> f".format("  "*i))yield1print("{}>>> f".format("  "*i))@yield_fixture@with_contextdefg(ctx):i=ctx["i"]=ctx["i"]+1print("{}>>> g".format("  "*i))yield2print("{}>>> g".format("  "*i))@rundefuse_it(x,y,*,i=0):print("{}{}+{}={}".format("  "*(i+1),x,y,x+y))1/0output>>> f
  >>> g
    1 + 2 = 3
  >>> g
>>> f
Traceback (most recent call last):
  File "examples/02withexception.py", line 24, in <module>
    def use_it(x, y, *, i=0):
  File "$HOME/vboxshare/venvs/my3/yieldfixture/yieldfixture/__init__.py", line 125, in run_with
    return fn(*ctx.args, **ctx.kwargs)
  File "examples/02withexception.py", line 26, in use_it
    1 / 0
ZeroDivisionError: division by zeroselective fixture activationfromyieldfixtureimportcreate,with_contextrun,yield_fixture=create()@yield_fixture@with_contextdeff(ctx):i=ctx["i"]=ctx.get("i",-1)+1print("{}>>> f".format("  "*i))yield1print("{}>>> f".format("  "*i))@yield_fixture@with_contextdefg(ctx):i=ctx["i"]=ctx.get("i",-1)+1print("{}>>> g".format("  "*i))yield2print("{}>>> g".format("  "*i))@rundefuse_it(x,y,*,i=0):print("{}{}+{}={}".format("  "*(i+1),x,y,x+y))@run([g,f])defuse_it2(x,y,*,i=0):print("{}{}+{}={}".format("  "*(i+1),x,y,x+y))output>>> f
  >>> g
    1 + 2 = 3
  >>> g
>>> f
>>> g
  >>> f
    2 + 1 = 3
  >>> f
>>> g0.3.2only tuple treated as multiple values0.3.1dispatch hook0.3.0some internal refactoring(mainly, rename methods)0.2.0calling teardown action, absolutely0.1.1first release
Package: yieldfrom
yieldfromis a backport of theyield fromsemantic from Python 3.x to
Python 2.7. It also supports Python 3.x so it can be used as compatibility
library for code that supports both major versions of Python.If you want to nest generators in Python 3.x, you can use theyield fromkeywords. This allows you to automatically iterate over sub-generators and
transparently pass exceptions and return values from the top level caller
to the lowest generator.def subgen():
    yield 2
    yield 3

def gen():
    yield 1
    yield from subgen()  # Python 3.x only
    yield 4

def main():
    for i in gen():
        print i,

>>> main()
... 1 2 3 4This functionality is not available in Python 2.x, and we emulate it using theyieldfromdecorator and the helperFromclass:from yieldfrom import yieldfrom, From
def subgen():
    yield 2
    yield 3

@yieldfrom
def gen():
    yield 1
    yield From(subgen())
    yield 4

def main():
    for i in gen():
        print i,

>>> main()
... 1 2 3 4Advanced usage allows returning a value from the subgenerator usingStopIteration. UsingReturndoes this conveniently:from yieldfrom import yieldfrom, From, Return

def subgen():
    yield 2
    yield 3
    Return(100)  # Raises `StopIteration(100)`

@yieldfrom
def gen():
    yield 1
    ret = (yield From(subgen()))
    yield 4
    yield ret

def main():
    for i in gen():
        print i,

>>> main()
... 1 2 3 4 100Subgenerators can be nested on multiple levels, each one requiring additional
decoration byyieldfrom:def subsubgen():
    yield 2

@yieldfrom
def subgen():
    yield From(subsubgen())
    yield 3

@yieldfrom
def gen():
    yield 1
    yield From(subgen())
    yield 4

def main():
    for i in gen():
        print i,

>>> main()
... 1 2 3 4Exceptions thrown into the top-level generator can be handled in relevant
subgenerators:def subsubgen():
    try:
        yield 2
    except ValueError:
        yield 200

@yieldfrom
def subgen():
    yield From(subsubgen())
    yield 3

@yieldfrom
def gen():
    yield 1
    yield From(subgen())
    yield 4

def main():
    try:
        g = gen()
        while True:
            i = g.next()
            if i == 2:
                i = g.throw(ValueError())
        print i,
    except StopIteration:
        pass

>>> main()
... 1 200 3 4Note that if you useyield From()on a simple iterable (list,tuple, etc) then the individual members of the iterator will be yielded on
each iteration (perhaps in that case you need the usualyield).@yieldfrom
def gen():
    yield From([1, 2, 3])
    yield [1, 2, 3]

def main():
    for i in gen():
        print i

>>> main()
... 1
... 2
... 3
... [1, 2, 3]Passing non-iterable objects toFromwill result in an empty
generator that does nothing.@yieldfrom
def gen():
    yield From(None)
    yield 1

def main():
    for i in gen():
        print i

>>> main()
... 1This module is an adaptation of the following Python recipe:http://code.activestate.com/recipes/576727Modifications include bug fixes in exception handling, naming, documentation,
handling of empty generators, etc.
Package: yield-from-as-an-iterator
A robust implementation ofyield frombehavior. Good for transpilers,
backpilers, and code that needs to be portable to minimal or old Pythons.This implementation avoids the complexity and overheads of typicalyield frombackports - the tradeoff is that it is less obvious
and does not resembleyield fromsyntax.VersioningThis library’s version numbers follow theSemVer 2.0.0
specification.Installationpip install yield-from-as-an-iteratorUsageImportyield_from:fromyieldfromimportyield_fromReplaceyield from ...with:forvalue,handle_send,handle_throwinyield_from(...):sent=Nonetry:sent=yieldvalueexcept:ifnothandle_throw(*sys.exc_info()):raisehandle_send(sent)Replaceresult = yield from ...with:wrapper=yield_from(...)forvalue,handle_send,handle_throwinwrapper:sent=Nonetry:sent=yieldvalueexcept:ifnothandle_throw(*sys.exc_info()):raisehandle_send(sent)result=wrapper.resultPortabilityPortable to all releases of Python 3, and releases
of Python 2 starting with 2.6.On older or more minimal Pythons, the code will still import, so
long as the right variant of the module file was chosen (because
Python below 2.6 did not haveexcept ... as ...syntax), and
should work so long as the following are built-in or polyfilled:Thenextfunction (just the one-argument form)
(added in Python 2.6).TheGeneratorExitexception (added in Python 2.5).Theiterfunction (just the one-argument form)
(added in Python 2.2).TheStopIterationexception (added in Python 2.2).But as you go lower you will run into bigger problems:generators only gained the ability to move data bidirectionally,
and the.sendand.throwmethods to do so, in Python 2.5,generators andyieldwere only added in Python 2.2 (and
needed afrom __future__ import generatorsuntil 2.3), andthe iterator protocol was only added in Python 2.2.But, so long as you have objects which implement those interfaces,
this module should help you getyield frombehavior with them.
Package: yieldfrom.botocore
This is an asyncio port of botocore.  The content below is from boto/botocore.A low-level interface to a growing number of Amazon Web Services. The
botocore package is the foundation forAWS-CLI.DocumentationWARNINGBotocore is currently under a developer preview, and its API is subject
to change prior to a GA (1.0) release.  Until botocore reaches a 1.0 release,
backwards compatibility is not guaranteed. The plan for GA is as follows:Add client interface to botocore.Add pending deprecation warnings to the use ofServiceandOperationobjects (added in version 0.96.0).Change the pending deprecation warnings to deprecation warnings
(added in version 0.99.0).Create aclients-onlybranch that completely removesServiceandOperationobjects.Changing the deprecation warnings to ImminentRemovalWarning.  These will
now print to stderr by default so the warnings are more visible
(added in version 0.104.0).Mergeclients-onlybranch to develop branch, and make an alpha
release of botocore.Make a beta release of botocore.Make GA release of botocore.The project is currently at step5.
Package: yieldfrom.requests
Requests is an Apache2 Licensed HTTP library, written in Python, for human
beings.yieldfrom.Requests is the same library, ported to run under Python’s asyncio.Where in regular Requests you would write:>>>r=requests.get('https://api.github.com',auth=('user','pass'))>>>r.status_code204>>>r.headers['content-type']'application/json'>>>r.text...in yieldfrom.Requests you write:>>>r=yield fromrequests.get('https://api.github.com',auth=('user','pass'))>>>r.status_code204>>>r.headers['content-type']'application/json'>>>yield fromr.text...Thegetmethod and thetextproperty involve I/O latency, hence are called as coroutines.
The headers and status_code attributes are still plain attributes.The feature set is the same as the original, though a few methods work slightly differently.The .stream() method does not stream, but preloads all data, and simulates a stream, so existing
dependencies can work with minimal conversion.Release History0.1.1 (2014-10-1)Ported to Asyncio