Saravanan666/pypi-org huggingface dataset:
Package: pyodesiutils
# UottawaOdesiUtilsCeci est une librairie pour agir en tant que Helper pour travailler avec les Documentations xml d'Odesi. Le logiciel SPPS va abrégé toutes les phrases qui ont une taille plus grande que  251 caractères. Le but de cette libraire est de rendre plus facile de faire la traduction des `<labl>` et des balises `<qstnLit>` en créant un hash des valeurs des balises. Ensuite je pourrai savoir quel `<labl>` sera écourté en examinant la taille totale de caractères contenu dans cette balise et utilisé une application comme Flask/Django pour faire la traduction ou pour modifier la pharse écourtée par SPSS.This is an utils library to work with DDI-xml. The purpose of this library is to ease the process of translating variable label in a document. This library will retrieve the `<labl>` and the `<qstnLit>` value of an IDD file and will also tell if the label.size is greater than 251 caracters, that will mean that it will be chopped in SPSS. So that it will be easy to create a json file, export it to a db for a Rails/Flask app.####RubyThe ruby gem can be found [here](https://github.com/guinslym/uottawa_odesi_utils)## Installation$ pip install pyodesiutilsOr install it yourself as:$ python setup.py## Usage exampleDealing with one Documentation file```python>>> from pyodesiutils import retrieve_label_and_qstnlita = retrieve_label_and_qstnlit('esg-c-25.xml')print(a[0])>>>{'label_warning': False, 'variable_name': u'ABCDEF', 'qstnLit': u"Num\xe9ro d'identification de l'enregistrement.", 'label': u"Num\xe9ro d'identification de l'enregistrement."}```Comparing two files```python>>>from pyodesiutils import bilingual_filescontent = bilingual_files('esg-cycle-xx_fr.xml', 'gss-cycle-xx_en.xml')#french file must be firstprint(content[0])=> {'label_warning_fr': False, 'variable_name': u'ABCDEF', 'qstnLit_fr': u"Num\xe9ro d'identification de l'enregistrement.", 'label_fr': u"Num\xe9ro d'identification de l'enregistrement.",'label_warning_en': False, 'qstnLit_en': u"Record identification.", 'label_en': u"Record identification"}```Now it's easier to create a web app so that I can view the English and the French translation side-by-side and make corrections if the translation is not good enough or if the label size is greater than 251 character##TODOFlask app to put the json in a DBTest file## Contributing1. Fork it ( https://github.com/guinslym/pyodesiutils/fork )2. Create your feature branch (`git checkout -b my-new-feature`)3. Commit your changes (`git commit -am 'Add some feature'`)4. Push to the branch (`git push origin my-new-feature`)5. Create a new Pull Request
Package: pyodi
PyodiPython Object Detection InsightsDocumentation:https://gradiant.github.io/pyodiIntroductionA simple tool for explore your object detection dataset. The goal of this library is to provide simple and intuitive visualizations from your dataset and automatically find the best parameters for generating a specific grid of anchors that can fit you data characteristicsComponentDescriptionpaint annotationspaints COCO format annotations and predictionsground-truthexplore your dataset ground truth characteristicsevaluationevaluates AP and AR for between predictions and ground truthtrain-config generationautomatically generate anchors for your datatrain-config evaluationevaluate the fitness between you data and your anchorscoco mergeautomatically merge COCO annotation filescoco splitautomatically split COCO annotation files in train and val subsetscrops splitcreates a new dataset by splitting images into crops and adapting the annotations filecrops mergetranslate COCO ground truth or COCO predictions crops split into original image coordinatesInstallationpipinstallpyodiUsagePyodi includes different applications that can help you to extract the most from your dataset. You can download ourTINY_COCO_ANIMALdatasetherein order to test the example commands. A classic flow could follow the following steps:1. Annotation visualizationWith pyodipaint_annotationsyou can easily visualize in a beautiful format your object detection dataset.pyodipaint-annotations\$TINY_COCO_ANIMAL/annotations/train.json\$TINY_COCO_ANIMAL/sample_images\$TINY_COCO_ANIMAL/painted_images2. Ground truth explorationIt is very recommended to intensively explore your dataset before starting training. The analysis of your images and annotations will allow you to optimize aspects as the optimum image input size for your network or the shape distribution of the bounding boxes. You can use theground_truthapp for this task:pyodiground-truth$TINY_COCO_ANIMAL/annotations/train.json3. Train config generationThe design of anchors is critical for the performance of one-stage detectors. Pyodi can help you to automatically design a set of anchors that fit your data distribution.pyoditrain-configgeneration\$TINY_COCO_ANIMAL/annotations/train.json\--input-size[1280,720]\--n-ratios3--n-scales34. Train config evaluationPyodi evaluation app has been designed with the aim of providing a simple tool to understand how well are your anchors matching your dataset. It automatically runs by default after executingtrain-config generationbut it can also be run independently with:pyoditrain-configevaluation\$TINY_COCO_ANIMAL/annotations/train.json\$TINY_COCO_ANIMAL/resources/anchor_config.py\--input-size[1280,720]ContributingWe appreciate all contributions to improve Pyodi. Please refer toContributing guidefor more info.
Package: pyodide-cli
pyodide-cliThe command line interface for the Pyodide project.In most cases, you do not need to install this package directly, and it would be installed as
a dependency of other packages in the ecosystem (e.g. pyodide-build).Installationpip install pyodide-cliUsageTo get a list of available CLI commands,pyodide --helpDevelopersYou can register a subcommand in thepyodideCLI in your own package by:adding a dependency onpyodide-cliAdding apyodide.clientry point. For example, withsetup.cfg[options.entry_points]pyodide.cli=do_something="<your-package>.cli:main"orpyproject.toml[project.entry-points."pyodide.cli"]do_something="<your-package>.cli:main"where in this examplemainneeds to be a function with type annotations
that can be converted to a CLI withtyper.Licensepyodide-cli uses theMozilla Public License Version
2.0.
Package: pyodide-html
Pyodide HTMLHTML elements forpyodide, implemented as Python functions.Quickstartimportmicropipmicropip.install('pyodide-html')importpyodide_htmlashtmlele=html.h1('Hello, world!')js.document.body.appendChild(ele)MotivationInpyodide, you can create HTML elements usingjs.document, but it is extremely verbose. For example, a range input would look like:importjsele=js.document.createElement('input')ele.type='range'ele.min=0ele.max=50ele.value=25ele.step=1Withpyodide_html, you can do all this with a single function call:importpyodide_htmlashtmlele=html.input(type="range",min=0,max=50,value=25,step=1)UsageAll theHTML tagsare implemented as Python functions. For example,html.h1creates a<h1>element,html.inputcreates an<input>element, and so on.The signature of the function is:html.element(*children,**props)which is equivalent to calling<element **props>*children</element>.Every element has anaddmethod that lets you add new, or update existing children or props. It has the following signature:html.element(*children,**props).add(*children,**props)This is convenient if you want to initialize an element with certainprops, then add/update thechildrenorpropslater usingadd. For example:importpyodide_htmlashtml# initialize your elementele=html.div(className="container")# Add childrenele.add(html.h1("My header"),html.p("Some paragraph here"),# ...)# You can add new props:ele.add(style="background-color: lightgray")# You can also update existing props:ele.add(style="background-color: lightblue")You can also chainaddcalls:ele.add(style="...").add(className="...").add(html.div("a child"))Note thataddmodifies an element in-place.DocumentationSeeREFERENCE.txt(GitHub Link) for the API reference.Contributing/DevelopmentAfter cloning this repo, start with:pip install -r dev-requirements.txtYou can then make the desired changes
Package: pyodide-importer
pyodide-importerPyodide+ external file import supportInstallationInside Pyodide:importmicropipawaitmicropip.install("pyodide-importer")Basic Usagefrompyodide_importerimportregister_hookregister_hook("<Base URL where python scripts are in>")importexternal_moduleExampleimportmicropipawaitmicropip.install("pyodide-importer")frompyodide_importerimportregister_hookregister_hook("https://raw.githubusercontent.com/ryanking13/pyodide-importer/main/test_modules/")# https://raw.githubusercontent.com/ryanking13/pyodide-importer/main/test_modules/file_module.pyimportfile_modulefile_module.hello()# https://raw.githubusercontent.com/ryanking13/pyodide-importer/main/test_modules/regular_module/__init__.pyimportregular_moduleregular_module.hello()Advanced UsageWhitelisting modules to importWhitelisting modules will prevent from generating redundant HTTP requests when looking for not existing modules.register_hook("<Base URL where python scripts are in>",modules=["module1","module2"])Changing path where modules will be downloadeddownload_pathoption changes the path where modules will be downloaded inside the virtual file system,
default is set to the current working directory.register_hook("<Base URL where python scripts are in>",download_path="/path/to/be/downloaded",)
Package: pyodide-lock
pyodide-lockTooling to manage thepyodide-lock.jsonfile.Note: the API of this package is still being iterated on and may change completely
before the 0.1 release.Thepyodide-lockfile is used to lock the versions of the packages that are
used in a given Pyodide application. Packages included inpyodide-lock.jsonwill be auto-loaded at import time, when usingpyodide.runPythonAsyncor
running in JupyterLite or PyScript, and do not need to be explicitly installed
with micropip.Installationpipinstallpyodide-lockPython APITo parsing and write thepyodide-lock.json(formerlyrepodata.json) file:frompyodide_lockimportPyodideLockSpeclock_spec=PyodideLockSpec.from_json("pyodide-lock.json")# Make some changeslock_spec.to_json("pyodide-lock.json")LicenseBSD-3-Clause License
Package: pyodide-micropip-test
Pyodide Micropip Test PackageThis package is made to test Pyodide's ability to install external PyPI packages which require dependencies based on markers (likeimplementation_name). It is not meant to be used in any other project and it's only functionality is to installsnowballstemmerifcpythonis used.Pyodide source code is availablehereand is part ofIodide Project.Details about the installation of PyPI packages in Pyodide are availablehere.Implementation PR for support of markers is availablehere.This package is created by a third-party contributor to Pyodide which is not affiliated toIodide ProjectorSnowballStemmerteam.
Package: pyodide-py
Pyodide Python packageA Python package providing core interpreter functionality for Pyodide.This package is an integral part of the Pyodide runtime which cannot start
without it. Install in a native Python for type checking or testing purposes.
Some of the functionality is missing when imported in a native Python, but for
the APIs we either provide reimplementations or nonfunctional type stubs.LicensePyodide uses theMozilla Public License Version
2.0.Design information for Pyodide contributorsThis directory consists of two Python packages py/_pyodide and py/pyodide. The
difference between these packages is when they are imported. They are both
imported by core/pyodide as a part of setting up the Pyodide/javascript foreign
function interface.py/_pyodide is imported as the first step after initializing
the CPython interpreter. py/_pyodide cannot have any import time dependencies
other than the CPython stdlib.py/pyodide is imported as the final step of core/pyodide. It has an import time
dependency on_pyodide_corewhich is a Python C extension assembled by
core/pyodide to serve the needs of py/pyodide.
Package: pyodim
PYODIMA simple ODIM H5 (Opera Data Information Model - Hierarchical Data Format
version 5) radar reader in Python. It outputs the radar date in an xarray
Dataset. The goal is to be as barebone as possible while providing an xarray,
so that it can easily scale up (production) or just a very lean reader for
quicklooks into the data.Exampleimportpyodimfilename="/path/to/radar/file.h5"rset=pyodim.read_odim(filename,lazy_load=True)# Lazy load does not load the data in memory to save time if you are interested in only a specific sweepradar=rset[0].compute()# All sweeps are in a list (elevation ascending), so the 1st item of the list is the bottom sweep.print(radar)This code will output the radar data for the first sweep (lowest elevation
scan) in the radar file as an xarray Dataset, for example:<xarray.Dataset>Dimensions:(azimuth:360,range:1283,elevation:1,time:360)Coordinates:*range(range)float32125.0375.0625.0...3.204e+053.206e+05*azimuth(azimuth)float320.011111.0112.011...357.0358.0359.0*elevation(elevation)float320.5*time(time)datetime64[ns]2024-01-16T02:49:29.337047353...2024-...Datavariables:(12/17)DBZH(azimuth,range)float64nannannannannan...nannannannanSNRH(azimuth,range)float64nannannannannan...nannannannanVRADH(azimuth,range)float64nannannannannan...nannannannanWRADH(azimuth,range)float64nannannannannan...nannannannanKDP(azimuth,range)float64nannannannannan...nannannannan......x(azimuth,range)float320.024240.07271...-5.595e+03y(azimuth,range)float32125.0375.0...3.203e+053.206e+05z(azimuth,range)float3245.0947.27...2.84e+032.842e+03longitude(azimuth,range)float32144.8144.8144.8...144.7144.7144.7latitude(azimuth,range)float32-37.85-37.85-37.85...-34.97-34.96Attributes:(12/15)Conventions:ODIM_H5/V2_4latitude:-37.85200119018555longitude:144.75199890136722height:44.0date:2024-01-16T02:45:21object:PVOL......beamwV:1.0wavelength:10.489999771118164NI:36.5052highprf:696.0start_time:20240116_024928end_time:20240116_024958PYODIM reads the ODIM radar data and metadata. It also provides some quality of
life feature like automatically creating the x, y, z and latitude/longitude
coordinates for all radar gates (using the azimuthal equidistant -aeqd- projection). By
default it usesdask.delayedtolazilyload the data, meaning that it will
not actually load all the sweeps in memory, as for many applications we often
don't need all the radar sweeps. Instead, by calling the.compute()method
like in the example above, PYODIM will only read and load in memory the sweep
that you want, saving time. If you want to read all the sweeps at once in a
list, then just setlazy_load=False.DependenciesMandatory:numpyxarraypyprojdaskAnd optionally (it will automatically populate the fields metadata using pyart
if available):Py-ART
Package: pyodm
PyODMFor the latest documentation visit:https://pyodm.readthedocs.ioThe information below is for managing the repository.Running Testspython run_tests.pyWill run the all doctests. You must have a NodeODM node running in test mode locally to run the test suite:dockerrun-ti-p3000:3000opendronemap/nodeodm--testBuilding The DocumentationMake sure you are using Python 3.pipinstallvirtualenv
virtualenv-pvenvsourcevenv/bin/activate
pipinstall-rrequirements.txtUsesphinx-autobuildto automatically watch for changes and rebuild the html site using:cd docs
make livehtmlTo stop the server pressCtrl+C.Publishing to PyPIpipinstallsetuptoolswheeltwine
pythonsetup.pysdistbdist_wheel
python-mtwineuploaddist/*Seehttps://packaging.python.org/tutorials/packaging-projects/for more information.Support the ProjectThere are many ways to contribute to the project:⭐️ us on GitHub.Help us test the application.Spread the word about OpenDroneMap on social media.Help answer questions on the communityforumBecome a contributor!
Package: pyodm-cn
ODM ClassODM Class的定义是根据ODM V2ODM Class 定义方式1. 静态方式(Specification)step1. 定义 ODM Class的代码文件step2. 定义 ODM 元素和ODM Class的映射文件示例2. 动态方式(Xsd)step1. 定义 XSD 文件Factory 调用时会动态生成成员变量成员变量主要有三种类型AttributeOneElementManyElementsAttribute()定义定义改成员变量为属性APIName成员类型含义get_namemethod获取 Attribute 名get_valuemethod获取 Attribute 的值set_namemethod设置 Attribute 名set_valuemethod设置 Attribute 的值OneElement()定义定义该成员变量为 该子元素只有一个? (meaning optional, with zero or one occurrence)APIName成员类型含义get_namemethod获取 Element 名get_valuemethod获取 Element 的值，无返回 Noneset_namemethod设置 Element 名set_valuemethod设置 Element 的值is_blankmethod返回该元素是否有文本ManyElements()定义定义该成员变量的子元素可能有多个
![[Pasted image 20231124143855.png]](meaning optional, with zero or more occurrences)(meaning required, with one or more occurrences)APIName成员类型参数含义get_namemethod获取 Element 名get_valuemethod获取 Element 的值，无返回 Noneset_namemethod设置 Element 名set_valuemethod设置 Element 的值arrayproperty无返回该元素的列表countproperty无元素个数indexmethodint i返回 指定位置的元素firstmethod无返回 第一个元素findmethod**attributes返回符合属性的第一个主要的功能类说明Factoryodm_process 方法流程图LoaderReaderSource依赖关系ODM 对象的操作append只针对 ManyElements 元素,针对该 Element类型,新增一个Elementmerge前提是 被合并对象 odm_element 与 合并对象的 根节点一致
![odm merge.jpg](images/odm merge.jpg)add添加 ElementEntity 到 OneElement
前提:新增的 OneElement 存在OneElement 还没有被实例化replace替换指定的子元素子元素为 OneElement 和 实例直接替换子元素为 ManyElements为空，则直接添加不为空，查找相似的替换update更新 ODM 属性update_text更新 ODM 的文本应用场景读取标准的 ODM data 的XML文件示例数据 Example1CdiscXsdFactoryCdiscSpecificationFactory数据库中读取数据，并生成XML文件CdiscListableFactory自定义结构，并读取 XML 数据示例从 JSON 中读取文件 ODM 数据示例Forest自定义数据结构, 把传入的列表数据转为为树形结构
根据传入的列表，生成不同可能生成多个树类型单树输入branches=[[dict(id=1),dict(id=2),dict(id=3)],[dict(id=1),dict(id=2),dict(id=3),dict(id=6)],[dict(id=1),dict(id=2),dict(id=3),dict(id=7)],[dict(id=1),dict(id=4),dict(id=5)]]输出flowchart LR
 1-->2-->3-->6
 3-->7
 1-->4-->5多棵树输入branches = [
    [dict(id=1), dict(id=2),dict(id=3)],
    [dict(id=1), dict(id=2),dict(id=3),dict(id=6)],
    [dict(id=A1), dict(id=A2),dict(id=A3),dict(id=A7)],
    [dict(id=A1), dict(id=A4),dict(id=5)]
]输出flowchart LR
 1-->2-->3-->6
 A1-->A2-->A3-->A7
 A1-->A4-->5术语描述degree该结构下，最大的树的DegreelevelForsest 的层级，level = degree-1branches多维数组branches=[[dict(id=1),dict(id=2),dict(id=3)],[dict(id=1),dict(id=2),dict(id=3),dict(id=6)],[dict(id="A1"),dict(id="A2"),dict(id="A3"),dict(id="A7")],[dict(id="A1"),dict(id="A4"),dict(id=5)]]每一行都表示为一个从根节点到叶子节点的一个分支。ReleaseRelease 1.0.0根据 XSD 配置，读取 ODM XML 数据，生成 ODM 对象根据 ODM Class 定义，读取 ODM XML 数据，生成 ODM 对象读取 数据库数据， 转化为 ODM 对象ODM 对象，导出为 XMLRelease 1.0.1增加了ReadMERelease 1.0.2增加了ReadMERelease 1.0.3修改了 ODM 对象 获取 name 或 text 的方法为get_name(),set_name(),get_value(),set_value()增加了 as_stream 来查询ODM对象Release 1.0.3.1修改了 odm_dfs 搜索会忽略掉 odm 对象的BUG修改了 merge 时，会忽略掉 odm 对象 的 BUG新增了 replace 操作Release 1.0.3.2新增了 add 操作未来计划JSON 格式的 ODM 数据支持ODM 输入到数据库ODM 通过接口导入ODM 对象 多线程，多数据源读取ODM 对象操作：append, replace, joinManyElements 的 each, find_all 等功能函数
Package: pyodmongo
Documentation:https://pyodmongo.devSource Code:https://github.com/mauro-andre/pyodmongoPyODMongois a modern Python library that functions as a robust Object-Document Mapper (ODM) forMongoDB. Leveraging the power ofPydantic V2, it seamlessly bridges the gap between Python and MongoDB, offering an intuitive and efficient way to interact with MongoDB documents.By usingPyODMongo, you can effortlessly map your Python classes to MongoDB documents, allowing for a more Pythonic approach to handling data. This library simplifies the entire process of defining and working with MongoDB collections, documents, and queries.PyODMongois built on top ofPydantic V2, making theDbModelclass an extension of Pydantic'sBaseModel. This means that all the rich functionality of Pydantic'sBaseModel, includingValidators,FieldsandModel Config, is readily available inDbModel.Key FeaturesIntegration with pydantic: Leverage the power of pydantic's data validation and modeling capabilities while working with MongoDB data.Automatic Schema Generation: Define your MongoDB schema using pydantic models, andpyodmongowill automatically create the necessary MongoDB collections and ensure data consistency.Query Builder: Easily construct complex MongoDB queries using Python code, reducing the need for writing raw query strings.Document Serialization: Serialize and deserialize Python objects to and from MongoDB documents effortlessly.Async Support: Take advantage of asynchronous programming withpyodmongoto enhance the performance of your MongoDB operations.Active Development:pyodmongois actively developed and maintained, with new features and improvements being regularly added.InstallationYou can installpyodmongousing pip:pipinstallpyodmongoContributingContributions topyodmongoare welcome! If you find any issues or have ideas for improvements, please open an issue or submit a pull request on theGitHub repository.Licensepyodmongois licensed under the MIT License. See theLICENSE filefor more information.Async exemplefrompyodmongoimportAsyncDbEngine,DbModelfromtypingimportClassVarimportasyncioengine=AsyncDbEngine(mongo_uri='mongodb://localhost:27017',db_name='my_db')classProduct(DbModel):name:strprice:floatis_available:bool_collection:ClassVar='products'box=Product(name='Box',price='5.99',is_available=True)asyncdefmain():result=awaitengine.save(box)asyncio.run(main())Sync exemplefrompyodmongoimportDbEngine,DbModelfromtypingimportClassVarengine=DbEngine(mongo_uri='mongodb://localhost:27017',db_name='my_db')classProduct(DbModel):name:strprice:floatis_available:bool_collection:ClassVar='products'box=Product(name='Box',price='5.99',is_available=True)result=engine.save(box)
Package: pyodnoklassniki
This library consists of an API interface forOdnoklassnikiand
Django middleware which helps to configure it.Usage example:importpyodnoklassnikipyodnoklassniki.app_pub_key='CBAJ...BABA'pyodnoklassniki.app_secret_key='123...XYZ'ok_api=pyodnoklassniki.OdnoklassnikiAPI(access_token='kjdhfldjfhgldsjhfglkdjfg9ds8fg0sdf8gsd8fg')try:printok_api.users.getCurrentUser()exceptpyodnoklassniki.OdnoklassnikiErrorasexc:printexcYou might find that configuring library with Django Middleware is more
convenient.MIDDLEWARE_CLASSES=(# ...'pyodnoklassniki.contrib.django.middleware.PyOdnoklassnikiMiddleware',# ...)PYODNOKLASSNIKI={'app_pub_key':'CBAJ...BABA','app_secret_key':'123...XYZ',}Use dotted notation to invoke API method. Query parameters are passed as
keyword arguments. Odnoklassniki error codes are grouped by meaning inexceptions.py, butOdnoklassnikiErrormight be enough.
See full list of API methods and error codes atOdnoklassniki API documentation.try:response=ok_api.group.getUserGroupsV2()exceptpyodnoklassniki.OdnoklassnikiErrorasexc:printexcelse:forgroupinresponse['groups']:printok_api.group.getInfo(uids=group['groupId'],fields='name, description')You can process particular error code such asPARAM_SESSION_EXPIREDas well.frompyodnoklassnikiimporterrorstry:response=ok_api.users.getCurrentUser()exceptpyodnoklassniki.AuthErrorasexc:ifexc.code==errors.PARAM_SESSION_EXPIRED:# Renew session...pass