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
    
  
  
    
  | # Проблема: Нужно создавать Telegram папки с каналами, но один аккаунт быстро упирается в rate limit. | |
| # V1. Быстрое решение: | |
| async def create_folder_with_rotation( | |
| self, | |
| folder_name: str, | |
| channel_names: list[str], | |
| ) -> tuple[Optional[TelegramAccount], Optional[str]]: | |
| max_retries = 3 | |
| for attempt in range(max_retries): | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| VERSION="0.1.0" | |
| MASSA_CLIENT_DIR="" | |
| while getopts d: flag | |
| do | |
| case "${flag}" in | |
| d) MASSA_CLIENT_DIR=${OPTARG};; | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| VERSION="1.3.1" | |
| echo "Starting..\n" | |
| mkdir -p /opt/node_exporter && cd /opt/node_exporter | |
| echo "Downloading..\n" | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| VERSION="7.17.0" | |
| source_name="" | |
| target_host="" | |
| while getopts u:h: flag | |
| do | |
| case "${flag}" in | 
  
    
      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
    
  
  
    
  | stop all containers: | |
| docker stop $(docker ps -a -q) | |
| docker kill $(docker ps -q) | |
| remove all containers | |
| docker rm $(docker ps -a -q) | |
| remove all docker images | |
| docker rmi $(docker images -q) | 
  
    
      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
    
  
  
    
  | version: '2' | |
| services: | |
| app: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| ports: | |
| - '8080:8080' | |
| volumes: | |
| - ./src:/opt/src | 
  
    
      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 python:3.6 | |
| WORKDIR /opt/src | |
| COPY requirements.txt requirements.txt | |
| RUN pip install -r requirements.txt | |
| CMD ["python", "app.py"] | 
  
    
      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
    
  
  
    
  | package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "encoding/json" | |
| ) | |
| type Company struct { | 
  
    
      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 datetime import datetime | |
| from functools import partial | |
| from os.path import join | |
| from uuid import uuid4 | |
| from django.utils.deconstruct import deconstructible | |
| def _update_filename(instance, filename, path): | |
| ext = filename.split('.')[-1] | 
  
    
      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 backend.models import Background | |
| from users.models import Contact | |
| class MetaData(object): | |
| def __init__(self, model): | |
| self.model = model | |
| def __enter__(self): | |
| try: | |
| self.data = self.model.objects.first() | 
NewerOlder