image-to-code-v2 / metadata.jsonl
lyleokoth's picture
Upload 19 files
353a4d5 verified
raw
history blame
No virus
13.9 kB
{"file_name": "0145fe84-45e3-4964-ad59-89080d7deeb4.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "def generate_class_docstring(class_code: str, config: Config) -> str:\r\n prompt_formatted_str: str = get_class_prompt_template(\r\n class_code=class_code, config=config\r\n )\r\n class_and_docstring = llm.invoke(prompt_formatted_str)\r\n return class_and_docstring\r\n\r\n\r\ndef get_class_docstring(class_and_docstring: str) -> str:\r\n \"\"\"Get the class docstring.\"\"\"\r\n class_tree = ast.parse(class_and_docstring)\r\n for node in class_tree.body:\r\n if isinstance(node, ClassDef):\r\n cls_docstring: str = ast.get_docstring(node)\r\n return cls_docstring"}]}
{"file_name": "6b99fd2e-b8b3-4c53-81b0-82f80b9144ef.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"}]}
{"file_name": "1d92385c-c480-4cb5-97b9-8923d1f7c96b.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"}]}
{"file_name": "7ec0c3b7-b2df-4aca-89f3-e2bfeef30b17.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"}]}
{"file_name": "dd473992-bb17-4782-809f-84b659fc912f.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}]}
{"file_name": "38df21bb-e265-4983-8c8d-7b83261b576d.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"}]}
{"file_name": "74cc494a-5078-4541-a73e-0def9ceafc6f.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .set_config import set_configuration"}]}
{"file_name": "056a922f-9935-41ec-a19d-e88ac2b3dedf.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .set_config import set_configuration"}]}
{"file_name": "52d8b951-05f5-4fb3-8c6f-1b9247cc593e.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .set_config import set_configuration"}]}
{"file_name": "30ebded6-e78f-4bb3-a56e-b360c999ae33.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .set_config import set_configuration"}]}
{"file_name": "b255d394-3d8c-4b61-9f1d-10e342d9f07e.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")"}]}
{"file_name": "7e224822-0da1-4564-b122-fbe8f37fb667.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")"}]}
{"file_name": "fb7f8f8f-4bdd-4332-a4a1-b6575ce00224.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")"}]}
{"file_name": "cfca1fe7-c0e3-4b45-af86-cad8c684fb7b.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")"}]}
{"file_name": "b17045cb-7ae3-4c58-8eb8-cb1950b7a2d1.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"}]}
{"file_name": "971e49b9-8c03-4ef7-9f9b-7b79ad73c251.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"}]}
{"file_name": "4cfc2840-b1d8-48d7-9999-964f9b6b56db.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"}]}
{"file_name": "b10574d0-3cb1-441b-8c66-646a95c809d9.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"}]}