Skip to content

Instantly share code, notes, and snippets.

View albuquerquejp's full-sized avatar

João Paulo Albuquerque albuquerquejp

  • Toro Investimentos
  • RN, Brazil
View GitHub Profile
@gordthompson
gordthompson / mssql_df_upsert.py
Last active June 21, 2024 11:39
Build a T-SQL MERGE statement and upsert a DataFrame
# Copyright 2024 Gordon D. Thompson, gord@gordthompson.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@tomsing1
tomsing1 / luigi_first_steps.md
Last active June 19, 2024 21:52
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,

@stefansundin
stefansundin / requests_api.py
Last active July 25, 2024 08:21
Reusable class for Python requests library.
# http://docs.python-requests.org/en/master/api/
import requests
class RequestsApi:
def __init__(self, base_url, **kwargs):
self.base_url = base_url
self.session = requests.Session()
for arg in kwargs:
if isinstance(kwargs[arg], dict):
kwargs[arg] = self.__deep_merge(getattr(self.session, arg), kwargs[arg])