- Container: environment that runs an applications that is not dependent on the OS. Kind of like a lightweight VM. Containers are stateless; if you need to update the components inside, create another container instead.
- Image: template to create a container. Its components are defined by a
Dockerfile. - Volume: storage area detached from the container for maintaining state. There are 4 types:
- Volumes: managed by Docker itself, they're stored in a separate part of the host filesystem (on Linux by default this would be
var/lib/docker/volumes). Useful for production deployments. - Bind mounts: mount a specific directory or file from the host to the container, such as a project folder. Useful for development.
- Volumes: managed by Docker itself, they're stored in a separate part of the host filesystem (on Linux by default this would be
- Tmpfs mounts: mount a temporary file system in the container, which is stored in the host system's memory only, not on disk. Useful for sensitive information that should not be persisted between container restarts or for performance reaso
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
| #!/usr/bin/env python | |
| #-*- coding: UTF-8 -*- | |
| from reportlab.lib import colors | |
| from reportlab.platypus import Paragraph, SimpleDocTemplate, Table, TableStyle | |
| from reportlab.lib.styles import getSampleStyleSheet | |
| from reportlab.lib.pagesizes import A4 | |
| from reportlab.pdfbase import pdfmetrics | |
| from reportlab.pdfbase.ttfonts import TTFont |
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
| <?php | |
| // Регистрируем обработчик события | |
| \Bitrix\Main\EventManager::getInstance()->addEventHandler('main', 'onProlog', function () { | |
| // Проверим является ли страница детальной карточкой CRM через функционал роутинга компонентов | |
| $engine = new \CComponentEngine(); | |
| $page = $engine->guessComponentPath( | |
| '/crm/', | |
| ['detail' => '#entity_type#/details/#entity_id#/'], | |
| $variables |
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 duckdb | |
| from google.cloud import bigquery | |
| bqclient = bigquery.Client() | |
| table = bigquery.TableReference.from_string( | |
| "bigquery-public-data.utility_us.country_code_iso" | |
| ) | |
| rows = bqclient.list_rows(table) | |
| country_code_iso = rows.to_arrow(create_bqstorage_client=True) | |
| cursor = duckdb.connect() |