Saravanan666/pypi-org huggingface dataset:
Package: omron-2jcie-bu01-interact
Module and sample code for obtaining data with OMRON 2JCIE-BU01 Environment
Sensor by Python. The codes work with Python 3.6 and above. This module supports
USB serial communication and BLE. This module depends on pySerial(serial
communication) and Bleak(BLE).Example:# Obtain sensing data via serial communication
from omron_2jcie_bu01 import Omron2JCIE_BU01
sensor = Omron2JCIE_BU01.serial("/dev/ttyUSB0") # Linux
sensor = Omron2JCIE_BU01.serial("COM5")         # Windows
devinfo = sensor.info()
data = sensor.latest_data_long()

# Obtain sensing data via BLE communication
# Read latest data with connection
from omron_2jcie_bu01 import Omron2JCIE_BU01
sensor = Omron2JCIE_BU01.ble("AA:BB:CC:DD:EE:FF")
data1 = sensor.latest_sensing_data()
data2 = sensor.latest_calculation_data()

# Read latest data by scan
def on_scan(data):
    print("SCAN", data)

# Advertising mode: 0x01 (Passive)
sensor.scan(on_scan, scantime=3)

# Advertising mode: 0x03 (Active)
sensor.scan(on_scan, scantime=3, active=True)

# Notify sensing data
def on_notify(sender, tpl):
    print(f"{sender} {tpl}")

sensor.start_notify(0x5012, on_notify)
sensor.start_notify(0x5013, on_notify)
sensor.sleep(5)
sensor.stop_notify(0x5012)
sensor.stop_notify(0x5013)
Package: omronfins
OmronFinsEthernetUtility functions for FINS protocol used by omron's PLCsThis library can read and write memory area of PLC via FINS protocol.
It is confirmed that this can work with NX series PLC.UsagePlease refer to documents created by doxygen for the details.
When you access structs' data in PLC, please set memory offset 'CJ' mode.
And please notice that offset of structure is shown as number of bytes,
on the other hand, the number of address is defined as number of 16bit segments.
So, the address of data in a struct can be calculated by adding half number of the
offset to the initial address of the struct.It's a sample code.importomronfins.finsudpasfinsudpfromomronfins.finsudpimportdatadeffins=finsudp.FinsUDP(0,170)ret=fins.open('192.168.2.13',9600)# Please change according to your PLC's address.fins.set_destination(dst_net_addr=0,dst_node_num=13,dst_unit_addr=0)# Writing a word to Extended memory area's address 0.ret=fins.write_mem_area(datadef.EM0_WORD,0,0,1,(20,datadef.USHORT))# Reading a word from Extended memory area's address 0.ret,value=fins.read_mem_area(datadef.EM0_WORD,0,0,1,datadef.USHORT)print(value)# the value becomes '20'# Writing four bits to Extended memory area's address 5.ret=fins.write_mem_area(datadef.EM0_BIT,5,0,4,[(1,datadef.BIT),(0,datadef.BIT),(1,datadef.BIT),(0,datadef.BIT)])# Reading four bits from Extended memory area's address 5.ret,values=fins.read_mem_area(datadef.EM0_BIT,5,0,4,datadef.BIT)print(values)# values become a tuple like (1, 0, 1, 0).# Writing a string to Extended memory area's address 6.# Fourth argument '4' means size of 16bit element and it becomes half of length of the string.ret=fins.write_mem_area(datadef.EM0_WORD,6,0,4,("testtest",datadef.STR))# Reading a string from Extended memory area's address 6.ret,value=fins.read_mem_area(datadef.EM0_WORD,6,0,4,datadef.STR)print(value)# value become "testtest"
Package: oms
oms.pyA micro-framework for the excellentOpen Microservices Specification, for suppportive code written in Python 3.6+.Note: this is pre-release software, and is subject to improvement. Contributions are welcome! This framework is being developed forother languages, as well. If you'd like to help,let us know!Intended / Example Usage$catservice.pyimportomsfromuuidimportuuid4service=oms.Microservice(name='uuid')@service.register()defnew(prefix:str)->str:"""Generates a UUID, with a given prefix."""returnf'{prefix}{uuid4().hex}'if__name__=='__main__':service.serve()registertakes some optional arguments:nameandpath. You can also callservice.add(f=new), instead.Next, run the command$ oms-generateoms.ymlfiles will automatically be generated, for your application:$oms-generateservice:service
…'oms.yml'writtentodisk!$ cat oms.ymlactions:new:help:Generates a UUID, with a given prefix.arguments:prefix:in:queryrequired:truetype:stringhttp:method:getpath:/newport:8080output:type:stringlifecycle:startup:command:-python3-/app/service.pyoms:1$catDockerfile
FROMkennethreitz/pipenv
COPY./app
CMD["python3","service.py"]Now, run your microservice!$pythonservice.py2019-05-0914:45:39,342-micro-DEBUG-Initiating'uuid'service.2019-05-0914:45:39,344-micro-DEBUG-RegisteringFlaskendpoint:'/new'2019-05-0914:45:39,344-micro-DEBUG-Dockerfile'./Dockerfile'alreadyexists!2019-05-0914:45:39,345-micro-DEBUG-MicroserviceManifest'./oms.yml'alreadyexists!2019-05-0914:45:39,346-micro-INFO-Servingon:'*:8080'This will spawn a Flask application (using the production-readywaitress web server), preconfigured to serve the masses!Or, use theomsCLI:$omsrunnew-aprefix='user-'…Installation$pipinstallP.S.Do provide feedback, if you desire! :)✨ 🍰 ✨
Package: oms-cms
[![Build Status](https://travis-ci.org/DJWOMS/oms_cms.svg?branch=master)](https://travis-ci.org/DJWOMS/oms_cms)
[![Coverage Status](https://coveralls.io/repos/github/DJWOMS/oms_cms/badge.svg?branch=master)](https://coveralls.io/github/DJWOMS/oms_cms?branch=master)
[![License](https://img.shields.io/pypi/l/oms-cms)](https://opensource.org/licenses/BSD-3-Clause)
[![Version](https://img.shields.io/pypi/v/oms-cms)](https://pypi.org/project/oms-cms/)
[![Slack](https://img.shields.io/badge/Slack-chat-green)](https://join.slack.com/t/oms-cms/)[Website](https://oms-cms.site/en/)[Documentation](https://oms-cms.readthedocs.io/ru/latest/)Python = 3.7, 3.8Django = 2.2, 3OMS CMS is designed for a wide range of developers.The system is open source, written using the Django framework in the Python programming language.This CMS was designed by developers for a quick start and easy scalability.
OMS allows you to easily integrate with other django applications and use them immediately,
Or create new compatible applications!This cms allows you to make a website in minutes.
You can use the basic template or download from the official site.ModulesPagesNewsCategoriesArticlesTagsCommentsContactsInfo blockLanguages, multilingualismMenuSEOPartnersSearchLinks to social networksOpenGraphInstallation:Create virtual environmentpython -m venv venvActivate virtual environmentInstall CMSpip install oms-cmsCreate Projectoms-start[Development](https://github.com/DJWOMS/oms_cms/wiki/Development)[Сайт](https://oms-cms.site)[Документация](https://oms-cms.readthedocs.io/ru/latest/)Python = 3.7, 3.8Django = 2.2, 3OMS CMS создана для широкого круга разработчиков.Система имеет открытый исходный код, написана с использованием фреймворка Django на языке программирования Python.Данная CMS была задумана разработчиками для быстрого старта и легкой масштабируемости.
OMS позволяет без трудностей интегрироваться с другими приложениями django и сразу же использовать их,
либо создавать новые совместимые приложения!Данная cms позволяет сделать сайт за считанные минуту.
Вы можете использовать базовый шаблон или скачать с официального сайта.МодулиСтраницыНовостиКатегорииСтатьиТегиКомментарииКонтактыИнфо блкЯзыки мультиязычностьМенюSEOПартнерыПоискСсылки на социальные сетиOpenGraphУстановка:Создать виртуальное окружениеpython -m venv venvАктивировать виртуальное окружениеУстановить CMSpip install oms-cmsСоздать проектoms-start[Разработка](https://github.com/DJWOMS/oms_cms/wiki/Development)
Package: omsdetector-forked
A Python program to analyze collections of Metal Organic Frameworks (MOFs) for open metal sites.Author: Emmanuel Haldoupisemmhald@gmail.comMarch 12th 2018DescriptionGiven a set of CIF files this program can read the files, analyze the structures and
detect all the unique open metal sites present in each structure.The first step is to create a collection containing all the desired CIF files. We can do
this by pointing to a folder containing the CIF files.from omsdetector-forked import MofCollection
mof_coll = MofCollection.from_folder(collection_folder="path to cif folder",
                                     analysis_folder="path to analysis folder")Wherecollection_folderis the folder where the CIF files are located andanalysis_folderis the folder where the results will be saved.The analysis is run using the following command on the mof_coll object:mof_coll.analyse_mofs()Specifying a value for num_batches instructs the analysis to run in parallel in the specified number
of batches, each as a separate process.Once the results have finished they can be summarized using the following methods:mof_coll.summarize_results()
mof_coll.summarize_tfactors()The summarize_results() method generates a table that summarizes the number of open metal sites found for each metal type.
The summarize_tfactors() method generates histograms (and stores them) for the distribution of the t-factors, which indicate
the degree of deviation from a closed coordination sphere for tetra, penta, and hexa-coordinated coordination spheres.Finaly, a collection can be filtered to create a sub-collection using the following filters:"density": [min, max] (range of values)"oms_density": [min, max] (range of values)"uc_volume":  [min, max] (range of values)"metal_species": ["Cu", "Zn", ...] (list of metal species)"non_metal_species": ["C", "N", ...] (list of non metal species)"cif_okay": True (boolean value)"has_oms": True (boolean value)"mof_name":  [mof_name1, mof_name2] (string values)For example:co_oms = mof_coll.filter_collection(using_filter={"metal_species":["Co"], "has_oms":True})See the example jupyter notebook for more details.Requirmentspython >=3.9pymatgen >=2023.2.28pandas 1.3.5numpy 1.21.6matplotlib 2.1.1ReferenceChung, Yongchul; Haldoupis, Emmanuel; Bucior, Benjamin; Haranczyk, Maciej ; Zhang, Hongda; Vogiatzis, Konstantinos; Milisavljevic, Marija; Ling, Sanliang; Camp, Jeffrey; Slater, Ben; Siepmann, J.; Sholl, David; Snurr, RandallComputation-Ready, Experimental Metal-Organic Framework Database 2018: Additional Structures, Open Metal Sites, and Crystal Reconstruction(submited to Chemistry of Materials)
Package: omsens-linux-placiana
OMSensOpenModelica sensitivity analysis and optimization module.DependenciesOpenModelicaPython >= 3.6Python setuptoolsSupported platformsWindowsLinuxBuild/Install instructionsFollow the instructions matching your OS:OMCompiler/README.Linux.mdOMCompiler/README.Windows.mdWindows MSYS MakefilesIf you used MSYS Makefiles to compile OpenModelica you need one additional step:Start a MSYS terminal$OMDEV\tools\msys\mingw64.exe(64 bit) or$OMDEV\tools\msys\mingw32.exe(32 bit) and run:$cd/path/to/OpenModelica
make-fMakefile.omdev.mingwomsens-j<Nr.ofcores>LinuxInstall the dependencies mentioned above and then run the following commands in theterminal.$cd/path/to/OpenModelica/OMSens
$pythonsetup.pyinstallHint: To find the installation path runOMEditand then go toHelp->About OMEdit.Bug ReportsSubmit bugs through theOpenModelica GitHub issues.Pull requestsare welcome ❤️
Package: om-simple
Image Classificationpip install om-simpleData Preparation{dataset name}/
├── train/
│   ├── {class1}/
│   ├── {class2}/
│   ├── ...
└── val/
    ├── {class1}/
    ├── {class2}/
    ├── ...Example Codefromom_simple.img_class_headimportImageClassificationfromom_simple.img_class_modelimportrun_trainfromom_simple.tools.utilsimportis_blur# Trainrun_train("{dataset name}",model_name="{model_name}",# e.g., resnet18, resnet50, vit_base_patch16_224, etc....outdir="{output_dir}")# Simple ClassificationX=ImageClassification("epoch099.ckpt")z=X.predict(images=["sample.jpg"])# Blur detectionprint(is_blur("sample.jpg"))# Multi label classificationfromom_simple.multi_class_modelimportMultiClassX=MultiClass("model.ckpt","label.json")z=X.predict(images=["sample.jpg"])How to get available model_nameimport timm
avail_pretrained_models = timm.list_models(pretrained=True)
print (avail_pretrained_models)

all_vit_models = timm.list_models('vit*')
print (all_vit_models)Tensorboardtensorboard --logdir {output_dir} --bind_all
Package: om-simple-encoder
Om Simple EncoderOm Simple Encoder is to fintune the query encoder. Currently it includes only query image encoder.Installpip install om_simple_encoderHow to start trainingpython train.py --img_dir {image_root_path} --data {data json} --num_workers=15 --gpus=1 --batch_size=64Data Format[{"key1":["image1.jpg","image2.jpg"],"key2":["image1.jpg","image2.jpg"]},...]Demo predictionfromom_simple_encoder.encoderimportEncoderh_enc=Encoder("brand_model_v1.ckpt")encoded_embeddings=h_enc.images(["a.png"])print(encoded_embeddings)Demo Trainfromom_simple_encoderimporttrainif__name__=='__main__':train.start_train(model_type="resnet50",img_dir="/mnt/soco1/brands",data="brands.json",batch_size=64)
Package: oms-magento
Linets MagentoStartingThese instructions will allow you to install the library in your django project.Current featuresGenerate order in Magento.Generate default data for create order in Magento.Pre-requisitosPython >= 3.7requests >= 2Django >= 3,InstallationTo get the latest stable release from PyPi:pipinstalloms-magentoor From a buildgitclonehttps://gitlab.com/linets/ecommerce/oms/integrations/oms-magentocd{{project}}&&gitcheckoutdevelop
pythonsetup.pysdistand, install in your project Django.pipinstall{{path}}/oms-magento/dist/{{tar.gzfile}}Settings in django projectLINETS_MAGENTO={'MAGENTO':{'BASE_URL':'https://linets.api.magento.io/rest/all/','API_KEY':'7d06682sdgff6d06682sdgff66d06682sdgff66',},}Usagefromlinets_magento.handlerimportMagentoHandlerhandler=MagentoHandler()List orders in Magento:List oders by days count.default_data=handler.order_get_last_completed(days_count=5)List orders with status pending.default_data=handler.order_get_pending_list()List all orders, can filter by status, default(status = 'complete')default_data=handler.order_get_list(status='complete')All list methods return:# Output:{'items':[....],'search_criteria':{'filter_groups':[{'filters':[{'field':'status','value':'pending','condition_type':'eq'}]},{'filters':[{'field':'created_at','value':'2021-05-14 15:00:37','condition_type':'lt'}]}]},'total_count':0}Get detail order in Magento:default_data=handler.order_get_detail(identifier)# Output:{'base_currency_code':'CLP','base_discount_amount':0,'base_discount_invoiced':0,'base_grand_total':31990,'base_discount_tax_compensation_amount':0,'base_discount_tax_compensation_invoiced':0,'base_shipping_amount':0,'base_shipping_discount_amount':0,'base_shipping_discount_tax_compensation_amnt':0,'base_shipping_incl_tax':0,'base_shipping_invoiced':0,'base_shipping_tax_amount':0,'base_subtotal':31990,'items':[...],'billing_address':{...},'payment':{...},'status_histories':{...},'extension_attributes':{...},'payment_additional_info':{...},'gift_cards':[...],'base_gift_cards_amount':0,'gift_cards_amount':0,'applied_taxes':[...],'item_applied_taxes':[...],'gw_base_price':'0.0000','gw_price':'0.0000','gw_items_base_price':'0.0000','gw_items_price':'0.0000','gw_card_base_price':'0.0000','gw_card_price':'0.0000','checkout_request_invoice':'No','rut':'17.716.251-5}Get items for order:response=handler.order_get_items(identifier)# Output:{"items":[{"item_id":140,"qty_ordered":1,"sku":"ALCNHDA01B57Z"}]}Add the items to a shipment to substract the used stock:fromlinets_magento.handlerimportMagentoHandlerhandler=MagentoHandler()response=handler.order_post_ship(identifier,items)Output:9999Adds the items to a invoice and completes the order:response=handler.order_post_invoice(identifier,items)# Output:9999Add comment and update status for order in Magento:response=handler.order_post_comment(identifier,comment,status,notify_customer)# Output:TrueCancel order in Magento:response=handler.order_post_cancel(identifier)# Output:True
Package: omt
A fairly generic tool that allows you to capture all of the output froma terminal application (including shells). This output is then rendered ina pure-python terminal emulator (pyte), and the resulting virtual "screen"is dumped to either generic JSON or a generic HTML snippet that can thenbe used to by other tools or inserted into a webpage.There are issues with some complex curses applications that use certainCSI control codes not (yet) supported by pyte. For example, htop will notwork.This tool was designed specifically to turn zsh themes into a gallery.Example:echo "ls\\nexit\\n" > omt-py html -- /bin/zshCommands:omt-py json             - Generates a JSON representation of the screen.omt-py html             - Generates a generic HTML snippet or a standalonepage.omt-py iterm-to-css     - Converts an iTerm2 theme into CSS suitable forusage with the HTML snippets generated by omt.Usage:omt-py json [options] -- <argv>...omt-py html [options] -- <argv>...omt-py iterm-to-css [--prefix=<prefix>] <source>Options:--width=<columns>       The number of columns for the pseudo-terminal.[default: 80]--height=<lines>        The number of lines for the pseudo-terminal.[default: 24]--standalone            When generating HTML, generate a standalone pageinstead of a generic snippet.--theme=<source>        When generating standalone HTML, use this iTerm2theme for the CSS.--prefix=<prefix>       The prefix to use for CSS selectors.[default: omt]
Package: omtool
DescriptionOMT (Open Modeling Tool) is used to numerically solve and visualize N-body problem with huge number of particles. Primary application is galactic evolution.PrerequisitesIt requires following packages to work:pipinstallmarshmallowmarshmallow_jsonschemamatplotlibpandaspyyamlargparseastropypy_expression_evalamuse-frameworkYou also need to installpyfalconmodule which makes integration possible.You might also need:pipinstallflake8isortmypyblacktypes-pyyamlUsageProgram has three modes: creation, integration and analysis. The semantical difference between them is as follows:[data->Snapshot]Creation mode creates snapshot from data. This data might be particles specified by their position, velocity and mass or the whole files with particle parameters inside them.[Snapshot->Snapshot]Integration mode alters existing snapshot. It takes some existing snapshot and performs some operation on it, then takes result and performs operation again and again until some specified condition is not met.[Snapshot->data]Analysis mode creates data from snapshot. It takes some snapshot and extracts some data (position, velocities, potentials, energies, etc.) then saves it to some form of file (image or log file).CreationThis module is responsible for initialization of snapshots. You can createconfiguration YAML filewhich describes list of objects in the snapshot (single objects and*.csvfiles are supported for now).The output is single FITS file which has two HDUs: empty primary one (it is required by FITS standard) and binary table with positions, velocities and masses of each particle in the system. It also stores timestamp T = 0 in the header.You can start it withpythonmain.pycreate/path/to/config/file.yamlIntegrationThis module is responsible for actual integration of the model from previous module. It operates similarly: you createconfiguration filewith all the data necessary. Next step is to launchpythonmain.pyintegrate/path/to/config/file.yamlIt will print some info into console and gradually produce output FITS file. Each HDU of this file would contain timestamp in theTIMEheader and table with fields[x, y, z, vx, vy, vz, m]. Be aware that depending on number of particles it can take quite a lot of disk space.AnalysisThis module is responsible for the visualization of file with snapshots (for example, one from previous module). As always, you should createconfiguration file. The biggest part of it is description of matplotlib’s plots layout. Launch command:pythonmain.pyanalize/path/to/config/file.yamlIf done right it should produce a lot of pictures (the same amount as number of timestamps in the input file) similar to this one:This program is under heavy development so some things (or all of them) might work not as expected or not work at all.
Package: om-transliterator
om_transliterator is a Python library for transliterating text
from Kannada (Knda) unicode script to Latin (Latn) script
as per ISO 15919.InstallationTo install om_transliterator with pip, run:pip install om_transliteratorTo install om_transliterator from source, first clone the repository and then
run:python setup.py installBasic UsageHere’s an example of typical usage:#!/usr/bin/env python

from om_transliterator import Transliterator

transliterator = Transliterator()

transliterated_text = transliterator.knda_to_latn(original_text)Thanks toThis project is open-sourced by contributions and support from people,
including:Dinesh ShenoyProf. Purushothama BilimaleSrikanth LakshmananSandesh B SuvarnaArjun ShettyLicenseApache License 2.0
Package: om-vlp
om-vlpHow to installpip install om-vlpDownload modelWukong ViT-L: https://drive.google.com/file/d/1NHRR_zFD-iJ_OQEmxJq054cobgTkjraC/view?usp=sharing
Wukong Vit-B: https://drive.google.com/file/d/1eM7IggHjMJqguPiGRUyIFP-fFhPl5sJz/view?usp=sharingExamplesfrom om_vlp.engine import Wukong
X = Wukong(config="om_vlp/configs/wukong_vit_b/wukong_vit_b.py",checkpoint="vit_b.pth")
t = X.texts(["a","b","c"])
i = X.images(["/mnt/soco1/img/ILSVRC/Data/CLS-LOC/val/n01631663/ILSVRC2012_val_00027028.JPEG"])
print (X.sims(i,t))
Package: omx
A declarative approach to making sense of XML-documents. Omx aims to avoid
making your eyes bleed and trigger unnecessary death[0]of those around you.A declarative description of the xml namespaces you want to grok is used to
both parse and serialize xml documents. Despite being usedin productionfor
several years on some of hobby projects by yours trulyomxis still in its
infancy. But it does support some fancy features like namespaces which
otherwise is most of time ignored or just implemented wrong.[0]When working with xml death may be the preferred option. And could even
be considered kind.
Package: omxplayer-wrapper
omxplayer-wrapper is a project to controlOMXPlayerfrom python overdbus.DocsYou can read the docs atpython-omxplayer-wrapper.rtfd.orgFAQHow do I create multiple players?You need to make sure each player has a separate DBus name like so:player1=OMXPlayer(file_1,dbus_name='org.mpris.MediaPlayer2.omxplayer1')player2=OMXPlayer(file_2,dbus_name='org.mpris.MediaPlayer2.omxplayer2')
Package: omxpy
OMX python apiPython client for interacting withOMXcontracts.InstallationRequirementsPython 3.10or higherHighly recommended to usePoetryfor dependency managementOsmosis localnetfor testingpipinstallomxpy# or with poetrypoetryaddomxpyExamplefromcosmpy.aerial.configimportNetworkConfigfromcosmpy.tx.rest_clientimportRestClientfromomxpy.contracts.omx_cw_routerimportOmxCwRouterfromomxpy.contracts.omx_cw_vaultimportOmxCwVaultfromcosmpy.aerial.walletimportLocalWalletwallet=LocalWallet.from_mnemonic("...",prefix="osmo")net_cfg=NetworkConfig(chain_id="localosmosis",fee_denomination="uosmo",staking_denomination="stake",fee_minimum_gas_price=0.025,url="rest+http://127.0.0.1:1317",)rest_client=LedgerClient(net_cfg)tx_client=TxRestClient(rest_client)# replace with your contract addressesvault_addr="osmo1w..."osmo_addr="osmo1j..."router_addr="osmo16..."# create contract clientsrouter=OmxCwRouter(tx=rest_client,contract_addr=router_addr,net_cfg=net_cfgwallet=wallet)vault=OmxCwVault(tx=rest_client,contract_addr=router_addr,net_cfg=net_cfgwallet=wallet)amount_in="100000000uosmo"# in real life you would want to use a price oracleprice_in_usd="1000000000000000000";# 3x leveragesize_delta="3000000000000000000";# add router to the vaultvault.add_router(router=router_addr)# open long positionrouter.with_funds(amount_in).increase_position_osmo(collateral={"token":osmo_addr},index_token=osmo_addr,is_long=True,min_out="0",price=price_in_usd,size_delta=size_delta,)