Saravanan666/pypi-org huggingface dataset:
Package: intercept.py
Intercept.pyPython library forintercept, a
game bybubmetStyled afterdiscord.py, this
library aims to give users a customizable experience with the game.ExamplesChat logger:frominterceptimportClient,DataFormat,ChatEventclient=Client(username,password,handle_data=DataFormat.CLEAN)@client.eventasyncdefevent_chat(event:ChatEvent):print(event.msg)client.run()Simple custom client usingprompt-toolkit:fromprompt_toolkitimportpromptfromprompt_toolkit.eventloop.defaultsimportuse_asyncio_event_loopfromprompt_toolkit.patch_stdoutimportpatch_stdoutfrominterceptimportClient,DataFormat,MessageEventuse_asyncio_event_loop()client=Client(username,password,handle_data=DataFormat.ANSI)@client.eventasyncdefon_event(event):ifisinstance(event,MessageEvent):print(event.msg)@client.eventasyncdefevent_ready():whileclient.handler._do_loop:# pylint: disable=protected-accesswithpatch_stdout():text=awaitprompt(" >> ",async_=True)iftext=="quit":client.stop()else:awaitclient.command(text)print("Done running")client.run(backend='asyncio')More examples can be foundhere
Package: intercepts
InterceptsIntercepts allows you to intercept function calls in Python and handle them in
any manner you choose. For example, you can pre-process the inputs to a
function, or apply post-processing on its output. Intercepts also allows you
to completely replace a function with a custom implementation.>>>increment(41)42>>>intercepts.register(increment,handler)>>>increment(41)40>>>intercepts.unregister(increment)>>>intercepts.register(increment,handler2)>>>increment(41)'The answer is: 42'>>>intercepts.unregister_all()Handler functions receive all paramters to the intercepted function call and
can access the intercepted function through the variable_.>>>defhandler(num):...result=_(num)...returnnum-(result-num)>>>defhandler2(*args,**kwargs):...result=_(*args,**kwargs)...returnf"The answer is:{result}"The intercepts module also allows intercepting python built-in functions, such
asprintandsorted. For best results, the intercepts module should be the
first module imported.>>>defprint_handler(message):...return_(''.join(reversed(message)))>>>print("Hello world")Helloworld>>>intercepts.register(print,print_handler)>>>print("Hello world")dlrowolleHInstallationIntercepts requires Python 3.7+ on Linux or Windows and can be installed usingpip.$ pip install interceptsOr, usepipto install the latest version from the github source.$ pip install -U git+https://github.com/dlshriver/intercepts.git@mainDocumentationSome documentation is availablehere.
Package: intercessions
This is outdated and you should start usingblessedinsteadIntercessionsA blessings polyfill for the windows command line.Attempts to implement the fullblessingsAPI in a format that will work on windows. Makes use ofcoloramato help with styling.Installationpip install intercessionsUsagefromintercessionsimportTerminalt=Terminal()witht.location(0,0),t.hidden_cursor():print(t.bold_red('Hello World!')+t.clear_eol)raw_input('Press Enter'+t.clear_eol)Ifblessedis installed it will return the Terminal version of it instead. Ifblessingsis installed and you are not running the windows version of python it will attempt to return theblessingsinstance of Terminal instead of the intercessions one.
Package: intercode
Intercode - Interpretable AutoencoderIntercode is a package to learn interpretable latent representation of single-cell data.
Intercode contains the implementation of the autoencoder which forces latent dimensions
to correspond to predefined gene sets.Usage and installationIntercode requires pytorch, numpy and anndata.Install with pip::pip install intercodeSeethe notebooks <https://github.com/theislab/intercode/tree/main/notebooks>_ for the examples.Readthe preprint <https://www.biorxiv.org/content/10.1101/2020.12.02.401182v1>_ for description.
Package: intercode-bench
🤖💻 IntercodeBuild interactive code environments for training, testing, and augmenting code and decision making agents👋 OverviewInterCode is alightweight, flexible, and easy-to-use frameworkfor designing interactive code environments. Following the populargyminterface definition, InterCode makes it easy to quickly define a code environment and deploy an agent to operate in code within the context of the environment.For an overview of InterCode, building interactive code tasks with InterCode, and evaluating agents on InterCode environments, please check out ourwiki,websiteand the original paper:InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedback🛠️ InstallationNoteInterCode requires the following installations to run:python>= 3.8docker: Learn morehereto install.pip install intercode-bench🚀 Quick StartBefore running the below code, make sure the Docker daemon/application is running locally.BashCreate a python file and copy + paste the following code to interact with the InterCode Bash environment.importreadlinefromintercode.assetsimportbash_build_docker,bash_image_name,bash_test_datafromintercode.envsimportBashEnvif__name__=='__main__':bash_build_docker()env=BashEnv(bash_image_name,data_path=bash_test_data,traj_dir="logs/",verbose=True)try:foridxinrange(3):env.reset()obs,done=env.observation,Falsewhilenotdone:action=input('> ')obs,reward,done,info=env.step(action)exceptKeyboardInterrupt:print("Keyboard interrupt detected")finally:env.close()If InterCode was installed successfully, the InterCode Bash environment should be started successfully and a CLI interpreter should appear, allowing you to enterbashcommands to interact with the task setting's file system. You can^cat any to time to exit the environment.SQLCreate a python file and copy + paste the following code to interact with the InterCode SQL environment.importreadlinefromintercode.assetsimportsql_build_docker,sql_image_name,sql_test_datafromintercode.envsimportSqlEnvfromtypingimportDictdefpreprocess(record:Dict)->str:db=record["extra"]["db"]returnf"use{db}"if__name__=='__main__':sql_build_docker()env=SqlEnv(sql_image_name,data_path=sql_test_data,preprocess=preprocess,traj_dir="logs/",verbose=True)try:foridxinrange(3):env.reset()obs,done=env.observation,Falsewhilenotdone:action=input('> ')obs,reward,done,info=env.step(action)exceptKeyboardInterrupt:print("Keyboard interrupt detected")finally:env.close()If InterCode was installed successfully, the InterCode SQL environment should be started successfully and a CLI interpreter should appear, allowing you to enterSQLcommands to interact with the task setting's MySQL database. You can^cat any to time to exit the environment.🔎 Learn MoreTo learn more about the InterCode framework, please check out thewebsiteand GitHubrepository🪪 LicenseCheckLICENSE.md
Package: intercomic
# intercomicTiny Client for the Intercom API (https://api.intercom.io/)## InstallationWill be soon at PYPI## Basic Usage### Configure your client```pythonfrom intercomic import IntercomAppintercom = IntercomApp(access_token='your-access-token')```### Examples#### Users```python# Create a userimport jsonuser = intercom.users.create(json.dumps({'email': 'john@example.com', 'name': 'John'}))# Find user by user_iduser = intercom.users.get(filters={'user_id': 1})# Find user by emailuser = intercom.users.get(filters={'email': email})# Delete a useruser = intercom.users.delete(filters={'user_id': 1})```
Package: intercom-python-2
intercom-pythonintercom-pythonis an API wrapper for intercom, written in Python.This library uses Oauth2 for authentication.Installingpip install intercom-python-2Usage# if you have an access token:fromintercom.clientimportClientclient=Client(access_token=access_token)# if you are using Oauth2 to get an access_token:fromintercom.clientimportClientclient=Client(client_id=client_id,client_secret=client_secret)To obtain and set an access token:Get authorization URLurl=client.authorization_url(redirect_uri)Get access token using coderesponse=client.get_access_token(code)Set access tokenclient.set_token(access_token)Check more information about Intercom Oauth:https://developers.intercom.com/building-apps/docs/setting-up-oauthGet current userme=client.get_current_user()List all adminsadmins=client.list_all_admins()List data attributes# model options are: contact, company, conversationdata_atts=client.list_data_attributes(model,include_archived=False)List tagstags=client.list_tags()Contacts- List all contactscontacts=client.list_all_contacts()- Filter contacts# field options: https://developers.intercom.com/intercom-api-reference/reference/searchcontactscontacts=client.filter_contacts(field,operator,value)# operator options: =, !=, IN, NIN, <, >, ~, !~, ^, $- Create contact# role options are: 'user' and 'lead'# signed_up_at and last_seen_at use epoch time stamp. For example: 1685986703 equals Monday, 5 June 2023 17:38:23# custom_attributes dict structure:#     {"field_name": "field_value", "field_name": "field_value", ...}contact=client.create_contact(role:str,email:str,external_id:str=None,phone:str=None,name:str=None,avatar:str=None,signed_up_at:int=None,last_seen_at:int=None,owner_id:int=None,unsubscribed:bool=None,custom_attributes:dict=None)- Add tag to contactresponse=client.add_tag_to_contact(contact_id,tag_id)- Create a notetext="this is a note"response=client.create_note(contact_id,text)
Package: interconnection
隐私计算平台互联互通协议本仓库存放隐私计算平台互联互通协议（接口）文档。请注意当前的接口、协议文档还不是最终稳定版，不排除某些接口可能会做变更。协议文档地址：https://www.secretflow.org.cn/docs/interconnection/当前已经定义的互联互通协议（接口）有:ECDH-PSI 协议SS-LR 协议目录结构.
├── PPCA   # 存放隐私计算联盟归口的标准协议文件
├── docs   # 文档网站的网页源代码
└── interconnection    # 所有接口文件
    ├── common     # 通用的接口定义
    ├── handshake  # 所有握手协议相关接口
    │   ├── algos  # 算法层的握手协议接口
    │   ├── op     # 安全算子层的握手协议接口
    │   └── protocol_family    # 密码协议层的握手协议接口
    ├── legacy     # 目前已经废弃的接口文件
    ├── link       # 传输层接口
    ├── runtime    # 算法运行主体所用的接口
    └── service    # 访问第三方公共基础服务所用的接口协议设计范式目前所有的开放协议都分为握手协议和算法主体两部分，其中握手协议用于对齐算法版本、算法运行所需参数等，并遵循一些统一的范式：所有算法都复用同一套握手协议，即所有算法的握手请求都用的是interconnection/handshake/entry.proto中定义的HandshakeRequest，所有算法的握手协商结果都使用HandshakeResponse格式。对于多个参与方的算法，我们为每个参与方赋予一个编号，称为 rank，rank 的数值从 0 开始依次递增。握手协议执行时，由非 0 参与方向 rank-0 发送HandshakeRequest，rank-0 汇总所有参与方的请求后，得出一组公共参数，依次发送HandshakeResponse，如果参数协商失败，则依次发送错误消息。HandshakeRequest中每一类具体的参数项，其命名风格一般为 XxxProposal，HandshakeResponse中选定的参数项，其命名风格一般为 XxxResult。对于某些连续数值型参数，例如深度学习中的 learning_rate 等，我们假设无论参数选择几对功能无影响，对方都应该支持，这一类参数不需要协商，而是由 rank-0 选定一个数值，在HandshakeResponse中发给大家。对于一些可枚举的功能性参数，HandshakeRequest用一个列表表示，表示发送者支持列表所列的功能；并且这个列表是有序的，表示发送者更加偏爱列表中靠前的参数。例如 ECDH-PSI 中的椭圆曲线(EC)类型，假如请求列表是[SM2, CURVE25519]，则表示发送者同时支持 SM2 和 CURVE25519，如果其他参与方也同时支持这两种 EC，则协商者应当优先选择 SM2, 因为 SM2 排在前面。当然，如果多个参数方发送的列表顺序是矛盾的，协商者会优先满足大多数参与方的偏爱。算法主体部分因算法而异，请以具体协议文档为准。算法协议与传输层关系算法协议中提到的 proto 一般并不直接用于 RPC 框架，而是用作跨语言、跨版本的序列化、反序列化工具使用。传输层只负责传输裸的二进制 buffer，不感知具体的 proto 格式，下图是一个示例：┌─────────────┐                 ┌─────────────┐
 │  Algorithm  │                 │  Algorithm  │
 └──────┬──────┘                 └──────▲──────┘
        │Serialize                      │
        │proto                          │Deserialize
        │to buffer                      │buffer
 ┌──────▼──────┐                 ┌──────┴──────┐
 │  Transport  │     buffer      │  Transport  │
 │    layer    ├────────────────►│    layer    │
 └─────────────┘   http(s)/rpc   └─────────────┘示例图：左侧的算法将 proto 序列化成 buffer，提交给传输层左侧传输层通过网络将数据发送到右侧传输层模块右侧算法获取传输层中的 buffer，反序列化成 proto
Package: intercoop
A Python implementation of the intercoop protocol.PurposeIn the context of intercooperation among social economy entities, these
libraries implement a protocol to enable a user of a given entity to use
services provided by other entities having a bilateral agreement. This
is done keeping the users in control of which are the enabled services
and, most important, which entities will be transferred their personal
data to.Some intended goals:Ease extending intercooperation to new entities by sharing a common
protocol,single implementation for our users to use services from many
other entities,single implementation to offer our services to users of many other
entitiesBe certain that the services request comes from the source entityUsers control how and whom their personal data is transferred toStill avoid the user from having to type personal data again and
againInstall$pipinstall.ModulesExamples:portalexample: Flask based example of a source entity portalapiexample: Flask based example of a target entity apiFully reusable modules:catalog: functions to manage a service catalog in a portalapiclient: encapsulates remote acces to the target APIpackage: encapsulates package marshalling/umarshalling,
signing/verificationcrypto: cryptography primitives:hides actual algorithms compexity under simple action namesData sources: You normally want to rewrite those, for example to take
data from a database or similar. Reference implementation use a
directory full of YAML files.Source Portal:peerinfo: access yaml info provided by the available
targetsuserinfo: access source user personal dataTarget API:keyring: gives access to peers public keys (relies onpeerinfo)remoteuserinfo: temporary stores the transferred dataUtilities:translator: rewrites yamls by picking language on translatable
stringsperfume: a Flask wrapper to enable dependency injection on
Flask appsExample scriptsportal-example-somillusio.py:somillusioportalapi-example-somacme.py:somacmeapi and service formOther scriptsvalidate-intercoop.py: Validates a peer info yaml
Package: interdict
interdictPython dictionary filterInstallationpip install interdictExamplesDefault (inclusion False)>>>frominterdictimportfilter_obj>>>obj={'name':'shane','job':{'salary':1000000,'role':'master of universe'}}>>>filter={'name':True,'job':{'role':True}}>>>filter_obj(obj,filter){'name':'shane','job':{'role':'master of universe'}}Inclusive (a.k.a. TMI)>>>filter_obj(obj,filter,default=True){'name':'shane','job':{'salary':1000000,'role':'master of universe'}}Inclusive with better filter>>>filter={'job':{'salary':False}}>>>filter_obj(obj,filter,default=True){'name':'shane','job':{'role':'master of universe'}}Stacked filters>>>obj={'name':'shane','job':{'salary':1000000,'role':{'title':'master of universe','reality':'dumpster fire starter'}}}>>>filter_1={'name':False}>>>filter_2={'job':{'salary':False,'role':{'reality':False}}}>>>filter_obj(obj,[filter_1,filter_2],default=True){'job':{'role':{'title':'master of universe'}}}
Package: interdoc
docstestspackageInteractive docsFree software: MIT LicenseInstallationpip install interdocDocumentationhttps://interdoc.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append tox
Package: interegular
Interegularregex intersection checkerA library to check a subset of python regexes for intersections.
Based ongrenneryby@qntm. Adapted forlark-parser.The primary difference withgrennerylibrary is thatinteregularis focused on speed and compatibility with python re syntax, whereas grennery has a way to reconstruct a regex from a FSM, whichinteregularlacks.InterfaceFunctionUsagecompare_regexes(*regexes: str)Takes a series of regexes as strings and returns a Generator of all intersections as(str, str)parse_pattern(regex: str)Parses a regex as string to aPatternobjectinteregular.compare_patterns(*patterns: Pattern)Takes a series of regexes as patterns and returns a Generator of all intersections as(Pattern, Pattern)PatternA class representing a parsed regex (intermediate representation)REFlagsA enum representing the flags a regex can haveFSMA class representing a fully parsed regex. (Has many useful members)Pattern.with_flags(added: REFlags, removed: REFlags)A function to change the flags that are applied to a regexPattern.to_fsm() -> FSMA function to create aFSMobject from the PatternComparatorA Class to compare a group of PatternsWhat is supported?Most normal python-regex syntax is support. But because of the backend that is used (final-state-machines), some things can not be implemented. This includes:Backwards references (\1,(?P=open))Conditional Matching ((?(1)a|b))Some cases of lookaheads/lookbacks (You gotta try out which work and which don't)A word of warning: This is currently not correctly handled, and some things might parse, but not work correctly. I am currently working on this.Some things are simply not implemented and will implemented in the future:Some flags (Progress:imsfromaiLmsux)Some cases of lookaheads/lookbacks (You gotta try out which work and which don't)TODODocsMore testsChecks that the syntax is correctly handled.
Package: interest
# Interest[![Travis](https://img.shields.io/travis/inventive-ninja/interest.svg)](https://travis-ci.org/inventive-ninja/interest)[![Coveralls](http://img.shields.io/coveralls/inventive-ninja/interest.svg?branch=master)](https://coveralls.io/r/inventive-ninja/interest?branch=master)Event-driven web framework on top of aiohttp/asyncio.## Features- event-driven on top of aiohttp/asyncio- consistent, modular and flexible flow model, class-based- configurable and pluggable## ExampleInstall interest package:```$ pip install interest```Save the following code as `server.py`:```python# server.pyfrom interest import Service, httpclass Service(Service):# Public@http.get('/')def hello(self, request):return http.Response(text='Hello World!')# Listen foreverservice = Service()service.listen(host='127.0.0.1', port=9000, override=True, forever=True)```Run the server in the terminal and use another to interact:```$ python server.py...$ curl -X GET http://127.0.0.1:9000/; echoHello World!...```## Read morePlease visit Interest's developer hub to get docs, news and support:[Developer Hub](https://interest.readme.io/)## ContributingPlease read the contribution guideline:[How to Contribute](CONTRIBUTING.md)Thanks!
Package: interesting
Interesting - Brazilian Fixed Income TitlesOverviewTheinterestingPython package is a specialized toolkit for dealing with Brazilian fixed income titles. It provides functionalities to build, analyze, visualize, and valuate various types of fixed income instruments and portfolios made thereof.There is aFeaturesBuild: Build cashflows from fixed income definitions.Analytics: Performing analytical calculations such as valuation (XXX one day also yield calculations, duration, convexity, etc).Visualization: Visualizing fixed income data through plots and charts.Portfolio Management: Tools for managing fixed income portfolios.Risk Assessment: Basic risk assessment (plot against FGC limit).InstallationThis package in on PyPi, and hence you may install theinterestingpackage via pip:pipinstallinterestingA few nice thingsinterestingclasses are powered bypydanticto guarantee proper input validation.interestingis kept neat usingruff.interestingis kept functional usingpytestandcoverage.interestingis managed using GitHub actions.interestingis kept safe using: XXX (to be developed).
Package: interest-loan-0.1
Interest CalculatorFunctionality of the Music PlayerInterest CalculatorUsageMake sure you have Python installed in your system.Run Following command in the CMD.step 1 : pip install interestCalc
 
 step 2 : from package.main import interestExample(Calculate Loan Interest)## test.py 


from package.interest import interest
interest()
  
Output:

> interest() 
             
Principal Amount : 100
Interest Rate : 10
Enter Months : 10
Enter Years : 0
Interest Earned :  8.33
Total Amount(Principal + Interest) :  108.33Functioninterest()

This function are avalible our package.
I hope enjoy our package
Thank You
Package: interestRateInstrumentsLib
Why develop?Enhance modelling and computational complexity by moving from spreadsheets to a general-purpose programming language whose instructions can be run on a server if needed.Reduced complexity to be user-friendly but capturing most of the practical aspects of modelling interest rate instruments to be market consistent and realistic.How is it developed?This open-source library has taken reference from QuantLib, the De facto standard library for quantitative finance to maintain a clean object model and to allow for future expansibility.It is both unit-tested and integration-tested.How to use?pipinstallinterestRateInstrumentsLibHow to contribute?Please submit pull request or contact author if a bug is found. It would be easy to follow if a test case is provided with it.More instruments and tools shall be added in future. For general issues, flag them in the issues tab.IllustrationsRefer to the examples.ipynb.
Package: interfacecases
interface_testcases接口多参数测试用例生成功能测试正常值paris-2组合的用例异常值用例不传必选参数用例不传全部可选参数的用例使用指南安装方法1. pip安装：pip install -i  --upgrade方法2. 下载源代码：git clonegit@github.com:caiyizhang/interface_testcases.git$ cd interface_testcases
$ pip install .示例# 传入参数一行代表一个参数，一个参数有3个属性。# 前两个是列表，最后一个是布尔类型。分别是正常值、异常值和是否必选参数params=[[[1,2],[0,3],False],[[-1,-2],[0,-3],True],[[-3,3],[-2,4],False]]forcaseinInterfaceTestcases(params):print(case)# 结合pytest@pytest.mark.parametrize(['param_1','param_2','param_3','normal_flag'],[value_listforvalue_listinInterfaceTestcases([[['1','10'],['0','7'],True],[["1",'10','100'],['0','101'],False],[[None,'',2161524184],['1'],False],[[None,'','1','11'],[0,'f2rewrawr'],False]])])deftest_1(self,param_1,param_2,param_3,normal_flag):params={'param_1':param_1,'param_2':param_2,'param_3':param_3}# params删除不传入的参数params={k:vfork,vinparams.items()ifv!='no_param'}ifnormal_flag=='normal':do_something_normal()elifnormal_flag=='abnormal':do_something_abnormal()else:pass
Package: interface-mixins
To create an Interface, pass it an interface name and a list of method
names. A class will be created which raises NotImplementedError for each
of the specified method names:AnInterface=Interface('AnInterface',['some','methods','the','interface','should','have'])To use this interface, simply inherit from it:classAClass(AnInterface):passWe also provide a way to create abstract test cases to help test objects
against the interface:AbstractTestAnInterface=AbstractInterfaceTest('AbstractTestAnInterface',['some','methods','the','interface','should','have'])These tests can be used by creating TestCases which inherit from from
the abstract test. This makes sure each method is implemented in AClass:fromunittestimportTestCaseclassTestAClass(AbstractTestAnInterface,TestCase):defsetUp(self):self.obj=AClass()It is also possible to create both the Interface and the
AbstractInterfaceTest at the same time. Also, you can create multiple
interfaces using the following idiom[1]:interfaces={'AnInterface':['some','methods','the','interface','should','have'],'AnotherInterface':['different','methods']}forinterface_name,methodsininterfaces.iteritems():interface_name+='Interface'globals()[interface_name]=Interface(interface_name,methods)test_name='AbstractTest'+interface_nameglobals()[test_name]=AbstractInterfaceTest(test_name,methods)[1]This isn’t very idiomatic Python. The useglobalsis ugly. This
is just an idiom for using this library. I’m not sure I like it.
Package: interface-proxy
interface-proxyA library that allows to import a module in one process (server) and use that module in another process (client).Use CasesYou want to run your application on one computer, but a python module shall be run on another computer (remote control).You need to use a library which has conflicting dependencies with other components used by your application (DLL Hell), or is only available for another bitness.Features and LimitationsThe python module in the server can be used transparently, as if the module was imported on the client.Only primitive attributes and function calls are supported. Instantiating objects or calling methods on objects does not work and requires a wrapper on the server.Objects can be referenced and these references can be passed to functions as arguments.Client can automatically start and terminate the server if running on the same machine.No Authentication support. When the computer can be reached from the outside, make sure your firewall only grants access from trusted sources.Only supports Windows as OSCommunication ProtocolsVia named pipes (client and server on the same machine).Via TCP connection.ExamplesYou can check the integration tests in the source code to find out how to use this library.
If you are interested in a collaborative project to evaluate the use of this library and implement it
in your application, feel free to contact us atcontact@sweep-me.net.