Compare commits
5 Commits
feature/dr
...
2356259823
| Author | SHA1 | Date | |
|---|---|---|---|
| 2356259823 | |||
|
|
872c921a53 | ||
| 10b5207f9a | |||
| 2ede62bcd8 | |||
| 359a136dbf |
@@ -42,6 +42,7 @@ app.use(require('./root'))
|
|||||||
/**
|
/**
|
||||||
* Добавляйте сюда свои routers.
|
* Добавляйте сюда свои routers.
|
||||||
*/
|
*/
|
||||||
|
app.use('/kfu-m-24-1', require('./routers/kfu-m-24-1'))
|
||||||
app.use('/epja-2024-1', require('./routers/epja-2024-1'))
|
app.use('/epja-2024-1', require('./routers/epja-2024-1'))
|
||||||
app.use('/todo', require('./routers/todo/routes'))
|
app.use('/todo', require('./routers/todo/routes'))
|
||||||
app.use('/dogsitters-finder', require('./routers/dogsitters-finder'))
|
app.use('/dogsitters-finder', require('./routers/dogsitters-finder'))
|
||||||
|
|||||||
@@ -7,4 +7,6 @@ router.use('/cats', require('./cats/index'))
|
|||||||
|
|
||||||
router.use('/ecliptica', require('./ecliptica/index'))
|
router.use('/ecliptica', require('./ecliptica/index'))
|
||||||
|
|
||||||
|
router.use('/sdk', require('./sdk/index'))
|
||||||
|
|
||||||
module.exports = router
|
module.exports = router
|
||||||
|
|||||||
123
server/routers/epja-2024-1/sdk/index.js
Normal file
123
server/routers/epja-2024-1/sdk/index.js
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
const router = require('express').Router();
|
||||||
|
const { v4: uuidv4 } = require('uuid');
|
||||||
|
|
||||||
|
const workout1 = {
|
||||||
|
id: uuidv4(),
|
||||||
|
title: "Toned upper body",
|
||||||
|
exercises: [
|
||||||
|
{ title: "Push ups", repsOrDuration: 12, isTimeBased: false },
|
||||||
|
{ title: "Plank", repsOrDuration: 4, isTimeBased: true },
|
||||||
|
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
|
||||||
|
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
|
||||||
|
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
|
||||||
|
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
|
||||||
|
],
|
||||||
|
tags: ['Weights', 'Arms', 'Abs', 'Chest', 'Back']
|
||||||
|
};
|
||||||
|
|
||||||
|
const workout2 = {
|
||||||
|
id: uuidv4(),
|
||||||
|
title: "Tom Platz's legs",
|
||||||
|
exercises: [
|
||||||
|
{ title: "Squats", repsOrDuration: 12, isTimeBased: false, weight: 40 },
|
||||||
|
{ title: "Leg Press", repsOrDuration: 4, isTimeBased: false, weight: 65 },
|
||||||
|
{ title: "Lunges", repsOrDuration: 2, isTimeBased: true }
|
||||||
|
],
|
||||||
|
tags: ['Weights', 'Legs']
|
||||||
|
};
|
||||||
|
|
||||||
|
const workout3 = {
|
||||||
|
id: uuidv4(),
|
||||||
|
title: "HIIT",
|
||||||
|
exercises: [
|
||||||
|
{ title: "Jumping rope", repsOrDuration: 100, isTimeBased: false },
|
||||||
|
{ title: "Burpees", repsOrDuration: 3, isTimeBased: true },
|
||||||
|
{ title: "Jumping Jacks", repsOrDuration: 50, isTimeBased: false }
|
||||||
|
],
|
||||||
|
tags: ['Cardio']
|
||||||
|
}
|
||||||
|
|
||||||
|
const savedWorkouts = [workout1, workout3];
|
||||||
|
|
||||||
|
const trainingWorkouts = [workout2];
|
||||||
|
|
||||||
|
router.post('/workout', (req, res) => {
|
||||||
|
const newWorkout = { ...req.body, id: uuidv4() };
|
||||||
|
savedWorkouts.push(newWorkout);
|
||||||
|
res.status(201).json(newWorkout);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/workouts', (req, res) => {
|
||||||
|
res.json(savedWorkouts);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.post('/training/workout', (req, res) => {
|
||||||
|
const newWorkout = { ...req.body, id: uuidv4() };
|
||||||
|
trainingWorkouts.push(newWorkout);
|
||||||
|
res.status(201).json(newWorkout);
|
||||||
|
});
|
||||||
|
|
||||||
|
const trainings = [{ id: uuidv4(), calories: 450, date: new Date("Thu Oct 03 2024 10:05:24 GMT+0300 (Moscow Standard Time)"), emoji: "fuzzy", hours: 1, minutes: 30, isWorkoutSaved: true, workout: workout1.id }];
|
||||||
|
|
||||||
|
const days = [
|
||||||
|
new Date("Thu Oct 03 2024 10:05:24 GMT+0300 (Moscow Standard Time)"),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
router.post('/training', (req, res) => {
|
||||||
|
const newTraining = { ...req.body, id: uuidv4() };
|
||||||
|
trainings.push(newTraining);
|
||||||
|
days.push(newTraining.date);
|
||||||
|
res.status(201).json(newTraining);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/training', (req, res) => {
|
||||||
|
const { date } = req.query;
|
||||||
|
if (!date) {
|
||||||
|
return res.status(400).json({ message: 'Date query parameter is required' });
|
||||||
|
}
|
||||||
|
const formattedDate = new Date(date);
|
||||||
|
const result = trainings.find(t => new Date(t.date).toDateString() === formattedDate.toDateString());
|
||||||
|
if (result) {
|
||||||
|
res.json(result);
|
||||||
|
} else {
|
||||||
|
res.status(404).json({ message: 'Training not found for the specified date' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/training/workout', (req, res) => {
|
||||||
|
const { id } = req.query;
|
||||||
|
if (!id) {
|
||||||
|
return res.status(400).json({ message: 'Id query parameter is required' });
|
||||||
|
}
|
||||||
|
const result = trainingWorkouts.find(w => w.id === id);
|
||||||
|
if (result) {
|
||||||
|
res.json(result);
|
||||||
|
} else {
|
||||||
|
res.status(404).json({ message: 'Training with such workout not found' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/workout', (req, res) => {
|
||||||
|
const { id } = req.query;
|
||||||
|
if (!id) {
|
||||||
|
return res.status(400).json({ message: 'Id query parameter is required' });
|
||||||
|
}
|
||||||
|
const result = savedWorkouts.find(w => w.id === id);
|
||||||
|
if (result) {
|
||||||
|
res.json(result);
|
||||||
|
} else {
|
||||||
|
res.status(404).json({ message: 'Workout not found' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/trainings', (req, res) => {
|
||||||
|
res.json(trainings);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get('/days', (req, res) => {
|
||||||
|
res.json(days);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = router;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"description": "1000 часто используемых",
|
||||||
|
"imageFilename": "kart1.jpg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"description": "10 слов в Data Science",
|
||||||
|
"imageFilename": "kart1.jpg"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"words": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"word": "Tech",
|
||||||
|
"definition": "short for technical, relating to the knowledge, machines, or methods used in science and industry. Tech is a whole industry, which includes IT",
|
||||||
|
"examples": [
|
||||||
|
"“As a DevOps engineer I have been working in Tech since 2020.”"
|
||||||
|
],
|
||||||
|
"synonyms": ["IT"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"word": "career path",
|
||||||
|
"definition": "the series of jobs or roles that constitute a person's career, especially one in a particular field",
|
||||||
|
"examples": [
|
||||||
|
"“Technology is an evolving field with a variety of available career paths.”"
|
||||||
|
],
|
||||||
|
"synonyms": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"words": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"word": "Machine Learning",
|
||||||
|
"translation": "Машинное обучение",
|
||||||
|
"definition": "An approach to artificial intelligence where computers learn from data without being explicitly programmed.",
|
||||||
|
"synonyms": ["Trainable Algorithms", "Automated Learning"],
|
||||||
|
"examples": [
|
||||||
|
"We used machine learning techniques to forecast product demand.",
|
||||||
|
"The movie recommendation system is based on machine learning algorithms.",
|
||||||
|
"Machine learning helped improve the accuracy of speech recognition in our application."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"word": "Neural Network",
|
||||||
|
"translation": "Нейронная сеть",
|
||||||
|
"definition": "A mathematical model inspired by the structure and function of biological neural networks, consisting of interconnected nodes organized in layers that can process information.",
|
||||||
|
"synonyms": ["Artificial Neural Network", "Deep Neural Network"],
|
||||||
|
"examples": [
|
||||||
|
"To process large amounts of data, we created a deep learning neural network.",
|
||||||
|
"This neural network is capable of generating realistic images.",
|
||||||
|
"Using neural networks significantly improved the quality of text translation."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"word": "Algorithm",
|
||||||
|
"translation": "Алгоритм",
|
||||||
|
"definition": "A step-by-step procedure or set of instructions for solving a problem or performing a computation.",
|
||||||
|
"synonyms": ["Procedure", "Method"],
|
||||||
|
"examples": [
|
||||||
|
"The algorithm we developed quickly finds the optimal delivery route.",
|
||||||
|
"This algorithm sorts an array with a minimal number of operations.",
|
||||||
|
"Encryption algorithms ensure secure transmission of data over the internet."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"word": "Data Model",
|
||||||
|
"translation": "Модель данных",
|
||||||
|
"definition": "An abstract representation of the structure of data, describing how data is organized and related to each other.",
|
||||||
|
"synonyms": ["Data Structure", "Schema"],
|
||||||
|
"examples": [
|
||||||
|
"Our data model allows us to efficiently manage relationships between customers and orders.",
|
||||||
|
"The data model was designed considering scalability and performance requirements.",
|
||||||
|
"This data model is used for storing information about social network users."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"word": "Regression",
|
||||||
|
"translation": "Регрессия",
|
||||||
|
"definition": "A statistical method used to determine the relationship between one variable and others.",
|
||||||
|
"synonyms": ["Linear Regression", "Nonlinear Regression"],
|
||||||
|
"examples": [
|
||||||
|
"We applied linear regression to analyze the impact of advertising campaigns on sales.",
|
||||||
|
"Results from the regression analysis showed a strong correlation between customer age and purchase frequency.",
|
||||||
|
"Regression helped us assess how changes in environmental conditions affect crop yield."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"word": "Clustering",
|
||||||
|
"translation": "Кластеризация",
|
||||||
|
"definition": "The process of grouping similar objects into clusters so that objects within the same cluster are more similar to each other than to those in other clusters.",
|
||||||
|
"synonyms": ["Grouping", "Segmentation"],
|
||||||
|
"examples": [
|
||||||
|
"Clustering allowed us to divide customers into several groups according to their purchasing behavior.",
|
||||||
|
"Clustering methods are used to automatically group news by topic.",
|
||||||
|
"As a result of clustering, several market segments were identified, each with its own characteristics."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"word": "Supervised Learning",
|
||||||
|
"translation": "Обучение с учителем",
|
||||||
|
"definition": "A type of machine learning where the algorithm learns from labeled data, meaning data for which correct answers are known.",
|
||||||
|
"synonyms": ["Controlled Learning", "Labeled Classification"],
|
||||||
|
"examples": [
|
||||||
|
"Supervised learning is used to classify emails as spam or not-spam.",
|
||||||
|
"This approach was used to create a model that predicts real estate prices based on multiple parameters.",
|
||||||
|
"Supervised learning helps diagnose diseases at early stages through medical data analysis."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"word": "Data Labeling",
|
||||||
|
"translation": "Разметка данных",
|
||||||
|
"definition": "The process of assigning labels or classes to data so it can be used in supervised learning.",
|
||||||
|
"synonyms": ["Data Annotation", "Tagging"],
|
||||||
|
"examples": [
|
||||||
|
"Before starting model training, we labeled the data by assigning each photo an animal category.",
|
||||||
|
"Data labeling includes marking user reviews as positive or negative.",
|
||||||
|
"Text documents were labeled with special tags for subsequent analysis."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"word": "Hyperparameters",
|
||||||
|
"translation": "Гиперпараметры",
|
||||||
|
"definition": "Parameters that define the structure and behavior of a machine learning model, set before the learning process begins.",
|
||||||
|
"synonyms": ["Model Settings", "Configuration Parameters"],
|
||||||
|
"examples": [
|
||||||
|
"Optimizing hyperparameters enabled us to enhance the performance of our machine learning model.",
|
||||||
|
"Hyperparameters include settings such as the number of layers in a neural network and the learning rate.",
|
||||||
|
"Choosing the right hyperparameters is crucial for achieving high model accuracy."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"word": "Model Validation",
|
||||||
|
"translation": "Валидация модели",
|
||||||
|
"definition": "The process of evaluating the quality of a model by testing it on new, previously unseen data.",
|
||||||
|
"synonyms": ["Model Testing", "Model Verification"],
|
||||||
|
"examples": [
|
||||||
|
"After completing the training, we validated the model using a test dataset.",
|
||||||
|
"During model validation, its ability to make accurate predictions on new data is checked.",
|
||||||
|
"Validation showed that the model is robust against changes in data and has low generalization error."
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
21
server/routers/kfu-m-24-1/eng-it-lean/dictionaries/index.js
Normal file
21
server/routers/kfu-m-24-1/eng-it-lean/dictionaries/index.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
const router = require("express").Router();
|
||||||
|
|
||||||
|
module.exports = router;
|
||||||
|
|
||||||
|
const data = require("./data/dictionaries.json");
|
||||||
|
const wordsData = require("./data/dictionaryWords.json");
|
||||||
|
|
||||||
|
router.get("/", (req, res) => {
|
||||||
|
res.send(data);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get("/:id", (req, res) => {
|
||||||
|
const id = parseInt(req.params.id);
|
||||||
|
const words = wordsData.find((word) => word.id === id);
|
||||||
|
|
||||||
|
if (!words) {
|
||||||
|
return res.status(404).send("Not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
res.send(words);
|
||||||
|
});
|
||||||
13
server/routers/kfu-m-24-1/eng-it-lean/index.js
Normal file
13
server/routers/kfu-m-24-1/eng-it-lean/index.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
const router = require("express").Router();
|
||||||
|
|
||||||
|
const dictionariesRouter = require("./dictionaries");
|
||||||
|
module.exports = router;
|
||||||
|
|
||||||
|
const delay =
|
||||||
|
(ms = 1000) =>
|
||||||
|
(req, res, next) => {
|
||||||
|
setTimeout(next, ms);
|
||||||
|
};
|
||||||
|
|
||||||
|
router.use(delay());
|
||||||
|
router.use("/dictionaries", dictionariesRouter);
|
||||||
7
server/routers/kfu-m-24-1/index.js
Normal file
7
server/routers/kfu-m-24-1/index.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
const { Router } = require('express')
|
||||||
|
const router = Router()
|
||||||
|
|
||||||
|
router.use('/eng-it-lean', require('./eng-it-lean/index'))
|
||||||
|
|
||||||
|
module.exports = router
|
||||||
|
|
||||||
Reference in New Issue
Block a user