The aws_ext python package contains some useful functions (built on top of boto3) for managing some aws services. At the moment only some utilities for the Aws Glue Data catalog Installation pip install aws_ext Usage import boto3 import aws_ext session = boto3.session.Session() GLUE from aws_ext import glue_databases glue_client = session.client("glue") Extracting tables with (too) many versions glue_databases.get_tables_with_many_versions(glue_client, database_name="mydb", threshold=1) Deleting old tables versions glue_databases.delete_old_tables_versions(glue_client, database_name="mydb", keep=1, dryrun=True)

June 25, 2021 · 1 min · 67 words · Matteo Redaelli challenge Jun 2021 with #Prolog

My #prolog solution for “Where is gold?” proposed by challenge Jun 2021: 0 means empty, 1 means gold ?- solution(Box1,Box2,Box3). Box1 = Box3, Box3 = 0, Box2 = 1. below the code :-use_module(library(clpfd)). sentence1( 1,_Box2,_Box3). not_sentence1(0,_Box2,_Box3). sentence2( _Box1,0,_Box3). not_sentence2(_Box1,1,_Box3). sentence3( 0,_Box2,_Box3). not_sentence3(1,_Box2,_Box3). true_only_one_sentence(Box1, Box2, Box3):- ( sentence1(Box1,Box2,Box3), not_sentence2(Box1,Box2,Box3), not_sentence3(Box1,Box2,Box3) ) ; ( not_sentence1(Box1,Box2,Box3), sentence2(Box1,Box2,Box3), not_sentence3(Box1,Box2,Box3) ) ; ( not_sentence1(Box1,Box2,Box3), not_sentence2(Box1,Box2,Box3), sentence3(Box1,Box2,Box3) ). solution(Box1, Box2, Box3):- Box1 in 0..1, /* 0 empty, 1 gold */ Box2 in 0....

June 2, 2021 · 1 min · 98 words · Matteo Redaelli

GraphQL datasource for Qliksense

Qliksense datasource for GraphQL Apollo server apollo-datasource-qliksense is a Qliksense datasource for the GraphQL Apollo server. “Apollo is the industry-standard GraphQL implementation, providing the data graph layer that connects modern apps to the cloud.” Installation npm install apollo-datasource-qliksense Usage Below a very basic sample File index.js file: const resolvers = require('./resolvers'); const { ApolloServer, gql } = require('apollo-server'); const { makeExecutableSchema } = require('graphql-tools'); const { QliksenseDataSource } = require('apollo-datasource-qliksense'); const qliksense = new QliksenseDataSource("https://myqlikserver....

March 27, 2021 · 1 min · 202 words · Matteo Redaelli

qsense python library and command line tool for qliksense

qSense qsense is an python library and command line tool for qliksense Some useful commands export_remove_old_apps Export (published or passing any other filter) applications to qvd files qsense export_delete_old_apps ~/certificates/client.pem --target_path '/tmp' --modified_days=300 --last_reload_days=300 deallocate_analyzer_licenses_for_professionals Deallocate analyzer license fom users with a professional license qsense deallocate_analyzer_licenses_for_professionals ~/certificates/client.pem --nodryrun delete_removed_exernally_users Delete users that were removed externally (from active directory?) qsense delete_removed_exernally_users ~/certificates/client.pem GROUP --nodryrun

March 16, 2021 · 1 min · 66 words · Matteo Redaelli challenge Feb 2021 with #Prolog

My #swi #prolog solution for “Benchmark ‘Medical Services’” proposed by challenge Feb 2021 can be tested running a public docker image docker run -p 8888:8888 -d --name matteoredaelli/dmcommunity_org_2021_02:latest wget curl -XPOST -d @MedicalServices.json -H "Accept: application/json" -H "Content-type: application/json" http://localhost:8888/many The decision table is a set of prolog facts like decision_table('Office','acupuncture','PL123','L','Y','N','2015-01-01','2023-12-31','N','N','N'). decision_table('Outpatient','acupuncture','PL123','L','Y','N','2015-01-01','2023-12-31','N','N','N'). decision_table('Inpatient','acupuncture','PL123','L','N','N','2015-01-01','2023-12-31','N','N','N'). The core of the solution is inside the file parse_input(json([placeOfService=PlaceOfService, type=Type, plan=Plan, groupSize=GroupSize, inNetwork=InNetwork, isCovered=IsCovered, dateOfService=DateOfService, coveredInFull=_, copay=_, coInsurance=_]), json([placeOfService=PlaceOfService, type=Type, plan=Plan, groupSize=GroupSize, inNetwork=InNetwork, isCovered=IsCovered, dateOfService=DateOfService, coveredInFull=CoveredInFull, copay=Copay, coInsurance=CoInsurance])):- decision_table(PlaceOfService, Type, Plan, GroupSize, InNetwork, IsCovered, DateOfService1, DateOfService2, CoveredInFull, Copay, CoInsurance), %% check date: must be between the two dates in decision_table atom_string(DateOfService, DateOfServiceString), atom_string(DateOfService1, DateOfService1String), atom_string(DateOfService2, DateOfService2String), DateOfService1String @=< DateOfServiceString, DateOfServiceString @=< DateOfService2String....

February 2, 2021 · 1 min · 141 words · Matteo Redaelli