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
mkdir -p ./dags ./logs ./plugins ./config | |
echo -e "AIRFLOW_UID=$(id -u)" > .env | |
wget 'https://gist.githubusercontent.com/khanhkhuu/8163c383d2637192a8f2ce31eafe1221/raw/f31de5e28e9995a6773ad9a3a4c3c94420f74f84/docker-compose.yaml' | |
docker compose up airflow-init | |
docker compose up |
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
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
setInterval(() => { | |
if (!Date.prototype.getTimeOld) Date.prototype.getTimeOld = Date.prototype.getTime; | |
Date.prototype.getTime = window.location.pathname == "/hr-platform/enroll" ? (() => 1) : Date.prototype.getTimeOld; | |
}, 1000) |
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
<body style="background-color: #f7f5fa;margin: 0 !important;padding: 0 !important;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;height: 100% !important;width: 100% !important;"> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;border-collapse: collapse !important;"> | |
<tr> | |
<td bgcolor="teal" align="center" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;"> | |
<table border="0" cellpadding="0" cellspacing="0" width="610" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;border-collapse: collapse !important;"> | |
<tr> | |
<td align="center" valign="top" style="padding: 20px 10px 20px 10px;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;"> | |
<div style="display: block; font-family: Helvetica, Arial, sans-serif; color: #ffffff; font-size: 18px;" border="0"></div> |
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
function sendChatWithImage() { | |
// Library ID: 1T03nYHRho6XMWYcaumClcWr6ble65mAT8OLJqRFJ5lukPVogAN2NDl-y | |
const imageID = "YOUR_IMAGE_ID_GOOGLE_DRIVE"; // Image ID (Google Drive) | |
const webhookUrl = 'YOUR_GROUP_CHAT_WEBHOOK_URL'; | |
const resizedImageHeight = 400; // 400px or smaller | |
const res = ImgApp.doResize(imageID, resizedImageHeight); | |
const base64 = Utilities.base64Encode(res.blob.getBytes()); | |
const mimeType = res.blob.getContentType(); | |
const dataUrl = `data:${mimeType};base64,${base64}`; |
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
<body style="background-color: rgb(185, 242, 250); | |
font-family: Calibri, Helvetica, sans-serif;"> | |
<div style="background-color: white; | |
padding: 1.5em 2em; | |
max-width: 500px; | |
margin-left: auto; | |
margin-right: auto; | |
border-radius: 0.8em; | |
color: grey;"> | |
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
function wordOrder() { | |
const sentences = [ | |
"Sentence 1", | |
"Sentence 2", | |
"Sentence 3", | |
"Sentence 4", | |
]; | |
const props = PropertiesService.getScriptProperties(); |
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 requests | |
from typing import List, Dict | |
class _Jobs: | |
def __init__(self, api_key, base_url): | |
self._api_key = api_key | |
self._base_url = base_url | |
def get_jobs_from_procedure(self, procedure_id: str = "", procedure_name: str = "", start_date: str = "", end_date: str = "", status: str = "", exclude_archived: bool = True, limit: int = 100, pagingupdate: bool = True): |
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
function wordOfTheDay() { | |
// Library: 1ReeQ6WO8kKNxoaA_O0XEQ589cIrRvEBA9qcWpNqdOP17i47u6N9M5Xh0 | |
const URL = 'https://www.britannica.com/dictionary/eb/word-of-the-day'; | |
const resHtml = UrlFetchApp.fetch(URL).getContentText(); | |
const $ = Cheerio.load(resHtml); | |
const image = $('.wod_img_act > img').attr('src'); | |
const word = $('span.hw_txt').first().text(); | |
const ipa = $('span.hpron_word').first().text(); | |
const imageTitle = $('div.wod_img_tit').first().text(); |
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
from http.client import HTTPSConnection | |
from base64 import b64encode | |
import json | |
import pandas | |
class DomoConnector: | |
def __init__(self, client_id, client_secret): | |
self.__client_id = client_id | |
self.__client_secret = client_secret | |
NewerOlder