Або ви можете надати посилання на Google Таблицю з можливістю редагування, а також, якщо ви працюєте через Google Sheets API — доступ до нього.
Help with a script for Google Sheets
There is a database of people (Google spreadsheet) where user data is recorded. It is necessary to weekly split users into pairs so that each person has their own pair, ensuring that pairs do not repeat and that the previous pair is not re-selected (there is a separate column with previous pairs).
Matching is initially based on geolocation criteria (those with the same), then all others are matched based on the number of shared tags. - this is already implemented - need to verify if everything is correct (it works, but we haven't run it many times, maybe it will be easier for you to rewrite it from scratch)
Need to add - matching of those with no shared tags - so that they are randomly paired with each other
Work results
Client's review of cooperation with Artem K.
Help with a script for Google SheetsArtem handled the task in Apps Script well, everything is functioning as it should, he eagerly answered questions and communicated! We hope for continued cooperation in the future! We recommend the performer!
Freelancer's review of cooperation with Katerina Tymofeienko
Help with a script for Google SheetsThank you to Kateryna for the cooperation, a polite and attentive to details client, the project is interesting. I recommend.
-
Доброго. А вам потрібно все це в таблиці загнати?
-
Доброго дня, так, можете надати csv або xls файли для роботи. А я потім експортую їх назад
-
Давайте краще в тг спишемось ? Бо тут можу через роботу не бачити відповідь. @Mr_Ambal
-
Спросить ChatGPT
-
🎯 Система матчинга пользователей - Техническое описание
💻 Технологический стек:
Основной язык: JavaScript (ES6+)
Платформа: Google Apps Script
База данных: Google Sheets
Среда выполнения: Google Cloud Platform🏗️ Архитектура решения:
Серверная часть:
- Google Apps Script - облачная JavaScript среда
- Класс UserMatcher - основная логика алгоритма
- Event-driven архитектура - функции вызываются по событиям
Хранение данных:
- Google Sheets как NoSQL база данных
- Структурированные колонки с типизированными данными
- Автоматическое обновление истории и результатов
Пользовательский интерфейс:
- Кастомное меню в Google Sheets
- Модальные окна для отображения результатов
- Автоматические уведомления о статусе операций
🔧 Ключевые технические решения:
1. Объектно-ориентированное программирование:
class UserMatcher {
constructor(users) {
this.users = users;
this.pairs = [];
this.unpaired = [];
}
}
-
2. Функциональное программирование:
- Методы высшего порядка (filter, map, sort)
- Чистые функции без побочных эффектов
- Иммутабельность данных
3. Алгоритмические решения:
- Жадный алгоритм для геолокации
- Алгоритм максимального веса для общих тегов
- Алгоритм Фишера-Йетса для рандомизации
📊 Структура данных:
Входные данные (Google Sheets):
{
id: Number, // Уникальный идентификатор
name: String, // Имя пользователя
location: String, // Геолокация
tags: Array<String>, // Массив интересов
pastPairs: Array<Number> // История пар
} Выходные данные:
{
pairs: Array<[User, User]>, // Массив пар
unpaired: Array<User> // Непарные пользователи
}
🎲 Алгоритм матчинга:
Сложность: O(n²) для этапа тегов, O(n log n) общая
Память: O(n) дополнительной памятиЭтапы алгоритма:
- Группировка по геолокации - O(n)
- Сортировка по потенциальным парам - O(n log n)
- Матчинг по общим тегам - O(n²)
- Случайное распределение - O(n)
⚙️ Google Apps Script интеграция:
Триггеры и события:
javascript
function onOpen() { // Создание пользовательского меню SpreadsheetApp.getUi().createMenu() }Работа с Google Sheets API:
javascript
const sheet = SpreadsheetApp.getActiveSheet(); const data = sheet.getRange().getValues(); sheet.getRange().setValues(results);Обработка ошибок:
javascript
try { // Основная логика } catch (error) { Logger.log('Ошибка: ' + error.toString()); SpreadsheetApp.getUi().alert('Ошибка', error.message); }🚀 Особенности реализации:
Оптимизации:
- Кэширование результатов в памяти
- Минимизация обращений к Google Sheets API
- Пакетная обработка данных
Масштабируемость:
- Поддержка до 1000+ пользователей
- Линейное время выполнения
- Эффективное использование памяти
Надежность:
- Валидация входных данных
- Обработка edge cases (нечетное количество)
- Логирование всех операций
📈 Метрики производительности:
- Время выполнения: ~2-5 секунд для 100 пользователей
- Память: ~1MB для обработки данных
- API вызовы: Минимизированы через batch operations
🔄 CI/CD и деплой:
Среда разработки: Google Apps Script Editor
Версионирование: Git + Google Apps Script встроенный контроль
Деплой: Автоматический через Google Cloud Platform
Мониторинг: Google Apps Script Dashboard + Custom логирование https://docs.google.com/spreadsheets/d/1wFdR9t0BKfSGj418PrFMu8SmSc1GD5oiYMxYByKTHLA/edit?usp=sharing -
Я предлагаю тщится в Привате. У меня есть предложение как это все реализовать. Но это лучше обсуждать не тут.
-
Current freelance projects in the category Databases & SQL
Power BI
16 USD
The dashboard runs on a Google server, we need to transfer all logic + code Required skills: deployment of ETL processes on a Linux server + working with BigQuery and Postgre There is working code that runs on Google, where the database itself is, we need to transfer it to… Python, Databases & SQL ∙ 2 days 12 hours back ∙ 15 proposals |
Need a 1C specialist for refinements and development.I am looking for a 1C specialist for freelance collaboration. I am currently working with a contractor who provides support and maintenance for the 1C system. However, due to the contractor's workload, there is a need for prompt execution of additional tasks, improvements, and… Databases & SQL ∙ 4 days 12 hours back ∙ 11 proposals |
Restoring Instagram after a banOn March 3, 2026, my Instagram was blocked due to a violation of rules. I believe there has been some mistake, as the page was personal with photos and videos of my personal trips. I did not post any comments anywhere. I have sent several appeals. I cannot download my files… Databases & SQL, Web Programming ∙ 4 days 23 hours back ∙ 5 proposals |
Eliminate the issue of incomplete data import from Excel files of Nova Poshta specifications into 1C:
45 USD
Goal: There is a processing in 1C for uploading the specifications of Nova Poshta. For unclear reasons, it has stopped loading some tabular data. We need to find the reason and eliminate the problem of incomplete data import from Excel files of Nova Poshta specifications into… System & Network Administration, Databases & SQL ∙ 8 days 6 hours back ∙ 16 proposals |
Accounting, planning, and sales system for a mushroom farm
601 USD
Here is the complete, final text of the Technical Assignment (TA). It combines all your requirements: 16 chambers, 20 contractors, a schedule by days, accounting for containers, profitability calculation, and a mandatory division into three grades of mushrooms. You can fully… Databases & SQL, Client Management & CRM ∙ 10 days 10 hours back ∙ 61 proposals |