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
// Расширенная версия с отслеживанием переходов по страницам | |
let allOrderSums = []; | |
let tableOrders = []; | |
let isTracking = false; | |
function extractOrderSums() { | |
const orderSumElements = document.querySelectorAll('.order-price-block.order-product__price > .order-price-block__line > .order-price-block__value.order-price-block__value_big'); | |
const sums = Array.from(orderSumElements).map(element => { | |
const sumText = element.textContent.trim(); | |
const sumValue = parseInt(sumText.replace(/\s/g, '').replace('₽', '')); |
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
const card = "div.Panel.Focusable"; | |
const achievement_ru = "ДОСТИЖЕНИЯ"; | |
const perfect = '[title="Получены все достижения"]'; | |
const cards = Array.from(document.querySelectorAll(card)) | |
.filter(item => !item.querySelector(perfect)) | |
.filter(item => Array.from(item.querySelectorAll('a')) | |
.some(a => a.innerText == achievement_ru)) | |
.map(item => item.querySelector('a.Focusable').href) | |
.map(href => href.match(/(\d+)$/)[0]); |
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
const FilterByModel = (size, types, names, suffix = null) => { | |
return (model_name) => { | |
const slices = model_name.split('-'); | |
const avaible_name = () => { | |
if (names.length === 0) | |
return true; | |
const _name = slices[0]; | |
return names.find((element) => element.length > 0 && _name.includes(element)); | |
}; |
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
template <class Iterator, class SignedType> | |
decltype(auto) nearest_binary_search(Iterator begin, Iterator end, SignedType target) | |
{ | |
auto nearest = begin; | |
auto distance = std::numeric_limits<SignedType>::max(); | |
while (true) | |
{ | |
const auto half = begin + (end - begin) / 2; | |
const auto step = *half; |
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
const block_friendlists = document.querySelectorAll('.selectable'); | |
const current_friendlist = Array.from(block_friendlists).map(item => item.getAttribute('data-steamid')); | |
const previous_friendlist = [ | |
// array of steam64's strings | |
]; | |
const difference = previous_friendlist.filter(function(x) { | |
return current_friendlist.indexOf(x) < 0; | |
}); |
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
git fetch --prune | |
git branch --merged | Where-Object {$_ -notmatch "master|main|\*"} | ForEach-Object {git branch -d $_.trim()} |
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
const tag_containter = document.querySelector('#tag-container'); | |
const tag_elements = Array.from(tag_containter.querySelectorAll('span.name')); | |
const tag_names = tag_elements.map((element) => { return element.innerText; }); | |
console.log(tag_names); |
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 tensorflow.keras.layers import Input, LSTM, Dense | |
from tensorflow.keras.models import Model | |
# Define the encoder | |
encoder_inputs = Input(shape=(None, num_encoder_tokens)) | |
encoder = LSTM(latent_dim, return_state=True) | |
encoder_outputs, state_h, state_c = encoder(encoder_inputs) | |
encoder_states = [state_h, state_c] | |
# Define the decoder |
NewerOlder