Skip to content

Instantly share code, notes, and snippets.

View simonespa's full-sized avatar

Simone Spaccarotella simonespa

View GitHub Profile
@simonespa
simonespa / pom.xml
Last active August 12, 2020 23:46
POM example
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>spa.simone</groupId>
<artifactId>example</artifactId>
<version>0.0.1</version>
@simonespa
simonespa / latex-in-markdown.txt
Created February 6, 2021 23:24
LaTeX math formula in GitHub markdown
The formula is rendered as an image. You can embed the image in a IMG tag as the following:
<img src="https://render.githubusercontent.com/render/math?math=\frac{3}{2}">
@simonespa
simonespa / filter-example1.js
Created July 3, 2021 14:31
How to dynamically filter object's properties in Javascript
function filter(object, filterList) {
// return an empty object if the filterList is not an array
if (!Array.isArray(filterList)) return {};
const newObject = {};
for (property of filterList) {
if (property in object) {
newObject[property] = object[property];
}
@simonespa
simonespa / filter.js
Created July 3, 2021 14:36
How to dynamically filter object's properties in Javascript - Solution 1
function filter(object, filterList) {
// return an empty object if the filterList is not an array
if (!Array.isArray(filterList)) return {};
const newObject = {};
for (property of filterList) {
if (property in object) {
newObject[property] = object[property];
}
@simonespa
simonespa / filter.js
Created July 3, 2021 14:37
How to dynamically filter object's properties in Javascript - Solution 2
function filter(object, filterList) {
// return an empty object if the filterList is not an array
if (!Array.isArray(filterList)) return {};
const newObject = {};
for (property of filterList) {
if (property in object) {
Object.defineProperty(newObject, property, {
value: object[property],
@simonespa
simonespa / filter.js
Created July 3, 2021 14:38
How to dynamically filter object's properties in Javascript - Solution 3
function filter(object, filterList) {
// return an empty object if the filterList is not an array
if (!Array.isArray(filterList)) return {};
return filterList.reduce((accumulator, current) => {
const hasOwnProperty = current in object;
return {
...accumulator,
...(hasOwnProperty && { [current]: object[current] })
@simonespa
simonespa / filter.js
Created July 3, 2021 14:39
How to dynamically filter object's properties in Javascript - Solution 4
function filter(object, filterList) {
// return an empty object if the filterList is not an array
if (!Array.isArray(filterList)) return {};
return filterList
.filter((property) => property in object)
.map((property) => ({ [property]: object[property] }))
.reduce((accumulator, current) => ({...accumulator, ...current}), {});
}
@simonespa
simonespa / google.io
Created July 17, 2021 10:18
Google I/O 2021
Wavenet: https://deepmind.com/blog/article/wavenet-generative-model-raw-audio
Google workspace
Google smartsheet
Google meet
LaMDA used for conversation or for "concepts" like road trip, or searching an action within a movie or video
- multi modality
TPU v4 - 1 exaflop of computing power
Quantum computing at google - error corrected quantum computer
@simonespa
simonespa / performance-testing.txt
Created July 17, 2021 10:24
Performance testing notes
https://rhendricksen.medium.com/distributed-load-testing-with-gatling-using-docker-and-aws-d497605692db
https://rhendricksen.medium.com/distributed-load-testing-with-gatling-using-docker-and-aws-part-2-5a6df57128aa
https://github.com/richardhendricksen/gatling-docker-on-aws/
## External factors
* Availability:
* Responsivness (or speed)
effectiveness (the what)
@simonespa
simonespa / trainings.txt
Created July 17, 2021 10:24
Training at the BBC
Production Safety
Working Safely at the BBC
Fair Trading Awareness
The Commercial Criteria
Inclusive Culture
Fair Trading Awareness
The Commercial Criteria
Anti-bribery UK
Anti-Fraud and Corruption Training (v4)
Unconscious Bias