├── AWS-Summit-Seoul-2023 ├── README.md ├── dashboard │ ├── My-Emotion-Gardens-Analysis.json │ ├── README.md │ ├── lambda-top-likes-image-list │ │ └── index.js │ └── masonry-garden-viewer │ │ ├── garden.html │ │ ├── imageLoaded.js │ │ ├── script.js │ │ └── style.css ├── display-viewer │ ├── README.md │ ├── flower-viewer.html │ └── user-info-viewer.html ├── image-generation-and-recommendation │ ├── README.md │ ├── cdk-emotion-garden │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-emotion-garden.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-emotion-garden-stack.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-emotion-garden.test.ts │ │ └── tsconfig.json │ ├── dataset-info.md │ ├── deployment.md │ ├── emotion.md │ ├── facial-analysis.md │ ├── garden.md │ ├── generate-csv.md │ ├── html │ │ ├── pool │ │ │ ├── .DS_Store │ │ │ ├── bulk │ │ │ │ ├── bulk.html │ │ │ │ ├── bulk.js │ │ │ │ └── style.css │ │ │ └── preview │ │ │ │ ├── preview.html │ │ │ │ ├── preview.js │ │ │ │ ├── preview2.html │ │ │ │ ├── preview2.js │ │ │ │ └── style.css │ │ ├── text2image.html │ │ ├── text2image │ │ │ └── text2image.html │ │ └── viewer │ │ │ ├── style.css │ │ │ ├── viewer.html │ │ │ ├── viewer.js │ │ │ ├── viewer2.html │ │ │ └── viewer2.js │ ├── image-generator.md │ ├── lambda-bulk-stable-diffusion │ │ └── lambda_function.py │ ├── lambda-bulk │ │ └── index.js │ ├── lambda-clear-dynamo-index │ │ └── index.js │ ├── lambda-emotion │ │ ├── index.js │ │ ├── package-lock.json │ │ └── package.json │ ├── lambda-garden-from-dynamodb │ │ └── index.js │ ├── lambda-garden │ │ └── index.js │ ├── lambda-generate-csv │ │ ├── index.js │ │ ├── package-lock.json │ │ └── package.json │ ├── lambda-imagePage │ │ └── index.js │ ├── lambda-like │ │ ├── index.js │ │ ├── package-lock.json │ │ └── package.json │ ├── lambda-opensearch │ │ └── index.js │ ├── lambda-putItem │ │ └── index.js │ ├── lambda-remove-image-pool │ │ └── index.js │ ├── lambda-remove │ │ └── index.js │ ├── lambda-retrieve │ │ └── index.js │ ├── lambda-s3-event-image-pool │ │ └── index.js │ ├── lambda-s3-event │ │ └── index.js │ ├── lambda-stable-diffusion │ │ └── lambda_function.py │ ├── lambda-updateDisplay │ │ └── index.js │ ├── like.md │ ├── personalize-schema.md │ ├── personalize.md │ ├── recommendation.md │ ├── stable-diffusion.md │ └── updateDisplay.md ├── images │ └── MyEmotionGardens_Architecture.png └── prompt-generator │ ├── README.md │ └── prompt-generator.html ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── blogs ├── Llama2-chatbot-with-vector-store │ ├── Llama2-chatbot-with-vector-store.zip │ ├── README.md │ ├── cdk-chatbot-llama2 │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-chatbot-llama2.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-chatbot-llama2-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-chatbot-llama2.test.ts │ │ └── tsconfig.json │ ├── deployment.md │ ├── gen-ai-aws.pdf │ ├── gen-ai-wiki.pdf │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ └── chat.js │ ├── lambda-chat │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-upload │ │ └── index.js │ ├── resize.sh │ └── sequence │ │ ├── seq-chat.png │ │ ├── seq-chat.puml │ │ ├── seq-upload.png │ │ └── seq-upload.puml ├── chatbot-based-on-Falcon-FM │ ├── README.md │ ├── aws-wiki.pdf │ ├── cdk-chatbot-falcon │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-chatbot-falcon.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-chatbot-falcon-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-chatbot-falcon.test.ts │ │ └── tsconfig.json │ ├── cdk-deployment.md │ ├── chatbot-based-on-Falcon-FM.zip │ ├── deploy-falcon-fm.md │ ├── falcon-parameters.md │ ├── gen-ai-aws.pdf │ ├── gen-ai-wiki.pdf │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ └── chat.js │ ├── lambda-chat │ │ └── lambda_function.py │ ├── lambda-pdf-summary │ │ ├── Dockerfile │ │ └── lambda_function.py │ ├── lambda-pdf │ │ └── lambda_function.py │ ├── lambda-upload │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ └── uuid │ │ │ ├── .package-lock.json │ │ │ └── uuid │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── bin │ │ │ │ │ └── uuid │ │ │ │ ├── commonjs-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-node │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── index.js │ │ │ │ ├── md5-browser.js │ │ │ │ ├── md5.js │ │ │ │ ├── native-browser.js │ │ │ │ ├── native.js │ │ │ │ ├── nil.js │ │ │ │ ├── parse.js │ │ │ │ ├── regex.js │ │ │ │ ├── rng-browser.js │ │ │ │ ├── rng.js │ │ │ │ ├── sha1-browser.js │ │ │ │ ├── sha1.js │ │ │ │ ├── stringify.js │ │ │ │ ├── uuid-bin.js │ │ │ │ ├── v1.js │ │ │ │ ├── v3.js │ │ │ │ ├── v35.js │ │ │ │ ├── v4.js │ │ │ │ ├── v5.js │ │ │ │ ├── validate.js │ │ │ │ └── version.js │ │ │ │ ├── package.json │ │ │ │ └── wrapper.mjs │ │ ├── package-lock.json │ │ └── package.json │ ├── read-pdf.md │ └── sagemaker-endpoint-without-langchain.ipynb ├── image-recommender-based-on-emotion │ ├── README.md │ ├── cdk-image-recommender │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-image-recommender.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-image-recommender-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-image-recommender.test.ts │ │ └── tsconfig.json │ ├── deployment.md │ ├── face-correction.md │ ├── face-identification.md │ ├── face-search.md │ ├── garden.md │ ├── generate-csv.md │ ├── html │ │ ├── datasetGenerator.html │ │ ├── datasetGenerator.js │ │ ├── enabler.css │ │ ├── enabler.html │ │ ├── enabler.js │ │ ├── gallery.css │ │ ├── gallery.html │ │ ├── gallery.js │ │ ├── imageRecommender.html │ │ ├── imageRecommender.js │ │ ├── imgGenerator.html │ │ ├── imgGenerator.js │ │ ├── preview.html │ │ ├── preview.js │ │ └── style.css │ ├── image-generation.md │ ├── image-recommender-based-on-emotion.zip │ ├── lambda-bulk-stable-diffusion │ │ └── lambda_function.py │ ├── lambda-bulk │ │ └── index.js │ ├── lambda-createUser │ │ └── index.js │ ├── lambda-emotion │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ └── uuid │ │ │ ├── .package-lock.json │ │ │ ├── @colors │ │ │ │ └── colors │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── examples │ │ │ │ │ ├── normal-usage.js │ │ │ │ │ └── safe-string.js │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── lib │ │ │ │ │ ├── colors.js │ │ │ │ │ ├── custom │ │ │ │ │ │ ├── trap.js │ │ │ │ │ │ └── zalgo.js │ │ │ │ │ ├── extendStringPrototype.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── maps │ │ │ │ │ │ ├── america.js │ │ │ │ │ │ ├── rainbow.js │ │ │ │ │ │ ├── random.js │ │ │ │ │ │ └── zebra.js │ │ │ │ │ ├── styles.js │ │ │ │ │ └── system │ │ │ │ │ │ ├── has-flag.js │ │ │ │ │ │ └── supports-colors.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── safe.d.ts │ │ │ │ │ ├── safe.js │ │ │ │ │ └── themes │ │ │ │ │ └── generic-logging.js │ │ │ ├── @dabh │ │ │ │ └── diagnostics │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── adapters │ │ │ │ │ ├── hash.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── localstorage.js │ │ │ │ │ └── process.env.js │ │ │ │ │ ├── browser │ │ │ │ │ ├── development.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── override.js │ │ │ │ │ └── production.js │ │ │ │ │ ├── diagnostics.js │ │ │ │ │ ├── logger │ │ │ │ │ └── console.js │ │ │ │ │ ├── modifiers │ │ │ │ │ ├── namespace-ansi.js │ │ │ │ │ └── namespace.js │ │ │ │ │ ├── node │ │ │ │ │ ├── development.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── override.js │ │ │ │ │ └── production.js │ │ │ │ │ └── package.json │ │ │ ├── @types │ │ │ │ └── triple-beam │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── package.json │ │ │ ├── async │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── all.js │ │ │ │ ├── allLimit.js │ │ │ │ ├── allSeries.js │ │ │ │ ├── any.js │ │ │ │ ├── anyLimit.js │ │ │ │ ├── anySeries.js │ │ │ │ ├── apply.js │ │ │ │ ├── applyEach.js │ │ │ │ ├── applyEachSeries.js │ │ │ │ ├── asyncify.js │ │ │ │ ├── auto.js │ │ │ │ ├── autoInject.js │ │ │ │ ├── bower.json │ │ │ │ ├── cargo.js │ │ │ │ ├── cargoQueue.js │ │ │ │ ├── compose.js │ │ │ │ ├── concat.js │ │ │ │ ├── concatLimit.js │ │ │ │ ├── concatSeries.js │ │ │ │ ├── constant.js │ │ │ │ ├── detect.js │ │ │ │ ├── detectLimit.js │ │ │ │ ├── detectSeries.js │ │ │ │ ├── dir.js │ │ │ │ ├── dist │ │ │ │ │ ├── async.js │ │ │ │ │ ├── async.min.js │ │ │ │ │ └── async.mjs │ │ │ │ ├── doDuring.js │ │ │ │ ├── doUntil.js │ │ │ │ ├── doWhilst.js │ │ │ │ ├── during.js │ │ │ │ ├── each.js │ │ │ │ ├── eachLimit.js │ │ │ │ ├── eachOf.js │ │ │ │ ├── eachOfLimit.js │ │ │ │ ├── eachOfSeries.js │ │ │ │ ├── eachSeries.js │ │ │ │ ├── ensureAsync.js │ │ │ │ ├── every.js │ │ │ │ ├── everyLimit.js │ │ │ │ ├── everySeries.js │ │ │ │ ├── filter.js │ │ │ │ ├── filterLimit.js │ │ │ │ ├── filterSeries.js │ │ │ │ ├── find.js │ │ │ │ ├── findLimit.js │ │ │ │ ├── findSeries.js │ │ │ │ ├── flatMap.js │ │ │ │ ├── flatMapLimit.js │ │ │ │ ├── flatMapSeries.js │ │ │ │ ├── foldl.js │ │ │ │ ├── foldr.js │ │ │ │ ├── forEach.js │ │ │ │ ├── forEachLimit.js │ │ │ │ ├── forEachOf.js │ │ │ │ ├── forEachOfLimit.js │ │ │ │ ├── forEachOfSeries.js │ │ │ │ ├── forEachSeries.js │ │ │ │ ├── forever.js │ │ │ │ ├── groupBy.js │ │ │ │ ├── groupByLimit.js │ │ │ │ ├── groupBySeries.js │ │ │ │ ├── index.js │ │ │ │ ├── inject.js │ │ │ │ ├── internal │ │ │ │ │ ├── DoublyLinkedList.js │ │ │ │ │ ├── Heap.js │ │ │ │ │ ├── applyEach.js │ │ │ │ │ ├── asyncEachOfLimit.js │ │ │ │ │ ├── awaitify.js │ │ │ │ │ ├── breakLoop.js │ │ │ │ │ ├── consoleFunc.js │ │ │ │ │ ├── createTester.js │ │ │ │ │ ├── eachOfLimit.js │ │ │ │ │ ├── filter.js │ │ │ │ │ ├── getIterator.js │ │ │ │ │ ├── initialParams.js │ │ │ │ │ ├── isArrayLike.js │ │ │ │ │ ├── iterator.js │ │ │ │ │ ├── map.js │ │ │ │ │ ├── once.js │ │ │ │ │ ├── onlyOnce.js │ │ │ │ │ ├── parallel.js │ │ │ │ │ ├── promiseCallback.js │ │ │ │ │ ├── queue.js │ │ │ │ │ ├── range.js │ │ │ │ │ ├── reject.js │ │ │ │ │ ├── setImmediate.js │ │ │ │ │ ├── withoutIndex.js │ │ │ │ │ └── wrapAsync.js │ │ │ │ ├── log.js │ │ │ │ ├── map.js │ │ │ │ ├── mapLimit.js │ │ │ │ ├── mapSeries.js │ │ │ │ ├── mapValues.js │ │ │ │ ├── mapValuesLimit.js │ │ │ │ ├── mapValuesSeries.js │ │ │ │ ├── memoize.js │ │ │ │ ├── nextTick.js │ │ │ │ ├── package.json │ │ │ │ ├── parallel.js │ │ │ │ ├── parallelLimit.js │ │ │ │ ├── priorityQueue.js │ │ │ │ ├── queue.js │ │ │ │ ├── race.js │ │ │ │ ├── reduce.js │ │ │ │ ├── reduceRight.js │ │ │ │ ├── reflect.js │ │ │ │ ├── reflectAll.js │ │ │ │ ├── reject.js │ │ │ │ ├── rejectLimit.js │ │ │ │ ├── rejectSeries.js │ │ │ │ ├── retry.js │ │ │ │ ├── retryable.js │ │ │ │ ├── select.js │ │ │ │ ├── selectLimit.js │ │ │ │ ├── selectSeries.js │ │ │ │ ├── seq.js │ │ │ │ ├── series.js │ │ │ │ ├── setImmediate.js │ │ │ │ ├── some.js │ │ │ │ ├── someLimit.js │ │ │ │ ├── someSeries.js │ │ │ │ ├── sortBy.js │ │ │ │ ├── timeout.js │ │ │ │ ├── times.js │ │ │ │ ├── timesLimit.js │ │ │ │ ├── timesSeries.js │ │ │ │ ├── transform.js │ │ │ │ ├── tryEach.js │ │ │ │ ├── unmemoize.js │ │ │ │ ├── until.js │ │ │ │ ├── waterfall.js │ │ │ │ ├── whilst.js │ │ │ │ └── wrapSync.js │ │ │ ├── color-convert │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── conversions.js │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── route.js │ │ │ ├── color-name │ │ │ │ ├── .eslintrc.json │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── color-string │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── color │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── colorspace │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── enabled │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── fecha │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ │ ├── fecha.min.js │ │ │ │ │ └── fecha.min.js.map │ │ │ │ ├── lib │ │ │ │ │ ├── fecha.d.ts │ │ │ │ │ ├── fecha.js │ │ │ │ │ ├── fecha.js.map │ │ │ │ │ ├── fecha.umd.js │ │ │ │ │ └── fecha.umd.js.map │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ │ └── fecha.ts │ │ │ ├── fn.name │ │ │ │ ├── .gitattributes │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── inherits │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── inherits.js │ │ │ │ ├── inherits_browser.js │ │ │ │ └── package.json │ │ │ ├── is-arrayish │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── yarn-error.log │ │ │ ├── is-stream │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── license │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── kuler │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── logform │ │ │ │ ├── .babelrc │ │ │ │ ├── .eslintrc │ │ │ │ ├── .gitattributes │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── align.js │ │ │ │ ├── browser.js │ │ │ │ ├── cli.js │ │ │ │ ├── colorize.js │ │ │ │ ├── combine.js │ │ │ │ ├── dist │ │ │ │ │ ├── align.js │ │ │ │ │ ├── browser.js │ │ │ │ │ ├── cli.js │ │ │ │ │ ├── colorize.js │ │ │ │ │ ├── combine.js │ │ │ │ │ ├── errors.js │ │ │ │ │ ├── format.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── json.js │ │ │ │ │ ├── label.js │ │ │ │ │ ├── levels.js │ │ │ │ │ ├── logstash.js │ │ │ │ │ ├── metadata.js │ │ │ │ │ ├── ms.js │ │ │ │ │ ├── pad-levels.js │ │ │ │ │ ├── pretty-print.js │ │ │ │ │ ├── printf.js │ │ │ │ │ ├── simple.js │ │ │ │ │ ├── splat.js │ │ │ │ │ ├── timestamp.js │ │ │ │ │ └── uncolorize.js │ │ │ │ ├── errors.js │ │ │ │ ├── examples │ │ │ │ │ ├── combine.js │ │ │ │ │ ├── filter.js │ │ │ │ │ ├── invalid.js │ │ │ │ │ ├── metadata.js │ │ │ │ │ ├── padLevels.js │ │ │ │ │ └── volume.js │ │ │ │ ├── format.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── json.js │ │ │ │ ├── label.js │ │ │ │ ├── levels.js │ │ │ │ ├── logstash.js │ │ │ │ ├── metadata.js │ │ │ │ ├── ms.js │ │ │ │ ├── package.json │ │ │ │ ├── pad-levels.js │ │ │ │ ├── pretty-print.js │ │ │ │ ├── printf.js │ │ │ │ ├── simple.js │ │ │ │ ├── splat.js │ │ │ │ ├── timestamp.js │ │ │ │ ├── tsconfig.json │ │ │ │ └── uncolorize.js │ │ │ ├── ms │ │ │ │ ├── index.js │ │ │ │ ├── license.md │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── one-time │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── async.js │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── readable-stream │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── GOVERNANCE.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── errors-browser.js │ │ │ │ ├── errors.js │ │ │ │ ├── experimentalWarning.js │ │ │ │ ├── lib │ │ │ │ │ ├── _stream_duplex.js │ │ │ │ │ ├── _stream_passthrough.js │ │ │ │ │ ├── _stream_readable.js │ │ │ │ │ ├── _stream_transform.js │ │ │ │ │ ├── _stream_writable.js │ │ │ │ │ └── internal │ │ │ │ │ │ └── streams │ │ │ │ │ │ ├── async_iterator.js │ │ │ │ │ │ ├── buffer_list.js │ │ │ │ │ │ ├── destroy.js │ │ │ │ │ │ ├── end-of-stream.js │ │ │ │ │ │ ├── from-browser.js │ │ │ │ │ │ ├── from.js │ │ │ │ │ │ ├── pipeline.js │ │ │ │ │ │ ├── state.js │ │ │ │ │ │ ├── stream-browser.js │ │ │ │ │ │ └── stream.js │ │ │ │ ├── package.json │ │ │ │ ├── readable-browser.js │ │ │ │ └── readable.js │ │ │ ├── safe-buffer │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── safe-stable-stringify │ │ │ │ ├── LICENSE │ │ │ │ ├── esm │ │ │ │ │ ├── package.json │ │ │ │ │ ├── wrapper.d.ts │ │ │ │ │ └── wrapper.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── simple-swizzle │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── stack-trace │ │ │ │ ├── .npmignore │ │ │ │ ├── License │ │ │ │ ├── Makefile │ │ │ │ ├── Readme.md │ │ │ │ ├── lib │ │ │ │ │ └── stack-trace.js │ │ │ │ └── package.json │ │ │ ├── string_decoder │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── string_decoder.js │ │ │ │ └── package.json │ │ │ ├── text-hex │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── triple-beam │ │ │ │ ├── .eslintrc │ │ │ │ ├── .gitattributes │ │ │ │ ├── .travis.yml │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── config │ │ │ │ │ ├── cli.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── npm.js │ │ │ │ │ └── syslog.js │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── util-deprecate │ │ │ │ ├── History.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── browser.js │ │ │ │ ├── node.js │ │ │ │ └── package.json │ │ │ ├── uuid │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ │ ├── bin │ │ │ │ │ │ └── uuid │ │ │ │ │ ├── commonjs-browser │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── md5.js │ │ │ │ │ │ ├── native.js │ │ │ │ │ │ ├── nil.js │ │ │ │ │ │ ├── parse.js │ │ │ │ │ │ ├── regex.js │ │ │ │ │ │ ├── rng.js │ │ │ │ │ │ ├── sha1.js │ │ │ │ │ │ ├── stringify.js │ │ │ │ │ │ ├── v1.js │ │ │ │ │ │ ├── v3.js │ │ │ │ │ │ ├── v35.js │ │ │ │ │ │ ├── v4.js │ │ │ │ │ │ ├── v5.js │ │ │ │ │ │ ├── validate.js │ │ │ │ │ │ └── version.js │ │ │ │ │ ├── esm-browser │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── md5.js │ │ │ │ │ │ ├── native.js │ │ │ │ │ │ ├── nil.js │ │ │ │ │ │ ├── parse.js │ │ │ │ │ │ ├── regex.js │ │ │ │ │ │ ├── rng.js │ │ │ │ │ │ ├── sha1.js │ │ │ │ │ │ ├── stringify.js │ │ │ │ │ │ ├── v1.js │ │ │ │ │ │ ├── v3.js │ │ │ │ │ │ ├── v35.js │ │ │ │ │ │ ├── v4.js │ │ │ │ │ │ ├── v5.js │ │ │ │ │ │ ├── validate.js │ │ │ │ │ │ └── version.js │ │ │ │ │ ├── esm-node │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── md5.js │ │ │ │ │ │ ├── native.js │ │ │ │ │ │ ├── nil.js │ │ │ │ │ │ ├── parse.js │ │ │ │ │ │ ├── regex.js │ │ │ │ │ │ ├── rng.js │ │ │ │ │ │ ├── sha1.js │ │ │ │ │ │ ├── stringify.js │ │ │ │ │ │ ├── v1.js │ │ │ │ │ │ ├── v3.js │ │ │ │ │ │ ├── v35.js │ │ │ │ │ │ ├── v4.js │ │ │ │ │ │ ├── v5.js │ │ │ │ │ │ ├── validate.js │ │ │ │ │ │ └── version.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5-browser.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native-browser.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng-browser.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1-browser.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── uuid-bin.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── package.json │ │ │ │ └── wrapper.mjs │ │ │ ├── winston-transport │ │ │ │ ├── .babelrc │ │ │ │ ├── .eslintrc │ │ │ │ ├── .gitattributes │ │ │ │ ├── .nyc_output │ │ │ │ │ ├── c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json │ │ │ │ │ └── processinfo │ │ │ │ │ │ ├── c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json │ │ │ │ │ │ └── index.json │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ │ ├── index.js │ │ │ │ │ └── legacy.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── legacy.js │ │ │ │ └── package.json │ │ │ └── winston │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── winston.js │ │ │ │ └── winston │ │ │ │ │ ├── common.js │ │ │ │ │ ├── config │ │ │ │ │ └── index.js │ │ │ │ │ ├── container.js │ │ │ │ │ ├── create-logger.js │ │ │ │ │ ├── exception-handler.js │ │ │ │ │ ├── exception-stream.js │ │ │ │ │ ├── logger.js │ │ │ │ │ ├── profiler.js │ │ │ │ │ ├── rejection-handler.js │ │ │ │ │ ├── tail-file.js │ │ │ │ │ └── transports │ │ │ │ │ ├── console.js │ │ │ │ │ ├── file.js │ │ │ │ │ ├── http.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── stream.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── lib │ │ │ │ ├── winston.js │ │ │ │ └── winston │ │ │ │ │ ├── common.js │ │ │ │ │ ├── config │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── index.js │ │ │ │ │ ├── container.js │ │ │ │ │ ├── create-logger.js │ │ │ │ │ ├── exception-handler.js │ │ │ │ │ ├── exception-stream.js │ │ │ │ │ ├── logger.js │ │ │ │ │ ├── profiler.js │ │ │ │ │ ├── rejection-handler.js │ │ │ │ │ ├── tail-file.js │ │ │ │ │ └── transports │ │ │ │ │ ├── console.js │ │ │ │ │ ├── file.js │ │ │ │ │ ├── http.js │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── index.js │ │ │ │ │ └── stream.js │ │ │ │ └── package.json │ │ ├── package-lock.json │ │ └── package.json │ ├── lambda-gallery │ │ └── index.js │ ├── lambda-like │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ └── uuid │ │ │ ├── .package-lock.json │ │ │ └── uuid │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── bin │ │ │ │ │ └── uuid │ │ │ │ ├── commonjs-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-node │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── index.js │ │ │ │ ├── md5-browser.js │ │ │ │ ├── md5.js │ │ │ │ ├── native-browser.js │ │ │ │ ├── native.js │ │ │ │ ├── nil.js │ │ │ │ ├── parse.js │ │ │ │ ├── regex.js │ │ │ │ ├── rng-browser.js │ │ │ │ ├── rng.js │ │ │ │ ├── sha1-browser.js │ │ │ │ ├── sha1.js │ │ │ │ ├── stringify.js │ │ │ │ ├── uuid-bin.js │ │ │ │ ├── v1.js │ │ │ │ ├── v3.js │ │ │ │ ├── v35.js │ │ │ │ ├── v4.js │ │ │ │ ├── v5.js │ │ │ │ ├── validate.js │ │ │ │ └── version.js │ │ │ │ ├── package.json │ │ │ │ └── wrapper.mjs │ │ ├── package-lock.json │ │ └── package.json │ ├── lambda-putItem │ │ └── index.js │ ├── lambda-retrieve │ │ └── index.js │ ├── lambda-s3-event │ │ └── index.js │ ├── personalize-interaction.md │ ├── personalize-item.md │ ├── personalize-training.md │ ├── personalize-user.md │ ├── recommendation.md │ ├── sample-facial-analysis.json │ ├── sequence │ │ ├── sequence.png │ │ └── sequence.puml │ ├── stable-diffusion-deployment.md │ ├── test.js │ ├── utils.md │ └── utils │ │ ├── lambda-clear-dynamo-index │ │ └── index.js │ │ ├── lambda-gallery-from-dynamodb │ │ └── index.js │ │ ├── lambda-generate-csv │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ └── json2csv │ │ │ ├── .package-lock.json │ │ │ ├── @streamparser │ │ │ │ └── json │ │ │ │ │ ├── .eslintrc.js │ │ │ │ │ ├── .github │ │ │ │ │ └── workflows │ │ │ │ │ │ ├── on-push.yaml │ │ │ │ │ │ └── on-release.yaml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── build.deno.js │ │ │ │ │ ├── build.mjs.js │ │ │ │ │ ├── dist │ │ │ │ │ ├── cjs │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── jsonparser.d.ts │ │ │ │ │ │ ├── jsonparser.js │ │ │ │ │ │ ├── tokenizer.d.ts │ │ │ │ │ │ ├── tokenizer.js │ │ │ │ │ │ ├── tokenparser.d.ts │ │ │ │ │ │ ├── tokenparser.js │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── bufferedString.d.ts │ │ │ │ │ │ │ ├── bufferedString.js │ │ │ │ │ │ │ ├── constants.d.ts │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ ├── types.d.ts │ │ │ │ │ │ │ ├── types.js │ │ │ │ │ │ │ ├── utf-8.d.ts │ │ │ │ │ │ │ └── utf-8.js │ │ │ │ │ ├── deno │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── jsonparser.ts │ │ │ │ │ │ ├── tokenizer.ts │ │ │ │ │ │ ├── tokenparser.ts │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── bufferedString.ts │ │ │ │ │ │ │ ├── constants.ts │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ └── utf-8.ts │ │ │ │ │ ├── mjs │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── jsonparser.d.ts │ │ │ │ │ │ ├── tokenizer.d.ts │ │ │ │ │ │ ├── tokenparser.d.ts │ │ │ │ │ │ └── utils │ │ │ │ │ │ │ ├── bufferedString.d.ts │ │ │ │ │ │ │ ├── constants.d.ts │ │ │ │ │ │ │ ├── types.d.ts │ │ │ │ │ │ │ └── utf-8.d.ts │ │ │ │ │ └── umd │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── jsonparser.d.ts │ │ │ │ │ │ ├── tokenizer.d.ts │ │ │ │ │ │ ├── tokenparser.d.ts │ │ │ │ │ │ └── utils │ │ │ │ │ │ ├── bufferedString.d.ts │ │ │ │ │ │ ├── constants.d.ts │ │ │ │ │ │ ├── types.d.ts │ │ │ │ │ │ └── utf-8.d.ts │ │ │ │ │ ├── package.json │ │ │ │ │ ├── performance │ │ │ │ │ ├── index.deno.ts │ │ │ │ │ ├── index.node.mjs │ │ │ │ │ ├── package-lock.json │ │ │ │ │ └── package.json │ │ │ │ │ ├── rollup.config.js │ │ │ │ │ ├── samplejson │ │ │ │ │ ├── basic-no-numbers.json │ │ │ │ │ └── basic.json │ │ │ │ │ ├── src │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── jsonparser.ts │ │ │ │ │ ├── tokenizer.ts │ │ │ │ │ ├── tokenparser.ts │ │ │ │ │ └── utils │ │ │ │ │ │ ├── bufferedString.ts │ │ │ │ │ │ ├── constants.ts │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ └── utf-8.ts │ │ │ │ │ ├── test │ │ │ │ │ ├── callbacks.ts │ │ │ │ │ ├── end.ts │ │ │ │ │ ├── inputs.ts │ │ │ │ │ ├── keepStack.ts │ │ │ │ │ ├── offset.ts │ │ │ │ │ ├── performance.ts │ │ │ │ │ ├── selectors.ts │ │ │ │ │ ├── separator.ts │ │ │ │ │ └── types │ │ │ │ │ │ ├── arrays.ts │ │ │ │ │ │ ├── booleans.ts │ │ │ │ │ │ ├── null.ts │ │ │ │ │ │ ├── numbers.ts │ │ │ │ │ │ ├── objects.ts │ │ │ │ │ │ └── strings.ts │ │ │ │ │ └── tsconfig.json │ │ │ ├── commander │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── Readme.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── typings │ │ │ │ │ └── index.d.ts │ │ │ ├── json2csv │ │ │ │ ├── .eslintrc │ │ │ │ ├── .gitattributes │ │ │ │ ├── .prettierrc.js │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── bin │ │ │ │ │ ├── json2csv.js │ │ │ │ │ └── utils │ │ │ │ │ │ ├── TablePrinter.js │ │ │ │ │ │ └── parseNdjson.js │ │ │ │ ├── docs │ │ │ │ │ ├── cli-examples.md │ │ │ │ │ └── parser-examples.md │ │ │ │ ├── lib │ │ │ │ │ ├── JSON2CSVAsyncParser.js │ │ │ │ │ ├── JSON2CSVBase.js │ │ │ │ │ ├── JSON2CSVParser.js │ │ │ │ │ ├── JSON2CSVStreamParser.js │ │ │ │ │ ├── JSON2CSVTransform.js │ │ │ │ │ ├── formatters │ │ │ │ │ │ ├── default.js │ │ │ │ │ │ ├── number.js │ │ │ │ │ │ ├── object.js │ │ │ │ │ │ ├── string.js │ │ │ │ │ │ ├── stringExcel.js │ │ │ │ │ │ ├── stringQuoteOnlyIfNecessary.js │ │ │ │ │ │ └── symbol.js │ │ │ │ │ ├── json2csv.js │ │ │ │ │ ├── transforms │ │ │ │ │ │ ├── flatten.js │ │ │ │ │ │ └── unwind.js │ │ │ │ │ └── utils.js │ │ │ │ ├── package.json │ │ │ │ └── rollup.config.js │ │ │ └── lodash.get │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ ├── package-lock.json │ │ └── package.json │ │ ├── lambda-generate-dataset │ │ ├── index.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ └── uuid │ │ │ ├── .package-lock.json │ │ │ └── uuid │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist │ │ │ │ ├── bin │ │ │ │ │ └── uuid │ │ │ │ ├── commonjs-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-browser │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── esm-node │ │ │ │ │ ├── index.js │ │ │ │ │ ├── md5.js │ │ │ │ │ ├── native.js │ │ │ │ │ ├── nil.js │ │ │ │ │ ├── parse.js │ │ │ │ │ ├── regex.js │ │ │ │ │ ├── rng.js │ │ │ │ │ ├── sha1.js │ │ │ │ │ ├── stringify.js │ │ │ │ │ ├── v1.js │ │ │ │ │ ├── v3.js │ │ │ │ │ ├── v35.js │ │ │ │ │ ├── v4.js │ │ │ │ │ ├── v5.js │ │ │ │ │ ├── validate.js │ │ │ │ │ └── version.js │ │ │ │ ├── index.js │ │ │ │ ├── md5-browser.js │ │ │ │ ├── md5.js │ │ │ │ ├── native-browser.js │ │ │ │ ├── native.js │ │ │ │ ├── nil.js │ │ │ │ ├── parse.js │ │ │ │ ├── regex.js │ │ │ │ ├── rng-browser.js │ │ │ │ ├── rng.js │ │ │ │ ├── sha1-browser.js │ │ │ │ ├── sha1.js │ │ │ │ ├── stringify.js │ │ │ │ ├── uuid-bin.js │ │ │ │ ├── v1.js │ │ │ │ ├── v3.js │ │ │ │ ├── v35.js │ │ │ │ ├── v4.js │ │ │ │ ├── v5.js │ │ │ │ ├── validate.js │ │ │ │ └── version.js │ │ │ │ ├── package.json │ │ │ │ └── wrapper.mjs │ │ ├── package-lock.json │ │ └── package.json │ │ ├── lambda-putInteractionDataset │ │ └── index.js │ │ ├── lambda-remove-image-pool │ │ └── index.js │ │ └── lambda-s3-event-image-pool │ │ └── index.js ├── korean-chatbot-using-varco-llm-and-opensearch │ ├── Amazon_Kendra.pdf │ ├── README.md │ ├── cdk-varco-opensearch │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-varco-opensearch.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-varco-opensearch-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-varco-opensearch.test.ts │ │ └── tsconfig.json │ ├── deployment.md │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ └── chat.js │ ├── image.png │ ├── korean-chatbot-using-varco-llm-and-opensearch.zip │ ├── lambda-chat │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-upload │ │ └── index.js │ └── sequence │ │ ├── seq-chat.png │ │ ├── seq-chat.puml │ │ ├── seq-upload.png │ │ └── seq-upload.puml ├── multi-rag-and-multi-region-llm-for-chatbot │ ├── README.md │ ├── cdk-multi-rag-chatbot │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-multi-rag-chatbot.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-multi-rag-chatbot-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-multi-rag-chatbot.test.ts │ │ └── tsconfig.json │ ├── contents │ │ ├── Amazon_Lex.pdf │ │ ├── error_code.pdf │ │ └── faq │ │ │ ├── faq-banking.csv │ │ │ └── faq-sagemaker.csv │ ├── deployment.md │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ ├── chat.js │ │ ├── index.html │ │ ├── login.css │ │ └── login.js │ ├── images │ │ ├── basic-architecture.png │ │ ├── endpoint.png │ │ ├── menu-input.png │ │ ├── output.png │ │ ├── result-error-code.png │ │ ├── result-lex.png │ │ ├── sequence.png │ │ └── update.png │ ├── lambda-chat-ws │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-delete-items │ │ └── index.js │ ├── lambda-gethistory │ │ └── index.js │ ├── lambda-provisioning │ │ └── lambda_function.py │ ├── lambda-query │ │ └── index.js │ ├── lambda-upload │ │ └── index.js │ └── multi-rag-and-multi-region-llm-for-chatbot.zip ├── rag-chatbot-using-bedrock-claude-and-kendra │ ├── README.md │ ├── cdk-rag-chatbot-with-kendra │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-rag-chatbot-with-kendra.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-rag-chatbot-with-kendra-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-rag-chatbot-with-kendra.test.ts │ │ └── tsconfig.json │ ├── contents │ │ ├── error_code.pdf │ │ └── faq │ │ │ ├── faq-banking.csv │ │ │ ├── faq-demo.csv │ │ │ └── faq-sagemaker.csv │ ├── deployment.md │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ ├── chat.js │ │ ├── index.html │ │ ├── login.css │ │ └── login.js │ ├── images │ │ ├── basic_architecture.png │ │ ├── faq_demo.png │ │ └── result_banking.png │ ├── kendra-preperation.md │ ├── lambda-chat-ws │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-delete-items │ │ └── index.js │ ├── lambda-gethistory │ │ └── index.js │ ├── lambda-provisioning │ │ └── lambda_function.py │ ├── lambda-query │ │ └── index.js │ ├── lambda-upload │ │ └── index.js │ ├── rag-chatbot-using-bedrock-claude-and-kendra.zip │ ├── seq-chat.png │ └── seq-chat.puml ├── rag-code-generation │ ├── README.md │ ├── cdk-rag-code-generation │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-rag-code-generation.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-rag-code-generation-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-rag-code-generation.test.ts │ │ └── tsconfig.json │ ├── deployment.md │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ ├── chat.js │ │ ├── index.html │ │ ├── login.css │ │ └── login.js │ ├── images │ │ ├── output.png │ │ ├── result.png │ │ └── upload.png │ ├── lambda-chat-ws │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-delete-items │ │ └── index.js │ ├── lambda-gethistory │ │ └── index.js │ ├── lambda-provisioning │ │ └── lambda_function.py │ ├── lambda-query │ │ └── index.js │ ├── lambda-s3-event │ │ ├── Dockerfile │ │ └── lambda_function.py │ ├── lambda-upload │ │ └── index.js │ └── rag-code-generation.zip ├── rag-enhanced-searching │ ├── README.md │ ├── cdk-rag-enhanced-searching │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ │ └── cdk-rag-enhanced-searching.ts │ │ ├── cdk.json │ │ ├── jest.config.js │ │ ├── lib │ │ │ └── cdk-rag-enhanced-searching-stack.ts │ │ ├── package.json │ │ ├── test │ │ │ └── cdk-rag-enhanced-searching.test.ts │ │ └── tsconfig.json │ ├── contents │ │ └── RAG.pdf │ ├── deployment.md │ ├── html │ │ ├── basicprofile.jpg │ │ ├── chat-style.css │ │ ├── chat.html │ │ ├── chat.js │ │ ├── index.html │ │ ├── login.css │ │ └── login.js │ ├── lambda-chat-ws │ │ ├── Dockerfile │ │ ├── lambda_function.py │ │ └── test.py │ ├── lambda-delete-items │ │ └── index.js │ ├── lambda-gethistory │ │ └── index.js │ ├── lambda-provisioning │ │ └── lambda_function.py │ ├── lambda-query │ │ └── index.js │ ├── lambda-s3-event │ │ ├── Dockerfile │ │ └── lambda_function.py │ ├── lambda-upload │ │ └── index.js │ ├── pictures │ │ ├── architecture.png │ │ └── result.png │ └── rag-enhanced-searching.zip └── stream-chatbot-for-amazon-bedrock │ ├── README.md │ ├── cdk-stream-chatbot │ ├── .gitignore │ ├── .npmignore │ ├── bin │ │ └── cdk-stream-chatbot.ts │ ├── cdk.json │ ├── jest.config.js │ ├── lib │ │ └── cdk-stream-chatbot-stack.ts │ ├── package.json │ ├── test │ │ └── cdk-stream-chatbot.test.ts │ └── tsconfig.json │ ├── deployment.md │ ├── html │ ├── basicprofile.jpg │ ├── chat-style.css │ ├── chat.html │ ├── chat.js │ ├── index.html │ ├── login.css │ └── login.js │ ├── lambda-chat-ws │ ├── Dockerfile │ ├── lambda_function.py │ └── test.py │ ├── lambda-chat │ ├── Dockerfile │ ├── lambda_function.py │ └── test.py │ ├── lambda-delete-items │ └── index.js │ ├── lambda-gethistory │ └── index.js │ ├── lambda-query │ └── index.js │ ├── lambda-upload │ └── index.js │ ├── resize.sh │ ├── sequence │ ├── seq-chat.png │ └── seq-chat.puml │ └── stream-chatbot-for-amazon-bedrock.zip └── resize.sh /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/README.md: -------------------------------------------------------------------------------- 1 | # CDK로 인프라 설치 2 | 3 | CDK 라이브러리 설치를 진행합니다. 4 | 5 | ```java 6 | npm install 7 | ``` 8 | 9 | 다른 node.js 라이브러리도 설치를 진행합니다. 10 | 11 | ```java 12 | cd ../lambda-emotion 13 | npm install 14 | cd ../lambda-generate-csv 15 | npm install 16 | cd ../lambda-like 17 | npm install 18 | ``` 19 | 20 | 21 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-emotion-garden", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-emotion-garden": "bin/cdk-emotion-garden.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.4.0", 15 | "@types/node": "18.11.18", 16 | "aws-cdk": "2.63.2", 17 | "jest": "^29.4.1", 18 | "ts-jest": "^29.0.5", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~4.9.4" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "^2.80.0", 24 | "constructs": "^10.0.0", 25 | "path": "^0.12.7", 26 | "source-map-support": "^0.5.21" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/cdk-emotion-garden/test/cdk-emotion-garden.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkEmotionGarden from '../lib/cdk-emotion-garden-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-emotion-garden-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkEmotionGarden.CdkEmotionGardenStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/html/pool/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/AWS-Summit-Seoul-2023/image-generation-and-recommendation/html/pool/.DS_Store -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/html/pool/bulk/style.css: -------------------------------------------------------------------------------- 1 | .fa { 2 | font-size: 50px; 3 | cursor: pointer; 4 | user-select: none; 5 | } 6 | 7 | .fa:hover { 8 | color: darkblue; 9 | } -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/html/pool/preview/style.css: -------------------------------------------------------------------------------- 1 | .fa { 2 | font-size: 50px; 3 | cursor: pointer; 4 | user-select: none; 5 | } 6 | 7 | .fa:hover { 8 | color: darkblue; 9 | } -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/html/viewer/style.css: -------------------------------------------------------------------------------- 1 | .fa { 2 | font-size: 50px; 3 | cursor: pointer; 4 | user-select: none; 5 | } 6 | 7 | .fa:hover { 8 | color: darkblue; 9 | } -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/lambda-emotion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-upload", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "uuid": "^9.0.0", 13 | "winston": "^3.8.2" 14 | }, 15 | "description": "" 16 | } 17 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/lambda-generate-csv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-generate-csv", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "json2csv": "^6.0.0-alpha.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/image-generation-and-recommendation/lambda-like/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-like", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "uuid": "^9.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/images/MyEmotionGardens_Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/AWS-Summit-Seoul-2023/images/MyEmotionGardens_Architecture.png -------------------------------------------------------------------------------- /AWS-Summit-Seoul-2023/prompt-generator/README.md: -------------------------------------------------------------------------------- 1 | # Prompt Generator 2 | 3 | My Emotion Gardens에 사용될 이미지 생성을 위해 사용한 Prompt Generator 입니다. Promot 생성에 사용될 감정을 선택하면 미리 정의해놓은 Prompt 템플릿이 생성됩니다. 그리고 생성된 템플릿의 각 Place Holder에 들어갈 값들을 [동물], [날씨], [계절], [시간] 에서 선택하고 [시작]을 누르면 Prompt 템플릿과 선택한 값들의 조합으로 Prompt를 생성합니다. 4 | 5 | 6 | 7 | 생성된 Promot 는 아래와 같으며 [Bulk Generator] 버튼을 누르면 /bulk API 를 호출하여 모든 생성된 모든 프롬프트의 이미지를 생성합니다. 8 | 9 | 10 | 11 | ## 사용된 라이브러리 12 | Tabulator(MIT License) https://tabulator.info/ -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/Llama2-chatbot-with-vector-store.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/Llama2-chatbot-with-vector-store.zip -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/cdk-chatbot-llama2/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/cdk-chatbot-llama2/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/cdk-chatbot-llama2/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/cdk-chatbot-llama2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-chatbot-llama2", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-chatbot-llama2": "bin/cdk-chatbot-llama2.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/cdk-chatbot-llama2/test/cdk-chatbot-llama2.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkChatbotLlama2 from '../lib/cdk-chatbot-llama2-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-chatbot-llama2-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkChatbotLlama2.CdkChatbotLlama2Stack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/gen-ai-aws.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/gen-ai-aws.pdf -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/gen-ai-wiki.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/gen-ai-wiki.pdf -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/lambda-chat/Dockerfile: -------------------------------------------------------------------------------- 1 | # lambda base image (python) 2 | FROM amazon/aws-lambda-python:3.8 3 | 4 | RUN /var/lang/bin/python3.8 -m pip install --upgrade pip 5 | RUN /var/lang/bin/python3.8 -m pip install PyPDF2 6 | RUN /var/lang/bin/python3.8 -m pip install langchain 7 | RUN /var/lang/bin/python3 -m pip install faiss-cpu 8 | RUN /var/lang/bin/python3 -m pip install opensearch-py 9 | 10 | WORKDIR /var/task/lambda-chat 11 | 12 | COPY lambda_function.py /var/task/ 13 | COPY . . 14 | 15 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/lambda-chat/test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import time 3 | from lambda_function import lambda_handler 4 | 5 | def load_event(): 6 | json_data = { 7 | "request-id": "test1234", 8 | "type": "text", 9 | "body": "Building a website can be done in 10 simple steps." 10 | } 11 | return json_data 12 | 13 | def main(): 14 | start = time.time() 15 | 16 | # load samples 17 | event = load_event() 18 | 19 | # run 20 | results = lambda_handler(event,"") 21 | 22 | # results 23 | print(results['statusCode']) 24 | print(results['msg']) 25 | 26 | print('Elapsed time: %0.2fs' % (time.time()-start)) 27 | 28 | if __name__ == '__main__': 29 | main() 30 | -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/sequence/seq-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/sequence/seq-chat.png -------------------------------------------------------------------------------- /blogs/Llama2-chatbot-with-vector-store/sequence/seq-upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/Llama2-chatbot-with-vector-store/sequence/seq-upload.png -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/aws-wiki.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/chatbot-based-on-Falcon-FM/aws-wiki.pdf -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-chatbot-falcon", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-chatbot-falcon": "bin/cdk-chatbot-falcon.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.4.0", 15 | "@types/node": "18.14.2", 16 | "jest": "^29.4.3", 17 | "ts-jest": "^29.0.5", 18 | "aws-cdk": "2.67.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~4.9.5" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.67.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/test/cdk-chatbot-falcon.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkChatbotFalcon from '../lib/cdk-chatbot-falcon-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-chatbot-falcon-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkChatbotFalcon.CdkChatbotFalconStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/cdk-chatbot-falcon/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "commonjs", 5 | "lib": [ 6 | "es2020" 7 | ], 8 | "declaration": true, 9 | "strict": true, 10 | "noImplicitAny": true, 11 | "strictNullChecks": true, 12 | "noImplicitThis": true, 13 | "alwaysStrict": true, 14 | "noUnusedLocals": false, 15 | "noUnusedParameters": false, 16 | "noImplicitReturns": true, 17 | "noFallthroughCasesInSwitch": false, 18 | "inlineSourceMap": true, 19 | "inlineSources": true, 20 | "experimentalDecorators": true, 21 | "strictPropertyInitialization": false, 22 | "typeRoots": [ 23 | "./node_modules/@types" 24 | ] 25 | }, 26 | "exclude": [ 27 | "node_modules", 28 | "cdk.out" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/chatbot-based-on-Falcon-FM.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/chatbot-based-on-Falcon-FM/chatbot-based-on-Falcon-FM.zip -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/gen-ai-aws.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/chatbot-based-on-Falcon-FM/gen-ai-aws.pdf -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/gen-ai-wiki.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/chatbot-based-on-Falcon-FM/gen-ai-wiki.pdf -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/chatbot-based-on-Falcon-FM/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-pdf-summary/Dockerfile: -------------------------------------------------------------------------------- 1 | # lambda base image (python) 2 | FROM amazon/aws-lambda-python:3.8 3 | 4 | RUN /var/lang/bin/python3.8 -m pip install --upgrade pip 5 | RUN /var/lang/bin/python3.8 -m pip install PyPDF2 6 | RUN /var/lang/bin/python3.8 -m pip install langchain 7 | 8 | WORKDIR /var/task/lambda-pdf-summary 9 | 10 | COPY lambda_function.py /var/task/ 11 | COPY . . 12 | 13 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-upload", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "node_modules/uuid": { 8 | "version": "9.0.0", 9 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", 10 | "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", 11 | "bin": { 12 | "uuid": "dist/bin/uuid" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! 4 | 5 | ## Testing 6 | 7 | ```shell 8 | npm test 9 | ``` 10 | 11 | ## Releasing 12 | 13 | Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): 14 | 15 | ```shell 16 | npm run release -- --dry-run # verify output manually 17 | npm run release # follow the instructions from the output of this command 18 | ``` 19 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/commonjs-browser/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/native.js: -------------------------------------------------------------------------------- 1 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 2 | export default { 3 | randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-browser/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/md5.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function md5(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('md5').update(bytes).digest(); 11 | } 12 | 13 | export default md5; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/native.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | export default { 3 | randomUUID: crypto.randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/rng.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 | 4 | let poolPtr = rnds8Pool.length; 5 | export default function rng() { 6 | if (poolPtr > rnds8Pool.length - 16) { 7 | crypto.randomFillSync(rnds8Pool); 8 | poolPtr = 0; 9 | } 10 | 11 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 | } -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/sha1.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function sha1(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('sha1').update(bytes).digest(); 11 | } 12 | 13 | export default sha1; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/esm-node/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/md5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function md5(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('md5').update(bytes).digest(); 20 | } 21 | 22 | var _default = md5; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/native-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | var _default = { 13 | randomUUID: _crypto.default.randomUUID 14 | }; 15 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/rng.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 13 | 14 | let poolPtr = rnds8Pool.length; 15 | 16 | function rng() { 17 | if (poolPtr > rnds8Pool.length - 16) { 18 | _crypto.default.randomFillSync(rnds8Pool); 19 | 20 | poolPtr = 0; 21 | } 22 | 23 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 24 | } -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/sha1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function sha1(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('sha1').update(bytes).digest(); 20 | } 21 | 22 | var _default = sha1; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/dist/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/node_modules/uuid/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import uuid from './dist/index.js'; 2 | export const v1 = uuid.v1; 3 | export const v3 = uuid.v3; 4 | export const v4 = uuid.v4; 5 | export const v5 = uuid.v5; 6 | export const NIL = uuid.NIL; 7 | export const version = uuid.version; 8 | export const validate = uuid.validate; 9 | export const stringify = uuid.stringify; 10 | export const parse = uuid.parse; 11 | -------------------------------------------------------------------------------- /blogs/chatbot-based-on-Falcon-FM/lambda-upload/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-upload", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "uuid": "^9.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/README.md: -------------------------------------------------------------------------------- 1 | # Welcome to your CDK TypeScript project 2 | 3 | This is a blank project for CDK development with TypeScript. 4 | 5 | The `cdk.json` file tells the CDK Toolkit how to execute your app. 6 | 7 | ## Useful commands 8 | 9 | * `npm run build` compile typescript to js 10 | * `npm run watch` watch for changes and compile 11 | * `npm run test` perform the jest unit tests 12 | * `cdk deploy` deploy this stack to your default AWS account/region 13 | * `cdk diff` compare deployed stack with current state 14 | * `cdk synth` emits the synthesized CloudFormation template 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-image-recommender", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-image-recommender": "bin/cdk-image-recommender.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.4.0", 15 | "@types/node": "18.14.2", 16 | "jest": "^29.4.3", 17 | "ts-jest": "^29.0.5", 18 | "aws-cdk": "2.67.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~4.9.5" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.80.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/cdk-image-recommender/test/cdk-image-recommender.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkImageRecommender from '../lib/cdk-image-recommender-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-image-recommender-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkImageRecommender.CdkImageRecommenderStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/html/enabler.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | html,body{ 7 | height: 100%; 8 | } 9 | 10 | .wrapper{ 11 | height: 100%; 12 | overflow: hidden; 13 | display: flex; 14 | flex-direction: column; 15 | align-items: center; 16 | justify-content: center; 17 | } 18 | 19 | .video-container{ 20 | display: flex; 21 | width: 550px; 22 | padding: 1rem; 23 | justify-content: space-around; 24 | } 25 | 26 | .video-item > h2{ 27 | text-align: center; 28 | } 29 | 30 | .video-item > video{ 31 | border: 1px solid red; 32 | width: 335px; 33 | height: 250px; 34 | } 35 | 36 | button,a{ 37 | border: none; 38 | font-size: 14px; 39 | background: #ccc; 40 | padding: 0.5rem 1rem; 41 | cursor: pointer; 42 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/html/gallery.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | html,body{ 7 | height: 100%; 8 | } 9 | 10 | .wrapper{ 11 | height: 100%; 12 | overflow: hidden; 13 | display: flex; 14 | flex-direction: column; 15 | align-items: center; 16 | justify-content: center; 17 | } 18 | 19 | .video-container{ 20 | display: flex; 21 | width: 550px; 22 | padding: 1rem; 23 | justify-content: space-around; 24 | } 25 | 26 | .video-item > h2{ 27 | text-align: center; 28 | } 29 | 30 | .video-item > video{ 31 | border: 1px solid red; 32 | width: 335px; 33 | height: 250px; 34 | } 35 | 36 | button,a{ 37 | border: none; 38 | font-size: 14px; 39 | background: #ccc; 40 | padding: 0.5rem 1rem; 41 | cursor: pointer; 42 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/html/style.css: -------------------------------------------------------------------------------- 1 | .fa { 2 | font-size: 50px; 3 | cursor: pointer; 4 | user-select: none; 5 | } 6 | 7 | .fa:hover { 8 | color: darkblue; 9 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/image-recommender-based-on-emotion.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/image-recommender-based-on-emotion/image-recommender-based-on-emotion.zip -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype. 5 | // 6 | // If you don't wish to extend String.prototype, you can do this instead and 7 | // native String will not be touched: 8 | // 9 | // var colors = require('colors/safe); 10 | // colors.red("foo") 11 | // 12 | // 13 | require('./extendStringPrototype')(); 14 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | module['exports'] = function(colors) { 2 | return function(letter, i, exploded) { 3 | if (letter === ' ') return letter; 4 | switch (i%3) { 5 | case 0: return colors.red(letter); 6 | case 1: return colors.white(letter); 7 | case 2: return colors.blue(letter); 8 | } 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | module['exports'] = function(colors) { 2 | // RoY G BiV 3 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; 4 | return function(letter, i, exploded) { 5 | if (letter === ' ') { 6 | return letter; 7 | } else { 8 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 9 | } 10 | }; 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | module['exports'] = function(colors) { 2 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 3 | 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', 4 | 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; 5 | return function(letter, i, exploded) { 6 | return letter === ' ' ? letter : 7 | colors[ 8 | available[Math.round(Math.random() * (available.length - 2))] 9 | ](letter); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | module['exports'] = function(colors) { 2 | return function(letter, i, exploded) { 3 | return i % 2 === 0 ? letter : colors.inverse(letter); 4 | }; 5 | }; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API, 3 | // which will not touch String.prototype. 4 | // 5 | // var colors = require('colors/safe'); 6 | // colors.red("foo") 7 | // 8 | // 9 | var colors = require('./lib/colors'); 10 | module['exports'] = colors; 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@colors/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red', 12 | }; 13 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/adapters/hash.js: -------------------------------------------------------------------------------- 1 | var adapter = require('./'); 2 | 3 | /** 4 | * Extracts the values from process.env. 5 | * 6 | * @type {Function} 7 | * @public 8 | */ 9 | module.exports = adapter(function hash() { 10 | return /(debug|diagnostics)=([^&]+)/i.exec(window.location.hash)[2]; 11 | }); 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/adapters/index.js: -------------------------------------------------------------------------------- 1 | var enabled = require('enabled'); 2 | 3 | /** 4 | * Creates a new Adapter. 5 | * 6 | * @param {Function} fn Function that returns the value. 7 | * @returns {Function} The adapter logic. 8 | * @public 9 | */ 10 | module.exports = function create(fn) { 11 | return function adapter(namespace) { 12 | try { 13 | return enabled(namespace, fn()); 14 | } catch (e) { /* Any failure means that we found nothing */ } 15 | 16 | return false; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/adapters/localstorage.js: -------------------------------------------------------------------------------- 1 | var adapter = require('./'); 2 | 3 | /** 4 | * Extracts the values from process.env. 5 | * 6 | * @type {Function} 7 | * @public 8 | */ 9 | module.exports = adapter(function storage() { 10 | return localStorage.getItem('debug') || localStorage.getItem('diagnostics'); 11 | }); 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/adapters/process.env.js: -------------------------------------------------------------------------------- 1 | var adapter = require('./'); 2 | 3 | /** 4 | * Extracts the values from process.env. 5 | * 6 | * @type {Function} 7 | * @public 8 | */ 9 | module.exports = adapter(function processenv() { 10 | return process.env.DEBUG || process.env.DIAGNOSTICS; 11 | }); 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/browser/index.js: -------------------------------------------------------------------------------- 1 | // 2 | // Select the correct build version depending on the environment. 3 | // 4 | if (process.env.NODE_ENV === 'production') { 5 | module.exports = require('./production.js'); 6 | } else { 7 | module.exports = require('./development.js'); 8 | } 9 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/browser/override.js: -------------------------------------------------------------------------------- 1 | var diagnostics = require('./'); 2 | 3 | // 4 | // No way to override `debug` with `diagnostics` in the browser. 5 | // 6 | module.exports = diagnostics; 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/browser/production.js: -------------------------------------------------------------------------------- 1 | var create = require('../diagnostics'); 2 | 3 | /** 4 | * Create a new diagnostics logger. 5 | * 6 | * @param {String} namespace The namespace it should enable. 7 | * @param {Object} options Additional options. 8 | * @returns {Function} The logger. 9 | * @public 10 | */ 11 | var diagnostics = create(function prod(namespace, options) { 12 | options = options || {}; 13 | options.namespace = namespace; 14 | options.prod = true; 15 | options.dev = false; 16 | 17 | if (!(options.force || prod.force)) return prod.nope(options); 18 | return prod.yep(options); 19 | }); 20 | 21 | // 22 | // Expose the diagnostics logger. 23 | // 24 | module.exports = diagnostics; 25 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js: -------------------------------------------------------------------------------- 1 | var colorspace = require('colorspace'); 2 | var kuler = require('kuler'); 3 | 4 | /** 5 | * Prefix the messages with a colored namespace. 6 | * 7 | * @param {Array} args The messages array that is getting written. 8 | * @param {Object} options Options for diagnostics. 9 | * @returns {Array} Altered messages array. 10 | * @public 11 | */ 12 | module.exports = function ansiModifier(args, options) { 13 | var namespace = options.namespace; 14 | var ansi = options.colors !== false 15 | ? kuler(namespace +':', colorspace(namespace)) 16 | : namespace +':'; 17 | 18 | args[0] = ansi +' '+ args[0]; 19 | return args; 20 | }; 21 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/node/index.js: -------------------------------------------------------------------------------- 1 | // 2 | // Select the correct build version depending on the environment. 3 | // 4 | if (process.env.NODE_ENV === 'production') { 5 | module.exports = require('./production.js'); 6 | } else { 7 | module.exports = require('./development.js'); 8 | } 9 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/node/override.js: -------------------------------------------------------------------------------- 1 | const diagnostics = require('./'); 2 | 3 | // 4 | // Override the existing `debug` call so it will use `diagnostics` instead 5 | // of the `debug` module. 6 | // 7 | try { 8 | var key = require.resolve('debug'); 9 | 10 | require.cache[key] = { 11 | exports: diagnostics, 12 | filename: key, 13 | loaded: true, 14 | id: key 15 | }; 16 | } catch (e) { /* We don't really care if it fails */ } 17 | 18 | // 19 | // Export the default import as exports again. 20 | // 21 | module.exports = diagnostics; 22 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@dabh/diagnostics/node/production.js: -------------------------------------------------------------------------------- 1 | var create = require('../diagnostics'); 2 | 3 | /** 4 | * Create a new diagnostics logger. 5 | * 6 | * @param {String} namespace The namespace it should enable. 7 | * @param {Object} options Additional options. 8 | * @returns {Function} The logger. 9 | * @public 10 | */ 11 | var diagnostics = create(function prod(namespace, options) { 12 | options = options || {}; 13 | options.namespace = namespace; 14 | options.prod = true; 15 | options.dev = false; 16 | 17 | if (!(options.force || prod.force)) return prod.nope(options); 18 | return prod.yep(options); 19 | }); 20 | 21 | // 22 | // Expose the diagnostics logger. 23 | // 24 | module.exports = diagnostics; 25 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@types/triple-beam/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/triple-beam` 3 | 4 | # Summary 5 | This package contains type definitions for triple-beam (https://github.com/winstonjs/triple-beam). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/triple-beam. 9 | 10 | ### Additional Details 11 | * Last updated: Fri, 21 Aug 2020 05:44:06 GMT 12 | * Dependencies: none 13 | * Global values: `TripleBeam` 14 | 15 | # Credits 16 | These definitions were written by [Daniel Byrne](https://github.com/danwbyrne). 17 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/@types/triple-beam/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for triple-beam 1.3 2 | // Project: https://github.com/winstonjs/triple-beam 3 | // Definitions by: Daniel Byrne 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 5 | 6 | export as namespace TripleBeam; 7 | 8 | export const LEVEL: unique symbol; 9 | export const MESSAGE: unique symbol; 10 | export const SPLAT: unique symbol; 11 | export const configs: Configs; 12 | 13 | export interface Config { 14 | readonly levels: {[k: string]: number}; 15 | readonly colors: {[k: string]: string}; 16 | } 17 | 18 | export interface Configs { 19 | readonly cli: Config; 20 | readonly npm: Config; 21 | readonly syslog: Config; 22 | } 23 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "async", 3 | "main": "dist/async.js", 4 | "ignore": [ 5 | "bower_components", 6 | "lib", 7 | "test", 8 | "node_modules", 9 | "perf", 10 | "support", 11 | "**/.*", 12 | "*.config.js", 13 | "*.json", 14 | "index.js", 15 | "Makefile" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/breakLoop.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | // A temporary value used to identify if the loop should be broken. 7 | // See #1064, #1293 8 | const breakLoop = {}; 9 | exports.default = breakLoop; 10 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/getIterator.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | 7 | exports.default = function (coll) { 8 | return coll[Symbol.iterator] && coll[Symbol.iterator](); 9 | }; 10 | 11 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/initialParams.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | 7 | exports.default = function (fn) { 8 | return function (...args /*, callback*/) { 9 | var callback = args.pop(); 10 | return fn.call(this, args, callback); 11 | }; 12 | }; 13 | 14 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/isArrayLike.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = isArrayLike; 7 | function isArrayLike(value) { 8 | return value && typeof value.length === 'number' && value.length >= 0 && value.length % 1 === 0; 9 | } 10 | module.exports = exports['default']; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/once.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = once; 7 | function once(fn) { 8 | function wrapper(...args) { 9 | if (fn === null) return; 10 | var callFn = fn; 11 | fn = null; 12 | callFn.apply(this, args); 13 | } 14 | Object.assign(wrapper, fn); 15 | return wrapper; 16 | } 17 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/onlyOnce.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = onlyOnce; 7 | function onlyOnce(fn) { 8 | return function (...args) { 9 | if (fn === null) throw new Error("Callback was already called."); 10 | var callFn = fn; 11 | fn = null; 12 | callFn.apply(this, args); 13 | }; 14 | } 15 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/promiseCallback.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | const PROMISE_SYMBOL = Symbol('promiseCallback'); 7 | 8 | function promiseCallback() { 9 | let resolve, reject; 10 | function callback(err, ...args) { 11 | if (err) return reject(err); 12 | resolve(args.length > 1 ? args : args[0]); 13 | } 14 | 15 | callback[PROMISE_SYMBOL] = new Promise((res, rej) => { 16 | resolve = res, reject = rej; 17 | }); 18 | 19 | return callback; 20 | } 21 | 22 | exports.promiseCallback = promiseCallback; 23 | exports.PROMISE_SYMBOL = PROMISE_SYMBOL; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/range.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = range; 7 | function range(size) { 8 | var result = Array(size); 9 | while (size--) { 10 | result[size] = size; 11 | } 12 | return result; 13 | } 14 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/async/internal/withoutIndex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = _withoutIndex; 7 | function _withoutIndex(iteratee) { 8 | return (value, index, callback) => iteratee(value, callback); 9 | } 10 | module.exports = exports["default"]; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/color-name/README.md: -------------------------------------------------------------------------------- 1 | A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. 2 | 3 | [![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) 4 | 5 | 6 | ```js 7 | var colors = require('color-name'); 8 | colors.red //[255,0,0] 9 | ``` 10 | 11 | 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/color-name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color-name", 3 | "version": "1.1.3", 4 | "description": "A list of color names and its values", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "node test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git@github.com:dfcreative/color-name.git" 12 | }, 13 | "keywords": [ 14 | "color-name", 15 | "color", 16 | "color-keyword", 17 | "keyword" 18 | ], 19 | "author": "DY ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/dfcreative/color-name/issues" 23 | }, 24 | "homepage": "https://github.com/dfcreative/color-name" 25 | } 26 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/color-name/test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var names = require('./'); 4 | var assert = require('assert'); 5 | 6 | assert.deepEqual(names.red, [255,0,0]); 7 | assert.deepEqual(names.aliceblue, [240,248,255]); 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/enabled/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "10" 4 | - "9" 5 | - "8" 6 | after_script: 7 | - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" 8 | matrix: 9 | fast_finish: true 10 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/fn.name/.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json binary 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/fn.name/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "10" 4 | - "8" 5 | - "6" 6 | - "4" 7 | script: 8 | - "npm run test-travis" 9 | after_script: 10 | - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | /* istanbul ignore next */ 4 | if (typeof util.inherits !== 'function') throw ''; 5 | module.exports = util.inherits; 6 | } catch (e) { 7 | /* istanbul ignore next */ 8 | module.exports = require('./inherits_browser.js'); 9 | } 10 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.4", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "tap" 21 | }, 22 | "devDependencies": { 23 | "tap": "^14.2.4" 24 | }, 25 | "files": [ 26 | "inherits.js", 27 | "inherits_browser.js" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/is-arrayish/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function isArrayish(obj) { 2 | if (!obj || typeof obj === 'string') { 3 | return false; 4 | } 5 | 6 | return obj instanceof Array || Array.isArray(obj) || 7 | (obj.length >= 0 && (obj.splice instanceof Function || 8 | (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); 9 | }; 10 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/kuler/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "9" 4 | - "8" 5 | - "6" 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"] 3 | } 4 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@dabh/eslint-config-populist", 3 | "rules": { 4 | "no-undefined": 0, 5 | "strict": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json binary 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/align.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const format = require('./format'); 4 | 5 | /* 6 | * function align (info) 7 | * Returns a new instance of the align Format which adds a `\t` 8 | * delimiter before the message to properly align it in the same place. 9 | * It was previously { align: true } in winston < 3.0.0 10 | */ 11 | module.exports = format(info => { 12 | info.message = `\t${info.message}`; 13 | return info; 14 | }); 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/dist/align.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var format = require('./format'); 4 | /* 5 | * function align (info) 6 | * Returns a new instance of the align Format which adds a `\t` 7 | * delimiter before the message to properly align it in the same place. 8 | * It was previously { align: true } in winston < 3.0.0 9 | */ 10 | 11 | 12 | module.exports = format(function (info) { 13 | info.message = "\t".concat(info.message); 14 | return info; 15 | }); -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/dist/label.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var format = require('./format'); 4 | /* 5 | * function label (info) 6 | * Returns a new instance of the label Format which adds the specified 7 | * `opts.label` before the message. This was previously exposed as 8 | * { label: 'my label' } to transports in `winston < 3.0.0`. 9 | */ 10 | 11 | 12 | module.exports = format(function (info, opts) { 13 | if (opts.message) { 14 | info.message = "[".concat(opts.label, "] ").concat(info.message); 15 | return info; 16 | } 17 | 18 | info.label = opts.label; 19 | return info; 20 | }); -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/dist/levels.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _require = require('./colorize'), 4 | Colorizer = _require.Colorizer; 5 | /* 6 | * Simple method to register colors with a simpler require 7 | * path within the module. 8 | */ 9 | 10 | 11 | module.exports = function (config) { 12 | Colorizer.addColors(config.colors || config); 13 | return config; 14 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/dist/ms.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _this = void 0; 4 | 5 | var format = require('./format'); 6 | 7 | var ms = require('ms'); 8 | /* 9 | * function ms (info) 10 | * Returns an `info` with a `ms` property. The `ms` property holds the Value 11 | * of the time difference between two calls in milliseconds. 12 | */ 13 | 14 | 15 | module.exports = format(function (info) { 16 | var curr = +new Date(); 17 | _this.diff = curr - (_this.prevTime || curr); 18 | _this.prevTime = curr; 19 | info.ms = "+".concat(ms(_this.diff)); 20 | return info; 21 | }); -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/examples/combine.js: -------------------------------------------------------------------------------- 1 | const { format } = require('../'); 2 | const { combine, timestamp, label } = format; 3 | 4 | const labelTimestamp = combine( 5 | label({ label: 'right meow!' }), 6 | timestamp() 7 | ); 8 | 9 | const info = labelTimestamp.transform({ 10 | level: 'info', 11 | message: 'What time is the testing at?' 12 | }); 13 | 14 | console.dir(info); 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/examples/invalid.js: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-vars: 0 */ 2 | const { format } = require('../'); 3 | 4 | const invalid = format(function invalid(just, too, many, args) { 5 | return just; 6 | }); 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/label.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const format = require('./format'); 4 | 5 | /* 6 | * function label (info) 7 | * Returns a new instance of the label Format which adds the specified 8 | * `opts.label` before the message. This was previously exposed as 9 | * { label: 'my label' } to transports in `winston < 3.0.0`. 10 | */ 11 | module.exports = format((info, opts) => { 12 | if (opts.message) { 13 | info.message = `[${opts.label}] ${info.message}`; 14 | return info; 15 | } 16 | 17 | info.label = opts.label; 18 | return info; 19 | }); 20 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/levels.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { Colorizer } = require('./colorize'); 4 | 5 | /* 6 | * Simple method to register colors with a simpler require 7 | * path within the module. 8 | */ 9 | module.exports = config => { 10 | Colorizer.addColors(config.colors || config); 11 | return config; 12 | }; 13 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/ms.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const format = require('./format'); 4 | const ms = require('ms'); 5 | 6 | /* 7 | * function ms (info) 8 | * Returns an `info` with a `ms` property. The `ms` property holds the Value 9 | * of the time difference between two calls in milliseconds. 10 | */ 11 | module.exports = format(info => { 12 | const curr = +new Date(); 13 | this.diff = curr - (this.prevTime || curr); 14 | this.prevTime = curr; 15 | info.ms = `+${ms(this.diff)}`; 16 | 17 | return info; 18 | }); 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/printf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { MESSAGE } = require('triple-beam'); 4 | 5 | class Printf { 6 | constructor(templateFn) { 7 | this.template = templateFn; 8 | } 9 | 10 | transform(info) { 11 | info[MESSAGE] = this.template(info); 12 | return info; 13 | } 14 | } 15 | 16 | /* 17 | * function printf (templateFn) 18 | * Returns a new instance of the printf Format that creates an 19 | * intermediate prototype to store the template string-based formatter 20 | * function. 21 | */ 22 | module.exports = opts => new Printf(opts); 23 | 24 | module.exports.Printf 25 | = module.exports.Format 26 | = Printf; 27 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/logform/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "lib": [ 5 | "es6" 6 | ], 7 | "noImplicitAny": true, 8 | "noImplicitThis": true, 9 | "strictNullChecks": true, 10 | "strictFunctionTypes": true, 11 | "baseUrl": "../", 12 | "typeRoots": [ 13 | "../" 14 | ], 15 | "types": [], 16 | "noEmit": true, 17 | "forceConsistentCasingInFileNames": true 18 | }, 19 | "files": [ 20 | "index.d.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/readable-stream/experimentalWarning.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var experimentalWarnings = new Set(); 4 | 5 | function emitExperimentalWarning(feature) { 6 | if (experimentalWarnings.has(feature)) return; 7 | var msg = feature + ' is an experimental feature. This feature could ' + 8 | 'change at any time'; 9 | experimentalWarnings.add(feature); 10 | process.emitWarning(msg, 'ExperimentalWarning'); 11 | } 12 | 13 | function noop() {} 14 | 15 | module.exports.emitExperimentalWarning = process.emitWarning 16 | ? emitExperimentalWarning 17 | : noop; 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/readable-stream/lib/internal/streams/from-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | throw new Error('Readable.from is not available in the browser') 3 | }; 4 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/readable-stream/lib/internal/streams/stream-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('events').EventEmitter; 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/readable-stream/lib/internal/streams/stream.js: -------------------------------------------------------------------------------- 1 | module.exports = require('stream'); 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/readable-stream/readable-browser.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = require('./lib/_stream_readable.js'); 2 | exports.Stream = exports; 3 | exports.Readable = exports; 4 | exports.Writable = require('./lib/_stream_writable.js'); 5 | exports.Duplex = require('./lib/_stream_duplex.js'); 6 | exports.Transform = require('./lib/_stream_transform.js'); 7 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 8 | exports.finished = require('./lib/internal/streams/end-of-stream.js'); 9 | exports.pipeline = require('./lib/internal/streams/pipeline.js'); 10 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/safe-stable-stringify/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "main": "wrapper.js" 4 | } 5 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/safe-stable-stringify/esm/wrapper.d.ts: -------------------------------------------------------------------------------- 1 | import { stringify } from '../index.js' 2 | 3 | export * from '../index.js' 4 | export default stringify 5 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/safe-stable-stringify/esm/wrapper.js: -------------------------------------------------------------------------------- 1 | import cjsModule from '../index.js' 2 | 3 | export const configure = cjsModule.configure 4 | 5 | export const stringify = cjsModule 6 | export default cjsModule 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/simple-swizzle/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isArrayish = require('is-arrayish'); 4 | 5 | var concat = Array.prototype.concat; 6 | var slice = Array.prototype.slice; 7 | 8 | var swizzle = module.exports = function swizzle(args) { 9 | var results = []; 10 | 11 | for (var i = 0, len = args.length; i < len; i++) { 12 | var arg = args[i]; 13 | 14 | if (isArrayish(arg)) { 15 | // http://jsperf.com/javascript-array-concat-vs-push/98 16 | results = concat.call(results, slice.call(arg)); 17 | } else { 18 | results.push(arg); 19 | } 20 | } 21 | 22 | return results; 23 | }; 24 | 25 | swizzle.wrap = function (fn) { 26 | return function () { 27 | return fn(swizzle(arguments)); 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/stack-trace/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/stack-trace/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | release: 7 | git push 8 | git push --tags 9 | npm publish . 10 | 11 | .PHONY: test 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/stack-trace/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Felix Geisendörfer (http://debuggable.com/)", 3 | "name": "stack-trace", 4 | "description": "Get v8 stack traces as an array of CallSite objects.", 5 | "version": "0.0.10", 6 | "homepage": "https://github.com/felixge/node-stack-trace", 7 | "repository": { 8 | "type": "git", 9 | "url": "git://github.com/felixge/node-stack-trace.git" 10 | }, 11 | "main": "./lib/stack-trace", 12 | "engines": { 13 | "node": "*" 14 | }, 15 | "license": "MIT", 16 | "dependencies": {}, 17 | "devDependencies": { 18 | "far": "0.0.3", 19 | "long-stack-traces": "0.1.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/text-hex/README.md: -------------------------------------------------------------------------------- 1 | # text-hex 2 | 3 | Transforms a given piece of text to a hex color. 4 | 5 | ## Install 6 | 7 | ``` 8 | npm install text-hex 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | var hex = require('text-hex'); 15 | console.log(hex('foo')); 16 | ``` 17 | 18 | ## License 19 | 20 | MIT 21 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/text-hex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*** 4 | * Convert string to hex color. 5 | * 6 | * @param {String} str Text to hash and convert to hex. 7 | * @returns {String} 8 | * @api public 9 | */ 10 | module.exports = function hex(str) { 11 | for ( 12 | var i = 0, hash = 0; 13 | i < str.length; 14 | hash = str.charCodeAt(i++) + ((hash << 5) - hash) 15 | ); 16 | 17 | var color = Math.floor( 18 | Math.abs( 19 | (Math.sin(hash) * 10000) % 1 * 16777216 20 | ) 21 | ).toString(16); 22 | 23 | return '#' + Array(6 - color.length + 1).join('0') + color; 24 | }; 25 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/text-hex/test.js: -------------------------------------------------------------------------------- 1 | describe('text-hex', function () { 2 | 'use strict'; 3 | 4 | var assume = require('assume') 5 | , hex = require('./'); 6 | 7 | it('is a 6 digit hex', function () { 8 | assume(hex('a')).to.have.length(7); // including a # 9 | assume(hex('a244fdafadfa4 adfau8fa a u adf8a0')).to.have.length(7); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "populist", 3 | "rules": { 4 | "one-var": ["error", { var: "never", let: "never", const: "never" }], 5 | "strict": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json binary 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "8" 6 | - "10" 7 | 8 | before_install: 9 | - travis_retry npm install 10 | 11 | script: 12 | - npm test 13 | 14 | notifications: 15 | email: 16 | - travis@nodejitsu.com 17 | irc: "irc.freenode.org#nodejitsu" 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ### 1.3.0 4 | 5 | - [#4] Add `SPLAT` symbol. 6 | - [#3] Add linting & TravisCI. 7 | 8 | ### 1.2.0 9 | 10 | - [#2] Move configs from `winston.config.{npm,syslog,npm}` into `triple-beam`. 11 | 12 | ### 1.1.0 13 | 14 | - Expose a `MESSAGE` Symbol, nothing more. 15 | 16 | ### 1.0.1 17 | 18 | - Use `Symbol.for` because that is how they work apparently. 19 | 20 | ### 1.0.0 21 | 22 | - Initial version. Defines a `LEVEL` Symbol, nothing more. 23 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/config/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * index.js: Default settings for all levels that winston knows about. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Export config set for the CLI. 12 | * @type {Object} 13 | */ 14 | Object.defineProperty(exports, 'cli', { 15 | value: require('./cli') 16 | }); 17 | 18 | /** 19 | * Export config set for npm. 20 | * @type {Object} 21 | */ 22 | Object.defineProperty(exports, 'npm', { 23 | value: require('./npm') 24 | }); 25 | 26 | /** 27 | * Export config set for the syslog. 28 | * @type {Object} 29 | */ 30 | Object.defineProperty(exports, 'syslog', { 31 | value: require('./syslog') 32 | }); 33 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/config/npm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * npm.js: Config that conform to npm logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Default levels for the npm configuration. 12 | * @type {Object} 13 | */ 14 | exports.levels = { 15 | error: 0, 16 | warn: 1, 17 | info: 2, 18 | http: 3, 19 | verbose: 4, 20 | debug: 5, 21 | silly: 6 22 | }; 23 | 24 | /** 25 | * Default levels for the npm configuration. 26 | * @type {Object} 27 | */ 28 | exports.colors = { 29 | error: 'red', 30 | warn: 'yellow', 31 | info: 'green', 32 | http: 'green', 33 | verbose: 'cyan', 34 | debug: 'blue', 35 | silly: 'magenta' 36 | }; 37 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/triple-beam/config/syslog.js: -------------------------------------------------------------------------------- 1 | /** 2 | * syslog.js: Config that conform to syslog logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Default levels for the syslog configuration. 12 | * @type {Object} 13 | */ 14 | exports.levels = { 15 | emerg: 0, 16 | alert: 1, 17 | crit: 2, 18 | error: 3, 19 | warning: 4, 20 | notice: 5, 21 | info: 6, 22 | debug: 7 23 | }; 24 | 25 | /** 26 | * Default levels for the syslog configuration. 27 | * @type {Object} 28 | */ 29 | exports.colors = { 30 | emerg: 'red', 31 | alert: 'yellow', 32 | crit: 'red', 33 | error: 'red', 34 | warning: 'red', 35 | notice: 'yellow', 36 | info: 'green', 37 | debug: 'blue' 38 | }; 39 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/util-deprecate/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.2 / 2015-10-07 3 | ================== 4 | 5 | * use try/catch when checking `localStorage` (#3, @kumavis) 6 | 7 | 1.0.1 / 2014-11-25 8 | ================== 9 | 10 | * browser: use `console.warn()` for deprecation calls 11 | * browser: more jsdocs 12 | 13 | 1.0.0 / 2014-04-30 14 | ================== 15 | 16 | * initial commit 17 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/util-deprecate/node.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * For Node.js, simply re-export the core `util.deprecate` function. 4 | */ 5 | 6 | module.exports = require('util').deprecate; 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! 4 | 5 | ## Testing 6 | 7 | ```shell 8 | npm test 9 | ``` 10 | 11 | ## Releasing 12 | 13 | Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): 14 | 15 | ```shell 16 | npm run release -- --dry-run # verify output manually 17 | npm run release # follow the instructions from the output of this command 18 | ``` 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/commonjs-browser/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/native.js: -------------------------------------------------------------------------------- 1 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 2 | export default { 3 | randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-browser/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/md5.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function md5(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('md5').update(bytes).digest(); 11 | } 12 | 13 | export default md5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/native.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | export default { 3 | randomUUID: crypto.randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/rng.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 | 4 | let poolPtr = rnds8Pool.length; 5 | export default function rng() { 6 | if (poolPtr > rnds8Pool.length - 16) { 7 | crypto.randomFillSync(rnds8Pool); 8 | poolPtr = 0; 9 | } 10 | 11 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/sha1.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function sha1(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('sha1').update(bytes).digest(); 11 | } 12 | 13 | export default sha1; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/esm-node/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/md5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function md5(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('md5').update(bytes).digest(); 20 | } 21 | 22 | var _default = md5; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/native-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | var _default = { 13 | randomUUID: _crypto.default.randomUUID 14 | }; 15 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/rng.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 13 | 14 | let poolPtr = rnds8Pool.length; 15 | 16 | function rng() { 17 | if (poolPtr > rnds8Pool.length - 16) { 18 | _crypto.default.randomFillSync(rnds8Pool); 19 | 20 | poolPtr = 0; 21 | } 22 | 23 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 24 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/sha1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function sha1(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('sha1').update(bytes).digest(); 20 | } 21 | 22 | var _default = sha1; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/dist/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/uuid/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import uuid from './dist/index.js'; 2 | export const v1 = uuid.v1; 3 | export const v3 = uuid.v3; 4 | export const v4 = uuid.v4; 5 | export const v5 = uuid.v5; 6 | export const NIL = uuid.NIL; 7 | export const version = uuid.version; 8 | export const validate = uuid.validate; 9 | export const stringify = uuid.stringify; 10 | export const parse = uuid.parse; 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/winston-transport/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"] 3 | } 4 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/winston-transport/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@dabh/eslint-config-populist", 3 | "rules": { 4 | "one-var": ["error", { var: "never", let: "never", const: "never" }], 5 | "strict": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/winston-transport/.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json binary 2 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json: -------------------------------------------------------------------------------- 1 | {"parent":null,"pid":70672,"argv":["/Users/David/.nvm/versions/node/v14.19.0/bin/node","/Users/David/winston-transport/node_modules/.bin/mocha","test/index.test.js","test/inheritance.test.js","test/legacy.test.js"],"execArgv":[],"cwd":"/Users/David/winston-transport","time":1644088125255,"ppid":70671,"coverageFilename":"/Users/David/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json","externalId":"","uuid":"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6","files":["/Users/David/winston-transport/index.js","/Users/David/winston-transport/legacy.js"]} -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/node_modules/winston-transport/.nyc_output/processinfo/index.json: -------------------------------------------------------------------------------- 1 | {"processes":{"c3d7ddb9-cc26-466b-a4f6-993ad69e86f6":{"parent":null,"children":[]}},"files":{"/Users/David/winston-transport/index.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"],"/Users/David/winston-transport/legacy.js":["c3d7ddb9-cc26-466b-a4f6-993ad69e86f6"]},"externalIds":{}} -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-emotion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-upload", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "uuid": "^9.0.0", 13 | "winston": "^3.8.2" 14 | }, 15 | "description": "" 16 | } 17 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-like", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "node_modules/uuid": { 8 | "version": "9.0.0", 9 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", 10 | "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", 11 | "bin": { 12 | "uuid": "dist/bin/uuid" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! 4 | 5 | ## Testing 6 | 7 | ```shell 8 | npm test 9 | ``` 10 | 11 | ## Releasing 12 | 13 | Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): 14 | 15 | ```shell 16 | npm run release -- --dry-run # verify output manually 17 | npm run release # follow the instructions from the output of this command 18 | ``` 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/commonjs-browser/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/native.js: -------------------------------------------------------------------------------- 1 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 2 | export default { 3 | randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-browser/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/md5.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function md5(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('md5').update(bytes).digest(); 11 | } 12 | 13 | export default md5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/native.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | export default { 3 | randomUUID: crypto.randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/rng.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 | 4 | let poolPtr = rnds8Pool.length; 5 | export default function rng() { 6 | if (poolPtr > rnds8Pool.length - 16) { 7 | crypto.randomFillSync(rnds8Pool); 8 | poolPtr = 0; 9 | } 10 | 11 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/sha1.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function sha1(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('sha1').update(bytes).digest(); 11 | } 12 | 13 | export default sha1; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/esm-node/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/md5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function md5(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('md5').update(bytes).digest(); 20 | } 21 | 22 | var _default = md5; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/native-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | var _default = { 13 | randomUUID: _crypto.default.randomUUID 14 | }; 15 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/rng.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 13 | 14 | let poolPtr = rnds8Pool.length; 15 | 16 | function rng() { 17 | if (poolPtr > rnds8Pool.length - 16) { 18 | _crypto.default.randomFillSync(rnds8Pool); 19 | 20 | poolPtr = 0; 21 | } 22 | 23 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 24 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/sha1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function sha1(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('sha1').update(bytes).digest(); 20 | } 21 | 22 | var _default = sha1; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/dist/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/node_modules/uuid/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import uuid from './dist/index.js'; 2 | export const v1 = uuid.v1; 3 | export const v3 = uuid.v3; 4 | export const v4 = uuid.v4; 5 | export const v5 = uuid.v5; 6 | export const NIL = uuid.NIL; 7 | export const version = uuid.version; 8 | export const validate = uuid.validate; 9 | export const stringify = uuid.stringify; 10 | export const parse = uuid.parse; 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/lambda-like/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-like", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "uuid": "^9.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/sequence/sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/image-recommender-based-on-emotion/sequence/sequence.png -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/test.js: -------------------------------------------------------------------------------- 1 | const searchFacesByImageParams = { 2 | CollectionId: collectionId, 3 | FaceMatchThreshold: 80, 4 | Image: { 5 | S3Object: { 6 | Bucket: bucketName, 7 | Name: fileName 8 | }, 9 | }, 10 | }; 11 | const data = await rekognition.searchFacesByImage(searchFacesByImageParams).promise(); 12 | faceId = data['FaceMatches'][0]['Face'].FaceId; 13 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils.md: -------------------------------------------------------------------------------- 1 | # 유용한 툴들 2 | 3 | ## 이미지 Pool에서 이미지 확인 및 삭제 4 | 5 | 1) imgPool 폴더에 신규 Object가 생성 event를 이용하여 DynamoDB에 기록합니다. 6 | 2) Previwer 툴을 이용하여 생성된 이미지의 리스트를 확인하고 필요시 삭제합니다. 7 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/.github/workflows/on-release.yaml: -------------------------------------------------------------------------------- 1 | name: Node.js Publish 2 | on: 3 | release: 4 | types: [published] 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | # Setup .npmrc file to publish to npm 11 | - uses: actions/setup-node@v1 12 | with: 13 | node-version: '16.x' 14 | # Needs to be explicitly specified for auth to work 15 | registry-url: 'https://registry.npmjs.org' 16 | - run: npm ci 17 | - run: npm publish --access public 18 | env: 19 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/cjs/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Tokenizer } from "./tokenizer"; 2 | export { default as TokenParser } from "./tokenparser"; 3 | export { default as JSONParser } from "./jsonparser"; 4 | export * as utf8 from "./utils/utf-8"; 5 | export { TokenType } from "./utils/constants"; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/cjs/utils/constants.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum TokenType { 2 | LEFT_BRACE = 1, 3 | RIGHT_BRACE = 2, 4 | LEFT_BRACKET = 3, 5 | RIGHT_BRACKET = 4, 6 | COLON = 5, 7 | COMMA = 6, 8 | TRUE = 7, 9 | FALSE = 8, 10 | NULL = 9, 11 | STRING = 10, 12 | NUMBER = 11, 13 | SEPARATOR = 12 14 | } 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/cjs/utils/types.d.ts: -------------------------------------------------------------------------------- 1 | export declare type JsonPrimitive = string | number | boolean | null; 2 | export declare type JsonKey = string | number | undefined; 3 | export declare type JsonObject = { 4 | [key: string]: JsonPrimitive | JsonStruct; 5 | }; 6 | export declare type JsonArray = (JsonPrimitive | JsonStruct)[]; 7 | export declare type JsonStruct = JsonObject | JsonArray; 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/cjs/utils/types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/deno/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Tokenizer } from './tokenizer.ts'; 2 | export { default as TokenParser } from './tokenparser.ts'; 3 | export { default as JSONParser } from './jsonparser.ts'; 4 | export * as utf8 from './utils/utf-8.ts'; 5 | export { TokenType } from './utils/constants.ts'; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/deno/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export enum TokenType { 2 | LEFT_BRACE = 0x1, 3 | RIGHT_BRACE = 0x2, 4 | LEFT_BRACKET = 0x3, 5 | RIGHT_BRACKET = 0x4, 6 | COLON = 0x5, 7 | COMMA = 0x6, 8 | TRUE = 0x7, 9 | FALSE = 0x8, 10 | NULL = 0x9, 11 | STRING = 0xa, 12 | NUMBER = 0xb, 13 | SEPARATOR = 0xc, 14 | } 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/deno/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type JsonPrimitive = string | number | boolean | null; 2 | export type JsonKey = string | number | undefined; 3 | export type JsonObject = { [key: string]: JsonPrimitive | JsonStruct }; 4 | export type JsonArray = (JsonPrimitive | JsonStruct)[]; 5 | export type JsonStruct = JsonObject | JsonArray; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/mjs/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Tokenizer } from "./tokenizer"; 2 | export { default as TokenParser } from "./tokenparser"; 3 | export { default as JSONParser } from "./jsonparser"; 4 | export * as utf8 from "./utils/utf-8"; 5 | export { TokenType } from "./utils/constants"; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/mjs/utils/constants.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum TokenType { 2 | LEFT_BRACE = 1, 3 | RIGHT_BRACE = 2, 4 | LEFT_BRACKET = 3, 5 | RIGHT_BRACKET = 4, 6 | COLON = 5, 7 | COMMA = 6, 8 | TRUE = 7, 9 | FALSE = 8, 10 | NULL = 9, 11 | STRING = 10, 12 | NUMBER = 11, 13 | SEPARATOR = 12 14 | } 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/mjs/utils/types.d.ts: -------------------------------------------------------------------------------- 1 | export declare type JsonPrimitive = string | number | boolean | null; 2 | export declare type JsonKey = string | number | undefined; 3 | export declare type JsonObject = { 4 | [key: string]: JsonPrimitive | JsonStruct; 5 | }; 6 | export declare type JsonArray = (JsonPrimitive | JsonStruct)[]; 7 | export declare type JsonStruct = JsonObject | JsonArray; 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/umd/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Tokenizer } from "./tokenizer"; 2 | export { default as TokenParser } from "./tokenparser"; 3 | export { default as JSONParser } from "./jsonparser"; 4 | export * as utf8 from "./utils/utf-8"; 5 | export { TokenType } from "./utils/constants"; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/umd/utils/constants.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum TokenType { 2 | LEFT_BRACE = 1, 3 | RIGHT_BRACE = 2, 4 | LEFT_BRACKET = 3, 5 | RIGHT_BRACKET = 4, 6 | COLON = 5, 7 | COMMA = 6, 8 | TRUE = 7, 9 | FALSE = 8, 10 | NULL = 9, 11 | STRING = 10, 12 | NUMBER = 11, 13 | SEPARATOR = 12 14 | } 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/dist/umd/utils/types.d.ts: -------------------------------------------------------------------------------- 1 | export declare type JsonPrimitive = string | number | boolean | null; 2 | export declare type JsonKey = string | number | undefined; 3 | export declare type JsonObject = { 4 | [key: string]: JsonPrimitive | JsonStruct; 5 | }; 6 | export declare type JsonArray = (JsonPrimitive | JsonStruct)[]; 7 | export declare type JsonStruct = JsonObject | JsonArray; 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/performance/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@streamparser/json-performance", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "deno": "deno run --unstable --allow-read index.deno.ts", 8 | "node": "node index.node.mjs ", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "", 12 | "license": "MIT", 13 | "dependencies": { 14 | "benchmark": "^2.1.4", 15 | "jsonparse": "^1.3.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from "rollup-plugin-typescript2"; 2 | import pkg from "./package.json"; 3 | 4 | export default [ 5 | { 6 | input: "src/index.ts", 7 | output: { 8 | file: pkg.browser, 9 | format: "umd", 10 | name: "jsonparse", 11 | }, 12 | plugins: [ 13 | typescript({ 14 | tsconfigOverride: { 15 | compilerOptions: { 16 | target: "es5", 17 | }, 18 | }, 19 | }), 20 | ], 21 | }, 22 | ]; 23 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Tokenizer } from "./tokenizer"; 2 | export { default as TokenParser } from "./tokenparser"; 3 | export { default as JSONParser } from "./jsonparser"; 4 | export * as utf8 from "./utils/utf-8"; 5 | export { TokenType } from "./utils/constants"; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export enum TokenType { 2 | LEFT_BRACE = 0x1, 3 | RIGHT_BRACE = 0x2, 4 | LEFT_BRACKET = 0x3, 5 | RIGHT_BRACKET = 0x4, 6 | COLON = 0x5, 7 | COMMA = 0x6, 8 | TRUE = 0x7, 9 | FALSE = 0x8, 10 | NULL = 0x9, 11 | STRING = 0xa, 12 | NUMBER = 0xb, 13 | SEPARATOR = 0xc, 14 | } 15 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type JsonPrimitive = string | number | boolean | null; 2 | export type JsonKey = string | number | undefined; 3 | export type JsonObject = { [key: string]: JsonPrimitive | JsonStruct }; 4 | export type JsonArray = (JsonPrimitive | JsonStruct)[]; 5 | export type JsonStruct = JsonObject | JsonArray; 6 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/@streamparser/json/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "ESNext", 5 | "lib": ["es2020", "dom"], 6 | "declaration": true, 7 | "outDir": "dist", 8 | "strict": true, 9 | }, 10 | "include": [ 11 | "src/**/*" 12 | ], 13 | // "exclude": [ 14 | // "node_modules", 15 | // "dist", 16 | // "test" 17 | // ] 18 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "es6": true 5 | }, 6 | "parserOptions": { 7 | "ecmaVersion": 9 8 | }, 9 | "extends": "eslint:recommended" 10 | } 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | test/fixtures/csv/eol.csv text eol=crlf 3 | test/fixtures/csv/escapeEOL.csv text eol=crlf 4 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | }; 4 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/bin/utils/parseNdjson.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parseNdJson(input) { 4 | return input 5 | .split('\n') 6 | .map(line => line.trim()) 7 | .filter(line => line !== '') 8 | .map(line=> JSON.parse(line)); 9 | } 10 | 11 | module.exports = parseNdJson; 12 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/default.js: -------------------------------------------------------------------------------- 1 | function defaultFormatter(value) { 2 | if (value === null || value === undefined) return ''; 3 | 4 | return `${value}`; 5 | } 6 | 7 | module.exports = defaultFormatter; 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/number.js: -------------------------------------------------------------------------------- 1 | function toFixedDecimals(value, decimals) { 2 | return value.toFixed(decimals); 3 | } 4 | 5 | function replaceSeparator(value, separator) { 6 | return value.replace('.', separator); 7 | } 8 | 9 | 10 | function numberFormatter(opts = {}) { 11 | if (opts.separator) { 12 | if (opts.decimals) { 13 | return (value) => replaceSeparator(toFixedDecimals(value, opts.decimals), opts.separator); 14 | } 15 | 16 | return (value) => replaceSeparator(value.toString(), opts.separator); 17 | } 18 | 19 | if (opts.decimals) { 20 | return (value) => toFixedDecimals(value, opts.decimals); 21 | } 22 | 23 | return (value) => value.toString(); 24 | } 25 | 26 | module.exports = numberFormatter; 27 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/object.js: -------------------------------------------------------------------------------- 1 | const defaulStringFormatter = require('json2csv/lib/formatters/string'); 2 | 3 | function objectFormatter(opts = { stringFormatter: defaulStringFormatter() }) { 4 | return (value) => { 5 | if (value === null) return ''; 6 | 7 | value = JSON.stringify(value); 8 | 9 | if (value === undefined) return ''; 10 | 11 | if (value[0] === '"') value = value.replace(/^"(.+)"$/,'$1'); 12 | 13 | return opts.stringFormatter(value); 14 | } 15 | } 16 | 17 | module.exports = objectFormatter; 18 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/string.js: -------------------------------------------------------------------------------- 1 | function stringFormatter(opts = {}) { 2 | const quote = typeof opts.quote === 'string' ? opts.quote : '"'; 3 | const escapedQuote = typeof opts.escapedQuote === 'string' ? opts.escapedQuote : `${quote}${quote}`; 4 | 5 | if (!quote) { 6 | return (value) => value; 7 | } 8 | 9 | return (value) => { 10 | if(value.includes(quote)) { 11 | value = value.replace(new RegExp(quote, 'g'), escapedQuote); 12 | } 13 | 14 | return `${quote}${value}${quote}`; 15 | } 16 | } 17 | 18 | module.exports = stringFormatter; 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/stringExcel.js: -------------------------------------------------------------------------------- 1 | const quote = '"'; 2 | const escapedQuote = '""""'; 3 | 4 | function stringExcel(value) { 5 | return `"=""${value.replace(new RegExp(quote, 'g'), escapedQuote)}"""`; 6 | } 7 | 8 | module.exports = stringExcel; 9 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/json2csv/lib/formatters/symbol.js: -------------------------------------------------------------------------------- 1 | const defaulStringFormatter = require('json2csv/lib/formatters/string'); 2 | 3 | function symbolFormatter(opts = { stringFormatter: defaulStringFormatter() }) { 4 | return (value) => opts.stringFormatter((value.toString().slice(7,-1))); 5 | } 6 | 7 | module.exports = symbolFormatter; 8 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/node_modules/lodash.get/README.md: -------------------------------------------------------------------------------- 1 | # lodash.get v4.4.2 2 | 3 | The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.get 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var get = require('lodash.get'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-csv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-generate-csv", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "json2csv": "^6.0.0-alpha.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-generate-dataset", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "node_modules/uuid": { 8 | "version": "9.0.0", 9 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", 10 | "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", 11 | "bin": { 12 | "uuid": "dist/bin/uuid" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! 4 | 5 | ## Testing 6 | 7 | ```shell 8 | npm test 9 | ``` 10 | 11 | ## Releasing 12 | 13 | Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): 14 | 15 | ```shell 16 | npm run release -- --dry-run # verify output manually 17 | npm run release # follow the instructions from the output of this command 18 | ``` 19 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/commonjs-browser/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/native.js: -------------------------------------------------------------------------------- 1 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 2 | export default { 3 | randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-browser/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/md5.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function md5(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('md5').update(bytes).digest(); 11 | } 12 | 13 | export default md5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/native.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | export default { 3 | randomUUID: crypto.randomUUID 4 | }; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/regex.js: -------------------------------------------------------------------------------- 1 | export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/rng.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 | 4 | let poolPtr = rnds8Pool.length; 5 | export default function rng() { 6 | if (poolPtr > rnds8Pool.length - 16) { 7 | crypto.randomFillSync(rnds8Pool); 8 | poolPtr = 0; 9 | } 10 | 11 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/sha1.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function sha1(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('sha1').update(bytes).digest(); 11 | } 12 | 13 | export default sha1; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/esm-node/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.slice(14, 15), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/md5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function md5(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('md5').update(bytes).digest(); 20 | } 21 | 22 | var _default = md5; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/native-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); 8 | var _default = { 9 | randomUUID 10 | }; 11 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/native.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | var _default = { 13 | randomUUID: _crypto.default.randomUUID 14 | }; 15 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/rng.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 13 | 14 | let poolPtr = rnds8Pool.length; 15 | 16 | function rng() { 17 | if (poolPtr > rnds8Pool.length - 16) { 18 | _crypto.default.randomFillSync(rnds8Pool); 19 | 20 | poolPtr = 0; 21 | } 22 | 23 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 24 | } -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/sha1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function sha1(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('sha1').update(bytes).digest(); 20 | } 21 | 22 | var _default = sha1; 23 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/dist/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.slice(14, 15), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/node_modules/uuid/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import uuid from './dist/index.js'; 2 | export const v1 = uuid.v1; 3 | export const v3 = uuid.v3; 4 | export const v4 = uuid.v4; 5 | export const v5 = uuid.v5; 6 | export const NIL = uuid.NIL; 7 | export const version = uuid.version; 8 | export const validate = uuid.validate; 9 | export const stringify = uuid.stringify; 10 | export const parse = uuid.parse; 11 | -------------------------------------------------------------------------------- /blogs/image-recommender-based-on-emotion/utils/lambda-generate-dataset/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda-generate-dataset", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "uuid": "^9.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/Amazon_Kendra.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/Amazon_Kendra.pdf -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/cdk-varco-opensearch/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/cdk-varco-opensearch/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/cdk-varco-opensearch/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/cdk-varco-opensearch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-varco-opensearch", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-varco-opensearch": "bin/cdk-varco-opensearch.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/cdk-varco-opensearch/test/cdk-varco-opensearch.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkVarcoOpensearch from '../lib/cdk-varco-opensearch-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-varco-opensearch-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkVarcoOpensearch.CdkVarcoOpensearchStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/image.png -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/korean-chatbot-using-varco-llm-and-opensearch.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/korean-chatbot-using-varco-llm-and-opensearch.zip -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/lambda-chat/Dockerfile: -------------------------------------------------------------------------------- 1 | # lambda base image (python) 2 | FROM amazon/aws-lambda-python:3.11 3 | 4 | RUN /var/lang/bin/python3.11 -m pip install --upgrade pip 5 | RUN /var/lang/bin/python3.11 -m pip install PyPDF2 6 | RUN /var/lang/bin/python3.11 -m pip install langchain 7 | RUN /var/lang/bin/python3 -m pip install faiss-cpu 8 | RUN /var/lang/bin/python3 -m pip install opensearch-py 9 | 10 | WORKDIR /var/task/lambda-chat 11 | 12 | COPY lambda_function.py /var/task/ 13 | COPY . . 14 | 15 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/lambda-chat/test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import time 3 | from lambda_function import lambda_handler 4 | 5 | def load_event(): 6 | json_data = { 7 | "request-id": "test1234", 8 | "type": "text", 9 | "body": "Building a website can be done in 10 simple steps." 10 | } 11 | return json_data 12 | 13 | def main(): 14 | start = time.time() 15 | 16 | # load samples 17 | event = load_event() 18 | 19 | # run 20 | results = lambda_handler(event,"") 21 | 22 | # results 23 | print(results['statusCode']) 24 | print(results['msg']) 25 | 26 | print('Elapsed time: %0.2fs' % (time.time()-start)) 27 | 28 | if __name__ == '__main__': 29 | main() 30 | -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/sequence/seq-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/sequence/seq-chat.png -------------------------------------------------------------------------------- /blogs/korean-chatbot-using-varco-llm-and-opensearch/sequence/seq-upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/korean-chatbot-using-varco-llm-and-opensearch/sequence/seq-upload.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/cdk-multi-rag-chatbot/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/cdk-multi-rag-chatbot/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/cdk-multi-rag-chatbot/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/cdk-multi-rag-chatbot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-multi-rag-chatbot", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-multi-rag-chatbot": "bin/cdk-multi-rag-chatbot.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/cdk-multi-rag-chatbot/test/cdk-multi-rag-chatbot.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkMultiRagChatbot from '../lib/cdk-multi-rag-chatbot-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-multi-rag-chatbot-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkMultiRagChatbot.CdkMultiRagChatbotStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/contents/Amazon_Lex.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/contents/Amazon_Lex.pdf -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/contents/error_code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/contents/error_code.pdf -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/basic-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/basic-architecture.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/endpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/endpoint.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/menu-input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/menu-input.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/output.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/result-error-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/result-error-code.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/result-lex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/result-lex.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/sequence.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/images/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/images/update.png -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/lambda-provisioning/lambda_function.py: -------------------------------------------------------------------------------- 1 | import json 2 | import boto3 3 | import os 4 | 5 | wss_url = os.environ.get('wss_url') 6 | 7 | def lambda_handler(event, context): 8 | print('event: ', event) 9 | 10 | print('wss_url: ', wss_url) 11 | 12 | return { 13 | 'statusCode': 200, 14 | 'info': json.dumps({ 15 | 'wss_url': wss_url 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /blogs/multi-rag-and-multi-region-llm-for-chatbot/multi-rag-and-multi-region-llm-for-chatbot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/multi-rag-and-multi-region-llm-for-chatbot/multi-rag-and-multi-region-llm-for-chatbot.zip -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/cdk-rag-chatbot-with-kendra/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/cdk-rag-chatbot-with-kendra/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/cdk-rag-chatbot-with-kendra/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-rag-chatbot-with-kendra", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-rag-chatbot-with-kendra": "bin/cdk-rag-chatbot-with-kendra.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/contents/error_code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/contents/error_code.pdf -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/contents/faq/faq-demo.csv: -------------------------------------------------------------------------------- 1 | How many free clinics are in Spokane WA?, 13, https://www.freeclinics.com/ 2 | How many free clinics are there in Mountain View Missouri?, 7, https://www.freeclinics.com/ -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/basic_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/basic_architecture.png -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/faq_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/faq_demo.png -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/result_banking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/images/result_banking.png -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/lambda-chat-ws/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-lambda-python:3.11 2 | 3 | WORKDIR /var/task/lambda-chat 4 | 5 | COPY lambda_function.py /var/task/ 6 | COPY test.py /var/task/ 7 | COPY . .. 8 | 9 | RUN /var/lang/bin/python3.11 -m pip install --upgrade pip 10 | 11 | RUN /var/lang/bin/python3 -m pip install PyPDF2 12 | RUN /var/lang/bin/python3 -m pip install langchain 13 | RUN /var/lang/bin/python3 -m pip install faiss-cpu 14 | 15 | RUN /var/lang/bin/python3 -m pip install botocore --upgrade 16 | RUN /var/lang/bin/python3 -m pip install boto3 --upgrade 17 | 18 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/lambda-provisioning/lambda_function.py: -------------------------------------------------------------------------------- 1 | import json 2 | import boto3 3 | import os 4 | 5 | wss_url = os.environ.get('wss_url') 6 | 7 | def lambda_handler(event, context): 8 | print('event: ', event) 9 | 10 | print('wss_url: ', wss_url) 11 | 12 | return { 13 | 'statusCode': 200, 14 | 'info': json.dumps({ 15 | 'wss_url': wss_url 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/rag-chatbot-using-bedrock-claude-and-kendra.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/rag-chatbot-using-bedrock-claude-and-kendra.zip -------------------------------------------------------------------------------- /blogs/rag-chatbot-using-bedrock-claude-and-kendra/seq-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-chatbot-using-bedrock-claude-and-kendra/seq-chat.png -------------------------------------------------------------------------------- /blogs/rag-code-generation/cdk-rag-code-generation/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/rag-code-generation/cdk-rag-code-generation/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/rag-code-generation/cdk-rag-code-generation/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/rag-code-generation/cdk-rag-code-generation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-rag-code-generation", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-rag-code-generation": "bin/cdk-rag-code-generation.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.11", 15 | "@types/node": "20.11.6", 16 | "jest": "^29.7.0", 17 | "ts-jest": "^29.1.2", 18 | "aws-cdk": "2.124.0", 19 | "ts-node": "^10.9.2", 20 | "typescript": "~5.3.3" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.124.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } -------------------------------------------------------------------------------- /blogs/rag-code-generation/cdk-rag-code-generation/test/cdk-rag-code-generation.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkRagCodeGeneration from '../lib/cdk-rag-code-generation-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-rag-code-generation-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkRagCodeGeneration.CdkRagCodeGenerationStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/rag-code-generation/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-code-generation/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/rag-code-generation/images/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-code-generation/images/output.png -------------------------------------------------------------------------------- /blogs/rag-code-generation/images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-code-generation/images/result.png -------------------------------------------------------------------------------- /blogs/rag-code-generation/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-code-generation/images/upload.png -------------------------------------------------------------------------------- /blogs/rag-code-generation/lambda-provisioning/lambda_function.py: -------------------------------------------------------------------------------- 1 | import json 2 | import boto3 3 | import os 4 | 5 | wss_url = os.environ.get('wss_url') 6 | 7 | def lambda_handler(event, context): 8 | print('event: ', event) 9 | 10 | print('wss_url: ', wss_url) 11 | 12 | return { 13 | 'statusCode': 200, 14 | 'info': json.dumps({ 15 | 'wss_url': wss_url 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /blogs/rag-code-generation/lambda-s3-event/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-lambda-python:3.11 2 | 3 | WORKDIR /var/task/lambda-chat 4 | 5 | COPY lambda_function.py /var/task/ 6 | COPY . .. 7 | 8 | RUN /var/lang/bin/python3 -m pip install opensearch-py 9 | 10 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/rag-code-generation/rag-code-generation.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-code-generation/rag-code-generation.zip -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/cdk-rag-enhanced-searching/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/cdk-rag-enhanced-searching/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/cdk-rag-enhanced-searching/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/cdk-rag-enhanced-searching/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-rag-enhanced-searching", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-rag-enhanced-searching": "bin/cdk-rag-enhanced-searching.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/cdk-rag-enhanced-searching/test/cdk-rag-enhanced-searching.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkRagEnhancedSearching from '../lib/cdk-rag-enhanced-searching-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-rag-enhanced-searching-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkRagEnhancedSearching.CdkRagEnhancedSearchingStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/contents/RAG.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-enhanced-searching/contents/RAG.pdf -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-enhanced-searching/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/lambda-provisioning/lambda_function.py: -------------------------------------------------------------------------------- 1 | import json 2 | import boto3 3 | import os 4 | 5 | wss_url = os.environ.get('wss_url') 6 | 7 | def lambda_handler(event, context): 8 | print('event: ', event) 9 | 10 | print('wss_url: ', wss_url) 11 | 12 | return { 13 | 'statusCode': 200, 14 | 'info': json.dumps({ 15 | 'wss_url': wss_url 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/lambda-s3-event/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-lambda-python:3.11 2 | 3 | WORKDIR /var/task/lambda-chat 4 | 5 | COPY lambda_function.py /var/task/ 6 | COPY . .. 7 | 8 | RUN /var/lang/bin/python3 -m pip install opensearch-py 9 | 10 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/pictures/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-enhanced-searching/pictures/architecture.png -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/pictures/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-enhanced-searching/pictures/result.png -------------------------------------------------------------------------------- /blogs/rag-enhanced-searching/rag-enhanced-searching.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/rag-enhanced-searching/rag-enhanced-searching.zip -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/cdk-stream-chatbot/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/cdk-stream-chatbot/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/cdk-stream-chatbot/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | roots: ['/test'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.tsx?$': 'ts-jest' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/cdk-stream-chatbot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-stream-chatbot", 3 | "version": "0.1.0", 4 | "bin": { 5 | "cdk-stream-chatbot": "bin/cdk-stream-chatbot.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.2", 16 | "jest": "^29.6.1", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.88.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.88.0", 24 | "constructs": "^10.0.0", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/cdk-stream-chatbot/test/cdk-stream-chatbot.test.ts: -------------------------------------------------------------------------------- 1 | // import * as cdk from 'aws-cdk-lib'; 2 | // import { Template } from 'aws-cdk-lib/assertions'; 3 | // import * as CdkStreamChatbot from '../lib/cdk-stream-chatbot-stack'; 4 | 5 | // example test. To run these tests, uncomment this file along with the 6 | // example resource in lib/cdk-stream-chatbot-stack.ts 7 | test('SQS Queue Created', () => { 8 | // const app = new cdk.App(); 9 | // // WHEN 10 | // const stack = new CdkStreamChatbot.CdkStreamChatbotStack(app, 'MyTestStack'); 11 | // // THEN 12 | // const template = Template.fromStack(stack); 13 | 14 | // template.hasResourceProperties('AWS::SQS::Queue', { 15 | // VisibilityTimeout: 300 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/html/basicprofile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/stream-chatbot-for-amazon-bedrock/html/basicprofile.jpg -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/html/login.js: -------------------------------------------------------------------------------- 1 | const myForm = document.querySelector('#my-form'); 2 | const userInput = document.querySelector('#userId'); 3 | 4 | myForm.addEventListener('submit', onSubmit); 5 | 6 | // load userId 7 | let userId = localStorage.getItem('userId'); // set userID if exists 8 | if(userId != '') { 9 | userInput.value = userId; 10 | } 11 | 12 | console.log(userInput.value); 13 | 14 | function onSubmit(e) { 15 | e.preventDefault(); 16 | console.log(userInput.value); 17 | 18 | localStorage.setItem('userId',userInput.value); 19 | console.log('Save Profile> userId:', userInput.value) 20 | 21 | window.location.href = "chat.html"; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/lambda-chat-ws/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-lambda-python:3.11 2 | 3 | WORKDIR /var/task/lambda-chat 4 | 5 | COPY lambda_function.py /var/task/ 6 | COPY test.py /var/task/ 7 | COPY . .. 8 | 9 | RUN /var/lang/bin/python3.11 -m pip install --upgrade pip 10 | 11 | RUN /var/lang/bin/python3 -m pip install PyPDF2 12 | RUN /var/lang/bin/python3 -m pip install langchain 13 | RUN /var/lang/bin/python3 -m pip install unstructured 14 | 15 | RUN /var/lang/bin/python3 -m pip install botocore --upgrade 16 | RUN /var/lang/bin/python3 -m pip install boto3 --upgrade 17 | 18 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/lambda-chat/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazon/aws-lambda-python:3.11 2 | 3 | WORKDIR /var/task/lambda-chat 4 | 5 | COPY lambda_function.py /var/task/ 6 | COPY test.py /var/task/ 7 | COPY . .. 8 | 9 | RUN /var/lang/bin/python3.11 -m pip install --upgrade pip 10 | 11 | RUN /var/lang/bin/python3 -m pip install PyPDF2 12 | RUN /var/lang/bin/python3 -m pip install langchain 13 | RUN /var/lang/bin/python3 -m pip install unstructured 14 | 15 | RUN /var/lang/bin/python3 -m pip install botocore --upgrade 16 | RUN /var/lang/bin/python3 -m pip install boto3 --upgrade 17 | 18 | CMD ["lambda_function.lambda_handler"] -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/sequence/seq-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/stream-chatbot-for-amazon-bedrock/sequence/seq-chat.png -------------------------------------------------------------------------------- /blogs/stream-chatbot-for-amazon-bedrock/stream-chatbot-for-amazon-bedrock.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/generative-ai-demo-using-amazon-sagemaker-jumpstart-kr/4a5758e4f2a99140835d877c39f23c89f1cf3cdd/blogs/stream-chatbot-for-amazon-bedrock/stream-chatbot-for-amazon-bedrock.zip --------------------------------------------------------------------------------