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 edsl import QuestionList, ScenarioList, QuestionFreeText | |
| import random | |
| q = QuestionList(question_text = "Generate a list of 10 fruits", question_name = "fruits") | |
| fruits = q() | |
| def list_to_pref(items): | |
| return " > ".join(items) | |
| preferences = [list_to_pref(random.sample(fruits, len(fruits))) for _ in range(20)] |
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
| library(ggplot2) | |
| library(dplyr) | |
| library(tidyr) | |
| library(gridExtra) | |
| library(purrr) | |
| # Function to compute medians and bootstrap CIs for a single tau value | |
| get_medians <- function(data, simtot = 150, tau = 0.5) { | |
| # Data without errors | |
| data0 <- subset(data, all_errors == 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
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "pip", | |
| # "edsl @ git+https://github.com/expectedparrot/edsl.git@improved_report", | |
| # ] | |
| # /// | |
| from textwrap import dedent | |
| from edsl import QuestionFreeText, QuestionList, Agent |
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
| #!/usr/bin/env python3 | |
| """ | |
| Grid Image Tool | |
| Adds red horizontal and vertical lines to an image and labels each cell with letters. | |
| Dependencies are declared inline for use with uv run. | |
| Usage: uv run grid_image.py input.png --num-vertical 5 --num-horizontal 3 | |
| """ |
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 edsl import ( | |
| QuestionLinearScale, | |
| ScenarioList, | |
| Scenario, | |
| Scenario, | |
| Survey, | |
| QuestionCompute, | |
| ) | |
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
| import textwrap | |
| from edsl.agents import Agent | |
| from edsl.questions import ( | |
| QuestionFreeText, | |
| QuestionLinearScale, | |
| QuestionMultipleChoice, | |
| ) | |
| from edsl.surveys import Survey | |
| from edsl.macros import Macro |
OlderNewer