Skip to content

Instantly share code, notes, and snippets.

View d000b's full-sized avatar
👥
A life without borders

Maxim, HACEKOMOE d000b

👥
A life without borders
View GitHub Profile
@d000b
d000b / order-price-collector.js
Created September 24, 2025 14:54
Parse and collect dns-shop.com order's price.
// Расширенная версия с отслеживанием переходов по страницам
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('₽', ''));
@d000b
d000b / get_all_uncompleted_appid.js
Created August 17, 2025 11:28
Obtaining a list of appIDs from the Steam profile on the games page.
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]);
@d000b
d000b / huggingface-get-models-by's.js
Last active March 11, 2024 12:35
Get a list of model names filtered by model name, size and type. Added filtering with different parameters. (GGUF | GGML), more 25B, Airoboros.
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));
};
@d000b
d000b / nearest_binary_search.cpp
Created August 31, 2023 09:59
find nearest iterator for target value using binary search and distance range to value
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;
@d000b
d000b / hidden_jokes.js
Created August 9, 2023 02:46
Get a list of all joke phrases from the translator's chapter page
// https://stabbingwithasyringe.home.blog/
const jokes_elems = document.querySelectorAll('div.entry-content>p>span');
const jokes = Array.from(jokes_elems).map((item) => {
return item.innerHTML;
});
console.log(jokes);
@d000b
d000b / differences_between_points.js
Last active March 11, 2024 12:16
Script to get a list as a href string with profile IDs to a user's page from a friends page in Steam
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;
});
@d000b
d000b / RemoveLocalBranches.ps1
Created August 4, 2023 01:34
remove local only branches from git using PowerShell
git fetch --prune
git branch --merged | Where-Object {$_ -notmatch "master|main|\*"} | ForEach-Object {git branch -d $_.trim()}
@d000b
d000b / html_page_tag_name_selector.js
Created July 20, 2023 14:59
get tag names from hnentai tags category
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);
@d000b
d000b / media_tags.js
Last active July 20, 2023 08:15
get grouped tags from media using api nhentai.net
const example_query = 'https://nhentai.net/api/galleries/search?query=incest&page=1';
fetch(example_query)
.then((response) => {
return response.json();
})
.then((data) => {
const get_tag_list = (media) => {
const get_pretty_tag = (tag) => {
return { id: tag.id, name: tag.name, type: tag.type };
};
@d000b
d000b / branch-seq2seq.py
Created July 19, 2023 03:02
GPT4 seq2seq for train the main 'Images features extraction to embedding dynamic hyperspace' neural network and subsequently process and interpret the information
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