Skip to content

Instantly share code, notes, and snippets.

View OlivierAlbertini's full-sized avatar
🇨🇦

Olivier Albertini OlivierAlbertini

🇨🇦
View GitHub Profile
<?xml version="1.0" ?>
<template encoding-version="1.0">
<description></description>
<groupId>e5a5f628-0159-1000-afdb-0edd88ca8397</groupId>
<name>template-nifi-oauth2</name>
<snippet>
<connections>
<id>f66d8688-0159-1000-0000-000000000000</id>
<parentGroupId>e5a5f628-0159-1000-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
'use strict';
const benchmark = require('./benchmark');
const { CanonicalCode } = require('@opentelemetry/types')
const parseResponseStatus = (
statusCode
) => {
if (statusCode < 400) {
return { code: CanonicalCode.OK };
@OlivierAlbertini
OlivierAlbertini / class_decorator.ts
Created March 7, 2019 22:08 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@OlivierAlbertini
OlivierAlbertini / GitHub-Forking.md
Created January 30, 2019 14:50 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

--log_gc (Log heap samples on garbage collection for the hp2ps tool.)
type: bool default: false
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0
<template encoding-version="1.2">
<script/>
<description/>
<groupId>cc9c33a1-3651-11ee-82a4-3e6fcea768f9</groupId>
<name>gluoncv server</name>
<snippet>
<connections>
<id>28dd421a-33f8-3342-0000-000000000000</id>
<parentGroupId>d96510e9-35da-3e4a-0000-000000000000</parentGroupId>
<versionedComponentId>28dd421a-33f8-3342-bd54-3c5844b60e4b</versionedComponentId>
{"paragraphs":[{"user":"admin","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"sql","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1537824340385_837981519","id":"20180924-212540_1409823013","dateCreated":"2018-09-24T21:25:40+0000","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:352","text":"%jdbc(hive)\n\nCREATE EXTERNAL TABLE IF NOT EXISTS gluoncvyolo (imgname STRING, imgnamep STRING, class1 STRING, pct1 STRING, host STRING, shape STRING, `end` STRING, te STRING, battery INT, systemtime STRING, cpu DOUBLE, diskusage STRING, memory DOUBLE, id STRING) STORED AS ORC LOCATION '/gluoncvyolo'","dateUpdated":"2018-09-24T21:26:15+0000","dateFinished":"2018-09-24T21:26:15+0000","dateStarted":"2018-09-24T21:26:15+0000","results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows :
@OlivierAlbertini
OlivierAlbertini / new_task.py
Created July 25, 2018 18:13 — forked from quiver/new_task.py
rabbitmq : dead letter exchange example with python/pika
#!/usr/bin/env python
# http://www.rabbitmq.com/tutorials/tutorial-two-python.html
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
message = ' '.join(sys.argv[1:]) or "Hello World!"
@OlivierAlbertini
OlivierAlbertini / task-dag-creation.py
Created June 26, 2018 23:19 — forked from tmarthal/task-dag-creation.py
DAG Creation from within a PythonOperator task DOES NOT WORK
# -*- coding: utf-8 -*-
from airflow.operators.http_operator import SimpleHttpOperator
from airflow.operators.postgres_operator import PostgresOperator
from airflow.operators.subdag_operator import SubDagOperator
from airflow.operators.sensors import SqlSensor
from airflow.hooks.postgres_hook import PostgresHook
from airflow.operators.python_operator import PythonOperator
from airflow.models import Variable, DAG
# -*- coding: utf-8 -*-
from airflow.operators.http_operator import SimpleHttpOperator
from airflow.operators.postgres_operator import PostgresOperator
from airflow.operators.dummy_operator import DummyOperator
from airflow.hooks.postgres_hook import PostgresHook
from airflow.models import Variable, DAG
from datetime import date, datetime, timedelta