Skip to content

Instantly share code, notes, and snippets.

View edmondop's full-sized avatar

Edmondo Porcu edmondop

View GitHub Profile
datasets:
- from: databricks:spiceai.datasets.my_awesome_table // A reference to a table in the Databricks unity catalog
name: my_delta_lake_table
params:
endpoint: "https://dbc-a1b2345c-d6e7.cloud.databricks.com"
@edmondop
edmondop / config.json
Created January 29, 2024 14:57
AWS Step
{
"ChoiceStateX": {
"Type": "Choice",
"Choices": [
{
"Not": {
"Variable": "$.type",
"StringEquals": "Private"
},
"Next": "Public"
Package: regexcite
Title: Make Regular Expressions More Exciting
Version: 0.0.0.9000
Authors@R:
person("Edmondo", "Porcu", , "edmondo.porcu@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))
Description: Convenience functions to make some common tasks with string
manipulation and regular expressions a bit easier.
License: MIT + file LICENSE
Encoding: UTF-8
@edmondop
edmondop / remove_metadata.js
Created September 7, 2020 14:19
Remove metadata from unlocked packages
metadataElements = [{
name: 'CGS Score',
metadataType : 'Custom Field',
parentObject : 'Account' // can be undefined
},
{
name: 'Rating Value',
metadataType : 'Custom Field',
parentObject : 'Account' // can be undefined
Account.AnnualRevenue Age Role Likely_Member__c
10000 20 CEO True
100000 45 CFO False
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.externaltask.LockedExternalTask;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.model.bpmn.Bpmn;
import org.camunda.bpm.model.bpmn.BpmnModelInstance;
import java.util.List;
@edmondop
edmondop / chart-data-parser.ts
Created April 26, 2018 16:40
chart-data-parser
import {ChartData} from "chart.js";
import {getDateOfISOWeek, getDateStringOfISOWeek, getWeekNumber} from "../../../commons/src";
import {addMonths, addWeeks, differenceInCalendarMonths, differenceInCalendarWeeks, isPast, isFuture, addDays} from 'date-fns';
import {range} from 'lodash';
export interface IAdvanceSummaryData{
Invoicer__c?: string;
paidBackOnTime: number;
paidBackLate: number;
import {ChartData} from "chart.js";
import {getDateOfISOWeek, getDateStringOfISOWeek, getWeekNumber} from "../../../commons/src";
import {addMonths, addWeeks, differenceInCalendarMonths, differenceInCalendarWeeks, isPast, isFuture, addDays} from 'date-fns';
export interface IMonthlyChartData {
Invoicer__c?: string;
Reviewed_Agreed_Payment_Date__c?: string;
Agreed_Payment_Date__c?: string;
year?: number;
month?: number;
@edmondop
edmondop / before.ts
Created April 24, 2018 14:18
Duplication
1
2
3
4
5
class SimpleJoin(streamsConfiguration:Map[String,AnyRef]){
private val builder = new KStreamBuilder
private val myStream = builder.stream[Integer,MyClass](Serdes.Integer(),myClassSerde, "mytopic")
private val myTable: KTable[Integer, MyClass] = myStream.groupBy(new KeyValueMapper[Integer,MyClass,Integer] {
override def apply(key : Integer,