sudo apt-get install software-properties-common
π¨βπ»
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 json | |
import os | |
from pathlib import Path | |
def generate_sources_from_map(source_map_path): | |
# Read the source map file | |
with open(source_map_path, 'r') as f: | |
source_map = json.load(f) | |
# Get the current working directory |
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
function lower_case() { | |
echo $1 | tr '[:upper:]' '[:lower:]' | |
} | |
function upper_case() { | |
echo $1 | tr '[:lower:]' '[:upper:]' | |
} | |
function encrypt_text() { | |
if [ -z "$2" ]; then |
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
function lower() { | |
echo "$1" | tr '[:upper:]' '[:lower:]' | |
} | |
function activate(){ | |
source env/bin/activate | |
} | |
function mkvir() { | |
python3 -m venv env |
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 os | |
import json | |
import argparse | |
import httpx | |
def rebuild_from_sourcemap(source_map_file, destination_dir): | |
with open(source_map_file, "r") as f: | |
source_map = json.load(f) |
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 django.db import models | |
from django.contrib.auth.models import AbstractUser | |
class User(AbstractUser): | |
telegram_id = models.CharField(max_length=255, unique=True) | |
username = models.CharField(max_length=255) | |
first_name = models.CharField(max_length=255) | |
last_name = models.CharField(max_length=255) | |
phone_number = models.CharField(max_length=255) | |
created_at = models.DateTimeField(auto_now_add=True) |
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 asyncio | |
import threading | |
import redis | |
redis_url = 'localhost' | |
username = 'default' | |
redis = r = redis.Redis( | |
host=redis_url, | |
port=6379, |
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
service: Todo | |
frameworkVersion: '3' | |
custom: | |
tableName: 'todo-table-${self:provider.stage}' | |
provider: | |
name: aws | |
runtime: python3.8 |
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
''' | |
this method goes to below the update_todo function | |
''' | |
def delete_todo(event, context): | |
''' | |
Delete Todo Application in Dynamo DB | |
Params: | |
event: API Gateway Event |
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
''' | |
this method goes to below the list_todo function | |
''' | |
def update(event, context): | |
''' | |
Update Todo Application in Dynamo DB | |
Params: | |
event: API Gateway Event |
NewerOlder