Skip to content

Instantly share code, notes, and snippets.

View da115115's full-sized avatar

Denis A da115115

  • France
  • 08:59 (UTC +02:00)
View GitHub Profile

Advanced SQL techniques for beginners

image by author

On a scale from 1 to 10 how good are your data warehousing skills? Want to go above 7/10? This article is for you then.

How good is your SQL? Want to get ready for a job interview asap? This blog post explains the most intricate data warehouse SQL techniques in high detail. I will use BigQuery standard SQL dialect to scribble down a few thoughts on this.

1. Incremental tables and MERGE

@ChristopherA
ChristopherA / Mermaid_on_Github_Examples.md
Last active September 19, 2024 18:39
Mermaid on Github Examples

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B-->C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.
@alexcpn
alexcpn / kubeflow in kind cluster.md
Last active August 27, 2024 21:31
Making kubeflow work in Kind

We will use the maifest way of installing Kubeflow -https://github.com/kubeflow/manifests

Create a Kind cluster with Service Account Signing key for API Server for Kubeflow to work (Istio Needs it) like below

cat <<EOF | kind create cluster --name=kubeflow  --kubeconfig /home/alexpunnen/kindclusters/mycluster.yaml --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
@abadger
abadger / gist:0b5b8a2b82049bc56cf753b1ccb4f2fc
Last active February 20, 2020 17:12
sample spec file for the netbox_community.ansible_modules collection
Name: ansible-collection-netbox_community-ansible_modules
Version: 0.1.6
Release: 1%{?dist}
Summary: Miscellaneous modules for Ansible Playbooks
# note: The netbox collection has inconsistent licensing! There's an MIT
# license file but the headers to all of the source code say GPLv3+. So it's
# probably all GPLv3+ (unless the author has permission to get all of the code
# relicensed)
License: MIT and GPLv3+
@alexprengere
alexprengere / check_missing_cities.py
Last active April 30, 2020 06:43
Check airports not connected to a big city
from neobase import NeoBase
N = NeoBase()
for key in N:
N.set(key, city_codes=set(N.get(key, "city_code_list")))
for key in sorted(N):
if "A" not in N.get(key, "location_type"):
continue
@jsoma
jsoma / README.md
Last active September 8, 2022 13:37
Installing cartopy inside of a pipenv virtual environment using GEOS/GDAL/PROJ from Homebrew

Install all of your "real" geo dependencies using homebrew

brew install proj
brew install geos
brew install gdal

Create your pipenv

@drmalex07
drmalex07 / README-submit-to-livy.md
Last active December 30, 2021 14:25
An example submit to Apache Livy. #livy #spark

README - Submit to Livy using REST API

See https://livy.apache.org/docs/latest/rest-api.html

Let app.json be the JSON payload that represents the application:

{
    "file": "hdfs:///user/user/apps/hello-spark-0.0.1.jar",
    "className": "acme.hello_spark.Grep",
 "args": ["input/1.txt", "[Mm]agic"],
@quadrismegistus
quadrismegistus / pyvis_for_networkx.py
Last active July 20, 2023 12:59
Draw Networkx Graph with Pyvis
def draw_graph3(networkx_graph,notebook=True,output_filename='graph.html',show_buttons=True,only_physics_buttons=False):
"""
This function accepts a networkx graph object,
converts it to a pyvis network object preserving its node and edge attributes,
and both returns and saves a dynamic network visualization.
Valid node attributes include:
"size", "value", "title", "x", "y", "label", "color".
(For more info: https://pyvis.readthedocs.io/en/latest/documentation.html#pyvis.network.Network.add_node)
@da115115
da115115 / getGitHubLatestRelease.sh
Created May 18, 2019 11:10
Extract the release tag (version) of the latest release of a given GitHub repository, potentially for specific OS, architecture and package type
#!/bin/bash
git_repo="containernetworking/plugins"
os="linux"
arch="amd64"
pack="tgz"
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]
then
echo
import pandas as pd
from sklearn import linear_model
X_0 = pd.DataFrame([[0,0], [1,0]] )
y_0 = pd.DataFrame([[0], [0]])
X_1 = pd.DataFrame([[0,1], [1,1], [1,1]])
y_1 = pd.DataFrame([[1], [1], [1]])