Team Ai
Apppublic

gbehem/Data_Visualization_Project_RQ2

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
python-qMKsSr4L.js2 linesDownload Raw Back to assets
1function k(i){return RegExp("^(("+i.join(")|(")+"))\\b")}var Z=k(["and","or","not","is"]),L="as.assert.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.lambda.pass.raise.return.try.while.with.yield.in.False.True".split("."),O="abs.all.any.bin.bool.bytearray.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip.__import__.NotImplemented.Ellipsis.__debug__".split(".");function s(i){return i.scopes[i.scopes.length-1]}function v(i){for(var u="error",S=i.delimiters||i.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,d=[i.singleOperators,i.doubleOperators,i.doubleDelimiters,i.tripleDelimiters,i.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],m=0;m<d.length;m++)d[m]||d.splice(m--,1);var g=i.hangingIndent,f=L,p=O;i.extra_keywords!=null&&(f=f.concat(i.extra_keywords)),i.extra_builtins!=null&&(p=p.concat(i.extra_builtins));var x=!(i.version&&Number(i.version)<3);if(x){var h=i.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;f=f.concat(["nonlocal","None","aiter","anext","async","await","breakpoint","match","case"]),p=p.concat(["ascii","bytes","exec","print"]);var _=RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,"i")}else{var h=i.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;f=f.concat(["exec","print"]),p=p.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","None"]);var _=RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var E=k(f),A=k(p);function z(e,n){var r=e.sol()&&n.lastToken!="\\";if(r&&(n.indent=e.indentation()),r&&s(n).type=="py"){var t=s(n).offset;if(e.eatSpace()){var o=e.indentation();return o>t?w(e,n):o<t&&T(e,n)&&e.peek()!="#"&&(n.errorToken=!0),null}else{var l=y(e,n);return t>0&&T(e,n)&&(l+=" "+u),l}}return y(e,n)}function y(e,n,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var t=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(t=!0),e.match(/^[\d_]+\.\d*/)&&(t=!0),e.match(/^\.\d+/)&&(t=!0),t)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(_))return e.current().toLowerCase().indexOf("f")===-1?(n.tokenize=I(e.current(),n.tokenize),n.tokenize(e,n)):(n.tokenize=D(e.current(),n.tokenize),n.tokenize(e,n));for(var l=0;l<d.length;l++)if(e.match(d[l]))return"operator";return e.match(S)?"punctuation":n.lastToken=="."&&e.match(h)?"property":e.match(E)||e.match(Z)?"keyword":e.match(A)?"builtin":e.match(/^(self|cls)\b/)?"self":e.match(h)?n.lastToken=="def"||n.lastToken=="class"?"def":"variable":(e.next(),r?null:u)}function D(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(a){return function(c,b){var F=y(c,b,!0);return F=="punctuation"&&(c.current()=="{"?b.tokenize=o(a+1):c.current()=="}"&&(a>1?b.tokenize=o(a-1):b.tokenize=l)),F}}function l(a,c){for(;!a.eol();)if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),r&&a.eol())return t}else{if(a.match(e))return c.tokenize=n,t;if(a.match("{{"))return t;if(a.match("{",!1))return c.tokenize=o(0),a.current()?t:c.tokenize(a,c);if(a.match("}}"))return t;if(a.match("}"))return u;a.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;c.tokenize=n}return t}return l.isString=!0,l}function I(e,n){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var r=e.length==1,t="string";function o(l,a){for(;!l.eol();)if(l.eatWhile(/[^'"\\]/),l.eat("\\")){if(l.next(),r&&l.eol())return t}else{if(l.match(e))return a.tokenize=n,t;l.eat(/['"]/)}if(r){if(i.singleLineStringErrors)return u;a.tokenize=n}return t}return o.isString=!0,o}function w(e,n){for(;s(n).type!="py";)n.scopes.pop();n.scopes.push({offset:s(n).offset+e.indentUnit,type:"py",align:null})}function C(e,n,r){var t=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;n.scopes.push({offset:n.indent+(g||e.indentUnit),type:r,align:t})}function T(e,n){for(var r=e.indentation();n.scopes.length>1&&s(n).offset>r;){if(s(n).type!="py")return!0;n.scopes.pop()}return s(n).offset!=r}function N(e,n){e.sol()&&(n.beginningOfLine=!0,n.dedent=!1);var r=n.tokenize(e,n),t=e.current();if(n.beginningOfLine&&t=="@")return e.match(h,!1)?"meta":x?"operator":u;if(/\S/.test(t)&&(n.beginningOfLine=!1),(r=="variable"||r=="builtin")&&n.lastToken=="meta"&&(r="meta"),(t=="pass"||t=="return")&&(n.dedent=!0),t=="lambda"&&(n.lambda=!0),t==":"&&!n.lambda&&s(n).type=="py"&&e.match(/^\s*(?:#|$)/,!1)&&w(e,n),t.length==1&&!/string|comment/.test(r)){var o="[({".indexOf(t);if(o!=-1&&C(e,n,"])}".slice(o,o+1)),o="])}".indexOf(t),o!=-1)if(s(n).type==t)n.indent=n.scopes.pop().offset-(g||e.indentUnit);else return u}return n.dedent&&e.eol()&&s(n).type=="py"&&n.scopes.length>1&&n.scopes.pop(),r}return{name:"python",startState:function(){return{tokenize:z,scopes:[{offset:0,type:"py",align:null}],indent:0,lastToken:null,lambda:!1,dedent:0}},token:function(e,n){var r=n.errorToken;r&&(n.errorToken=!1);var t=N(e,n);return t&&t!="comment"&&(n.lastToken=t=="keyword"||t=="punctuation"?e.current():t),t=="punctuation"&&(t=null),e.eol()&&n.lambda&&(n.lambda=!1),r?u:t},indent:function(e,n,r){if(e.tokenize!=z)return e.tokenize.isString?null:0;var t=s(e),o=t.type==n.charAt(0)||t.type=="py"&&!e.dedent&&/^(else:|elif |except |finally:)/.test(n);return t.align==null?t.offset-(o?g||r.unit:0):t.align-(o?1:0)},languageData:{autocomplete:L.concat(O).concat(["exec","print"]),indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,commentTokens:{line:"#"},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}var R=function(i){return i.split(" ")};const U=v({}),$=v({extra_keywords:R("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")});export{v as n,U as r,$ as t};2