├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── extension
├── icons
│ ├── icon128.png
│ ├── icon16.png
│ ├── icon19.png
│ └── icon48.png
├── js
│ └── jquery
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── bower.json
│ │ ├── component.json
│ │ ├── composer.json
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ └── package.json
├── manifest.json
└── src
│ ├── bg
│ └── background.html
│ └── browser_action
│ ├── browser_action.html
│ ├── getPagesSource.js
│ ├── main.css
│ └── popup.js
├── functions
├── main.py
└── requirements.txt
├── logos.png
└── stackoverflow-classifier.ipynb
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | We'd love to accept your patches and contributions to this project. There are
4 | just a few small guidelines you need to follow.
5 |
6 | ## Contributor License Agreement
7 |
8 | Contributions to this project must be accompanied by a Contributor License
9 | Agreement. You (or your employer) retain the copyright to your contribution;
10 | this simply gives us permission to use and redistribute your contributions as
11 | part of the project. Head over to to see
12 | your current agreements on file or to sign a new one.
13 |
14 | You generally only need to submit a CLA once, so if you've already submitted one
15 | (even if it was for a different project), you probably don't need to do it
16 | again.
17 |
18 | ## Code reviews
19 |
20 | All submissions, including submissions by project members, require review. We
21 | use GitHub pull requests for this purpose. Consult
22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
23 | information on using pull requests.
24 |
25 | ## Community Guidelines
26 |
27 | This project follows
28 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Text classification model interpretability demo
2 | ==========================
3 |
4 | **This code is provided as example only. It is provided without guarantee or level of support.** This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
5 |
6 | This is the demo I presented at my [Cloud Next '19 talk](https://www.youtube.com/watch?v=OHIEZ-Scek8) with [Yufeng](https://twitter.com/yufengg). It shows how to build a bag of words text classification model to tag ML-related Stack Overflow questions, deploy the model to [AI Platform](https://cloud.google.com/ai-platform/), and interpret it's predictions with [SHAP](https://github.com/slundberg/shap). For more details on the SHAP piece of this demo, see my [blog post](https://sararobinson.dev/2019/04/23/interpret-bag-of-words-models-shap.html).
7 |
8 | 
9 |
10 | ## Running the notebook
11 |
12 | To run the notebook, create a new [Colab notebook](http://colab.research.google.com) and import the `stackoverflow-classifier.ipynb` file in this repo. The CSV we used for the Stack Overflow training data is public. You'll need to create a Google Cloud project to deploy the model. If you don't want to do that, you'll still be able to run the SHAP code at the end of the notebook.
13 |
14 | Got any feedback? File an issue or ping me on Twitter at [@SRobTweets](https://twitter.com/srobtweets)
15 |
16 | **This is not an officially supported Google product.**
--------------------------------------------------------------------------------
/extension/icons/icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/ai-platform-text-classifier-shap/fd089d0734e4298e23ee164651c8d7220985b531/extension/icons/icon128.png
--------------------------------------------------------------------------------
/extension/icons/icon16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/ai-platform-text-classifier-shap/fd089d0734e4298e23ee164651c8d7220985b531/extension/icons/icon16.png
--------------------------------------------------------------------------------
/extension/icons/icon19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/ai-platform-text-classifier-shap/fd089d0734e4298e23ee164651c8d7220985b531/extension/icons/icon19.png
--------------------------------------------------------------------------------
/extension/icons/icon48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/ai-platform-text-classifier-shap/fd089d0734e4298e23ee164651c8d7220985b531/extension/icons/icon48.png
--------------------------------------------------------------------------------
/extension/js/jquery/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | jquery-migrate.js
3 | jquery-migrate.min.js
4 |
--------------------------------------------------------------------------------
/extension/js/jquery/README.md:
--------------------------------------------------------------------------------
1 | jQuery Component
2 | ================
3 |
4 | Shim repository for jQuery.
5 |
--------------------------------------------------------------------------------
/extension/js/jquery/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.0.0",
4 | "description": "jQuery component",
5 | "keywords": [
6 | "jquery",
7 | "component"
8 | ],
9 | "scripts": [
10 | "jquery.js"
11 | ],
12 | "license": "MIT"
13 | }
14 |
--------------------------------------------------------------------------------
/extension/js/jquery/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.0.0",
4 | "description": "jQuery component",
5 | "keywords": [
6 | "jquery",
7 | "component"
8 | ],
9 | "scripts": [
10 | "jquery.js"
11 | ],
12 | "license": "MIT",
13 | "gitHead": "46f8412bd1bb9b1b30b5b0eb88560e2d4196509c",
14 | "readme": "jQuery Component\n================\n\nShim repository for jQuery.\n",
15 | "readmeFilename": "README.md",
16 | "_id": "jquery@2.0.0",
17 | "repository": {
18 | "type": "git",
19 | "url": "git://github.com/components/jquery.git"
20 | }
21 | }
--------------------------------------------------------------------------------
/extension/js/jquery/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "components/jquery",
3 | "description": "jQuery JavaScript Library",
4 | "type": "component",
5 | "homepage": "http://jquery.com",
6 | "license": "MIT",
7 | "support": {
8 | "irc": "irc://irc.freenode.org/jquery",
9 | "issues": "http://bugs.jquery.com",
10 | "forum": "http://forum.jquery.com",
11 | "wiki": "http://docs.jquery.com/",
12 | "source": "https://github.com/jquery/jquery"
13 | },
14 | "authors": [
15 | {
16 | "name": "John Resig",
17 | "email": "jeresig@gmail.com"
18 | }
19 | ],
20 | "require": {
21 | "robloach/component-installer": "*"
22 | },
23 | "extra": {
24 | "component": {
25 | "scripts": [
26 | "jquery.js"
27 | ]
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extension/js/jquery/jquery.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v2.0.0 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
2 | //@ sourceMappingURL=jquery.min.map
3 | */
4 | (function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],f="2.0.0",p=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=f.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return p.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,f,p,h,d,g,m,y="sizzle"+-new Date,v=e.document,b={},w=0,T=0,C=ot(),k=ot(),N=ot(),E=!1,S=function(){return 0},j=typeof undefined,D=1<<31,A=[],L=A.pop,q=A.push,H=A.push,O=A.slice,F=A.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=M.replace("w","w#"),$="\\["+R+"*("+M+")"+R+"*(?:([*^$|!~]?=)"+R+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+R+"*\\]",B=":("+M+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",I=RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=RegExp("^"+R+"*,"+R+"*"),_=RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),X=RegExp(R+"*[+~]"),U=RegExp("="+R+"*([^\\]'\"]*)"+R+"*\\]","g"),Y=RegExp(B),V=RegExp("^"+W+"$"),G={ID:RegExp("^#("+M+")"),CLASS:RegExp("^\\.("+M+")"),TAG:RegExp("^("+M.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+B),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),"boolean":RegExp("^(?:"+P+")$","i"),needsContext:RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,et=/'|\\/g,tt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,nt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{H.apply(A=O.call(v.childNodes),v.childNodes),A[v.childNodes.length].nodeType}catch(rt){H={apply:A.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function it(e){return J.test(e+"")}function ot(){var e,t=[];return e=function(n,i){return t.push(n+=" ")>r.cacheLength&&delete e[t.shift()],e[n]=i}}function st(e){return e[y]=!0,e}function at(e){var t=c.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ut(e,t,n,r){var i,o,s,a,u,f,d,g,x,w;if((t?t.ownerDocument||t:v)!==c&&l(t),t=t||c,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(p&&!r){if(i=Q.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&m(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return H.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&b.getElementsByClassName&&t.getElementsByClassName)return H.apply(n,t.getElementsByClassName(s)),n}if(b.qsa&&(!h||!h.test(e))){if(g=d=y,x=t,w=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(d=t.getAttribute("id"))?g=d.replace(et,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=f.length;while(u--)f[u]=g+mt(f[u]);x=X.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return H.apply(n,x.querySelectorAll(w)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(I,"$1"),t,n,r)}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},l=ut.setDocument=function(e){var t=e?e.ownerDocument||e:v;return t!==c&&9===t.nodeType&&t.documentElement?(c=t,f=t.documentElement,p=!o(t),b.getElementsByTagName=at(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),b.attributes=at(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByClassName=at(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),b.sortDetached=at(function(e){return 1&e.compareDocumentPosition(c.createElement("div"))}),b.getById=at(function(e){return f.appendChild(e).id=y,!t.getElementsByName||!t.getElementsByName(y).length}),b.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){return e.getAttribute("id")===t}}):(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n?n.id===e||typeof n.getAttributeNode!==j&&n.getAttributeNode("id").value===e?[n]:undefined:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=b.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=b.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&p?t.getElementsByClassName(e):undefined},d=[],h=[],(b.qsa=it(t.querySelectorAll))&&(at(function(e){e.innerHTML=" ",e.querySelectorAll("[selected]").length||h.push("\\["+R+"*(?:value|"+P+")"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){var t=c.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&h.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(b.matchesSelector=it(g=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){b.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),d.push("!=",B)}),h=h.length&&RegExp(h.join("|")),d=d.length&&RegExp(d.join("|")),m=it(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,n){if(e===n)return E=!0,0;var r=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);return r?1&r||!b.sortDetached&&n.compareDocumentPosition(e)===r?e===t||m(v,e)?-1:n===t||m(v,n)?1:u?F.call(u,e)-F.call(u,n):0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],l=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:u?F.call(u,e)-F.call(u,n):0;if(o===s)return lt(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)l.unshift(r);while(a[i]===l[i])i++;return i?lt(a[i],l[i]):a[i]===v?-1:l[i]===v?1:0},c):c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c&&l(e),t=t.replace(U,"='$1']"),!(!b.matchesSelector||!p||d&&d.test(t)||h&&h.test(t)))try{var n=g.call(e,t);if(n||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),m(e,t)},ut.attr=function(e,t){(e.ownerDocument||e)!==c&&l(e);var n=r.attrHandle[t.toLowerCase()],i=n&&n(e,t,!p);return i===undefined?b.attributes||!p?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null:i},ut.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=0,i=0;if(E=!b.detectDuplicates,u=!b.sortStable&&e.slice(0),e.sort(S),E){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return e};function lt(e,t){var n=t&&e,r=n&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ct(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}function ft(e,t,n){var r;return n?undefined:r=e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return st(function(t){return t=+t,st(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}i=ut.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r];r++)n+=i(t);return n},r=ut.selectors={cacheLength:50,createPseudo:st,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(tt,nt),e[3]=(e[4]||e[5]||"").replace(tt,nt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return G.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&Y.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(tt,nt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){f=t;while(f=f[g])if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[y]||(m[y]={}),l=c[e]||[],h=l[0]===w&&l[1],p=l[0]===w&&l[2],f=h&&m.childNodes[h];while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if(1===f.nodeType&&++p&&f===t){c[e]=[w,h,p];break}}else if(x&&(l=(t[y]||(t[y]={}))[e])&&l[0]===w)p=l[1];else while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if((a?f.nodeName.toLowerCase()===v:1===f.nodeType)&&++p&&(x&&((f[y]||(f[y]={}))[e]=[w,p]),f===t))break;return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var r,o=i(e,t),s=o.length;while(s--)r=F.call(e,o[s]),e[r]=!(n[r]=o[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:st(function(e){var t=[],n=[],r=s(e.replace(I,"$1"));return r[y]?st(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:st(function(e){return V.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(tt,nt).toLowerCase(),function(t){var n;do if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:dt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ht(t);function gt(e,t){var n,i,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=r.preFilter;while(a){(!n||(i=z.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=_.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(I," ")}),a=a.slice(n.length));for(s in r.filter)!(i=G[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ut.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,r){var i=t.dir,o=r&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,r,a){var u,l,c,f=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,r,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[y]||(t[y]={}),(l=c[i])&&l[0]===f){if((u=l[1])===!0||u===n)return u===!0}else if(l=c[i]=[f],l[1]=e(t,r,a)||n,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[y]&&(r=bt(r)),i&&!i[y]&&(i=bt(i,o)),st(function(o,s,a,u){var l,c,f,p=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,p,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(f=l[c])&&(y[h[c]]=!(m[h[c]]=f))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(f=y[c])&&l.push(m[c]=f);i(null,y=[],l,u)}c=y.length;while(c--)(f=y[c])&&(l=i?F.call(o,f):p[c])>-1&&(o[l]=!(s[l]=f))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):H.apply(s,y)})}function wt(e){var t,n,i,o=e.length,s=r.relative[e[0].type],u=s||r.relative[" "],l=s?1:0,c=yt(function(e){return e===t},u,!0),f=yt(function(e){return F.call(t,e)>-1},u,!0),p=[function(e,n,r){return!s&&(r||n!==a)||((t=n).nodeType?c(e,n,r):f(e,n,r))}];for(;o>l;l++)if(n=r.relative[e[l].type])p=[yt(vt(p),n)];else{if(n=r.filter[e[l].type].apply(null,e[l].matches),n[y]){for(i=++l;o>i;i++)if(r.relative[e[i].type])break;return bt(l>1&&vt(p),l>1&&mt(e.slice(0,l-1)).replace(I,"$1"),n,i>l&&wt(e.slice(l,i)),o>i&&wt(e=e.slice(i)),o>i&&mt(e))}p.push(n)}return vt(p)}function Tt(e,t){var i=0,o=t.length>0,s=e.length>0,u=function(u,l,f,p,h){var d,g,m,y=[],v=0,x="0",b=u&&[],T=null!=h,C=a,k=u||s&&r.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(a=l!==c&&l,n=i);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,f)){p.push(d);break}T&&(w=N,n=++i)}o&&((d=!m&&d)&&v--,u&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,f);if(u){if(v>0)while(x--)b[x]||y[x]||(y[x]=L.call(p));y=xt(y)}H.apply(p,y),T&&!u&&y.length>0&&v+t.length>1&&ut.uniqueSort(p)}return T&&(w=N,a=C),b};return o?st(u):u}s=ut.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[y]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ut(e,t[r],n);return n}function kt(e,t,n,i){var o,a,u,l,c,f=gt(e);if(!i&&1===f.length){if(a=f[0]=f[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&p&&r.relative[a[1].type]){if(t=(r.find.ID(u.matches[0].replace(tt,nt),t)||[])[0],!t)return n;e=e.slice(a.shift().value.length)}o=G.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],r.relative[l=u.type])break;if((c=r.find[l])&&(i=c(u.matches[0].replace(tt,nt),X.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=i.length&&mt(a),!e)return H.apply(n,i),n;break}}}return s(e,f)(i,t,!p,n,X.test(e)),n}r.pseudos.nth=r.pseudos.eq;function Nt(){}Nt.prototype=r.filters=r.pseudos,r.setFilters=new Nt,b.sortStable=y.split("").sort(S).join("")===y,l(),[0,0].sort(S),b.detectDuplicates=E,at(function(e){if(e.innerHTML=" ","#"!==e.firstChild.getAttribute("href")){var t="type|href|height|width".split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ft}}),at(function(e){if(null!=e.getAttribute("disabled")){var t=P.split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ct}}),x.find=ut,x.expr=ut.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ut.uniqueSort,x.text=ut.getText,x.isXMLDoc=ut.isXML,x.contains=ut.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(f){for(t=e.memory&&f,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(f[0],f[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!a||n&&!u||(r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))this.cache[i]=t;else for(r in t)o[r]=t[r]},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){return t===undefined||t&&"string"==typeof t&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i=this.key(e),o=this.cache[i];if(t===undefined)this.cache[i]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):t in o?r=[t]:(r=x.camelCase(t),r=r in o?[r]:r.match(w)||[]),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){delete this.cache[this.key(e)]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.substring(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);
5 | x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,s=0,a=x(this),u=t,l=e.match(w)||[];while(o=l[s++])u=i?u:!a.hasClass(o),a[u?"addClass":"removeClass"](o)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i,o=x(this);1===this.nodeType&&(i=r?e.call(this,n,o.val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.boolean.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.boolean.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.boolean.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,f,p,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(p=x.event.special[d]||{},d=(o?p.delegateType:p.bindType)||d,p=x.event.special[d]||{},f=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,p.setup&&p.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,f):h.push(f),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){f=x.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,p=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,f,p,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),p=x.event.special[d]||{},i||!p.trigger||p.trigger.apply(r,n)!==!1)){if(!i&&!p.noBubble&&!x.isWindow(r)){for(l=p.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:p.bindType||d,f=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),f&&f.apply(a,n),f=c&&a[c],f&&x.acceptData(a)&&f.apply&&f.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||p._default&&p._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return 3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=x.expr.match.needsContext,Q={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return t=this,this.pushStack(x(e).filter(function(){for(r=0;i>r;r++)if(x.contains(t[r],this))return!0}));for(n=[],r=0;i>r;r++)x.find(e,this[r],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(Z(this,e||[],!0))},filter:function(e){return this.pushStack(Z(this,e||[],!1))},is:function(e){return!!e&&("string"==typeof e?J.test(e)?x(e,this.context).index(this[0])>=0:x.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],s=J.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function K(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return K(e,"nextSibling")},prev:function(e){return K(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(Q[e]||x.unique(i),"p"===e[0]&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function Z(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,tt=/<([\w:]+)/,nt=/<|?\w+;/,rt=/<(?:script|style|link)/i,it=/^(?:checkbox|radio)$/i,ot=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^$|\/(?:java|ecma)script/i,at=/^true\/(.*)/,ut=/^\s*\s*$/g,lt={option:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],_default:[0,"",""]};lt.optgroup=lt.option,lt.tbody=lt.tfoot=lt.colgroup=lt.caption=lt.col=lt.thead,lt.th=lt.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(gt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&ht(gt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(gt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!lt[(tt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(et,"<$1>$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(gt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=p.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,f=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&ot.test(d))return this.each(function(r){var i=f.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(gt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,gt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,pt),l=0;s>l;l++)a=o[l],st.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(ut,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=gt(a),o=gt(e),r=0,i=o.length;i>r;r++)mt(o[r],s[r]);if(t)if(n)for(o=o||gt(e),s=s||gt(a),r=0,i=o.length;i>r;r++)dt(o[r],s[r]);else dt(e,a);return s=gt(a,"script"),s.length>0&&ht(s,!u&>(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,f=e.length,p=t.createDocumentFragment(),h=[];for(;f>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(nt.test(i)){o=o||p.appendChild(t.createElement("div")),s=(tt.exec(i)||["",""])[1].toLowerCase(),a=lt[s]||lt._default,o.innerHTML=a[1]+i.replace(et,"<$1>$2>")+a[2],l=a[0];while(l--)o=o.firstChild;x.merge(h,o.childNodes),o=p.firstChild,o.textContent=""}else h.push(t.createTextNode(i));p.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=gt(p.appendChild(i),"script"),u&&ht(o),n)){l=0;while(i=o[l++])st.test(i.type||"")&&n.push(i)}return p},cleanData:function(e){var t,n,r,i=e.length,o=0,s=x.event.special;for(;i>o;o++){if(n=e[o],x.acceptData(n)&&(t=q.access(n)))for(r in t.events)s[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);L.discard(n),q.discard(n)}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"text",async:!1,global:!1,success:x.globalEval})}});function ct(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function pt(e){var t=at.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ht(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function dt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=x.extend({},o),l=o.events,q.set(t,s),l)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function gt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function mt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&it.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var yt,vt,xt=/^(none|table(?!-c[ea]).+)/,bt=/^margin/,wt=RegExp("^("+b+")(.*)$","i"),Tt=RegExp("^("+b+")(?!px)[a-z%]+$","i"),Ct=RegExp("^([+-])=("+b+")","i"),kt={BODY:"block"},Nt={position:"absolute",visibility:"hidden",display:"block"},Et={letterSpacing:0,fontWeight:400},St=["Top","Right","Bottom","Left"],jt=["Webkit","O","Moz","ms"];function Dt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=jt.length;while(i--)if(t=jt[i]+n,t in e)return t;return r}function At(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function Lt(t){return e.getComputedStyle(t,null)}function qt(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&At(r)&&(o[s]=q.access(r,"olddisplay",Pt(r.nodeName)))):o[s]||(i=At(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=Lt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return qt(this,!0)},hide:function(){return qt(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:At(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=yt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=Dt(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=Ct.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=Dt(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=yt(e,t,r)),"normal"===i&&t in Et&&(i=Et[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),yt=function(e,t,n){var r,i,o,s=n||Lt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Tt.test(a)&&bt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ht(e,t,n){var r=wt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ot(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+St[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+St[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+St[o]+"Width",!0,i))):(s+=x.css(e,"padding"+St[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+St[o]+"Width",!0,i)));return s}function Ft(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Lt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=yt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Tt.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ot(e,t,n||(s?"border":"content"),r,o)+"px"}function Pt(e){var t=o,n=kt[e];return n||(n=Rt(e,t),"none"!==n&&n||(vt=(vt||x("").css("cssText","display:block !important")).appendTo(t.documentElement),t=(vt[0].contentWindow||vt[0].contentDocument).document,t.write(""),t.close(),n=Rt(e,t),vt.detach()),kt[e]=n),n}function Rt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&xt.test(x.css(e,"display"))?x.swap(e,Nt,function(){return Ft(e,t,r)}):Ft(e,t,r):undefined},set:function(e,n,r){var i=r&&Lt(e);return Ht(e,n,r?Ot(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},yt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=yt(e,t),Tt.test(n)?x(e).position()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+St[r]+t]=o[r]||o[r-2]||o[0];return i}},bt.test(e)||(x.cssHooks[e+t].set=Ht)});var Mt=/%20/g,Wt=/\[\]$/,$t=/\r?\n/g,Bt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&It.test(this.nodeName)&&!Bt.test(e)&&(this.checked||!it.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace($t,"\r\n")}}):{name:t.name,value:n.replace($t,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)zt(n,e[n],t,i);return r.join("&").replace(Mt,"+")};function zt(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||Wt.test(e)?r(e,i):zt(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)zt(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var _t,Xt,Ut=x.now(),Yt=/\?/,Vt=/#.*$/,Gt=/([?&])_=[^&]*/,Jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Qt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Kt=/^(?:GET|HEAD)$/,Zt=/^\/\//,en=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,tn=x.fn.load,nn={},rn={},on="*/".concat("*");try{Xt=i.href}catch(sn){Xt=o.createElement("a"),Xt.href="",Xt=Xt.href}_t=en.exec(Xt.toLowerCase())||[];function an(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];
6 | if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function un(e,t,n,r){var i={},o=e===rn;function s(a){var u;return i[a]=!0,x.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):undefined:(t.dataTypes.unshift(l),s(l),!1)}),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function ln(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,t,n){if("string"!=typeof e&&tn)return tn.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),s.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?x("").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Xt,type:"GET",isLocal:Qt.test(_t[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":on,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ln(ln(e,x.ajaxSettings),t):ln(x.ajaxSettings,e)},ajaxPrefilter:an(nn),ajaxTransport:an(rn),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),f=c.context||c,p=c.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Jt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Xt)+"").replace(Vt,"").replace(Zt,_t[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=en.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===_t[1]&&a[2]===_t[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(_t[3]||("http:"===_t[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),un(nn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Kt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Yt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Gt.test(r)?r.replace(Gt,"$1_="+Ut++):r+(Yt.test(r)?"&":"?")+"_="+Ut++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+on+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(f,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=un(rn,c,t,T)){T.readyState=1,u&&p.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=cn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(f,[m,C,T]):h.rejectWith(f,[T,C,y]),T.statusCode(g),g=undefined,u&&p.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(f,[T,C]),u&&(p.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function cn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("
5 |
6 |
7 |
8 |
9 |
10 | Get suggested Stack Overflow tags
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/extension/src/browser_action/getPagesSource.js:
--------------------------------------------------------------------------------
1 | function DOMtoString(document_root) {
2 | let html;
3 |
4 | // question draft
5 | if(window.location.href.indexOf("questions/ask") > -1) {
6 | html = document_root.querySelector('#title').value + ' ' + document_root.querySelector(".wmd-preview").innerHTML;
7 |
8 | // published question
9 | } else if (window.location.href.indexOf("stackoverflow.com" > -1)) {
10 | html = document_root.querySelector(".post-text").innerHTML;
11 | } else {
12 | html = "please go to stackoverflow web page to ask a question"
13 | }
14 | return html;
15 | }
16 |
17 | chrome.runtime.sendMessage({
18 | action: "getSource",
19 | source: DOMtoString(document)
20 | });
--------------------------------------------------------------------------------
/extension/src/browser_action/main.css:
--------------------------------------------------------------------------------
1 | #mainPopup {
2 | padding: 10px;
3 | width: 400px;
4 | font-family: Helvetica, Ubuntu, Arial, sans-serif;
5 | }
6 | h1 {
7 | font-size: 2em;
8 | }
9 | #ext-body {
10 | padding: 20px;
11 | }
12 |
13 | .progress-outer {
14 | height: 15px;
15 | background-color: lightgrey;
16 | margin-bottom: 5px;
17 | /* display: inline-block; */
18 | }
19 |
20 | .progress-inner {
21 | height: 15px;
22 | width: 0%;
23 | background-color: grey;
24 | }
--------------------------------------------------------------------------------
/extension/src/browser_action/popup.js:
--------------------------------------------------------------------------------
1 | const bkg = chrome.extension.getBackgroundPage();
2 |
3 | chrome.runtime.onMessage.addListener(function(request, sender) {
4 | if (request.action == "getSource") {
5 | message.innerText = request.source;
6 | bkg.console.log(message.innerText);
7 | }
8 | });
9 | function onWindowLoad() {
10 |
11 | let message = document.querySelector('#mainPopup');
12 |
13 | chrome.tabs.executeScript(null, {
14 | file: "src/browser_action/getPagesSource.js"
15 | }, function() {
16 | if (chrome.runtime.lastError) {
17 | message.innerHTML = '
Navigate to a Stack Overflow question to use this extension';
18 | }
19 | });
20 |
21 | }
22 |
23 | window.onload = onWindowLoad;
24 | $('#call-model').on('click', (e) => {
25 | let text = message.innerText;
26 | message.innerText = "";
27 | let doc = new DOMParser().parseFromString(text, 'text/html');
28 | let strippedHtml = doc.body.textContent.replace(/[|&;$%@".<>()+,]/g, " ").replace(/\n/g, " ");
29 | bkg.console.log(strippedHtml);
30 | let url = 'https://your-gcf-url.net/predict-func-name';
31 | let data = {
32 | "question": strippedHtml
33 | }
34 | bkg.console.log(data);
35 | $('#status').text('Sending question to model woot woot...');
36 |
37 | $.postJSON = function(url, data, callback) {
38 | return jQuery.ajax({
39 | 'type': 'POST',
40 | 'url': url,
41 | 'contentType': 'application/json; charset=utf-8',
42 | 'data': JSON.stringify(data),
43 | 'dataType': 'json',
44 | 'success': callback,
45 | 'complete': function(data) {
46 | bkg.console.log('request completed', data);
47 | }
48 | });
49 | };
50 |
51 | $.postJSON(url, data, (res) => {
52 | bkg.console.log(res);
53 | $('#status').text('');
54 | $('#result').html(`Suggested tags: ${res['resp']}`);
55 | });
56 |
57 | });
--------------------------------------------------------------------------------
/functions/main.py:
--------------------------------------------------------------------------------
1 | from oauth2client.client import GoogleCredentials
2 | from googleapiclient import discovery
3 | from flask import escape
4 | import json
5 |
6 | ml = discovery.build('ml', 'v1')
7 | name = 'projects/{}/models/{}'.format('your-gcp-project-name', 'your-ai-platform-model-name')
8 |
9 | def predict(request):
10 | request_json = request.get_json()
11 | print(request_json)
12 | question = ''
13 |
14 | if request_json and 'question' in request_json:
15 | question = request_json['question']
16 |
17 | label_arr = ['keras','matplotlib','pandas','scikitlearn','tensorflow']
18 |
19 | response = ml.projects().predict(
20 | name=name,
21 | body={'instances': [question]}
22 | ).execute()
23 |
24 | return_str = ''
25 | tags = []
26 |
27 | if 'error' in response:
28 | return_str = response['error']
29 | raise RuntimeError(response['error'])
30 | else:
31 | probabilities = response['predictions'][0]
32 | for i,val in enumerate(probabilities):
33 | print(i,val)
34 | if val > 0.8:
35 | tags.append(label_arr[i])
36 | return_str = ','.join(tags)
37 | if len(return_str) == 0:
38 | return_str = 'No tags found.'
39 |
40 | print(return_str)
41 | return json.dumps({'resp': return_str})
42 |
--------------------------------------------------------------------------------
/functions/requirements.txt:
--------------------------------------------------------------------------------
1 | google-api-python-client
2 | oauth2client
--------------------------------------------------------------------------------
/logos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/ai-platform-text-classifier-shap/fd089d0734e4298e23ee164651c8d7220985b531/logos.png
--------------------------------------------------------------------------------
/stackoverflow-classifier.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 0,
6 | "metadata": {
7 | "colab": {},
8 | "colab_type": "code",
9 | "id": "MEDlLSWK15UL"
10 | },
11 | "outputs": [],
12 | "source": [
13 | "# You need TF 1.13.1 to deploy this on AI Platform \n",
14 | "!pip install tensorflow==1.13.1\n",
15 | "\n",
16 | "import tensorflow as tf \n",
17 | "import pandas as pd\n",
18 | "import numpy as np \n",
19 | "\n",
20 | "from sklearn.preprocessing import MultiLabelBinarizer\n",
21 | "from sklearn.utils import shuffle"
22 | ]
23 | },
24 | {
25 | "cell_type": "markdown",
26 | "metadata": {
27 | "colab_type": "text",
28 | "id": "oOQU66q6J4J4"
29 | },
30 | "source": [
31 | "## Downloading and preprocessing data"
32 | ]
33 | },
34 | {
35 | "cell_type": "code",
36 | "execution_count": 0,
37 | "metadata": {
38 | "colab": {},
39 | "colab_type": "code",
40 | "id": "Zrlxa5GjoVXT"
41 | },
42 | "outputs": [],
43 | "source": [
44 | "# Authenticate to your cloud account\n",
45 | "from google.colab import auth\n",
46 | "auth.authenticate_user()"
47 | ]
48 | },
49 | {
50 | "cell_type": "code",
51 | "execution_count": 0,
52 | "metadata": {
53 | "colab": {
54 | "base_uri": "https://localhost:8080/",
55 | "height": 69
56 | },
57 | "colab_type": "code",
58 | "id": "TNPtcKgXrnv1",
59 | "outputId": "1d817c30-5264-449d-f1dd-91f8b969a66b"
60 | },
61 | "outputs": [
62 | {
63 | "name": "stdout",
64 | "output_type": "stream",
65 | "text": [
66 | "Copying gs://cloudml-demo-lcm/SO_ml_tags_avocado_188k_v2.csv...\n",
67 | "/ [1 files][276.7 MiB/276.7 MiB] \n",
68 | "Operation completed over 1 objects/276.7 MiB. \n"
69 | ]
70 | }
71 | ],
72 | "source": [
73 | "# Download the Stack Overflow data (or replace with your own text data)\n",
74 | "!gsutil cp 'gs://cloudml-demo-lcm/SO_ml_tags_avocado_188k_v2.csv' ./"
75 | ]
76 | },
77 | {
78 | "cell_type": "code",
79 | "execution_count": 0,
80 | "metadata": {
81 | "colab": {
82 | "base_uri": "https://localhost:8080/",
83 | "height": 202
84 | },
85 | "colab_type": "code",
86 | "id": "Rawj_MCurx6a",
87 | "outputId": "542f153e-18ac-4959-a207-949c4806524d"
88 | },
89 | "outputs": [
90 | {
91 | "data": {
92 | "text/html": [
93 | "
\n",
94 | "\n",
107 | "
\n",
108 | " \n",
109 | " \n",
110 | " \n",
111 | " tags \n",
112 | " text \n",
113 | " \n",
114 | " \n",
115 | " \n",
116 | " \n",
117 | " 182914 \n",
118 | " tensorflow,keras \n",
119 | " avocado image captioning model not compiling b... \n",
120 | " \n",
121 | " \n",
122 | " 48361 \n",
123 | " pandas \n",
124 | " return excel file from avocado with flask in f... \n",
125 | " \n",
126 | " \n",
127 | " 181447 \n",
128 | " tensorflow,keras \n",
129 | " validating with generator (avocado) i'm trying... \n",
130 | " \n",
131 | " \n",
132 | " 66307 \n",
133 | " pandas \n",
134 | " avocado multiindex dataframe selecting data gi... \n",
135 | " \n",
136 | " \n",
137 | " 11283 \n",
138 | " pandas \n",
139 | " get rightmost non-zero value position for each... \n",
140 | " \n",
141 | " \n",
142 | "
\n",
143 | "
"
144 | ],
145 | "text/plain": [
146 | " tags text\n",
147 | "182914 tensorflow,keras avocado image captioning model not compiling b...\n",
148 | "48361 pandas return excel file from avocado with flask in f...\n",
149 | "181447 tensorflow,keras validating with generator (avocado) i'm trying...\n",
150 | "66307 pandas avocado multiindex dataframe selecting data gi...\n",
151 | "11283 pandas get rightmost non-zero value position for each..."
152 | ]
153 | },
154 | "execution_count": 4,
155 | "metadata": {
156 | "tags": []
157 | },
158 | "output_type": "execute_result"
159 | }
160 | ],
161 | "source": [
162 | "data = pd.read_csv('SO_ml_tags_avocado_188k_v2.csv', names=['tags', 'original_tags', 'text'], header=0)\n",
163 | "data = data.drop(columns=['original_tags'])\n",
164 | "data = data.dropna()\n",
165 | "\n",
166 | "data = shuffle(data, random_state=22)\n",
167 | "data.head()"
168 | ]
169 | },
170 | {
171 | "cell_type": "code",
172 | "execution_count": null,
173 | "metadata": {
174 | "colab": {
175 | "base_uri": "https://localhost:8080/",
176 | "height": 55
177 | },
178 | "colab_type": "code",
179 | "id": "i0qE9gkhFWcV",
180 | "outputId": "db6635b9-5234-4da5-dcd2-68b3ab88fca2"
181 | },
182 | "outputs": [],
183 | "source": [
184 | "# Encode top tags to multi-hot\n",
185 | "tags_split = [tags.split(',') for tags in data['tags'].values]\n",
186 | "print(tags_split)"
187 | ]
188 | },
189 | {
190 | "cell_type": "code",
191 | "execution_count": null,
192 | "metadata": {
193 | "colab": {
194 | "base_uri": "https://localhost:8080/",
195 | "height": 89
196 | },
197 | "colab_type": "code",
198 | "id": "ro8eVH58RzJ8",
199 | "outputId": "70a2cb59-370a-4720-cdb3-e7630ab903c8"
200 | },
201 | "outputs": [],
202 | "source": [
203 | "tag_encoder = MultiLabelBinarizer()\n",
204 | "tags_encoded = tag_encoder.fit_transform(tags_split)\n",
205 | "num_tags = len(tags_encoded[0])\n",
206 | "print(data['text'].values[0])\n",
207 | "print(tag_encoder.classes_)\n",
208 | "print(tags_encoded[0])"
209 | ]
210 | },
211 | {
212 | "cell_type": "code",
213 | "execution_count": 0,
214 | "metadata": {
215 | "colab": {
216 | "base_uri": "https://localhost:8080/",
217 | "height": 52
218 | },
219 | "colab_type": "code",
220 | "id": "vKmWfqM9r0-7",
221 | "outputId": "20a7d36b-c193-4a64-de62-89de635ad24b"
222 | },
223 | "outputs": [
224 | {
225 | "name": "stdout",
226 | "output_type": "stream",
227 | "text": [
228 | "Train size: 150559\n",
229 | "Test size: 37640\n"
230 | ]
231 | }
232 | ],
233 | "source": [
234 | "# Split our data into train and test sets\n",
235 | "train_size = int(len(data) * .8)\n",
236 | "print (\"Train size: %d\" % train_size)\n",
237 | "print (\"Test size: %d\" % (len(data) - train_size))"
238 | ]
239 | },
240 | {
241 | "cell_type": "code",
242 | "execution_count": 0,
243 | "metadata": {
244 | "colab": {},
245 | "colab_type": "code",
246 | "id": "U9sTNi1utg7Z"
247 | },
248 | "outputs": [],
249 | "source": [
250 | "# Split our labels into train and test sets\n",
251 | "train_tags = tags_encoded[:train_size]\n",
252 | "test_tags = tags_encoded[train_size:]"
253 | ]
254 | },
255 | {
256 | "cell_type": "code",
257 | "execution_count": 0,
258 | "metadata": {
259 | "colab": {
260 | "base_uri": "https://localhost:8080/",
261 | "height": 35
262 | },
263 | "colab_type": "code",
264 | "id": "Eu8tyasOOZVm",
265 | "outputId": "c8287b3b-4032-4dcb-c8d5-1c18e4db9ed0"
266 | },
267 | "outputs": [
268 | {
269 | "name": "stdout",
270 | "output_type": "stream",
271 | "text": [
272 | "Writing preprocess.py\n"
273 | ]
274 | }
275 | ],
276 | "source": [
277 | "# Pre-processing data: create our tokenizer class\n",
278 | "%%writefile preprocess.py\n",
279 | "\n",
280 | "from tensorflow.keras.preprocessing import text\n",
281 | "\n",
282 | "class TextPreprocessor(object):\n",
283 | " def __init__(self, vocab_size):\n",
284 | " self._vocab_size = vocab_size\n",
285 | " self._tokenizer = None\n",
286 | " \n",
287 | " def create_tokenizer(self, text_list):\n",
288 | " tokenizer = text.Tokenizer(num_words=self._vocab_size)\n",
289 | " tokenizer.fit_on_texts(text_list)\n",
290 | " self._tokenizer = tokenizer\n",
291 | "\n",
292 | " def transform_text(self, text_list):\n",
293 | " text_matrix = self._tokenizer.texts_to_matrix(text_list)\n",
294 | " return text_matrix"
295 | ]
296 | },
297 | {
298 | "cell_type": "code",
299 | "execution_count": 0,
300 | "metadata": {
301 | "colab": {},
302 | "colab_type": "code",
303 | "id": "N2nlkocQR4WW"
304 | },
305 | "outputs": [],
306 | "source": [
307 | "# Create vocab from training corpus\n",
308 | "from preprocess import TextPreprocessor\n",
309 | "\n",
310 | "VOCAB_SIZE=400 # This is a hyperparameter, try out different values for your dataset\n",
311 | "\n",
312 | "train_qs = data['text'].values[:train_size]\n",
313 | "test_qs = data['text'].values[train_size:]\n",
314 | "\n",
315 | "processor = TextPreprocessor(VOCAB_SIZE)\n",
316 | "processor.create_tokenizer(train_qs)\n",
317 | "\n",
318 | "body_train = processor.transform_text(train_qs)\n",
319 | "body_test = processor.transform_text(test_qs)"
320 | ]
321 | },
322 | {
323 | "cell_type": "code",
324 | "execution_count": 0,
325 | "metadata": {
326 | "colab": {
327 | "base_uri": "https://localhost:8080/",
328 | "height": 329
329 | },
330 | "colab_type": "code",
331 | "id": "KEWMNyNjnfYv",
332 | "outputId": "dcc23ca0-3c5c-4969-86db-3c62aeee926b"
333 | },
334 | "outputs": [
335 | {
336 | "name": "stdout",
337 | "output_type": "stream",
338 | "text": [
339 | "400\n",
340 | "[0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 0. 1. 1. 1. 0. 1. 1. 1. 0.\n",
341 | " 0. 1. 1. 0. 1. 1. 1. 0. 1. 0. 1. 0. 0. 1. 0. 0. 0. 1. 0. 1. 0. 1. 1. 0.\n",
342 | " 1. 0. 0. 1. 1. 1. 1. 1. 0. 1. 0. 1. 1. 1. 1. 0. 0. 0. 1. 1. 0. 0. 0. 0.\n",
343 | " 1. 0. 1. 1. 0. 1. 0. 0. 1. 1. 1. 1. 1. 1. 0. 1. 1. 0. 1. 1. 1. 1. 0. 1.\n",
344 | " 0. 0. 1. 1. 1. 0. 1. 0. 1. 1. 1. 1. 0. 1. 0. 0. 1. 0. 1. 1. 0. 1. 1. 1.\n",
345 | " 0. 0. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 0.\n",
346 | " 0. 1. 1. 0. 1. 0. 0. 0. 0. 0. 1. 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.\n",
347 | " 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.\n",
348 | " 0. 0. 0. 0. 1. 0. 0. 0. 0. 1. 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
349 | " 1. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 1. 1. 1. 1. 0. 0. 0. 0. 0. 0.\n",
350 | " 1. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0.\n",
351 | " 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
352 | " 1. 0. 1. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 0. 1. 1. 1. 0.\n",
353 | " 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.\n",
354 | " 0. 0. 0. 0. 1. 0. 0. 0. 1. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 1.\n",
355 | " 0. 0. 0. 1. 1. 0. 0. 0. 0. 0. 1. 1. 0. 1. 0. 0. 1. 0. 0. 0. 0. 0. 0. 1.\n",
356 | " 0. 0. 0. 1. 0. 0. 1. 0. 0. 0. 0. 1. 0. 1. 0. 0.]\n"
357 | ]
358 | }
359 | ],
360 | "source": [
361 | "# Preview the first input from our training data\n",
362 | "print(len(body_train[0]))\n",
363 | "print(body_train[0])"
364 | ]
365 | },
366 | {
367 | "cell_type": "markdown",
368 | "metadata": {
369 | "colab_type": "text",
370 | "id": "uquBYHLHJ8ZJ"
371 | },
372 | "source": [
373 | "## Building and training our model"
374 | ]
375 | },
376 | {
377 | "cell_type": "code",
378 | "execution_count": 0,
379 | "metadata": {
380 | "colab": {},
381 | "colab_type": "code",
382 | "id": "95-Vx824SbpP"
383 | },
384 | "outputs": [],
385 | "source": [
386 | "# Save the processor state of the tokenizer\n",
387 | "import pickle\n",
388 | "\n",
389 | "with open('./processor_state.pkl', 'wb') as f:\n",
390 | " pickle.dump(processor, f)"
391 | ]
392 | },
393 | {
394 | "cell_type": "code",
395 | "execution_count": 0,
396 | "metadata": {
397 | "colab": {},
398 | "colab_type": "code",
399 | "id": "FG5hhOHQ_hNU"
400 | },
401 | "outputs": [],
402 | "source": [
403 | "def create_model(vocab_size, num_tags):\n",
404 | " \n",
405 | " model = tf.keras.models.Sequential()\n",
406 | " model.add(tf.keras.layers.Dense(50, input_shape=(VOCAB_SIZE,), activation='relu'))\n",
407 | " model.add(tf.keras.layers.Dense(25, activation='relu'))\n",
408 | " model.add(tf.keras.layers.Dense(num_tags, activation='sigmoid'))\n",
409 | "\n",
410 | " model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n",
411 | " return model"
412 | ]
413 | },
414 | {
415 | "cell_type": "code",
416 | "execution_count": 0,
417 | "metadata": {
418 | "colab": {
419 | "base_uri": "https://localhost:8080/",
420 | "height": 523
421 | },
422 | "colab_type": "code",
423 | "id": "uBPC3hE4VCml",
424 | "outputId": "f124853d-0407-4fed-8192-30e01a77315e"
425 | },
426 | "outputs": [
427 | {
428 | "name": "stdout",
429 | "output_type": "stream",
430 | "text": [
431 | "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
432 | "Instructions for updating:\n",
433 | "Colocations handled automatically by placer.\n",
434 | "_________________________________________________________________\n",
435 | "Layer (type) Output Shape Param # \n",
436 | "=================================================================\n",
437 | "dense (Dense) (None, 50) 20050 \n",
438 | "_________________________________________________________________\n",
439 | "dense_1 (Dense) (None, 25) 1275 \n",
440 | "_________________________________________________________________\n",
441 | "dense_2 (Dense) (None, 5) 130 \n",
442 | "=================================================================\n",
443 | "Total params: 21,455\n",
444 | "Trainable params: 21,455\n",
445 | "Non-trainable params: 0\n",
446 | "_________________________________________________________________\n",
447 | "Train on 135503 samples, validate on 15056 samples\n",
448 | "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
449 | "Instructions for updating:\n",
450 | "Use tf.cast instead.\n",
451 | "Epoch 1/3\n",
452 | "135503/135503 [==============================] - 5s 38us/sample - loss: 0.1431 - acc: 0.9457 - val_loss: 0.1077 - val_acc: 0.9592\n",
453 | "Epoch 2/3\n",
454 | "135503/135503 [==============================] - 4s 29us/sample - loss: 0.1047 - acc: 0.9598 - val_loss: 0.1015 - val_acc: 0.9605\n",
455 | "Epoch 3/3\n",
456 | "135503/135503 [==============================] - 4s 28us/sample - loss: 0.0988 - acc: 0.9613 - val_loss: 0.0994 - val_acc: 0.9610\n",
457 | "37640/37640 [==============================] - 0s 13us/sample - loss: 0.1022 - acc: 0.9601\n",
458 | "Eval loss/accuracy:[0.1022030003645975, 0.96011144]\n"
459 | ]
460 | }
461 | ],
462 | "source": [
463 | "model = create_model(VOCAB_SIZE, num_tags)\n",
464 | "model.summary()\n",
465 | "\n",
466 | "# Train and evaluate the model\n",
467 | "model.fit(body_train, train_tags, epochs=3, batch_size=128, validation_split=0.1)\n",
468 | "print('Eval loss/accuracy:{}'.format(\n",
469 | " model.evaluate(body_test, test_tags, batch_size=128)))\n",
470 | "\n",
471 | "# Export the model to a file\n",
472 | "model.save('keras_saved_model.h5')"
473 | ]
474 | },
475 | {
476 | "cell_type": "markdown",
477 | "metadata": {
478 | "colab_type": "text",
479 | "id": "jqMZT0lLS-AG"
480 | },
481 | "source": [
482 | "## Test our model locally"
483 | ]
484 | },
485 | {
486 | "cell_type": "code",
487 | "execution_count": 0,
488 | "metadata": {
489 | "colab": {
490 | "base_uri": "https://localhost:8080/",
491 | "height": 35
492 | },
493 | "colab_type": "code",
494 | "id": "mnlRM3p8THYi",
495 | "outputId": "101661ab-3ed0-497e-8553-ac07012178be"
496 | },
497 | "outputs": [
498 | {
499 | "name": "stdout",
500 | "output_type": "stream",
501 | "text": [
502 | "Writing model_prediction.py\n"
503 | ]
504 | }
505 | ],
506 | "source": [
507 | "# Use custom model prediction to save our model + tokenizer\n",
508 | "%%writefile model_prediction.py\n",
509 | "import pickle\n",
510 | "import os\n",
511 | "import numpy as np\n",
512 | "\n",
513 | "class CustomModelPrediction(object):\n",
514 | "\n",
515 | " def __init__(self, model, processor):\n",
516 | " self._model = model\n",
517 | " self._processor = processor\n",
518 | " \n",
519 | " def predict(self, instances, **kwargs):\n",
520 | " preprocessed_data = self._processor.transform_text(instances)\n",
521 | " predictions = self._model.predict(preprocessed_data)\n",
522 | " return predictions.tolist()\n",
523 | "\n",
524 | " @classmethod\n",
525 | " def from_path(cls, model_dir):\n",
526 | " import tensorflow.keras as keras\n",
527 | " model = keras.models.load_model(\n",
528 | " os.path.join(model_dir,'keras_saved_model.h5'))\n",
529 | " with open(os.path.join(model_dir, 'processor_state.pkl'), 'rb') as f:\n",
530 | " processor = pickle.load(f)\n",
531 | "\n",
532 | " return cls(model, processor)\n",
533 | " "
534 | ]
535 | },
536 | {
537 | "cell_type": "code",
538 | "execution_count": 0,
539 | "metadata": {
540 | "colab": {},
541 | "colab_type": "code",
542 | "id": "SHBHvB_AD3em"
543 | },
544 | "outputs": [],
545 | "source": [
546 | "test_requests = [\n",
547 | " \"How to preprocess strings in Keras models Lambda layer? I have the problem that the value passed on to the Lambda layer (at compile time) is a placeholder generated by keras (without values). When the model is compiled, the .eval () method throws the error: You must feed a value for placeholder tensor 'input_1' with dtype string and shape [?, 1] def text_preprocess(x): strings = tf.keras.backend.eval(x) vectors = [] for string in strings: vector = string_to_one_hot(string.decode('utf-8')) vectors.append(vector) vectorTensor = tf.constant(np.array(vectors),dtype=tf.float32) return vectorTensor input_text = Input(shape=(1,), dtype=tf.string) embedding = Lambda(text_preprocess)(input_text) dense = Dense(256, activation='relu')(embedding) outputs = Dense(2, activation='softmax')(dense) model = Model(inputs=[input_text], outputs=outputs) model.compile(loss='categorical_crossentropy',optimizer='adam', metrics=['accuracy']) model.summary() model.save('test.h5') If I pass a string array into the input layer statically, I can compile the model, but I get the same error if I want to convert the model to tflite. #I replaced this line: input_text = Input(shape=(1,), dtype=tf.string) #by this lines: test = tf.constant(['Hello', 'World']) input_text = Input(shape=(1,), dtype=tf.string, tensor=test) #but calling this ... converter = TFLiteConverter.from_keras_model_file('string_test.h5') tfmodel = converter.convert() #... still leads to this error: InvalidArgumentError: You must feed a value for placeholder tensor 'input_3' with dtype string and shape [2] [[{{node input_3}}]] \",\n",
548 | " \"Change the bar item name in Pandas I have a test excel file like: df = pd.DataFrame({'name':list('abcdefg'), 'age':[10,20,5,23,58,4,6]}) print (df) name age 0 a 10 1 b 20 2 c 5 3 d 23 4 e 58 5 f 4 6 g 6 I use Pandas and matplotlib to read and plot it: import pandas as pd import numpy as np import matplotlib.pyplot as plt import os excel_file = 'test.xlsx' df = pd.read_excel(excel_file, sheet_name=0) df.plot(kind='bar') plt.show() the result shows: enter image description here it use index number as item name, how can I change it to the name, which stored in column name?\"\n",
549 | "]"
550 | ]
551 | },
552 | {
553 | "cell_type": "code",
554 | "execution_count": 0,
555 | "metadata": {
556 | "colab": {
557 | "base_uri": "https://localhost:8080/",
558 | "height": 211
559 | },
560 | "colab_type": "code",
561 | "id": "YFCNYeW8UA3z",
562 | "outputId": "25df663c-b73c-4040-c56d-12c5663bbe3f"
563 | },
564 | "outputs": [
565 | {
566 | "name": "stdout",
567 | "output_type": "stream",
568 | "text": [
569 | "[[0.850749135017395, 6.258487701416016e-07, 0.00028961896896362305, 0.000148087739944458, 0.8072246313095093], [1.3202428817749023e-05, 0.6089206337928772, 0.8498740196228027, 0.0010659386171028018, 3.375753294676542e-05]]\n",
570 | "Predicted labels:\n",
571 | "keras\n",
572 | "tensorflow\n",
573 | "\n",
574 | "\n",
575 | "Predicted labels:\n",
576 | "pandas\n",
577 | "\n",
578 | "\n"
579 | ]
580 | }
581 | ],
582 | "source": [
583 | "from model_prediction import CustomModelPrediction\n",
584 | "\n",
585 | "classifier = CustomModelPrediction.from_path('.')\n",
586 | "results = classifier.predict(test_requests)\n",
587 | "print(results)\n",
588 | "\n",
589 | "for i in range(len(results)):\n",
590 | " print('Predicted labels:')\n",
591 | " for idx,val in enumerate(results[i]):\n",
592 | " if val > 0.7:\n",
593 | " print(tag_encoder.classes_[idx])\n",
594 | " print('\\n')"
595 | ]
596 | },
597 | {
598 | "cell_type": "markdown",
599 | "metadata": {
600 | "colab_type": "text",
601 | "id": "KB0N1h1O7-2X"
602 | },
603 | "source": [
604 | "## Package our model and deploy to AI Platform"
605 | ]
606 | },
607 | {
608 | "cell_type": "code",
609 | "execution_count": 0,
610 | "metadata": {
611 | "colab": {
612 | "base_uri": "https://localhost:8080/",
613 | "height": 35
614 | },
615 | "colab_type": "code",
616 | "id": "BvY8qtH-eaAd",
617 | "outputId": "4330fec4-9a99-4d27-8b8c-318b8cdd60ab"
618 | },
619 | "outputs": [
620 | {
621 | "name": "stdout",
622 | "output_type": "stream",
623 | "text": [
624 | "Writing setup.py\n"
625 | ]
626 | }
627 | ],
628 | "source": [
629 | "%%writefile setup.py\n",
630 | "\n",
631 | "from setuptools import setup\n",
632 | "\n",
633 | "setup(\n",
634 | " name=\"so_predict\",\n",
635 | " version=\"0.1\",\n",
636 | " include_package_data=True,\n",
637 | " scripts=[\"preprocess.py\", \"model_prediction.py\"]\n",
638 | ")"
639 | ]
640 | },
641 | {
642 | "cell_type": "code",
643 | "execution_count": 0,
644 | "metadata": {
645 | "colab": {
646 | "base_uri": "https://localhost:8080/",
647 | "height": 121
648 | },
649 | "colab_type": "code",
650 | "id": "_yLAZTHzfNH2",
651 | "outputId": "8b306447-44b5-4691-b118-8f956b6ff220"
652 | },
653 | "outputs": [
654 | {
655 | "name": "stdout",
656 | "output_type": "stream",
657 | "text": [
658 | "Copying file://keras_saved_model.h5 [Content-Type=application/octet-stream]...\n",
659 | "/ [1 files][279.1 KiB/279.1 KiB] \n",
660 | "Operation completed over 1 objects/279.1 KiB. \n",
661 | "Copying file://processor_state.pkl [Content-Type=application/octet-stream]...\n",
662 | "-\n",
663 | "Operation completed over 1 objects/32.0 MiB. \n"
664 | ]
665 | }
666 | ],
667 | "source": [
668 | "## Replace this with the name of your Cloud Storage bucket\n",
669 | "\n",
670 | "!gsutil cp keras_saved_model.h5 gs://your_gcs_bucket/\n",
671 | "!gsutil cp processor_state.pkl gs://your_gcs_bucket/"
672 | ]
673 | },
674 | {
675 | "cell_type": "code",
676 | "execution_count": 0,
677 | "metadata": {
678 | "colab": {},
679 | "colab_type": "code",
680 | "id": "uZcENnQUefFE"
681 | },
682 | "outputs": [],
683 | "source": [
684 | "# Replace with your bucket name below\n",
685 | "!python setup.py sdist\n",
686 | "!gsutil cp ./dist/so_predict-0.1.tar.gz gs://your_gcs_bucket/packages/so_predict-0.1.tar.gz"
687 | ]
688 | },
689 | {
690 | "cell_type": "code",
691 | "execution_count": 0,
692 | "metadata": {
693 | "colab": {
694 | "base_uri": "https://localhost:8080/",
695 | "height": 35
696 | },
697 | "colab_type": "code",
698 | "id": "n1VdauJOffst",
699 | "outputId": "805f2ec6-70d8-431c-fc8f-bcb6beab95cc"
700 | },
701 | "outputs": [
702 | {
703 | "name": "stdout",
704 | "output_type": "stream",
705 | "text": [
706 | "Updated property [core/project].\n"
707 | ]
708 | }
709 | ],
710 | "source": [
711 | "# Replace with your Cloud project name\n",
712 | "!gcloud config set project your-cloud-project"
713 | ]
714 | },
715 | {
716 | "cell_type": "code",
717 | "execution_count": 0,
718 | "metadata": {
719 | "colab": {},
720 | "colab_type": "code",
721 | "id": "FzNIWRDqfjtm"
722 | },
723 | "outputs": [],
724 | "source": [
725 | "# Create model if it hasn't been created yet\n",
726 | "!gcloud ml-engine models create your_model_name"
727 | ]
728 | },
729 | {
730 | "cell_type": "code",
731 | "execution_count": 0,
732 | "metadata": {
733 | "colab": {},
734 | "colab_type": "code",
735 | "id": "U9RJ0pIrfog2"
736 | },
737 | "outputs": [],
738 | "source": [
739 | "# To use this custom code feature, fill out this form: bit.ly/cmle-custom-code-signup\n",
740 | "!gcloud alpha ml-engine versions create v1 --model your_model_name \\\n",
741 | "--origin=gs://your_gcs_bucket/ \\\n",
742 | "--python-version=3.5 \\\n",
743 | "--runtime-version=1.13 \\\n",
744 | "--framework='TENSORFLOW' \\\n",
745 | "--package-uris=gs://your_gcs_bucket/packages/so_predict-0.1.tar.gz \\\n",
746 | "--model-class=model_prediction.CustomModelPrediction"
747 | ]
748 | },
749 | {
750 | "cell_type": "markdown",
751 | "metadata": {
752 | "colab_type": "text",
753 | "id": "S1Lxa3QD8Hk-"
754 | },
755 | "source": [
756 | "## Generate predictions on our deployed trained model"
757 | ]
758 | },
759 | {
760 | "cell_type": "code",
761 | "execution_count": 0,
762 | "metadata": {
763 | "colab": {
764 | "base_uri": "https://localhost:8080/",
765 | "height": 35
766 | },
767 | "colab_type": "code",
768 | "id": "2j53s1hjg-yw",
769 | "outputId": "239892ce-e188-4398-c3aa-9b386157dd53"
770 | },
771 | "outputs": [
772 | {
773 | "name": "stdout",
774 | "output_type": "stream",
775 | "text": [
776 | "Writing predictions.txt\n"
777 | ]
778 | }
779 | ],
780 | "source": [
781 | "# https://stackoverflow.com/questions/55517871/how-to-preprocess-strings-in-keras-models-lambda-layer\n",
782 | "# https://stackoverflow.com/questions/55508547/plot-histogram-for-feature-of-array-with-known-and-limited-values\n",
783 | "%%writefile predictions.txt\n",
784 | "\"How to preprocess strings in Keras models Lambda layer? I have the problem that the value passed on to the Lambda layer (at compile time) is a placeholder generated by keras (without values). When the model is compiled, the .eval () method throws the error: You must feed a value for placeholder tensor 'input_1' with dtype string and shape [?, 1] def text_preprocess(x): strings = tf.keras.backend.eval(x) vectors = [] for string in strings: vector = string_to_one_hot(string.decode('utf-8')) vectors.append(vector) vectorTensor = tf.constant(np.array(vectors),dtype=tf.float32) return vectorTensor input_text = Input(shape=(1,), dtype=tf.string) embedding = Lambda(text_preprocess)(input_text) dense = Dense(256, activation='relu')(embedding) outputs = Dense(2, activation='softmax')(dense) model = Model(inputs=[input_text], outputs=outputs) model.compile(loss='categorical_crossentropy',optimizer='adam', metrics=['accuracy']) model.summary() model.save('test.h5') If I pass a string array into the input layer statically, I can compile the model, but I get the same error if I want to convert the model to tflite. #I replaced this line: input_text = Input(shape=(1,), dtype=tf.string) #by this lines: test = tf.constant([\"Hello\",\"World\"]) input_text = Input(shape=(1,), dtype=tf.string, tensor=test) #but calling this ... converter = TFLiteConverter.from_keras_model_file('string_test.h5') tfmodel = converter.convert() #... still leads to this error: InvalidArgumentError: You must feed a value for placeholder tensor 'input_3' with dtype string and shape [2] [[{{node input_3}}]] \"\n",
785 | "\"Change the bar item name in Pandas I have a test excel file like: df = pd.DataFrame({'name':list('abcdefg'), 'age':[10,20,5,23,58,4,6]}) print (df) name age 0 a 10 1 b 20 2 c 5 3 d 23 4 e 58 5 f 4 6 g 6 I use Pandas and matplotlib to read and plot it: import pandas as pd import numpy as np import matplotlib.pyplot as plt import os excel_file = 'test.xlsx' df = pd.read_excel(excel_file, sheet_name=0) df.plot(kind=\"bar\") plt.show() the result shows: enter image description here it use index number as item name, how can I change it to the name, which stored in column name? \""
786 | ]
787 | },
788 | {
789 | "cell_type": "code",
790 | "execution_count": 0,
791 | "metadata": {
792 | "colab": {
793 | "base_uri": "https://localhost:8080/",
794 | "height": 55
795 | },
796 | "colab_type": "code",
797 | "id": "ph198bNOgTMS",
798 | "outputId": "84335652-df02-42f3-c699-0fdf67af6c7a"
799 | },
800 | "outputs": [
801 | {
802 | "name": "stdout",
803 | "output_type": "stream",
804 | "text": [
805 | "['[[0.8507491946220398, 5.662441253662109e-07, 0.00028967857360839844, 0.0001481175422668457, 0.8072245121002197], [1.3262033462524414e-05, 0.608920693397522, 0.849873960018158, 0.0010659386171028018, 3.375759479240514e-05]]']\n"
806 | ]
807 | }
808 | ],
809 | "source": [
810 | "# Get predictions from our trained model\n",
811 | "predictions = !gcloud ml-engine predict --model='your_model_name' --text-instances=predictions.txt --version=v1\n",
812 | "print(predictions)"
813 | ]
814 | },
815 | {
816 | "cell_type": "code",
817 | "execution_count": 0,
818 | "metadata": {
819 | "colab": {
820 | "base_uri": "https://localhost:8080/",
821 | "height": 208
822 | },
823 | "colab_type": "code",
824 | "id": "jXpkng0oBB0M",
825 | "outputId": "12a77432-705c-4087-b7eb-2cd4ec262943"
826 | },
827 | "outputs": [
828 | {
829 | "name": "stdout",
830 | "output_type": "stream",
831 | "text": [
832 | "['keras' 'matplotlib' 'pandas' 'scikitlearn' 'tensorflow'] \n",
833 | "\n",
834 | "[0.8507491946220398, 5.662441253662109e-07, 0.00028967857360839844, 0.0001481175422668457, 0.8072245121002197]\n",
835 | "keras\n",
836 | "tensorflow\n",
837 | "\n",
838 | "\n",
839 | "[1.3262033462524414e-05, 0.608920693397522, 0.849873960018158, 0.0010659386171028018, 3.375759479240514e-05]\n",
840 | "pandas\n",
841 | "\n",
842 | "\n"
843 | ]
844 | }
845 | ],
846 | "source": [
847 | "print(tag_encoder.classes_, '\\n')\n",
848 | "\n",
849 | "for sigmoid_arr in eval(predictions[0]):\n",
850 | " print(sigmoid_arr)\n",
851 | " for idx,probability in enumerate(sigmoid_arr):\n",
852 | " if probability > 0.7:\n",
853 | " print(tag_encoder.classes_[idx])\n",
854 | " print('\\n')"
855 | ]
856 | },
857 | {
858 | "cell_type": "markdown",
859 | "metadata": {
860 | "colab_type": "text",
861 | "id": "rXmVKYMzKAlr"
862 | },
863 | "source": [
864 | "## Interpreting our model with SHAP"
865 | ]
866 | },
867 | {
868 | "cell_type": "code",
869 | "execution_count": 0,
870 | "metadata": {
871 | "colab": {
872 | "base_uri": "https://localhost:8080/",
873 | "height": 887
874 | },
875 | "colab_type": "code",
876 | "id": "52ancXmuDPkB",
877 | "outputId": "68bad6e0-c617-41c9-ea44-8930a52973c3"
878 | },
879 | "outputs": [
880 | {
881 | "name": "stdout",
882 | "output_type": "stream",
883 | "text": [
884 | "Collecting shap\n",
885 | "\u001b[?25l Downloading https://files.pythonhosted.org/packages/30/b3/866b0101cbd1829844c35964af68c14ba522a5cce7a1e8d0f7937411d910/shap-0.28.5.tar.gz (223kB)\n",
886 | "\u001b[K 100% |████████████████████████████████| 225kB 8.7MB/s \n",
887 | "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from shap) (1.16.2)\n",
888 | "Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from shap) (1.2.1)\n",
889 | "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.6/dist-packages (from shap) (0.20.3)\n",
890 | "Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from shap) (3.0.3)\n",
891 | "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (from shap) (0.23.4)\n",
892 | "Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from shap) (4.28.1)\n",
893 | "Requirement already satisfied: ipython in /usr/local/lib/python3.6/dist-packages (from shap) (5.5.0)\n",
894 | "Requirement already satisfied: scikit-image in /usr/local/lib/python3.6/dist-packages (from shap) (0.14.2)\n",
895 | "Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->shap) (2.5.3)\n",
896 | "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->shap) (2.4.0)\n",
897 | "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->shap) (1.0.1)\n",
898 | "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->shap) (0.10.0)\n",
899 | "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas->shap) (2018.9)\n",
900 | "Requirement already satisfied: decorator in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (4.4.0)\n",
901 | "Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (40.9.0)\n",
902 | "Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (4.3.2)\n",
903 | "Requirement already satisfied: pexpect; sys_platform != \"win32\" in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (4.7.0)\n",
904 | "Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (1.0.15)\n",
905 | "Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (0.8.1)\n",
906 | "Requirement already satisfied: pygments in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (2.1.3)\n",
907 | "Requirement already satisfied: pickleshare in /usr/local/lib/python3.6/dist-packages (from ipython->shap) (0.7.5)\n",
908 | "Requirement already satisfied: pillow>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (4.3.0)\n",
909 | "Requirement already satisfied: dask[array]>=1.0.0 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (1.1.5)\n",
910 | "Requirement already satisfied: networkx>=1.8 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (2.2)\n",
911 | "Requirement already satisfied: cloudpickle>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (0.6.1)\n",
912 | "Requirement already satisfied: PyWavelets>=0.4.0 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (1.0.3)\n",
913 | "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from scikit-image->shap) (1.11.0)\n",
914 | "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.6/dist-packages (from traitlets>=4.2->ipython->shap) (0.2.0)\n",
915 | "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.6/dist-packages (from pexpect; sys_platform != \"win32\"->ipython->shap) (0.6.0)\n",
916 | "Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython->shap) (0.1.7)\n",
917 | "Requirement already satisfied: olefile in /usr/local/lib/python3.6/dist-packages (from pillow>=4.3.0->scikit-image->shap) (0.46)\n",
918 | "Requirement already satisfied: toolz>=0.7.3; extra == \"array\" in /usr/local/lib/python3.6/dist-packages (from dask[array]>=1.0.0->scikit-image->shap) (0.9.0)\n",
919 | "Building wheels for collected packages: shap\n",
920 | " Building wheel for shap (setup.py) ... \u001b[?25ldone\n",
921 | "\u001b[?25h Stored in directory: /root/.cache/pip/wheels/bf/26/bd/912db1314f1cef0171d9b7f128dd01e8b8c92ed8d0062e632d\n",
922 | "Successfully built shap\n",
923 | "Installing collected packages: shap\n",
924 | "Successfully installed shap-0.28.5\n",
925 | "Collecting colored\n",
926 | " Downloading https://files.pythonhosted.org/packages/58/07/636616667b47d3115b0288311511c5fb446d0e499036b7db858704c89066/colored-1.3.93.tar.gz\n",
927 | "Building wheels for collected packages: colored\n",
928 | " Building wheel for colored (setup.py) ... \u001b[?25ldone\n",
929 | "\u001b[?25h Stored in directory: /root/.cache/pip/wheels/52/c3/b7/ac21460710230feb409fee89bf594c4f2660ff7b67491d128f\n",
930 | "Successfully built colored\n",
931 | "Installing collected packages: colored\n",
932 | "Successfully installed colored-1.3.93\n"
933 | ]
934 | }
935 | ],
936 | "source": [
937 | "!pip install shap\n",
938 | "!pip install colored"
939 | ]
940 | },
941 | {
942 | "cell_type": "code",
943 | "execution_count": 0,
944 | "metadata": {
945 | "colab": {
946 | "base_uri": "https://localhost:8080/",
947 | "height": 35
948 | },
949 | "colab_type": "code",
950 | "id": "1_hfj54qFBEK",
951 | "outputId": "eb08b453-d251-49cc-ac5c-961cf8d16dfa"
952 | },
953 | "outputs": [
954 | {
955 | "name": "stderr",
956 | "output_type": "stream",
957 | "text": [
958 | "Using TensorFlow backend.\n"
959 | ]
960 | }
961 | ],
962 | "source": [
963 | "import shap\n",
964 | "attrib_data = body_train[:200]\n",
965 | "explainer = shap.DeepExplainer(model, attrib_data)\n",
966 | "\n",
967 | "num_explanations = 25\n",
968 | "shap_vals = explainer.shap_values(body_test[:num_explanations])"
969 | ]
970 | },
971 | {
972 | "cell_type": "code",
973 | "execution_count": 0,
974 | "metadata": {
975 | "colab": {},
976 | "colab_type": "code",
977 | "id": "BlP9iuGlXb7E"
978 | },
979 | "outputs": [],
980 | "source": [
981 | "words = processor._tokenizer.word_index"
982 | ]
983 | },
984 | {
985 | "cell_type": "code",
986 | "execution_count": 0,
987 | "metadata": {
988 | "colab": {
989 | "base_uri": "https://localhost:8080/",
990 | "height": 55
991 | },
992 | "colab_type": "code",
993 | "id": "1bwR8A8Bezm7",
994 | "outputId": "c6595800-ab1a-4eca-b930-ddf8d7d7e14c"
995 | },
996 | "outputs": [
997 | {
998 | "name": "stdout",
999 | "output_type": "stream",
1000 | "text": [
1001 | "['', '0', 'the', 'avocado', 'i', '1', 'to', 'a', 'in', '2', 'and', 'is', 'of', 'for', '3', 'x', 'data', 'this', 'with', 'df', 'as', '5', 'it', 'import', '4', 'from', 'gt', 'y', 'that', 'have', 'model', 'dataframe', 'file', 'self', 'but', '00', \"'\", 'my', 'on', 'np', '10', 'train', 'how', 'python', 'if', 'not', 'get', '7', 'line', '6', '01', 'be', 'like', 'lt', 'using', 'c', 'nan', 'am', 'column', 'py', 'name', 'code', 'input', 'index', 'values', 'can', 'size', 'do', 'plot', 'print', 'columns', 'b', 'so', 'value', 'lib', 'shape', 'set', '8', 'test', 'want', 'error', 'are', 'output', 'an', 'true', 'packages', '12', 'use', 'time', 'n', 'batch', 'return', 'or', 'add', 'by', 'def', 'would', 'list', 'when', '9']\n"
1002 | ]
1003 | }
1004 | ],
1005 | "source": [
1006 | "word_lookup = list()\n",
1007 | "for i in words.keys():\n",
1008 | " word_lookup.append(i)\n",
1009 | "\n",
1010 | "word_lookup = [''] + word_lookup\n",
1011 | "print(word_lookup[:100])"
1012 | ]
1013 | },
1014 | {
1015 | "cell_type": "code",
1016 | "execution_count": 0,
1017 | "metadata": {
1018 | "colab": {
1019 | "base_uri": "https://localhost:8080/",
1020 | "height": 585
1021 | },
1022 | "colab_type": "code",
1023 | "id": "W8YFJ8MhFnsi",
1024 | "outputId": "ee0cd794-ea17-4b30-bed1-6b4a7603d32b"
1025 | },
1026 | "outputs": [
1027 | {
1028 | "data": {
1029 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhsAAAI4CAYAAADDHyslAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xm8VXW9//EXKiYICOKACIJzZrfM\nPpVDipFRGcdb1wGvM6JlZk6lliMOaQmmt7LbNU1U1GuZ/fSY5pCiUg59KqtrDjkwKChOKDjEdH5/\n7AVuTxw4wF5nn+H1fDzOY6+91vf7Xd+1/+HN97vWd3VrampCkiSpLKvVuwOSJKlzM2xIkqRSGTYk\nSVKpDBuSJKlUhg1JklQqw4YkSSqVYUOSJJXKsCFJkkpl2JAkSaVao94d6CwaGxubGhoa6t0NSZLa\nUrfWFHJkQ5IklcqwIUmSSmXYkCRJpTJsSJKkUhk2JElSqQwbkiSpVIYNSZJUKsOGJEkqlWFDkiSV\nyrAhSZJKZdiQJEmlMmxIkqRSGTYkSVKpDBuSJKlUhg1JklSqbk1NTfXuQ6fQbfwCf0ipE5v46Ev1\n7kKHNWrCxHp3oc08fNRJbXa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0LVG+Iy80qKp1OWUnc+sNdS\n9s+g2VvmMnPfFuqfWfwtrf1Dl7JvElW/SXGubZdWX5LU+U2f/u7M+7Rp0xg4cCAXXnghTzzxBA89\n9BADBgzgkUce4SMf+QiteYv6RhttxGOPPbbk+1tvvcUrr7yy5PtXv/pVPvKRj3DdddfRu3dvLr74\nYm644YYlx4855hiOOeYYZs2axb777su4ceM455xzanS15XFRL0mSWnDJJZfw3HPP8eqrr/Kd73yH\nUaNGMWfOHHr06EHfvn159dVXOeuss1rd3t57780tt9zC5MmTmTdvHmeccQaLFr17++CcOXPo06cP\nvXr14vHHH+e///u/lxz7wx/+wEMPPcT8+fNZe+21WWuttd4zBdOedYxeSpJUB/vvvz8jRoxgs802\nY/PNN+e0007juOOO4+2332a99dZjhx124HOf+1yr29t222255JJL2H///dloo43o168fgwYNWnJ8\n/PjxXHvttfTu3ZsjjjiCUaNGLTn2xhtvcMQRR9CvX78lT7OceOKJNb3esnRrzbCPlq+xsbGpoaGh\n3t2QJNVIV1jZswZadT+jIxuSJKlUhg1JklQq122VJGkppkyZUu8udBqObEiSpFIZNiRJUqkMG5Ik\nqVQ++loj3cYvqOkPOfHRl2rZ3BKjJkxsVbmHjzpppc+x8/Zjlmw3jblspduRJLV7PvoqSZLqz7Ah\nSVIH0dTUxOjRo+nXrx8f//jHmTRp0ntWIG2vDBuSJC3F0KFDueuuu+rdjfeYPHkyd955J8899xwP\nP/xwvbvTal16nY2I2AVozMy+9e6LJAmuGT2z1PYPuGKjUtsv04IFC5g6dSpDhw5l7bXXrnd3VkiH\nHdmIiEkRcdqqtJGZ9xs0JEnNHXTQQUybNo2GhgZ69erFBRdcwIMPPshOO+1E3759+fCHP8ykSZOW\nlN9tt904/fTT2XnnnenduzcjRozg5ZdfBuCdd97hwAMPpH///vTt25ePfexjvPjiiwDMmDGDPffc\nk3XXXZctttiCn/70p0vaHDt2LHvvvTcHHnggffr04fLLL+fwww/ngQceoFevXpx55pn/0u/HHnuM\n3Xbbjb59+7Ltttty8803A/Dss8/St2/fJW+YPeKII9hggw3ec70XX3xxzX/HxTps2FieiOhe7z5I\nkjqmq6++mk022YTGxkbmzp3LAQccwBe+8AVOO+00Xn31VcaPH89ee+3FSy+9++TgtddeyxVXXMGs\nWbOYN28e48ePB+DKK6/k9ddfZ/r06bzyyiv85Cc/oUePHgDst99+DBo0iBkzZnDDDTdwyimncPfd\ndy9p86abbmLvvfdm9uzZHHzwwfzkJz9hxx13ZO7cuf/yavv58+fT0NDAiBEjmDVrFj/84Q854IAD\neOKJJ9h0003p06cPf/7znwG477776NWrF4899hgA9957L8OGDSvt9+yQ0ygR8SNgF2DHiPgW8Dzw\nANAdmA/sCVwfEd8AJgI7AT2Bp4CTM/POop3dgLsyc43i+wRgdeAdYB/gTeDszPyfNrs4SVK7M3Hi\nRPbYYw/22GMPAD7zmc8QEdx6660ccsghAIwePZqtttoKgH333XfJqEL37t155ZVXeOqpp/jQhz7E\nRz/6UQCmT5/O7373O37961+z1lprsd1223H44Ydz1VVXMXz4cAB23HFHvvjFLwIsCSgtefDBB5k7\ndy7f+ta3WG211Rg+fDgjR47kuuuuY+zYsQwbNox7772XjTfeGIC9996be++9l7XWWos33niDD3/4\nwzX+1d7VIUc2MvNo4H7gnMzslZlbF4f2AW4D1ge+QeX6bgS2BPoD1wG/jIj1l9H83kAjsC7wdeBH\nETGklAuRJHUIU6dO5Re/+AV9+/Zd8jd58mRmznz3HpMBAwYs2e7Zsydz584FKlMUn/3sZ9lvv/0Y\nOHAgJ510EvPnz2fGjBmsu+669O7de0m9IUOG8Pzzzy/5Pnjw4Fb3ccaMGQwePJjVVnv3n/bq9oYN\nG8akSZO477772HXXXdltt9249957uffee9lll13eU6/WOuTIxjJMzszri+23is/qVazGRcTJwMeA\nW1to4+7MvLnYvjEiZgPbAVNr3ltJUrvVrdu761UNHjyYgw466D33VLRW9+7dOfPMMznzzDOZMmUK\ne+yxB1tvvTUjRozg1VdfZc6cOUsCx7Rp05aMPDTvw/IMHDiQ6dOns2jRoiXBYdq0aUtGW4YNG8aJ\nJ57IoEGDGDZsGJ/85Cc58sgjWWuttUqdQoEOOrKxDFOqv0REj4j4UUQ8ExFvFMGhH5WRj5Y0vxX6\nTaD30gpKkjqvDTfckGeeeQaAAw88kMbGRm6//XYWLlzIO++8w6RJk3juueeW284999zD3/72NxYu\nXEifPn3o3r07q622GoMHD2annXbi29/+Nu+88w5//etfufzyyznwwANXqr+f+MQn6NmzJxdccAHz\n589n0qRJNDY2st9++wGw5ZZb0qNHDyZOnMiwYcPo06cPG264Ib/85S8NG8uwqBX7TgB2BT4NrFM8\nefIarVxeVZLUdX3729/m3HPPpW/fvlx//fXcdNNNnHfeeay//voMHjyYcePGLXm6Y1leeOEF9t57\nb/r06cM222zDsGHDOOiggwC47rrrmDJlCgMHDuRLX/oSZ511FrvvvvtK9XfNNdeksbGR2267jfXW\nW4+jjjqKq666ive///1LygwbNoz+/fsvmZ4ZNmwYTU1NbL/99it1ztbqsO9GiYhrgXmZeWjxfQKw\nIDMPryrzPWA4lbDxT+Bk4Azg8Myc0MINos3bmAKclpnLfKmI70Z5l+9GkaQuo9O/G+UiICJidkQ8\n2kKZ7wOzgRnA01Tu45jSNt2TJEnQgUc22htHNt7lyIYkdRmdfmRDkiR1AIYNSZJUKsOGJEkqlfds\n1EhjY2NTQ0NDvbshSVJb8p4NSZJUf4YNSZJUKsOGJEntyKRJkxg0aNBK1x86dCh33XUXAOeddx6H\nH15Zp3LKlCl069aNBQsW1KSfK6KzvYhNkqR25dBDD2XQoEGce+65bd72KaecUvNzrgzDhiSp3VjQ\nbVyp7a/RdGKp7WvpnEaRJGkphg4dyrhx4/jQhz7E2muvzZgxY3jxxRf5/Oc/T+/evdl999157bXX\nANhnn30YMGAA66yzDrvuuiuPPlp5i8all17KNddcwwUXXECvXr1Y/NTi0KFDOf/88/nABz5Av379\nGD16NO+8885S+/HYY4+x22670bdvX7bddltuvvnmZbZdbezYsf/yFtmf/exnDBw4kI022ojx48fX\n7PdaFkc2amTPJz4PT5Q/D1aLZcyXtmR59fLk1cuNrwqXKpfU0f3yl7/kzjvvZMGCBXzkIx/hz3/+\nM5dffjnbbLMNe+yxBz/4wQ8488wz+fznP8/PfvYz1lxzTU4++WQOOOAAHnnkEb785S/z+9//fqlT\nHddccw233347a6+9Ng0NDZx77rn/Umb+/Pk0NDRw2GGHcccddzB58mT+/d//ncxcZtvLcs899/CP\nf/yDZ555huHDh7Pddtut9JtmW8uRDUmSWvD1r3+dDTfckI033phd/n979x5eRXE3cPz74xJuSRqE\ngFwiIaCgVakwXquCNxCQioLiBa0iVKy8VHi05bWKWBVFsfpatWix4KVgtW8rgiAolqp9KzrelZui\nCZeIcksMF0HCvn/MJG5OzjkJyTlJSH6f58mTszu7szO7s3NmZ+fsnnYaJ554IscddxzNmzfnggsu\n4P333wdg1KhRpKWl0axZM6ZMmcKHH35IYWFh3LjHjRtHVlYWhxxyCL/97W+ZO3duuWXeeustduzY\nwaRJk0hJSeHMM8/kvPPOi7psZd122220atWKY445hquvvrpacVWWNjaUUkqpGNq3b1/6uUWLFuWm\nd+zYQXFxMZMmTaJbt26kp6eTnZ0NwJYtW+LGnZWVVfq5S5cu5Ofnl1smPz+frKwsGjVqVGbZjRs3\nVjVLldpuomljQymllKqGOXPmMG/ePF599VUKCwvJzc0FoOQJ3SLRH7K5fv360s/r1q2jY8eO5Zbp\n2LEj69evZ//+/WWW7dSpU9y446nMdhPtoGpsGGOyjTGBMabqP0BWSimlEqioqIhmzZrRpk0bdu3a\nVe7npu3bt+eLL74ot94jjzzChg0b2LZtG3fddRcjRowot8yJJ55Iy5Ytuffee/n+++9ZtmwZ8+fP\n55JLLokbdzx33HEHu3bt4tNPP2XWrFlRt5toB1VjQymllKprrrzySrp06UKnTp046qijOOmkk8qE\nX3PNNaxYsYKMjAyGDh1aOv+yyy6jf//+5OTk0K1bN2655ZZycaekpDB//nwWLVpE27Zt+eUvf8lT\nTz1Fz54948YdT9++fenevTtnnXUWN954I/37969G7ivnoHoRm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b7r8EzcFe8qXIW5FPclDbAY96XyNu6qezjuy+dALAb2\niUi/OMtsx3XXrxSRnbixAgW4e9+VIm70/1BgehAEm8J/uN6Z46SCX3XEEgRBIS7fA3E/Mw37Be4e\nbxFuzMnzFUQ3DlcxbcPdE58dEX4bMA+YJyLf4gbxjSX+OTQKmO3TGcvTQC9fmRIEwcrQtgpwX5DR\nrjBn4fK9OFSp4/frGbh9nos7hv8gYiR6WBAEO3DH+V4R2YHrSYm8JXcZ7ot8A26wccn+3OPj+BNu\n0O4sv811uC+VpnHyngiP4xqb24ERuDEYJfu7ojLwW9yxfsEvs4wfvpyex12ZbxL3i4GuEesSBMGX\nuPv543CD8Z4Gbg2C4LlEZa4iPq/9cQ3Wr/mhbvi9Dy/ADbodgdtHDwF/jIhmDG4w9jIRKcKNRboI\n131eGSNx+281rr4qAK4Mhd+Cuzj6CrePn41YP9a+zsOVty9xdc/LuDJW4ue4uqjQ5zeykfcAruFd\nICKfVjIvcSXiXKmCcvsncD+V/xWu/G8DzsUNSi1JZ7WPu4hk4Mr3jCqmuwwpe0tHNST+avfmIAhO\n99P9cF+O2bWZroOR7w35MggC8dOZuF+BmIj77dHWHYsb4HlFvOXqEhEZgGsQtQhqqRIRNy7olsjx\nQurgJyJX4Y5tonsmalxdOFeqQkTuxo0XSsiD0XSAaAMWBMHLuKsFlWC+gdGlksvOIEFXD8kiIj/B\n3Tv+GDe47E7grwdT5alUTagv50oQBP+dyPj0NooKy+XgfmJnbSrADXqtr1rjbkXsAN4EPsJ14yql\nytJzJQq9jaKUUkqppNKeDaWUUkollTY2lFJKKZVU2thQSimlVFJpY0MppZRSSaWNDaWUUkollTY2\nlFJKKZVU/w9GNxH/3B5K8gAAAABJRU5ErkJggg==\n",
1030 | "text/plain": [
1031 | "
"
1032 | ]
1033 | },
1034 | "metadata": {
1035 | "tags": []
1036 | },
1037 | "output_type": "display_data"
1038 | }
1039 | ],
1040 | "source": [
1041 | "shap.summary_plot(shap_vals, feature_names=word_lookup, class_names=tag_encoder.classes_)"
1042 | ]
1043 | },
1044 | {
1045 | "cell_type": "code",
1046 | "execution_count": 0,
1047 | "metadata": {
1048 | "colab": {},
1049 | "colab_type": "code",
1050 | "id": "M25g1-BHBfyA"
1051 | },
1052 | "outputs": [],
1053 | "source": [
1054 | "import colored\n",
1055 | "import re \n",
1056 | "def colorprint(question, pos, neg):\n",
1057 | " # Split question string on multiple chars\n",
1058 | " q_arr = []\n",
1059 | " q_filtered = filter(None,re.split(\"[, .()]+\", question))\n",
1060 | " for i in q_filtered:\n",
1061 | " q_arr.append(i)\n",
1062 | "\n",
1063 | " color_str = []\n",
1064 | " for idx,word in enumerate(q_arr):\n",
1065 | " if word in pos:\n",
1066 | " color_str.append(colored.fg(\"blue\") + word)\n",
1067 | " elif word in neg:\n",
1068 | " color_str.append(colored.fg(\"light_red\") + word)\n",
1069 | " else:\n",
1070 | " color_str.append(colored.fg('black') + word)\n",
1071 | "\n",
1072 | " # For wrapped printing\n",
1073 | " if idx % 15 == 0 and idx > 0:\n",
1074 | " color_str.append('\\n')\n",
1075 | "\n",
1076 | " print(' '.join(color_str) + colored.fg('black') + \" \")"
1077 | ]
1078 | },
1079 | {
1080 | "cell_type": "code",
1081 | "execution_count": 0,
1082 | "metadata": {
1083 | "colab": {
1084 | "base_uri": "https://localhost:8080/",
1085 | "height": 2637
1086 | },
1087 | "colab_type": "code",
1088 | "id": "4B8I87HWW99Y",
1089 | "outputId": "dca7f77e-b013-49d3-e4eb-da36c947b177"
1090 | },
1091 | "outputs": [
1092 | {
1093 | "name": "stdout",
1094 | "output_type": "stream",
1095 | "text": [
1096 | "Predicted labels:\n",
1097 | "pandas\n",
1098 | "\n",
1099 | "\n",
1100 | "\u001b[38;5;0mi \u001b[38;5;0mwant \u001b[38;5;0mto \u001b[38;5;0msubtract \u001b[38;5;0meach \u001b[38;5;4mcolumn \u001b[38;5;0mfrom \u001b[38;5;0mthe \u001b[38;5;0mprevious \u001b[38;5;0mnon-null \u001b[38;5;4mcolumn \u001b[38;5;0musing \u001b[38;5;0mthe \u001b[38;5;0mdiff \u001b[38;5;0mfunction \u001b[38;5;0mi \n",
1101 | " \u001b[38;5;0mhave \u001b[38;5;0ma \u001b[38;5;0mlong \u001b[38;5;0mlist \u001b[38;5;0mof \u001b[38;5;4mcolumns \u001b[38;5;0mand \u001b[38;5;0mi \u001b[38;5;0mwant \u001b[38;5;0mto \u001b[38;5;0msubtract \u001b[38;5;0mthe \u001b[38;5;0mprevious \u001b[38;5;4mcolumn \u001b[38;5;0mfrom \n",
1102 | " \u001b[38;5;0mthe \u001b[38;5;0mcurrent \u001b[38;5;4mcolumn \u001b[38;5;0mand \u001b[38;5;0mreplace \u001b[38;5;0mthe \u001b[38;5;0mcurrent \u001b[38;5;4mcolumn \u001b[38;5;0mwith \u001b[38;5;0mthe \u001b[38;5;0mdifference \u001b[38;5;0mso \u001b[38;5;0mif \u001b[38;5;0mi \u001b[38;5;0mhave: \n",
1103 | " \u001b[38;5;0ma \u001b[38;5;0mb \u001b[38;5;0mc \u001b[38;5;0md \u001b[38;5;0m1 \u001b[38;5;4mnan \u001b[38;5;0m3 \u001b[38;5;0m7 \u001b[38;5;0m3 \u001b[38;5;4mnan \u001b[38;5;0m8 \u001b[38;5;0m10 \u001b[38;5;0m2 \u001b[38;5;4mnan \u001b[38;5;0m6 \n",
1104 | " \u001b[38;5;9m11 \u001b[38;5;0mi \u001b[38;5;0mwant \u001b[38;5;0mthe \u001b[38;5;0moutput \u001b[38;5;0mto \u001b[38;5;0mbe: \u001b[38;5;0ma \u001b[38;5;0mb \u001b[38;5;0mc \u001b[38;5;0md \u001b[38;5;0m1 \u001b[38;5;4mnan \u001b[38;5;0m2 \u001b[38;5;0m4 \n",
1105 | " \u001b[38;5;0m3 \u001b[38;5;4mnan \u001b[38;5;0m5 \u001b[38;5;0m2 \u001b[38;5;0m2 \u001b[38;5;4mnan \u001b[38;5;0m4 \u001b[38;5;0m5 \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mtrying \u001b[38;5;0mto \u001b[38;5;9muse \u001b[38;5;0mthis \n",
1106 | " \u001b[38;5;0mcode: \u001b[38;5;4mdf2 \u001b[38;5;0m= \u001b[38;5;4mdf1 \u001b[38;5;0mdiff \u001b[38;5;0maxis=1 \u001b[38;5;0mbut \u001b[38;5;0mthis \u001b[38;5;9mdoes \u001b[38;5;0mnot \u001b[38;5;0mproduce \u001b[38;5;0mthe \u001b[38;5;0mdesired \u001b[38;5;0moutput \u001b[38;5;0mthanks \n",
1107 | " \u001b[38;5;0min \u001b[38;5;0madvance\u001b[38;5;0m \n",
1108 | "\n",
1109 | "\n",
1110 | "Predicted labels:\n",
1111 | "tensorflow\n",
1112 | "\n",
1113 | "\n",
1114 | "\u001b[38;5;0mtrying \u001b[38;5;0mto \u001b[38;5;0muse \u001b[38;5;0mif \u001b[38;5;0min \u001b[38;5;0mavocado's \u001b[38;5;0mmap_fn \u001b[38;5;0mi'm \u001b[38;5;0mtrying \u001b[38;5;0mto \u001b[38;5;0mapply \u001b[38;5;0ma \u001b[38;5;0mtransformation \u001b[38;5;0mto \u001b[38;5;0ma \u001b[38;5;9mcolumn \n",
1115 | " \u001b[38;5;0mvector \u001b[38;5;0musing \u001b[38;5;0mmap_fn \u001b[38;5;0min \u001b[38;5;0mavocado \u001b[38;5;0mand \u001b[38;5;0mit's \u001b[38;5;0mnot \u001b[38;5;0mworking \u001b[38;5;0mfor \u001b[38;5;0mthe \u001b[38;5;0mfollowing \u001b[38;5;9mcolumn \u001b[38;5;0mvector: \u001b[38;5;0melems \n",
1116 | " \u001b[38;5;0m= \u001b[38;5;0mnp \u001b[38;5;0marray \u001b[38;5;0m[[1 \u001b[38;5;0m0] \u001b[38;5;0m[2 \u001b[38;5;0m0] \u001b[38;5;0m[3 \u001b[38;5;0m0]] \u001b[38;5;0mwhen \u001b[38;5;0mi \u001b[38;5;0mdo \u001b[38;5;0mthis: \u001b[38;5;0mavocado_m \u001b[38;5;0m= \n",
1117 | " \u001b[38;5;0mavocado \u001b[38;5;0mmap_fn \u001b[38;5;9mlambda \u001b[38;5;0mx: \u001b[38;5;0mx \u001b[38;5;0m+ \u001b[38;5;0m1 \u001b[38;5;0m0 \u001b[38;5;0melems \u001b[38;5;0mwith \u001b[38;5;0mavocado \u001b[38;5;0msession \u001b[38;5;0mas \u001b[38;5;0msess: \u001b[38;5;0mres \n",
1118 | " \u001b[38;5;0m= \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;0mavocado_m \u001b[38;5;9mprint \u001b[38;5;9mstr \u001b[38;5;0mres \u001b[38;5;0mi \u001b[38;5;0mget \u001b[38;5;0mthe \u001b[38;5;0mresult \u001b[38;5;0mthat \u001b[38;5;0mi \u001b[38;5;0mexpect \u001b[38;5;0mnamely \n",
1119 | " \u001b[38;5;0mthis \u001b[38;5;9mcolumn \u001b[38;5;0mvector: \u001b[38;5;0m[[2 \u001b[38;5;0m] \u001b[38;5;0m[3 \u001b[38;5;0m] \u001b[38;5;0m[4 \u001b[38;5;0m]] \u001b[38;5;0mhowever \u001b[38;5;0mwhen \u001b[38;5;0mi \u001b[38;5;0mdo \u001b[38;5;0mthis: \u001b[38;5;0mavocado_m2 \n",
1120 | " \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mmap_fn \u001b[38;5;9mlambda \u001b[38;5;0mx: \u001b[38;5;0mx+1 \u001b[38;5;0mif \u001b[38;5;0mx \u001b[38;5;0m% \u001b[38;5;0m2 \u001b[38;5;0m> \u001b[38;5;0m0 \u001b[38;5;0melse \u001b[38;5;0mx \u001b[38;5;0melems \n",
1121 | " \u001b[38;5;0mwith \u001b[38;5;0mavocado \u001b[38;5;0msession \u001b[38;5;0mas \u001b[38;5;0msess: \u001b[38;5;0mres \u001b[38;5;0m= \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;0mavocado_m2 \u001b[38;5;9mprint \u001b[38;5;9mstr \u001b[38;5;0mres \u001b[38;5;0mthe \u001b[38;5;0mcode \n",
1122 | " \u001b[38;5;0mfails \u001b[38;5;0mwith \u001b[38;5;0mthe \u001b[38;5;0mfollowing \u001b[38;5;0mexception: \u001b[38;5;0mtypeerror: \u001b[38;5;0musing \u001b[38;5;0ma \u001b[38;5;0mavocado \u001b[38;5;4mtensor \u001b[38;5;0mas \u001b[38;5;0ma \u001b[38;5;9mpython \u001b[38;5;0mbool \u001b[38;5;0mis \n",
1123 | " \u001b[38;5;0mnot \u001b[38;5;0mallowed \u001b[38;5;0muse \u001b[38;5;0mif \u001b[38;5;0mt \u001b[38;5;0mis \u001b[38;5;0mnot \u001b[38;5;0mnone: \u001b[38;5;0minstead \u001b[38;5;0mof \u001b[38;5;0mif \u001b[38;5;0mt: \u001b[38;5;0mto \u001b[38;5;0mtest \u001b[38;5;0mif \n",
1124 | " \u001b[38;5;0ma \u001b[38;5;4mtensor \u001b[38;5;0mis \u001b[38;5;0mdefined \u001b[38;5;0mand \u001b[38;5;0muse \u001b[38;5;0mavocado \u001b[38;5;4mops \u001b[38;5;0msuch \u001b[38;5;0mas \u001b[38;5;0mavocado \u001b[38;5;0mcond \u001b[38;5;0mto \u001b[38;5;0mexecute \u001b[38;5;0msubgraphs \n",
1125 | " \u001b[38;5;0mconditioned \u001b[38;5;0mon \u001b[38;5;0mthe \u001b[38;5;0mvalue \u001b[38;5;0mof \u001b[38;5;0ma \u001b[38;5;4mtensor \u001b[38;5;0mi've \u001b[38;5;0mtried \u001b[38;5;0mprinting \u001b[38;5;0mthe \u001b[38;5;0mtype \u001b[38;5;0mof \u001b[38;5;0mx \u001b[38;5;0mand \n",
1126 | " \u001b[38;5;0mit's \u001b[38;5;0ma \u001b[38;5;4mtensor \u001b[38;5;0mwith \u001b[38;5;0mshape \u001b[38;5;0m1 \u001b[38;5;0mso \u001b[38;5;0mwhat \u001b[38;5;0mit \u001b[38;5;0mlooks \u001b[38;5;0mlike \u001b[38;5;0mis \u001b[38;5;0mhappening \u001b[38;5;0mis \u001b[38;5;0mthat \n",
1127 | " \u001b[38;5;0mthe \u001b[38;5;0mvalues \u001b[38;5;0maren't \u001b[38;5;0mbeing \u001b[38;5;0mpassed \u001b[38;5;0minto \u001b[38;5;0mthe \u001b[38;5;9mlambda \u001b[38;5;0mas \u001b[38;5;0mscalar \u001b[38;5;0mvalues \u001b[38;5;0mbut \u001b[38;5;0mrather \u001b[38;5;0mas \u001b[38;5;0mtensors \n",
1128 | " \u001b[38;5;0mwith \u001b[38;5;0mshape \u001b[38;5;0m1 \u001b[38;5;0m; \u001b[38;5;0mthe \u001b[38;5;0m% \u001b[38;5;0mis \u001b[38;5;0mbroadcast \u001b[38;5;0mproducing \u001b[38;5;0manother \u001b[38;5;4mtensor \u001b[38;5;0mof \u001b[38;5;0mshape \u001b[38;5;0m1 \u001b[38;5;0mbut \n",
1129 | " \u001b[38;5;0mthat \u001b[38;5;4mtensor \u001b[38;5;0mcan't \u001b[38;5;0mthen \u001b[38;5;0mhave \u001b[38;5;0mthe \u001b[38;5;0m>= \u001b[38;5;0moperator \u001b[38;5;0mapplied \u001b[38;5;0mto \u001b[38;5;0mit \u001b[38;5;0mis \u001b[38;5;0mthere \u001b[38;5;0ma \u001b[38;5;0mway \n",
1130 | " \u001b[38;5;0mto \u001b[38;5;0mmake \u001b[38;5;0mthis \u001b[38;5;0mwork? \u001b[38;5;0mis \u001b[38;5;0mthere \u001b[38;5;0ma \u001b[38;5;0mway \u001b[38;5;0mto \u001b[38;5;0mget \u001b[38;5;0man \u001b[38;5;0mactual \u001b[38;5;0mscalar \u001b[38;5;0mthat \u001b[38;5;0mi \n",
1131 | " \u001b[38;5;0mcould \u001b[38;5;0mapply \u001b[38;5;0mthe \u001b[38;5;0m>= \u001b[38;5;0moperator \u001b[38;5;0mto? \u001b[38;5;0mif \u001b[38;5;0mthere \u001b[38;5;0misn't \u001b[38;5;0mis \u001b[38;5;0mthere \u001b[38;5;0man \u001b[38;5;0mefficient \u001b[38;5;0malternative \u001b[38;5;0mto \n",
1132 | " \u001b[38;5;0mmap_fn \u001b[38;5;0mthat \u001b[38;5;0mi \u001b[38;5;0mcan \u001b[38;5;0muse? \u001b[38;5;0mi've \u001b[38;5;0mlooked \u001b[38;5;0mat \u001b[38;5;0mavocado \u001b[38;5;0mcond \u001b[38;5;0mand \u001b[38;5;0mit's \u001b[38;5;0mnot \u001b[38;5;0mobvious \u001b[38;5;0mhow \n",
1133 | " \u001b[38;5;0mi \u001b[38;5;0mcan \u001b[38;5;0muse \u001b[38;5;0mthat \u001b[38;5;0min \u001b[38;5;0mthis \u001b[38;5;0mcontext \u001b[38;5;0mas \u001b[38;5;0mi \u001b[38;5;0munderstand \u001b[38;5;0mit \u001b[38;5;0mavocado \u001b[38;5;0mcond \u001b[38;5;0mproduces \u001b[38;5;0man \n",
1134 | " \u001b[38;5;4mop \u001b[38;5;0mnot \u001b[38;5;0ma \u001b[38;5;0mcallable \u001b[38;5;0mso \u001b[38;5;0mhow \u001b[38;5;0mam \u001b[38;5;0mi \u001b[38;5;0mgoing \u001b[38;5;0mto \u001b[38;5;0muse \u001b[38;5;0mthat \u001b[38;5;0mfrom \u001b[38;5;0mwithin \u001b[38;5;0ma \n",
1135 | " \u001b[38;5;9mlambda \u001b[38;5;0mbeing \u001b[38;5;0mapplied \u001b[38;5;0mby \u001b[38;5;0mmap_fn?\u001b[38;5;0m \n",
1136 | "\n",
1137 | "\n",
1138 | "Predicted labels:\n",
1139 | "keras\n",
1140 | "\n",
1141 | "\n",
1142 | "\u001b[38;5;0mhow \u001b[38;5;0mto \u001b[38;5;0mstack \u001b[38;5;4mlstm \u001b[38;5;4mlayers \u001b[38;5;0mto \u001b[38;5;0mclassify \u001b[38;5;0mspeech \u001b[38;5;9mfiles \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mtrying \u001b[38;5;0mto \u001b[38;5;0mimplement \u001b[38;5;0ma \n",
1143 | " \u001b[38;5;4mlstm \u001b[38;5;0mbased \u001b[38;5;0mclassifier \u001b[38;5;0mto \u001b[38;5;0mclassify \u001b[38;5;0mdescrete \u001b[38;5;0mspeech \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mcreated \u001b[38;5;9mfeature \u001b[38;5;0mvectors \u001b[38;5;0mwith \u001b[38;5;0m13 \u001b[38;5;0mmfcc \n",
1144 | " \u001b[38;5;0mfor \u001b[38;5;0ma \u001b[38;5;0mgiven \u001b[38;5;0mfile \u001b[38;5;0mhave \u001b[38;5;0m2d \u001b[38;5;0mvector \u001b[38;5;0mof \u001b[38;5;0m[99 \u001b[38;5;0m13] \u001b[38;5;0mafter \u001b[38;5;0mfollowing \u001b[38;5;0mthe \u001b[38;5;0mmnist_irnn \u001b[38;5;0mexample \n",
1145 | " \u001b[38;5;0mi \u001b[38;5;0mcould \u001b[38;5;0mset \u001b[38;5;0mup \u001b[38;5;0msingle \u001b[38;5;4mlayer \u001b[38;5;0mrnn \u001b[38;5;0mto \u001b[38;5;0mclassify \u001b[38;5;0mmy \u001b[38;5;0mspeech \u001b[38;5;9mfiles \u001b[38;5;0mbut \u001b[38;5;0mnow \u001b[38;5;0mi \n",
1146 | " \u001b[38;5;0mwant \u001b[38;5;0mto \u001b[38;5;0madd \u001b[38;5;0mmore \u001b[38;5;4mlayers \u001b[38;5;0mto \u001b[38;5;0mthe \u001b[38;5;0mnetwork \u001b[38;5;0mtherefore \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mtrying \u001b[38;5;0mto \u001b[38;5;0mimplement \n",
1147 | " \u001b[38;5;0mthe \u001b[38;5;0mnetwork \u001b[38;5;0mwith \u001b[38;5;0mtwo \u001b[38;5;4mlstm \u001b[38;5;4mlayers \u001b[38;5;0mand \u001b[38;5;0msoftmax \u001b[38;5;4mlayer \u001b[38;5;0mas \u001b[38;5;0mthe \u001b[38;5;0moutput \u001b[38;5;4mlayer \u001b[38;5;0mafter \u001b[38;5;0mgoing \n",
1148 | " \u001b[38;5;0mthrough \u001b[38;5;0mnumber \u001b[38;5;0mof \u001b[38;5;0mposts \u001b[38;5;0mhere \u001b[38;5;0mi \u001b[38;5;0mcould \u001b[38;5;0mset \u001b[38;5;0mup \u001b[38;5;0mthe \u001b[38;5;0mnetwork \u001b[38;5;0mas \u001b[38;5;0mfollows \u001b[38;5;0mwhere \u001b[38;5;0mit \n",
1149 | " \u001b[38;5;0mdoesn't \u001b[38;5;0mthrow \u001b[38;5;0many \u001b[38;5;0mexceptions \u001b[38;5;0mduring \u001b[38;5;0mmodel \u001b[38;5;0mbuilding \u001b[38;5;0mtime \u001b[38;5;0mfrom \u001b[38;5;0m__future__ \u001b[38;5;0mimport \u001b[38;5;0mprint_function \u001b[38;5;0mimport \u001b[38;5;0mnumpy \u001b[38;5;0mas \n",
1150 | " \u001b[38;5;0mnp \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;0moptimizers \u001b[38;5;0mimport \u001b[38;5;0msgd \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;0mutils \u001b[38;5;0mvisualize_util \u001b[38;5;0mimport \u001b[38;5;0mplot \u001b[38;5;0mnp \u001b[38;5;0mrandom \u001b[38;5;0mseed \n",
1151 | " \u001b[38;5;0m1337 \u001b[38;5;0m# \u001b[38;5;0mfor \u001b[38;5;0mreproducibility \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;0mpreprocessing \u001b[38;5;0mimport \u001b[38;5;0msequence \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;0mutils \u001b[38;5;0mimport \u001b[38;5;0mnp_utils \u001b[38;5;0mfrom \n",
1152 | " \u001b[38;5;0mavocado \u001b[38;5;0mmodels \u001b[38;5;0mimport \u001b[38;5;0msequential \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;4mlayers \u001b[38;5;0mcore \u001b[38;5;0mimport \u001b[38;5;4mdense \u001b[38;5;0mdropout \u001b[38;5;0mactivation \u001b[38;5;0mtimedistributeddense \u001b[38;5;0mfrom \u001b[38;5;0mavocado \n",
1153 | " \u001b[38;5;4mlayers \u001b[38;5;0mrecurrent \u001b[38;5;0mimport \u001b[38;5;4mlstm \u001b[38;5;0mfrom \u001b[38;5;0mspeechresearch \u001b[38;5;0mimport \u001b[38;5;0mloaddata \u001b[38;5;0mbatch_size \u001b[38;5;0m= \u001b[38;5;0m5 \u001b[38;5;0mhidden_units \u001b[38;5;0m= \u001b[38;5;0m100 \u001b[38;5;0mnb_classes \n",
1154 | " \u001b[38;5;0m= \u001b[38;5;0m10 \u001b[38;5;0mprint \u001b[38;5;0m'loading \u001b[38;5;0mdata \u001b[38;5;0m' \u001b[38;5;0mx_train \u001b[38;5;0my_train \u001b[38;5;0mx_test \u001b[38;5;0my_test \u001b[38;5;0m= \u001b[38;5;0mloaddata \u001b[38;5;0mload_mfcc \u001b[38;5;0m10 \u001b[38;5;0m2 \n",
1155 | " \u001b[38;5;0mprint \u001b[38;5;0mlen \u001b[38;5;0mx_train \u001b[38;5;0m'train \u001b[38;5;0msequences' \u001b[38;5;0mprint \u001b[38;5;0mlen \u001b[38;5;0mx_test \u001b[38;5;0m'test \u001b[38;5;0msequences' \u001b[38;5;0mprint \u001b[38;5;0m'x_train \u001b[38;5;0mshape:' \u001b[38;5;0mx_train \u001b[38;5;0mshape \n",
1156 | " \u001b[38;5;0mprint \u001b[38;5;0m'x_test \u001b[38;5;0mshape:' \u001b[38;5;0mx_test \u001b[38;5;0mshape \u001b[38;5;0mprint \u001b[38;5;0m'y_train \u001b[38;5;0mshape:' \u001b[38;5;0my_train \u001b[38;5;0mshape \u001b[38;5;0mprint \u001b[38;5;0m'y_test \u001b[38;5;0mshape:' \u001b[38;5;0my_test \u001b[38;5;0mshape \n",
1157 | " \u001b[38;5;0mprint \u001b[38;5;0m'build \u001b[38;5;0mmodel \u001b[38;5;0m' \u001b[38;5;0my_train \u001b[38;5;0m= \u001b[38;5;0mnp_utils \u001b[38;5;0mto_categorical \u001b[38;5;0my_train \u001b[38;5;0mnb_classes \u001b[38;5;0my_test \u001b[38;5;0m= \u001b[38;5;0mnp_utils \u001b[38;5;0mto_categorical \u001b[38;5;0my_test \n",
1158 | " \u001b[38;5;0mnb_classes \u001b[38;5;0mprint \u001b[38;5;0mbatch_size \u001b[38;5;0m99 \u001b[38;5;0mx_train \u001b[38;5;0mshape[2] \u001b[38;5;0mprint \u001b[38;5;0mx_train \u001b[38;5;0mshape[1:] \u001b[38;5;0mprint \u001b[38;5;0mx_train \u001b[38;5;0mshape[2] \u001b[38;5;0mmodel \u001b[38;5;0m= \u001b[38;5;0msequential \n",
1159 | " \u001b[38;5;0mmodel \u001b[38;5;0madd \u001b[38;5;4mlstm \u001b[38;5;0moutput_dim=hidden_units \u001b[38;5;0minit='uniform' \u001b[38;5;0minner_init='uniform' \u001b[38;5;0mforget_bias_init='one' \u001b[38;5;0mactivation='tanh' \u001b[38;5;0minner_activation='sigmoid' \u001b[38;5;0mreturn_sequences=true \u001b[38;5;0mstateful=true \u001b[38;5;0mbatch_input_shape= \u001b[38;5;0mbatch_size \u001b[38;5;0m99 \u001b[38;5;0mx_train \n",
1160 | " \u001b[38;5;0mshape[2] \u001b[38;5;0m# \u001b[38;5;0mmodel \u001b[38;5;0madd \u001b[38;5;0mdropout \u001b[38;5;0m0 \u001b[38;5;0m5 \u001b[38;5;0mmodel \u001b[38;5;0madd \u001b[38;5;4mlstm \u001b[38;5;0moutput_dim=hidden_units \u001b[38;5;0minit='uniform' \u001b[38;5;0minner_init='uniform' \u001b[38;5;0mforget_bias_init='one' \u001b[38;5;0mactivation='tanh' \n",
1161 | " \u001b[38;5;0minner_activation='sigmoid' \u001b[38;5;0mreturn_sequences=true \u001b[38;5;0mstateful=true \u001b[38;5;0minput_length=x_train \u001b[38;5;0mshape[2] \u001b[38;5;0mmodel \u001b[38;5;0madd \u001b[38;5;0mtimedistributeddense \u001b[38;5;0minput_dim=hidden_units \u001b[38;5;0moutput_dim=nb_classes \u001b[38;5;0mmodel \u001b[38;5;0madd \u001b[38;5;0mactivation \u001b[38;5;0m'softmax' \u001b[38;5;0m# \n",
1162 | " \u001b[38;5;0mtry \u001b[38;5;0musing \u001b[38;5;0mdifferent \u001b[38;5;0moptimizers \u001b[38;5;0mand \u001b[38;5;0mdifferent \u001b[38;5;0moptimizer \u001b[38;5;0mconfigs \u001b[38;5;0msgd \u001b[38;5;0m= \u001b[38;5;0msgd \u001b[38;5;0mlr=0 \u001b[38;5;0m1 \u001b[38;5;0mdecay=1e-6 \u001b[38;5;0mmomentum=0 \n",
1163 | " \u001b[38;5;0m9 \u001b[38;5;0mnesterov=true \u001b[38;5;0mmodel \u001b[38;5;0mcompile \u001b[38;5;0mloss='categorical_crossentropy' \u001b[38;5;0moptimizer=sgd \u001b[38;5;0mprint \u001b[38;5;0m\"train \u001b[38;5;0m\" \u001b[38;5;0mmodel \u001b[38;5;0mfit \u001b[38;5;0mx_train \u001b[38;5;0my_train \u001b[38;5;0mbatch_size=batch_size \u001b[38;5;0mnb_epoch=3 \n",
1164 | " \u001b[38;5;0mvalidation_data= \u001b[38;5;0mx_test \u001b[38;5;0my_test \u001b[38;5;0mshow_accuracy=true \u001b[38;5;0mscore \u001b[38;5;0macc \u001b[38;5;0m= \u001b[38;5;0mmodel \u001b[38;5;0mevaluate \u001b[38;5;0mx_test \u001b[38;5;0my_test \u001b[38;5;0mbatch_size=batch_size \u001b[38;5;0mshow_accuracy=true \u001b[38;5;0mprint \u001b[38;5;0m'test \n",
1165 | " \u001b[38;5;0mscore:' \u001b[38;5;0mscore \u001b[38;5;0mprint \u001b[38;5;0m'test \u001b[38;5;0maccuracy:' \u001b[38;5;0macc \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mtrying \u001b[38;5;0mdifferent \u001b[38;5;0mvalues \u001b[38;5;0mat \u001b[38;5;0mdifferent \u001b[38;5;0mpoints \n",
1166 | " \u001b[38;5;0mfor \u001b[38;5;0mthe \u001b[38;5;0mmoment \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mtrying \u001b[38;5;0mwith \u001b[38;5;0ma \u001b[38;5;0msmall \u001b[38;5;0msample \u001b[38;5;0mtherefore \u001b[38;5;0mvalues \u001b[38;5;0mare \u001b[38;5;0mvery \n",
1167 | " \u001b[38;5;0msmall \u001b[38;5;0mbut \u001b[38;5;0mnow \u001b[38;5;0mit \u001b[38;5;0mis \u001b[38;5;0mthrowing \u001b[38;5;0mexception \u001b[38;5;0mduring \u001b[38;5;0mtraining \u001b[38;5;0msome \u001b[38;5;0mdimension \u001b[38;5;0mmismatch \u001b[38;5;0musing \u001b[38;5;0mtheano \u001b[38;5;0mbackend \n",
1168 | " \u001b[38;5;0mloading \u001b[38;5;0mdata \u001b[38;5;0m100 \u001b[38;5;0mtrain \u001b[38;5;0msequences \u001b[38;5;0m20 \u001b[38;5;0mtest \u001b[38;5;0msequences \u001b[38;5;0mx_train \u001b[38;5;0mshape: \u001b[38;5;0m100 \u001b[38;5;0m99 \u001b[38;5;0m13 \u001b[38;5;0mx_test \u001b[38;5;0mshape: \n",
1169 | " \u001b[38;5;0m20 \u001b[38;5;0m99 \u001b[38;5;0m13 \u001b[38;5;0my_train \u001b[38;5;0mshape: \u001b[38;5;0m100 \u001b[38;5;0my_test \u001b[38;5;0mshape: \u001b[38;5;0m20 \u001b[38;5;0mbuild \u001b[38;5;0mmodel \u001b[38;5;0m5 \u001b[38;5;0m99 \u001b[38;5;0m13 \u001b[38;5;0m99 \n",
1170 | " \u001b[38;5;0m13 \u001b[38;5;0m13 \u001b[38;5;0mtrain \u001b[38;5;0mtrain \u001b[38;5;0mon \u001b[38;5;0m100 \u001b[38;5;0msamples \u001b[38;5;0mvalidate \u001b[38;5;0mon \u001b[38;5;0m20 \u001b[38;5;0msamples \u001b[38;5;4mepoch \u001b[38;5;0m1/3 \u001b[38;5;0mtraceback \u001b[38;5;9mmost \n",
1171 | " \u001b[38;5;0mrecent \u001b[38;5;0mcall \u001b[38;5;0mlast \u001b[38;5;0m: \u001b[38;5;0mfile \u001b[38;5;0m\"/home/udani/pycharmprojects/testresearch/speechresearch/lstmnetwork \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m54 \u001b[38;5;0min \u001b[38;5;0m<module> \u001b[38;5;0mmodel \u001b[38;5;0mfit \u001b[38;5;0mx_train \u001b[38;5;0my_train \n",
1172 | " \u001b[38;5;0mbatch_size=batch_size \u001b[38;5;0mnb_epoch=3 \u001b[38;5;0mvalidation_data= \u001b[38;5;0mx_test \u001b[38;5;0my_test \u001b[38;5;0mshow_accuracy=true \u001b[38;5;0mfile \u001b[38;5;0m\"/usr/local/lib/python2 \u001b[38;5;0m7/dist-packages/avocado/models \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m581 \u001b[38;5;0min \u001b[38;5;0mfit \u001b[38;5;0mshuffle=shuffle \n",
1173 | " \u001b[38;5;0mmetrics=metrics \u001b[38;5;0mfile \u001b[38;5;0m\"/usr/local/lib/python2 \u001b[38;5;0m7/dist-packages/avocado/models \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m239 \u001b[38;5;0min \u001b[38;5;0m_fit \u001b[38;5;0mouts \u001b[38;5;0m= \u001b[38;5;0mf \u001b[38;5;0mins_batch \u001b[38;5;0mfile \u001b[38;5;0m\"/usr/local/lib/python2 \n",
1174 | " \u001b[38;5;0m7/dist-packages/avocado/backend/theano_backend \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m365 \u001b[38;5;0min \u001b[38;5;0m__call__ \u001b[38;5;0mreturn \u001b[38;5;0mself \u001b[38;5;0mfunction \u001b[38;5;0m*inputs \u001b[38;5;0mfile \u001b[38;5;0m\"/home/udani/documents/researchsw/theano/theano/compile/function_module \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m786 \n",
1175 | " \u001b[38;5;0min \u001b[38;5;0m__call__ \u001b[38;5;0mallow_downcast=s \u001b[38;5;0mallow_downcast \u001b[38;5;0mfile \u001b[38;5;0m\"/home/udani/documents/researchsw/theano/theano/tensor/type \u001b[38;5;0mpy\" \u001b[38;5;0mline \u001b[38;5;0m177 \u001b[38;5;0min \u001b[38;5;0mfilter \u001b[38;5;0mdata \u001b[38;5;0mshape \u001b[38;5;0mtypeerror: \u001b[38;5;0m'bad \n",
1176 | " \u001b[38;5;0minput \u001b[38;5;0margument \u001b[38;5;0mto \u001b[38;5;0mtheano \u001b[38;5;0mfunction \u001b[38;5;0mwith \u001b[38;5;0mname \u001b[38;5;0m\"/usr/local/lib/python2 \u001b[38;5;0m7/dist-packages/avocado/backend/theano_backend \u001b[38;5;0mpy:362\" \u001b[38;5;0mat \u001b[38;5;0mindex \u001b[38;5;0m1 \u001b[38;5;0m0-based \u001b[38;5;0m' \n",
1177 | " \u001b[38;5;0m'wrong \u001b[38;5;0mnumber \u001b[38;5;0mof \u001b[38;5;0mdimensions: \u001b[38;5;0mexpected \u001b[38;5;0m3 \u001b[38;5;0mgot \u001b[38;5;0m2 \u001b[38;5;0mwith \u001b[38;5;0mshape \u001b[38;5;0m5 \u001b[38;5;0m10 \u001b[38;5;0m' \u001b[38;5;0mi \u001b[38;5;0mwould \n",
1178 | " \u001b[38;5;0mlike \u001b[38;5;0mto \u001b[38;5;0mknow \u001b[38;5;0mwhat \u001b[38;5;0mi \u001b[38;5;0mam \u001b[38;5;0mdoing \u001b[38;5;0mwrong \u001b[38;5;0mhere \u001b[38;5;0mi \u001b[38;5;0mhave \u001b[38;5;0mbeen \u001b[38;5;0mgoing \u001b[38;5;0mthrough \u001b[38;5;0mthe \n",
1179 | " \u001b[38;5;0mcode \u001b[38;5;0mwhole \u001b[38;5;0mday \u001b[38;5;0mbut \u001b[38;5;0mstill \u001b[38;5;0mi \u001b[38;5;0mam \u001b[38;5;0munable \u001b[38;5;0mto \u001b[38;5;0mfigure \u001b[38;5;0mout \u001b[38;5;0mthe \u001b[38;5;0mreason \u001b[38;5;0mfor \u001b[38;5;0mdimension \n",
1180 | " \u001b[38;5;0mmismatch \u001b[38;5;0mfurther \u001b[38;5;0mi \u001b[38;5;0mwould \u001b[38;5;0mbe \u001b[38;5;0mreally \u001b[38;5;0mthankful \u001b[38;5;0mif \u001b[38;5;0msomeone \u001b[38;5;0mcan \u001b[38;5;0mexplain \u001b[38;5;0mwhat \u001b[38;5;0mit \u001b[38;5;0mis \u001b[38;5;0mmeant \n",
1181 | " \u001b[38;5;0mby \u001b[38;5;0moutput_dim \u001b[38;5;0mis \u001b[38;5;0mthat \u001b[38;5;0mthe \u001b[38;5;0mshape \u001b[38;5;0mof \u001b[38;5;0mthe \u001b[38;5;0mvector \u001b[38;5;0moutput \u001b[38;5;0mby \u001b[38;5;0ma \u001b[38;5;0msingle \u001b[38;5;0mnode \u001b[38;5;0mwhen \n",
1182 | " \u001b[38;5;0mwe \u001b[38;5;0mhave \u001b[38;5;9mn \u001b[38;5;0mnumber \u001b[38;5;0mof \u001b[38;5;0mnodes \u001b[38;5;0min \u001b[38;5;0ma \u001b[38;5;0mgiven \u001b[38;5;0mlayer? \u001b[38;5;0mshould \u001b[38;5;0mit \u001b[38;5;0mbe \u001b[38;5;0mequal \u001b[38;5;0mto \n",
1183 | " \u001b[38;5;0mthe \u001b[38;5;0mnumber \u001b[38;5;0mof \u001b[38;5;0mnodes \u001b[38;5;0min \u001b[38;5;0mthe \u001b[38;5;0mnext \u001b[38;5;0mlayer?\u001b[38;5;0m \n",
1184 | "\n",
1185 | "\n",
1186 | "Predicted labels:\n",
1187 | "tensorflow\n",
1188 | "\n",
1189 | "\n",
1190 | "\u001b[38;5;0mwhich \u001b[38;5;0mis \u001b[38;5;0mcorrect \u001b[38;5;0mshape \u001b[38;5;0mof \u001b[38;5;0mlinear \u001b[38;5;0mregression \u001b[38;5;0min \u001b[38;5;0mmy \u001b[38;5;0mmodel? \u001b[38;5;0mi \u001b[38;5;0mam \u001b[38;5;0mdesigning \u001b[38;5;0mregression \u001b[38;5;0mnetwork \u001b[38;5;0mto \n",
1191 | " \u001b[38;5;9mpredict \u001b[38;5;0mthe \u001b[38;5;0mweight \u001b[38;5;0mof \u001b[38;5;0ma \u001b[38;5;0mperson \u001b[38;5;0mfrom \u001b[38;5;0m10 \u001b[38;5;0mto \u001b[38;5;0m100 \u001b[38;5;0mkg \u001b[38;5;0mmy \u001b[38;5;0mdataset \u001b[38;5;0mhas \u001b[38;5;0m50 \n",
1192 | " \u001b[38;5;0mtraining \u001b[38;5;0mdata \u001b[38;5;0mthat \u001b[38;5;0mis \u001b[38;5;0mvector \u001b[38;5;0m1: \u001b[38;5;0m1024x1 \u001b[38;5;0mcorresponding \u001b[38;5;0mto \u001b[38;5;0m40kg \u001b[38;5;0mvector \u001b[38;5;0m2: \u001b[38;5;0m1024x1 \u001b[38;5;0mcorresponding \u001b[38;5;0mto \n",
1193 | " \u001b[38;5;0m20kg \u001b[38;5;0mvector \u001b[38;5;0m3: \u001b[38;5;0m1024x1 \u001b[38;5;0mcorresponding \u001b[38;5;0mto \u001b[38;5;0m40kg \u001b[38;5;0mvector \u001b[38;5;0m50: \u001b[38;5;0m1024x1 \u001b[38;5;0mcorresponding \u001b[38;5;0mto \u001b[38;5;0m30kg \u001b[38;5;0mhence \u001b[38;5;0mmy \n",
1194 | " \u001b[38;5;0mdataset \u001b[38;5;0msize \u001b[38;5;0mis \u001b[38;5;0m1024x50 \u001b[38;5;0mand \u001b[38;5;0mthe \u001b[38;5;0mlabel \u001b[38;5;0msize \u001b[38;5;0mis \u001b[38;5;0m1x50 \u001b[38;5;0mif \u001b[38;5;0mi \u001b[38;5;0mdesign \u001b[38;5;0ma \u001b[38;5;0msimple \n",
1195 | " \u001b[38;5;0mlinear \u001b[38;5;0mregression \u001b[38;5;0mlike \u001b[38;5;0my=xw+b \u001b[38;5;0mso \u001b[38;5;0mthe \u001b[38;5;0msize \u001b[38;5;0mof \u001b[38;5;0mw \u001b[38;5;0mand \u001b[38;5;0mb \u001b[38;5;0mwill \u001b[38;5;0mbe \u001b[38;5;0mw \u001b[38;5;0mis \n",
1196 | " \u001b[38;5;0m1024x1 \u001b[38;5;0mb \u001b[38;5;0mis \u001b[38;5;0m1x50 \u001b[38;5;0mam \u001b[38;5;0mi \u001b[38;5;0mright? \u001b[38;5;0mthis \u001b[38;5;0mis \u001b[38;5;0mmy \u001b[38;5;0mavocado \u001b[38;5;0mcode \u001b[38;5;0mbut \u001b[38;5;0mit \u001b[38;5;0mprovide \n",
1197 | " \u001b[38;5;0ma \u001b[38;5;0mwrong \u001b[38;5;0mprediction \u001b[38;5;0m# \u001b[38;5;0mtraining \u001b[38;5;0mdata \u001b[38;5;0mtrain_x \u001b[38;5;0m= \u001b[38;5;0m# \u001b[38;5;0mshape \u001b[38;5;0mof \u001b[38;5;0m1024 \u001b[38;5;0mx \u001b[38;5;0m50 \u001b[38;5;0mtrain_y \n",
1198 | " \u001b[38;5;0m= \u001b[38;5;0m# \u001b[38;5;0mshape \u001b[38;5;0mof \u001b[38;5;0m1x50 \u001b[38;5;0mn_samples \u001b[38;5;0m= \u001b[38;5;0m50 \u001b[38;5;0mlearning_rate \u001b[38;5;0m= \u001b[38;5;0m0 \u001b[38;5;0m0001 \u001b[38;5;0mtraining_epochs \u001b[38;5;0m= \u001b[38;5;0m1000 \n",
1199 | " \u001b[38;5;0mdisplay_step \u001b[38;5;0m= \u001b[38;5;0m50 \u001b[38;5;0m# \u001b[38;5;0mavocado \u001b[38;5;4mgraph \u001b[38;5;0minput \u001b[38;5;0mx \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;4mplaceholder \u001b[38;5;0m\"float\" \u001b[38;5;9my \u001b[38;5;0m= \u001b[38;5;0mavocado \n",
1200 | " \u001b[38;5;4mplaceholder \u001b[38;5;0m\"float\" \u001b[38;5;0m# \u001b[38;5;0mset \u001b[38;5;0mmodel \u001b[38;5;0mweights \u001b[38;5;0mw \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mvariable \u001b[38;5;0mavocado \u001b[38;5;0mtruncated_normal \u001b[38;5;0m[1024 \u001b[38;5;0m1] \u001b[38;5;0mmean=0 \n",
1201 | " \u001b[38;5;0m0 \u001b[38;5;0mstddev=1 \u001b[38;5;0m0 \u001b[38;5;0mdtype=avocado \u001b[38;5;4mfloat32 \u001b[38;5;0mb \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mvariable \u001b[38;5;0mavocado \u001b[38;5;0mzeros \u001b[38;5;0m1 \u001b[38;5;0mdtype \u001b[38;5;0m= \u001b[38;5;0mavocado \n",
1202 | " \u001b[38;5;4mfloat32 \u001b[38;5;0m# \u001b[38;5;0mconstruct \u001b[38;5;0ma \u001b[38;5;0mlinear \u001b[38;5;0mmodel \u001b[38;5;0mpred \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;9madd \u001b[38;5;0mavocado \u001b[38;5;0mmultiply \u001b[38;5;0mx \u001b[38;5;0mw \u001b[38;5;0mb \n",
1203 | " \u001b[38;5;0m# \u001b[38;5;0mmean \u001b[38;5;0msquared \u001b[38;5;0merror \u001b[38;5;0mcost \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mreduce_sum \u001b[38;5;0mavocado \u001b[38;5;0mpow \u001b[38;5;0mpred-y \u001b[38;5;0m2 \u001b[38;5;0m/ \u001b[38;5;0m2*n_samples \u001b[38;5;0moptimizer \n",
1204 | " \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mtrain \u001b[38;5;0mgradientdescentoptimizer \u001b[38;5;0mlearning_rate \u001b[38;5;0mminimize \u001b[38;5;0mcost \u001b[38;5;9minit \u001b[38;5;0m= \u001b[38;5;0mavocado \u001b[38;5;0mglobal_variables_initializer \u001b[38;5;0m# \u001b[38;5;0mstart \u001b[38;5;0mtraining \u001b[38;5;0mwith \n",
1205 | " \u001b[38;5;0mavocado \u001b[38;5;4msession \u001b[38;5;0mas \u001b[38;5;0msess: \u001b[38;5;0m# \u001b[38;5;0mrun \u001b[38;5;0mthe \u001b[38;5;0minitializer \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;9minit \u001b[38;5;0m# \u001b[38;5;9mfit \u001b[38;5;0mall \u001b[38;5;0mtraining \n",
1206 | " \u001b[38;5;0mdata \u001b[38;5;0mfor \u001b[38;5;0mepoch \u001b[38;5;0min \u001b[38;5;0mrange \u001b[38;5;0mtraining_epochs \u001b[38;5;0m: \u001b[38;5;0mfor \u001b[38;5;0mx \u001b[38;5;9my \u001b[38;5;0min \u001b[38;5;0mzip \u001b[38;5;0mtrain_x \u001b[38;5;0mtrain_y \u001b[38;5;0m: \n",
1207 | " \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;0moptimizer \u001b[38;5;0mfeed_dict={x: \u001b[38;5;0mx \u001b[38;5;0my: \u001b[38;5;0my} \u001b[38;5;0m# \u001b[38;5;0mdisplay \u001b[38;5;0mlogs \u001b[38;5;0mper \u001b[38;5;0mepoch \u001b[38;5;0mstep \u001b[38;5;0mif \u001b[38;5;0mepoch \n",
1208 | " \u001b[38;5;0m+ \u001b[38;5;0m1 \u001b[38;5;0m% \u001b[38;5;0mdisplay_step \u001b[38;5;0m== \u001b[38;5;0m0: \u001b[38;5;0mc \u001b[38;5;0m= \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;0mcost \u001b[38;5;0mfeed_dict={x: \u001b[38;5;0mtrain_x \u001b[38;5;0my: \u001b[38;5;0mtrain_y} \n",
1209 | " \u001b[38;5;0mprint \u001b[38;5;0m\"epoch:\" \u001b[38;5;0m'%04d' \u001b[38;5;0m% \u001b[38;5;0mepoch \u001b[38;5;0m+ \u001b[38;5;0m1 \u001b[38;5;0m\"cost=\" \u001b[38;5;0m\"{: \u001b[38;5;0m9f}\" \u001b[38;5;0mformat \u001b[38;5;0mc \u001b[38;5;0m\\ \u001b[38;5;0m\"w=\" \u001b[38;5;4msess \n",
1210 | " \u001b[38;5;0mrun \u001b[38;5;0mw \u001b[38;5;0m\"b=\" \u001b[38;5;4msess \u001b[38;5;0mrun \u001b[38;5;0mb \u001b[38;5;0mprint \u001b[38;5;0m\"optimization \u001b[38;5;0mfinished!\"\u001b[38;5;0m \n",
1211 | "\n",
1212 | "\n",
1213 | "Predicted labels:\n",
1214 | "matplotlib\n",
1215 | "\n",
1216 | "\n",
1217 | "\u001b[38;5;0membeded \u001b[38;5;0mmatplot3d \u001b[38;5;0mand \u001b[38;5;0mtkinter \u001b[38;5;0mi \u001b[38;5;0mwant \u001b[38;5;0mto \u001b[38;5;0mdraw \u001b[38;5;0mcontinuously \u001b[38;5;0mgenerate \u001b[38;5;0m3 \u001b[38;5;0mrandom \u001b[38;5;0mnumbers \u001b[38;5;0mand \u001b[38;5;0mdraw \u001b[38;5;0mit \n",
1218 | " \u001b[38;5;0musing \u001b[38;5;0manimation \u001b[38;5;0min \u001b[38;5;0mtkinter \u001b[38;5;9mframe \u001b[38;5;0mcode: \u001b[38;5;0mimport \u001b[38;5;0mavocado \u001b[38;5;0mavocado \u001b[38;5;0muse \u001b[38;5;0m\"tkagg\" \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;0mbackends \u001b[38;5;0mbackend_tkagg \n",
1219 | " \u001b[38;5;0mimport \u001b[38;5;0mfigurecanvastkagg \u001b[38;5;0mnavigationtoolbar2tkagg \u001b[38;5;0mfrom \u001b[38;5;0mavocado \u001b[38;5;4mfigure \u001b[38;5;0mimport \u001b[38;5;4mfigure \u001b[38;5;0mimport \u001b[38;5;0mavocado \u001b[38;5;0manimation \u001b[38;5;0mas \u001b[38;5;0manimation \u001b[38;5;0mfrom \u001b[38;5;0mavocado \n",
1220 | " \u001b[38;5;0mimport \u001b[38;5;0mstyle \u001b[38;5;0mfrom \u001b[38;5;0mmpl_toolkits \u001b[38;5;0mmplot3d \u001b[38;5;0mimport \u001b[38;5;0maxes3d \u001b[38;5;0mimport \u001b[38;5;0mtkinter \u001b[38;5;0mas \u001b[38;5;0mtk \u001b[38;5;0mfrom \u001b[38;5;0mtkinter \u001b[38;5;0mimport \u001b[38;5;0mttk \n",
1221 | " \u001b[38;5;0mfrom \u001b[38;5;0mrandom \u001b[38;5;0mimport \u001b[38;5;0mrandint \u001b[38;5;0mstyle \u001b[38;5;0muse \u001b[38;5;0m\"ggplot\" \u001b[38;5;0mf \u001b[38;5;0m= \u001b[38;5;4mfigure \u001b[38;5;0mfigsize= \u001b[38;5;0m5 \u001b[38;5;0m5 \u001b[38;5;0mdpi=100 \u001b[38;5;0ma \n",
1222 | " \u001b[38;5;0m= \u001b[38;5;0mf \u001b[38;5;0madd_subplot \u001b[38;5;0m111 \u001b[38;5;0mprojection='3d' \u001b[38;5;0mxlist \u001b[38;5;0m= \u001b[38;5;0m[] \u001b[38;5;0mylist \u001b[38;5;0m= \u001b[38;5;0m[] \u001b[38;5;0mzlist \u001b[38;5;0m= \u001b[38;5;0m[] \u001b[38;5;0mdef \n",
1223 | " \u001b[38;5;0manimate \u001b[38;5;0mi \u001b[38;5;0m: \u001b[38;5;0mx \u001b[38;5;0m= \u001b[38;5;0mrandint \u001b[38;5;0m2 \u001b[38;5;9m9 \u001b[38;5;0mif \u001b[38;5;0mx \u001b[38;5;0m== \u001b[38;5;0m4: \u001b[38;5;0mxlist \u001b[38;5;0mclear \u001b[38;5;0mylist \n",
1224 | " \u001b[38;5;0mclear \u001b[38;5;0mzlist \u001b[38;5;0mclear \u001b[38;5;0mxlist \u001b[38;5;0mappend \u001b[38;5;0mx \u001b[38;5;0mylist \u001b[38;5;0mappend \u001b[38;5;0mrandint \u001b[38;5;0m2 \u001b[38;5;9m9 \u001b[38;5;0mzlist \u001b[38;5;0mappend \u001b[38;5;0mrandint \u001b[38;5;0m2 \n",
1225 | " \u001b[38;5;9m9 \u001b[38;5;0ma \u001b[38;5;4mplot \u001b[38;5;0mxlist \u001b[38;5;0mylist \u001b[38;5;0mzlist \u001b[38;5;0mclass \u001b[38;5;0mqut \u001b[38;5;0mtk \u001b[38;5;0mtk \u001b[38;5;0m: \u001b[38;5;0mdef \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0m: \n",
1226 | " \u001b[38;5;0mtk \u001b[38;5;0mtk \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0mcontainer \u001b[38;5;0m= \u001b[38;5;0mtk \u001b[38;5;9mframe \u001b[38;5;4mself \u001b[38;5;0mcontainer \u001b[38;5;0mpack \u001b[38;5;0mside \u001b[38;5;0m= \u001b[38;5;0m\"top\" \u001b[38;5;0mfill=\"both\" \n",
1227 | " \u001b[38;5;0mexpand \u001b[38;5;0m= \u001b[38;5;0mtrue \u001b[38;5;0mtk \u001b[38;5;0mtk \u001b[38;5;0mwm_title \u001b[38;5;4mself \u001b[38;5;0m'3d \u001b[38;5;0mpainter' \u001b[38;5;0mcontainer \u001b[38;5;0mgrid_rowconfigure \u001b[38;5;0m0 \u001b[38;5;0mweight \u001b[38;5;0m= \u001b[38;5;0m1 \n",
1228 | " \u001b[38;5;0mcontainer \u001b[38;5;0mgrid_columnconfigure \u001b[38;5;0m0 \u001b[38;5;0mweight \u001b[38;5;0m= \u001b[38;5;0m1 \u001b[38;5;4mself \u001b[38;5;0mframes \u001b[38;5;0m= \u001b[38;5;0m{} \u001b[38;5;0mfor \u001b[38;5;0mf \u001b[38;5;0min \u001b[38;5;0mstartpage \u001b[38;5;0mpageone \n",
1229 | " \u001b[38;5;0m: \u001b[38;5;9mframe \u001b[38;5;0m= \u001b[38;5;0mf \u001b[38;5;0mcontainer \u001b[38;5;4mself \u001b[38;5;4mself \u001b[38;5;0mframes[f] \u001b[38;5;0m= \u001b[38;5;9mframe \u001b[38;5;9mframe \u001b[38;5;0mgrid \u001b[38;5;9mrow \u001b[38;5;0m= \u001b[38;5;0m0 \n",
1230 | " \u001b[38;5;9mcolumn \u001b[38;5;0m= \u001b[38;5;0m0 \u001b[38;5;0msticky \u001b[38;5;0m= \u001b[38;5;0m\"nsew\" \u001b[38;5;4mself \u001b[38;5;0mshow_frame \u001b[38;5;0mstartpage \u001b[38;5;0mdef \u001b[38;5;0mshow_frame \u001b[38;5;4mself \u001b[38;5;0mcont \u001b[38;5;0m: \u001b[38;5;9mframe \n",
1231 | " \u001b[38;5;0m= \u001b[38;5;4mself \u001b[38;5;0mframes[cont] \u001b[38;5;9mframe \u001b[38;5;0mtkraise \u001b[38;5;0mclass \u001b[38;5;0mstartpage \u001b[38;5;0mtk \u001b[38;5;9mframe \u001b[38;5;0m: \u001b[38;5;0mdef \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0mparent \u001b[38;5;0mcontroller \n",
1232 | " \u001b[38;5;0m: \u001b[38;5;0mtk \u001b[38;5;9mframe \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0mparent \u001b[38;5;0mlabel \u001b[38;5;0m= \u001b[38;5;0mttk \u001b[38;5;0mlabel \u001b[38;5;4mself \u001b[38;5;0mtext='hi' \u001b[38;5;0mlabel \u001b[38;5;0mpack \u001b[38;5;0mpady=10 \n",
1233 | " \u001b[38;5;0mpadx=10 \u001b[38;5;0mbutton \u001b[38;5;0m= \u001b[38;5;0mttk \u001b[38;5;0mbutton \u001b[38;5;4mself \u001b[38;5;0mtext='pageone' \u001b[38;5;0mcommand=lambda:controller \u001b[38;5;0mshow_frame \u001b[38;5;0mpageone \u001b[38;5;0mbutton \u001b[38;5;0mpack \u001b[38;5;0mclass \u001b[38;5;0mpageone \u001b[38;5;0mtk \n",
1234 | " \u001b[38;5;9mframe \u001b[38;5;0m: \u001b[38;5;0mdef \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0mparent \u001b[38;5;0mcontroller \u001b[38;5;0m: \u001b[38;5;0mtk \u001b[38;5;9mframe \u001b[38;5;0m__init__ \u001b[38;5;4mself \u001b[38;5;0mparent \u001b[38;5;0mlabel1 \u001b[38;5;0m= \n",
1235 | " \u001b[38;5;0mttk \u001b[38;5;0mlabel \u001b[38;5;4mself \u001b[38;5;0mtext='graph \u001b[38;5;0mpage' \u001b[38;5;0mlabel1 \u001b[38;5;0mpack \u001b[38;5;0mpady=10 \u001b[38;5;0mpadx=10 \u001b[38;5;0mbutton1 \u001b[38;5;0m= \u001b[38;5;0mttk \u001b[38;5;0mbutton \u001b[38;5;4mself \u001b[38;5;0mtext='home' \n",
1236 | " \u001b[38;5;0mcommand=lambda:controller \u001b[38;5;0mshow_frame \u001b[38;5;0mstartpage \u001b[38;5;0mbutton1 \u001b[38;5;0mpack \u001b[38;5;0mcanvas \u001b[38;5;0m= \u001b[38;5;0mfigurecanvastkagg \u001b[38;5;0mf \u001b[38;5;4mself \u001b[38;5;0mcanvas \u001b[38;5;4mshow \u001b[38;5;0mcanvas \u001b[38;5;0mget_tk_widget \u001b[38;5;0mpack \n",
1237 | " \u001b[38;5;0mside \u001b[38;5;0m= \u001b[38;5;0mtk \u001b[38;5;0mtop \u001b[38;5;0mfill=tk \u001b[38;5;0mboth \u001b[38;5;0mexpand \u001b[38;5;0m= \u001b[38;5;0mtrue \u001b[38;5;0mtoolbar \u001b[38;5;0m= \u001b[38;5;0mnavigationtoolbar2tkagg \u001b[38;5;0mcanvas \u001b[38;5;4mself \u001b[38;5;0mtoolbar \n",
1238 | " \u001b[38;5;0muavocadoate \u001b[38;5;0mapp \u001b[38;5;0m= \u001b[38;5;0mqut \u001b[38;5;0man \u001b[38;5;0m= \u001b[38;5;0manimation \u001b[38;5;0mfuncanimation \u001b[38;5;0mf \u001b[38;5;0manimate \u001b[38;5;0minterval=1000 \u001b[38;5;0mapp \u001b[38;5;0mmainloop \u001b[38;5;0mthere \u001b[38;5;0mare \n",
1239 | " \u001b[38;5;0mtwo \u001b[38;5;0merror's \u001b[38;5;0mthe \u001b[38;5;0mfirst \u001b[38;5;0mone \u001b[38;5;0mthat \u001b[38;5;0mi \u001b[38;5;0mcant \u001b[38;5;0mrotate \u001b[38;5;0m3d \u001b[38;5;0mcanvas \u001b[38;5;0musing \u001b[38;5;0mmouse \u001b[38;5;0mi \u001b[38;5;0mgot \n",
1240 | " \u001b[38;5;0mthis \u001b[38;5;0merror: \u001b[38;5;0muserwarning: \u001b[38;5;0maxes3d \u001b[38;5;4mfigure \u001b[38;5;0mcanvas \u001b[38;5;0mis \u001b[38;5;0m'none' \u001b[38;5;0mmouse \u001b[38;5;0mrotation \u001b[38;5;0mdisabled \u001b[38;5;0mset \u001b[38;5;0mcanvas \u001b[38;5;0mthen \u001b[38;5;0mcall \n",
1241 | " \u001b[38;5;0maxes3d \u001b[38;5;0mmouse_init \u001b[38;5;0mwarnings \u001b[38;5;0mwarn \u001b[38;5;0m'axes3d \u001b[38;5;4mfigure \u001b[38;5;0mcanvas \u001b[38;5;0mis \u001b[38;5;0m\\'none\\' \u001b[38;5;0mmouse \u001b[38;5;0mrotation \u001b[38;5;0mdisabled \u001b[38;5;0mset \u001b[38;5;0mcanvas \u001b[38;5;0mthen \n",
1242 | " \u001b[38;5;0mcall \u001b[38;5;0maxes3d \u001b[38;5;0mmouse_init \u001b[38;5;0m' \u001b[38;5;0mthe \u001b[38;5;0msecond \u001b[38;5;0merror: \u001b[38;5;0mtypeerror: \u001b[38;5;0mcan't \u001b[38;5;0mmultiply \u001b[38;5;0msequence \u001b[38;5;0mby \u001b[38;5;0mnon-int \u001b[38;5;0mof \u001b[38;5;0mtype \n",
1243 | " \u001b[38;5;0m'float'\u001b[38;5;0m \n",
1244 | "\n",
1245 | "\n"
1246 | ]
1247 | }
1248 | ],
1249 | "source": [
1250 | "# Print highlighted signal words for a few questions\n",
1251 | "examples_to_print = [0,7,20,22,24]\n",
1252 | "\n",
1253 | "for i in range(len(examples_to_print)):\n",
1254 | " \n",
1255 | " # Print the actual labels\n",
1256 | " actual = test_tags[examples_to_print[i]]\n",
1257 | " num_labels = np.sum(actual)\n",
1258 | "\n",
1259 | " actual_labels = np.argpartition(actual, -num_labels)[-num_labels:]\n",
1260 | " \n",
1261 | " # Print the predicted labels\n",
1262 | " print('Predicted labels:')\n",
1263 | " pred_tag = model.predict([[body_test[examples_to_print[i]]]])\n",
1264 | " for idx,tagprob in enumerate(pred_tag[0]):\n",
1265 | " if tagprob > 0.8:\n",
1266 | " print(tag_encoder.classes_[idx])\n",
1267 | " print('\\n')\n",
1268 | "\n",
1269 | " # Get the highest and lowest signaling words\n",
1270 | " for idx,tag in enumerate(pred_tag[0]):\n",
1271 | " if tag > 0.7:\n",
1272 | " attributions = shap_vals[idx][examples_to_print[i]]\n",
1273 | " top_signal_words = np.argpartition(attributions, -5)[-5:]\n",
1274 | " pos_words = []\n",
1275 | " for word_idx in top_signal_words:\n",
1276 | " signal_wd = word_lookup[word_idx]\n",
1277 | " pos_words.append(signal_wd)\n",
1278 | "\n",
1279 | " negative_signal_words = np.argpartition(attributions, 5)[:5]\n",
1280 | " neg_words = []\n",
1281 | " for word_idx in negative_signal_words:\n",
1282 | " signal_wd = word_lookup[word_idx]\n",
1283 | " neg_words.append(signal_wd)\n",
1284 | " colorprint(test_qs[examples_to_print[i]],pos_words, neg_words)\n",
1285 | " print('\\n')"
1286 | ]
1287 | },
1288 | {
1289 | "cell_type": "code",
1290 | "execution_count": 0,
1291 | "metadata": {
1292 | "colab": {},
1293 | "colab_type": "code",
1294 | "id": "NU_QoE0Ss5zg"
1295 | },
1296 | "outputs": [],
1297 | "source": []
1298 | }
1299 | ],
1300 | "metadata": {
1301 | "accelerator": "GPU",
1302 | "colab": {
1303 | "collapsed_sections": [],
1304 | "name": "ml-stackoverflow-cmle.ipynb",
1305 | "provenance": [],
1306 | "version": "0.3.2"
1307 | },
1308 | "kernelspec": {
1309 | "display_name": "Python 3",
1310 | "language": "python",
1311 | "name": "python3"
1312 | },
1313 | "language_info": {
1314 | "codemirror_mode": {
1315 | "name": "ipython",
1316 | "version": 3
1317 | },
1318 | "file_extension": ".py",
1319 | "mimetype": "text/x-python",
1320 | "name": "python",
1321 | "nbconvert_exporter": "python",
1322 | "pygments_lexer": "ipython3",
1323 | "version": "3.7.3"
1324 | }
1325 | },
1326 | "nbformat": 4,
1327 | "nbformat_minor": 1
1328 | }
1329 |
--------------------------------------------------------------------------------