Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mwmbl/mwmbl
/ functions
Functions
929 in github.com/mwmbl/mwmbl
⨍
Functions
929
◇
Types & classes
208
↳
Endpoints
48
↓ 278 callers
Method
get
Get the next priority item from the queue, returning the item ID and the object
mwmbl/indexer/fsqueue.py:105
↓ 94 callers
Method
append
(self, tag_name)
mwmbl/justext/core.py:225
↓ 56 callers
Method
format
Human-readable formatting of bytes, using binary (powers of 1024) or metric (powers of 1000) representation.
mwmbl/templatetags/humanbytes.py:14
↓ 54 callers
Method
create
(item_factory: Callable[..., T], index_path: str, num_pages: int, page_size: int)
mwmbl/tinysearchengine/indexer.py:269
↓ 24 callers
Function
tokenize
(input_text)
mwmbl/tokenizer.py:1
↓ 21 callers
Function
_super_search_monthly_key
(user_id: int, year: int | None = None, month: int | None = None)
mwmbl/quota.py:28
↓ 20 callers
Function
check_email_verified
(request)
mwmbl/platform/api.py:33
↓ 19 callers
Method
predict
Predict class-1 probabilities. Parameters ---------- X : DataFrame with columns query, url, title, extract, score
mwmbl/tinysearchengine/ltr.py:174
↓ 16 callers
Method
get_page
Get the page at index i, decompress and deserialise it using JSON
mwmbl/tinysearchengine/indexer.py:223
↓ 15 callers
Function
_doc
(title, url, extract="")
test/test_mmr_rank.py:5
↓ 15 callers
Function
_read_stream
(response)
test/test_super_search.py:76
↓ 15 callers
Function
_stub_sources
Replace the live source adapters with deterministic stubs.
test/test_super_search.py:85
↓ 15 callers
Function
auth_headers
(token)
test/test_search_api_key.py:120
↓ 14 callers
Function
_parse_sse
(body: bytes)
test/test_super_search.py:58
↓ 14 callers
Function
api_key_header
(key)
test/test_search_api_key.py:124
↓ 13 callers
Method
search
(self, s: str, additional_results: list[Document])
mwmbl/tinysearchengine/rank.py:247
↓ 11 callers
Function
_monthly_key
(user_id: int, year: int | None = None, month: int | None = None)
mwmbl/quota.py:21
↓ 11 callers
Function
_stub_scoring
Stub both the promotion scorer (_heuristic_score_docs) and the LTR final ranker (score_documents) to consume from a single shared score iterator.
test/test_super_search.py:97
↓ 11 callers
Method
retrieve
(self, key: str)
mwmbl/tinysearchengine/indexer.py:213
↓ 10 callers
Method
load
(self)
mwmbl/main.py:47
↓ 9 callers
Method
as_tuple
Convert a type to a tuple - values at the end that are None can be truncated.
mwmbl/tinysearchengine/indexer.py:74
↓ 9 callers
Method
fit
Train the XGBoost model. Parameters ---------- X : DataFrame with columns query, url, title, extract, score
mwmbl/tinysearchengine/ltr.py:150
↓ 9 callers
Method
get_key_page_index
(self, key)
mwmbl/tinysearchengine/indexer.py:219
↓ 8 callers
Function
auth_headers
(token)
test/test_platform_billing.py:68
↓ 8 callers
Function
get_monthly_count
Return the current monthly request count for a user (0 if not set).
mwmbl/quota.py:64
↓ 8 callers
Function
search_with_recipe
( client: httpx.AsyncClient, recipe: Recipe, query: str, limit: int )
mwmbl/tinysearchengine/super_search_sources/recipe.py:96
↓ 7 callers
Method
close
(self)
test/test_ssrf.py:97
↓ 7 callers
Function
emit
(event_type: str, data: Any)
mwmbl/tinysearchengine/super_search.py:555
↓ 7 callers
Function
is_safe_host
Return True if every address ``host`` resolves to is a public address. ``host`` may be an IP literal or a hostname. Hostnames are resolved with
mwmbl/crawler/ssrf.py:41
↓ 7 callers
Function
make_dataframe
Create a synthetic DataFrame with the columns expected by RustXGBPipeline.
test/test_rust_pipeline.py:27
↓ 7 callers
Function
mmr_rerank
Re-order a relevance-sorted list to demote near-duplicate / same-domain results. Greedy Maximal Marginal Relevance with a domain-dominant kernel
mwmbl/tinysearchengine/mmr_rank.py:41
↓ 7 callers
Function
parse_url
Custom URL parsing function using regex because urlparse is too slow.
mwmbl/utils.py:67
↓ 7 callers
Method
put
Push a new item into the ready state
mwmbl/indexer/fsqueue.py:95
↓ 7 callers
Method
run
Main entry point for the crawler. Starts multiple worker processes for batch processing and one indexing process. Mo
mwmbl/crawl.py:265
↓ 7 callers
Function
validate_domain
(domain_or_url: str)
mwmbl/utils.py:80
↓ 7 callers
Method
xpath
(self)
mwmbl/justext/core.py:222
↓ 6 callers
Function
_dom
(html: str)
test/test_retrieve_extract.py:18
↓ 6 callers
Function
_merge_user_ids
( existing: Optional[list[int]], incoming: Optional[list[int]] )
mwmbl/indexer/index_batches.py:28
↓ 6 callers
Function
_recipe
(name: str)
test/test_super_search_recipes.py:45
↓ 6 callers
Method
check_redis
Check Redis connection health.
mwmbl/crawl.py:123
↓ 6 callers
Function
crawl_url
(url, redis: Redis)
mwmbl/crawler/retrieve.py:306
↓ 6 callers
Function
createChart
(elementId, labels, label)
front-end/src/stats/stats.js:6
↓ 6 callers
Function
generate_api_key
Return (raw_key, key_hash). Store only the hash; return raw_key to the user once.
mwmbl/models.py:130
↓ 6 callers
Method
get_domain_count
(self, domain: str)
mwmbl/redis_url_queue.py:161
↓ 6 callers
Method
is_domain_blacklisted
Check if domain is blacklisted by any provider.
mwmbl/indexer/blacklist_providers.py:133
↓ 6 callers
Method
queue_urls
(self, found_urls: list[FoundURL])
mwmbl/redis_url_queue.py:60
↓ 5 callers
Function
_get_page_data
(page_size: int, items: list[T])
mwmbl/tinysearchengine/indexer.py:161
↓ 5 callers
Method
_move
(self, name: str, old_state: FSState, new_state: FSState)
mwmbl/indexer/fsqueue.py:92
↓ 5 callers
Function
_pad_to_page_size
(data: bytes, page_size: int)
mwmbl/tinysearchengine/indexer.py:170
↓ 5 callers
Function
_prepare_results
(results: Optional[list[Document]])
mwmbl/views.py:68
↓ 5 callers
Function
_trim_items_to_page
(compressor: ZstdCompressor, page_size: int, items:list[T])
mwmbl/tinysearchengine/indexer.py:156
↓ 5 callers
Function
combine_documents
(existing_documents, documents, mark_synced, ranker)
mwmbl/indexer/index_batches.py:150
↓ 5 callers
Method
complete
(self, term)
mwmbl/tinysearchengine/completer.py:24
↓ 5 callers
Function
evaluate
(ranking_model: RankingModel, fraction: float = 1.0, use_test=False)
mwmbl/rankeval/evaluation/evaluate.py:32
↓ 5 callers
Function
get_first_paragraph
Return the text of the first substantive <p> element, or empty string. A last-resort fallback for pages where justext finds no 'good' content — m
mwmbl/crawler/retrieve.py:281
↓ 5 callers
Method
is_domain_blacklisted
Check if a domain should be blacklisted.
mwmbl/indexer/blacklist_providers.py:19
↓ 5 callers
Function
mockCompleterData
(mocker, data)
test/test_completer.py:6
↓ 5 callers
Method
process_batch
Process a single batch of URLs by crawling them sequentially with rate limiting. This function handles the core crawling workflow:
mwmbl/crawl.py:131
↓ 5 callers
Function
resolve
(node)
mwmbl/tinysearchengine/super_search.py:235
↓ 5 callers
Method
run_indexing
Process completed crawl batches and integrate results into the search index. This function handles the indexing workflow: 1.
mwmbl/crawl.py:172
↓ 5 callers
Function
validate_url
Raise :class:`UnsafeURLError` if ``url`` is not safe to fetch.
mwmbl/crawler/ssrf.py:74
↓ 4 callers
Function
_binary_search_fitting_size
(compressor: ZstdCompressor, page_size: int, items:list[T], lo:int, hi:int)
mwmbl/tinysearchengine/indexer.py:132
↓ 4 callers
Function
_cache_robots_content
(redis: Redis, domain: str, content: List[str], error: bool = False)
mwmbl/crawler/retrieve.py:169
↓ 4 callers
Function
_emit_final_results
( query: str, all_docs: list[Document], emit, last_results_key: list, lock: asyncio.Lock )
mwmbl/tinysearchengine/super_search.py:412
↓ 4 callers
Method
_get_dir
(self, state: FSState)
mwmbl/indexer/fsqueue.py:86
↓ 4 callers
Method
_get_path
(self, state: FSState, name: str)
mwmbl/indexer/fsqueue.py:89
↓ 4 callers
Method
_start_new_pragraph
(self)
mwmbl/justext/core.py:160
↓ 4 callers
Function
check_date_str
(date_str)
mwmbl/crawler/app.py:403
↓ 4 callers
Function
check_email_verified
Check if user's email is verified.
mwmbl/evaluation/api.py:14
↓ 4 callers
Method
fit
(self, X, y)
mwmbl/rankeval/ltr/baseline.py:9
↓ 4 callers
Method
get_batch
(self, user_id: str)
mwmbl/redis_url_queue.py:101
↓ 4 callers
Function
get_default_crawler
Get the default crawler instance.
mwmbl/crawl.py:332
↓ 4 callers
Function
get_features
(terms, title, url, extract, score, is_complete)
mwmbl/tinysearchengine/rank.py:125
↓ 4 callers
Function
get_query_regex
(terms, is_complete: bool, use_word_boundaries: bool)
mwmbl/format.py:59
↓ 4 callers
Function
html_to_dom
Converts HTML to DOM.
mwmbl/justext/core.py:63
↓ 4 callers
Function
increment_monthly
Increment the monthly counter and return the new value. Sets a 35-day TTL on first use so the key auto-expires.
mwmbl/quota.py:69
↓ 4 callers
Function
index_pages
(index_path: str, page_documents: dict[int, list[Document]], mark_synced: bool = False)
mwmbl/indexer/index_batches.py:78
↓ 4 callers
Function
invalidate_user_api_key_cache
(user_id: int)
mwmbl/search_auth.py:24
↓ 4 callers
Method
is_domain_blacklisted
Check if domain is in the HaGeZi blacklist.
mwmbl/indexer/blacklist_providers.py:121
↓ 4 callers
Function
load_recipes
Load every ``*.yaml`` recipe in ``directory``, keyed by recipe name. A malformed recipe (missing required keys, bad YAML) is logged and skipped
mwmbl/tinysearchengine/super_search_sources/recipe.py:66
↓ 4 callers
Function
make_labels
(n: int = 30, seed: int = 42)
test/test_rust_pipeline.py:66
↓ 4 callers
Function
numberWithCommas
(x)
front-end/src/stats/stats.js:76
↓ 4 callers
Function
rust_get_features
Call the Rust get_features_py function.
test/test_rust_features.py:22
↓ 4 callers
Function
search
(session: requests.Session)
scripts/check_search_api_key.py:30
↓ 4 callers
Method
update_found_urls
Update URLs with the most recent crawl date, if they've been crawled before, or None otherwise. Update the most recent URL status in
mwmbl/crawler/urls.py:88
↓ 3 callers
Function
_cache_key
(key_hash: str)
mwmbl/search_auth.py:16
↓ 3 callers
Function
_crawl_html
(monkeypatch, html: str)
test/test_retrieve_extract.py:62
↓ 3 callers
Function
_get_count
Get the count for a given date and set it in the count_dict.
mwmbl/count_urls.py:119
↓ 3 callers
Function
_get_user_id_hash
(batch: Union[Batch, NewBatchRequest, DatasetRequest])
mwmbl/crawler/app.py:366
↓ 3 callers
Function
_make_doc
(values: dict, url: str)
mwmbl/tinysearchengine/super_search_sources/recipe.py:157
↓ 3 callers
Function
_register_common_routes
Register the /complete and /raw endpoints (shared between v1 and v2).
mwmbl/tinysearchengine/search.py:335
↓ 3 callers
Function
_set_count
(key, redis, today, count)
mwmbl/count_urls.py:84
↓ 3 callers
Function
_walk
Walk a dotted path (``a.b.c``) through nested dicts; None if absent.
mwmbl/tinysearchengine/super_search_sources/recipe.py:167
↓ 3 callers
Function
check_rate_limit
Fixed-window rate limit: at most RATE_LIMIT requests per second. Returns True if the request is allowed, False if the limit is exceeded.
mwmbl/quota.py:43
↓ 3 callers
Function
clean_unicode
(s: str)
mwmbl/tokenizer.py:16
↓ 3 callers
Method
create_tables
(self)
mwmbl/indexer/indexdb.py:28
↓ 3 callers
Method
error
Mark a task/file as in error state
mwmbl/indexer/fsqueue.py:137
↓ 3 callers
Function
fetch
Fetch with a maximum timeout and maximum fetch size to avoid big pages bringing us down. Redirects are followed manually so each hop can be
mwmbl/crawler/retrieve.py:56
↓ 3 callers
Method
from_model_path
Load a pre-trained model from disk and return a ready-to-predict pipeline.
mwmbl/tinysearchengine/ltr.py:202
↓ 3 callers
Function
get_bigrams
(num_bigrams, tokens)
mwmbl/tokenizer.py:10
next →
1–100 of 929, ranked by callers