Skip to content

Instantly share code, notes, and snippets.

@sttuartt
sttuartt / chatgpt_online_quiz.md
Last active September 25, 2023 07:18
Chatgpt prompt for online quiz content creation

Generate online quiz

Overview

Using transcript/subtitles from online course, use Chatgpt to create a multiple choice quiz and output in json format. Save this output in separate file/s. Then use a second script to process these json file/s in order to generate html file/s that present the quiz nicely, and hide the correct answer for each question. Lastly, open all html files in a new browser and simply navigate from tab to tab to test yourself.

I used this to generate a quiz for all content from the A Cloud Guru course for DevOps Engineer - use this tool to download all files (including .srt files, which is what is relevant here). I set the quality to 480 as I didn't care about the videos, just the transcripts.

Notes

This was developed on, and for use with a mac, so some adjustment may be necessary for use on other operating systems.

Assumptions

@sttuartt
sttuartt / graphql.json
Last active September 18, 2023 09:16
graphql introspection query
{"query":
"query IntrospectionQuery {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n ...FullType\n }\n directives {\n name\n description\n args {\n ...InputValue\n }\n }\n }\n}\n\nfragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n}\n\nfragment InputValue on __InputValue {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n}\n\nfragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind