- Оскароносные фильмы становятся короче, дешевле и при этом у них понижается пользовательский рейтинг и сборы. Вкусы киноакадемии всё больше двигаются в сторону искусства и всё дальше уходят от кино как бизнеса.
- Мелодрама — самый дорогой и прибыльный жанр. Это связано с его популярностью и высокими гонорарами актёров. Также большой вклад внёс фильм «Титаник» с большим бюджетом и сборами.
- Криминальные фильмы и триллеры самые короткие и приносят кинокомпаниям меньше всего денег. Вероятно, причина этого – высокое напряжение, которое тяжело долго выдерживать и не всем по нраву.
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 pandas as pd | |
data = pd.read_csv("/datasets/visits.csv", sep="\t") | |
data['local_time'] = ( | |
pd.to_datetime(data['date_time'], format='%Y-%m-%dT%H:%M:%S') | |
+ pd.Timedelta(hours=3) | |
) | |
data['date_hour'] = data['local_time'].dt.round('1H') | |
data['too_fast'] = data['time_spent'] < 60 | |
data['too_slow'] = data['time_spent'] > 1000 |
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 pandas as pd | |
stock = pd.read_csv('/datasets/stock_upd.csv') | |
stock['item_lowercase'] = stock['item'].str.lower() | |
apple = stock[stock['item_lowercase'].str.contains('apple')]['count'].sum() | |
samsung = stock[stock['item_lowercase'].str.contains('samsung')]['count'].sum() | |
stock['item_lowercase'] = stock['item_lowercase'].drop_duplicates() | |
stock = stock.dropna().reset_index(drop=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
# ... | |
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload;"; | |
add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; script-src 'self'; img-src 'self'; style-src 'self'; base-uri 'self'; form-action 'self';"; | |
add_header Referrer-Policy "no-referrer, strict-origin-when-cross-origin"; | |
add_header X-Frame-Options SAMEORIGIN; | |
add_header X-Content-Type-Options nosniff; | |
add_header X-XSS-Protection "1; mode=block"; |
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
# ... | |
ssl_certificate /etc/letsencrypt/live/mysite-0001/fullchain.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/mysite/chain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/mysite-0001/privkey.pem; | |
include /etc/letsencrypt/options-ssl-nginx.conf; | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | |
# ... |
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
repos: | |
- repo: https://github.com/ambv/black | |
rev: stable | |
hooks: | |
- id: black | |
language_version: python3.7 | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v1.2.3 | |
hooks: | |
- id: flake8 |
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
[flake8] | |
ignore = E203, E266, E501, W503, F403, F401 | |
max-line-length = 88 | |
max-complexity = 18 | |
select = B,C,E,F,W,T4,B9 |
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 logging | |
from http import HTTPStatus | |
import requests | |
from mnemonic import Mnemonic | |
class BcoinClient: | |
""" | |
Simple wrapper around Bcoin REST API. |
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
def fib(n): | |
if n <= 2: | |
return 1 | |
else: | |
return fib(n-1) + fib(n-2) |