Saravanan666/pypi-org huggingface dataset:
Package: ibapi
A couple of things/definitions/conventions:alow level messageis some data prefixed with its sizeahigh level messageis a list of fields separated by the NULL
character; the fields are all strings; the message ID is the first
field, the come others whose number and semantics depend on the
message itselfarequestis a message from client to TWS/IBGW (IB Gateway)anansweris a message from TWS/IBGW to clientHow the code is organized:commmodule: has tools that know how to handle (eg: encode/decode)
low and high level messagesConnection: glorified socketReader: thread that uses Connection to read packets, transform to
low level messages and put in a QueueDecoder: knows how to take a low level message and decode into high
level messageClient:knows to send requestshas the message loop which takes low level messages from Queue and
uses Decoder to tranform into high level message with which it then
calls the corresponding Wrapper methodWrapper: class that needs to be subclassed by the user so that it
can get the incoming messagesThe info/data flow is:receiving:Connection.recv_msg()(which is essentially a socket) receives the
packetsusesConnection.*recvall_msgs()* which tries to combine
smaller packets into bigger ones based on some trivial heuristicReader.run()usesConnection.recv_msg()to get a packet and then
usescomm.read_msg()to try to make it a low level message. If
that can’t be done yet (size prefix says so) then it waits for more
packetsif a full low level message is received then it is placed in the
Queue (remember this is a standalone thread)the main thread runs theClient.run()loop which:gets a low level message from Queueusescomm.pyto translate into high level message (fields)usesDecoder.interpret()to act based on that messageDecoder.interpret()will translate the fields into function
parameters of the correct type and call with the
correct/corresponding method ofWrapperclasssending:Clientclass has methods that implement therequests. The user
will call those request methods with the needed parameters andClientwill send them to the TWS/IBGW.Implementation notes:theDecoderhas two ways of handling a message (esentially decoding
the fields)some message very neatly map to a function call; meaning that the
number of fields and order are the same as the method parameters.
For example: Wrapper.tickSize(). In this case a simple mapping is
made between the incoming msg id and the Wrapper method:IN.TICK_SIZE: HandleInfo(wrap=Wrapper.tickSize),other messages are more complex, depend on version number heavily
or need field massaging. In this case the incoming message id is
mapped to a processing function that will do all that and call the
Wrapper method at the end. For example:IN.TICK_PRICE: HandleInfo(proc=processTickPriceMsg),Instalation notes:you can use this to build a source distributionpython3 setup.py sdistyou can use this to build a wheelpython3 setup.py bdist_wheelyou can use this to install the wheelpython3 -m pip install –user –upgrade
dist/ibapi-9.75.1-py3-none-any.whl
Package: ibase
测试脚本自动生成项目用例写法通用参数本地执行执行&调用引用方式importsysfromos.pathimportabspath,join,dirnamesys.path.insert(0,join(abspath(dirname(__file__)),'../..'))..代表上级目录../..代表上上级目录以此类推代码环境python 3.*依赖包安装pip install requests目录结构将执行脚本与base.py脚本放于同一目录下沙盒环境脚本执行方式假设生成的文件名为：test_break_username.py那么执行方式为：python test_break_username.py任务项&进度任务名称产出功能是否完成测试基类base.py用于业务测试脚本继承完成获取数据类get_req_data.py用于获取请求数据完成json module解析类json_modify.py用于解析json module数据未完成触发生成测试脚本文件generate_script.py用来生成对应接口的测试脚本文件完成独立执行测试脚本命令-用于调用执行.py脚本完成组装TestSuite并生成测试报告数据generate_test_data.py用于生成批量测试结果，持久化数据未完成调用顺序generate_script.py 生成执行脚本执行test_this_is_the_path.py 脚本base.py 进入base类调用获取数据类，get_req_data.py json_modify.py执行base.py中的用例继续执行test_this_is_the_path.py中的用例返回测试结果可以通过命令行运行：模块、类、或者单个测试方法，具体的操作是如下：运行测试模块：python -m unittest test_module1 test_module2运行测试类：python -m unittest test_module.TestClass运行测试方法：python -m unittest test_module.TestClass.test_method通用模板执行方式返回结果组装调用上报接口方法检查一下新的assertEqual(a, b)a == bassertNotEqual(a, b)a != bassertTrue(x)bool(x) is TrueassertFalse(x)bool(x) is FalseassertIs(a, b)a is b2.7assertIsNot(a, b)a is not b2.7assertIsNone(x)x is None2.7assertIsNotNone(x)x is not None2.7assertIn(a, b)a in b2.7assertNotIn(a, b)a not in b2.7assertIsInstance(a, b)isinstance(a, b)2.7assertNotIsInstance(a, b)not isinstance(a, b)2.7更具体的方法检查一下新的assertAlmostEqual(a, b)round(a-b, 7) == 0assertNotAlmostEqual(a, b)round(a-b, 7) != 0assertGreater(a, b)a > b2.7assertGreaterEqual(a, b)a >= b2.7assertLess(a, b)a < b2.7assertLessEqual(a, b)a <= b2.7assertRegexpMatches(s, r)r.search(s)2.7assertNotRegexpMatches(s, r)not r.search(s)2.7assertItemsEqual(a, b)排序（a）==排序（b）并使用不可用的objs2.7assertDictContainsSubset(a, b)所有在键/值对一个在存在b2.7
Package: ibb
Interactive BramBoxIPython widgets for visualizingbramboxannotation and detection dataframes on their images.
These widgets help with doing computer vision research in IPython Notebooks.Installation>pipinstallibbWidget ListCheck out thedocumentationfor more information!ImageViewer: Image list browser.BramboxViewer: Brambox dataset browser. Browse through your annotations or detections for visual inspection.PatchViewer: Brambox dataset browser, but cut images in smaller patches (with overlap) for easier visualisation.CutoutViewer: Brambox dataset browser, but view individual annotations or detections as cutouts of the image.
Package: ibbycounts
pycountsCalculate word counts in a text file!Installation$pipinstallpycountsUsagepycountscan be used to count words in a text file and plot results
as follows:frompycounts.pycountsimportcount_wordsfrompycounts.plottingimportplot_wordsimportmatplotlib.pyplotaspltfile_path="test.txt"# path to your filecounts=count_words(file_path)fig=plot_words(counts,n=10)plt.show()ContributingInterested in contributing? Check out the contributing guidelines.
Please note that this project is released with a Code of Conduct.
By contributing to this project, you agree to abide by its terms.Licensepycountswas created by Tomas Beuzen. It is licensed under the terms
of the MIT license.Creditspycountswas created withcookiecutterand
thepy-pkgs-cookiecuttertemplate.
Package: ibcdfo
IBCDFOInterpolation-Based Composite Derivative-Free OptimizationThis page contains source code for interpolation-based optimization methods for
composite derivative-free optimization.Relevant references include:J. Larson and M. Menickelly. Structure-aware methods for expensive
derivative-free nonsmooth composite optimization.arXiv:2207.08264. 2022.LINKJ. Larson, M. Menickelly, and B. Zhou. Manifold sampling for optimizing
nonsmooth nonconvex compositions.SIAM Journal on Optimization.
31(4):2638–2664, 2021DOIK. A. Khan, J. Larson, and S. M. Wild. Manifold sampling for optimization of
nonconvex functions that are piecewise linear compositions of smooth
components.SIAM Journal on Optimization28(4):3001--3024, 2018,DOIS. M. Wild. POUNDERS in TAO: Solving Derivative-Free Nonlinear
Least-Squares Problems with POUNDERS.Advances and Trends in Optimization with
Engineering Applications. SIAM. 529--539, 2017.DOIJ. Larson, M. Menickelly, and S. M. Wild. Manifold sampling for l1 nonconvex
optimization.SIAM Journal on Optimization. 26(4):2540–2563, 2016.DOIContributing to IBCDFOContributions are welcome in a variety of forms; please seeCONTRIBUTING.Installation & UpdatingNote that this repository depends on one or more submodules.  After cloning
this repository, from within the clone please rungit submodule update --init --recursiveto fetch all files contained in the submodules.  This must be done before
attempting to use the code in the clone.  Issuing the commandgit pullwill
update the repository, but not the submodules.  To update the clone and all its
submodules simultaneously, rungit pull --recurse-submodules.Theibcdfopython package can be installed by setting up a terminal with the
target python and pip pair and executing> pushd ibcdfo_pypkg
> python setup.py sdist
> pip install dist/ibcdfo-<version>.tar.gz
> popdwhere<version>can be determined by looking at the output of thesdistcommand.  The installation can be partially tested by executing> python
>>> import ibcdfo
>>> ibcdfo.__version__
<version>where the output<version>should be identical to the value used during
installation.LicenseAll code included in IBCDFO is open source, with the particular form of license contained in the top-level
subdirectories.  If such a subdirectory does not contain a LICENSE file, then it is automatically licensed
as described in the otherwise encompassing IBCDFOLICENSE.ResourcesTo seek support or report issues, e-mail:poptus@mcs.anl.gov
Package: ib-cp-gateway
IB Client Portal Gateway APIThis is a simple IB Client Portal Gateway RESTFul api, IB Client Portal Gateway can be run on Raspberry Pi or any other ARM machine(IB Gateway and TWS are not able to run on ARM). If the api get error, it will return None rather than throw exception.Installpip install ib-cp-gatewayorpip install --upgrade ib-cp-gatewayUsageLogin/Authentication
You need go login throughhttps://localhost:5000before using this api. To run the IB Client Portal Gateway, you can use docker.
For ARM architecture,docker run -d -it --restart=always --name cpgateway-docker -p 5000:5000 hurinhu/ib-clientportal-gateway:RPI4For others,docker run -d -it --restart=always --name cpgateway-docker -p 5000:5000 hurinhu/ib-clientportal-gatewayInitializingfrom IB import API
ib = API(url="https://localhost:5000", ssl=False)Check versionprint(ib.getVersion())Check validate sessionib.get_validate()Ping server to keep aliveib.ping_server()Get gateway statusib.get_status()Re authenticationib.reauthenticate()Logoutib.logout()Get future conidsib.get_future_conids(symbol)Get stock conidsib.get_stock_conids(symbol,contract_filters={"isUS": True})Find conids detailsib.find_conids(conids)Get history dataib.get_history(conid, period='1w',bar='id',outsideRth=False)orib.get_history_beta(conid, period='1w',bar='id',outsideRth=False)Get snapshot dataib.get_snapshot(conids,since,fields)orib.get_snapshot_beta(conids,fields)Get account informationib.get_accounts()Get account metaib.get_account_meta(accountId)Get account summaryib.get_account_summary(accountId)Get account PDTib.get_account_PDT()Get account ledger (balance information)ib.get_account_ledger(account)Get account tradesib.get_trades()Get orders (filters: cancelled, filled, submitted)ib.get_orders(filters=[])orib.get_order_by_id(orderId)Create order (side: BUY, SELL)ib.create_order(accountId, conid, price, quantity, side, orderType='LMT', outsideRTH=True, tif='GTC', useAdaptive=True, isCcyConv=False)Cancel orderib.cancel_order(accountId, orderId)Exampleorder = ib.create_order('UXXXXX', 72539702, 41.20, 200, 'BUY', 'LMT', True, 'GTC', True, False)
orderId = order['order_id']
ib.cancel_order('UXXXXX',orderId)
orders = ib.get_orders()
orders[0]['status'] # this is the last order status, it should be 'Cancelled' after cancel order
Package: ibd-dendrogram
ibd-dendrogram:A python module to help users create a distance matrix and construct a dendrogram using Identity by Descent segments as a distance marker. The default distance is calculated as 1/(shared ibd segment length). Documentation explaining the api can be found here:ibd-dendrogram docsThis module has four accessible methods: make_distance_matrix, record_matrix, generate_dendrogram, draw_dendrogram.
Package: ib-dl
[![PyPI version](https://badge.fury.io/py/ib_dl.svg)](https://badge.fury.io/py/ib_dl)
[![Build Status](https://api.travis-ci.org/tibkiss/ib_dl.svg?branch=master)](https://travis-ci.org/tibkiss/ib_dl)
[![Docker Build Status](https://img.shields.io/docker/build/tibkiss/ib_dl.svg)](https://hub.docker.com/r/tibkiss/ib_dl/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)# Historical market data downloader
Utility to download historical market data from Interactive Brokers.
The heavy lifting is done by [ib_insync](https://github.com/erdewit/ib_insync) project.## RequirementsPython 3.6[ib_insync](https://github.com/erdewit/ib_insync)[IB’s TWS API](http://interactivebrokers.github.io)## UsageDownload and install IB TWS APIInstall ib-dl with pip:pip install ib_dlStart TWS, enable API accessDownload data:ib-dl SPY –duration “1 M” –bar-size “1 min” –tws-uri localhost:7492:999For further details see the help screen:ib-dl –help## Docker
Docker images are provided under [tibkiss/ib_dl](https://hub.docker.com/r/tibkiss/ib_dl/)## License
[Apache License Version 2.0](http://www.apache.org/licenses/)
Package: ibdx
ibdxUse casebackup/restore mysql InnoDB tables in an easy waySetupFrom pypipip install ibdx
or
pipx install ibdx (recommended)From sourcegit clone https://github.com/Grvzard/ibdx.git
cd ibdx
pip install .Usageibdx --helpTake care:There seems to be an incompatibility between mysql and mariadb.
Make sure that ibdx works between the same db system.ExampleLet's say we have following tables:[ logs_2023_01, logs_2023_02, logs_2023_03, logs_2023_04 ]ibdx backup -u user -p password -h localhost --db test1 --tables logs_2023_% -f logs.2023.zip [--datadir /mysql/datadir]ibdx restore -f logs.2023.zip -u user -p password -h localhost --db test1 --tables logs_2023_% [--datadir /mysql/datadir]When the mysql server is running in Docker, the--datadiroption is required.Script Workflowbackup:mysql>FLUSH TABLES test1 FOR EXPORT;(tables are read locked)backup the .ibd (and .cfg) files.mysql>UNLOCK TABLES;restore:(optional) mysql>CREATE TABLE test1;mysql>ALTER TABLE test1 DISCARD TABLESPACE;copy the .ibd (and .cfg) files to the mysql-server's datadirmysql>ALTER TABLE test1 IMPORT TABLESPACE;ReferenceMariaDB Knowledge Base > InnoDB File-Per-Table Tablespaces
Package: ibeacon-ble
iBeacon BLEParser for iBeacon devicesInstallationInstall this via pip (or your favourite package manager):pip install ibeacon-bleContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCookiecutterand thebrowniebroke/cookiecutter-pypackageproject template.
Package: ibeamer
ibeamerA simple .css LaTeX Beamer Environment Extension for Jupyter Lab/NotebooksRequirementsJupyterLab >= 4.0.0InstallTo install the extension, execute:pipinstallibeamerUninstallTo remove the extension, execute:pipuninstallibeamerContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the ibeamer directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstallibeamerIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedibeamerwithin that folder.Packaging the extensionSeeRELEASE
Package: ibearychat
ibearychatTools package for bearychat.installpip install ibearychatdemofrom ibearychat import bearychat_incoming

webhook_url = "your_incoming_url"

bearychat_incoming(
    webhook_url,
    pretext="This is pretext.",
    title="This is title.",
    url="https://www.teachmyself.cn.",
    color="#70cc29",
    text_list=["This is the first line.", "This is the second line"],
    debug=True
)

# or

payload = {
    "pretext"   : "This is pretext.",
    "title"     : "This is title.",
    "url"       : "This is title.",
    "color"     : "#70cc29",
    "text"      : ["This is the first line.", "This is the second line"],
}
bearychat_incoming(webhook_url, payload=payload, debug=True)
Package: ibei
ibei - Calculator for incomplete Bose-Einstein integralThis README is a quickstart. See thefull documentationfor more details.ScopeTheibeipython module implements a calculation of the
upper-incomplete Bose-Einstein integral which is given in terms of
thepolylogarithmfunction and described bySmith.InstallationThis package is installable viapip.pipinstallibeiAlternatively, download the source, installhatch, and build.gitclonegit@github.com:jrsmith3/ibei.git
pipinstallhatch
hatchbuild
pipinstalldist/ibei-1.0.6.tar.gz# Or whatever is the latest version in that directory.ExampleCalculate the number of above-bandgap photons from Si at 300K.>>>importibei>>>bandgap=1.1>>>bei=ibei.BEI(order=2,energy_bound=bandgap,temperature=300.,chemical_potential=0.)<Quantity10549124.095383811/(m2s)>LicenseMITDocumentationFull documenation can be found in thedocdirectory, at the
officialdocumentation page, and
within the module's docstrings.
Package: ibex-1d
IBEX 1D : Image 1D Barcode EXtractorDetect 1D Barcode(s) in Photographs, Extract & Straighten them!APython 3command line script to detect & extract barcode(s) in images, usingOpenCVandNumPy.InstallVia PIPpip3installibex-1dAnd for update to latest version use:pip3install--upgradeibex-1dVia Source CodeDownload thelatest releaseor clone/download this repository.UsageIf you installed the package (viapip3) you can either import the package in your project:importibex_1dimage_path="/Users/bensouchet/Desktop/IMG_3212.png"settings=ibex_1d.Settings()settings.use_adaptive_threshold=Truebarcode_extract=ibex_1d.ImageBarcodeExtract1D(settings)results=barcode_extract.find_barcodes([image_path])Or use it as a script directly in you terminal:ibex_1d-i~/Desktop/IMG_3212.pngIf you download a release or clone the repository, to use it as a script:python3ibex_1d.py-i~/Desktop/IMG_3212.pngResultsIf you calledIBEX 1Dvia your terminal (as a script), the barcode images extracted will be saved into a newly created folder inside a folder./results/, if nothing has been generated please check the log(s) in your terminal.Otherwise if you called the functionfind_barcodesyou will received a python list ofibex_1d.Resultinstances, this class store info about the execution (like execution status, message, debug steps) and the barcode(s) image(s) extracted for each image path passed to the function.Multiple imagesYou can pass one or more images/photographs to the script like this:ibex_1d-i~/Desktop/IMG_3205.png./object_12.jpg~/Documents/photo_0345.jpegInside the corresponding result sub-folder, extracted barcodes will be namedbarcode_001.png,barcode_002.png,barcode_003.png, ...Incorrect result ?If the barcode hasn't been extracted (or the resulting barcode image isn't good) this can be due to the OTSU threshold method.
You can try using the script with the argument-a(or--adaptive-threshold):ibex_1d-i~/Desktop/IMG_3205.png-aThis threshold method isn't set as default because it's slower than OTSU.DebugYou can visualize some steps of the sheet detection.
For the script call you need to add the argument-dor--debugto the command:ibex_1d-i~/Documents/product_03.jpeg-dif you imported the package, you need to enable thesave_detection_stepsin the settings instance like this:settings=Settings()settings.save_detection_steps=Truebarcode_extract=ImageBarcodeExtract1D(settings)results=barcode_extract.find_barcodes(images_paths)This will add debug/steps images into the result sub-folders.Errors / WarningsIn case of an error you should see a formatted log message in your terminal telling you exactly what is the issue.
If the script crash or something don't work you can open an issuehere.Author / MaintainerIBEX 1Dhas been created and is currently maintained byBen Souchet.LicensesThe code present in this repository is underMIT license.
Package: ibf
Interactive BrainFuckAn interactive BrainFuck interpreter written in Bython. Why not?To install from source, you must first build the Bython source into a Python package:$makebuildThen, you move to thepythonfolder, and run the setup script:$cdpython
$sudo-Hpip3install.After installation, you run an interactive session with theibfcommand:$ ibf 
Interactive BrainFuck - ibf v0.1

ibf is licensed under the permissive MIT license. Full license and
copyright information is available at the project's GitHub repository.

[Input] +[------->++<]>-.------------.--[--->+<]>--.+.+++[->+++<]>.+++++++++++++.[-->+++++<]>+++.[-->+++++++<]>.++.---.------------.-[--->+<]>----.+++[->+++<]>++.--[--->+<]>--.+.-----------.+++++.-------------.--[--->+<]>-.-----.+++.>++++++++++.
master procrastinatorEverything you input is interpreted as BrainFuck code, except for the following
reserved keywords:CommandDescriptiontapePrints the current status of the tape (data cells), with the current cell in boldposPrints the current position on the tapequitQuits the sessionrunRun code from a fileYou can also run prewritten BrainFuck code, either as a standalone program, or
in an interactive session:$ ibf test.bf
Hello World!
$ ibf 
Interactive BrainFuck - ibf v0.1

ibf is licensed under the permissive MIT license. Full license and
copyright information is available at the project's GitHub repository.

[Input] run test.bf
Hello World!Theruncommand always runs programsinline, ie the code is run on the
current tape and with the current tape position as starting position. Thus,
after running a program you can inspect the final state of the tape:[Input] tape
 0 1  2   3  4  5  6 7 8
 0 0 72 100 87 33 10 0 0For more help, typeibf -hor view the manual page by runningman ibf.
Package: ibge-api
IBGE APISimple library to get City information from IBGEInstallationpip install ibge-apiGet startedHow to get data from a city with this lib:fromibge_apiimportIbgeAPI# Instantiate a IbgeAPI objectibge=IbgeAPI('05513970')# Call the get_city_information methodcity_data=ibge.get_city_information()# Call the city_data propertycity_data=ibge.city_data