Skip to content

Instantly share code, notes, and snippets.

1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@Nikolay-Lysenko
Nikolay-Lysenko / upsert_from_pandas_to_postgres.py
Last active January 5, 2022 06:08
Upsert (a hybrid of insert and update) from pandas.DataFrame to PostgreSQL database
from time import sleep
from io import StringIO
import psycopg2
def upsert_df_into_postgres(df, target_table, primary_keys, conn_string,
n_trials=5, quoting=None, null_repr=None):
"""
Uploads data from `df` to `target_table`
@kinlane
kinlane / api.json
Last active August 12, 2020 00:54
Sample api.json
{
"name": "API Evangelist",
"description": "This is an inventory of APIs available as part of the API Evangelist network.",
"image": "https://s3.amazonaws.com/kinlane-productions/api-evangelist/t-shirts/KL_InApiWeTrust-1000.png",
"tags": [
"application programming interface",
"API",
"News",
"Analysis"
],