Jupyter notebooks showing best practices for using cx_Oracle, the Python DB API for Oracle Database

Overview

Python cx_Oracle Notebooks, 2022

The repository contains Jupyter notebooks showing best practices for using cx_Oracle, the Python DB API for Oracle Database.

I am releasing them one-by-one.

The final list of notebooks will be:

  • Connecting
  • Queries
  • DML
  • CSV
  • JSON and SODA
  • PL/SQL
  • Objects

You may also be interested in the tutorial Python and Oracle Database Tutorial: Scripting for the Future. This is also found in "LiveLabs" format here, which lets you easily run it in Oracle Cloud.

Setup

An existing Oracle Database is required.

The JSON demo assumes Oracle Database and Oracle Client are 21c.

Install Python 3

See https://www.python.org/downloads/

Install Jupyter

See https://jupyter.org/install:

pip install notebook

Install cx_Oracle

See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html:

pip install cx_Oracle

Install some libraries used by the examples:

pip install numpy matplotlib

To setup the cx_Oracle sample tables

On macOS set up libclntsh by finding the library directory

python
import cx_Oracle
cx_Oracle
exit()

With the appropriate path from above, create a sym link:

ln -s $HOME/Downloads/instantclient_19_8/libclntsh.dylib $HOME/.local/lib/python3.9/site-packages/

Create the cx_Oracle sample schema

Clone/download https://github.com/oracle/python-cx_Oracle/tree/master/samples

git clone https://github.com/oracle/python-cx_Oracle.git
rm -rf python-cx_Oracle/doc python-cx_Oracle/odpi python-cx_Oracle/src python-cx_Oracle/test python-cx_Oracle/*.* python-cx_Oracle/.git*

cd python-cx_Oracle/samples

Review python-cx_Oracle/samples/README.md

Edit python-cx_Oracle/samples/sample_env.py and set desired credentials and connection string

export CX_ORACLE_SAMPLES_MAIN_USER=pythondemo
export CX_ORACLE_SAMPLES_MAIN_PASSWORD=welcome
export CX_ORACLE_SAMPLES_EDITION_USER=pythoneditions
export CX_ORACLE_SAMPLES_EDITION_PASSWORD=welcome
export CX_ORACLE_SAMPLES_EDITION_NAME=python_e1
export CX_ORACLE_SAMPLES_CONNECT_STRING=localhost/orclpdb1
export CX_ORACLE_SAMPLES_DRCP_CONNECT_STRING=localhost/orclpdb1:pooled
export CX_ORACLE_SAMPLES_ADMIN_USER=system
export CX_ORACLE_SAMPLES_ADMIN_PASSWORD=oracle

Install the schema

python setup_samples.py

Start Jupyter:

cd ../..
jupyter notebook

Load each notebook *.ipynb file and step through it

Before running the notebooks cells, edit the connect string(s) near the top of each notebook.

The Connection notebook has an example that connects to Oracle Cloud. The wallet setup shown in the notebook is needed for this to be runnable. Also run export CLOUD_PASSWORD="whatever" before starting that notebook.

Owner
Christopher Jones
https://twitter.com/ghrd
Christopher Jones
Repository accompanying the "Sign Pose-based Transformer for Word-level Sign Language Recognition" paper

by Matyáš Boháček and Marek Hrúz, University of West Bohemia Should you have any questions or inquiries, feel free to contact us here. Repository acco

Matyáš Boháček 30 Dec 30, 2022
Denoising Normalizing Flow

Denoising Normalizing Flow Christian Horvat and Jean-Pascal Pfister 2021 We combine Normalizing Flows (NFs) and Denoising Auto Encoder (DAE) by introd

CHrvt 17 Oct 15, 2022
Code for the CVPR 2021 paper: Understanding Failures of Deep Networks via Robust Feature Extraction

Welcome to Barlow Barlow is a tool for identifying the failure modes for a given neural network. To achieve this, Barlow first creates a group of imag

Sahil Singla 33 Dec 05, 2022
A python-image-classification web application project, written in Python and served through the Flask Microframework

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and

Gerald Maduabuchi 19 Dec 12, 2022
PyTorch implementation of the WarpedGANSpace: Finding non-linear RBF paths in GAN latent space (ICCV 2021)

Authors official PyTorch implementation of the "WarpedGANSpace: Finding non-linear RBF paths in GAN latent space" [ICCV 2021].

Christos Tzelepis 100 Dec 06, 2022
Lenia - Mathematical Life Forms

For full version list, see Timeline in Lenia portal [2020-10-13] Update Python version with multi-kernel and multi-channel extensions (v3.4 LeniaNDK.p

Bert Chan 3.1k Dec 28, 2022
Share a benchmark that can easily apply reinforcement learning in Job-shop-scheduling

Gymjsp Gymjsp is an open source Python library, which uses the OpenAI Gym interface for easily instantiating and interacting with RL environments, and

134 Dec 08, 2022
PyTorch implementation of 'Gen-LaneNet: a generalized and scalable approach for 3D lane detection'

(pytorch) Gen-LaneNet: a generalized and scalable approach for 3D lane detection Introduction This is a pytorch implementation of Gen-LaneNet, which p

Yuliang Guo 233 Jan 06, 2023
R interface to fast.ai

R interface to fastai The fastai package provides R wrappers to fastai. The fastai library simplifies training fast and accurate neural nets using mod

113 Dec 20, 2022
Improving adversarial robustness by a coupling rejection strategy

Adversarial Training with Rectified Rejection The code for the paper Adversarial Training with Rectified Rejection. Environment settings and libraries

Tianyu Pang 29 Jan 06, 2023
Here is the implementation of our paper S2VC: A Framework for Any-to-Any Voice Conversion with Self-Supervised Pretrained Representations.

S2VC Here is the implementation of our paper S2VC: A Framework for Any-to-Any Voice Conversion with Self-Supervised Pretrained Representations. In thi

81 Dec 15, 2022
Automatic packaging of the open-composite libs for OvGME

OvGME Packager for OpenXR – OpenComposite for DCS Note This repository is currently unsupported and needs to be migrated to the upstream OpenComposite

12 Nov 03, 2022
“英特尔创新大师杯”深度学习挑战赛 赛道3:CCKS2021中文NLP地址相关性任务

基于 bert4keras 的一个baseline 不作任何 数据trick 单模 线上 最高可到 0.7891 # 基础 版 train.py 0.7769 # transformer 各层 cls concat 明神的trick https://xv44586.git

孙永松 7 Dec 28, 2021
Pca-on-genotypes - Mini bioinformatics project - PCA on genotypes

Mini bioinformatics project: PCA on genotypes This repo contains the code from t

Maria Nattestad 8 Dec 04, 2022
NICE-GAN — Official PyTorch Implementation Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation

NICE-GAN-pytorch - Official PyTorch implementation of NICE-GAN: Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation

Runfa Chen 208 Nov 25, 2022
The project page of paper: Architecture disentanglement for deep neural networks [ICCV 2021, oral]

This is the project page for the paper: Architecture Disentanglement for Deep Neural Networks, Jie Hu, Liujuan Cao, Tong Tong, Ye Qixiang, ShengChuan

Jie Hu 15 Aug 30, 2022
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]

Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [BCNet, CVPR 2021] This is the official pytorch implementation of BCNet built on

Lei Ke 434 Dec 01, 2022
Code accompanying "Learning What To Do by Simulating the Past", ICLR 2021.

Learning What To Do by Simulating the Past This repository contains code that implements the Deep Reward Learning by Simulating the Past (Deep RSLP) a

Center for Human-Compatible AI 24 Aug 07, 2021
Implementation of Google Brain's WaveGrad high-fidelity vocoder

WaveGrad Implementation (PyTorch) of Google Brain's high-fidelity WaveGrad vocoder (paper). First implementation on GitHub with high-quality generatio

Ivan Vovk 363 Dec 27, 2022
Chess reinforcement learning by AlphaGo Zero methods.

About Chess reinforcement learning by AlphaGo Zero methods. This project is based on these main resources: DeepMind's Oct 19th publication: Mastering

Samuel 2k Dec 29, 2022