This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table feed_rss_website | |
( | |
id uuid not null | |
constraint "PK_d401ce5af5a14a6c20e76f1ae78" | |
primary key, | |
created timestamp default now() not null, | |
updated timestamp default now() not null, | |
version integer not null, | |
url varchar not null, | |
name varchar not null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DatoCuriosoHandler = { | |
canHandle(handlerInput) { | |
return ( | |
handlerInput.requestEnvelope.request.type === "IntentRequest" && | |
handlerInput.requestEnvelope.request.intent.name === "datoCurioso" | |
) | |
}, | |
handle(handlerInput) { | |
const speechText = | |
funFactsAboutFormula1[_.random(0, funFactsAboutFormula1.length)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "formulauno", | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [] | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "administracion electronica", | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [] | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { SkillBuilders } = require("ask-sdk") | |
const _ = require("lodash") | |
const funFactsAboutFormula1 = [ | |
"El coste de un formula 1 es de 6 a 8 millones de euros", | |
"Un coche posee aproximadamente 80000 componentes", | |
"El peso de un formula 1 es de 702kg", | |
"Barrichelo dejo pasar a Schumacher en Austria 2001", | |
"Barrichelo dejo ganar a Schumacher en Austria 2002", | |
`Las carreras de automóviles de Fórmula 1 tienen sus raíces en el Grand Prix Motor Racing de Europa de las décadas de 1920 y 1930. La "fórmula" en el nombre se refiere a un conjunto de reglas que todos los participantes y los automóviles deben cumplir.`, | |
"El costo promedio de un coche de F1 es de 6, 8 millones. Ten en cuenta que es el precio de los componentes más básicos. No incluye los cientos de millones gastados en desarrollo e investigación. Es una máquina bastante cara.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require("crypto") | |
const fs = require("fs") | |
const sign = crypto.createSign("SHA256") | |
const text = "hello world" | |
// openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 | |
const privateKey = fs.readFileSync("./key.pem") | |
const publicKey = fs.readFileSync("./cert.pem") | |
const passphrase = "123456" | |
sign.update(text) | |
sign.end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%PDF-1.7 | |
1 0 obj << /Type /Catalog/Pages 2 0 R >> endobj | |
2 0 obj << /Type /Pages /Kids [3 0 R] /Count /MediaBox [0 0 612 792] >> endobj | |
3 0 obj << /Type /Page /Resources 4 0 R /Contents 5 0 R >> endobj | |
4 0 obj << /F1 << /Type /Font /Subtype /Type1 /Basefont /Helvetica >> >> >> endobj | |
5 0 obj << /Size 1000 >> | |
stream | |
BT /F1 12 Tf 2 780 Td (Hello world)Tj ET | |
endstream | |
endobj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class DbExtensions | |
{ | |
public static IQueryable<T> FilterByTenant<T>(this IQueryable<T> baseEntities, string | |
tenantId) where T : BaseEntity | |
{ | |
return baseEntities.Where(r => r.TenantId == tenantId); | |
} | |
public static IQueryable<T> FilterByTenantName<T>(this IQueryable<T> baseEntities, string | |
tenantId) where T : BaseEntity | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdio.h> | |
#include <string.h> | |
using namespace std; | |
int splitByDelim(char *str, char *delim, int *out) { | |
char *pt; | |
pt = strtok(str, delim); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
x = np.arange(100) | |
delta = np.random.uniform(-10, 10, size=(100,)) | |
y = -.3 * x + 3 + delta | |
print(delta) | |
plt.plot(x, y) | |
plt.show() |