AES Solar and others (PV Investors) v. Spain: The Role of Nationality, Control, and MFN in Investor-State Arbitration
In AES Solar PV Investors v Spain, an issue that came to light was centered on the debate over the Tribunal’s jurisdiction in relation to the 62 out of 88 Claimants incorporated in Spain. Spain contended that these Claimants, as entities incorporated within the country, could not bring claims in an UNCITRAL arbitration under Article […]
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 […]
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
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
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
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 […]
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 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. […]