How to Generate OpenAI GPT Output in JSON Format Using Python for Legal Text Analysis
Generating consistent JSON output is now possible thanks to function calling feature in OpenAI’s gpt-4-0613 and gpt-3.5-turbo-0613 models. Function calling introduces a systematic approach to generating structured data. This capability allows for the precise definition of functions within the models, which then produce outputs in JSON format, as opposed to unstructured text. This development addresses the […]
[6 Lines Of Code] How To Connect Oracle Database In Python
Oracle is generous to give everyone a full cloud database for free. I am frequently using this database because Oracle SQL is really a powerful tool for data analysis. Currently, I create many CSV files, from webscraping, financial data from APIs, etc.. So, a connection between Python and Oracle database is an absolute requirement for […]
[Easy] Remove Duplicates but Keep One Row With Maximum Value in Another Column
I am using an API to download all crypto OHLCV data on a periodical basis using multiple timeframes. But there is a bug in the API: it downloads previous timeframe’s data along with the current one, a glitch which raises the duplication issue in the data. Duplicate data in a dataset is not uncommon and […]
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: “libclntsh.so: cannot open shared object file: No such file or directory”
I have Python script which inserts certain data to an Oracle Autonomous Database. I order to connect to the Oracle Database, I am using cx_Oracle module. When I run this script directly, there is no problem. However, when I tried to run a crontab it threw this error: A similar question is asked here. The […]
How to Install Oracle Client on Linux Easily
In this article, we will show you how to easily “install Oracle Client on Linux” and configure it, so that you can connect to your Oracle database. Whether you are using a local Linux machine or a cloud server with a Linux version installed on it, you may need to connect to a remote Oracle […]
Best Practices for Cloning a Github Repo to Local Macbook
In this post, I am going to show you best (and easy) practices for cloning a Github repo to your local macbook computer and create a virtual environment to contain your work. Cloning a Github repo means that we are create a copy of a Github repo in our local computer. All the files including […]