Skip to content

Instantly share code, notes, and snippets.

@trainingcity
trainingcity / price_increase.py
Last active April 7, 2023 19:08 — forked from Miron-Anosov/price_increase.py
Дан список цен на пять товаров с точностью до копейки. Так как экономика даёт о себе знать, мы спрогнозировали, что через год придётся повышать цены на X процентов, а ещё через один год — ещё на Y процентов.Напишите программу, которая получает на вход список цен на товары (вещественные числа, список генерируется также с помощью list comprehensio…
def level_up_price(new_price, product_old):
return product_old * (1 + new_price / 100)
quantity_product = int(input('Кол-во товаров: '))
list_product = []
for i_product in range(1, quantity_product + 1):
product = float(input('Цена на продукт: '))
list_product.append(product)
@trainingcity
trainingcity / Install update WordPress puglins directly.md
Created January 5, 2023 16:37 — forked from dianjuar/Install update WordPress puglins directly.md
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@trainingcity
trainingcity / backupToS3.sh
Created November 15, 2019 00:13 — forked from autoize/backupToS3.sh
NextCloud Backup to Amazon S3
#!/bin/sh
# NextCloud to Amazon S3 Backup Script
# Author: Autoize (autoize.com)
# This script creates an incremental backup of your NextCloud instance to Amazon S3.
# Amazon S3 is a highly redundant block storage service with versioning and lifecycle management features.
# Requirements
# - Amazon AWS Account and IAM User with AmazonS3FullAccess privilege