Skip to content

Instantly share code, notes, and snippets.

View trungpv1601's full-sized avatar
🤖
Diversifying; Practical; more code than talk.

trungpv trungpv1601

🤖
Diversifying; Practical; more code than talk.
View GitHub Profile
(function (c) {
c.runtime.onMessage.addListener(async function (
request,
sender,
sendResponse
) {
switch (request.type) {
case "EVENT_1":
// TODO: do something
break;
@trungpv1601
trungpv1601 / Test partition job.py
Created December 11, 2023 02:46
Test partition job.py
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
from datetime import datetime
args = getResolvedOptions(sys.argv, ["JOB_NAME"])
sc = SparkContext()
const tags = ["JavaScript", "Web Development", "Programming", "Tech", "Coding"];
for (const tag of tags) {
const tagDiv = document.querySelector('div.tags-input[contenteditable="true"]');
const tagInput = document.querySelector('div.tags-input[contenteditable="true"] p[data-testid="editorParagraphText"]');
if (!tagDiv || !tagInput) {
console.error("Oops.");
} else {
console.log("Found.");