Saravanan666/pypi-org huggingface dataset:
Package: odbcdol
odbcdolodbc (through pyodbc) with a simple (dict-like or list-like) interfaceTo install:pip install odbcdolHere's how it looks:fromodbcdolimportSQLServerPersistersql_server_persister=SQLServerPersister()print("Fetching a Record")print(sql_server_persister[1])print(sql_server_persister[3])print("=========================")print("Adding a Record")sql_server_persister[3]={"id":"3","name":"new name"}sql_server_persister[4]={"id":"4","name":"Hamid NEW"}sql_server_persister[5]={"id":"5","name":"Hamid NEW AGAIN"}print(sql_server_persister[3])print(sql_server_persister[4])print(sql_server_persister[5])print("======================")print("Deleting a Record")delsql_server_persister[3]delsql_server_persister[4]delsql_server_persister[5]print(sql_server_persister[3])print("=====================")print("Iterating over the records")forrecordinsql_server_persister:print(record)print("=========================")print("Getting the length")print(len(sql_server_persister))
Package: odbcinst
odbcinstreturn output from unixODBCodbcinstcommandInstallationpip install odbcinstUsageThe.j()function executesodbcinst -j. If called with no argument it
returns a dict. If called with a str argument it returns the specified value.frompprintimportpprintimportodbcinstpprint(odbcinst.j())"""console output:{'DRIVERS': '/etc/odbcinst.ini','FILE DATA SOURCES': '/etc/ODBCDataSources','SQLLEN Size': '8','SQLSETPOSIROW Size': '8','SQLULEN Size': '8','SYSTEM DATA SOURCES': '/etc/odbc.ini','USER DATA SOURCES': '/home/gord/.odbc.ini','unixODBC': '2.3.4'}"""print(repr(odbcinst.j("unixODBC")))# '2.3.4'If unixODBC is not installed then the results arepprint(odbcinst.j())"""console output:{'unixODBC': None}"""print(repr(odbcinst.j("SYSTEM DATA SOURCES")))# None
Package: odbctools
Overviewodbc tools is a set of tools to simplify connecting to and working with an ODBC data source. It includes a context manager for handling connections to the data source and the ability to return a result set in an easy to use format or write the results to a file.Install ItFrom PyPI$ pip install odbctoolsUse ItOdbctools by default uses a file called config.ini, or you can override this for different scenarios, including passing the dsn directly.Create config.ini[odbc]
DSN=SourceNameCode Examplefrom odbctools import OdbcManager

query_string = "Your query here"
params = [p1, p2]

with OdbcManager() as datasource:
    result_list = datasource.get_dictionaries(query_string, params)
    for result_dict in result_list:
        for col_name, col_data in result_dict.items():
            print("{0}{1}".format(str(col_name).ljust(25), col_data))Another Examplefrom odbctools import OdbcManager

query_string = "Your query here"
params = [p1, p2]

with OdbcManager(dsn='ODBC Name Here') as datasource:
    result_list = datasource.get_dictionaries_in_queue(query_string, params)
    for result_dict in result_list:
        for col_name, col_data in result_dict.items():
            print("{0}{1}".format(str(col_name).ljust(25), col_data))Encapsulating the connection in your classes is also possibleclass Foo:
    def __init__(self):
        self.connection = OdbcManager(dsn='unity64')

    def __enter__(self):
        self.connection.open_connection()
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.connection.close_connection()

with Foo() as f:
    data = f.connection.get_dictionaries('select top 1 * from people', list())Note: You can now create a OdbcManager object with a connection string, passing in the connection_string argument.Returning data from a queryquery- Returns list that contains [0]A list containing the query columns [1:] A list of the resulting data (rows)get_dictionaries- Queries data source, returns a list of dictionaries.get_dictionaries_in_queue- Queries data source, returns a deque of dictionaries.write_to_csv- Queries data source and writes results to a CSV fileUpdating dataNote: by default commit is turned off, if you want to enable auto commit, you can set it when creating the OdbcManager object or when calling this function.query_no_resultset- For running DDL/DML queries for creating, deleting, updating records.DependenciespypyodbcLicenseMIT
Package: odbm
Linksrepository:https://bitbucket.org/imbolc/odbm/russian docs:http://pysi.org/lab/odbm/Installation$  pip install odbmUsage>>> from datetime import datetime
>>> import odbm

>>> class User(odbm.Model):
...     username = odbm.UnicodeProperty(primary_key=True)
...     friends  = odbm.Property(default=[], key='f')
...     created  = odbm.DateTimeProperty(key='c')
...
...     __backend__ = staticmethod(lambda: dict())

>>> User(
...     username = 'foo',
...     friends  = ['bar', 'baz'],
...     created = datetime.now(),
... ).save()
>>> User(username='bar', created = datetime.now()).save()
>>> User(username='baz', created = datetime.now()).save()

>>> User.get('foo').friends
['bar', 'baz']

>>> [u.username for u in User.find(
...     filter  = lambda u: not u.friends,
...     order   = lambda x: x.created)]
[u'bar', u'baz']

>>> User.count()
3
>>> User.count(lambda u: 'baz' in u.friends)
1
>>> User.find_one().delete()
>>> User.count()
2
Package: odbo
odbo is a tool to simplify the distribution of pandas DataFrames as CSV
and database files.It analyses a text file and spits out SQL that creates a database table
and loads data into that table.It is similar to to the blazeodoproject, and hence carries a similar name. It was previously called
“datapkg”, but it seems that this name is [already taken].Examplesmysql_install_db--no-defaults--basedir=$HOME/anaconda--datadir=$HOME/tmp/mysql_dbmysqld--no-defaults--basedir=$HOME/anaconda--datadir=$HOME/tmp/mysql_dbTODO[ ] Lower flake8 max-complexity to 10.[ ] PostgreSQL support.[ ] HDF5 support.[ ] MariaDB CollumnStore support.ContributingMake sure all tests pass before merging into master.Follow the PEP8 / PyFlake / Flake8 / etc. guidelines.Add tests for new code.Try to document things.Break any / all of the above if you have a good reason.
Package: odb-plotter
ODBPlotterDevelopmentODB Plotter is being developed byCMML, and as such has a focus on Additive Manufacturing Thermal models (especially for Wire Arc Directed Energy Deposition) though it may work for other applications.Install with pippipinstallodb-plotterSeeGETTING STARTEDfor basic tutorial.See [example_odbs] for the small .odb files used to benchmark ODBPlotter
Package: odcantoolkit
Overviewodcantoolkit is a command line tool used to fetch datasets directly fromCanada’s open data portal. The data is then
converted to JSON format and can be loaded directly into a MongoDB
database.Currently supported file formats: * CSVInstallationThe script can be simply installed via pippip install odcantoolkitUsageJSON modeodcantoolkit json [--filetype FILETYPE] idThe id is taken from a dataset’s URL. To fecththisdataset, the command would be :odcantoolkit json 4deb7637-3613-4012-84a2-882b06ab7458MongoDB modeodcantoolkit mongo [-h] [--fileformat FILEFORMAT FILEFORMAT]
                    [--dbname DBNAME] [--collection COLLECTION] [--host HOST]
                    [--port PORT]
                    id
Package: odc-client
odc-clientA small CLI tool to help with working with the ODC Server used in 2AMD15.InstallationThe package is available onPyPi.pipinstallodc-clientUsageFirst initialize the configuration fileodc-clientinitThis command will prompt you for the required information. Next, you can submit your project usingodc-clientsubmitIt will automatically try to detect whether you have a Java or Python project by checking for apom.xmlfile.
For more information use the--helpflag. It also supports uploading the data files.
Package: odc-cloud
odc.cloudVarious cloud access helper methods.This package ships several namespaces:odc.aws.S3 and other AWS resourcesodc.aio.S3 but async, depends (needs[ASYNC]feature flag, pulls inaiobotocore)odc.azure.Azure blob storage traversal helpers (needs[AZURE]feature flag)odc.thredds.THREDDS traversal helper method (needs[THREDDS]feature flag)Installationpip install odc-cloudUsageTODO
Package: odc-geo
This library combines geometry shape classes fromshapelywith CRS frompyprojto provide
projection awareGeometry. It exposes all the functionality provided byshapelymodules, but
will refuse operations between geometries defined in different projections. Geometries can be
brought into a common projection withGeometry.to_crsmethod.Based on that foundation a number of data types and utilities useful for working with geospatial
metadata are implemented. Of particular importance isGeoBox. It is an abstraction for a
geo-registered bounded pixel plane where a linear mapping from pixel coordinates to the real world
is defined.To make working with geo-registered raster data easier an integration withxarrayis provided.
Importingodc.geo.xrenables the.odc.accessor on everyxarray.Datasetandxarray.DataArray. This exposes geospatial information of a raster loaded withOpen Datacubeorrioxarray. Methods for attaching geospatial information to xarray objects in a robust way are
also provided. Geospatial information attached in this way survives most operations you might do on
the data: basic mathematical operations, type conversions, cropping, serialization to most formats
like zarr, netcdf, GeoTIFF.For more details seeDocumentation.OriginsThis repository contains geometry related code extracted fromOpen Datacube.For details and motivation seeODC-EP-06enhancement proposal.
Package: odcommonapp
object_detection_common_applicationThis repo will help to predict the object with in image using various framework like TF2 ,Detectron and Yolo5 and also user can choose the model they need to experimentHow to use?
Fork or clone the repo.
1.Create the separate conda or virtual envoriment.
2.pip install -r requirements.txt
3. Run
python clientApp.pyNote:If already model copied into respective framework model folder it won't download. Otherwise first time detection the model will download.TF2 Models Prediction:1.EfficientDet D1 640x640:Terminal Output:
No_of_objects_detected_by_mode: 3Time Taken to execute the model 86.158927917480472.SSD MobileNet v2 320x320:Terminal Output:
No_of_objects_detected_by_mode: 8Time Taken to execute the model 27.623580217361453.SSD MobileNet V2 FPNLite 320x320:Terminal Output:No_of_objects_detected_by_mode: 5Time Taken to execute the model 27.0805492401123054.Faster R-CNN ResNet50 V1 640x640:Terminal Output:
No_of_objects_detected_by_mode: 8Time Taken to execute the model 78.909513473510745.Faster R-CNN ResNet101 V1 640x640:Terminal Output:No_of_objects_detected_by_mode: 9Time Taken to execute the model 189.88386058807373Detectron2 Models Prediction:The model will download and  stored into your local PC following path:C:\Users<username>.torch\iopath_cache\detectron2\COCO-Detection1.R50-FPN:(faster_rcnn_R_50_FPN_1x)Terminal Output:
The no.of object detected by model are: 10['bowl 99%', 'chair 98%', 'refrigerator 95%', 'sink 93%', 'oven 81%', 'bottle 66%', 'dining table 61%', 'vase 61%', 'cup 58%', 'bowl 57%']Time Taken to execute the model 25.725471496582032.R50-C4:(faster_rcnn_R_50_C4_1x)Terminal Output:The no.of object detected by model are: 8
['bowl 99%', 'bowl 98%', 'bowl 96%', 'bowl 95%', 'carrot 95%', 'carrot 93%', 'carrot 77%', 'dining table 72%']
Time Taken to execute the model 27.7405867576599123.R101-FPN (faster_rcnn_R_101_C4_3x)Terminal Output:
The no.of object detected by model are: 8
['bowl 99%', 'dining table 96%', 'broccoli 95%', 'cake 94%', 'broccoli 84%', 'broccoli 80%', 'broccoli 76%', 'sandwich 75%']
Time Taken to execute the model 46.389653444290164.R101-FPN (faster_rcnn_R_101_FPN_3x)Terminal Output:
The no.of object detected by model are: 20
['clock 100%', 'clock 100%', 'car 99%', 'person 99%', 'person 98%', 'person 98%', 'person 96%', 'person 96%', 'person 94%', 'car 90%', 'fire hydrant 77%', 'handbag 75%', 'person 75%', 'person 74%', 'person 60%', 'stop sign 59%', 'traffic light 59%', 'person 59%', 'person 57%', 'oven 56%']
Time Taken to execute the model 31.190783977508545YOLO51.YOLOv5sTerminal O/P:
1 bowl, 1 sandwich, 1 dining table
Time Taken to execute the model 4.3142466545104982.YOLOv5mTerminal O/P:14 persons, 1
baseball bat, 1 baseball glove, Done. (0.441s)3.YOLOv5l3 bowls, 1 apple, 2 chairs, 1 dining table, 1 microwave, 1 oven, 1 sink, 1 refrigerator, Done. (1.559s)
Terminal O/P:4.YOLOv5xTerminal O/P:
8 persons, 2 cars, 2 clocks, Done. (2.369s)5.YOLOv5s6Terminal O/P:
12 persons, 9
chairs, 1 dining table, 1 tv, 1 clock, Done. (1.738s)
Package: odc-pycommons
OculusD Client Libraries - Common LibrariesThese libraries are supporting libraries for other OculusD.com Inc projects.More details and documentation will follow in the near future.This is an initial development effort in very early stages (Alpha) and no
guarantees are made in terms of production readiness at this stage.InstallationQuick InstallUsing pip:$pipinstallodc-pycommonsInstallation from SourceAs with most other GitHub projects, the basic steps of clone, build and install
should be followed. Below is a very simple example:$gitclonehttps://github.com/oculusd/odc_pycommons.git
$cdodc_pycommons
$python3setup.pysdist
$pip3installdist/odc_pycommons-0.0.1.tar.gzDebuggingYou can enable debugging be setting the environment variableDEBUGto anything
else than'0'. On Linux, you can accomplish this by running the following at
the command prompt:$ export DEBUG=1.Below is a simple example of the output that will now be printed toSTDOUT:>>>fromodc_pycommons.modelsimportCommsRequest,CommsRestFulRequest,CommsResponse*debugenabled>>>fromodc_pycommons.commsimportget>>>req=CommsRequest(uri='https://www.york.ac.uk/teaching/cws/wws/webpage1.html')>>>resp=get(request=req)*debuggingGETrequestsend:b'GET /teaching/cws/wws/webpage1.html HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.york.ac.uk\r\nUser-Agent: Python-urllib/3.7\r\nConnection: close\r\n\r\n'reply:'HTTP/1.1 200 OK\r\n'header:Dateheader:Serverheader:Accept-Rangesheader:Cache-Controlheader:Expiresheader:Varyheader:X-Frame-Optionsheader:Content-Lengthheader:Connectionheader:Content-Type>>>resp.response_code200Third Party DependenciesThe following third party libraries are used in this project:email-validatorpyyamlPlease refer to the various third party suppliers home pages for specific
licensing information.Installation:$pip3installemail-validatorpyyamlNeed more help?Try one of these resources:The project WikiAnd don't forget tocheck/log issuesAlso consider theprimary documentationFinally, you can also reach us onDiscordorTwitter
Package: odc-stac
odc.stacLoad STAC items intoxarrayDatasets. Process locally or distribute data
loading and computation withDask.Usageodc.stac.loadcatalog=pystac_client.Client.open(...)query=catalog.search(...)xx=odc.stac.load(query.get_items(),bands=["red","green","blue"],)xx.red.plot.imshow(col="time")For more details seeDocumentationandSample Notebooks, or try it out onBinder.InstallationUsing pippipinstallodc-stacTo install withbotocoresupport (for working with AWS):pipinstall'odc-stac[botocore]'Using CondaThis package is be available onconda-forgechannel:condainstall-cconda-forgeodc-stacFrom unreleased sourceTo use development version ofodc-stacinstall dependencies fromconda, then
installodc-stacwithpip.Sampleenvironment.ymlis provided below.channels:-conda-forgedependencies:-odc-geo >=0.1.3-xarray >=0.20.1-numpy-dask-pandas-affine-rasterio-toolz-pystac-pystac-client-pip =22-pip:-"git+https://github.com/opendatacube/odc-stac/"DevelopingTo developodc-staclocally using pip (assuming you havevirtualenvwrapperinstalled):gitclonehttps://github.com/opendatacube/odc-staccdodc-stacmkvirtualenvodc-stacpipinstall-e.pipinstall-rrequirements-dev.txtRun tests withpytest:pytestLinting is provided bymypy,pylint, andblack:black--check.pylint-vodcmypyodc
Package: odc-typer-test
odc-typer-testAwesome CLI user manager. Based onthis tutorial.Usage:$odc-typer-test[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:create: Create a new user with USERNAME.delete: Delete an existing user with USERNAME.delete-all: Delete all users in the database.init: Initialize the user database.odc-typer-test createCreate a new user with USERNAME.Usage:$odc-typer-testcreate[OPTIONS]USERNAMEArguments:USERNAME: The name of user to create.  [required]Options:--help: Show this message and exit.odc-typer-test deleteDelete an existing user with USERNAME.If --force is not used, confirmation is required.Usage:$odc-typer-testdelete[OPTIONS]USERNAMEArguments:USERNAME: The name of user to delete.  [required]Options:--force / --no-force: Force deletion without confirmation.  [required]--help: Show this message and exit.odc-typer-test delete-allDelete all users in the database.If --force is not used, confirmation is required.Usage:$odc-typer-testdelete-all[OPTIONS]Options:--force / --no-force: Force deletion without confirmation.  [required]--help: Show this message and exit.odc-typer-test initInitialize the user database.Usage:$odc-typer-testinit[OPTIONS]Options:--help: Show this message and exit.
Package: odc-ui
odc.uiNotebook display helper methodsInstallationpip install odc-uiMake sureipywidgetsandipyleafletare installed and enabled:jupyter nbextension enable --py widgetsnbextension
jupyter nbextension enable --py ipyleafletIf using jupyter lab do this as well:jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager
jupyter labextension install --no-build jupyter-leaflet
jupyter lab buildUsageTODO
Package: odd-airflow2-integration
Open Data Discovery Airflow 2 IntegratorAirflow plugin which tracks DAGs, tasks, tasks runs and sends them to the platform since DAG is run viaAirflow ListenersRequirementsPython >= 3.9Airflow >= 2.5.1Presenceof an HTTP Connection with the name 'odd'. That connection must have ahostproperty with yours
platforms host(fill aportproperty if required) and apasswordfield with platform collectors token.
This connection MUST be represented before your scheduler is in run, we recommend usingAWS Param store,
Azure KV or similar backends.InstallationThe package must be installed alongside Airflowpoetryaddodd-airflow2-integration# orpipinstallodd-airflow2-integrationLineageTo build a proper lineage for tasks we need somehow to deliver the information
about what are the inputs and outputs for each task. So we decided to follow the
old Airflow concepts for lineage creation and use theinletsandoutletsattributes.Soinlets/outletsattributes are being used to list Datasets' ODDRNs that
are considered to be the inputs/outputs for the task.Example of defininginletsandoutletsusing TaskFlow:@task(task_id="task_2",inlets=["//airflow/internal_host/dags/test_dag/tasks/task_1",],outlets=["//airflow/internal_host/dags/test_dag/tasks/task_3",])deftransform(data_dict:dict):passtask_2=transform()Example using Operators:task_2=PythonOperator(task_id="task_2",python_callable=transform,inlets=["//airflow/internal_host/dags/test_dag/tasks/task_1",],outlets=["//airflow/internal_host/dags/test_dag/tasks/task_3",])Also it is worth to mention that neitherinletsnoroutletscan not be
templated using thetemplate_fieldsof Operators that have this option.
More information about this topic is presented in the comment section for
the followingissue.
Package: odd-cli
OpenDataDiscovery CLICommand line tool for working with OpenDataDiscovery.
It makes it easy to create token though console and ingest local dataset's metadata to OpenDataDiscovery platform.Installationpipinstallodd-cliAvailable commands╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                              │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────╮
│ collect                       Collect and ingest metadata for local files from folder      │
│ dbt                           Run dbt tests and inject results to ODD platform             │
│ tokens                        Manipulate OpenDataDiscovery platform's tokens               │
╰────────────────────────────────────────────────────────────────────────────────────────────╯Env variables used for commandsODD_PLATFORM_HOST- Location of OpenDataDiscovery Platform.ODD_PLATFORM_TOKEN- Collector token, can be created usingUIorodd tokens createcommand.CommandsCreate collector token.oddtokenscreate<collector_name>Parse and ingest local filesoddcollect<path_to_folder_with_datasets>Run dbt tests and inject results to ODD platform. It usesodd-dbtpackage.odddbttest<path_to_dbt_project>
Package: odd-dbt
OpenDataDiscovery dbt tests metadata collectingCLI tool helps run and ingest dbt test to platform.It can be used as separated CLI tool or withinODD CLIpackage which
provides some useful additional features for working with OpenDataDiscovery.Supported adaptersAdapterversionSnowflake^1.6Postgres^1.6Profiles inside the file looks different for each type of data source.Snowflakehost_settings value is created from fieldaccount. Field value should be<account_identifier>For example the URL for an account uses the following format:<account_identifier>.snowflakecomputing.com
Example Snowflake account identifierhj1234.eu-central-1.Supported tests typesGeneric testsSingular tests. Currently Singular tests are not supported.Installationpip install odd-dbtTo see all available commandsodd_dbt_test --helpExampleFor each command that involves sending information to OpenDataDiscovery platform exists set of env variables:ODD_PLATFORM_HOST- Where you platform isODD_PLATFORM_TOKEN- Token for ingesting data to platform (How to createtoken?)DBT_DATA_SOURCE_ODDRN- Unique oddrn string describes dbt source, i.e '//dbt/host/localhost'It is recommended to add them as ENV variables or provide as flags to each commandexport ODD_PLATFORM_HOST=http://localhost:8080
export ODD_PLATFORM_TOKEN=token***
export DBT_DATA_SOURCE_ODDRN=//dbt/host/localhostCommandscreate-datasource- helps to register dbt as data source at OpenDataDiscovery platform. User later for ingesting metadata.odd_dbt_test create-datasource --name=my_local_dbt --dbt-host=localhostingest-test- Read results_run file under the target folder to parse and ingest metadata.odd_dbt_test ingest-test --profile=my_profiletest- Proxy command todbt test, then reads results_run file under the target folder to parse and ingest metadata.odd_dbt_test test --profile=my_profileRun commands programmaticallyYou could run that scrip to read, parse and ingest test results to the platform.# ingest_test_result.pyfromodd_dbtimportconfigfromodd_dbt.domain.cli_argsimportCliArgsfromodd_dbt.libs.dbtimportget_contextfromodd_dbt.libs.oddimportcreate_dbt_generator_from_oddrnfromodd_dbt.service.oddimportingest_entitiesfromodd_dbt.mapper.test_resultsimportDbtTestMapperfromodd_dbt.mapper.lineageimportDbtLineageMappercfg=config.Config()# All fields can be set manually or read from ENV variablesclient=config.create_odd_client(host=cfg.odd_platform_host,token=cfg.odd_platform_token)generator=create_dbt_generator_from_oddrn(oddrn=cfg.dbt_data_source_oddrn)cli_args=CliArgs.default()context=get_context(cli_args=cli_args)# Ingest lineagedata_entities=DbtLineageMapper(context=context,generator=generator).map()ingest_entities(data_entities,client)# Or ingest test resultsdata_entities=DbtTestMapper(context=context,generator=generator).map()ingest_entities(data_entities,client)