Skip to content

Instantly share code, notes, and snippets.

PowerShell 7.5.1
PS C:\Users\se> yc container image list --repository-name=crp3snsn5haht7jqbdku/my_image
+----------------------+---------------------+-------------------------------+------+-----------------+
| ID | CREATED | NAME | TAGS | COMPRESSED SIZE |
+----------------------+---------------------+-------------------------------+------+-----------------+
| crpk7rmvmjj6bhfdu3je | 2025-05-21 08:13:38 | crp3snsn5haht7jqbdku/my_image | v2 | 45.4 MB |
| crpm5evpccb3iusf9is8 | 2025-05-21 07:12:47 | crp3snsn5haht7jqbdku/my_image | v1 | 45.4 MB |
+----------------------+---------------------+-------------------------------+------+-----------------+
There is a new yc version '0.149.0' available. Current version: '0.148.0'.
PowerShell 7.5.1
PS C:\Users\se> cd C:\Users\se\sprint9-my-service\sprint-9-sample-service
PS C:\Users\se\sprint9-my-service\sprint-9-sample-service> docker compose up -d --build
time="2025-05-25T12:52:10+03:00" level=warning msg="C:\\Users\\se\\sprint9-my-service\\sprint-9-sample-service\\docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Compose can now delegate builds to bake for better performance.
To do so, set COMPOSE_BAKE=true.
[+] Building 30.0s (15/15) FINISHED docker:desktop-linux
=> [stg-service internal] load build definition from dockerfile 0.1s
=> => transferring dockerfile: 1.32kB 0.0s
=> [stg-service internal] load metadata for docker.io/library/python:3.10 1.8s
PowerShell 7.5.1
PS C:\Users\se> cd C:\Users\se\sprint9-my-service\sprint-9-sample-service
PS C:\Users\se\sprint9-my-service\sprint-9-sample-service> docker compose up -d --build
time="2025-05-25T12:52:10+03:00" level=warning msg="C:\\Users\\se\\sprint9-my-service\\sprint-9-sample-service\\docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Compose can now delegate builds to bake for better performance.
To do so, set COMPOSE_BAKE=true.
[+] Building 30.0s (15/15) FINISHED docker:desktop-linux
=> [stg-service internal] load build definition from dockerfile 0.1s
=> => transferring dockerfile: 1.32kB 0.0s
=> [stg-service internal] load metadata for docker.io/library/python:3.10 1.8s
PS C:\Users\se\sprint-9-sample-service> docker compose up -d --build
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"REDIS_PORT\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"REDIS_PASSWORD\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"KAFKA_HOST\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"KAFKA_PORT\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"KAFKA_CONSUMER_USERNAME\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"KAFKA_SOURCE_TOPIC\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning msg="The \"KAFKA_STG_SERVICE_ORDERS_TOPIC\" variable is not set. Defaulting to a blank string."
time="2025-05-22T11:15:50+03:00" level=warning ms
(s9env) se@LAPTOP-O74T8U2K:/mnt/c/Users/se/s9-lessons$ python3 redis_connect_931.py
b'{"_id": "a51e4e31ae4602047ec52534", "name": "\xd0\x9a\xd1\x83\xd0\xb1\xd0\xb4\xd0\xb0\xd1\x80\xd0\xb8", "menu": [{"_id": "3de9442da57a50ccfaf72866", "name": "\xd0\x9f\xd1\x85\xd0\xb0\xd0\xbb\xd0\xb8 \xd1\x81 \xd1\x84\xd0\xb0\xd1\x81\xd0\xbe\xd0\xbb\xd1\x8c\xd1\x8e", "price": 200, "category": "\xd0\x97\xd0\xb0\xd0\xba\xd1\x83\xd1\x81\xd0\xba\xd0\xb8"}, {"_id": "c1b046c8b2184d586ea74928", "name": "\xd0\x90\xd1\x81\xd1\x81\xd0\xbe\xd1\x80\xd1\x82\xd0\xb8 \xd0\xbf\xd1\x85\xd0\xb0\xd0\xbb\xd0\xb8", "price": 290, "category": "\xd0\x97\xd0\xb0\xd0\xba\xd1\x83\xd1\x81\xd0\xba\xd0\xb8"}, {"_id": "d9e3403e806ad914f08ab416", "name": "\xd0\x94\xd0\xbe\xd0\xbb\xd0\xbc\xd0\xb0", "price": 400, "category": "\xd0\x97\xd0\xb0\xd0\xba\xd1\x83\xd1\x81\xd0\xba\xd0\xb8"}, {"_id": "6f8c430e9883b87eb3849dc0", "name": "\xd0\x91\xd0\xb0\xd0\xb4\xd1\x80\xd0\xb8\xd0\xb4\xd0\xb6\xd0\xb0\xd0\xbd\xd0\xb8 \xd1\x81 \xd0\xbe\xd1\x80\xd0\xb5\xd1\x85\xd0\xb0\x
se@LAPTOP-O74T8U2K:~$ apt install python3-313
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
se@LAPTOP-O74T8U2K:~$ sudo apt update && sudo apt install --yes python3 python3-pip && \
pip3 install redis
[sudo] password for se:
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Hit:4 https://ppa.launchpadcontent.net/redislabs/redis/ubuntu noble InRelease
C:\Users\se\s9-lessons>python3 redis_connection.py
Traceback (most recent call last):
File "redis_connection.py", line 1, in <module>
import redis
ModuleNotFoundError: No module named 'redis'
C:\Users\se\s9-lessons>python redis_connection.py
Traceback (most recent call last):
File "C:\Anaconda3\Lib\site-packages\redis\connection.py", line 385, in connect_check_health
sock = self.retry.call_with_retry(
(base) C:\Users\se>cd C:\Users\se\s9-lessons
(base) C:\Users\se\s9-lessons>python3 redis_connection.py
"python3" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
(base) C:\Users\se\s9-lessons>python redis_connection.py
Traceback (most recent call last):
File "C:\Anaconda3\Lib\site-packages\redis\connection.py", line 385, in connect_check_health
sock = self.retry.call_with_retry(
yc-user@fhmhcigj8sc3c4q492hv:~/s8-lessons$ /usr/bin/python3 "/home/yc-user/s8-lessons/Тема 3. Настройка потока данных/7. Подключение к Postres и изучение данных/Задание 1/realization.py"
Traceback (most recent call last):
File "/home/yc-user/s8-lessons/Тема 3. Настройка потока данных/7. Подключение к Postres и изучение данных/Задание 1/realization.py", line 1, in <module>
from pyspark.sql import SparkSession
ModuleNotFoundError: No module named 'pyspark'
yc-user@fhmhcigj8sc3c4q492hv:~/s8-lessons$ sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
Двигайтесь дальше! Ваш код: migmmJMYc5
yc-user@fhm83bvqdfduh346ljg4:~/s8-lessons$ /usr/bin/python3 "/home/yc-user/s8-lessons/Тема 3. Настройка потока данных/7. Подключение к Postres и изучение данных/Задание 1/submit.py"
HOST: 158.160.60.53
Ivy Default Cache set to: /root/.ivy2/cache
The jars for the packages stored in: /root/.ivy2/jars
org.postgresql#postgresql added as a dependency
:: resolving dependencies :: org.apache.spark#spark-submit-parent-c86b5ada-7687-4c2a-8238-c26cf5dc25a3;1.0
confs: [default]