Skip to content

Instantly share code, notes, and snippets.

View Ruslan-Skira's full-sized avatar

Ruslan Skira Ruslan-Skira

View GitHub Profile
@Ruslan-Skira
Ruslan-Skira / pyenv-instalation-all-plaforms.md
Created October 26, 2023 16:42
pyenv installation Mac | Ubuntu | Windows

installation pyenv on Mac 1. 2. 3.

@Ruslan-Skira
Ruslan-Skira / pyenv-instalation-main-platforms.md
Last active October 26, 2023 15:44
pyenv installation Ubuntu | Mac | Windows

first line second line

s3_client.upload_fileobj(file_obj.file._file, bucket, f'{object_name}')
@Ruslan-Skira
Ruslan-Skira / senior_requires_skills
Created January 22, 2023 10:28
interview questions and what should know senior python dev
1. Docker
2. Kubernetis
3. Base of DS
4. Sockets and network understanding.(https://www.amazon.com/Learn-PYTHON-Multiplayer-Adventure-Games/dp/B01ETTRZ3M)
5. Async python
6. Create custom descriptor. @property.
@Ruslan-Skira
Ruslan-Skira / interview_tasks.py
Created January 20, 2023 13:55
Logic tasks from job interview
# parameterize decorator
def args_info():pass
@args_info(all_values=False)
def power(n:int, pwr: int) -> int:
"""Put in the power"""
return n**pwr
# >>> power(2, 4)
@Ruslan-Skira
Ruslan-Skira / widows_python_env_installation.txt
Last active January 17, 2023 13:24
Windows Python environment installation.
python installation custom.
a. create custom short path
b. update PATH
After Pycharm installation
a. by admin run WindowsPowerShell
PS C:\WINDOWS\system32> Get-ExecutionPolicy
Restricted
PS C:\WINDOWS\system32> Set-ExecutionPolicy remotesigned
RemoteSigned
b.delete venv folder during creating new project. Because new venv will not created.
@Ruslan-Skira
Ruslan-Skira / serializers_mapping_keys_data.py
Last active February 16, 2024 10:38
If data has not the same keys and they are with dots in names i customized the to_internal_value function
"""serializers"""
import logging
from collections import Mapping, OrderedDict
from typing import Dict
from django.core.exceptions import ValidationError as DjangoValidationError
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from rest_framework.fields import get_error_detail, set_value, SkipField
from rest_framework.settings import api_settings
@Ruslan-Skira
Ruslan-Skira / orm_requests_loggs_django_settings.py
Last active October 6, 2020 13:14
orm_requests_loggs_django_settings
import logging.config
LOGGING_CONFIG = None
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'file_format',