считается ли админка на wordpress частью back end
Какой-то конкретной цели, объясняющей для чего мне это надо, пока что нет.
import requests
url = "https://www.work.ua/_data/_ajax/by-category-block.php"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0",
"Accept": "*/*","Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Requested-With": "XMLHttpRequest"
}
data = "region_id=0&search_type=jobs"
r = requests.post(url=url, headers=headers , data=data)
print(r.text)
{% if user.is_superuser %}
# Hello, admin.
{% endif %}
l = list(range(10**5))
for i in l: # 107 ms
print(i, end=' ')
s = ' '.join(map(str, l))
print(s) # 55 ms
for i in range(n):
left = 1
right = l
...
elif x[m[mid]] == x[i]:
left += 1
...
for i in range(n):
left = 1
right = l
while left <= right:
mid = (left+right) // 2
if x[m[mid]] <= x[i]:
left = mid+1
else:
right = mid-1
...
python sorted
- https://tproger.ru/translations/python-sorting/from itertools import tee
from collections import Counter
def f(s):
a, b = tee(s)
next(b)
return Counter(l1 + l2 for l1, l2 in zip(a, b))
>>> f("abracadabra").most_common()
[('ab', 2), ('br', 2), ('ra', 2), ('ac', 1), ('ca', 1), ('ad', 1), ('da', 1)]
from itertools import tee
from collections import Counter
def f(s, n=2):
tees = tee(s, n)
for offset, iterator in enumerate(tees):
for _ in range(offset):
next(iterator)
return Counter(''.join(letters) for letters in zip(*tees))
f("abracadabra", 5)
Counter({'abrac': 1,
'braca': 1,
'racad': 1,
'acada': 1,
'cadab': 1,
'adabr': 1,
'dabra': 1})