This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import LoginEndpoint from '../../endpoints/loginEndpoint'; | |
| import RegistrationEndpoint from '../../endpoints/registrationEndpoint'; | |
| import HomePage from '../../pages/homePage'; | |
| import TransactionHistoryPage from '../../pages/transactionHistoryPage'; | |
| describe('History transaction via UI', () => { | |
| const registrationEndpoint = new RegistrationEndpoint(); | |
| const loginEndpoint = new LoginEndpoint(); | |
| const homePage = new HomePage(); | |
| const transactionHistoryPage = new TransactionHistoryPage(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Your task is to find unique individuals in the given text. As a result, return an array of objects in the given format: | |
| [ | |
| { | |
| firstName: string, | |
| lastName: string, | |
| presumedGender: "male" | "female" | "unknown" | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const WebSocket = require("ws"); | |
| const redis = require("redis"); | |
| const subscriber = redis.createClient({ | |
| url: "redis://localhost:6379" | |
| }); | |
| const publisher = subscriber.duplicate(); | |
| const WS_CHANNEL = "ws:messages"; | |
| const mockedUsers = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "transfer": { | |
| "properties": { | |
| "transfer_type_of_transportation": { | |
| "type": "string", | |
| "description": "if it is car or aircraft or ship" | |
| }, | |
| "transfer_person_name": { "type": "string" }, | |
| "transfer_departure_from_location": { "type": "string" }, | |
| "transfer_arrival_to_location": { "type": "string" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| du -sh ./node_modules/* | sort -nr | grep '\dM.*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Api, Function, StackContext, use } from "sst/constructs"; | |
| import { Translations } from "./Translations"; | |
| export function API({ stack }: StackContext) { | |
| const { translationFn, translationFns } = use(Translations); | |
| const staticTranslationLambdas: Record<string, { function: Function }> = Object.fromEntries( | |
| translationFns.map(({ key, fn }) => [`POST /api/translate/${key}`, { function: fn }]) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { StackContext, Function, Stack } from "sst/constructs"; | |
| const LANGUAGE_PAIRS = [ | |
| ["es", "en"], | |
| ["pl", "en"], | |
| ] as const; | |
| interface UnidirectionalTranslation { | |
| from: string; | |
| to: string; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from easynmt import EasyNMT | |
| import json | |
| import os | |
| def main(event, context): | |
| source_lang = os.environ.get("FROM_LANGUAGE_CODE") | |
| target_lang = os.environ.get("TO_LANGUAGE_CODE") | |
| try: | |
| body_dict = json.loads(event.get("body", "{}")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM alpine:latest AS model | |
| ARG LANGUAGE_CODE_PAIR | |
| ENV LANGUAGE_CODE_PAIR=$LANGUAGE_CODE_PAIR | |
| RUN test -n "$LANGUAGE_CODE_PAIR" || (echo "ERROR: LANGUAGE_CODE_PAIR is empty!" && exit 1) | |
| RUN apk update && apk add --no-cache curl git git-lfs | |
| RUN git lfs install | |
| RUN git clone https://huggingface.co/Helsinki-NLP/opus-mt-${LANGUAGE_CODE_PAIR} /tmp/models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { SSTConfig } from "sst"; | |
| import { Translations } from "./stacks/Translations"; | |
| import { API } from "./stacks/Api"; | |
| export default { | |
| config(_input) { | |
| return { | |
| name: "easynmt-opus-translation", | |
| region: "eu-west-1", | |
| }; |
NewerOlder