MCPcopy Create free account

hub / github.com/aaronjmars/MiroShark / functions

Functions3,647 in github.com/aaronjmars/MiroShark

Functionpage_to_offset
Convert a 1-based ``page`` query parameter to an ``offset``. ``page=1`` → offset 0. ``page=0`` and negative pages coerce to page 1. Non-numer
backend/app/services/gallery_filters.py:139
Functionpair_entities_with_seeds
Return a list of length n_entities, each slot a seed dict or None. When seeds are fewer than entities, the remaining slots are None and those
backend/app/services/demographic_sampler.py:341
Functionparagraph
({ tokens })
frontend/src/utils/markdown.js:15
Functionparse_sim_id_from_url
Extract a simulation id from a MiroShark URL, or ``None``. ``url`` must be an absolute URL whose host is in ``allowed_hosts`` (when supplied)
backend/app/services/oembed_service.py:111
Methodperform_action_by_hci
(self)
backend/wonderwall/social_agent/agent.py:548
Methodperform_agent_graph_action
r"""Remove edge if action is unfollow or add edge if action is follow to the agent graph.
backend/wonderwall/social_agent/agent.py:593
Methodperform_test
doing group polarization test for all agents. TODO: rewrite the function according to the ChatAgent. TODO: unify the test and
backend/wonderwall/social_agent/agent.py:447
Functionpolymarket_market_prices
Time-series of YES price for a single market, reconstructed from trades. For each trade row we derive yes_price: - outcome == 'YES' → yes_p
backend/app/api/simulation.py:4634
Functionpolymarket_markets
List all prediction markets in a simulation with current YES price. Response: { success, data: { markets: [{market_id, question, outcome_a, o
backend/app/api/simulation.py:4584
Functionpopulated_sim_dir
Sim directory with a 5-snapshot trajectory that has two clear dominant-stance flips: - round 1: 1 bullish, 1 neutral, 1 bearish ⇒ flat (no
backend/tests/test_unit_thread.py:45
Functionpopulated_sim_dir
A simulation directory with every artifact the webhook reads.
backend/tests/test_unit_webhook.py:37
Functionpopulated_sim_dir
A simulation directory whose trajectory ends bullish at 50%.
backend/tests/test_unit_webhook_events.py:72
Functionpopulated_sim_dir
Simulation directory with the artifacts the transcript reads: profiles, trajectory (3 snapshots, viral_posts on each), quality, resolution, ou
backend/tests/test_unit_transcript.py:45
Functionpopulated_sim_dir
Sim directory with the artifacts the trajectory export reads: trajectory (3 snapshots, viral_posts on each) + quality. The belief positions a
backend/tests/test_unit_trajectory.py:54
Functionpopulated_sim_dir
Sim directory with a 3-round trajectory the chart can render. Belief positions chosen so each round has a distinct, predictable stance split
backend/tests/test_unit_chart_svg.py:49
Functionpopulated_sim_dir
Sim directory with a 2-round trajectory the chart can render.
backend/tests/test_unit_frame_metadata.py:62
Functionpopulated_summary
The same dict ``_build_embed_summary_payload`` returns for the populated simulation.
backend/tests/test_unit_transcript.py:122
FunctionprepareSimulation
(data)
frontend/src/api/simulation.js:15
Functionprepare_simulation
Prepare simulation environment (async task, LLM intelligently generates all parameters) This is a time-consuming operation. The endpoint ret
backend/app/api/simulation.py:1745
Functionprint_db_contents
(db_file)
backend/wonderwall/testing/show_db.py:32
Functionprivate_preview_landing
Resolve a private share-link token to a noindex preview page. A token bypasses the ``is_public`` gate for one page — the same SPA share view
backend/app/api/share.py:543
Methodprofile_progress
(current, total, msg)
backend/app/services/simulation_manager.py:400
Functionprogress
(msg, ratio)
backend/scripts/test_full_pipeline.py:140
Functionprogress
(step, total, msg)
backend/scripts/test_pipeline_phase5_6.py:97
Functionprogress
(stage, pct, msg)
backend/scripts/test_report_generation.py:73
Functionprogress_callback
(stage, progress, message, **kwargs)
backend/app/api/simulation.py:1915
Methodprovider
(self)
backend/app/storage/embedding_service.py:52
FunctionpublishSimulation
(simulationId, publicFlag = true)
frontend/src/api/simulation.js:396
FunctionpublishToDkg
(simulationId, opts = {})
frontend/src/api/simulation.js:1770
FunctionpublishToWaybackclaw
(simulationId, opts = {})
frontend/src/api/simulation.js:1818
Functionpublish_dkg
Anchor a finished simulation's citation surface on the OriginTrail DKG. Triggered manually from the EmbedDialog "Publish to DKG" button. Buil
backend/app/api/simulation.py:7491
Functionpublish_simulation
Anchor a simulation's citation surface on the OriginTrail DKG. Idempotent: a successful citation is persisted to ``<sim_dir>/dkg-citation.jso
backend/app/services/dkg_publisher.py:490
Functionpublish_simulation
Mark a simulation as publicly embeddable. Body (optional): ``{"public": false}`` to unpublish instead of publish. Returns the new public stat
backend/app/api/simulation.py:4733
Functionpublish_waybackclaw
Submit a finished simulation's snapshot to the WaybackClaw archive. Triggered manually from the EmbedDialog "Submit to WaybackClaw" button. B
backend/app/api/simulation.py:7724
Methodpurchase_product
r"""Purchase a product. Args: product_name (str): The name of the product to be purchased. purchase_num (int): The nu
backend/wonderwall/social_agent/agent_action.py:643
Methodpurchase_product
(self, agent_id, purchase_message)
backend/wonderwall/social_platform/platform.py:241
Functionpytest_collection_modifyitems
Skip ``@pytest.mark.integration`` tests by default. Run them explicitly with ``pytest -m integration`` (or ``pytest -m "integration or not in
backend/tests/conftest.py:53
Functionpytest_configure
Register custom markers so ``-m integration`` doesn't emit warnings.
backend/tests/conftest.py:36
Methodquote_post
r"""Quote a specified post with a given quote content. This method invokes an asynchronous action to quote a specified post with a gi
backend/wonderwall/social_agent/agent_action.py:197
Methodquote_post
(self, agent_id: int, quote_message: tuple)
backend/wonderwall/social_platform/platform.py:529
FunctionreadPrefilledParams
(query)
frontend/src/utils/urlParams.js:72
Functionreader
(sim_dir: str)
backend/tests/test_unit_feed_filters.py:346
Functionrec_sys_personalized
Recommend posts based on personalized similarity scores. Args: user_table (List[Dict[str, Any]]): List of users. post_table
backend/wonderwall/social_platform/recsys.py:262
Functionrecord
(url, payload, timeout)
backend/tests/test_unit_webhook_events.py:386
Methodrecord
Record a batch of actions from one platform round. Args: platform: Platform name ("twitter", "reddit", "polymarket", ...
backend/scripts/cross_platform_digest.py:71
Functionrecord_post
(url, payload, timeout)
backend/tests/test_unit_webhook.py:335
Methodrefresh
(self, agent_id: int)
backend/wonderwall/social_platform/platform.py:279
Methodrelevance_score
(fact: str)
backend/app/services/graph_tools.py:1143
Methodremove_agent
(self, agent: SocialAgent)
backend/wonderwall/social_agent/agent_graph.py:212
Methodremove_edge
(self, src_agent_id: int, dst_agent_id: int)
backend/wonderwall/social_agent/agent_graph.py:64
FunctionrenderMarkdown
(content, { stripLeadingH2 = false } = {})
frontend/src/utils/markdown.js:70
FunctionrenderSvgToCanvas
(svgEl, { width, height, scale = 2, headerHeight = 0, drawHeader = null, title = '', subtitle =
frontend/src/utils/chartExport.js:132
Functionrender_json_bytes
Pretty-print the blob as UTF-8 bytes for the route handler. Pretty-print (indent=2) so a ``curl > config.json`` is immediately readable in a
backend/app/services/repro_export.py:410
Functionrender_markdown_bytes
(data: dict)
backend/app/services/transcript.py:577
Functionrender_notebook_bytes
Render the notebook dict as UTF-8 bytes for the route handler. Pretty-print (indent=2) + ``sort_keys=True`` + trailing newline so two exports
backend/app/services/notebook_export.py:538
Functionrender_swagger_ui
Render Swagger UI for the MiroShark HTTP API.
backend/app/api/docs.py:210
Methodreplace_unicode
(match)
backend/scripts/run_twitter_simulation.py:71
Methodreplace_unicode
(match)
backend/scripts/run_reddit_simulation.py:81
Methodreport_post
r"""Report a specified post with a given reason. This method invokes an asynchronous action to report a specified post with a given r
backend/wonderwall/social_agent/agent_action.py:680
Methodreport_post
(self, agent_id: int, report_message: tuple)
backend/wonderwall/social_platform/platform.py:1444
Methodreport_progress
(step: int, message: str)
backend/app/services/simulation_config_generator.py:302
Methodrepost
r"""Repost a specified post. This method invokes an asynchronous action to Repost a specified post. It is identified by the given pos
backend/wonderwall/social_agent/agent_action.py:171
Methodrepost
(self, agent_id: int, post_id: int)
backend/wonderwall/social_platform/platform.py:451
Functionrepro_blob
()
backend/tests/test_unit_notebook_export.py:99
Functionrequire_admin_token
Decorator: gate a Flask view on a valid admin bearer token. Behaviour matrix: * ``MIROSHARK_ADMIN_TOKEN`` unset/empty in env → **503**
backend/app/api/simulation.py:98
Methodreset
(self)
backend/wonderwall/social_agent/agent_graph.py:192
Methodreset
r"""Start the platform and sign up the agents.
backend/wonderwall/environment/env.py:183
Functionreset_dedup_for_tests
Clear the in-process dedup set. Test-only convenience.
backend/app/services/email_notify.py:126
Functionreset_dedup_for_tests
Clear the in-process dedup set. Test-only convenience.
backend/app/services/webhook_service.py:251
Functionreset_dedup_for_tests
Clear the in-process dedup set. Test-only convenience.
backend/app/services/discord_notify.py:92
Functionreset_dedup_for_tests
Clear the in-process dedup set. Test-only convenience.
backend/app/services/telegram_notify.py:92
Functionreset_dedup_for_tests
Clear the in-process dedup set. Test-only convenience.
backend/app/services/slack_notify.py:80
Functionreset_globals
()
backend/wonderwall/social_platform/recsys.py:124
Functionreset_retry_cooldown_for_tests
Clear the per-sim retry cooldown table. Test-only convenience.
backend/app/services/webhook_service.py:231
FunctionresolveSimulation
(simulationId, data)
frontend/src/api/simulation.js:284
Methodresolve_market
Resolve a market and pay out winning positions.
backend/wonderwall/simulations/polymarket/platform.py:378
Functionresolve_public_base_url
Absolute origin (no trailing slash) for public absolute URLs. Prefers the operator-set ``Config.PUBLIC_BASE_URL`` (the single source of truth
backend/app/utils/base_url.py:8
Functionresolve_simulation
Record the real-world outcome of a simulation prediction. Auth: requires ``Authorization: Bearer $MIROSHARK_ADMIN_TOKEN``. Body:
backend/app/api/simulation.py:9343
Functionresolve_token
Look up ``token`` across every sim dir under ``sim_root``. Returns the owning ``sim_id`` for a valid, non-revoked, non-expired token. Returns
backend/app/services/share_link_service.py:338
FunctionrestartEnv
(data)
frontend/src/api/simulation.js:188
Functionrestart_env
Restart simulation environment for interviews (without running simulation). Launches the simulation script with --env-only flag.
backend/app/api/simulation.py:8889
FunctionresumeSimulation
(data)
frontend/src/api/simulation.js:107
FunctionretrySimulationConfig
(simulationId)
frontend/src/api/simulation.js:74
FunctionretryWebhookDelivery
(simulationId, data = {})
frontend/src/api/simulation.js:2036
Functionretry_simulation_config
Retry config generation only (profiles already exist). Resets the simulation status to 'preparing', then regenerates the simulation_conf
backend/app/api/simulation.py:2702
Functionretry_webhook
Re-fire the completion webhook for an already-finished simulation. Useful when the original delivery hit a transient 5xx, the operator pointe
backend/app/api/simulation.py:7301
FunctionrevokeShareLink
(simulationId, token)
frontend/src/api/simulation.js:446
Functionrevoke_share_link
Revoke a single share-link token. Idempotent — returns ``204`` whether the token existed or not so the caller can fire-and-forget without bra
backend/app/api/simulation.py:4883
Functionrevoke_token
Mark ``token`` as revoked for ``sim_id``. Idempotent — returns ``True`` when the token existed (whether or not it was already revoked), ``Fal
backend/app/services/share_link_service.py:394
Functionrobots_txt
Render the public ``robots.txt`` for the deployment. Always served (even when ``ENABLE_SITEMAP=false``) so well-behaved crawlers see the ``Di
backend/app/api/sitemap.py:96
Functionrun_config_retry
()
backend/app/api/simulation.py:2779
Functionrun_generate
()
backend/app/api/report.py:160
Functionrun_prepare
()
backend/app/api/simulation.py:1898
Functionrunning_summary
An in-flight, public simulation mid-run.
backend/tests/test_unit_watch.py:34
Functionsafe_load_json
Read a JSON file, returning ``None`` on missing / corrupt input. Never raises: an empty/falsy ``path`` or a file that is missing, unreadable,
backend/app/utils/json_io.py:24
Functionsample_seeds
Sample up to `limit` demographic rows for the given country. Returns an empty list (with a warning) when duckdb/hf deps are missing, when the
backend/app/services/demographic_sampler.py:113
Functionsample_simulation_id
Opt-in: reuse an existing simulation id from $MIROSHARK_TEST_SIM_ID. Many integration tests need a simulation_id to exercise endpoints like /
backend/tests/conftest.py:98
Methodsave_profiles_realtime
Save generated profiles to file in real time
backend/app/services/wonderwall_profile_generator.py:1099
Methodschema_dir
Path to this simulation's schema/ folder. By default, looks for a ``schema/`` directory next to the file that defines the concrete su
backend/wonderwall/simulations/base.py:113
Methodsearch
Semantic search over community summaries.
backend/app/storage/community_builder.py:126
← previousnext →2,101–2,200 of 3,647, ranked by callers