jupyter notebooks added.

This commit is contained in:
xiaolai
2024-01-18 07:31:45 +08:00
parent f7993bfdd5
commit fe87154ea6
5 changed files with 1402 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "f330d08f-fa3c-4cf4-bf53-136be20393e9",
"metadata": {},
"outputs": [],
"source": [
"# %pip install python-dotenv openai\n",
"# %pip install --upgrade openai"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "71ad2e48-3b33-42d3-8e4c-9f89c61110de",
"metadata": {},
"outputs": [],
"source": [
"from dotenv import load_dotenv\n",
"from openai import OpenAI\n",
"from datetime import datetime\n",
"from IPython.display import HTML\n",
"import IPython\n",
"import re"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "78e09680-77f9-411d-b792-d339c3ccb076",
"metadata": {},
"outputs": [],
"source": [
"load_dotenv() # take environment variables from .env.\n",
" # you should set OPENAI_API_KEY=\"sk-xxxxx\" in .env in current working_dir."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7a492b90-fa90-4d8b-934a-05d0cc2ff2c1",
"metadata": {},
"outputs": [],
"source": [
"client = OpenAI()\n",
"\n",
"role_definition = \"\"\"\n",
"You're my English tutor.\n",
"You have a list of colors: \"Scarlet,Crimson,Maroon,Burgundy,Coral,Tangerine,Apricot,Burnt Orange,Mustard,Gold,Amber,Lemon,Emerald,Olive,Lime,Jade,Navy,Azure,Cobalt,Turquoise,Lavender,Mauve,Plum,Violet,Fuchsia,Salmon,Rose,Blush,Sienna,Bronze,Taupe,Beige,Charcoal,Slate,Silver,Pewter,Ivory,Pearl,Alabaster,Jet,Onyx,Ebony\".\n",
"Whatever I say, you'll randomly choose one of colors in the list, \n",
"1. tell me the color's name, and give the pronunciation of the word in ipa.\n",
"2. give me the hex code of the color;\n",
"3. give me the name of the color in Chinese, \n",
"4. tell me what basic color's variation it is.\n",
"5. explain to me it's origin, where I would see the color most often, in both English and Chinese; and please surround English explanation with tripple ```\n",
"\n",
"\"\"\"\n",
"\n",
"user_prompt = \"\"\"\n",
"hi\n",
"\"\"\"\n",
"\n",
"rspd_translation = client.chat.completions.create(\n",
" model=\"gpt-4\",\n",
" messages=[\n",
" {\n",
" \"role\": \"system\", \n",
" \"content\": role_definition\n",
" },\n",
" {\n",
" \"role\": \"user\", \n",
" \"content\": user_prompt\n",
" }\n",
" ]\n",
")\n",
"\n",
"colors = re.findall(r'#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3})?', rspd_translation.choices[0].message.content)\n",
"html_str = f\"<div style='width:100px; height:100px; background-color:{colors[0]};'></div>\"\n",
"color_explanation = re.findall(r'```(.*?)```', rspd_translation.choices[0].message.content)\n",
"print(\"\")\n",
"display(HTML(html_str))\n",
"print(\"\")\n",
"print(rspd_translation.choices[0].message.content)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37679a3d-f1b8-49f3-9b31-2b810441b348",
"metadata": {},
"outputs": [],
"source": [
"speech_file_path = f\"{datetime.now().strftime(\"%Y%m%d_%H%M%S\")}_color.mp3\"\n",
"voice_performer = \"alloy\"\n",
"# alloy, echo, fable, onyx, nova, and shimmer, the last two of which are femail voices.\n",
"\n",
"rspd_audio = client.audio.speech.create(\n",
" model=\"tts-1\",\n",
" voice=voice_performer,\n",
" input=color_explanation[0]\n",
")\n",
"\n",
"rspd_audio.stream_to_file(speech_file_path)\n",
"\n",
"IPython.display.Audio(speech_file_path)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -0,0 +1,108 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "c61d2477-fd76-4819-9696-b4077728c2df",
"metadata": {},
"outputs": [],
"source": [
"%pip install edge_tts playsound"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dfd3281a",
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import edge_tts\n",
"import datetime\n",
"from playsound import playsound\n",
"\n",
"def generate_digits(n):\n",
" \"\"\"\n",
" Generates a string of n random digits.\n",
" \"\"\"\n",
" return ''.join([str(random.randint(0, 9)) for _ in range(n)])\n",
"\n",
"async def speak_digits(digits):\n",
" \"\"\"\n",
" Speaks every digit in the string to the user with a pause in between.\n",
" \"\"\"\n",
" VOICE = \"en-US-GuyNeural\"\n",
" # VOICE = \"zh-CN-YunjianNeural\"\n",
"\n",
" # generate voice over file\n",
" OUTPUT_FILE = f'{datetime.datetime.now().strftime(\"%Y%m%d%H%M%S\")}.mp3'\n",
" communicate = edge_tts.Communicate(digits, VOICE)\n",
" await communicate.save(OUTPUT_FILE)\n",
" \n",
" # play the OUTPUT_FILE\n",
" playsound(OUTPUT_FILE)\n",
"\n",
"async def play_game(n):\n",
" \"\"\"\n",
" Plays the memory game.\n",
" \"\"\"\n",
" num_digits = n\n",
" while True:\n",
" # Generate a string of random digits\n",
" digits = generate_digits(num_digits)\n",
"\n",
" # a decoration to have edge_tts pronounce with breaks\n",
" voice_string = f\"{', '.join(d for d in digits)}, .. over!\"\n",
"\n",
" # Speak the digits to the user|\n",
" print(f\"You'll challenge {num_digits} digits to remember, please listen carefully...\")\n",
" await speak_digits(voice_string)\n",
"\n",
" # Ask the user to input what they heard\n",
" guess = input(\"Please enter what you heard: \")\n",
"\n",
" # Check if the guess is correct\n",
" if guess == digits:\n",
" num_digits += 1\n",
" print(\"Congratulations! You got it right!\") \n",
" else:\n",
" num_digits -= 1\n",
" print(\"Sorry, that's not correct. Keep trying! Let's hold back a little...\")\n",
" if num_digits < 1:\n",
" num_digits = 1\n",
"\n",
" # Ask the user if they want to continue playing\n",
" play_again = input(\"Do you want to play again? (y/n) \")\n",
" if play_again.lower() != 'y':\n",
" break\n",
"\n",
" print(\"Thanks for playing!\")\n",
"\n",
"start_length = 5\n",
"await play_game(start_length)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -0,0 +1,781 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 31,
"id": "2c563ff0-2e2b-4441-9561-c3fae6bc1198",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: eng-to-ipa in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (0.0.2)\n",
"Requirement already satisfied: pypandoc in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (1.12)\n",
"Requirement already satisfied: nltk in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (3.8.1)\n",
"Requirement already satisfied: click in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (from nltk) (8.1.7)\n",
"Requirement already satisfied: joblib in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (from nltk) (1.3.2)\n",
"Requirement already satisfied: regex>=2021.8.3 in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (from nltk) (2023.10.3)\n",
"Requirement already satisfied: tqdm in /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages (from nltk) (4.65.0)\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"%pip install eng-to-ipa pypandoc nltk"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "2f271674-c027-43bc-9363-b5fe65b551ab",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'bət'"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import eng_to_ipa as ipa\n",
"text = \"\"\"\n",
"but\n",
"\"\"\"\n",
"ipa.convert(text)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "eaee99dd-b731-4f90-a7ee-5c77737fbfa1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'nɛd'"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ipa.convert(\"ned\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "955be4fe-1e7f-4c81-98cc-2805f35f93f6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"`ər ðoʊz ʃaɪˈreɪʒɪn ˈfʊtˌwɛr, ˈkaʊˌbɔɪ ʧæps, ər ˈʤɑli ˈərθˌmuvɪŋ ˈhɛdˌgɪr?`\n",
"Phonems that are not included in this text:\n",
"['ɑr', 'ɔr']...\n"
]
},
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import eng_to_ipa as ipa\n",
"\n",
"def phonemes_complete(text):\n",
" phonemes = ipa.convert(text)\n",
" \n",
" # CMU Pronuncing Dictionary uses 39 phonemes, \n",
" # http://www.speech.cs.cmu.edu/cgi-bin/cmudict\n",
" # \n",
" # /ʌ/ is transformed into /ə/ in this module, and /ə:/ to /ər/, /ɔ:/ to /ɔr/\n",
" # ... so there are still 39 phonemes in this module.\n",
" ipa_vowels = \"ɛ,æ,ə,ɑr,ər,ɪ,i,ɔ,ɔr,ʊ,u,aɪ,eɪ,aʊ,oʊ,ɔɪ\"\n",
" ipa_consonants = \"b,ʧ,d,ð,f,g,h,ʤ,k,l,m,n,ŋ,p,s,ʃ,t,θ,v,w,j,z,ʒ\"\n",
" ipa_all = ipa_vowels.split(\",\") + ipa_consonants.split(\",\") # convert all phonemes into a list\n",
" \n",
" complete = True\n",
" missing_phonemes = []\n",
" for i in ipa_all:\n",
" if i not in phonemes:\n",
" complete = False\n",
" missing_phonemes.append(i)\n",
" if complete:\n",
" print(\"The text includes all 38 phonemes...\")\n",
" else:\n",
" print(f\"Phonems that are not included in this text:\\n{missing_phonemes}...\")\n",
"\n",
" return complete\n",
"\n",
"\n",
"text = \"\"\"\n",
"`Are those shy Eurasian footwear, cowboy chaps, or jolly earthmoving headgear?`\n",
"\"\"\"\n",
"print(ipa.convert(text))\n",
"\n",
"phonemes_complete(text)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "80e03b1b-0695-4940-8cf9-04599fae6c4d",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"### (1) ###\n",
"Steve, an undergraduate at Carnegie Mellon University, where I was\n",
"teaching at the time, had been hired to come in several times a week and\n",
"work on a simple task: memorizing strings of numbers. I would read him a\n",
"series of digits at a rate of about one per second—“Seven . . . four\n",
". . . zero . . . one . . . one . . . nine . . .” and so on—and Steve\n",
"would try to remember them all and repeat them back to me once I was\n",
"done. One goal was simply to see how much Steve could improve with\n",
"practice. Now, after four of the hour-long sessions, he could reliably\n",
"recall seven-digit strings—the length of a local phone number—and he\n",
"usually got the eight-digit strings right, but nine digits was hit or\n",
"miss, and he had never managed to remember a ten-digit string at all.\n",
"And at this point, given his frustrating experience over the first few\n",
"sessions, he was pretty sure that he wasnt going to get any better.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (2) ###\n",
"In Steves case, there were several factors at work. First, he was\n",
"getting paid. But he could have always shown up for the sessions and not\n",
"tried particularly hard and still have gotten paid, so while that may\n",
"have been part of his motivation, it was certainly not all of it. Why\n",
"did he push himself so hard to improve? From talking to him, I believe\n",
"that a large part of it was that once he started to see improvement\n",
"after the first few sessions, he really enjoyed seeing his memory scores\n",
"go up. It felt good, and he wanted to keep feeling that way. Also, after\n",
"he reached a certain level in his memorization abilities, he became some\n",
"thing of a celebrity; stories about him appeared in newspapers and\n",
"magazines, and he made a number of appearances on television, including\n",
"the Today show. This provided another type of positive feedback.\n",
"Generally speaking, meaningful positive feedback is one of the crucial\n",
"factors in maintaining motivation. It can be internal feedback, such as\n",
"the satisfaction of seeing yourself improve at something, or external\n",
"feedback provided by others, but it makes a huge difference in whether a\n",
"person will be able to maintain the consistent effort necessary to\n",
"improve through purposeful practice.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (3) ###\n",
"What was the difference? Steve had succeeded by developing a collection\n",
"of mental structures—various mnemonics, many of them based on running\n",
"times, plus a system for keeping track of the order of the\n",
"mnemonics—that allowed him to use his long-term memory to sidestep the\n",
"usual limitations of short-term memory and remember long strings of\n",
"digits. When he heard the digits 907, for instance, he conceptualized\n",
"them as a pretty good two-mile time—9:07, or 9 minutes, 7 seconds—and\n",
"they were no longer random numbers that he had to commit to short-term\n",
"memory but rather something he was already familiar with. As we shall\n",
"see, the key to improved mental performance of almost any sort is the\n",
"development of mental structures that make it possible to avoid the\n",
"limitations of short-term memory and deal effectively with large amounts\n",
"of information at once. Steve had done this.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (4) ###\n",
"This time, instead of letting Dario figure it out for himself, we had\n",
"Steve teach Dario his method for encoding digits. With this head start,\n",
"Dario was able to improve much more quickly than Steve had, at least\n",
"initially. He got to twenty digits in significantly fewer training\n",
"sessions, but he began to slow down after that, and once he reached\n",
"thirty digits it seemed that he was no longer getting much benefit from\n",
"following Steves method, and his progress languished. At that point\n",
"Dario began developing his own version of Steves method. He came up\n",
"with slightly different ways of encoding the strings of three and four\n",
"digits, and, more importantly, he designed a significantly different\n",
"retrieval structure that worked much better for him. Still, when we\n",
"tested how Dario was memorizing the digits, we found that he was relying\n",
"on mental processes that were very much like the ones that Steve had\n",
"developed, using long-term memory to sidestep the limitations of\n",
"short-term memory. After several years of training, Dario would\n",
"eventually be able to remember more than one hundred digits, or about\n",
"twenty more than Steve. At this point Dario had become, like Steve\n",
"before him, the best at this particular skill that the world had ever\n",
"known.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (5) ###\n",
"Surprisingly, none of this improvement was caused by changes in the\n",
"eyes, which had the same stiffness and difficulty focusing as before.\n",
"Instead, the improvement was due to changes in the part of the brain\n",
"that interprets visual signals from the eye. Although the researchers\n",
"couldnt pinpoint exactly what those changes were, they believe that the\n",
"brain learned to “de-blur” images. Blurry images result from a\n",
"combination of two different weaknesses in vision—an inability to see\n",
"small details and difficulties in detecting differences in contrast—and\n",
"both of these issues can be helped by the image processing carried out\n",
"in the brain, in much the same way that image-processing software in a\n",
"computer or a camera can sharpen an image by such techniques as\n",
"manipulating the contrast. The researchers who carried out the study\n",
"believe that their training exercises taught the subjects brains to do\n",
"a better job of processing, which in turn allowed the subjects to\n",
"discern smaller details without any improvement in the signal from the\n",
"eyes.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (6) ###\n",
"The solution to the medical mystery described in the New York Times\n",
"required precisely that sort of approach: first come up with possible\n",
"explanations for why a patient should have both Horners syndrome and a\n",
"knifelike pain in the ear, and then analyze each possibility to find the\n",
"right answer. Stroke was one possibility, but the patient had nothing in\n",
"his background that indicated he might have had a stroke. Shingles could\n",
"also produce the patients two symptoms, but he had none of the usual\n",
"signs of shingles such as blisters or a rash. A third possibility was a\n",
"tear in the wall of the carotid artery, which runs right alongside the\n",
"nerve affected in Horners and also passes near the ear. A slight tear\n",
"in the artery can allow blood to leak through the inner walls of the\n",
"artery, causing a bulge in its outer wall, which can press on the nerve\n",
"to the face and, in rare cases, also press on a nerve to the ear. With\n",
"this in mind, the specialist asked the patient questions about lifting\n",
"weights and headaches. It is known that weightlifting can sometimes tear\n",
"the carotid artery, and such a tear would normally be associated with\n",
"some sort of headache or neck pain. When the patient answered yes, the\n",
"specialist decided that a tear in the carotid artery was the most likely\n",
"diagnosis. An MRI scan verified that diagnosis, and the patient was put\n",
"on blood thinners to prevent the formation of a blood clot and was told\n",
"to avoid any sort of exertion for the several months that it would take\n",
"the blood vessel to heal.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (7) ###\n",
"In particular, the researchers counted the number of mistakes a student\n",
"made in practicing a piece the first time and the second time and used\n",
"the improvement from the first time to the second as a measurement of\n",
"how effectively the student was practicing. They found a wide variation\n",
"in the amount of improvement. Of all the students they studied, a female\n",
"cornet player in her first year of learning the instrument made the most\n",
"mistakes: 11 per minute, on average, on the first times playing pieces\n",
"during practice sessions. On the second time through, she was still\n",
"making the same mistakes 70 percent of the time—noticing and correcting\n",
"only 3 out of every 10 mistakes. By contrast, the best first-year\n",
"player, a boy who was learning the saxophone, made only 1.4 mistakes per\n",
"minute on his first times through. And on the second times through, he\n",
"was making the same mistakes only 20 percent of the time—correcting 8\n",
"out of every 10 mistakes. The difference in the percentage of\n",
"corrections is particularly striking because the saxophone player was\n",
"already making many fewer mistakes, so he had much less room for\n",
"improvement.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (8) ###\n",
"Much of what Imreh did from that point on was figuring out how to\n",
"perform the piece so that it matched her artistic image. She began by\n",
"going through the entire piece and deciding exactly what fingering she\n",
"would use. Where possible, she would use the standard fingering that\n",
"pianists learn for particular series of notes, but there were places\n",
"that required departing from the standard because she wanted that\n",
"particular passage to sound a certain way. She would try out different\n",
"options, decide on one, and note it on the score. She also identified\n",
"different moments in the composition that Chaffin called “expressive\n",
"turning points”—for instance, a point where her playing would turn from\n",
"light and lively to more measured and serious. Later she would pick out\n",
"cues in the music—short passages before a turning point or a technically\n",
"difficult passage that, when she came to them, would serve as prompts to\n",
"get ready for what was coming. She also picked out various places where\n",
"she would add nuanced interpretations of the music.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (9) ###\n",
"These fields have several characteristics in common. First, there are\n",
"always objective ways—such as the win/loss of a chess competition or a\n",
"head-to-head race—or at least semiobjective ways—such as evaluation by\n",
"expert judges—to measure performance. This makes sense: if there is no\n",
"agreement on what good performance is and no way to tell what changes\n",
"would improve performance, then it is very difficult—often impossible—to\n",
"develop effective training methods. If you dont know for sure what\n",
"constitutes improvement, how can you develop methods to improve\n",
"performance? Second, these fields tend to be competitive enough that\n",
"performers have strong incentive to practice and improve. Third, these\n",
"fields are generally well established, with the relevant skills having\n",
"been developed over decades or even centuries. And fourth, these fields\n",
"have a subset of performers who also serve as teachers and coaches and\n",
"who, over time, have developed increasingly sophisticated sets of\n",
"training techniques that make possible the fields steadily increasing\n",
"skill level. The improvement of skills and the development of training\n",
"techniques move forward hand in hand, with new training techniques\n",
"leading to new levels of accomplishment and new accomplishments\n",
"generating innovations in training. (The virtuous circle again.) This\n",
"joint development of skills and training techniques has—up to now at\n",
"least—always been carried out through trial and error, with a fields\n",
"practitioners experimenting with various ways to improve, keeping what\n",
"works and discarding what doesnt.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (10) ###\n",
"Even in those areas where simulators or other techniques are already\n",
"being used to improve performance, their effectiveness could be greatly\n",
"increased by explicitly taking into account the lessons of deliberate\n",
"practice. As I mentioned, while simulators are used in a number of areas\n",
"of surgery, they could probably improve performance much more\n",
"effectively if their design took into account what is known—or what can\n",
"be learned—about the mental representations of the most effective\n",
"surgeons in a given specialty. It is also possible to improve simulator\n",
"training by determining which errors are most common and most dangerous\n",
"and by setting up the simulators to focus on the situations where those\n",
"errors happen. For example, during surgery it is not uncommon that some\n",
"interruption brings the procedure to a temporary halt, and if the\n",
"interruption occurs while someone is starting to check the blood type\n",
"prior to a blood transfusion, it is critical that the person continue\n",
"this checking when the activity resumes after the interruption. To help\n",
"surgeons and other members of the medical team gain experience in\n",
"dealing with such interruptions, a simulator supervisor can initiate an\n",
"interruption at exactly the critical point on various occasions. The\n",
"possibilities for such sorts of simulator practice are endless.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (11) ###\n",
"Surgery is different from most other areas of medicine in that many\n",
"problems are immediately apparent, such as a rupture of a blood vessel\n",
"or damage to tissue, and thus surgeons get immediate feedback about at\n",
"least some of their mistakes. In the postoperative surgery suite, the\n",
"patients condition is monitored carefully. Occasionally at this stage\n",
"there is bleeding or some other problem, and the patient must undergo\n",
"surgery to correct the problem. Such corrective surgeries also give\n",
"surgeons feedback about potentially avoidable problems. In the case of\n",
"surgeries to remove cancerous lesions, laboratory analysis of the\n",
"removed cancer tissue permits an analysis of whether all of the cancer\n",
"was successfully removed. Ideally, all of the removed tissue should have\n",
"some healthy tissue surrounding the cancer, and if the surgeon failed to\n",
"provide these “clean margins,” this provides yet another type of\n",
"feedback he or she can use when carrying out similar operations in the\n",
"future. In heart surgery, it is possible to test the repaired heart to\n",
"assess the success of the surgery and to determine, if the surgery was\n",
"not successful, what went wrong. Feedback like this is most likely the\n",
"reason that surgeons, unlike most other medical professionals, get\n",
"better as they gain experience.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (12) ###\n",
"A little over a decade ago, a group of Swedish researchers studied two\n",
"groups of people during and after a singing lesson. Half of the subjects\n",
"were professional singers, and the other half were amateurs. All had\n",
"been taking lessons for at least six months. The researchers meas­ured\n",
"the subjects in a variety of ways—an electrocardiogram, blood samples,\n",
"visual observations of the singers facial expressions, and so on—and\n",
"after the lesson they asked a number of questions that were designed to\n",
"determine the singers thought processes during the lesson. All of the\n",
"singers, both amateur and professional, felt more relaxed and energized\n",
"after the lesson than before, but only the amateurs reported feeling\n",
"elated afterward. The singing lesson had made the amateurs, but not the\n",
"professionals, happy. The reason for the difference lay in how the two\n",
"groups had approached the lesson. For the amateurs it was a time to\n",
"express themselves, to sing away their cares, and to feel the pure joy\n",
"of singing. For the professionals, the lesson was a time to concentrate\n",
"on such things as vocal technique and breath control in an effort to\n",
"improve their singing. There was focus but no joy.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (13) ###\n",
"This technique can be used in nearly any area: put together a group of\n",
"people all interested in the same thing—or join an existing group—and\n",
"use the groups camaraderie and shared goals as extra motivation in\n",
"reaching your own goals. This is the idea behind many social\n",
"organizations, from book clubs to chess clubs to community theaters, and\n",
"joining—or, if necessary, forming—such a group can be a tremendous way\n",
"for adults to maintain motivation. One thing to be careful about,\n",
"however, is to make sure that the other members of the group have\n",
"similar goals for improvement. If you join a bowling team because you\n",
"are trying to improve your bowling scores and the rest of the team is\n",
"mainly interested in having a good time, with little concern about\n",
"whether they win the league title, youre going to be frustrated, not\n",
"motivated. If youre a guitarist looking to improve enough to make a\n",
"career out of music, dont join a band whose members just want to get\n",
"together in someones garage on Saturday nights and jam. (But do keep in\n",
"mind that Junto would be a really good name for a rock band.)\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (14) ###\n",
"And we have one more bit of evidence. As of 2015 Thomas had been\n",
"competing for nine years in the high jump. He has been training under\n",
"coaches who know how to get the most out of an athlete. If he had indeed\n",
"been nothing but raw potential in 2006, we should have seen some\n",
"phenomenal growth from him since he started training rigorously. Indeed,\n",
"in the first year or so after he was discovered, people were predicting\n",
"that his innate talent meant that he must surely develop to the point\n",
"that he would break the world record, which is 2.45 meters, or 8.04\n",
"feet. But he hasnt come close. His best jump in competition came in\n",
"that 2007 World Championships in Athletics, when he cleared 2.35 meters.\n",
"He has approached that height a few times since, but has never equaled\n",
"it. In the 2014 Commonwealth Games he jumped 2.21 meters, less than he\n",
"was able to jump eight years earlier in the 2006 Commonwealth Games,\n",
"when he first made a name for himself. The most obvious conclusion to\n",
"draw from this is that when Thomas first competed in college in 2006, he\n",
"had already had a great deal of training—both high-jump training and\n",
"training to jump higher for dunking—so it was difficult for further\n",
"training to make a big difference. If he had indeed never trained, there\n",
"should have been much more improvement.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (15) ###\n",
"A number of researchers have suggested that there are, in general,\n",
"minimum requirements for performing capably in various areas. For\n",
"instance, it has been suggested that scientists in at least some fields\n",
"need an IQ score of around 110 to 120 to be successful, but that a\n",
"higher score doesnt confer any additional benefit. However, it is not\n",
"clear whether that IQ score of 110 is necessary to actually perform the\n",
"duties of a scientist or simply to get to the point where you can be\n",
"hired as a scientist. In many scientific fields you need to hold a Ph.D.\n",
"to be able to get research grants and conduct research, and getting a\n",
"Ph.D. requires four to six years of successful postgraduate academic\n",
"performance with a high level of writing skills and a large\n",
"vocabulary—which are essentially attributes measured by verbal\n",
"intelligence tests. Furthermore, most science Ph.D. programs demand\n",
"mathematical and logical thinking, which are measured by other\n",
"components of intelligence tests. When college graduates apply to\n",
"graduate school they have to take such tests as the Graduate Record\n",
"Examination (GRE), which measure these abilities, and only the\n",
"high-scoring students are accepted into science graduate programs. Thus,\n",
"from this perspective, it is not surprising that scientists generally\n",
"have IQ scores of 110 to 120 or above: without the ability to achieve\n",
"such scores, it is unlikely they would have ever had the chance to\n",
"become scientists in the first place.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (16) ###\n",
"There is a simple reason for this. If there are indeed genetic dif\n",
"ferences that play a role in influencing how well someone performs\n",
"(beyond the initial stages when someone is just learning a skill), they\n",
"arent likely to be something that affects the relevant skills\n",
"directly—a “music gene” or a “chess gene” or a “math gene.” No, I\n",
"suspect that such genetic differences—if they exist—are most likely to\n",
"manifest themselves through the necessary practice and efforts that go\n",
"into developing a skill. Perhaps, for example, some children are born\n",
"with a suite of genes that cause them to get more pleasure from drawing\n",
"or from making music. Then those children will be more likely to draw or\n",
"to make music than other children. If theyre put in art classes or\n",
"music classes, theyre likely to spend more time practicing because it\n",
"is more fun for them. They carry their sketchpads or guitars with them\n",
"wherever they go. And over time these children will become better\n",
"artists or better musicians than their peers—not because they are\n",
"innately more talented in the sense that they have some genes for\n",
"musical or artistic ability, but because something—perhaps\n",
"genetic—pushed them to practice and thus develop their skills to a\n",
"greater degree than their peers.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (17) ###\n",
"Most people—with the exception of science teachers—cannot correctly\n",
"explain what causes the changing seasons, even though it is taught in\n",
"science classes as early as elementary school. An amusing video taken at\n",
"a Harvard University commencement shows a string of recent graduates\n",
"confidently explaining that the seasons result from the Earth being\n",
"closer to the sun in summer and farther away in winter. This is\n",
"completely wrong, of course, since when it is summer in the Northern\n",
"Hemisphere, it is winter in the Southern Hemisphere. The real cause of\n",
"the seasons is the tilt of the Earth on its axis. But the point here is\n",
"not the ignorance of Harvard graduates but rather that so little of\n",
"science education gives students the basic mental representations they\n",
"need to think clearly about physical phenomena rather than teaching them\n",
"simply to plug numbers into an equation.\n",
"--------------------------------------------------------------------------------\n",
"\n",
"### (18) ###\n",
"I wish to thank Thomas Joiner of the Florida State University Department\n",
"of Psychology for introducing me to Anders Ericsson many years ago,\n",
"without which this book would have never happened, and to thank Anders\n",
"himself, one of the most generous people with ideas and insights whom I\n",
"have ever met. What I learned about him from deliberate practice has\n",
"immeasurably enriched my life, and that would have been true even if we\n",
"had never written the book. Id also like to thank Art Turock for\n",
"providing some fascinating examples of how deliberate practice can be\n",
"applied in the business world.\n",
"--------------------------------------------------------------------------------\n",
"18 paragraphs are phoneme complete.\n"
]
}
],
"source": [
"# check paragraphs\n",
"# %pip install eng_to_ipa pypandoc\n",
"\n",
"import eng_to_ipa as ipa\n",
"import pypandoc\n",
"\n",
"def phonemes_complete(text):\n",
" \n",
" phonemes = ipa.convert(text)\n",
" \n",
" # CMU Pronuncing Dictionary uses 39 phonemes, \n",
" # http://www.speech.cs.cmu.edu/cgi-bin/cmudict\n",
" # \n",
" # /ʌ/ is transformed into /ə/ in this module, and /ə:/ to /ər/, /ɔ:/ to /ɔr/\n",
" # ... so there are still 39 phonemes in this module.\n",
" ipa_vowels = \"ɛ,æ,ə,ɑr,ər,ɪ,i,ɔ,ɔr,ʊ,u,aɪ,eɪ,aʊ,oʊ,ɔɪ\"\n",
" ipa_consonants = \"b,ʧ,d,ð,f,g,h,ʤ,k,l,m,n,ŋ,p,s,ʃ,t,θ,v,w,j,z,ʒ\"\n",
" ipa_all = ipa_vowels.split(\",\") + ipa_consonants.split(\",\") # convert them into a list\n",
" \n",
" complete = True\n",
" missing_phonemes = []\n",
" for i in ipa_all:\n",
" if i not in phonemes:\n",
" complete = False\n",
" missing_phonemes.append(i)\n",
" # if complete:\n",
" # print(\"The text includes all 38 phonemes...\")\n",
" # else:\n",
" # print(f\"Phonems that are not included in this text:\\n{missing_phonemes}...\")\n",
"\n",
" return complete\n",
"\n",
"# Convert the ePub file to plain text using pypandoc.\n",
"epub_path = \"/Users/joker/Desktop/2023-best-3-books/Peak/Peak.epub\"\n",
"output_txt = \"peak.txt\"\n",
"\n",
"output = pypandoc.convert_file(epub_path, 'plain', outputfile=output_txt)\n",
"\n",
"# Read the converted text file.\n",
"with open(output_txt, 'r', encoding='utf-8') as file:\n",
" text = file.read()\n",
"\n",
"# Split the text into paragraphs.\n",
"paragraphs = text.split('\\n\\n') # Assuming paragraphs are separated by two newlines.\n",
"\n",
"i = 0\n",
"\n",
"for p in paragraphs:\n",
" if len(p) < 20: # skip titles...\n",
" continue\n",
" if phonemes_complete(p):\n",
" i += 1\n",
" print(\n",
"f'''\n",
"### ({i}) ###\n",
"{p}\n",
"{'-'*80}'''\n",
" )\n",
" \n",
"\n",
"print(f'{i} paragraphs are phoneme complete.')"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "41ff799e-f2ef-4ccb-b86b-b2e79794236d",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package punkt to /Users/joker/nltk_data...\n",
"[nltk_data] Package punkt is already up-to-date!\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 paragraphs are phoneme complete.\n"
]
}
],
"source": [
"# check sentences\n",
"# %pip install eng_to_ipa pypandoc nltk\n",
"\n",
"import eng_to_ipa as ipa\n",
"import pypandoc\n",
"\n",
"nltk.download('punkt')\n",
"\n",
"def phonemes_complete(text):\n",
" \n",
" phonemes = ipa.convert(text)\n",
" \n",
" # CMU Pronuncing Dictionary uses 39 phonemes, \n",
" # http://www.speech.cs.cmu.edu/cgi-bin/cmudict\n",
" # \n",
" # /ʌ/ is transformed into /ə/ in this module, and /ə:/ to /ər/, /ɔ:/ to /ɔr/\n",
" # ... so there are still 39 phonemes in this module.\n",
" ipa_vowels = \"ɛ,æ,ə,ɑr,ər,ɪ,i,ɔ,ɔr,ʊ,u,aɪ,eɪ,aʊ,oʊ,ɔɪ\"\n",
" ipa_consonants = \"b,ʧ,d,ð,f,g,h,ʤ,k,l,m,n,ŋ,p,s,ʃ,t,θ,v,w,j,z,ʒ\"\n",
" ipa_all = ipa_vowels.split(\",\") + ipa_consonants.split(\",\") # convert them into a list\n",
" \n",
" complete = True\n",
" missing_phonemes = []\n",
" for i in ipa_all:\n",
" if i not in phonemes:\n",
" complete = False\n",
" missing_phonemes.append(i)\n",
" # if complete:\n",
" # print(\"The text includes all 38 phonemes...\")\n",
" # else:\n",
" # print(f\"Phonems that are not included in this text:\\n{missing_phonemes}...\")\n",
"\n",
" return complete\n",
"\n",
"# Convert the ePub file to plain text using pypandoc.\n",
"epub_path = \"/Users/joker/Desktop/2023-best-3-books/Peak/Peak.epub\"\n",
"output_txt = \"peak.txt\"\n",
"\n",
"output = pypandoc.convert_file(epub_path, 'plain', outputfile=output_txt)\n",
"\n",
"# Read the converted text file.\n",
"with open(output_txt, 'r', encoding='utf-8') as file:\n",
" text = file.read()\n",
"\n",
"# Split the text into sentences.\n",
"sentences = nltk.tokenize.sent_tokenize(text)\n",
"\n",
"i = 0\n",
"\n",
"for s in sentences:\n",
" if len(s) < 20:\n",
" continue\n",
" if phonemes_complete(s):\n",
" i += 1\n",
" print(\n",
"f'''\n",
"### ({i}) ###\n",
"{s}\n",
"{'-'*80}\n",
"'''\n",
" )\n",
"\n",
"print(f'{i} paragraphs are phoneme complete.')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "449a1263-e938-4bfd-93bf-e70f205eda4c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"44\n"
]
}
],
"source": [
"phonemes = ['i:', 'ɪ', 'e', 'æ', 'ɑ:', 'ɒ', 'ɔ:', 'ʌ', 'ʊ', 'u:', 'ə', 'ɜːr', # Monophthongs\n",
" 'eɪ', 'aɪ', 'ɔɪ', 'aʊ', 'əʊ', 'ɪə', 'eə', 'ʊə', # Diphthongs\n",
" 'p', 'b', 't', 'd', 'k', 'g', 'f', 'v', 'θ', 'ð', 's', 'z', 'ʃ', 'ʒ', 'h', 'm', 'n', 'ŋ', 'l', 'r', 'w', 'j', 'tʃ', 'dʒ'] # Consonants\n",
"\n",
"print(len(phonemes))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a1c02bc0-b0bc-411e-9acc-7b9516eba977",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"39\n"
]
}
],
"source": [
"ipa_vowels = \"ɛ,æ,ə,ɑr,ər,ɪ,i,ɔ,ɔr,ʊ,u,aɪ,eɪ,aʊ,oʊ,ɔɪ\"\n",
"ipa_consonants = \"b,ʧ,d,ð,f,g,h,ʤ,k,l,m,n,ŋ,p,s,ʃ,t,θ,v,w,j,z,ʒ\"\n",
"ipa_all = ipa_vowels.split(\",\") + ipa_consonants.split(\",\") # convert them into a list\n",
"print(len(ipa_all))\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a390a961-d894-499c-b6c5-337c5c95dfd2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'ɪn ˌpɑˈtɪkjələr, ðə ˈrisərʧərz ˈkaʊntɪd ðə ˈnəmbər əv mɪˈsteɪks ə ˈstudənt meɪd ɪn ˈpræktɪsɪŋ ə pis ðə fərst taɪm ənd ðə ˈsɛkənd taɪm ənd juzd ðə ˌɪmˈpruvmənt frəm ðə fərst taɪm tɪ ðə ˈsɛkənd ɛz ə ˈmɛʒərmənt əv haʊ ˈifɛktɪvli ðə ˈstudənt wɑz ˈpræktɪsɪŋ. ðeɪ faʊnd ə waɪd ˌvɛriˈeɪʃən ɪn ðə əˈmaʊnt əv ˌɪmˈpruvmənt. əv ɔl ðə ˈstudənts ðeɪ ˈstədid, ə ˈfiˌmeɪl kɔrˈnɛt pleɪər ɪn hər fərst jɪr əv ˈlərnɪŋ ðə ˈɪnstrəmənt meɪd ðə moʊst mɪˈsteɪks: 11 pər ˈmɪnət, ɔn ˈævərɪʤ, ɔn ðə fərst taɪmz pleɪɪŋ ˈpisɪz ˈdʊrɪŋ ˈpræktɪs ˈsɛʃənz. ɔn ðə ˈsɛkənd taɪm θru, ʃi wɑz stɪl ˈmeɪkɪŋ ðə seɪm mɪˈsteɪks 70 pərˈsɛnt əv ðə time—noticing* ənd kərˈɛktɪŋ ˈoʊnli 3 aʊt əv ˈɛvəri 10 mɪˈsteɪks. baɪ ˈkɑntræst, ðə bɛst first-year* pleɪər, ə bɔɪ hu wɑz ˈlərnɪŋ ðə ˈsæksəˌfoʊn, meɪd ˈoʊnli 1.4* mɪˈsteɪks pər ˈmɪnət ɔn hɪz fərst taɪmz θru. ənd ɔn ðə ˈsɛkənd taɪmz θru, hi wɑz ˈmeɪkɪŋ ðə seɪm mɪˈsteɪks ˈoʊnli 20 pərˈsɛnt əv ðə time—correcting* 8 aʊt əv ˈɛvəri 10 mɪˈsteɪks. ðə ˈdɪfərəns ɪn ðə pərˈsɛnɪʤ əv kərˈɛkʃənz ɪz ˌpɑrˈtɪkjələrli ˈstraɪkɪŋ bɪˈkəz ðə ˈsæksəˌfoʊn pleɪər wɑz ɔˈrɛdi ˈmeɪkɪŋ ˈmɛni fjuər mɪˈsteɪks, soʊ hi hæd məʧ lɛs rum fər ˌɪmˈpruvmənt.'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ipa.convert('''\n",
"In particular, the researchers counted the number of mistakes a student\n",
"made in practicing a piece the first time and the second time and used\n",
"the improvement from the first time to the second as a measurement of\n",
"how effectively the student was practicing. They found a wide variation\n",
"in the amount of improvement. Of all the students they studied, a female\n",
"cornet player in her first year of learning the instrument made the most\n",
"mistakes: 11 per minute, on average, on the first times playing pieces\n",
"during practice sessions. On the second time through, she was still\n",
"making the same mistakes 70 percent of the time—noticing and correcting\n",
"only 3 out of every 10 mistakes. By contrast, the best first-year\n",
"player, a boy who was learning the saxophone, made only 1.4 mistakes per\n",
"minute on his first times through. And on the second times through, he\n",
"was making the same mistakes only 20 percent of the time—correcting 8\n",
"out of every 10 mistakes. The difference in the percentage of\n",
"corrections is particularly striking because the saxophone player was\n",
"already making many fewer mistakes, so he had much less room for\n",
"improvement.''')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9493ab9a-3fb5-42c9-be1d-1361cbde6114",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,161 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "b1f9b75a-f626-487d-857a-27717aa788bf",
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"!pip install -U pip setuptools wheel\n",
"!pip install -U spacy\n",
"!python -m spacy download en_core_web_sm"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f08b8fa4-59d5-4a51-8979-d29aa7915d32",
"metadata": {},
"outputs": [],
"source": [
"import spacy\n",
"from spacy import displacy\n",
"from pathlib import Path\n",
"\n",
"nlp = spacy.load('en_core_web_sm')\n",
"\n",
"def highlight_root(sentence):\n",
" doc = nlp(sentence)\n",
" \n",
" # Find the root of the sentence\n",
" root = None\n",
" for token in doc:\n",
" if token.dep_ == 'ROOT':\n",
" root = token\n",
" break\n",
" \n",
" # Highlight the root entity in the output\n",
" if root is not None:\n",
" root_start = root.idx\n",
" root_end = root.idx + len(root.text)\n",
" \n",
" text = [{\n",
" 'text': sentence,\n",
" 'ents': [{\n",
" 'start': root_start,\n",
" 'end': root_end,\n",
" 'label': '',\n",
" }],\n",
" 'title': None\n",
" }]\n",
" displacy.render(text, style='ent', manual=True)\n",
" else:\n",
" print(\"No root found.\")\n",
" return root"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2d58bfcd-a222-4da2-970c-72326c478861",
"metadata": {},
"outputs": [],
"source": [
"sentence = \"The spectacular aurora light displays that appear in Earths atmosphere around the north and south magnetic poles were once mysterious phenomena.\"\n",
"\n",
"doc = nlp(sentence)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "42ee6c93-b37d-494a-82d6-fb97a0f7acba",
"metadata": {},
"outputs": [],
"source": [
"# 标注每个单词的词性\n",
"\n",
"for token in doc:\n",
" print(token.text, token.pos_)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "517506f7-240a-4106-a62b-33dc7f86a391",
"metadata": {},
"outputs": [],
"source": [
"# 高亮标注主句的谓语动词\n",
"\n",
"root = highlight_root(sentence)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e6c5898f-4b0c-4e6e-81b5-0e8231c0e9cd",
"metadata": {},
"outputs": [],
"source": [
"# 主句的简化版本\n",
"\n",
"children = list(root.children)\n",
"children.insert(1, root)\n",
"simplified_setence = ' '.join(str(c) for c in children).strip().replace(\" .\", \".\").capitalize()\n",
"\n",
"print(simplified_setence)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "df071fdb-0618-453a-8482-c818fea98a0a",
"metadata": {},
"outputs": [],
"source": [
"# 图形化显示句子成分之间的依赖关系\n",
"\n",
"displacy.render(doc, style=\"dep\", options={'distance': 60})"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "273694e6-2e32-48e6-9317-5353612a8c89",
"metadata": {},
"outputs": [],
"source": [
"# 将图形保存为 dep-graph.svg 文件\n",
"\n",
"svg = displacy.render(doc, style=\"dep\", jupyter=False)\n",
"output_path = Path(\"dep-graph.svg\")\n",
"output_path.open(\"w\", encoding=\"utf-8\").write(svg)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}