метался
Учился основательно
кучу пройденных видеокурсов - знания остались довольно поверхностные
ибо такими и только такими переполнены общедоступные источники
как понять, когда необходимый минимум знаний будет набран?
from autocorrect import Speller
spell = Speller('ru')
text = 'Проверкка текста на ашибки.'
print(spell(text))
Проверка текста на ошибки.
import language_tool_python
tool = language_tool_python.LanguageTool('ru-RU')
text = 'Проверкка текста на ашибки.'
matches = tool.check(text)
print(matches)
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage[
top=2cm,
bottom=2cm,
left=2.5cm,
right=1cm,
]{geometry}
\usepackage[russian,english]{babel}
\usepackage{setspace}
\setmainfont{Times New Roman}
\begin{document}
\hfill
\begin{minipage}[t]{14em}
\begin{spacing}{1.3}
Научный руководитель\\
\underline{\hspace{\linewidth}}\\[-0.8em]
\makebox[\linewidth][c]{\scriptsize{}\hfil(\textit{степень, звание})\hfil}\\
\makebox[0.3\linewidth][l]{\underline{\hspace{0.30\linewidth}}}\makebox[0.7\linewidth][r]{\underline{\hspace{0.67\linewidth}}}\\[-0.8em]
\makebox[0.3\linewidth][c]{\scriptsize(\textit{подпись})}\makebox[0.7\linewidth][c]{\scriptsize(\textit{ФИО})}\\
<<\underline{\hspace{1.5em}}>>\hspace{0.5em}\underline{\hspace{6em}}\hspace{0.5em}20\underline{\hspace{1.5em}}~г.\\
Студент группы \hrulefill\\
\makebox[0.3\linewidth][l]{\underline{\hspace{0.30\linewidth}}}\makebox[0.7\linewidth][r]{\underline{\hspace{0.67\linewidth}}}\\[-0.8em]
\makebox[0.3\linewidth][c]{\scriptsize(\textit{подпись})}\makebox[0.7\linewidth][c]{\scriptsize(\textit{ФИО})}\\
<<\underline{\hspace{1.5em}}>>\hspace{0.5em}\underline{\hspace{6em}}\hspace{0.5em}20\underline{\hspace{1.5em}}~г.\\
\end{spacing}
\end{minipage}
\end{document}
#!/usr/bin/env bash
chmod +x /path/to/run.sh
~/.bash_aliases
строку alias run='/path/to/run.sh'
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup
options = Options()
options.headless = False
options.binary_location = '/usr/bin/chromium'
driver = webdriver.Chrome(options=options)
URL = 'https://tracker.gg/valorant/profile/riot/mrsnowman%23siuu/overview'
driver.get(URL)
time.sleep(5)
html = driver.page_source
driver.quit()
soup = BeautifulSoup(html, 'lxml')
agent = soup.find('div', class_='value', set=True).text.strip()
print(agent)
import csv
import unicodedata
import requests
from anti_useragent import UserAgent
from bs4 import BeautifulSoup
ua = UserAgent()
headers = {'User-Agent': ua.chrome}
def get_html(url):
response = requests.get(url, headers=headers)
return response.text
def get_content(html):
soup = BeautifulSoup(html, 'lxml')
items = soup.find_all('a', class_='css-yo21t ewrty961')
cars = []
for item in items:
cars.append({
'Title': item.find('div', class_='css-17lk78h e3f4v4l2').text.strip(),
'Price': unicodedata.normalize("NFKD", item.find('div', class_='css-1dv8s3l eyvqki91').text.strip()),
'About': item.find('div', class_='css-1fe6w6s e162wx9x0').text.strip()
})
return cars
def content_to_csv(content):
columns = ['Title', 'Price', 'About']
result_file = 'autodrom.csv'
try:
with open(result_file, 'w', encoding='utf-8', newline='') as csv_file:
writer = csv.DictWriter(csv_file, fieldnames=columns, dialect='unix')
writer.writeheader()
for item in content:
writer.writerow(item)
except IOError as err:
print(f'Error writing the file {result_file}: {err}')
def main():
url = 'https://auto.drom.ru/audi/'
content_to_csv(get_content(get_html(url)))
if __name__ == '__main__':
main()
вот пример моего кода
Вот Json:
import json
DOC = """\
{
"name": "Bitcoin",
"tickers": [
{
"base": "BTC",
"bid_ask_spread_percentage": 0.010034,
"coin_id": "bitcoin",
"converted_last": {
"btc": 1.000832,
"eth": 14.633225,
"usd": 29784
},
"converted_volume": {
"btc": 48398,
"eth": 707624,
"usd": 1440259765
},
"is_anomaly": false,
"is_stale": false,
"last": 29668.22,
"last_fetch_at": "2022-05-15T10:13:49+00:00",
"last_traded_at": "2022-05-15T10:13:49+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "binance",
"name": "Binance"
},
"target": "USDT",
"target_coin_id": "tether",
"timestamp": "2022-05-15T10:13:49+00:00",
"token_info_url": null,
"trade_url": "https://www.binance.com/en/trade/BTC_USDT?ref=37754157",
"trust_score": "green",
"volume": 48357.32095661529
},
{
"base": "WBTC",
"bid_ask_spread_percentage": 0.010002,
"coin_id": "wrapped-bitcoin",
"converted_last": {
"btc": 1,
"eth": 14.603248,
"usd": 29671
},
"converted_volume": {
"btc": 137.98,
"eth": 2015,
"usd": 4093977
},
"is_anomaly": false,
"is_stale": false,
"last": 0.9997,
"last_fetch_at": "2022-05-15T10:23:54+00:00",
"last_traded_at": "2022-05-15T10:19:38+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "ftx_spot",
"name": "FTX"
},
"target": "BTC",
"target_coin_id": "bitcoin",
"timestamp": "2022-05-15T10:19:38+00:00",
"token_info_url": null,
"trade_url": "https://ftx.com/trade/WBTC/BTC",
"trust_score": "green",
"volume": 138.02190083024908
},
{
"base": "BTC",
"bid_ask_spread_percentage": 0.016816,
"coin_id": "bitcoin",
"converted_last": {
"btc": 1.000886,
"eth": 14.620339,
"usd": 29721
},
"converted_volume": {
"btc": 13166,
"eth": 192320,
"usd": 390963508
},
"is_anomaly": false,
"is_stale": false,
"last": 29652.24,
"last_fetch_at": "2022-05-15T10:22:07+00:00",
"last_traded_at": "2022-05-15T10:22:07+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "digifinex",
"name": "Digifinex"
},
"target": "USDT",
"target_coin_id": "tether",
"timestamp": "2022-05-15T10:22:07+00:00",
"token_info_url": null,
"trade_url": "https://www.digifinex.com/en-ww/trade/USDT/BTC",
"trust_score": "green",
"volume": 13154.30795151
},
{
"base": "ETH",
"bid_ask_spread_percentage": 0.011459,
"coin_id": "ethereum",
"converted_last": {
"btc": 1,
"eth": 14.603248,
"usd": 29671
},
"converted_volume": {
"btc": 3337,
"eth": 48727,
"usd": 99002386
},
"is_anomaly": false,
"is_stale": false,
"last": 0.068503,
"last_fetch_at": "2022-05-15T10:23:58+00:00",
"last_traded_at": "2022-05-15T10:23:58+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "whitebit",
"name": "WhiteBIT"
},
"target": "BTC",
"target_coin_id": "bitcoin",
"timestamp": "2022-05-15T10:23:58+00:00",
"token_info_url": null,
"trade_url": "https://whitebit.com/trade/ETH_BTC",
"trust_score": "green",
"volume": 48708.902
},
{
"base": "BTC",
"bid_ask_spread_percentage": 0.01338,
"coin_id": "bitcoin",
"converted_last": {
"btc": 0.99724658,
"eth": 14.563039,
"usd": 29589
},
"converted_volume": {
"btc": 2150,
"eth": 31403,
"usd": 63803915
},
"is_anomaly": false,
"is_stale": false,
"last": 29589,
"last_fetch_at": "2022-05-15T10:23:57+00:00",
"last_traded_at": "2022-05-15T10:23:57+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "ftx_us",
"name": "FTX.US"
},
"target": "USD",
"timestamp": "2022-05-15T10:23:57+00:00",
"token_info_url": null,
"trade_url": "https://ftx.us/trade/BTC/USD",
"trust_score": "green",
"volume": 2156.3390012132886
},
{
"base": "BTC",
"bid_ask_spread_percentage": 0.013498,
"coin_id": "bitcoin",
"converted_last": {
"btc": 0.99998279,
"eth": 14.602997,
"usd": 29670
},
"converted_volume": {
"btc": 192.67,
"eth": 2814,
"usd": 5716642
},
"is_anomaly": false,
"is_stale": false,
"last": 29634,
"last_fetch_at": "2022-05-15T10:23:58+00:00",
"last_traded_at": "2022-05-15T10:23:58+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "ftx_us",
"name": "FTX.US"
},
"target": "USDT",
"target_coin_id": "tether",
"timestamp": "2022-05-15T10:23:58+00:00",
"token_info_url": null,
"trade_url": "https://ftx.us/trade/BTC/USDT",
"trust_score": "green",
"volume": 192.672936569481
},
{
"base": "BTC",
"bid_ask_spread_percentage": 0.033738,
"coin_id": "bitcoin",
"converted_last": {
"btc": 0.99687626,
"eth": 14.579921,
"usd": 29634
},
"converted_volume": {
"btc": 3782,
"eth": 55319,
"usd": 112436637
},
"is_anomaly": false,
"is_stale": false,
"last": 29634.0638176,
"last_fetch_at": "2022-05-15T10:18:21+00:00",
"last_traded_at": "2022-05-15T10:18:21+00:00",
"market": {
"has_trading_incentive": false,
"identifier": "bitfinex",
"name": "Bitfinex"
},
"target": "USD",
"timestamp": "2022-05-15T10:18:21+00:00",
"token_info_url": null,
"trade_url": "https://www.bitfinex.com/t/BTCUSD",
"trust_score": "green",
"volume": 3794.16867832
}
]
}\
"""
data = json.loads(DOC)
market_name = []
for ticket in data['tickers']:
market_name.append(ticket['market']['name'])
LOAD DATA LOCAL INFILE...
import requests
from bs4 import BeautifulSoup
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"}
URL = "https://hamptonvolgograd.ru/nomera/"
response = requests.get(URL, headers = headers)
soup = BeautifulSoup(response.text, "lxml")
roomlist = soup.find("ul", id="roomsList").select("li > span > div")
for hostel in roomlist:
title = hostel.find("span", class_ = "h1").text.strip()
price = hostel.find("ul", class_ = "roomPrice").find("li").text.strip()
print(title)
print(price)
Как лучше это сделать?
apt install libboost-python-dev
- такой пакет на Debian, на бунте, полагаю, так же. {\centering В чащах юга жил бы цитрус?\par}
Почему у меня не получается учиться, даже когда я все делаю все в точности как в видеоуроках?
Почему у меня не получается учиться, даже когда я все делаю все в точности как в видеоуроках?
И самое главное. Есть ли способ от этого избавиться?