MEHMET BALiOGLU

How to Generate OpenAI GPT Output in JSON Format Using Python for Legal Text Analysis

JSON output with OpenAI GPT function calls

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

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 […]

VS Code : Automatically Push after Commit

If you want to automatically push to a GitHub repository after commit, Gitlens extension in VS Code has a setting to make this possible. You just change the git.postCommitCommand setting and then when you commit and it pushes simultaneously. Open GitLens Extension Settings. Search for git.postCommitCommand . click on the dropdown menu and change none […]

[Easy] Remove Duplicates but Keep One Row With Maximum Value in Another Column

Remove Duplicates in Data

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 […]

How to Access Localhost of a Remote Server

localhost

In this article, we will show how to access localhost of a remote server. Localhost corresponds to the hostname of the device that currently runs your application. It is the DNS name for the local loop back address, which is 127.0.0.1 . So, instead of 127.0.0.1 , you type localhost. We use the localhost to […]

How to Fix “sqlldr: not found” Problem

I was trying to set a cron job which would load a Pandas dataframe to Oracle table once in an hour. When I run the Python code, the code works without any issues, however when I set the cron job it threw the following error. The problem stems from the fact that when you are […]

Sql Developer Export to Excel With One Line of Code

Export SQL Query Results to Excel File

Sometimes you may need to get the results of the SQL query to a .csv file or an Excel file. Perhaps you want to open it in Excel and make some alterations or some calculations as Excel still offers more convenience compared to SQL, particularly for relatively smaller datasets, or may be you want to […]

How to install Sql Loader on Linux

You are able to load data from an external source into a table in the database using SQL*Loader. It is capable of reading and understanding a wide variety of delimited file types, including CSV, or any other type of delimited files. In this post, I am going to show how to install SQL Loader on Linux. […]