We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
API doc examples are currently not easy to copy/paste
users may want to use a snippet from example directly, so making the notebooks copy-friendly is important

currently the code blocks have python shell prefix ">>>" in them. see http://gluon-nlp.mxnet.io/api/notes/data_api.html

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 #
3 # documentation build configuration file, created by
4 # sphinx-quickstart on Thu Jul 23 19:40:08 2015.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14 import sys
15 import os, subprocess
16 import shlex
17 import recommonmark
18 import sphinx_gallery
19 from recommonmark.parser import CommonMarkParser
20 from recommonmark.transform import AutoStructify
21 
22 # If extensions (or modules to document with autodoc) are in another directory,
23 # add these directories to sys.path here. If the directory is relative to the
24 # documentation root, use os.path.abspath to make it absolute, like shown here.
25 curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
26 sys.path.insert(0, os.path.join(curr_path, '..'))
27 
28 # -- General configuration ------------------------------------------------
29 
30 # Version information.
31 import gluonnlp as nlp
32 version = nlp.__version__
33 release = nlp.__version__
34 
35 # General information about the project.
36 project = u'gluonnlp'
37 author = u'%s developers' % project
38 copyright = u'2018, %s' % author
39 github_doc_root = 'http://gluon-nlp.mxnet.io/{}/'.format(str(version))
40 
41 # add markdown parser
42 CommonMarkParser.github_doc_root = github_doc_root
43 source_parsers = {
44     '.md': CommonMarkParser
45 }
46 
47 # Add any Sphinx extension module names here, as strings. They can be
48 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones
49 extensions = [
50     'sphinx.ext.autodoc',
51     'sphinx.ext.autosummary',
52     'sphinx.ext.intersphinx',
53     'sphinx.ext.viewcode',
54     'sphinx.ext.napoleon',
55     'sphinx.ext.mathjax',
56     'sphinx_gallery.gen_gallery',
57     'nbsphinx',
58 ]
59 
60 # Add any paths that contain templates here, relative to this directory.
61 templates_path = ['_templates']
62 
63 nbsphinx_kernel_name = 'python3'
64 nbsphinx_allow_errors = True
65 nbsphinx_timeout = 1200
66 html_sourcelink_suffix = ''
67 
68 nbsphinx_prolog = """
69 {% set paths = env.docname.split('/') %}
70 
71 .. only:: html
72 
73     :download:`[Download] <{{ "../%s.zip"|format(paths[1]) }}>`
74 """
75 
76 # The suffix(es) of source filenames.
77 # You can specify multiple suffix as a list of string:
78 # source_suffix = ['.rst', '.md']
79 source_suffix = ['.rst', '.ipynb', '.md']
80 
81 # The encoding of source files.
82 #source_encoding = 'utf-8-sig'
83 
84 # generate autosummary even if no references
85 autosummary_generate = True
86 
87 # The master toctree document.
88 master_doc = 'index'
89 
90 # The language for content autogenerated by Sphinx. Refer to documentation
91 # for a list of supported languages.
92 #
93 # This is also used if you do content translation via gettext catalogs.
94 # Usually you set "language" from the command line for these cases.
95 language = None
96 
97 # There are two options for replacing |today|: either, you set today to some
98 # non-false value, then it is used:
99 #today = ''
100 # Else, today_fmt is used as the format for a strftime call.
101 #today_fmt = '%B %d, %Y'
102 
103 # The name of an image file (relative to this directory) to place at the top
104 # of the sidebar.
105 html_logo = '_static/gluon_white.png'
106 
107 # The name of an image file (relative to this directory) to use as a favicon of
108 # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
109 # pixels large.
110 html_favicon = '_static/gluon_s2.png'
111 
112 # List of patterns, relative to source directory, that match files and
113 # directories to ignore when looking for source files.
114 exclude_patterns = ['_build', '**.ipynb_checkpoints']
115 
116 # The reST default role (used for this markup: `text`) to use for all
117 # documents.
118 #default_role = None
119 
120 # If true, '()' will be appended to :func: etc. cross-reference text.
121 #add_function_parentheses = True
122 
123 # If true, the current module name will be prepended to all description
124 # unit titles (such as .. function::).
125 #add_module_names = True
126 
127 # If true, sectionauthor and moduleauthor directives will be shown in the
128 # output. They are ignored by default.
129 #show_authors = False
130 
131 # The name of the Pygments (syntax highlighting) style to use.
132 pygments_style = 'sphinx'
133 
134 # A list of ignored prefixes for module index sorting.
135 #modindex_common_prefix = []
136 
137 # If true, keep warnings as "system message" paragraphs in the built documents.
138 #keep_warnings = False
139 
140 # If true, `todo` and `todoList` produce output, else they produce nothing.
141 todo_include_todos = False
142 
143 # -- Options for HTML output ----------------------------------------------
144 
145 # The theme is set by the make target
146 html_theme = os.environ.get('NNVM_THEME', 'rtd')
147 
148 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
149 # only import rtd theme and set it if want to build docs locally
150 if not on_rtd and html_theme == 'rtd':
151     import sphinx_rtd_theme
152     html_theme = 'sphinx_rtd_theme'
153     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
154 
155 # Add any paths that contain custom static files (such as style sheets) here,
156 # relative to this directory. They are copied after the builtin static files,
157 # so a file named "default.css" will overwrite the builtin "default.css".
158 html_static_path = ['_static']
159 
160 # Output file base name for HTML help builder.
161 htmlhelp_basename = project + 'doc'
162 
163 # -- Options for LaTeX output ---------------------------------------------
164 latex_elements = {
165 }
166 
167 # Grouping the document tree into LaTeX files. List of tuples
168 # (source start file, target name, title,
169 #  author, documentclass [howto, manual, or own class]).
170 latex_documents = [
171   (master_doc, '%s.tex' % project, project,
172    author, 'manual'),
173 ]
174 
175 # hook for doxygen
176 def run_doxygen(folder):
177     """Run the doxygen make command in the designated folder."""
178     try:
179         #retcode = subprocess.call("cd %s; make doc" % folder, shell=True)
180         retcode = subprocess.call("rm -rf _build/html/doxygen", shell=True)
181         retcode = subprocess.call("mkdir -p _build/html", shell=True)
182         retcode = subprocess.call("cp -rf doxygen/html _build/html/doxygen", shell=True)
183         if retcode < 0:
184             sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
185     except OSError as e:
186         sys.stderr.write("doxygen execution failed: %s" % e)
187 
188 intersphinx_mapping = {
189     'python': ('https://docs.python.org/{.major}'.format(sys.version_info), None),
190     'mxnet': ('https://mxnet.apache.org/', None),
191     'numpy': ('http://docs.scipy.org/doc/numpy/', None),
192     'scipy': ('http://docs.scipy.org/doc/scipy/reference', None),
193     'matplotlib': ('http://matplotlib.org/', None),
194     'nltk': ('http://www.nltk.org/', None),
195 }
196 
197 
198 from sphinx_gallery.sorting import ExplicitOrder
199 
200 examples_dirs = []
201 gallery_dirs = []
202 
203 subsection_order = ExplicitOrder([])
204 
205 def generate_doxygen_xml(app):
206     """Run the doxygen make commands if we're on the ReadTheDocs server"""
207     run_doxygen('..')
208 
209 def setup(app):
210     # Add hook for building doxygen xml when needed
211     # no c++ API for now
212     app.connect("builder-inited", generate_doxygen_xml)
213     app.add_config_value('recommonmark_config', {
214         'url_resolver': lambda url: github_doc_root + url,
215         'auto_doc_ref': True
216             }, True)
217     app.add_transform(AutoStructify)
218     app.add_javascript('google_analytics.js')
219 
220 
221 sphinx_gallery_conf = {
222     'backreferences_dir': 'gen_modules/backreferences',
223     'doc_module': ('gluonnlp', 'mxnet', 'numpy'),
224 'reference_url': {
225     'gluonnlp': None,
226     'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1'},
227     'examples_dirs': examples_dirs,
228     'gallery_dirs': gallery_dirs,
229     'subsection_order': subsection_order,
230     'find_mayavi_figures': False,
231     'filename_pattern': '.py',
232     'expected_failing_examples': []
233 }
234 
235 # Napoleon settings
236 napoleon_use_ivar = True
237 
238
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -216,6 +216,7 @@
             }, True)
     app.add_transform(AutoStructify)
     app.add_javascript('google_analytics.js')
+    app.add_javascript('copybutton.js')
 
 
 sphinx_gallery_conf = {

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -216,6 +216,7 @@\n             }, True)\n     app.add_transform(AutoStructify)\n     app.add_javascript('google_analytics.js')\n+    app.add_javascript('copybutton.js')\n \n \n sphinx_gallery_conf = {\n", "issue": "API doc examples are currently not easy to copy/paste\nusers may want to use a snippet from example directly, so making the notebooks copy-friendly is important\r\n\r\ncurrently the code blocks have python shell prefix \">>>\" in them. see http://gluon-nlp.mxnet.io/api/notes/data_api.html\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# documentation build configuration file, created by\n# sphinx-quickstart on Thu Jul 23 19:40:08 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\nimport sys\nimport os, subprocess\nimport shlex\nimport recommonmark\nimport sphinx_gallery\nfrom recommonmark.parser import CommonMarkParser\nfrom recommonmark.transform import AutoStructify\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\ncurr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))\nsys.path.insert(0, os.path.join(curr_path, '..'))\n\n# -- General configuration ------------------------------------------------\n\n# Version information.\nimport gluonnlp as nlp\nversion = nlp.__version__\nrelease = nlp.__version__\n\n# General information about the project.\nproject = u'gluonnlp'\nauthor = u'%s developers' % project\ncopyright = u'2018, %s' % author\ngithub_doc_root = 'http://gluon-nlp.mxnet.io/{}/'.format(str(version))\n\n# add markdown parser\nCommonMarkParser.github_doc_root = github_doc_root\nsource_parsers = {\n    '.md': CommonMarkParser\n}\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.viewcode',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.mathjax',\n    'sphinx_gallery.gen_gallery',\n    'nbsphinx',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\nnbsphinx_kernel_name = 'python3'\nnbsphinx_allow_errors = True\nnbsphinx_timeout = 1200\nhtml_sourcelink_suffix = ''\n\nnbsphinx_prolog = \"\"\"\n{% set paths = env.docname.split('/') %}\n\n.. only:: html\n\n    :download:`[Download] <{{ \"../%s.zip\"|format(paths[1]) }}>`\n\"\"\"\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = ['.rst', '.ipynb', '.md']\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# generate autosummary even if no references\nautosummary_generate = True\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = '_static/gluon_white.png'\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = '_static/gluon_s2.png'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build', '**.ipynb_checkpoints']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n#keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme is set by the make target\nhtml_theme = os.environ.get('NNVM_THEME', 'rtd')\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n# only import rtd theme and set it if want to build docs locally\nif not on_rtd and html_theme == 'rtd':\n    import sphinx_rtd_theme\n    html_theme = 'sphinx_rtd_theme'\n    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = project + 'doc'\n\n# -- Options for LaTeX output ---------------------------------------------\nlatex_elements = {\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n  (master_doc, '%s.tex' % project, project,\n   author, 'manual'),\n]\n\n# hook for doxygen\ndef run_doxygen(folder):\n    \"\"\"Run the doxygen make command in the designated folder.\"\"\"\n    try:\n        #retcode = subprocess.call(\"cd %s; make doc\" % folder, shell=True)\n        retcode = subprocess.call(\"rm -rf _build/html/doxygen\", shell=True)\n        retcode = subprocess.call(\"mkdir -p _build/html\", shell=True)\n        retcode = subprocess.call(\"cp -rf doxygen/html _build/html/doxygen\", shell=True)\n        if retcode < 0:\n            sys.stderr.write(\"doxygen terminated by signal %s\" % (-retcode))\n    except OSError as e:\n        sys.stderr.write(\"doxygen execution failed: %s\" % e)\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/{.major}'.format(sys.version_info), None),\n    'mxnet': ('https://mxnet.apache.org/', None),\n    'numpy': ('http://docs.scipy.org/doc/numpy/', None),\n    'scipy': ('http://docs.scipy.org/doc/scipy/reference', None),\n    'matplotlib': ('http://matplotlib.org/', None),\n    'nltk': ('http://www.nltk.org/', None),\n}\n\n\nfrom sphinx_gallery.sorting import ExplicitOrder\n\nexamples_dirs = []\ngallery_dirs = []\n\nsubsection_order = ExplicitOrder([])\n\ndef generate_doxygen_xml(app):\n    \"\"\"Run the doxygen make commands if we're on the ReadTheDocs server\"\"\"\n    run_doxygen('..')\n\ndef setup(app):\n    # Add hook for building doxygen xml when needed\n    # no c++ API for now\n    app.connect(\"builder-inited\", generate_doxygen_xml)\n    app.add_config_value('recommonmark_config', {\n        'url_resolver': lambda url: github_doc_root + url,\n        'auto_doc_ref': True\n            }, True)\n    app.add_transform(AutoStructify)\n    app.add_javascript('google_analytics.js')\n\n\nsphinx_gallery_conf = {\n    'backreferences_dir': 'gen_modules/backreferences',\n    'doc_module': ('gluonnlp', 'mxnet', 'numpy'),\n'reference_url': {\n    'gluonnlp': None,\n    'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1'},\n    'examples_dirs': examples_dirs,\n    'gallery_dirs': gallery_dirs,\n    'subsection_order': subsection_order,\n    'find_mayavi_figures': False,\n    'filename_pattern': '.py',\n    'expected_failing_examples': []\n}\n\n# Napoleon settings\nnapoleon_use_ivar = True\n\n", "path": "docs/conf.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# documentation build configuration file, created by\n# sphinx-quickstart on Thu Jul 23 19:40:08 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\nimport sys\nimport os, subprocess\nimport shlex\nimport recommonmark\nimport sphinx_gallery\nfrom recommonmark.parser import CommonMarkParser\nfrom recommonmark.transform import AutoStructify\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\ncurr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))\nsys.path.insert(0, os.path.join(curr_path, '..'))\n\n# -- General configuration ------------------------------------------------\n\n# Version information.\nimport gluonnlp as nlp\nversion = nlp.__version__\nrelease = nlp.__version__\n\n# General information about the project.\nproject = u'gluonnlp'\nauthor = u'%s developers' % project\ncopyright = u'2018, %s' % author\ngithub_doc_root = 'http://gluon-nlp.mxnet.io/{}/'.format(str(version))\n\n# add markdown parser\nCommonMarkParser.github_doc_root = github_doc_root\nsource_parsers = {\n    '.md': CommonMarkParser\n}\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.viewcode',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.mathjax',\n    'sphinx_gallery.gen_gallery',\n    'nbsphinx',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\nnbsphinx_kernel_name = 'python3'\nnbsphinx_allow_errors = True\nnbsphinx_timeout = 1200\nhtml_sourcelink_suffix = ''\n\nnbsphinx_prolog = \"\"\"\n{% set paths = env.docname.split('/') %}\n\n.. only:: html\n\n    :download:`[Download] <{{ \"../%s.zip\"|format(paths[1]) }}>`\n\"\"\"\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = ['.rst', '.ipynb', '.md']\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# generate autosummary even if no references\nautosummary_generate = True\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = '_static/gluon_white.png'\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = '_static/gluon_s2.png'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build', '**.ipynb_checkpoints']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n#keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme is set by the make target\nhtml_theme = os.environ.get('NNVM_THEME', 'rtd')\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n# only import rtd theme and set it if want to build docs locally\nif not on_rtd and html_theme == 'rtd':\n    import sphinx_rtd_theme\n    html_theme = 'sphinx_rtd_theme'\n    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = project + 'doc'\n\n# -- Options for LaTeX output ---------------------------------------------\nlatex_elements = {\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n  (master_doc, '%s.tex' % project, project,\n   author, 'manual'),\n]\n\n# hook for doxygen\ndef run_doxygen(folder):\n    \"\"\"Run the doxygen make command in the designated folder.\"\"\"\n    try:\n        #retcode = subprocess.call(\"cd %s; make doc\" % folder, shell=True)\n        retcode = subprocess.call(\"rm -rf _build/html/doxygen\", shell=True)\n        retcode = subprocess.call(\"mkdir -p _build/html\", shell=True)\n        retcode = subprocess.call(\"cp -rf doxygen/html _build/html/doxygen\", shell=True)\n        if retcode < 0:\n            sys.stderr.write(\"doxygen terminated by signal %s\" % (-retcode))\n    except OSError as e:\n        sys.stderr.write(\"doxygen execution failed: %s\" % e)\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/{.major}'.format(sys.version_info), None),\n    'mxnet': ('https://mxnet.apache.org/', None),\n    'numpy': ('http://docs.scipy.org/doc/numpy/', None),\n    'scipy': ('http://docs.scipy.org/doc/scipy/reference', None),\n    'matplotlib': ('http://matplotlib.org/', None),\n    'nltk': ('http://www.nltk.org/', None),\n}\n\n\nfrom sphinx_gallery.sorting import ExplicitOrder\n\nexamples_dirs = []\ngallery_dirs = []\n\nsubsection_order = ExplicitOrder([])\n\ndef generate_doxygen_xml(app):\n    \"\"\"Run the doxygen make commands if we're on the ReadTheDocs server\"\"\"\n    run_doxygen('..')\n\ndef setup(app):\n    # Add hook for building doxygen xml when needed\n    # no c++ API for now\n    app.connect(\"builder-inited\", generate_doxygen_xml)\n    app.add_config_value('recommonmark_config', {\n        'url_resolver': lambda url: github_doc_root + url,\n        'auto_doc_ref': True\n            }, True)\n    app.add_transform(AutoStructify)\n    app.add_javascript('google_analytics.js')\n    app.add_javascript('copybutton.js')\n\n\nsphinx_gallery_conf = {\n    'backreferences_dir': 'gen_modules/backreferences',\n    'doc_module': ('gluonnlp', 'mxnet', 'numpy'),\n'reference_url': {\n    'gluonnlp': None,\n    'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1'},\n    'examples_dirs': examples_dirs,\n    'gallery_dirs': gallery_dirs,\n    'subsection_order': subsection_order,\n    'find_mayavi_figures': False,\n    'filename_pattern': '.py',\n    'expected_failing_examples': []\n}\n\n# Napoleon settings\nnapoleon_use_ivar = True\n\n", "path": "docs/conf.py"}]}