Saravanan666/pypi-org huggingface dataset:
Package: odutil
odutilObject Detection Utilsanalysisfromodutilimportanalysisanalysis.parse_anno(path_anno):"""Parse an annotation file into a dict.Args:path_anno: The path of the annotation file you wanna parse.Returns:A dict mapping filename, size and objects in the annotation to thecorresponding data fetched.For example:{'filename': 'image.jpg','size': {'width': '1621', 'height': '1216', 'depth': '3'},'object': [{'name': 'class1', 'xmin': '904', 'ymin': '674', 'xmax': '926', 'ymax': '695'},{'name': 'class2', 'xmin': '972', 'ymin': '693', 'xmax': '993', 'ymax': '713'}]}"""analysis.parse_annos(path_anno_folder):"""Parse a list of annotation files into a list of dicts.Args:path_anno: The directory of the annotation files you wanna parse.Returns:A dict of dicts. Each of them mapping annotation file name("annoname")to the corresponding annotation dict fetched by parse_anno()."""analysis.check_match(path_1,path_2):"""Check if the file names in the folders match each other.Param:path_1: Path of a folder.path_2: Path of another folder.Return:True if match else False."""analysis.gen_label(path_anno,path_names,path_out):"""Generate label txt from annotation.Args:path_anno: Path of the annotation file.path_names: Path of the .names file.path_out: Path of the output .txt file.Returns:None"""analysis.gen_labels(path_anno_folder,path_names,path_out):"""Generate label txt from a list of annotations.Args:path_anno_folder: Path of the annotation files folder.path_names: Path of the .names file.path_out: Path of the output .txt file.Returns:None"""analysis.bbox_distribution(path_anno_folder,verbose=0):"""Analysis the bbox distribution by a list of annotation files.Args:path_anno_folder: Path of the annotation files folder.Returns：A dict contains the result."""visualfromodutilimportvisualvisual.draw_bbox(img,*args):"""Draw the bounding box on an image.Args:img: An image instance obtained by cv2.imread.args: {cls_, x, y, w, h, color_bbox, color_text}.cls_ is object class name.x, y are the coordinates of the bbox top-left corner.w, h are the weight and height of the bbox.color_bbox is the (B, G, R) color for bbox.color_bbox is the (B, G, R) color for text.Returns:The img with bbox on it."""visual.draw_anno(path_img,path_anno,path_out,verbose=0):"""Draw the bounding box of on an image by its annotation file.Args:path_img: Path of the image.path_anno: Path of the corresponding annotation file.path_out: Path of the output folder.Return:None"""visual.draw_annos(path_img_folder,path_anno_folder,path_out,verbose=0):"""Draw the bounding box of on a list of images by their annotation files.Args:path_img_folder: Path of the images folder.path_anno_folder: Path of the corresponding annotation folder.path_out: Path of the output folder.Return:None"""visual.drwa_result(path_result,path_img_folder,path_out,verbose=0):"""Draw the bounding box by a result file.The result file format is as follow:...... /xxx/xxx/xxx.jpg: ............ /xxx/xxx/xxx.jpg: ......class_name: 75%	(left_x:  626   top_y:  961   width:   50   height:   18)class_name: 84%	(left_x:  626   top_y:  943   width:   47   height:   20)"""
Package: odvc
odvcOcean Dimensionless Vertical CoordinatesCAVEAT: this package is not ready for production use!Theformulas.pyworks also as a guide on how to code the CF Ocean Dimensionless Vertical Coordinates in Python,
whileutils.pycontains a few handy functions to use the formulas with dask arrays.For more information on how to integrate this into your project see the iris package vertical coordinates.
Package: odysseusai
OverviewOdysseusAI is an open-source library is designed to facilitate the logging of input and output interactions with the LLMs in production locally. It keeps track of each interaction, saving them in a structured JSON format. The library focuses on modularity, ease of use, and robust data tracking.InstallationTo install, simply download the library and include it in your project.pipinstallodysseusaiUsageimportodysseusaiodysseusai.log(project_name,input_llm,output_llm,tracking_dir='',user_id='',session_id='')LicenseMIT
Package: odyssey
odyssey is a cross-platform cross-architecture cross-scm workspace management tool. It is designed from the ground up to support multi-repository workflows, and is easily extended to work with any scm or package management tool out there. Although odyssey is written in python, it will work for multi-repository projects in any programming language, even ones that use multiple languages.Even if it will take ten years, it will have been worth it.Problem Spaceodyssey is the answer to the question “How can my project use multiple types of version control, where different types of files can be stored in the system most approproiate them?”A practical use case from real-world experience: In the video game industry, projects have large amounts of both code and binary files. Projects can have tens, hundreds, or thousands of GBs of development assets and hundreds of thousands or even millions of lines of code. Most teams at present choose between git and perforce. This leads to all kinds of problems in either case. odyssey is built so that teams can choose to use git for their source files (code, documentation, scripts, asset manifests, etc.) and use perforce for their asset files (images, sounds, models, animations, etc.)GoalsUsefulness: odyssey should be useful to a wide variety of teams in a wide variety of industries. Both open source projects and enterprise projects should find something they love here.Gradual Adoption: odyssey should not force an all or nothing scenario where only new teams can use it. Many teams have decades of effort invested in their existing setup, and they need to be able to adopt odyssey usage gradually for it to stand a chace of success.Reproducibility: odyssey should make it easier to reproduce workflows for both developer workstations and build pipelines.Speed: odyssey should execute as fast as possible, but no faster. You’ll know it when you see it.Related ToolsYarn: Yarn is a package manager that doubles down as project manager. Whether you work on one-shot projects or large monorepos, as a hobbyist or an enterprise user, we’ve got you covered.Yarn has excellent design around reproducibility, and consequently is very useful to teams with a lot of investment on the line. Unfortunately yarn seems only designed for npm and git packages, and primarily supports monorepos.meta: meta is a tool for managing multi-project systems and libraries. It answers the conundrum of choosing between a mono repo or many repos by saying “both”, with a meta repo!meta seems really useful at the outset. It allows you to create a meta-repo, which allows sharing of workspaces. This is an essential feature. meta also has support for plugins which can extend its functionality in many ways. Unfortunately, at time of writing meta-repos are not recursive, meta itself cannot be distributed without node and npm, and the current meta design doesn’t seem to leave room for perforce sub-repos.
Package: odyssey-momentum
Odyssey MomentumPython library to interact with the Odyssey momentum platform.:warning:Work in progress, API of this library has not been stablized.Table of ContentsInstallationUsageLicenseInstallationPrerequisitesPython 3.10 or 3.11x86_64 platform (for now, a c extension is used, not build for other platforms yet)pip install --pre odyssey-momentum(pre, since it is still in development)UsageThe python package contains 3 parts:api- To access the JSON, REST-like API.posbus- To connect throurh websocket and receive real times updates.bot- A higher level library build on top of these, providing functionality to build bots.Library is build around python async/await functionality, particulary async context managers and async generators.
So needs to be used with eitherasyncioortrio.ExampleRun from an asyncio shell:python -m asyncioExample API call:fromodyssey_momentumimportapi,posbusurl="https://dev.odyssey.ninja"auth=awaitposbus.authenticate_guest(url,cache=False)client=api.API(url,auth["token"])me=awaitclient.current_user()print(me.name)Example websocket connection:fromodyssey_momentumimportposbusurl="https://dev.odyssey.ninja"auth=awaitposbus.authenticate_guest(url,cache=False)asyncwithposbus.connect(url,auth)as(send,stream):awaitsend(posbus.teleport_request("00000000-0000-8000-8000-000000000002"))asyncformsginstream:print(msg)Seeexamplesdirectory for moreDevelopmentProject is managed withhatch.To get a shell for development:hatch shellRun tests:hatch run testRun code lint:hatch run lint:allhatch build --hooks-onlyBuild packages (outputs indistdirectory:hatch buildLicenseodyssey-momentumis distributed under the terms of theMITlicense.
Package: odyssey-posbus-client
Python clientPython library to connect to Momentum websocket backend.The Momentum backend exposes a websocket with a custom binary protocol. This library is for client to connect and talk the custom protocol.** This a low level library wrapping the Go client code, not for direct usage. **RequirementsPython 3.10 or 3.11Currently Linux x86_64 platform, else you have to build the client library yourself.To build:MakeGo 1.20+HatchBuildFor a local development build, run make from the project top level dir:make pyThis will generate a python package insidepy/odyssey_posbus_clientand a wheel package inpy/dist.DistributeTo build official wheel packages,cibuildwheelis required.make python_wheelsReleaseReleases are done automatically based on git tags. Create a git tag likepy@1.2.3to trigger CI/CD workflow.ImplementationThis auto generates python bindings for the Go client code. By first generating a C library with cgo and then generating python bindings for that.
Because of limitations of the generation tool a custom Go package is used to create a simplified interface.
Package: oead
oeadis a C++ library for common file formats that are used in modern first-party Nintendo EAD (now EPD) titles.Python bindings for 3.6+ are also available.FeaturesCurrently, oead only handles very common formats that are extensively used in recent games such asBreath of the WildandSuper Mario Odyssey.AAMP(binary parameter archive): Only version 2 is supported.BYML(binary YAML): Versions 1, 2, 3, and 4 are supported.SARC(archive)Yaz0(compression algorithm)oead also supports a recent Grezzo format that is used inLink’s Awakening (Switch):gsheet(Grezzo datasheet)Getting startedTo install the Python module, simply run:pip install oeadThis will download and install a precompiled version of oead for the following platforms:Windows (x86-64 / 64-bit)Recent Linux distributions (x86-64, glibc and musl)macOS 10.14 / 10.15 (x86-64)The following versions of Python are supported:CPython 3.6 to 3.11PyPy3.7 to 3.9If you are using any other platform, you must build oead from source (refer to the next section).WarningWindows users must ensure that they have thelatest Visual C++ 2019 Redistributableinstalled.For more information, refer to thedocumentation.Building from sourceBuilding oead from source requires:CMake 3.12+A compiler that supports C++17Everything needed to build libyamlFirst, clone the repository then enter the oead directory and rungit submodule update--init--recursive.Building the Python moduleTo install the module, runpip install-e.. This requires the following Python modules to be installed: setuptools, wheelIf you just want to build the Python module from source without installing it, runpython setup.py bdist_wheel.C++ usageLinking to theoeadtarget is sufficient to use the library.ContributingIssue tracker:https://github.com/zeldamods/oead/issuesSource code:https://github.com/zeldamods/oeadThis project is licensed under the GPLv2+ license.
Package: oec
Python Wrapper for The Observatory for Economic Complexity APILanguage:Python 3Data Source:Observatory for Economic Complexity (OEC)StatusAs of June 2021, the OEC has migrated to a new website atoec.world, and this new site no longer hosts a free API. There is a legacy version of the site hosted atlegacy.oec.world, and this library has been updated to refer to that legacy version.InstallationpipinstalloecUsageGet data from OECimportoec# Set parameters in accordance with API documentationparams={'classification':'hs92','trade_flow':'export','year':2015,'origin':'egy','destination':'all','product':'show'}list_of_countries=oec.get_countries()list_of_products=oec.get_products(params['classification'])list_of_exports=oec.get_trade(**params)These functions each return lists of dictionaries. Each of these dictionaries represents a "row" of data (e.g. one country or product). The fields of these dictionaries represent "columns" of data. This is easier to visualize if you output your data to a CSV file.Export to CSVoec.data_to_csv(list_of_dictionaries,'results.csv')These CSV files can then be opened up in the spreadsheet editor of your choice for further analysis.Generate links to visualizations>>>oec.url_visual(**params)'https://legacy.oec.world/en/visualize/tree_map/hs92/export/egy/all/show/2015/'>>>oec.embed_visual(**params)'<iframe src="https://legacy.oec.world/en/visualize/embed/tree_map/hs92/export/egy/all/show/2015/" width=930 height=400></iframe>'>>>oec.url_visual(**params,language='fr')'https://legacy.oec.world/fr/visualize/tree_map/hs92/export/egy/all/show/2015/'DocumentationFunction-level documentation and language list:seehelp.txtor runpython -m pydoc oecOEC API documentationData attributes and field namesAcknowledgementsCredits toAlex Simoesfor the development ofThe Observatory for Economic Complexity. This module was developed byYahia Ali, who is not affiliated in any way with the OEC team.
Package: oe_daemonutils
Utils to read and parse a feed.0.9.1 (26-09-2018)error handling HTTPError (#35)0.9.0 (25-07-2017)add SQLAlchemy engine that keeps retrying the connection0.8.0 (07-06-2017)use multiprocessing to improve performance and memory usage0.7.4 (23-05-2017)improve logging0.7.3 (10-05-2017)allow HTTP POST when saving (#23)proces_uri setting should be read as a list in EntryProcessor (#24)0.7.2 (25-04-2017)make notifier_class optional in DaemonController (#20)0.7.1 (12-04-2017)missing notification data0.7.0 (12-04-2017)refactor daemon (improve architecture)fix system token issue0.6.4 (30-03-2017)fix attribute error in feed parserAccept header feed0.6.3 (14-03-2017)fix system token call0.6.2 (14-03-2017)fix error handling0.6.1 (13-03-2017)typos, rename and missing data0.6.0 (13-03-2017)use of command pattren with daemon circuit breaker0.5.0 (09-03-2017)robust circuit breaker daemon #130.4.0 (14-02-2017)More dossier utils.0.3.1 (01-12-2016)Fix bug: catching exceptions of the daemon.0.3.0 (01-12-2016)Make the daemon more robust by retrying a given number of times with a given waiting time when it fails.0.2.2 (17-10-2016)Catchfeedparser.parseno status.0.2.1 (07-10-2016)No formatting of the logging errors of thefeedparser.parseoperation.0.2.0 (09-08-2016)PEP8 complianceMake it possible to have a feed endpoints set from something else than the default setting0.1.5 (08-08-2016)Move process_uri check0.1.4 (04-08-2016)Add dossier serviceAdd processor0.1.3 (27-07-2016)Exit daemon when parsing feed fails0.1.2 (27-07-2016)Bug fix: initialization daemon_manager0.1.1 (25-07-2016)Remove oeauth requirement0.1.0 (25-07-2016)Initial version
Package: oedes
This is work in progress. Seedoc/for documentation, andexamples/for examples of use.InstallationpipinstalloedesIt is recommended to run test suite after installingpython-c"import oedes; oedes.test()"Example simulationThis builds and solves a model of abrupt PN junction:importoedesfromoedesimportmodels# Define doping profiledefdoping_profile(mesh,ctx,eq):Nd=ctx.param(eq,'Nd')Na=ctx.param(eq,'Na')returnoedes.ad.where(mesh.x<mesh.length*0.5,Nd,-Na)# Define device modelpoisson=models.PoissonEquation()temperature=models.ConstTemperature()electron=models.BandTransport(poisson=poisson,name='electron',z=-1,thermal=temperature)hole=models.BandTransport(poisson=poisson,name='hole',z=1,thermal=temperature)doping=models.FixedCharge(poisson,density=doping_profile)semiconductor=models.Electroneutrality([electron,hole,doping],name='semiconductor')recombination=models.DirectRecombination(semiconductor)anode=models.OhmicContact(poisson,semiconductor,'electrode0')cathode=models.OhmicContact(poisson,semiconductor,'electrode1')equations=[poisson,temperature,electron,hole,doping,semiconductor,anode,cathode,recombination]# Define device parametersparams={'T':300,'epsilon_r':12,'Na':1e24,'Nd':1e24,'hole.mu':1,'electron.mu':1,'hole.energy':-1.1,'electron.energy':0,'electrode0.voltage':0,'electrode1.voltage':0,'hole.N0':1e27,'electron.N0':1e27,'beta':1e-9}# Discretize and solve discrete modelmesh=oedes.fvm.mesh1d(100e-9)model=oedes.fvm.discretize(equations,mesh)c=oedes.context(model)c.solve(params)# Plot bands and quasi Fermi potentialsimportmatplotlib.pylabaspltp=c.mpl(plt.gcf(),plt.gca())p.plot(['electron.Eband'],label='$E_c$')p.plot(['hole.Eband'],label='$E_v$')p.plot(['electron.Ef'],linestyle='--',label='$E_{Fn}$')p.plot(['hole.Ef'],linestyle='-.',label='$E_{Fp}$')p.apply_settings({'xunit':'n','xlabel':'nm'})p.ax.legend(loc=0,frameon=False)plt.show()
Package: oedialect
AnSQLAlchemyDialectfor theOEPSQLAlchemy internally uses so called "dialects" to provide a consistent
interface to different database drivers. Theoedialectsupplies your
SQLAlchemy installation with a dialect using the REST-API of theOpen
Energy Platform (OEP). In short, theoedialectallows you to use
SQLAlchemy to down- and upload data to an OEP instance.License / CopyrightThis repository is licensed underGNU Affero General Public License v3.0 (AGPL-3.0)Installationpip install oedialectOn MS-Windows make sure to install a version ofshapelyfirst.conda install shapely -c conda-forgeTutorialsYou can find tutorials and exampleshere.TestingTo run the tests locally, first install thetoxtest environmentpip install toxYou need to setup a local instance of theOpen Energy PlatformSet your connection token that you got from your local OEP instanceLOCAL_OEP_TOKEN=<your_token>Finally, runtox
Package: oedisi
Oedisioedisi(OpenEDI - System Integration) is an orchestration interface for HELICS power simulations.connects algorithms and data in a co-simulation framework HELICS by instantiating new components with the right HELICS configurationruns simulations (including with debug features) using theoedisiCLI tool.provides commonPydanticmodels for communications between power system algorithms and data inoedisi.typesDocumentationMain DocsGetting Started(with example)ExampleThe repositorysgidal-examplecontains a basic example includingOpenDSS federatemeasuring federateweighted least squares state estimator federaterecording federates
Package: oeis-api
oeisInterface toOEISInstallationpipinstalloeis-apiGo to thePyPipage for more details.DocumentationGo tobhgomes.github.io/oeisfor documentation.Install Anaconda Testing EnvironmentFor quick installation:condacreateenv-fenvironment.ymlsourceactivateoeisFor a more customized environment replace{ }with your choices and run:condacreate-n{environment_name}python={python_version}pip
condaenvupdate-n{environment_name}-fenvironment.ymlsourceactivate{environment_name}or edit theenvironment.ymlfile to your choosing.Copyright (c) 2019 Brandon Gomes
Package: oeis-cli
# oeis-cli
A command line interface for The On-Line Encyclopedia of Integer Sequences.## Installation` $ pip install oeis_cli `or, if you’re feeling adventurous:` $ git clonehttps://github.com/dfbenjamin/oeis_cli/$ cd oeis_cli $ python3 setup.py install `## UsageUse the commandoeis. For example:` $ oeis 2 3 5 7 A000040: The prime numbers. 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89 `Can also add the–unorderedtag, which does the equivalent of searching with spaces instead of commas on OEIS:` $ oeis--unordered256 128 4 2048 A000079: Powers of 2: a(n) = 2^n. 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536 `Use–nameor-nto search by name:` $ oeis--namefibonacci A000045: Fibonacci numbers: F(n) =F(n-1)+F(n-2)with F(0) = 0 and F(1) = 1. 0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765 `## About OEISThe author is not affiliated with OEIS in any way. For more information on the website, visithttps://oeis.org/The OEIS is made available under the [Creative Commons Attribution Non-Commercial 3.0 license](https://creativecommons.org/licenses/by-nc/3.0/).
Package: oeispy
oeispySimple Python library for OEIS ( Online Encyclopedia of Integer Sequences )List of methods with examples :Query OEISimportoeispyasopres=op.resultEois('1,9,15,19')Best Resultop.topResult(res)Count Resultsop.countResult(res)Get Numberop.getNumber(res[0])Get Idop.getId(res[0])Get Dataop.getData(res[0])Get Nameop.getName(res[0])Get Commentop.getComment(res[0])Get Linkop.getLink(res[0])Get Exampleop.getExample(res[0])Similarly , getAuthor(..), getTime(..), getCreated(..), getFormula(..), getProgram(..)Get Graph and Save Imageop.getGraph('A000001')Get Randomres=op.getRandom()
Package: oekaki
OekakiLazy on demand subplots.Features1️⃣ You can draw subplots, wherever and whenever you want.2️⃣ You can access mosaic subplots with Regex.3️⃣ Oekaki warn about potentially misleading graphs. (No labels or units.) This feature can be ignored.🍣 (Oekaki importsjapanize-matplotlibif it's installed.)Demoimportnumpyasnpimportoekaki# 1️⃣: lazy draw subplotsfig=oekaki.figure(tight_layout=True)# 2️⃣: able to use regex searchfig["left"].set(facecolor="black")fig["upper"].grid(True)# 🍣 japanizefig["lower right"].set(aspect="equal",title="俺流 matplotlib")theta=np.linspace(0,np.pi,300)r=np.abs(np.tan(theta))**(1/np.abs(np.tan(theta)))fig["lower right"].fill(r*np.cos(theta),r*np.sin(theta),color="#2ce62c")fig.show("""upper left | upper rightlower left | lower right""")3️⃣: This code raises the following warnings.example/readme.py:12: MisleadingWarning:
lower right: No x-label.
lower right: No y-label.
  fig.show("""upper left | upper rightRequirementmatplotlibseabornInstallationpip install oekakiIf you want to also installjapanize-matplotlib, run below.pip install "oekaki[ja]"UsageFirst, create a figure instance.fig=oekaki.figure()You can useall matplotlib's Axes API.fig["plot"].plot(x,y)You can also use someseaborn APIthroughsnsproperty. They must haveaxargument.fig["hist"].sns.histplot(data=data)It is also possible to manipulate the subplots using regex. (This is implemented usingre.Pattern.search.)# `.*` means ALLfig[".*"].grid(True)Finally, let's draw it in (enhanced)Mosaic format!fig.show("""hist | plot""")fig.show("""histplot""")NoteUnder construction.AuthorUnder construction.LicenseUnder construction.