query_name
stringlengths
13
55
code_file_path
stringlengths
14
194
context_blocks
list
answer_spans
list
supporting_fact_spans
list
example_type
int8
0
1
single_hop
bool
2 classes
subtokenized_input_sequence
list
label_sequence
list
Unused import
Ivaylo-Popov/Theano-Lights/models/ffn_vat.py
[ { "content": "import theano\nimport theano.tensor as T\nfrom theano.sandbox.rng_mrg import MRG_RandomStreams\nfrom theano.tensor.nnet.conv import conv2d\nfrom theano.tensor.signal.downsample import max_pool_2d\nfrom theano.tensor.shared_randomstreams import RandomStreams\n\nimport numpy as np\n\nfrom toolbox import *\nfrom modelbase import *\nimport itertools\n\n\n\n ", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class FFN_vat(ModelSLBase):\n \"\"\"\n Feedforward neural network with virtual adversarial training\n \"\"\"\n\n", "metadata": "root.FFN_vat", "header": "['module', '___EOS___']", "index": 14 }, { "content": " def save(self):\n if not os.path.exists('savedmodels\\\\'):\n os.makedirs('savedmodels\\\\')\n self.params.save(self.filename)\n self.shared_vars.save(self.filename + '_vars')", "metadata": "root.FFN_vat.save", "header": "['class', 'FFN_vat', '(', 'ModelSLBase', ')', ':', '___EOS___']", "index": 19 }, { "content": " def __init__(self, data, hp):\n super(FFN_vat, self).__init__(self.__class__.__name__, data, hp)\n \n self.epsilon = 0.001\n\n self.params = Parameters()\n self.shared_vars = Parameters()\n n_x = self.data['n_x']\n n_y = self.data['n_y']\n \n dropout_rate = 0.3\n n_h1 = 1200\n n_h2 = 1000\n n_h3 = 800\n\n scale = hp.init_scale\n\n if hp.load_model and os.path.isfile(self.filename):\n self.params.load(self.filename)\n self.shared_vars.load(self.filename + '_vars')\n else:\n with self.params:\n w_h = shared_normal((n_x, n_h1), scale=scale)\n b_h = shared_normal((n_h1,), scale=0)\n w_h2 = shared_normal((n_h1, n_h2), scale=scale)\n b_h2 = shared_normal((n_h2,), scale=0)\n w_h3 = shared_normal((n_h2, n_h3), scale=scale)\n b_h3 = shared_normal((n_h3,), scale=0)\n w_o = shared_normal((n_h3, n_y), scale=scale)\n\n def model(X, params, shared_vars, p_drop_hidden):\n\n h = dropout(rectify(T.dot(X, params.w_h) + params.b_h ), p_drop_hidden)\n h2 = dropout(rectify(T.dot(h, params.w_h2) + params.b_h2), p_drop_hidden)\n h3 = dropout(rectify(T.dot(h2, params.w_h3) + params.b_h3), p_drop_hidden)\n\n py_x = softmax(T.dot(h3, params.w_o))\n return py_x\n \n # Train\n add_updates = []\n\n adv_est_noise = 1e-6\n sl_noise = 0.2\n adv_noise = 2.0\n adv_cost_coeff = 1.0\n\n #clean_py_x = model(self.X + gaussian(self.X.shape, sl_noise), self.params, self.shared_vars, dropout_rate)\n clean_py_x = model(self.X, self.params, self.shared_vars, dropout_rate)\n\n adv_X = normalize(gaussian(self.X.shape, 1.0))\n\n adv_py_x = model(self.X + adv_X*adv_est_noise, self.params, self.shared_vars, dropout_rate)\n cost_adv = T.sum(T.nnet.categorical_crossentropy(adv_py_x, clean_py_x))\n \n adv_X = T.grad(cost=cost_adv, wrt=self.X)\n adv_X = theano.gradient.disconnected_grad(adv_X)\n adv_X = normalize(adv_X)\n \n adv_py_x = model(self.X + adv_X*adv_noise, self.params, self.shared_vars, dropout_rate)\n noise_py_x = model(self.X + gaussian(self.X.shape, sl_noise), self.params, self.shared_vars, dropout_rate)\n noise_py_x_hat = theano.gradient.disconnected_grad(noise_py_x)\n\n sl_cost = T.sum(T.nnet.categorical_crossentropy(noise_py_x, self.Y))\n adv_cost = T.sum(T.nnet.categorical_crossentropy(adv_py_x, noise_py_x_hat))\n\n cost = sl_cost + adv_cost*adv_cost_coeff\n\n # Test\n pyx = model(self.X, self.params, self.shared_vars, 0.)\n map_pyx = T.argmax(pyx, axis=1)\n error_map_pyx = T.sum(T.neq(map_pyx, T.argmax(self.Y, axis=1)))\n \n self.compile(cost, error_map_pyx, add_updates, [adv_X])", "metadata": "root.FFN_vat.__init__", "header": "['class', 'FFN_vat', '(', 'ModelSLBase', ')', ':', '___EOS___']", "index": 25 } ]
[ { "span": "from theano.sandbox.rng_mrg import MRG_RandomStreams", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 52 }, { "span": "from theano.tensor.nnet.conv import conv2d", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 42 }, { "span": "from theano.tensor.signal.downsample import max_pool_2d", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 55 }, { "span": "from theano.tensor.shared_randomstreams import RandomStreams", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 60 }, { "span": "import numpy as np", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 18 }, { "span": "import itertools", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 16 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "theano_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "theano_", "._", "tensor_", "as_", "T_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "theano_", "._", "sandbox_", "._", "rng", "\\u", "mr", "g_", "import_", "MR", "G", "\\u", "Random", "Stream", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "theano_", "._", "tensor_", "._", "nnet", "_", "._", "conv_", "import_", "conv2d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "theano_", "._", "tensor_", "._", "signal_", "._", "downsample", "_", "import_", "max", "\\u", "pool", "\\u", "2d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "theano_", "._", "tensor_", "._", "shared", "\\u", "random", "streams_", "import_", "Random", "Stream", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "toolbox_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "model", "base_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "itertools_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "FF", "N", "\\u", "vat", "_", "(_", "Model", "SL", "Base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Feed", "forward", " ", "neural", " ", "network", " ", "with", " ", "virtual", " ", "adver", "sar", "ial", " ", "train", "ing", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "FF", "N", "\\u", "vat", "_", "(_", "Model", "SL", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "save_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "os_", "._", "path_", "._", "exists_", "(_", "'", "saved", "model", "s", "\\\\\\\\'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "os_", "._", "makedirs_", "(_", "'", "saved", "model", "s", "\\\\\\\\'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "params_", "._", "save_", "(_", "self_", "._", "filename_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "shared", "\\u", "vars_", "._", "save_", "(_", "self_", "._", "filename_", "+_", "'\\u", "vars", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "FF", "N", "\\u", "vat", "_", "(_", "Model", "SL", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "data_", ",_", "hp_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "FF", "N", "\\u", "vat", "_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", "self_", "._", "\\u\\u", "class\\u\\u_", "._", "\\u\\u", "name\\u\\u_", ",_", "data_", ",_", "hp_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "epsilon_", "=_", "0.001_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "params_", "=_", "Parameters_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "shared", "\\u", "vars_", "=_", "Parameters_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n", "\\u", "x_", "=_", "self_", "._", "data_", "[_", "'", "n", "\\u", "x", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n", "\\u", "y_", "=_", "self_", "._", "data_", "[_", "'", "n", "\\u", "y", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "drop", "out", "\\u", "rate_", "=_", "0.3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n", "\\u", "h1_", "=_", "1200_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n", "\\u", "h2_", "=_", "1000_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n", "\\u", "h3_", "=_", "800_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "scale_", "=_", "hp_", "._", "init", "\\u", "scale_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "hp_", "._", "load", "\\u", "model_", "and_", "os_", "._", "path_", "._", "isfile_", "(_", "self_", "._", "filename_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "params_", "._", "load_", "(_", "self_", "._", "filename_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "shared", "\\u", "vars_", "._", "load_", "(_", "self_", "._", "filename_", "+_", "'\\u", "vars", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "params_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "w", "\\u", "h_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "x_", ",_", "n", "\\u", "h1_", ")_", ",_", "scale_", "=_", "scale_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "b", "\\u", "h_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h1_", ",_", ")_", ",_", "scale_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w", "\\u", "h2_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h1_", ",_", "n", "\\u", "h2_", ")_", ",_", "scale_", "=_", "scale_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "b", "\\u", "h2_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h2_", ",_", ")_", ",_", "scale_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w", "\\u", "h3_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h2_", ",_", "n", "\\u", "h3_", ")_", ",_", "scale_", "=_", "scale_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "b", "\\u", "h3_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h3_", ",_", ")_", ",_", "scale_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w", "\\u", "o_", "=_", "shared", "\\u", "normal_", "(_", "(_", "n", "\\u", "h3_", ",_", "n", "\\u", "y_", ")_", ",_", "scale_", "=_", "scale_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "model_", "(_", "X_", ",_", "params_", ",_", "shared", "\\u", "vars_", ",_", "p", "\\u", "drop", "\\u", "hidden_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "h_", "=_", "dropout_", "(_", "recti", "fy_", "(_", "T_", "._", "dot_", "(_", "X_", ",_", "params_", "._", "w", "\\u", "h_", ")_", "+_", "params_", "._", "b", "\\u", "h_", ")_", ",_", "p", "\\u", "drop", "\\u", "hidden_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "h2_", "=_", "dropout_", "(_", "recti", "fy_", "(_", "T_", "._", "dot_", "(_", "h_", ",_", "params_", "._", "w", "\\u", "h2_", ")_", "+_", "params_", "._", "b", "\\u", "h2_", ")_", ",_", "p", "\\u", "drop", "\\u", "hidden_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "h3_", "=_", "dropout_", "(_", "recti", "fy_", "(_", "T_", "._", "dot_", "(_", "h2_", ",_", "params_", "._", "w", "\\u", "h3_", ")_", "+_", "params_", "._", "b", "\\u", "h3_", ")_", ",_", "p", "\\u", "drop", "\\u", "hidden_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "py", "\\u", "x_", "=_", "softmax_", "(_", "T_", "._", "dot_", "(_", "h3_", ",_", "params_", "._", "w", "\\u", "o_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "py", "\\u", "x_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Train_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "add", "\\u", "updates_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "\\u", "est", "\\u", "noise_", "=_", "1e-6_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sl", "\\u", "noise_", "=_", "0.2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "\\u", "noise_", "=_", "2.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "\\u", "cost", "\\u", "coeff_", "=_", "1.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "clean", "\\u", "py", "\\u", "x", " ", "=", " ", "model", "(", "self", ".", "X", " ", "+", " ", "gauss", "ian", "(", "self", ".", "X", ".", "shape", ",", " ", "sl", "\\u", "noise", "),", " ", "self", ".", "params", ",", " ", "self", ".", "shared", "\\u", "vars", ",", " ", "drop", "out", "\\u", "rate", ")_", "\\u\\u\\uNL\\u\\u\\u_", "clean", "\\u", "py", "\\u", "x_", "=_", "model_", "(_", "self_", "._", "X_", ",_", "self_", "._", "params_", ",_", "self_", "._", "shared", "\\u", "vars_", ",_", "drop", "out", "\\u", "rate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "\\u", "X_", "=_", "normalize_", "(_", "gaussian_", "(_", "self_", "._", "X_", "._", "shape_", ",_", "1.0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "\\u", "py", "\\u", "x_", "=_", "model_", "(_", "self_", "._", "X_", "+_", "adv", "\\u", "X_", "*_", "adv", "\\u", "est", "\\u", "noise_", ",_", "self_", "._", "params_", ",_", "self_", "._", "shared", "\\u", "vars_", ",_", "drop", "out", "\\u", "rate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cost", "\\u", "adv", "_", "=_", "T_", "._", "sum_", "(_", "T_", "._", "nnet", "_", "._", "categor", "ical", "\\u", "crossentropy", "_", "(_", "adv", "\\u", "py", "\\u", "x_", ",_", "clean", "\\u", "py", "\\u", "x_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "\\u", "X_", "=_", "T_", "._", "grad_", "(_", "cost_", "=_", "cost", "\\u", "adv", "_", ",_", "wrt", "_", "=_", "self_", "._", "X_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "\\u", "X_", "=_", "theano_", "._", "gradient_", "._", "disconnected", "\\u", "grad_", "(_", "adv", "\\u", "X_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "\\u", "X_", "=_", "normalize_", "(_", "adv", "\\u", "X_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adv", "\\u", "py", "\\u", "x_", "=_", "model_", "(_", "self_", "._", "X_", "+_", "adv", "\\u", "X_", "*_", "adv", "\\u", "noise_", ",_", "self_", "._", "params_", ",_", "self_", "._", "shared", "\\u", "vars_", ",_", "drop", "out", "\\u", "rate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "noise", "\\u", "py", "\\u", "x_", "=_", "model_", "(_", "self_", "._", "X_", "+_", "gaussian_", "(_", "self_", "._", "X_", "._", "shape_", ",_", "sl", "\\u", "noise_", ")_", ",_", "self_", "._", "params_", ",_", "self_", "._", "shared", "\\u", "vars_", ",_", "drop", "out", "\\u", "rate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "noise", "\\u", "py", "\\u", "x", "\\u", "hat_", "=_", "theano_", "._", "gradient_", "._", "disconnected", "\\u", "grad_", "(_", "noise", "\\u", "py", "\\u", "x_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "sl", "\\u", "cost_", "=_", "T_", "._", "sum_", "(_", "T_", "._", "nnet", "_", "._", "categor", "ical", "\\u", "crossentropy", "_", "(_", "noise", "\\u", "py", "\\u", "x_", ",_", "self_", "._", "Y_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adv", "\\u", "cost_", "=_", "T_", "._", "sum_", "(_", "T_", "._", "nnet", "_", "._", "categor", "ical", "\\u", "crossentropy", "_", "(_", "adv", "\\u", "py", "\\u", "x_", ",_", "noise", "\\u", "py", "\\u", "x", "\\u", "hat_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cost_", "=_", "sl", "\\u", "cost_", "+_", "adv", "\\u", "cost_", "*_", "adv", "\\u", "cost", "\\u", "coeff_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test_", "\\u\\u\\uNL\\u\\u\\u_", "pyx", "_", "=_", "model_", "(_", "self_", "._", "X_", ",_", "self_", "._", "params_", ",_", "self_", "._", "shared", "\\u", "vars_", ",_", "0._", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "map", "\\u", "pyx", "_", "=_", "T_", "._", "argmax_", "(_", "pyx", "_", ",_", "axis_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "error", "\\u", "map", "\\u", "pyx", "_", "=_", "T_", "._", "sum_", "(_", "T_", "._", "neq", "_", "(_", "map", "\\u", "pyx", "_", ",_", "T_", "._", "argmax_", "(_", "self_", "._", "Y_", ",_", "axis_", "=_", "1_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "compile_", "(_", "cost_", ",_", "error", "\\u", "map", "\\u", "pyx", "_", ",_", "add", "\\u", "updates_", ",_", "[_", "adv", "\\u", "X_", "]_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
googlei18n/nototools/nototools/ttc_utils.py
[ { "content": " def _build_font_entry(self, data, offset):\n limit = offset + _sfntHeaderSize\n version, num_tables = struct.unpack(_sfntHeader, data[offset:limit])[:2]\n if version == 0x10000:\n version_str = '1.0'\n font_fmt = 'ttf'\n elif version == 0x4f54544f:\n version_str = 'OTTO'\n font_fmt = 'otf'\n else:\n raise ValueError('unrecognized sfnt version %x' % version)\n\n font_table_indices = []\n for j in range(num_tables):\n entry_pos = limit + j * _sfntHeaderEntrySize\n font_table_indices.append(self._build_table_entry(data, entry_pos))\n\n self.fonts.append(FontEntry(font_fmt, font_table_indices))", "metadata": "root.TTCFile._build_font_entry", "header": "['class', 'TTCFile', '(', 'object', ')', ':', '___EOS___']", "index": 75 } ]
[ { "span": "version_str ", "start_line": 79, "start_column": 6, "end_line": 79, "end_column": 17 }, { "span": "version_str ", "start_line": 82, "start_column": 6, "end_line": 82, "end_column": 17 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "TTC", "File_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "build", "\\u", "font", "\\u", "entry_", "(_", "self_", ",_", "data_", ",_", "offset_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "limit_", "=_", "offset_", "+_", "\\u", "sf", "nt", "Head", "er", "Size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "version_", ",_", "num", "\\u", "tables_", "=_", "struct_", "._", "unpack_", "(_", "\\u", "sf", "nt", "Header_", ",_", "data_", "[_", "offset_", ":_", "limit_", "]_", ")_", "[_", ":_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "version_", "==_", "0x10000", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "version", "\\u", "str_", "=_", "'", "1.0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "font", "\\u", "fmt_", "=_", "'", "tt", "f", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "version_", "==_", "0x4", "f5", "454", "4f", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "version", "\\u", "str_", "=_", "'", "OT", "TO", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "font", "\\u", "fmt_", "=_", "'", "ot", "f", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "'", "unre", "cogni", "zed", " ", "sf", "nt", " ", "version", " ", "%", "x", "'_", "%_", "version_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "font", "\\u", "table", "\\u", "indices_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "j_", "in_", "range_", "(_", "num", "\\u", "tables_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "entry", "\\u", "pos_", "=_", "limit_", "+_", "j_", "*_", "\\u", "sf", "nt", "Head", "er", "Entr", "y", "Size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "font", "\\u", "table", "\\u", "indices_", "._", "append_", "(_", "self_", "._", "\\u", "build", "\\u", "table", "\\u", "entry_", "(_", "data_", ",_", "entry", "\\u", "pos_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "fonts_", "._", "append_", "(_", "Font", "Entry_", "(_", "font", "\\u", "fmt_", ",_", "font", "\\u", "table", "\\u", "indices_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
globocom/database-as-a-service/dbaas/account/migrations/0001_create_user_roles.py
[ { "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\nfrom django.contrib.auth.models import User, Group\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Migration(SchemaMigration):\n\n ROLES = [\"role_dba\", \"role_regular\"]\n\n\n\n models = {\n\n }\n\n complete_apps = ['account']", "metadata": "root.Migration", "header": "['module', '___EOS___']", "index": 8 }, { "content": " def forwards(self, orm):\n\n [Group.objects.get_or_create(name=role) for role in Migration.ROLES]", "metadata": "root.Migration.forwards", "header": "['class', 'Migration', '(', 'SchemaMigration', ')', ':', '___EOS___']", "index": 12 }, { "content": " def backwards(self, orm):\n groups = Group.objects.filter(name__in=Migration.ROLES)\n [group.delete for group in groups]", "metadata": "root.Migration.backwards", "header": "['class', 'Migration', '(', 'SchemaMigration', ')', ':', '___EOS___']", "index": 16 } ]
[ { "span": "import datetime", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 }, { "span": "from south.db import db", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 23 }, { "span": "from django.db import models", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 28 }, { "span": "from django.contrib.auth.models import User, Group", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 50 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "._", "db_", "import_", "db_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "._", "v2_", "import_", "Schema", "Migration_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "contrib_", "._", "auth_", "._", "models_", "import_", "User_", ",_", "Group_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ROLE", "S_", "=_", "[_", "\"", "role", "\\u", "dba", "\"_", ",_", "\"", "role", "\\u", "regular", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "models_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "complete", "\\u", "apps_", "=_", "[_", "'", "account", "'_", "]_", "[SEP]_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "forwards_", "(_", "self_", ",_", "orm_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "[_", "Group_", "._", "objects_", "._", "get", "\\u", "or", "\\u", "create_", "(_", "name_", "=_", "role_", ")_", "for_", "role_", "in_", "Migration_", "._", "ROLE", "S_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "backwards_", "(_", "self_", ",_", "orm_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "groups_", "=_", "Group_", "._", "objects_", "._", "filter_", "(_", "name", "\\u\\u", "in_", "=_", "Migration_", "._", "ROLE", "S_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[_", "group_", "._", "delete_", "for_", "group_", "in_", "groups_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
podio/podio-py/tests/test_areas_stream.py
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nUnit tests for pypodio2.areas.Stream (via pypodio2.client.Client). Works\nby mocking httplib2, and making assertions about how pypodio2 calls\nit.\n\"\"\"\n\ntry:\n import json\nexcept ImportError:\n import simplejson as json\n\nfrom mock import Mock\nfrom nose.tools import eq_\n\nfrom tests.utils import check_client_method, get_client_and_http, URL_BASE\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def test_find_all():\n client, check_assertions = check_client_method()\n result = client.Stream.find_all()\n check_assertions(result, 'GET', '/stream/')", "metadata": "root.test_find_all", "header": "['module', '___EOS___']", "index": 19 }, { "content": "def test_find_all_by_org_id():\n org_id = 81076\n\n client, check_assertions = check_client_method()\n result = client.Stream.find_all_by_org_id(org_id)\n check_assertions(result, 'GET', '/stream/org/%s/' % org_id)", "metadata": "root.test_find_all_by_org_id", "header": "['module', '___EOS___']", "index": 24 }, { "content": "def test_find_all_personal():\n client, check_assertions = check_client_method()\n result = client.Stream.find_all_personal()\n check_assertions(result, 'GET', '/stream/personal/')", "metadata": "root.test_find_all_personal", "header": "['module', '___EOS___']", "index": 32 }, { "content": "def test_find_all_by_space_id():\n space_id = 2222\n\n client, check_assertions = check_client_method()\n result = client.Stream.find_all_by_space_id(space_id)\n check_assertions(result, 'GET', '/stream/space/%s/' % space_id)", "metadata": "root.test_find_all_by_space_id", "header": "['module', '___EOS___']", "index": 38 }, { "content": "def test_find_by_ref():\n # It's not entirely clear what inputs are appropriate for ref_type.\n # But for this test's purposes, any string will do.\n ref_type = 'item'\n ref_id = 10203\n\n client, check_assertions = check_client_method()\n result = client.Stream.find_by_ref(ref_type, ref_id)\n check_assertions(result, 'GET', '/stream/%s/%s' % (ref_type, ref_id))", "metadata": "root.test_find_by_ref", "header": "['module', '___EOS___']", "index": 46 }, { "content": "def test_find_item_by_external_id():\n app_id = 13\n external_id = 37\n\n client, check_assertions = check_client_method()\n result = client.Item.find_all_by_external_id(app_id, external_id)\n check_assertions(result,\n 'GET',\n '/item/app/%s/v2/?external_id=%s' % (app_id, external_id))", "metadata": "root.test_find_item_by_external_id", "header": "['module', '___EOS___']", "index": 57 }, { "content": "def test_item_revisions():\n item_id = 255\n\n client, check_assertions = check_client_method()\n result = client.Item.revisions(item_id)\n check_assertions(result,\n 'GET',\n '/item/%s/revision/' % (item_id))", "metadata": "root.test_item_revisions", "header": "['module', '___EOS___']", "index": 68 }, { "content": "def test_item_revision_difference():\n item_id = 2\n from_id = 4\n to_id = 8\n\n client, check_assertions = check_client_method()\n result = client.Item.revision_difference(item_id, from_id, to_id)\n check_assertions(result,\n 'GET',\n '/item/%s/revision/%s/%s' % (item_id, from_id, to_id))", "metadata": "root.test_item_revision_difference", "header": "['module', '___EOS___']", "index": 78 }, { "content": "def test_item_revision_difference():\n item_id = 2\n from_id = 4\n to_id = 8\n\n client, check_assertions = check_client_method()", "metadata": "root.test_item_revision_difference", "header": "['module', '___EOS___']", "index": 90 } ]
[ { "span": "import json", "start_line": 9, "start_column": 4, "end_line": 9, "end_column": 15 }, { "span": "import simplejson as json", "start_line": 11, "start_column": 4, "end_line": 11, "end_column": 29 }, { "span": "from mock import Mock", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 21 }, { "span": "from nose.tools import eq_", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 26 }, { "span": "from tests.utils import check_client_method, get_client_and_http, URL_BASE", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 74 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Unit", " ", "tests", " ", "for", " ", "pyp", "odi", "o", "2", ".", "area", "s", ".", "Stream", " ", "(", "via", " ", "pyp", "odi", "o", "2", ".", "client", ".", "Client", ").", " ", "Works", "\\", "10", ";", "by", " ", "mock", "ing", " ", "http", "lib", "2", ",", " ", "and", " ", "mak", "ing", " ", "assertion", "s", " ", "abo", "ut", " ", "how", " ", "pyp", "odi", "o", "2", " ", "calls", "\\", "10", ";", "it", ".", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "simplejson_", "as_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "mock_", "import_", "Mock_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "nose_", "._", "tools_", "import_", "eq\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "tests_", "._", "utils_", "import_", "check", "\\u", "client", "\\u", "method_", ",_", "get", "\\u", "client", "\\u", "and", "\\u", "http_", ",_", "URL", "\\u", "BASE_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "all_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Stream_", "._", "find", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "'", "GET", "'_", ",_", "'/", "stream", "/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "all", "\\u", "by", "\\u", "org", "\\u", "id_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "org", "\\u", "id_", "=_", "810", "76_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Stream_", "._", "find", "\\u", "all", "\\u", "by", "\\u", "org", "\\u", "id_", "(_", "org", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "'", "GET", "'_", ",_", "'/", "stream", "/", "org", "/", "%", "s", "/'_", "%_", "org", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "all", "\\u", "persona", "l_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Stream_", "._", "find", "\\u", "all", "\\u", "persona", "l_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "'", "GET", "'_", ",_", "'/", "stream", "/", "persona", "l", "/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "all", "\\u", "by", "\\u", "space", "\\u", "id_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "space", "\\u", "id_", "=_", "2222", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Stream_", "._", "find", "\\u", "all", "\\u", "by", "\\u", "space", "\\u", "id_", "(_", "space", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "'", "GET", "'_", ",_", "'/", "stream", "/", "space", "/", "%", "s", "/'_", "%_", "space", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "by", "\\u", "ref_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "It", "'", "s", " ", "not", " ", "entire", "ly", " ", "clear", " ", "what", " ", "inputs", " ", "are", " ", "appropr", "iate", " ", "for", " ", "ref", "\\u", "type", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Bu", "t", " ", "for", " ", "this", " ", "test", "'", "s", " ", "purpose", "s", ",", " ", "any", " ", "string", " ", "will", " ", "do", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ref", "\\u", "type_", "=_", "'", "item", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ref", "\\u", "id_", "=_", "1020", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Stream_", "._", "find", "\\u", "by", "\\u", "ref_", "(_", "ref", "\\u", "type_", ",_", "ref", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "'", "GET", "'_", ",_", "'/", "stream", "/", "%", "s", "/", "%", "s", "'_", "%_", "(_", "ref", "\\u", "type_", ",_", "ref", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "find", "\\u", "item", "\\u", "by", "\\u", "external", "\\u", "id_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "app", "\\u", "id_", "=_", "13_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "external", "\\u", "id_", "=_", "37_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Item_", "._", "find", "\\u", "all", "\\u", "by", "\\u", "external", "\\u", "id_", "(_", "app", "\\u", "id_", ",_", "external", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "GET", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'/", "item", "/", "app", "/", "%", "s", "/", "v2", "/?", "external", "\\u", "id", "=", "%", "s", "'_", "%_", "(_", "app", "\\u", "id_", ",_", "external", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "item", "\\u", "revisions_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "item", "\\u", "id_", "=_", "255_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Item_", "._", "revisions_", "(_", "item", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "GET", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'/", "item", "/", "%", "s", "/", "revis", "ion", "/'_", "%_", "(_", "item", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "item", "\\u", "revis", "ion", "\\u", "difference_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "item", "\\u", "id_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from", "\\u", "id_", "=_", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "to", "\\u", "id_", "=_", "8_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "client_", "._", "Item_", "._", "revis", "ion", "\\u", "difference_", "(_", "item", "\\u", "id_", ",_", "from", "\\u", "id_", ",_", "to", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "check", "\\u", "assertions_", "(_", "result_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "GET", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'/", "item", "/", "%", "s", "/", "revis", "ion", "/", "%", "s", "/", "%", "s", "'_", "%_", "(_", "item", "\\u", "id_", ",_", "from", "\\u", "id_", ",_", "to", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "item", "\\u", "revis", "ion", "\\u", "difference_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "item", "\\u", "id_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from", "\\u", "id_", "=_", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "to", "\\u", "id_", "=_", "8_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", ",_", "check", "\\u", "assertions_", "=_", "check", "\\u", "client", "\\u", "method_", "(_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
nfvlabs/openmano/openmano/httpserver.py
[ { "content": "def filter_query_string(qs, http2db, allowed):\n '''Process query string (qs) checking that contains only valid tokens for avoiding SQL injection\n Attributes:\n 'qs': bottle.FormsDict variable to be processed. None or empty is considered valid\n 'http2db': dictionary with change from http API naming (dictionary key) to database naming(dictionary value)\n 'allowed': list of allowed string tokens (API http naming). All the keys of 'qs' must be one of 'allowed'\n Return: A tuple with the (select,where,limit) to be use in a database query. All of then transformed to the database naming\n select: list of items to retrieve, filtered by query string 'field=token'. If no 'field' is present, allowed list is returned\n where: dictionary with key, value, taken from the query string token=value. Empty if nothing is provided\n limit: limit dictated by user with the query string 'limit'. 100 by default\n abort if not permited, using bottel.abort\n '''\n where={}\n limit=100\n select=[]\n if type(qs) is not bottle.FormsDict:\n print '!!!!!!!!!!!!!!invalid query string not a dictionary'\n #bottle.abort(HTTP_Internal_Server_Error, \"call programmer\")\n else:\n for k in qs:\n if k=='field':\n select += qs.getall(k)\n for v in select:\n if v not in allowed:\n bottle.abort(HTTP_Bad_Request, \"Invalid query string at 'field=\"+v+\"'\")\n elif k=='limit':\n try:\n limit=int(qs[k])\n except:\n bottle.abort(HTTP_Bad_Request, \"Invalid query string at 'limit=\"+qs[k]+\"'\")\n else:\n if k not in allowed:\n bottle.abort(HTTP_Bad_Request, \"Invalid query string at '\"+k+\"=\"+qs[k]+\"'\")\n if qs[k]!=\"null\": where[k]=qs[k]\n else: where[k]=None \n if len(select)==0: select += allowed\n #change from http api to database naming\n for i in range(0,len(select)):\n k=select[i]\n if http2db and k in http2db: \n select[i] = http2db[k]\n if http2db:\n change_keys_http2db(where, http2db)\n print \"filter_query_string\", select,where,limit\n \n return select,where,limit", "metadata": "root.filter_query_string", "header": "['module', '___EOS___']", "index": 229 } ]
[ { "span": "except:", "start_line": 257, "start_column": 16, "end_line": 257, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "filter", "\\u", "query", "\\u", "string_", "(_", "qs_", ",_", "http", "2d", "b_", ",_", "allowed_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "Process", " ", "query", " ", "string", " ", "(", "qs", ")", " ", "checking", " ", "tha", "t", " ", "contain", "s", " ", "only", " ", "valid", " ", "token", "s", " ", "for", " ", "avoid", "ing", " ", "SQL", " ", "injection", "\\", "10", ";", " ", " ", " ", " ", "Attribute", "s", ":", "\\", "10", ";", " ", " ", " ", " ", "'", "qs", "':", " ", "bottle", ".", "Form", "s", "Dict", " ", "variab", "le", " ", "to", " ", "be", " ", "process", "ed", ".", " ", "Non", "e", " ", "or", " ", "empty", " ", "is", " ", "consider", "ed", " ", "valid", "\\", "10", ";", " ", " ", " ", " ", "'", "http", "2d", "b", "':", " ", "dictionar", "y", " ", "with", " ", "change", " ", "from", " ", "http", " ", "API", " ", "nami", "ng", " ", "(", "dictionar", "y", " ", "key", ")", " ", "to", " ", "databa", "se", " ", "nami", "ng", "(", "dictionar", "y", " ", "value", ")", "\\", "10", ";", " ", " ", " ", " ", "'", "allow", "ed", "':", " ", "list", " ", "of", " ", "allow", "ed", " ", "string", " ", "token", "s", " ", "(", "API", " ", "http", " ", "nami", "ng", ").", " ", "All", " ", "the", " ", "keys", " ", "of", " ", "'", "qs", "'", " ", "must", " ", "be", " ", "one", " ", "of", " ", "'", "allow", "ed", "'", "\\", "10", ";", " ", " ", " ", " ", "Return", ":", " ", "A", " ", "tuple", " ", "with", " ", "the", " ", "(", "select", ",", "where", ",", "limit", ")", " ", "to", " ", "be", " ", "use", " ", "in", " ", "a", " ", "databa", "se", " ", "query", ".", " ", "All", " ", "of", " ", "then", " ", "transforme", "d", " ", "to", " ", "the", " ", "databa", "se", " ", "nami", "ng", "\\", "10", ";", " ", " ", " ", " ", "select", ":", " ", "list", " ", "of", " ", "items", " ", "to", " ", "retrieve", ",", " ", "filter", "ed", " ", "by", " ", "query", " ", "string", " ", "'", "field", "=", "token", "'.", " ", "If", " ", "no", " ", "'", "field", "'", " ", "is", " ", "presen", "t", ",", " ", "allow", "ed", " ", "list", " ", "is", " ", "return", "ed", "\\", "10", ";", " ", " ", " ", " ", "where", ":", " ", "dictionar", "y", " ", "with", " ", "key", ",", " ", "value", ",", " ", "take", "n", " ", "from", " ", "the", " ", "query", " ", "string", " ", "token", "=", "value", ".", " ", "Emp", "ty", " ", "if", " ", "not", "hing", " ", "is", " ", "provided", "\\", "10", ";", " ", " ", " ", " ", "limit", ":", " ", "limit", " ", "dict", "ated", " ", "by", " ", "user", " ", "with", " ", "the", " ", "query", " ", "string", " ", "'", "limit", "'.", " ", "100", " ", "by", " ", "default", "\\", "10", ";", " ", " ", " ", " ", "abort", " ", "if", " ", "not", " ", "permit", "ed", ",", " ", "usi", "ng", " ", "bot", "tel", ".", "abort", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "where_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "limit_", "=_", "100_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "select_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "type_", "(_", "qs_", ")_", "is_", "not_", "bottle_", "._", "Form", "s", "Dict_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "'!", "!!!!!!", "!!!!!!", "!", "invalid", " ", "query", " ", "string", " ", "not", " ", "a", " ", "dictionar", "y", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "bottle", ".", "abort", "(", "HTTP", "\\u", "Intern", "al", "\\u", "Server", "\\u", "Error", ",", " ", "\"", "call", " ", "programme", "r", "\")", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "k_", "in_", "qs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "k_", "==_", "'", "field", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "select_", "+=_", "qs_", "._", "geta", "ll_", "(_", "k_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "v_", "in_", "select_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "if_", "v_", "not_", "in_", "allowed_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "bottle_", "._", "abort_", "(_", "HTTP", "\\u", "Ba", "d\\u", "Request_", ",_", "\"", "Inva", "lid", " ", "query", " ", "string", " ", "at", " ", "'", "field", "=\"_", "+_", "v_", "+_", "\"'\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "k_", "==_", "'", "limit", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "limit_", "=_", "int_", "(_", "qs_", "[_", "k_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "bottle_", "._", "abort_", "(_", "HTTP", "\\u", "Ba", "d\\u", "Request_", ",_", "\"", "Inva", "lid", " ", "query", " ", "string", " ", "at", " ", "'", "limit", "=\"_", "+_", "qs_", "[_", "k_", "]_", "+_", "\"'\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "k_", "not_", "in_", "allowed_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "bottle_", "._", "abort_", "(_", "HTTP", "\\u", "Ba", "d\\u", "Request_", ",_", "\"", "Inva", "lid", " ", "query", " ", "string", " ", "at", " ", "'\"_", "+_", "k_", "+_", "\"=\"_", "+_", "qs_", "[_", "k_", "]_", "+_", "\"'\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "qs_", "[_", "k_", "]_", "!=_", "\"", "null", "\"_", ":_", "where_", "[_", "k_", "]_", "=_", "qs_", "[_", "k_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "else_", ":_", "where_", "[_", "k_", "]_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "len_", "(_", "select_", ")_", "==_", "0_", ":_", "select_", "+=_", "allowed_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "change", " ", "from", " ", "http", " ", "api", " ", "to", " ", "databa", "se", " ", "naming_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "0_", ",_", "len_", "(_", "select_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "k_", "=_", "select_", "[_", "i_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "http", "2d", "b_", "and_", "k_", "in_", "http", "2d", "b_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "select_", "[_", "i_", "]_", "=_", "http", "2d", "b_", "[_", "k_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "http", "2d", "b_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "change", "\\u", "keys", "\\u", "http", "2d", "b_", "(_", "where_", ",_", "http", "2d", "b_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "print_", "\"", "filter", "\\u", "query", "\\u", "string", "\"_", ",_", "select_", ",_", "where_", ",_", "limit_", "\\u\\u\\uNE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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
statsmodels/statsmodels/statsmodels/sandbox/tsa/fftarma.py
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Dec 14 19:53:25 2009\n\nAuthor: josef-pktd\n\ngenerate arma sample using fft with all the lfilter it looks slow\nto get the ma representation first\n\napply arma filter (in ar representation) to time series to get white noise\nbut seems slow to be useful for fast estimation for nobs=10000\n\nchange/check: instead of using marep, use fft-transform of ar and ma\n separately, use ratio check theory is correct and example works\n DONE : feels much faster than lfilter\n -> use for estimation of ARMA\n -> use pade (scipy.misc) approximation to get starting polynomial\n from autocorrelation (is autocorrelation of AR(p) related to marep?)\n check if pade is fast, not for larger arrays ?\n maybe pade doesn't do the right thing for this, not tried yet\n scipy.pade([ 1. , 0.6, 0.25, 0.125, 0.0625, 0.1],2)\n raises LinAlgError: singular matrix\n also doesn't have roots inside unit circle ??\n -> even without initialization, it might be fast for estimation\n -> how do I enforce stationarity and invertibility,\n need helper function\n\nget function drop imag if close to zero from numpy/scipy source, where?\n\n\"\"\"\n\nfrom __future__ import print_function\nimport numpy as np\nimport numpy.fft as fft\n#import scipy.fftpack as fft\nfrom scipy import signal\n#from try_var_convolve import maxabs\nfrom statsmodels.sandbox.archive.linalg_decomp_1 import OneTimeProperty\nfrom statsmodels.tsa.arima_process import ArmaProcess\n\n\n#trying to convert old experiments to a class\n\n\n\n\n\n\n\n\n\n\nif __name__ == '__main__':\n nobs = 200 #10000\n ar = [1, 0.0]\n ma = [1, 0.0]\n ar2 = np.zeros(nobs)\n ar2[:2] = [1, -0.9]\n\n\n\n uni = np.zeros(nobs)\n uni[0]=1.\n #arrep = signal.lfilter(ma, ar, ar2)\n #marep = signal.lfilter([1],arrep, uni)\n # same faster:\n arcomb = np.convolve(ar, ar2, mode='same')\n marep = signal.lfilter(ma,arcomb, uni) #[len(ma):]\n print(marep[:10])\n mafr = fft.fft(marep)\n\n rvs = np.random.normal(size=nobs)\n datafr = fft.fft(rvs)\n y = fft.ifft(mafr*datafr)\n print(np.corrcoef(np.c_[y[2:], y[1:-1], y[:-2]],rowvar=0))\n\n arrep = signal.lfilter([1],marep, uni)\n print(arrep[:20]) # roundtrip to ar\n arfr = fft.fft(arrep)\n yfr = fft.fft(y)\n x = fft.ifft(arfr*yfr).real #imag part is e-15\n # the next two are equal, roundtrip works\n print(x[:5])\n print(rvs[:5])\n print(np.corrcoef(np.c_[x[2:], x[1:-1], x[:-2]],rowvar=0))\n\n\n # ARMA filter using fft with ratio of fft of ma/ar lag polynomial\n # seems much faster than using lfilter\n\n #padding, note arcomb is already full length\n arcombp = np.zeros(nobs)\n arcombp[:len(arcomb)] = arcomb\n map_ = np.zeros(nobs) #rename: map was shadowing builtin\n map_[:len(ma)] = ma\n ar0fr = fft.fft(arcombp)\n ma0fr = fft.fft(map_)\n y2 = fft.ifft(ma0fr/ar0fr*datafr)\n #the next two are (almost) equal in real part, almost zero but different in imag\n print(y2[:10])\n print(y[:10])\n print(maxabs(y, y2)) # from chfdiscrete\n #1.1282071239631782e-014\n\n ar = [1, -0.4]\n ma = [1, 0.2]\n\n arma1 = ArmaFft([1, -0.5,0,0,0,00, -0.7, 0.3], [1, 0.8], nobs)\n\n nfreq = nobs\n w = np.linspace(0, np.pi, nfreq)\n w2 = np.linspace(0, 2*np.pi, nfreq)\n\n import matplotlib.pyplot as plt\n plt.close('all')\n\n plt.figure()\n spd1, w1 = arma1.spd(2**10)\n print(spd1.shape)\n _ = plt.plot(spd1)\n plt.title('spd fft complex')\n\n plt.figure()\n spd2, w2 = arma1.spdshift(2**10)\n print(spd2.shape)\n _ = plt.plot(w2, spd2)\n plt.title('spd fft shift')\n\n plt.figure()\n spd3, w3 = arma1.spddirect(2**10)\n print(spd3.shape)\n _ = plt.plot(w3, spd3)\n plt.title('spd fft direct')\n\n plt.figure()\n spd3b = arma1._spddirect2(2**10)\n print(spd3b.shape)\n _ = plt.plot(spd3b)\n plt.title('spd fft direct mirrored')\n\n plt.figure()\n spdr, wr = arma1.spdroots(w)\n print(spdr.shape)\n plt.plot(w, spdr)\n plt.title('spd from roots')\n\n plt.figure()\n spdar1_ = spdar1(arma1.ar, w)\n print(spdar1_.shape)\n _ = plt.plot(w, spdar1_)\n plt.title('spd ar1')\n\n\n plt.figure()\n wper, spdper = arma1.periodogram(nfreq)\n print(spdper.shape)\n _ = plt.plot(w, spdper)\n plt.title('periodogram')\n\n startup = 1000\n rvs = arma1.generate_sample(startup+10000)[startup:]\n import matplotlib.mlab as mlb\n plt.figure()\n sdm, wm = mlb.psd(x)\n print('sdm.shape', sdm.shape)\n sdm = sdm.ravel()\n plt.plot(wm, sdm)\n plt.title('matplotlib')\n\n from nitime.algorithms import LD_AR_est\n #yule_AR_est(s, order, Nfreqs)\n wnt, spdnt = LD_AR_est(rvs, 10, 512)\n plt.figure()\n print('spdnt.shape', spdnt.shape)\n _ = plt.plot(spdnt.ravel())\n print(spdnt[:10])\n plt.title('nitime')\n\n fig = plt.figure()\n arma1.plot4(fig)\n\n #plt.show()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class ArmaFft(ArmaProcess):\n '''fft tools for arma processes\n\n This class contains several methods that are providing the same or similar\n returns to try out and test different implementations.\n\n Notes\n -----\n TODO:\n check whether we don't want to fix maxlags, and create new instance if\n maxlag changes. usage for different lengths of timeseries ?\n or fix frequency and length for fft\n\n check default frequencies w, terminology norw n_or_w\n\n some ffts are currently done without padding with zeros\n\n returns for spectral density methods needs checking, is it always the power\n spectrum hw*hw.conj()\n\n normalization of the power spectrum, spectral density: not checked yet, for\n example no variance of underlying process is used\n\n '''\n\n\n\n\n\n\n\n #@OneTimeProperty # not while still debugging things\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.ArmaFft", "header": "['module', '___EOS___']", "index": 44 }, { "content": " def __init__(self, ar, ma, n):\n #duplicates now that are subclassing ArmaProcess\n super(ArmaFft, self).__init__(ar, ma)\n\n self.ar = np.asarray(ar)\n self.ma = np.asarray(ma)\n self.nobs = n\n #could make the polynomials into cached attributes\n self.arpoly = np.polynomial.Polynomial(ar)\n self.mapoly = np.polynomial.Polynomial(ma)\n self.nar = len(ar) #1d only currently\n self.nma = len(ma)", "metadata": "root.ArmaFft.__init__", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 69 }, { "content": " def padarr(self, arr, maxlag, atend=True):\n '''pad 1d array with zeros at end to have length maxlag\n function that is a method, no self used\n\n Parameters\n ----------\n arr : array_like, 1d\n array that will be padded with zeros\n maxlag : int\n length of array after padding\n atend : boolean\n If True (default), then the zeros are added to the end, otherwise\n to the front of the array\n\n Returns\n -------\n arrp : ndarray\n zero-padded array\n\n Notes\n -----\n This is mainly written to extend coefficient arrays for the lag-polynomials.\n It returns a copy.\n\n '''\n if atend:\n return np.r_[arr, np.zeros(maxlag-len(arr))]\n else:\n return np.r_[np.zeros(maxlag-len(arr)), arr]", "metadata": "root.ArmaFft.padarr", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 82 }, { "content": " def pad(self, maxlag):\n '''construct AR and MA polynomials that are zero-padded to a common length\n\n Parameters\n ----------\n maxlag : int\n new length of lag-polynomials\n\n Returns\n -------\n ar : ndarray\n extended AR polynomial coefficients\n ma : ndarray\n extended AR polynomial coefficients\n\n '''\n arpad = np.r_[self.ar, np.zeros(maxlag-self.nar)]\n mapad = np.r_[self.ma, np.zeros(maxlag-self.nma)]\n return arpad, mapad", "metadata": "root.ArmaFft.pad", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 113 }, { "content": " def fftar(self, n=None):\n '''Fourier transform of AR polynomial, zero-padded at end to n\n\n Parameters\n ----------\n n : int\n length of array after zero-padding\n\n Returns\n -------\n fftar : ndarray\n fft of zero-padded ar polynomial\n '''\n if n is None:\n n = len(self.ar)\n return fft.fft(self.padarr(self.ar, n))", "metadata": "root.ArmaFft.fftar", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 133 }, { "content": " def fftma(self, n):\n '''Fourier transform of MA polynomial, zero-padded at end to n\n\n Parameters\n ----------\n n : int\n length of array after zero-padding\n\n Returns\n -------\n fftar : ndarray\n fft of zero-padded ar polynomial\n '''\n if n is None:\n n = len(self.ar)\n return fft.fft(self.padarr(self.ma, n))", "metadata": "root.ArmaFft.fftma", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 150 }, { "content": " def fftarma(self, n=None):\n '''Fourier transform of ARMA polynomial, zero-padded at end to n\n\n The Fourier transform of the ARMA process is calculated as the ratio\n of the fft of the MA polynomial divided by the fft of the AR polynomial.\n\n Parameters\n ----------\n n : int\n length of array after zero-padding\n\n Returns\n -------\n fftarma : ndarray\n fft of zero-padded arma polynomial\n '''\n if n is None:\n n = self.nobs\n return (self.fftma(n) / self.fftar(n))", "metadata": "root.ArmaFft.fftarma", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 168 }, { "content": " def spd(self, npos):\n '''raw spectral density, returns Fourier transform\n\n n is number of points in positive spectrum, the actual number of points\n is twice as large. different from other spd methods with fft\n '''\n n = npos\n w = fft.fftfreq(2*n) * 2 * np.pi\n hw = self.fftarma(2*n) #not sure, need to check normalization\n #return (hw*hw.conj()).real[n//2-1:] * 0.5 / np.pi #doesn't show in plot\n return (hw*hw.conj()).real * 0.5 / np.pi, w", "metadata": "root.ArmaFft.spd", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 188 }, { "content": " def spdshift(self, n):\n '''power spectral density using fftshift\n\n currently returns two-sided according to fft frequencies, use first half\n '''\n #size = s1+s2-1\n mapadded = self.padarr(self.ma, n)\n arpadded = self.padarr(self.ar, n)\n hw = fft.fft(fft.fftshift(mapadded)) / fft.fft(fft.fftshift(arpadded))\n #return np.abs(spd)[n//2-1:]\n w = fft.fftfreq(n) * 2 * np.pi\n wslice = slice(n//2-1, None, None)\n #return (hw*hw.conj()).real[wslice], w[wslice]\n return (hw*hw.conj()).real, w", "metadata": "root.ArmaFft.spdshift", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 200 }, { "content": " def spddirect(self, n):\n '''power spectral density using padding to length n done by fft\n\n currently returns two-sided according to fft frequencies, use first half\n '''\n #size = s1+s2-1\n #abs looks wrong\n hw = fft.fft(self.ma, n) / fft.fft(self.ar, n)\n w = fft.fftfreq(n) * 2 * np.pi\n wslice = slice(None, n//2, None)\n #return (np.abs(hw)**2)[wslice], w[wslice]\n return (np.abs(hw)**2) * 0.5/np.pi, w", "metadata": "root.ArmaFft.spddirect", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 215 }, { "content": " def _spddirect2(self, n):\n '''this looks bad, maybe with an fftshift\n '''\n #size = s1+s2-1\n hw = (fft.fft(np.r_[self.ma[::-1],self.ma], n)\n / fft.fft(np.r_[self.ar[::-1],self.ar], n))\n return (hw*hw.conj()) #.real[n//2-1:]", "metadata": "root.ArmaFft._spddirect2", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 228 }, { "content": " def spdroots(self, w):\n '''spectral density for frequency using polynomial roots\n\n builds two arrays (number of roots, number of frequencies)\n '''\n return self.spdroots_(self.arroots, self.maroots, w)", "metadata": "root.ArmaFft.spdroots", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 236 }, { "content": " def spdroots_(self, arroots, maroots, w):\n '''spectral density for frequency using polynomial roots\n\n builds two arrays (number of roots, number of frequencies)\n\n Parameters\n ----------\n arroots : ndarray\n roots of ar (denominator) lag-polynomial\n maroots : ndarray\n roots of ma (numerator) lag-polynomial\n w : array_like\n frequencies for which spd is calculated\n\n Notes\n -----\n this should go into a function\n '''\n w = np.atleast_2d(w).T\n cosw = np.cos(w)\n #Greene 5th edt. p626, section 20.2.7.a.\n maroots = 1./maroots\n arroots = 1./arroots\n num = 1 + maroots**2 - 2* maroots * cosw\n den = 1 + arroots**2 - 2* arroots * cosw\n #print 'num.shape, den.shape', num.shape, den.shape\n hw = 0.5 / np.pi * num.prod(-1) / den.prod(-1) #or use expsumlog\n return np.squeeze(hw), w.squeeze()", "metadata": "root.ArmaFft.spdroots_", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 243 }, { "content": " def spdpoly(self, w, nma=50):\n '''spectral density from MA polynomial representation for ARMA process\n\n References\n ----------\n Cochrane, section 8.3.3\n '''\n mpoly = np.polynomial.Polynomial(self.arma2ma(nma))\n hw = mpoly(np.exp(1j * w))\n spd = np.real_if_close(hw * hw.conj() * 0.5/np.pi)\n return spd, w", "metadata": "root.ArmaFft.spdpoly", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 272 }, { "content": " def filter(self, x):\n '''\n filter a timeseries with the ARMA filter\n\n padding with zero is missing, in example I needed the padding to get\n initial conditions identical to direct filter\n\n Initial filtered observations differ from filter2 and signal.lfilter, but\n at end they are the same.\n\n See Also\n --------\n tsa.filters.fftconvolve\n\n '''\n n = x.shape[0]\n if n == self.fftarma:\n fftarma = self.fftarma\n else:\n fftarma = self.fftma(n) / self.fftar(n)\n tmpfft = fftarma * fft.fft(x)\n return fft.ifft(tmpfft)", "metadata": "root.ArmaFft.filter", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 284 }, { "content": " def filter2(self, x, pad=0):\n '''filter a time series using fftconvolve3 with ARMA filter\n\n padding of x currently works only if x is 1d\n in example it produces same observations at beginning as lfilter even\n without padding.\n\n TODO: this returns 1 additional observation at the end\n '''\n from statsmodels.tsa.filters import fftconvolve3\n if not pad:\n pass\n elif pad == 'auto':\n #just guessing how much padding\n x = self.padarr(x, x.shape[0] + 2*(self.nma+self.nar), atend=False)\n else:\n x = self.padarr(x, x.shape[0] + int(pad), atend=False)\n\n return fftconvolve3(x, self.ma, self.ar)", "metadata": "root.ArmaFft.filter2", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 307 }, { "content": " def acf2spdfreq(self, acovf, nfreq=100, w=None):\n '''\n not really a method\n just for comparison, not efficient for large n or long acf\n\n this is also similarly use in tsa.stattools.periodogram with window\n '''\n if w is None:\n w = np.linspace(0, np.pi, nfreq)[:, None]\n nac = len(acovf)\n hw = 0.5 / np.pi * (acovf[0] +\n 2 * (acovf[1:] * np.cos(w*np.arange(1,nac))).sum(1))\n return hw", "metadata": "root.ArmaFft.acf2spdfreq", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 328 }, { "content": " def invpowerspd(self, n):\n '''autocovariance from spectral density\n\n scaling is correct, but n needs to be large for numerical accuracy\n maybe padding with zero in fft would be faster\n without slicing it returns 2-sided autocovariance with fftshift\n\n >>> ArmaFft([1, -0.5], [1., 0.4], 40).invpowerspd(2**8)[:10]\n array([ 2.08 , 1.44 , 0.72 , 0.36 , 0.18 , 0.09 ,\n 0.045 , 0.0225 , 0.01125 , 0.005625])\n >>> ArmaFft([1, -0.5], [1., 0.4], 40).acovf(10)\n array([ 2.08 , 1.44 , 0.72 , 0.36 , 0.18 , 0.09 ,\n 0.045 , 0.0225 , 0.01125 , 0.005625])\n '''\n hw = self.fftarma(n)\n return np.real_if_close(fft.ifft(hw*hw.conj()), tol=200)[:n]", "metadata": "root.ArmaFft.invpowerspd", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 342 }, { "content": " def spdmapoly(self, w, twosided=False):\n '''ma only, need division for ar, use LagPolynomial\n '''\n if w is None:\n w = np.linspace(0, np.pi, nfreq)\n return 0.5 / np.pi * self.mapoly(np.exp(w*1j))", "metadata": "root.ArmaFft.spdmapoly", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 359 }, { "content": " def plot4(self, fig=None, nobs=100, nacf=20, nfreq=100):\n rvs = self.generate_sample(nsample=100, burnin=500)\n acf = self.acf(nacf)[:nacf] #TODO: check return length\n pacf = self.pacf(nacf)\n w = np.linspace(0, np.pi, nfreq)\n spdr, wr = self.spdroots(w)\n\n if fig is None:\n import matplotlib.pyplot as plt\n fig = plt.figure()\n ax = fig.add_subplot(2,2,1)\n ax.plot(rvs)\n ax.set_title('Random Sample \\nar=%s, ma=%s' % (self.ar, self.ma))\n\n ax = fig.add_subplot(2,2,2)\n ax.plot(acf)\n ax.set_title('Autocorrelation \\nar=%s, ma=%rs' % (self.ar, self.ma))\n\n ax = fig.add_subplot(2,2,3)\n ax.plot(wr, spdr)\n ax.set_title('Power Spectrum \\nar=%s, ma=%s' % (self.ar, self.ma))\n\n ax = fig.add_subplot(2,2,4)\n ax.plot(pacf)\n ax.set_title('Partial Autocorrelation \\nar=%s, ma=%s' % (self.ar, self.ma))\n\n return fig", "metadata": "root.ArmaFft.plot4", "header": "['class', 'ArmaFft', '(', 'ArmaProcess', ')', ':', '___EOS___']", "index": 367 }, { "content": "def spdar1(ar, w):\n if np.ndim(ar) == 0:\n rho = ar\n else:\n rho = -ar[1]\n return 0.5 / np.pi /(1 + rho*rho - 2 * rho * np.cos(w))", "metadata": "root.spdar1", "header": "['module', '___EOS___']", "index": 401 }, { "content": " def maxabs(x,y):\n return np.max(np.abs(x-y))", "metadata": "root.maxabs", "header": "['module', '___EOS___']", "index": 409 } ]
[ { "span": "from statsmodels.sandbox.archive.linalg_decomp_1 import OneTimeProperty", "start_line": 37, "start_column": 0, "end_line": 37, "end_column": 71 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "Mon", " ", "De", "c", " ", "14", " ", "1", "9", ":", "5", "3", ":", "25", " ", "200", "9", "\\", "10", ";", "\\", "10", ";", "Author", ":", " ", "jos", "ef", "-", "pkt", "d", "\\", "10", ";", "\\", "10", ";", "generat", "e", " ", "arma", " ", "sample", " ", "usi", "ng", " ", "fft", " ", "with", " ", "all", " ", "the", " ", "lfil", "ter", " ", "it", " ", "look", "s", " ", "slow", "\\", "10", ";", "to", " ", "get", " ", "the", " ", "ma", " ", "represent", "ation", " ", "first", "\\", "10", ";", "\\", "10", ";", "appl", "y", " ", "arma", " ", "filter", " ", "(", "in", " ", "ar", " ", "represent", "ation", ")", " ", "to", " ", "time", " ", "series", " ", "to", " ", "get", " ", "white", " ", "noise", "\\", "10", ";", "but", " ", "see", "ms", " ", "slow", " ", "to", " ", "be", " ", "usef", "ul", " ", "for", " ", "fast", " ", "estimati", "on", " ", "for", " ", "nob", "s", "=", "10000", "\\", "10", ";", "\\", "10", ";", "change", "/", "check", ":", " ", "inst", "ead", " ", "of", " ", "usi", "ng", " ", "mar", "ep", ",", " ", "use", " ", "fft", "-", "transform", " ", "of", " ", "ar", " ", "and", " ", "ma", "\\", "10", ";", " ", " ", " ", " ", "separately", ",", " ", "use", " ", "ratio", " ", "check", " ", "theory", " ", "is", " ", "correct", " ", "and", " ", "example", " ", "works", "\\", "10", ";", " ", " ", " ", " ", "DON", "E", " ", ":", " ", "feel", "s", " ", "muc", "h", " ", "faste", "r", " ", "than", " ", "lfil", "ter", "\\", "10", ";", " ", " ", " ", " ", "->", " ", "use", " ", "for", " ", "estimati", "on", " ", "of", " ", "ARM", "A", "\\", "10", ";", " ", " ", " ", " ", "->", " ", "use", " ", "pad", "e", " ", "(", "sci", "py", ".", "misc", ")", " ", "approx", "imat", "ion", " ", "to", " ", "get", " ", "startin", "g", " ", "polynomial", "\\", "10", ";", " ", " ", " ", "from", " ", "autocor", "relation", " ", "(", "is", " ", "autocor", "relation", " ", "of", " ", "AR", "(", "p", ")", " ", "relate", "d", " ", "to", " ", "mar", "ep", "?)", "\\", "10", ";", " ", " ", " ", "check", " ", "if", " ", "pad", "e", " ", "is", " ", "fast", ",", " ", "not", " ", "for", " ", "large", "r", " ", "arrays", " ", "?", "\\", "10", ";", " ", " ", " ", "may", "be", " ", "pad", "e", " ", "doe", "sn", "'", "t", " ", "do", " ", "the", " ", "right", " ", "thing", " ", "for", " ", "this", ",", " ", "not", " ", "trie", "d", " ", "ye", "t", "\\", "10", ";", " ", " ", " ", "sci", "py", ".", "pad", "e", "([", " ", "1", ".", " ", " ", " ", " ", ",", " ", " ", "0.", "6", ",", " ", " ", "0.25", ",", " ", "0.12", "5", ",", " ", "0.06", "25", ",", " ", "0.", "1", "],", "2", ")", "\\", "10", ";", " ", " ", " ", "raise", "s", " ", "Lin", "Alg", "Error", ":", " ", "singular", " ", "matrix", "\\", "10", ";", " ", " ", " ", "als", "o", " ", "doe", "sn", "'", "t", " ", "have", " ", "root", "s", " ", "insi", "de", " ", "unit", " ", "circle", " ", "??", "\\", "10", ";", " ", " ", " ", " ", "->", " ", "even", " ", "with", "out", " ", "initialization", ",", " ", "it", " ", "mig", "ht", " ", "be", " ", "fast", " ", "for", " ", "estimati", "on", "\\", "10", ";", " ", " ", " ", " ", "->", " ", "how", " ", "do", " ", "I", " ", "enforce", " ", "station", "arit", "y", " ", "and", " ", "invert", "ibi", "lit", "y", ",", "\\", "10", ";", " ", " ", " ", "need", " ", "help", "er", " ", "function", "\\", "10", ";", "\\", "10", ";", "get", " ", "function", " ", "drop", " ", "imag", " ", "if", " ", "close", " ", "to", " ", "zero", " ", "from", " ", "nump", "y", "/", "sci", "py", " ", "source", ",", " ", "where", "?", "\\", "10", ";", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "._", "fft_", "as_", "fft_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "import", " ", "sci", "py", ".", "fft", "pack", " ", "as", " ", "fft_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "scipy_", "import_", "signal_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "from", " ", "try", "\\u", "var", "\\u", "convolve", " ", "import", " ", "maxa", "bs_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "stats", "models_", "._", "sandbox_", "._", "archive_", "._", "linalg", "\\u", "decomp", "\\u", "1_", "import_", "One", "Time", "Property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "stats", "models_", "._", "tsa", "_", "._", "ari", "ma", "\\u", "process_", "import_", "Arm", "a", "Process_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "try", "ing", " ", "to", " ", "convert", " ", "old", " ", "experiment", "s", " ", "to", " ", "a", " ", "class_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "nob", "s_", "=_", "200_", "#", "10000_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar_", "=_", "[_", "1_", ",_", "0.0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ma_", "=_", "[_", "1_", ",_", "0.0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar", "2_", "=_", "np_", "._", "zeros_", "(_", "nob", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar", "2_", "[_", ":_", "2_", "]_", "=_", "[_", "1_", ",_", "-_", "0.9_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "uni_", "=_", "np_", "._", "zeros_", "(_", "nob", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "uni_", "[_", "0_", "]_", "=_", "1._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "arr", "ep", " ", "=", " ", "signal", ".", "lfil", "ter", "(", "ma", ",", " ", "ar", ",", " ", "ar", "2", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "mar", "ep", " ", "=", " ", "signal", ".", "lfil", "ter", "([", "1", "],", "arr", "ep", ",", " ", "uni", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "same", " ", "faste", "r", ":_", "\\u\\u\\uNL\\u\\u\\u_", "arc", "omb", "_", "=_", "np_", "._", "convolve", "_", "(_", "ar_", ",_", "ar", "2_", ",_", "mode_", "=_", "'", "same", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mar", "ep_", "=_", "signal_", "._", "lfil", "ter_", "(_", "ma_", ",_", "arc", "omb", "_", ",_", "uni_", ")_", "#[", "len", "(", "ma", "):", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "mar", "ep_", "[_", ":_", "10_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "maf", "r_", "=_", "fft_", "._", "fft_", "(_", "mar", "ep_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "rvs_", "=_", "np_", "._", "random_", "._", "normal_", "(_", "size_", "=_", "nob", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dataf", "r_", "=_", "fft_", "._", "fft_", "(_", "rvs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "y_", "=_", "fft_", "._", "ifft", "_", "(_", "maf", "r_", "*_", "dataf", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "np_", "._", "corr", "coef_", "(_", "np_", "._", "c\\u", "_", "[_", "y_", "[_", "2_", ":_", "]_", ",_", "y_", "[_", "1_", ":_", "-_", "1_", "]_", ",_", "y_", "[_", ":_", "-_", "2_", "]_", "]_", ",_", "row", "var_", "=_", "0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "arr", "ep_", "=_", "signal_", "._", "lfil", "ter_", "(_", "[_", "1_", "]_", ",_", "mar", "ep_", ",_", "uni_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "arr", "ep_", "[_", ":_", "20_", "]_", ")_", "#", " ", "roundtrip", " ", "to", " ", "ar_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arf", "r_", "=_", "fft_", "._", "fft_", "(_", "arr", "ep_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "yf", "r_", "=_", "fft_", "._", "fft_", "(_", "y_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "x_", "=_", "fft_", "._", "ifft", "_", "(_", "arf", "r_", "*_", "yf", "r_", ")_", "._", "real_", "#", "imag", " ", "part", " ", "is", " ", "e-1", "5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "the", " ", "next", " ", "two", " ", "are", " ", "equal", ",", " ", "roundtrip", " ", "works_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "(_", "x_", "[_", ":_", "5_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "rvs_", "[_", ":_", "5_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "np_", "._", "corr", "coef_", "(_", "np_", "._", "c\\u", "_", "[_", "x_", "[_", "2_", ":_", "]_", ",_", "x_", "[_", "1_", ":_", "-_", "1_", "]_", ",_", "x_", "[_", ":_", "-_", "2_", "]_", "]_", ",_", "row", "var_", "=_", "0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "ARM", "A", " ", "filter", " ", "usi", "ng", " ", "fft", " ", "with", " ", "ratio", " ", "of", " ", "fft", " ", "of", " ", "ma", "/", "ar", " ", "lag", " ", "polynomial", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "see", "ms", " ", "muc", "h", " ", "faste", "r", " ", "than", " ", "usi", "ng", " ", "lfil", "ter_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "padd", "ing", ",", " ", "note", " ", "arc", "omb", " ", "is", " ", "alr", "ead", "y", " ", "full", " ", "length_", "\\u\\u\\uNL\\u\\u\\u_", "arc", "omb", "p_", "=_", "np_", "._", "zeros_", "(_", "nob", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arc", "omb", "p_", "[_", ":_", "len_", "(_", "arc", "omb", "_", ")_", "]_", "=_", "arc", "omb", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "map", "\\u_", "=_", "np_", "._", "zeros_", "(_", "nob", "s_", ")_", "#", "rename", ":", " ", "map", " ", "was", " ", "shadow", "ing", " ", "builtin_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "map", "\\u_", "[_", ":_", "len_", "(_", "ma_", ")_", "]_", "=_", "ma_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar", "0f", "r_", "=_", "fft_", "._", "fft_", "(_", "arc", "omb", "p_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ma", "0f", "r_", "=_", "fft_", "._", "fft_", "(_", "map", "\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "y2_", "=_", "fft_", "._", "ifft", "_", "(_", "ma", "0f", "r_", "/_", "ar", "0f", "r_", "*_", "dataf", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "the", " ", "next", " ", "two", " ", "are", " ", "(", "alm", "ost", ")", " ", "equal", " ", "in", " ", "real", " ", "part", ",", " ", "alm", "ost", " ", "zero", " ", "but", " ", "different", " ", "in", " ", "imag_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "(_", "y2_", "[_", ":_", "10_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "y_", "[_", ":_", "10_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "maxa", "bs_", "(_", "y_", ",_", "y2_", ")_", ")_", "#", " ", "from", " ", "ch", "fdi", "scre", "te_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "1.1", "282", "071", "239", "631", "782", "e-0", "14_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ar_", "=_", "[_", "1_", ",_", "-_", "0.4_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ma_", "=_", "[_", "1_", ",_", "0.2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "arma", "1_", "=_", "Arm", "a", "Ff", "t_", "(_", "[_", "1_", ",_", "-_", "0.5_", ",_", "0_", ",_", "0_", ",_", "0_", ",_", "00_", ",_", "-_", "0.7_", ",_", "0.3_", "]_", ",_", "[_", "1_", ",_", "0.8_", "]_", ",_", "nob", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "nfr", "eq_", "=_", "nob", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "np_", "._", "linspace_", "(_", "0_", ",_", "np_", "._", "pi_", ",_", "nfr", "eq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w2_", "=_", "np_", "._", "linspace_", "(_", "0_", ",_", "2_", "*_", "np_", "._", "pi_", ",_", "nfr", "eq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "matplotlib_", "._", "pyplot_", "as_", "plt_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "close_", "(_", "'", "all", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "1_", ",_", "w1_", "=_", "arma", "1_", "._", "spd", "_", "(_", "2_", "**_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "1_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "spd", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "fft", " ", "complex", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "2_", ",_", "w2_", "=_", "arma", "1_", "._", "spd", "shift_", "(_", "2_", "**_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "2_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "w2_", ",_", "spd", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "fft", " ", "shift", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "3_", ",_", "w3", "_", "=_", "arma", "1_", "._", "spd", "direct_", "(_", "2_", "**_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "3_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "w3", "_", ",_", "spd", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "fft", " ", "direct", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "3b", "_", "=_", "arma", "1_", "._", "\\u", "spd", "direct", "2_", "(_", "2_", "**_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "3b", "_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "spd", "3b", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "fft", " ", "direct", " ", "mirrore", "d", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "r_", ",_", "wr_", "=_", "arma", "1_", "._", "spd", "roots_", "(_", "w_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "r_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "plot_", "(_", "w_", ",_", "spd", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "from", " ", "root", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "ar", "1", "\\u_", "=_", "spd", "ar", "1_", "(_", "arma", "1_", "._", "ar_", ",_", "w_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "ar", "1", "\\u_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "w_", ",_", "spd", "ar", "1", "\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "spd", " ", "ar", "1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wp", "er_", ",_", "spd", "per_", "=_", "arma", "1_", "._", "periodo", "gram_", "(_", "nfr", "eq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "per_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "w_", ",_", "spd", "per_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "periodo", "gram", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "startup_", "=_", "1000_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "rvs_", "=_", "arma", "1_", "._", "generat", "e\\u", "sample_", "(_", "startup_", "+_", "10000_", ")_", "[_", "startup_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "matplotlib_", "._", "mlab_", "as_", "ml", "b_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sd", "m_", ",_", "wm_", "=_", "ml", "b_", "._", "psd", "_", "(_", "x_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "'", "sd", "m", ".", "shape", "'_", ",_", "sd", "m_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sd", "m_", "=_", "sd", "m_", "._", "ravel_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "plot_", "(_", "wm_", ",_", "sd", "m_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "mat", "plotlib", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "niti", "me_", "._", "algorithms_", "import_", "LD", "\\u", "AR", "\\u", "est_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "yu", "le", "\\u", "AR", "\\u", "est", "(", "s", ",", " ", "order", ",", " ", "Nf", "reqs", ")_", "\\u\\u\\uNL\\u\\u\\u_", "wn", "t_", ",_", "spd", "nt_", "=_", "LD", "\\u", "AR", "\\u", "est_", "(_", "rvs_", ",_", "10_", ",_", "512_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "'", "spd", "nt", ".", "shape", "'_", ",_", "spd", "nt_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u_", "=_", "plt_", "._", "plot_", "(_", "spd", "nt_", "._", "ravel_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "spd", "nt_", "[_", ":_", "10_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plt_", "._", "title_", "(_", "'", "niti", "me", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "fig_", "=_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arma", "1_", "._", "plot", "4_", "(_", "fig_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "plt", ".", "show", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "fft", " ", "tool", "s", " ", "for", " ", "arma", " ", "process", "es", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "class", " ", "contain", "s", " ", "sever", "al", " ", "method", "s", " ", "tha", "t", " ", "are", " ", "provi", "ding", " ", "the", " ", "same", " ", "or", " ", "similar", "\\", "10", ";", " ", " ", " ", " ", "return", "s", " ", "to", " ", "try", " ", "out", " ", "and", " ", "test", " ", "different", " ", "implementation", "s", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Not", "es", "\\", "10", ";", " ", " ", " ", " ", "-----", "\\", "10", ";", " ", " ", " ", " ", "TOD", "O", ":", "\\", "10", ";", " ", " ", " ", " ", "check", " ", "whe", "ther", " ", "we", " ", "don", "'", "t", " ", "want", " ", "to", " ", "fix", " ", "maxl", "ags", ",", " ", "and", " ", "create", " ", "new", " ", "instance", " ", "if", "\\", "10", ";", " ", " ", " ", " ", "maxl", "ag", " ", "change", "s", ".", " ", "usage", " ", "for", " ", "different", " ", "length", "s", " ", "of", " ", "times", "eries", " ", "?", "\\", "10", ";", " ", " ", " ", " ", "or", " ", "fix", " ", "freque", "nc", "y", " ", "and", " ", "length", " ", "for", " ", "fft", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "check", " ", "default", " ", "freque", "ncie", "s", " ", "w", ",", " ", "termin", "olog", "y", " ", "nor", "w", " ", " ", "n", "\\u", "or", "\\u", "w", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "some", " ", "fft", "s", " ", "are", " ", "currentl", "y", " ", "don", "e", " ", "with", "out", " ", "padd", "ing", " ", "with", " ", "zero", "s", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "return", "s", " ", "for", " ", "spectral", " ", "densit", "y", " ", "method", "s", " ", "need", "s", " ", "checking", ",", " ", "is", " ", "it", " ", "alw", "ay", "s", " ", "the", " ", "power", "\\", "10", ";", " ", " ", " ", " ", "spectr", "um", " ", "hw", "*", "hw", ".", "conj", "()", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "normaliza", "tion", " ", "of", " ", "the", " ", "power", " ", "spectr", "um", ",", " ", "spectral", " ", "densit", "y", ":", " ", "not", " ", "checke", "d", " ", "ye", "t", ",", " ", "for", "\\", "10", ";", " ", " ", " ", " ", "example", " ", "no", " ", "varian", "ce", " ", "of", " ", "underl", "ying", " ", "process", " ", "is", " ", "used", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#@", "One", "Time", "Proper", "ty", " ", " ", "#", " ", "not", " ", "whi", "le", " ", "still", " ", "debugg", "ing", " ", "things_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "ar_", ",_", "ma_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "duplicat", "es", " ", "now", " ", "tha", "t", " ", "are", " ", "subclassing", " ", "Arm", "a", "Process_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Arm", "a", "Ff", "t_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", "ar_", ",_", "ma_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ar_", "=_", "np_", "._", "asarray_", "(_", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ma_", "=_", "np_", "._", "asarray_", "(_", "ma_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "nob", "s_", "=_", "n_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "coul", "d", " ", "make", " ", "the", " ", "polynomial", "s", " ", "int", "o", " ", "cache", "d", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "arp", "oly", "_", "=_", "np_", "._", "polynomial", "_", "._", "Polynomial", "_", "(_", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "map", "oly", "_", "=_", "np_", "._", "polynomial", "_", "._", "Polynomial", "_", "(_", "ma_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "nar", "_", "=_", "len_", "(_", "ar_", ")_", "#", "1d", " ", "only", " ", "currentl", "y_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "nma", "_", "=_", "len_", "(_", "ma_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pad", "arr_", "(_", "self_", ",_", "arr_", ",_", "maxl", "ag_", ",_", "ate", "nd_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "pad", " ", "1d", " ", "array", " ", "with", " ", "zero", "s", " ", "at", " ", "end", " ", "to", " ", "have", " ", "length", " ", "maxl", "ag", "\\", "10", ";", " ", " ", " ", " ", "function", " ", "tha", "t", " ", "is", " ", "a", " ", "method", ",", " ", "no", " ", "self", " ", "used", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "arr", " ", ":", " ", "array", "\\u", "like", ",", " ", "1d", "\\", "10", ";", " ", " ", " ", " ", "array", " ", "tha", "t", " ", "will", " ", "be", " ", "padde", "d", " ", "with", " ", "zero", "s", "\\", "10", ";", " ", " ", " ", " ", "maxl", "ag", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "length", " ", "of", " ", "array", " ", "after", " ", "padd", "ing", "\\", "10", ";", " ", " ", " ", " ", "ate", "nd", " ", ":", " ", "boolean", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "Tru", "e", " ", "(", "default", "),", " ", "then", " ", "the", " ", "zero", "s", " ", "are", " ", "adde", "d", " ", "to", " ", "the", " ", "end", ",", " ", "other", "wis", "e", "\\", "10", ";", " ", " ", " ", " ", "to", " ", "the", " ", "front", " ", "of", " ", "the", " ", "array", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "arr", "p", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "zero", "-", "padde", "d", " ", "array", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Not", "es", "\\", "10", ";", " ", " ", " ", " ", "-----", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "is", " ", "mainl", "y", " ", "writt", "en", " ", "to", " ", "extend", " ", "coefficient", " ", "arrays", " ", "for", " ", "the", " ", "lag", "-", "polynomial", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "It", " ", "return", "s", " ", "a", " ", "copy", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ate", "nd_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "np_", "._", "r\\u_", "[_", "arr_", ",_", "np_", "._", "zeros_", "(_", "maxl", "ag_", "-_", "len_", "(_", "arr_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "np_", "._", "r\\u_", "[_", "np_", "._", "zeros_", "(_", "maxl", "ag_", "-_", "len_", "(_", "arr_", ")_", ")_", ",_", "arr_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pad_", "(_", "self_", ",_", "maxl", "ag_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "construct", " ", "AR", " ", "and", " ", "MA", " ", "polynomial", "s", " ", "tha", "t", " ", "are", " ", "zero", "-", "padde", "d", " ", "to", " ", "a", " ", "common", " ", "length", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "maxl", "ag", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "new", " ", "length", " ", "of", " ", "lag", "-", "polynomial", "s", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "ar", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "extend", "ed", " ", "AR", " ", "polynomial", " ", "coefficient", "s", "\\", "10", ";", " ", " ", " ", " ", "ma", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "extend", "ed", " ", "AR", " ", "polynomial", " ", "coefficient", "s", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arp", "ad_", "=_", "np_", "._", "r\\u_", "[_", "self_", "._", "ar_", ",_", "np_", "._", "zeros_", "(_", "maxl", "ag_", "-_", "self_", "._", "nar", "_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mapa", "d_", "=_", "np_", "._", "r\\u_", "[_", "self_", "._", "ma_", ",_", "np_", "._", "zeros_", "(_", "maxl", "ag_", "-_", "self_", "._", "nma", "_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "arp", "ad_", ",_", "mapa", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fft", "ar_", "(_", "self_", ",_", "n_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "Four", "ier", " ", "transform", " ", "of", " ", "AR", " ", "polynomial", ",", " ", "zero", "-", "padde", "d", " ", "at", " ", "end", " ", "to", " ", "n", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "n", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "length", " ", "of", " ", "array", " ", "after", " ", "zero", "-", "padd", "ing", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "fft", "ar", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "fft", " ", "of", " ", "zero", "-", "padde", "d", " ", "ar", " ", "polynomial", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "n_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "n_", "=_", "len_", "(_", "self_", "._", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "fft_", "._", "fft_", "(_", "self_", "._", "pad", "arr_", "(_", "self_", "._", "ar_", ",_", "n_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fft", "ma_", "(_", "self_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "Four", "ier", " ", "transform", " ", "of", " ", "MA", " ", "polynomial", ",", " ", "zero", "-", "padde", "d", " ", "at", " ", "end", " ", "to", " ", "n", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "n", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "length", " ", "of", " ", "array", " ", "after", " ", "zero", "-", "padd", "ing", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "fft", "ar", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "fft", " ", "of", " ", "zero", "-", "padde", "d", " ", "ar", " ", "polynomial", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "n_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "n_", "=_", "len_", "(_", "self_", "._", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "fft_", "._", "fft_", "(_", "self_", "._", "pad", "arr_", "(_", "self_", "._", "ma_", ",_", "n_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fft", "arma", "_", "(_", "self_", ",_", "n_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "Four", "ier", " ", "transform", " ", "of", " ", "ARM", "A", " ", "polynomial", ",", " ", "zero", "-", "padde", "d", " ", "at", " ", "end", " ", "to", " ", "n", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "Four", "ier", " ", "transform", " ", "of", " ", "the", " ", "ARM", "A", " ", "process", " ", "is", " ", "calculated", " ", "as", " ", "the", " ", "ratio", "\\", "10", ";", " ", " ", " ", " ", "of", " ", "the", " ", "fft", " ", "of", " ", "the", " ", "MA", " ", "polynomial", " ", "divide", "d", " ", "by", " ", "the", " ", "fft", " ", "of", " ", "the", " ", "AR", " ", "polynomial", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "n", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "length", " ", "of", " ", "array", " ", "after", " ", "zero", "-", "padd", "ing", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "fft", "arma", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "fft", " ", "of", " ", "zero", "-", "padde", "d", " ", "arma", " ", "polynomial", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "n_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "n_", "=_", "self_", "._", "nob", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "(_", "self_", "._", "fft", "ma_", "(_", "n_", ")_", "/_", "self_", "._", "fft", "ar_", "(_", "n_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "_", "(_", "self_", ",_", "npo", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "raw", " ", "spectral", " ", "densit", "y", ",", " ", "return", "s", " ", "Four", "ier", " ", "transform", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "n", " ", "is", " ", "number", " ", "of", " ", "points", " ", "in", " ", "posit", "ive", " ", "spectr", "um", ",", " ", "the", " ", "actual", " ", "number", " ", "of", " ", "points", "\\", "10", ";", " ", " ", " ", " ", "is", " ", "twi", "ce", " ", "as", " ", "large", ".", " ", "different", " ", "from", " ", "other", " ", "spd", " ", "method", "s", " ", "with", " ", "fft", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n_", "=_", "npo", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "fft_", "._", "fft", "freq_", "(_", "2_", "*_", "n_", ")_", "*_", "2_", "*_", "np_", "._", "pi_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hw_", "=_", "self_", "._", "fft", "arma", "_", "(_", "2_", "*_", "n_", ")_", "#", "not", " ", "sure", ",", " ", "need", " ", "to", " ", "check", " ", "normalization_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "return", " ", "(", "hw", "*", "hw", ".", "conj", "())", ".", "real", "[", "n", "//", "2", "-1", ":]", " ", " ", "*", " ", "0.", "5", " ", "/", " ", "np", ".", "pi", " ", "#", "doe", "sn", "'", "t", " ", "show", " ", "in", " ", "plot_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "(_", "hw_", "*_", "hw_", "._", "conj_", "(_", ")_", ")_", "._", "real_", "*_", "0.5_", "/_", "np_", "._", "pi_", ",_", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "shift_", "(_", "self_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "power", " ", "spectral", " ", "densit", "y", " ", "usi", "ng", " ", "fft", "shift", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "currentl", "y", " ", "return", "s", " ", "two", "-", "side", "d", " ", "according", " ", "to", " ", "fft", " ", "freque", "ncie", "s", ",", " ", "use", " ", "first", " ", "half", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "size", " ", "=", " ", "s1", "+", "s2", "-1", "_", "\\u\\u\\uNL\\u\\u\\u_", "mapa", "dde", "d_", "=_", "self_", "._", "pad", "arr_", "(_", "self_", "._", "ma_", ",_", "n_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arp", "added_", "=_", "self_", "._", "pad", "arr_", "(_", "self_", "._", "ar_", ",_", "n_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hw_", "=_", "fft_", "._", "fft_", "(_", "fft_", "._", "fft", "shift_", "(_", "mapa", "dde", "d_", ")_", ")_", "/_", "fft_", "._", "fft_", "(_", "fft_", "._", "fft", "shift_", "(_", "arp", "added_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "return", " ", "np", ".", "abs", "(", "spd", ")[", "n", "//", "2", "-1", ":]", "_", "\\u\\u\\uNL\\u\\u\\u_", "w_", "=_", "fft_", "._", "fft", "freq_", "(_", "n_", ")_", "*_", "2_", "*_", "np_", "._", "pi_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ws", "lice", "_", "=_", "slice_", "(_", "n_", "//_", "2_", "-_", "1_", ",_", "None_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "return", " ", "(", "hw", "*", "hw", ".", "conj", "())", ".", "real", "[", "ws", "lice", "],", " ", "w", "[", "ws", "lice", "]_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "(_", "hw_", "*_", "hw_", "._", "conj_", "(_", ")_", ")_", "._", "real_", ",_", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "direct_", "(_", "self_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "power", " ", "spectral", " ", "densit", "y", " ", "usi", "ng", " ", "padd", "ing", " ", "to", " ", "length", " ", "n", " ", "don", "e", " ", "by", " ", "fft", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "currentl", "y", " ", "return", "s", " ", "two", "-", "side", "d", " ", "according", " ", "to", " ", "fft", " ", "freque", "ncie", "s", ",", " ", "use", " ", "first", " ", "half", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "size", " ", "=", " ", "s1", "+", "s2", "-1", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "abs", " ", "look", "s", " ", "wrong", "_", "\\u\\u\\uNL\\u\\u\\u_", "hw_", "=_", "fft_", "._", "fft_", "(_", "self_", "._", "ma_", ",_", "n_", ")_", "/_", "fft_", "._", "fft_", "(_", "self_", "._", "ar_", ",_", "n_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "fft_", "._", "fft", "freq_", "(_", "n_", ")_", "*_", "2_", "*_", "np_", "._", "pi_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ws", "lice", "_", "=_", "slice_", "(_", "None_", ",_", "n_", "//_", "2_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "return", " ", "(", "np", ".", "abs", "(", "hw", ")**", "2", ")[", "ws", "lice", "],", " ", "w", "[", "ws", "lice", "]_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "(_", "np_", "._", "abs_", "(_", "hw_", ")_", "**_", "2_", ")_", "*_", "0.5_", "/_", "np_", "._", "pi_", ",_", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "spd", "direct", "2_", "(_", "self_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "this", " ", "look", "s", " ", "bad", ",", " ", "may", "be", " ", "with", " ", "an", " ", "fft", "shift", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "size", " ", "=", " ", "s1", "+", "s2", "-1", "_", "\\u\\u\\uNL\\u\\u\\u_", "hw_", "=_", "(_", "fft_", "._", "fft_", "(_", "np_", "._", "r\\u_", "[_", "self_", "._", "ma_", "[_", ":_", ":_", "-_", "1_", "]_", ",_", "self_", "._", "ma_", "]_", ",_", "n_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "/_", "fft_", "._", "fft_", "(_", "np_", "._", "r\\u_", "[_", "self_", "._", "ar_", "[_", ":_", ":_", "-_", "1_", "]_", ",_", "self_", "._", "ar_", "]_", ",_", "n_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "(_", "hw_", "*_", "hw_", "._", "conj_", "(_", ")_", ")_", "#.", "real", "[", "n", "//", "2", "-1", ":]", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "roots_", "(_", "self_", ",_", "w_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "spectral", " ", "densit", "y", " ", "for", " ", "freque", "nc", "y", " ", "usi", "ng", " ", "polynomial", " ", "root", "s", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "builds", " ", "two", " ", "arrays", " ", "(", "number", " ", "of", " ", "root", "s", ",", " ", "number", " ", "of", " ", "freque", "ncie", "s", ")", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "spd", "root", "s\\u_", "(_", "self_", "._", "arr", "oot", "s_", ",_", "self_", "._", "mar", "oot", "s_", ",_", "w_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "root", "s\\u_", "(_", "self_", ",_", "arr", "oot", "s_", ",_", "mar", "oot", "s_", ",_", "w_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "spectral", " ", "densit", "y", " ", "for", " ", "freque", "nc", "y", " ", "usi", "ng", " ", "polynomial", " ", "root", "s", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "builds", " ", "two", " ", "arrays", " ", "(", "number", " ", "of", " ", "root", "s", ",", " ", "number", " ", "of", " ", "freque", "ncie", "s", ")", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "arr", "oot", "s", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "root", "s", " ", "of", " ", "ar", " ", "(", "denominator", ")", " ", "lag", "-", "polynomial", "\\", "10", ";", " ", " ", " ", " ", "mar", "oot", "s", " ", ":", " ", "ndar", "ray", "\\", "10", ";", " ", " ", " ", " ", "root", "s", " ", "of", " ", "ma", " ", "(", "numerat", "or", ")", " ", "lag", "-", "polynomial", "\\", "10", ";", " ", " ", " ", " ", "w", " ", ":", " ", "array", "\\u", "like", "\\", "10", ";", " ", " ", " ", " ", "freque", "ncie", "s", " ", "for", " ", "whi", "ch", " ", "spd", " ", "is", " ", "calculated", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Not", "es", "\\", "10", ";", " ", " ", " ", " ", "-----", "\\", "10", ";", " ", " ", " ", " ", "this", " ", "shou", "ld", " ", "go", " ", "int", "o", " ", "a", " ", "function", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "np_", "._", "atl", "east", "\\u", "2d_", "(_", "w_", ")_", "._", "T_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cos", "w_", "=_", "np_", "._", "cos_", "(_", "w_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "Green", "e", " ", "5", "th", " ", "edt", ".", " ", "p6", "2", "6", ",", " ", "section", " ", "20.", "2.7", ".", "a", "._", "\\u\\u\\uNL\\u\\u\\u_", "mar", "oot", "s_", "=_", "1._", "/_", "mar", "oot", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "arr", "oot", "s_", "=_", "1._", "/_", "arr", "oot", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "num_", "=_", "1_", "+_", "mar", "oot", "s_", "**_", "2_", "-_", "2_", "*_", "mar", "oot", "s_", "*_", "cos", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "den_", "=_", "1_", "+_", "arr", "oot", "s_", "**_", "2_", "-_", "2_", "*_", "arr", "oot", "s_", "*_", "cos", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "'", "num", ".", "shape", ",", " ", "den", ".", "shape", "',", " ", "num", ".", "shape", ",", " ", "den", ".", "shape_", "\\u\\u\\uNL\\u\\u\\u_", "hw_", "=_", "0.5_", "/_", "np_", "._", "pi_", "*_", "num_", "._", "prod_", "(_", "-_", "1_", ")_", "/_", "den_", "._", "prod_", "(_", "-_", "1_", ")_", "#", "or", " ", "use", " ", "exps", "uml", "og_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "np_", "._", "squeeze_", "(_", "hw_", ")_", ",_", "w_", "._", "squeeze_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "poly_", "(_", "self_", ",_", "w_", ",_", "nma", "_", "=_", "50_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "spectral", " ", "densit", "y", " ", "from", " ", "MA", " ", "polynomial", " ", "represent", "ation", " ", "for", " ", "ARM", "A", " ", "process", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Reference", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "Coc", "hra", "ne", ",", " ", "section", " ", "8.3", ".3", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mpo", "ly_", "=_", "np_", "._", "polynomial", "_", "._", "Polynomial", "_", "(_", "self_", "._", "arma", "2ma", "_", "(_", "nma", "_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hw_", "=_", "mpo", "ly_", "(_", "np_", "._", "exp_", "(_", "1j_", "*_", "w_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "_", "=_", "np_", "._", "real", "\\u", "if", "\\u", "close_", "(_", "hw_", "*_", "hw_", "._", "conj_", "(_", ")_", "*_", "0.5_", "/_", "np_", "._", "pi_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "spd", "_", ",_", "w_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "filter_", "(_", "self_", ",_", "x_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "filter", " ", "a", " ", "times", "eries", " ", "with", " ", "the", " ", "ARM", "A", " ", "filter", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "padd", "ing", " ", "with", " ", "zero", " ", "is", " ", "missi", "ng", ",", " ", "in", " ", "example", " ", "I", " ", "need", "ed", " ", "the", " ", "padd", "ing", " ", "to", " ", "get", "\\", "10", ";", " ", " ", " ", " ", "initial", " ", "condition", "s", " ", "identi", "cal", " ", "to", " ", "direct", " ", "filter", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Initial", " ", "filter", "ed", " ", "observa", "tion", "s", " ", "differ", " ", "from", " ", "filter", "2", " ", "and", " ", "signal", ".", "lfil", "ter", ",", " ", "but", "\\", "10", ";", " ", " ", " ", " ", "at", " ", "end", " ", "the", "y", " ", "are", " ", "the", " ", "same", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "See", " ", "Al", "so", "\\", "10", ";", " ", " ", " ", " ", "--------", "\\", "10", ";", " ", " ", " ", " ", "tsa", ".", "filter", "s", ".", "fft", "convolve", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "n_", "=_", "x_", "._", "shape_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "n_", "==_", "self_", "._", "fft", "arma", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fft", "arma", "_", "=_", "self_", "._", "fft", "arma", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fft", "arma", "_", "=_", "self_", "._", "fft", "ma_", "(_", "n_", ")_", "/_", "self_", "._", "fft", "ar_", "(_", "n_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "tmpf", "ft_", "=_", "fft", "arma", "_", "*_", "fft_", "._", "fft_", "(_", "x_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "fft_", "._", "ifft", "_", "(_", "tmpf", "ft_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "filter", "2_", "(_", "self_", ",_", "x_", ",_", "pad_", "=_", "0_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "filter", " ", "a", " ", "time", " ", "series", " ", "usi", "ng", " ", "fft", "convolve", "3", " ", "with", " ", "ARM", "A", " ", "filter", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "padd", "ing", " ", "of", " ", "x", " ", "currentl", "y", " ", "works", " ", "only", " ", "if", " ", "x", " ", "is", " ", "1d", "\\", "10", ";", " ", " ", " ", " ", "in", " ", "example", " ", "it", " ", "produce", "s", " ", "same", " ", "observa", "tion", "s", " ", "at", " ", "beginn", "ing", " ", "as", " ", "lfil", "ter", " ", "even", "\\", "10", ";", " ", " ", " ", " ", "with", "out", " ", "padd", "ing", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "TOD", "O", ":", " ", "this", " ", "return", "s", " ", "1", " ", "addition", "al", " ", "observa", "tion", " ", "at", " ", "the", " ", "end", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "stats", "models_", "._", "tsa", "_", "._", "filters_", "import_", "fft", "convolve", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "pad_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "pad_", "==_", "'", "auto", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "just", " ", "guess", "ing", " ", "how", " ", "muc", "h", " ", "padding_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "x_", "=_", "self_", "._", "pad", "arr_", "(_", "x_", ",_", "x_", "._", "shape_", "[_", "0_", "]_", "+_", "2_", "*_", "(_", "self_", "._", "nma", "_", "+_", "self_", "._", "nar", "_", ")_", ",_", "ate", "nd_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "x_", "=_", "self_", "._", "pad", "arr_", "(_", "x_", ",_", "x_", "._", "shape_", "[_", "0_", "]_", "+_", "int_", "(_", "pad_", ")_", ",_", "ate", "nd_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "fft", "convolve", "3_", "(_", "x_", ",_", "self_", "._", "ma_", ",_", "self_", "._", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "acf", "2s", "pdf", "req_", "(_", "self_", ",_", "aco", "vf_", ",_", "nfr", "eq_", "=_", "100_", ",_", "w_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "\\", "10", ";", " ", " ", " ", " ", "not", " ", "reall", "y", " ", "a", " ", "method", "\\", "10", ";", " ", " ", " ", " ", "just", " ", "for", " ", "compa", "ris", "on", ",", " ", "not", " ", "efficien", "t", " ", "for", " ", "large", " ", "n", " ", "or", " ", "long", " ", "acf", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "this", " ", "is", " ", "als", "o", " ", "similar", "ly", " ", "use", " ", "in", " ", "tsa", ".", "stat", "tool", "s", ".", "periodo", "gram", " ", "with", " ", "window", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "w_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "w_", "=_", "np_", "._", "linspace_", "(_", "0_", ",_", "np_", "._", "pi_", ",_", "nfr", "eq_", ")_", "[_", ":_", ",_", "None_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "nac", "_", "=_", "len_", "(_", "aco", "vf_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hw_", "=_", "0.5_", "/_", "np_", "._", "pi_", "*_", "(_", "aco", "vf_", "[_", "0_", "]_", "+_", "\\u\\u\\uNL\\u\\u\\u_", "2_", "*_", "(_", "aco", "vf_", "[_", "1_", ":_", "]_", "*_", "np_", "._", "cos_", "(_", "w_", "*_", "np_", "._", "arange_", "(_", "1_", ",_", "nac", "_", ")_", ")_", ")_", "._", "sum_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "hw_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "inv", "powers", "pd_", "(_", "self_", ",_", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "autoc", "ova", "rian", "ce", " ", "from", " ", "spectral", " ", "densit", "y", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "scal", "ing", " ", "is", " ", "correct", ",", " ", "but", " ", "n", " ", "need", "s", " ", "to", " ", "be", " ", "large", " ", "for", " ", "numerical", " ", "accu", "rac", "y", "\\", "10", ";", " ", " ", " ", " ", "may", "be", " ", "padd", "ing", " ", "with", " ", "zero", " ", "in", " ", "fft", " ", "wou", "ld", " ", "be", " ", "faste", "r", "\\", "10", ";", " ", " ", " ", " ", "with", "out", " ", "slicing", " ", "it", " ", "return", "s", " ", "2", "-", "side", "d", " ", "autoc", "ova", "rian", "ce", " ", "with", " ", "fft", "shift", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", ">>>", " ", "Arm", "a", "Ff", "t", "([", "1", ",", " ", "-0", ".5", "],", " ", "[", "1", ".,", " ", "0.", "4", "],", " ", "40", ").", "inv", "powers", "pd", "(", "2", "**", "8", ")[", ":", "10", "]", "\\", "10", ";", " ", " ", " ", " ", "array", "([", " ", "2.0", "8", " ", " ", " ", " ", ",", " ", " ", "1.4", "4", " ", " ", " ", " ", ",", " ", " ", "0.72", " ", " ", " ", " ", ",", " ", " ", "0.36", " ", " ", " ", " ", ",", " ", " ", "0.18", " ", " ", " ", " ", ",", " ", " ", "0.09", " ", " ", " ", " ", ",", "\\", "10", ";", " ", " ", " ", " ", "0.04", "5", " ", " ", " ", ",", " ", " ", "0.02", "25", " ", " ", ",", " ", " ", "0.011", "25", " ", ",", " ", " ", "0.005", "625", "])", "\\", "10", ";", " ", " ", " ", " ", ">>>", " ", "Arm", "a", "Ff", "t", "([", "1", ",", " ", "-0", ".5", "],", " ", "[", "1", ".,", " ", "0.", "4", "],", " ", "40", ").", "aco", "vf", "(", "10", ")", "\\", "10", ";", " ", " ", " ", " ", "array", "([", " ", "2.0", "8", " ", " ", " ", " ", ",", " ", " ", "1.4", "4", " ", " ", " ", " ", ",", " ", " ", "0.72", " ", " ", " ", " ", ",", " ", " ", "0.36", " ", " ", " ", " ", ",", " ", " ", "0.18", " ", " ", " ", " ", ",", " ", " ", "0.09", " ", " ", " ", " ", ",", "\\", "10", ";", " ", " ", " ", " ", "0.04", "5", " ", " ", " ", ",", " ", " ", "0.02", "25", " ", " ", ",", " ", " ", "0.011", "25", " ", ",", " ", " ", "0.005", "625", "])", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hw_", "=_", "self_", "._", "fft", "arma", "_", "(_", "n_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "np_", "._", "real", "\\u", "if", "\\u", "close_", "(_", "fft_", "._", "ifft", "_", "(_", "hw_", "*_", "hw_", "._", "conj_", "(_", ")_", ")_", ",_", "tol_", "=_", "200_", ")_", "[_", ":_", "n_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "map", "oly", "_", "(_", "self_", ",_", "w_", ",_", "two", "side", "d_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "ma", " ", "only", ",", " ", "need", " ", "divisi", "on", " ", "for", " ", "ar", ",", " ", "use", " ", "Lag", "Polynomial", "\\", "10", ";", " ", " ", " ", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "w_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "w_", "=_", "np_", "._", "linspace_", "(_", "0_", ",_", "np_", "._", "pi_", ",_", "nfr", "eq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "0.5_", "/_", "np_", "._", "pi_", "*_", "self_", "._", "map", "oly", "_", "(_", "np_", "._", "exp_", "(_", "w_", "*_", "1j_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Arm", "a", "Ff", "t_", "(_", "Arm", "a", "Process_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "plot", "4_", "(_", "self_", ",_", "fig_", "=_", "None_", ",_", "nob", "s_", "=_", "100_", ",_", "nac", "f_", "=_", "20_", ",_", "nfr", "eq_", "=_", "100_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "rvs_", "=_", "self_", "._", "generat", "e\\u", "sample_", "(_", "nsa", "mple", "_", "=_", "100_", ",_", "burn", "in_", "=_", "500_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "acf", "_", "=_", "self_", "._", "acf", "_", "(_", "nac", "f_", ")_", "[_", ":_", "nac", "f_", "]_", "#", "TOD", "O", ":", " ", "check", " ", "return", " ", "length_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pac", "f_", "=_", "self_", "._", "pac", "f_", "(_", "nac", "f_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "np_", "._", "linspace_", "(_", "0_", ",_", "np_", "._", "pi_", ",_", "nfr", "eq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "spd", "r_", ",_", "wr_", "=_", "self_", "._", "spd", "roots_", "(_", "w_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "fig_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "matplotlib_", "._", "pyplot_", "as_", "plt_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fig_", "=_", "plt_", "._", "figure_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ax_", "=_", "fig_", "._", "add", "\\u", "subplot_", "(_", "2_", ",_", "2_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "plot_", "(_", "rvs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "set\\u", "title_", "(_", "'", "Random", " ", "Sampl", "e", " ", "\\\\", "nar", "=", "%", "s", ",", " ", "ma", "=", "%", "s", "'_", "%_", "(_", "self_", "._", "ar_", ",_", "self_", "._", "ma_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ax_", "=_", "fig_", "._", "add", "\\u", "subplot_", "(_", "2_", ",_", "2_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "plot_", "(_", "acf", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "set\\u", "title_", "(_", "'", "Autoco", "rre", "lation", " ", "\\\\", "nar", "=", "%", "s", ",", " ", "ma", "=", "%", "rs", "'_", "%_", "(_", "self_", "._", "ar_", ",_", "self_", "._", "ma_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ax_", "=_", "fig_", "._", "add", "\\u", "subplot_", "(_", "2_", ",_", "2_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "plot_", "(_", "wr_", ",_", "spd", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "set\\u", "title_", "(_", "'", "Power", " ", "Spect", "rum", " ", "\\\\", "nar", "=", "%", "s", ",", " ", "ma", "=", "%", "s", "'_", "%_", "(_", "self_", "._", "ar_", ",_", "self_", "._", "ma_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ax_", "=_", "fig_", "._", "add", "\\u", "subplot_", "(_", "2_", ",_", "2_", ",_", "4_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "plot_", "(_", "pac", "f_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ax_", "._", "set\\u", "title_", "(_", "'", "Parti", "al", " ", "Autoco", "rre", "lation", " ", "\\\\", "nar", "=", "%", "s", ",", " ", "ma", "=", "%", "s", "'_", "%_", "(_", "self_", "._", "ar_", ",_", "self_", "._", "ma_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "fig_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spd", "ar", "1_", "(_", "ar_", ",_", "w_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "np_", "._", "ndim_", "(_", "ar_", ")_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "rho_", "=_", "ar_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "rho_", "=_", "-_", "ar_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "0.5_", "/_", "np_", "._", "pi_", "/_", "(_", "1_", "+_", "rho_", "*_", "rho_", "-_", "2_", "*_", "rho_", "*_", "np_", "._", "cos_", "(_", "w_", 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
jarcoal/django-sliver/sliver/responses.py
[ { "content": "from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class SliverResponse(Exception):\n\tpass", "metadata": "root.SliverResponse", "header": "['module', '___EOS___']", "index": 3 }, { "content": "class HttpResponseBadRequest(SliverResponse):\n\tresponse = HttpResponseBadRequest", "metadata": "root.HttpResponseBadRequest", "header": "['module', '___EOS___']", "index": 6 }, { "content": "class HttpResponseUnauthorized(SliverResponse):\n\tresponse = HttpResponseNotAllowed", "metadata": "root.HttpResponseUnauthorized", "header": "['module', '___EOS___']", "index": 10 } ]
[ { "span": "from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 84 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "http_", "import_", "Http", "Response_", ",_", "Http", "Respons", "e", "Ba", "d", "Request_", ",_", "Http", "Respons", "e", "Not", "Allowed_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Sli", "ver", "Response_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Http", "Respons", "e", "Ba", "d", "Request_", "(_", "Sli", "ver", "Response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "_", "response_", "=_", "Http", "Respons", "e", "Ba", "d", "Request_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Http", "Respons", "e", "Unauthorized_", "(_", "Sli", "ver", "Response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "_", "response_", "=_", "Http", "Respons", "e", "Not", "Allowed_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Imprecise assert
byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/tests/samba3sam.py
[ { "content": " def test_mapped_containing_sid(self):\n \"\"\"Looking up mapped entry containing SID\"\"\"\n msg = self.ldb.search(expression=\"(cn=Replicator)\")\n self.assertEquals(len(msg), 1)\n self.assertEquals(str(msg[0].dn),\n \"cn=Replicator,ou=Groups,dc=vernstok,dc=nl\")\n self.assertTrue(\"objectSid\" in msg[0])\n self.assertSidEquals(\"S-1-5-21-4231626423-2410014848-2360679739-552\",\n msg[0][\"objectSid\"])\n oc = set(msg[0][\"objectClass\"])\n self.assertEquals(oc, set([\"group\"]))", "metadata": "root.Samba3SamTestCase.test_mapped_containing_sid", "header": "['class', 'Samba3SamTestCase', '(', 'MapBaseTestCase', ')', ':', '___EOS___']", "index": 167 }, { "content": " def test_s3sam_modify(self):\n # Adding a record that will be fallbacked\n self.ldb.add({\"dn\": \"cn=Foo\",\n \"foo\": \"bar\",\n \"blah\": \"Blie\",\n \"cn\": \"Foo\",\n \"showInAdvancedViewOnly\": \"TRUE\"}\n )\n\n # Checking for existence of record (local)\n # TODO: This record must be searched in the local database, which is\n # currently only supported for base searches\n # msg = ldb.search(expression=\"(cn=Foo)\", ['foo','blah','cn','showInAdvancedViewOnly')]\n # TODO: Actually, this version should work as well but doesn't...\n #\n #\n msg = self.ldb.search(expression=\"(cn=Foo)\", base=\"cn=Foo\",\n scope=SCOPE_BASE,\n attrs=['foo','blah','cn','showInAdvancedViewOnly'])\n self.assertEquals(len(msg), 1)\n self.assertEquals(str(msg[0][\"showInAdvancedViewOnly\"]), \"TRUE\")\n self.assertEquals(str(msg[0][\"foo\"]), \"bar\")\n self.assertEquals(str(msg[0][\"blah\"]), \"Blie\")\n\n # Adding record that will be mapped\n self.ldb.add({\"dn\": \"cn=Niemand,cn=Users,dc=vernstok,dc=nl\",\n \"objectClass\": \"user\",\n \"unixName\": \"bin\",\n \"sambaUnicodePwd\": \"geheim\",\n \"cn\": \"Niemand\"})\n\n # Checking for existence of record (remote)\n msg = self.ldb.search(expression=\"(unixName=bin)\",\n attrs=['unixName','cn','dn', 'sambaUnicodePwd'])\n self.assertEquals(len(msg), 1)\n self.assertEquals(str(msg[0][\"cn\"]), \"Niemand\")\n self.assertEquals(str(msg[0][\"sambaUnicodePwd\"]), \"geheim\")\n\n # Checking for existence of record (local && remote)\n msg = self.ldb.search(expression=\"(&(unixName=bin)(sambaUnicodePwd=geheim))\",\n attrs=['unixName','cn','dn', 'sambaUnicodePwd'])\n self.assertEquals(len(msg), 1) # TODO: should check with more records\n self.assertEquals(str(msg[0][\"cn\"]), \"Niemand\")\n self.assertEquals(str(msg[0][\"unixName\"]), \"bin\")\n self.assertEquals(str(msg[0][\"sambaUnicodePwd\"]), \"geheim\")\n\n # Checking for existence of record (local || remote)\n msg = self.ldb.search(expression=\"(|(unixName=bin)(sambaUnicodePwd=geheim))\",\n attrs=['unixName','cn','dn', 'sambaUnicodePwd'])\n #print \"got %d replies\" % len(msg)\n self.assertEquals(len(msg), 1) # TODO: should check with more records\n self.assertEquals(str(msg[0][\"cn\"]), \"Niemand\")\n self.assertEquals(str(msg[0][\"unixName\"]), \"bin\")\n self.assertEquals(str(msg[0][\"sambaUnicodePwd\"]), \"geheim\")\n\n # Checking for data in destination database\n msg = self.samba3.db.search(expression=\"(cn=Niemand)\")\n self.assertTrue(len(msg) >= 1)\n self.assertEquals(str(msg[0][\"sambaSID\"]),\n \"S-1-5-21-4231626423-2410014848-2360679739-2001\")\n self.assertEquals(str(msg[0][\"displayName\"]), \"Niemand\")\n\n # Adding attribute...\n self.ldb.modify_ldif(\"\"\"\ndn: cn=Niemand,cn=Users,dc=vernstok,dc=nl\nchangetype: modify\nadd: description\ndescription: Blah\n\"\"\")\n\n # Checking whether changes are still there...\n msg = self.ldb.search(expression=\"(cn=Niemand)\")\n self.assertTrue(len(msg) >= 1)\n self.assertEquals(str(msg[0][\"cn\"]), \"Niemand\")\n self.assertEquals(str(msg[0][\"description\"]), \"Blah\")\n\n # Modifying attribute...\n self.ldb.modify_ldif(\"\"\"\ndn: cn=Niemand,cn=Users,dc=vernstok,dc=nl\nchangetype: modify\nreplace: description\ndescription: Blie\n\"\"\")\n\n # Checking whether changes are still there...\n msg = self.ldb.search(expression=\"(cn=Niemand)\")\n self.assertTrue(len(msg) >= 1)\n self.assertEquals(str(msg[0][\"description\"]), \"Blie\")\n\n # Deleting attribute...\n self.ldb.modify_ldif(\"\"\"\ndn: cn=Niemand,cn=Users,dc=vernstok,dc=nl\nchangetype: modify\ndelete: description\n\"\"\")\n\n # Checking whether changes are no longer there...\n msg = self.ldb.search(expression=\"(cn=Niemand)\")\n self.assertTrue(len(msg) >= 1)\n self.assertTrue(not \"description\" in msg[0])\n\n # Renaming record...\n self.ldb.rename(\"cn=Niemand,cn=Users,dc=vernstok,dc=nl\",\n \"cn=Niemand2,cn=Users,dc=vernstok,dc=nl\")\n\n # Checking whether DN has changed...\n msg = self.ldb.search(expression=\"(cn=Niemand2)\")\n self.assertEquals(len(msg), 1)\n self.assertEquals(str(msg[0].dn),\n \"cn=Niemand2,cn=Users,dc=vernstok,dc=nl\")\n\n # Deleting record...\n self.ldb.delete(\"cn=Niemand2,cn=Users,dc=vernstok,dc=nl\")\n\n # Checking whether record is gone...\n msg = self.ldb.search(expression=\"(cn=Niemand2)\")\n self.assertEquals(len(msg), 0)", "metadata": "root.Samba3SamTestCase.test_s3sam_modify", "header": "['class', 'Samba3SamTestCase', '(', 'MapBaseTestCase', ')', ':', '___EOS___']", "index": 186 }, { "content": " def test_map_search(self):\n \"\"\"Running search tests on mapped data.\"\"\"\n self.samba3.db.add({\n \"dn\": \"sambaDomainName=TESTS,\" + self.samba3.basedn,\n \"objectclass\": [\"sambaDomain\", \"top\"],\n \"sambaSID\": \"S-1-5-21-4231626423-2410014848-2360679739\",\n \"sambaNextRid\": \"2000\",\n \"sambaDomainName\": \"TESTS\"\n })\n\n # Add a set of split records\n self.ldb.add_ldif(\"\"\"\ndn: \"\"\"+ self.samba4.dn(\"cn=Domain Users\") + \"\"\"\nobjectClass: group\ncn: Domain Users\nobjectSid: S-1-5-21-4231626423-2410014848-2360679739-513\n\"\"\")\n\n # Add a set of split records\n self.ldb.add_ldif(\"\"\"\ndn: \"\"\"+ self.samba4.dn(\"cn=X\") + \"\"\"\nobjectClass: user\ncn: X\ncodePage: x\nrevision: x\ndnsHostName: x\nnextRid: y\nlastLogon: x\ndescription: x\nobjectSid: S-1-5-21-4231626423-2410014848-2360679739-552\n\"\"\")\n\n self.ldb.add({\n \"dn\": self.samba4.dn(\"cn=Y\"),\n \"objectClass\": \"top\",\n \"cn\": \"Y\",\n \"codePage\": \"x\",\n \"revision\": \"x\",\n \"dnsHostName\": \"y\",\n \"nextRid\": \"y\",\n \"lastLogon\": \"y\",\n \"description\": \"x\"})\n\n self.ldb.add({\n \"dn\": self.samba4.dn(\"cn=Z\"),\n \"objectClass\": \"top\",\n \"cn\": \"Z\",\n \"codePage\": \"x\",\n \"revision\": \"y\",\n \"dnsHostName\": \"z\",\n \"nextRid\": \"y\",\n \"lastLogon\": \"z\",\n \"description\": \"y\"})\n\n # Add a set of remote records\n\n self.samba3.db.add({\n \"dn\": self.samba3.dn(\"cn=A\"),\n \"objectClass\": \"posixAccount\",\n \"cn\": \"A\",\n \"sambaNextRid\": \"x\",\n \"sambaBadPasswordCount\": \"x\",\n \"sambaLogonTime\": \"x\",\n \"description\": \"x\",\n \"sambaSID\": \"S-1-5-21-4231626423-2410014848-2360679739-552\",\n \"sambaPrimaryGroupSID\": \"S-1-5-21-4231626423-2410014848-2360679739-512\"})\n\n self.samba3.db.add({\n \"dn\": self.samba3.dn(\"cn=B\"),\n \"objectClass\": \"top\",\n \"cn\": \"B\",\n \"sambaNextRid\": \"x\",\n \"sambaBadPasswordCount\": \"x\",\n \"sambaLogonTime\": \"y\",\n \"description\": \"x\"})\n\n self.samba3.db.add({\n \"dn\": self.samba3.dn(\"cn=C\"),\n \"objectClass\": \"top\",\n \"cn\": \"C\",\n \"sambaNextRid\": \"x\",\n \"sambaBadPasswordCount\": \"y\",\n \"sambaLogonTime\": \"z\",\n \"description\": \"y\"})\n\n # Testing search by DN\n\n # Search remote record by local DN\n dn = self.samba4.dn(\"cn=A\")\n res = self.ldb.search(dn, scope=SCOPE_BASE,\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 1)\n self.assertEquals(str(res[0].dn), dn)\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n\n # Search remote record by remote DN\n dn = self.samba3.dn(\"cn=A\")\n res = self.samba3.db.search(dn, scope=SCOPE_BASE,\n attrs=[\"dnsHostName\", \"lastLogon\", \"sambaLogonTime\"])\n self.assertEquals(len(res), 1)\n self.assertEquals(str(res[0].dn), dn)\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertTrue(not \"lastLogon\" in res[0])\n self.assertEquals(str(res[0][\"sambaLogonTime\"]), \"x\")\n\n # Search split record by local DN\n dn = self.samba4.dn(\"cn=X\")\n res = self.ldb.search(dn, scope=SCOPE_BASE,\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 1)\n self.assertEquals(str(res[0].dn), dn)\n self.assertEquals(str(res[0][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n\n # Search split record by remote DN\n dn = self.samba3.dn(\"cn=X\")\n res = self.samba3.db.search(dn, scope=SCOPE_BASE,\n attrs=[\"dnsHostName\", \"lastLogon\", \"sambaLogonTime\"])\n self.assertEquals(len(res), 1)\n self.assertEquals(str(res[0].dn), dn)\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertTrue(not \"lastLogon\" in res[0])\n self.assertEquals(str(res[0][\"sambaLogonTime\"]), \"x\")\n\n # Testing search by attribute\n\n # Search by ignored attribute\n res = self.ldb.search(expression=\"(revision=x)\", scope=SCOPE_DEFAULT,\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[0][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n\n # Search by kept attribute\n res = self.ldb.search(expression=\"(description=y)\",\n scope=SCOPE_DEFAULT, attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"z\")\n\n # Search by renamed attribute\n res = self.ldb.search(expression=\"(badPwdCount=x)\", scope=SCOPE_DEFAULT,\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n\n # Search by converted attribute\n # TODO:\n # Using the SID directly in the parse tree leads to conversion\n # errors, letting the search fail with no results.\n #res = self.ldb.search(\"(objectSid=S-1-5-21-4231626423-2410014848-2360679739-552)\", scope=SCOPE_DEFAULT, attrs)\n res = self.ldb.search(expression=\"(objectSid=*)\", base=None, scope=SCOPE_DEFAULT, attrs=[\"dnsHostName\", \"lastLogon\", \"objectSid\"])\n self.assertEquals(len(res), 4)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"x\")\n self.assertSidEquals(\"S-1-5-21-4231626423-2410014848-2360679739-552\",\n res[1][\"objectSid\"])\n self.assertTrue(\"objectSid\" in res[1])\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertSidEquals(\"S-1-5-21-4231626423-2410014848-2360679739-552\",\n res[0][\"objectSid\"])\n self.assertTrue(\"objectSid\" in res[0])\n\n # Search by generated attribute\n # In most cases, this even works when the mapping is missing\n # a `convert_operator' by enumerating the remote db.\n res = self.ldb.search(expression=\"(primaryGroupID=512)\",\n attrs=[\"dnsHostName\", \"lastLogon\", \"primaryGroupID\"])\n self.assertEquals(len(res), 1)\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[0][\"primaryGroupID\"]), \"512\")\n\n # Note that Xs \"objectSid\" seems to be fine in the previous search for\n # \"objectSid\"...\n #res = ldb.search(expression=\"(primaryGroupID=*)\", NULL, ldb. SCOPE_DEFAULT, attrs)\n #print len(res) + \" results found\"\n #for i in range(len(res)):\n # for (obj in res[i]) {\n # print obj + \": \" + res[i][obj]\n # }\n # print \"---\"\n #\n\n # Search by remote name of renamed attribute */\n res = self.ldb.search(expression=\"(sambaBadPasswordCount=*)\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 0)\n\n # Search by objectClass\n attrs = [\"dnsHostName\", \"lastLogon\", \"objectClass\"]\n res = self.ldb.search(expression=\"(objectClass=user)\", attrs=attrs)\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[0][\"objectClass\"][0]), \"user\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1][\"objectClass\"][0]), \"user\")\n\n # Prove that the objectClass is actually used for the search\n res = self.ldb.search(expression=\"(|(objectClass=user)(badPwdCount=x))\",\n attrs=attrs)\n self.assertEquals(len(res), 3)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(res[0][\"objectClass\"][0], \"user\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(set(res[1][\"objectClass\"]), set([\"top\"]))\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[2][\"objectClass\"][0]), \"user\")\n\n # Testing search by parse tree\n\n # Search by conjunction of local attributes\n res = self.ldb.search(expression=\"(&(codePage=x)(revision=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[0][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n\n # Search by conjunction of remote attributes\n res = self.ldb.search(expression=\"(&(lastLogon=x)(description=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"x\")\n\n # Search by conjunction of local and remote attribute\n res = self.ldb.search(expression=\"(&(codePage=x)(description=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[0][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n\n # Search by conjunction of local and remote attribute w/o match\n attrs = [\"dnsHostName\", \"lastLogon\"]\n res = self.ldb.search(expression=\"(&(codePage=x)(nextRid=x))\",\n attrs=attrs)\n self.assertEquals(len(res), 0)\n res = self.ldb.search(expression=\"(&(revision=x)(lastLogon=z))\",\n attrs=attrs)\n self.assertEquals(len(res), 0)\n\n # Search by disjunction of local attributes\n res = self.ldb.search(expression=\"(|(revision=x)(dnsHostName=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 2)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[0][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n\n # Search by disjunction of remote attributes\n res = self.ldb.search(expression=\"(|(badPwdCount=x)(lastLogon=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 3)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertFalse(\"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertFalse(\"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"x\")\n\n # Search by disjunction of local and remote attribute\n res = self.ldb.search(expression=\"(|(revision=x)(lastLogon=y))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 3)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=B\"))\n self.assertFalse(\"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"y\")\n\n # Search by disjunction of local and remote attribute w/o match\n res = self.ldb.search(expression=\"(|(codePage=y)(nextRid=z))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 0)\n\n # Search by negated local attribute\n res = self.ldb.search(expression=\"(!(revision=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 6)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[2])\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"z\")\n\n # Search by negated remote attribute\n res = self.ldb.search(expression=\"(!(description=x))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 4)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"z\")\n\n # Search by negated conjunction of local attributes\n res = self.ldb.search(expression=\"(!(&(codePage=x)(revision=x)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 6)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[2])\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"z\")\n\n # Search by negated conjunction of remote attributes\n res = self.ldb.search(expression=\"(!(&(lastLogon=x)(description=x)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 6)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"z\")\n\n # Search by negated conjunction of local and remote attribute\n res = self.ldb.search(expression=\"(!(&(codePage=x)(description=x)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 6)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[2])\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"z\")\n\n # Search by negated disjunction of local attributes\n res = self.ldb.search(expression=\"(!(|(revision=x)(dnsHostName=x)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[2])\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"z\")\n\n # Search by negated disjunction of remote attributes\n res = self.ldb.search(expression=\"(!(|(badPwdCount=x)(lastLogon=x)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 5)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=Y\"))\n self.assertEquals(str(res[1][\"dnsHostName\"]), \"y\")\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n\n # Search by negated disjunction of local and remote attribute\n res = self.ldb.search(expression=\"(!(|(revision=x)(lastLogon=y)))\",\n attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 5)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[2][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n\n # Search by complex parse tree\n res = self.ldb.search(expression=\"(|(&(revision=x)(dnsHostName=x))(!(&(description=x)(nextRid=y)))(badPwdCount=y))\", attrs=[\"dnsHostName\", \"lastLogon\"])\n self.assertEquals(len(res), 7)\n res = sorted(res, key=attrgetter('dn'))\n self.assertEquals(str(res[0].dn), self.samba4.dn(\"cn=A\"))\n self.assertTrue(not \"dnsHostName\" in res[0])\n self.assertEquals(str(res[0][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[1].dn), self.samba4.dn(\"cn=B\"))\n self.assertTrue(not \"dnsHostName\" in res[1])\n self.assertEquals(str(res[1][\"lastLogon\"]), \"y\")\n self.assertEquals(str(res[2].dn), self.samba4.dn(\"cn=C\"))\n self.assertTrue(not \"dnsHostName\" in res[2])\n self.assertEquals(str(res[2][\"lastLogon\"]), \"z\")\n self.assertEquals(str(res[3].dn), self.samba4.dn(\"cn=X\"))\n self.assertEquals(str(res[3][\"dnsHostName\"]), \"x\")\n self.assertEquals(str(res[3][\"lastLogon\"]), \"x\")\n self.assertEquals(str(res[4].dn), self.samba4.dn(\"cn=Z\"))\n self.assertEquals(str(res[4][\"dnsHostName\"]), \"z\")\n self.assertEquals(str(res[4][\"lastLogon\"]), \"z\")\n\n # Clean up\n dns = [self.samba4.dn(\"cn=%s\" % n) for n in [\"A\",\"B\",\"C\",\"X\",\"Y\",\"Z\"]]\n for dn in dns:\n self.ldb.delete(dn)", "metadata": "root.MapTestCase.test_map_search", "header": "['class', 'MapTestCase', '(', 'MapBaseTestCase', ')', ':', '___EOS___']", "index": 318 } ]
[ { "span": "self.assertTrue(\"objectSid\" in msg[0])", "start_line": 173, "start_column": 8, "end_line": 173, "end_column": 46 }, { "span": "self.assertTrue(len(msg) >= 1)", "start_line": 243, "start_column": 8, "end_line": 243, "end_column": 38 }, { "span": "self.assertTrue(len(msg) >= 1)", "start_line": 258, "start_column": 8, "end_line": 258, "end_column": 38 }, { "span": "self.assertTrue(len(msg) >= 1)", "start_line": 272, "start_column": 8, "end_line": 272, "end_column": 38 }, { "span": "self.assertTrue(len(msg) >= 1)", "start_line": 284, "start_column": 8, "end_line": 284, "end_column": 38 }, { "span": "self.assertTrue(\"objectSid\" in res[1])", "start_line": 494, "start_column": 8, "end_line": 494, "end_column": 46 }, { "span": "self.assertTrue(\"objectSid\" in res[0])", "start_line": 500, "start_column": 8, "end_line": 500, "end_column": 46 }, { "span": "self.assertFalse(\"dnsHostName\" in res[0])", "start_line": 626, "start_column": 8, "end_line": 626, "end_column": 49 }, { "span": "self.assertFalse(\"dnsHostName\" in res[1])", "start_line": 629, "start_column": 8, "end_line": 629, "end_column": 49 }, { "span": "self.assertFalse(\"dnsHostName\" in res[0])", "start_line": 641, "start_column": 8, "end_line": 641, "end_column": 49 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Sam", "ba", "3", "Sam", "Test", "Case_", "(_", "Map", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "mapp", "ed", "\\u", "contain", "ing", "\\u", "sid_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Look", "ing", " ", "up", " ", "mapp", "ed", " ", "entry", " ", "contain", "ing", " ", "SID", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Replica", "tor", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "=", "Replica", "tor", ",", "ou", "=", "Group", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "object", "Si", "d", "\"_", "in_", "msg_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Si", "d", "Equals_", "(_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "[_", "0_", "]_", "[_", "\"", "object", "Si", "d", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "oc_", "=_", "set_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "oc_", ",_", "set_", "(_", "[_", "\"", "group", "\"_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sam", "ba", "3", "Sam", "Test", "Case_", "(_", "Map", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "s3", "sam", "\\u", "modify_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Add", "ing", " ", "a", " ", "record", " ", "tha", "t", " ", "will", " ", "be", " ", "fall", "backed", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ldb_", "._", "add_", "(_", "{_", "\"", "dn", "\"_", ":_", "\"", "cn", "=", "Foo", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "foo", "\"_", ":_", "\"", "bar", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "bla", "h", "\"_", ":_", "\"", "Bli", "e", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "Foo", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "show", "In", "Advance", "d", "View", "On", "ly", "\"_", ":_", "\"", "TRU", "E", "\"_", "}_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "for", " ", "existence", " ", "of", " ", "record", " ", "(", "local", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "Thi", "s", " ", "record", " ", "must", " ", "be", " ", "searche", "d", " ", "in", " ", "the", " ", "local", " ", "databa", "se", ",", " ", "whi", "ch", " ", "is_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "currentl", "y", " ", "only", " ", "support", "ed", " ", "for", " ", "base", " ", "searche", "s_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "msg", " ", "=", " ", "ldb", ".", "search", "(", "express", "ion", "=\"(", "cn", "=", "Foo", ")\"", ",", " ", "['", "foo", "','", "bla", "h", "','", "cn", "','", "show", "In", "Advance", "d", "View", "On", "ly", "')]", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "Actual", "ly", ",", " ", "this", " ", "version", " ", "shou", "ld", " ", "work", " ", "as", " ", "well", " ", "but", " ", "doe", "sn", "'", "t", "..._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Foo", ")\"_", ",_", "base_", "=_", "\"", "cn", "=", "Foo", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "scope_", "=_", "SCOPE", "\\u", "BASE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "'", "foo", "'_", ",_", "'", "bla", "h", "'_", ",_", "'", "cn", "'_", ",_", "'", "show", "In", "Advance", "d", "View", "On", "ly", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "show", "In", "Advance", "d", "View", "On", "ly", "\"_", "]_", ")_", ",_", "\"", "TRU", "E", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "foo", "\"_", "]_", ")_", ",_", "\"", "bar", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "bla", "h", "\"_", "]_", ")_", ",_", "\"", "Bli", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", "ing", " ", "record", " ", "tha", "t", " ", "will", " ", "be", " ", "mapped_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "add_", "(_", "{_", "\"", "dn", "\"_", ":_", "\"", "cn", "=", "Nie", "mand", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "user", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "unix", "Name", "\"_", ":_", "\"", "bin", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Unic", "ode", "Pw", "d", "\"_", ":_", "\"", "ge", "hei", "m", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "Nie", "mand", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "for", " ", "existence", " ", "of", " ", "record", " ", "(", "remote", ")_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "unix", "Name", "=", "bin", ")\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "'", "unix", "Name", "'_", ",_", "'", "cn", "'_", ",_", "'", "dn", "'_", ",_", "'", "samba", "Unic", "ode", "Pw", "d", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "cn", "\"_", "]_", ")_", ",_", "\"", "Nie", "mand", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "samba", "Unic", "ode", "Pw", "d", "\"_", "]_", ")_", ",_", "\"", "ge", "hei", "m", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "for", " ", "existence", " ", "of", " ", "record", " ", "(", "local", " ", "&&", " ", "remote", ")_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "unix", "Name", "=", "bin", ")(", "samba", "Unic", "ode", "Pw", "d", "=", "ge", "hei", "m", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "'", "unix", "Name", "'_", ",_", "'", "cn", "'_", ",_", "'", "dn", "'_", ",_", "'", "samba", "Unic", "ode", "Pw", "d", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "#", " ", "TOD", "O", ":", " ", "shou", "ld", " ", "check", " ", "with", " ", "more", " ", "records_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "cn", "\"_", "]_", ")_", ",_", "\"", "Nie", "mand", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "unix", "Name", "\"_", "]_", ")_", ",_", "\"", "bin", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "samba", "Unic", "ode", "Pw", "d", "\"_", "]_", ")_", ",_", "\"", "ge", "hei", "m", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "for", " ", "existence", " ", "of", " ", "record", " ", "(", "local", " ", "||", " ", "remote", ")_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "unix", "Name", "=", "bin", ")(", "samba", "Unic", "ode", "Pw", "d", "=", "ge", "hei", "m", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "'", "unix", "Name", "'_", ",_", "'", "cn", "'_", ",_", "'", "dn", "'_", ",_", "'", "samba", "Unic", "ode", "Pw", "d", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "\"", "got", " ", "%", "d", " ", "replies", "\"", " ", "%", " ", "len", "(", "msg", ")_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "#", " ", "TOD", "O", ":", " ", "shou", "ld", " ", "check", " ", "with", " ", "more", " ", "records_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "cn", "\"_", "]_", ")_", ",_", "\"", "Nie", "mand", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "unix", "Name", "\"_", "]_", ")_", ",_", "\"", "bin", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "samba", "Unic", "ode", "Pw", "d", "\"_", "]_", ")_", ",_", "\"", "ge", "hei", "m", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "for", " ", "data", " ", "in", " ", "destinat", "ion", " ", "database_", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "samba", "3_", "._", "db_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "msg_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "samba", "SID", "\"_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "200", "1", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "display", "Name", "\"_", "]_", ")_", ",_", "\"", "Nie", "mand", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", "ing", " ", "attribute", "..._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "modif", "y", "\\u", "ldif", "_", "(_", "\"\"\"", "\\", "10", ";", "dn", ":", " ", "cn", "=", "Nie", "mand", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\\", "10", ";", "change", "type", ":", " ", "modif", "y", "\\", "10", ";", "add", ":", " ", "description", "\\", "10", ";", "description", ":", " ", "Bla", "h", "\\", "10", ";\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "whe", "ther", " ", "change", "s", " ", "are", " ", "still", " ", "there", "..._", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "msg_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "cn", "\"_", "]_", ")_", ",_", "\"", "Nie", "mand", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "description", "\"_", "]_", ")_", ",_", "\"", "Bla", "h", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Modif", "ying", " ", "attribute", "..._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "modif", "y", "\\u", "ldif", "_", "(_", "\"\"\"", "\\", "10", ";", "dn", ":", " ", "cn", "=", "Nie", "mand", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\\", "10", ";", "change", "type", ":", " ", "modif", "y", "\\", "10", ";", "replace", ":", " ", "description", "\\", "10", ";", "description", ":", " ", "Bli", "e", "\\", "10", ";\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "whe", "ther", " ", "change", "s", " ", "are", " ", "still", " ", "there", "..._", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "msg_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "[_", "\"", "description", "\"_", "]_", ")_", ",_", "\"", "Bli", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Del", "eti", "ng", " ", "attribute", "..._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "modif", "y", "\\u", "ldif", "_", "(_", "\"\"\"", "\\", "10", ";", "dn", ":", " ", "cn", "=", "Nie", "mand", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\\", "10", ";", "change", "type", ":", " ", "modif", "y", "\\", "10", ";", "delete", ":", " ", "description", "\\", "10", ";\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "whe", "ther", " ", "change", "s", " ", "are", " ", "no", " ", "long", "er", " ", "there", "..._", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "msg_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "description", "\"_", "in_", "msg_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Ren", "amin", "g", " ", "record", "..._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "rename_", "(_", "\"", "cn", "=", "Nie", "mand", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "=", "Nie", "mand", "2", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "whe", "ther", " ", "DN", " ", "has", " ", "change", "d", "..._", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", "2", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "msg_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "=", "Nie", "mand", "2", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Del", "eti", "ng", " ", "record", "..._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "delete_", "(_", "\"", "cn", "=", "Nie", "mand", "2", ",", "cn", "=", "User", "s", ",", "dc", "=", "ver", "nst", "ok", ",", "dc", "=", "nl", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", "ing", " ", "whe", "ther", " ", "record", " ", "is", " ", "gone", "..._", "\\u\\u\\uNL\\u\\u\\u_", "msg_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "cn", "=", "Nie", "mand", "2", ")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "msg_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Map", "Test", "Case_", "(_", "Map", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "map", "\\u", "search_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", "ning", " ", "search", " ", "tests", " ", "on", " ", "mapp", "ed", " ", "data", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "samba", "3_", "._", "db_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "\"", "samba", "Doma", "in", "Name", "=", "TESTS", ",\"_", "+_", "self_", "._", "samba", "3_", "._", "based", "n_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "objectc", "lass", "\"_", ":_", "[_", "\"", "samba", "Doma", "in", "\"_", ",_", "\"", "top", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "SID", "\"_", ":_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ne", "xt", "Rid", "\"_", ":_", "\"", "2000", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Doma", "in", "Name", "\"_", ":_", "\"", "TESTS", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "a", " ", "set", " ", "of", " ", "split", " ", "records_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "add", "\\u", "ldif", "_", "(_", "\"\"\"", "\\", "10", ";", "dn", ":", " ", "\"\"\"_", "+_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Doma", "in", " ", "User", "s", "\"_", ")_", "+_", "\"\"\"", "\\", "10", ";", "object", "Class", ":", " ", "group", "\\", "10", ";", "cn", ":", " ", "Doma", "in", " ", "User", "s", "\\", "10", ";", "object", "Si", "d", ":", " ", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "513", "\\", "10", ";\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "a", " ", "set", " ", "of", " ", "split", " ", "records_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "add", "\\u", "ldif", "_", "(_", "\"\"\"", "\\", "10", ";", "dn", ":", " ", "\"\"\"_", "+_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", "+_", "\"\"\"", "\\", "10", ";", "object", "Class", ":", " ", "user", "\\", "10", ";", "cn", ":", " ", "X", "\\", "10", ";", "code", "Page", ":", " ", "x", "\\", "10", ";", "revis", "ion", ":", " ", "x", "\\", "10", ";", "dns", "Host", "Name", ":", " ", "x", "\\", "10", ";", "next", "Rid", ":", " ", "y", "\\", "10", ";", "last", "Logo", "n", ":", " ", "x", "\\", "10", ";", "description", ":", " ", "x", "\\", "10", ";", "object", "Si", "d", ":", " ", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", "\\", "10", ";\"\"\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "top", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "Y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "code", "Page", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "revis", "ion", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dns", "Host", "Name", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "next", "Rid", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "last", "Logo", "n", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "x", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ldb_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "top", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "Z", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "code", "Page", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "revis", "ion", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dns", "Host", "Name", "\"_", ":_", "\"", "z", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "next", "Rid", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "last", "Logo", "n", "\"_", ":_", "\"", "z", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "y", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "a", " ", "set", " ", "of", " ", "remote", " ", "records_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "samba", "3_", "._", "db_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "self_", "._", "samba", "3_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "posix", "Account", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "A", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ne", "xt", "Rid", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ba", "d", "Passw", "ord", "Count", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Logo", "n", "Time", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "SID", "\"_", ":_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Prim", "ary", "Group", "SID", "\"_", ":_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "512", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "samba", "3_", "._", "db_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "self_", "._", "samba", "3_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "top", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "B", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ne", "xt", "Rid", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ba", "d", "Passw", "ord", "Count", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Logo", "n", "Time", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "x", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "samba", "3_", "._", "db_", "._", "add_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "dn", "\"_", ":_", "self_", "._", "samba", "3_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "object", "Class", "\"_", ":_", "\"", "top", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "cn", "\"_", ":_", "\"", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ne", "xt", "Rid", "\"_", ":_", "\"", "x", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Ba", "d", "Passw", "ord", "Count", "\"_", ":_", "\"", "y", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "samba", "Logo", "n", "Time", "\"_", ":_", "\"", "z", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "y", "\"_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "ing", " ", "search", " ", "by", " ", "DN_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "remote", " ", "record", " ", "by", " ", "local", " ", "DN_", "\\u\\u\\uNL\\u\\u\\u_", "dn_", "=_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "dn_", ",_", "scope_", "=_", "SCOPE", "\\u", "BASE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "dn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "remote", " ", "record", " ", "by", " ", "remote", " ", "DN_", "\\u\\u\\uNL\\u\\u\\u_", "dn_", "=_", "self_", "._", "samba", "3_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "samba", "3_", "._", "db_", "._", "search_", "(_", "dn_", ",_", "scope_", "=_", "SCOPE", "\\u", "BASE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", ",_", "\"", "samba", "Logo", "n", "Time", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "dn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "last", "Logo", "n", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "samba", "Logo", "n", "Time", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "split", " ", "record", " ", "by", " ", "local", " ", "DN_", "\\u\\u\\uNL\\u\\u\\u_", "dn_", "=_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "dn_", ",_", "scope_", "=_", "SCOPE", "\\u", "BASE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "dn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "split", " ", "record", " ", "by", " ", "remote", " ", "DN_", "\\u\\u\\uNL\\u\\u\\u_", "dn_", "=_", "self_", "._", "samba", "3_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "samba", "3_", "._", "db_", "._", "search_", "(_", "dn_", ",_", "scope_", "=_", "SCOPE", "\\u", "BASE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", ",_", "\"", "samba", "Logo", "n", "Time", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "dn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "last", "Logo", "n", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "samba", "Logo", "n", "Time", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "ing", " ", "search", " ", "by", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "ignore", "d", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "revis", "ion", "=", "x", ")\"_", ",_", "scope_", "=_", "SCOPE", "\\u", "DEFAULT_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "kep", "t", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "description", "=", "y", ")\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "scope_", "=_", "SCOPE", "\\u", "DEFAULT_", ",_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "renamed", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "bad", "Pw", "d", "Count", "=", "x", ")\"_", ",_", "scope_", "=_", "SCOPE", "\\u", "DEFAULT_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "convert", "ed", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "Us", "ing", " ", "the", " ", "SID", " ", "direct", "ly", " ", "in", " ", "the", " ", "parse", " ", "tree", " ", "leads", " ", "to", " ", "conversion_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "error", "s", ",", " ", "lett", "ing", " ", "the", " ", "search", " ", "fail", " ", "with", " ", "no", " ", "results", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "res", " ", "=", " ", "self", ".", "ldb", ".", "search", "(\"", "(", "object", "Si", "d", "=", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", ")\"", ",", " ", "scope", "=", "SCOPE", "\\u", "DEF", "AUL", "T", ",", " ", "attr", "s", ")_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "object", "Si", "d", "=", "*)\"", "_", ",_", "base_", "=_", "None_", ",_", "scope_", "=_", "SCOPE", "\\u", "DEFAULT_", ",_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", ",_", "\"", "object", "Si", "d", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "4_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Si", "d", "Equals_", "(_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "[_", "1_", "]_", "[_", "\"", "object", "Si", "d", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "object", "Si", "d", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Si", "d", "Equals_", "(_", "\"", "S", "-1", "-", "5", "-", "21", "-", "423", "162", "642", "3", "-", "241", "0014", "848", "-", "236", "067", "973", "9", "-", "552", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "[_", "0_", "]_", "[_", "\"", "object", "Si", "d", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "object", "Si", "d", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "generat", "ed", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "In", " ", "most", " ", "case", "s", ",", " ", "this", " ", "even", " ", "works", " ", "whe", "n", " ", "the", " ", "mapping", " ", "is", " ", "missing_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "a", " ", "`", "convert", "\\u", "opera", "tor", "'", " ", "by", " ", "enumerati", "ng", " ", "the", " ", "remote", " ", "db", "._", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "primary", "Group", "ID", "=", "512", ")\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", ",_", "\"", "primary", "Group", "ID", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "primary", "Group", "ID", "\"_", "]_", ")_", ",_", "\"", "512", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Not", "e", " ", "tha", "t", " ", "Xs", " ", "\"", "object", "Si", "d", "\"", " ", "see", "ms", " ", "to", " ", "be", " ", "fine", " ", "in", " ", "the", " ", "previ", "ous", " ", "search", " ", "for_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\"", "object", "Si", "d", "\"...", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "res", " ", "=", " ", "ldb", ".", "search", "(", "express", "ion", "=\"(", "primary", "Group", "ID", "=", "*)\"", ",", " ", "NULL", ",", " ", "ldb", ".", " ", "SCOPE", "\\u", "DEF", "AUL", "T", ",", " ", "attr", "s", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "print", " ", "len", "(", "res", ")", " ", "+", " ", "\"", " ", "results", " ", "found", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "#", "for", " ", "i", " ", "in", " ", "range", "(", "len", "(", "res", "))", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "for", " ", "(", "obj", " ", "in", " ", "res", "[", "i", "])", " ", "{_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "print", " ", "obj", " ", "+", " ", "\":", " ", "\"", " ", "+", " ", "res", "[", "i", "][", "obj", "]_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "}_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "print", " ", "\"--", "-\"_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "remote", " ", "name", " ", "of", " ", "renamed", " ", "attribute", " ", "*/", "_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "samba", "Ba", "d", "Passw", "ord", "Count", "=", "*)\"", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "object", "Class_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", ",_", "\"", "object", "Class", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "object", "Class", "=", "user", ")\"_", ",_", "attrs_", "=_", "attrs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", "[_", "0_", "]_", ")_", ",_", "\"", "user", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", "[_", "0_", "]_", ")_", ",_", "\"", "user", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Prov", "e", " ", "tha", "t", " ", "the", " ", "object", "Class", " ", "is", " ", "actual", "ly", " ", "used", " ", "for", " ", "the", " ", "search_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "object", "Class", "=", "user", ")(", "bad", "Pw", "d", "Count", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "attrs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", "[_", "0_", "]_", ",_", "\"", "user", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "set_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", ")_", ",_", "set_", "(_", "[_", "\"", "top", "\"_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "object", "Class", "\"_", "]_", "[_", "0_", "]_", ")_", ",_", "\"", "user", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "ing", " ", "search", " ", "by", " ", "parse", " ", "tree_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "conjunction", " ", "of", " ", "local", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "code", "Page", "=", "x", ")(", "revis", "ion", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "conjunction", " ", "of", " ", "remote", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "last", "Logo", "n", "=", "x", ")(", "description", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "conjunction", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "code", "Page", "=", "x", ")(", "description", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "conjunction", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute", " ", "w", "/", "o", " ", "match_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "code", "Page", "=", "x", ")(", "next", "Rid", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "attrs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "&(", "revis", "ion", "=", "x", ")(", "last", "Logo", "n", "=", "z", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "attrs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "disj", "uncti", "on", " ", "of", " ", "local", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "revis", "ion", "=", "x", ")(", "dns", "Host", "Name", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "disj", "uncti", "on", " ", "of", " ", "remote", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "bad", "Pw", "d", "Count", "=", "x", ")(", "last", "Logo", "n", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "disj", "uncti", "on", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "revis", "ion", "=", "x", ")(", "last", "Logo", "n", "=", "y", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "disj", "uncti", "on", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute", " ", "w", "/", "o", " ", "match_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "code", "Page", "=", "y", ")(", "next", "Rid", "=", "z", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "local", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "revis", "ion", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "6_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "remote", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "description", "=", "x", "))\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "4_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "conjunction", " ", "of", " ", "local", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "&(", "code", "Page", "=", "x", ")(", "revis", "ion", "=", "x", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "6_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "conjunction", " ", "of", " ", "remote", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "&(", "last", "Logo", "n", "=", "x", ")(", "description", "=", "x", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "6_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "conjunction", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "&(", "code", "Page", "=", "x", ")(", "description", "=", "x", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "6_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "disj", "uncti", "on", " ", "of", " ", "local", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "|(", "revis", "ion", "=", "x", ")(", "dns", "Host", "Name", "=", "x", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "disj", "uncti", "on", " ", "of", " ", "remote", " ", "attributes_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "|(", "bad", "Pw", "d", "Count", "=", "x", ")(", "last", "Logo", "n", "=", "x", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Y", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "negate", "d", " ", "disj", "uncti", "on", " ", "of", " ", "local", " ", "and", " ", "remote", " ", "attribute_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "!(", "|(", "revis", "ion", "=", "x", ")(", "last", "Logo", "n", "=", "y", ")))", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sear", "ch", " ", "by", " ", "complex", " ", "parse", " ", "tree_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "self_", "._", "ldb_", "._", "search_", "(_", "expression_", "=_", "\"(", "|(", "&(", "revis", "ion", "=", "x", ")(", "dns", "Host", "Name", "=", "x", "))(", "!(", "&(", "description", "=", "x", ")(", "next", "Rid", "=", "y", ")))", "(", "bad", "Pw", "d", "Count", "=", "y", "))\"_", ",_", "attrs_", "=_", "[_", "\"", "dns", "Host", "Name", "\"_", ",_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "res_", ")_", ",_", "7_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "sorted_", "(_", "res_", ",_", "key_", "=_", "attrgetter_", "(_", "'", "dn", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "A", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "0_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "B", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "1_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "y", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "C", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "not_", "\"", "dns", "Host", "Name", "\"_", "in_", "res_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "2_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "X", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "3_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "x", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "4_", "]_", "._", "dn_", ")_", ",_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "Z", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "4_", "]_", "[_", "\"", "dns", "Host", "Name", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "str_", "(_", "res_", "[_", "4_", "]_", "[_", "\"", "last", "Logo", "n", "\"_", "]_", ")_", ",_", "\"", "z", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Clean", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "dns_", "=_", "[_", "self_", "._", "samba", "4_", "._", "dn_", "(_", "\"", "cn", "=", "%", "s", "\"_", "%_", "n_", ")_", "for_", "n_", "in_", "[_", "\"", "A", "\"_", ",_", "\"", "B", "\"_", ",_", "\"", "C", "\"_", ",_", "\"", "X", "\"_", ",_", "\"", "Y", "\"_", ",_", "\"", "Z", "\"_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "dn_", "in_", "dns_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ldb_", "._", "delete_", "(_", "dn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
`__iter__` method returns a non-iterator
cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/wsgilib.py
[ { "content": "class add_close(object):\n \"\"\"\n An an iterable that iterates over app_iter, then calls\n close_func.\n \"\"\"\n\n\n\n\n", "metadata": "root.add_close", "header": "['module', '___EOS___']", "index": 30 }, { "content": " def __iter__(self):\n return self", "metadata": "root.add_close.__iter__", "header": "['class', 'add_close', '(', 'object', ')', ':', '___EOS___']", "index": 42 }, { "content": "class chained_app_iters(object):\n\n \"\"\"\n Chains several app_iters together, also delegating .close() to each\n of them.\n \"\"\"\n\n\n\n\n", "metadata": "root.chained_app_iters", "header": "['module', '___EOS___']", "index": 100 }, { "content": " def __iter__(self):\n return self", "metadata": "root.chained_app_iters.__iter__", "header": "['class', 'chained_app_iters', '(', 'object', ')', ':', '___EOS___']", "index": 112 }, { "content": "class _wrap_app_iter(object):\n\n\n", "metadata": "root._wrap_app_iter", "header": "['module', '___EOS___']", "index": 191 }, { "content": " def __iter__(self):\n return self", "metadata": "root._wrap_app_iter.__iter__", "header": "['class', '_wrap_app_iter', '(', 'object', ')', ':', '___EOS___']", "index": 201 }, { "content": "class _wrap_app_iter_app(object):\n\n\n", "metadata": "root._wrap_app_iter_app", "header": "['module', '___EOS___']", "index": 238 }, { "content": " def __iter__(self):\n return self", "metadata": "root._wrap_app_iter_app.__iter__", "header": "['class', '_wrap_app_iter_app', '(', 'object', ')', ':', '___EOS___']", "index": 252 } ]
[ { "span": "class add_close(object):", "start_line": 30, "start_column": 0, "end_line": 30, "end_column": 24 }, { "span": "class chained_app_iters(object):", "start_line": 100, "start_column": 0, "end_line": 100, "end_column": 32 }, { "span": "class _wrap_app_iter(object):", "start_line": 191, "start_column": 0, "end_line": 191, "end_column": 29 }, { "span": "class _wrap_app_iter_app(object):", "start_line": 238, "start_column": 0, "end_line": 238, "end_column": 33 } ]
[ { "span": "def __iter__(self):", "start_line": 42, "start_column": 4, "end_line": 42, "end_column": 23 }, { "span": "def __iter__(self):", "start_line": 112, "start_column": 4, "end_line": 112, "end_column": 23 }, { "span": "def __iter__(self):", "start_line": 201, "start_column": 4, "end_line": 201, "end_column": 23 }, { "span": "def __iter__(self):", "start_line": 252, "start_column": 4, "end_line": 252, "end_column": 23 } ]
1
false
[ "[CLS]_", "`_", "\\u\\u", "iter\\u\\u_", "`_", "method_", "returns_", "a_", "non", "_", "-_", "iterator_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "add", "\\u", "close_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "An", " ", "an", " ", "iterable", " ", "tha", "t", " ", "iterate", "s", " ", "over", " ", "app", "\\u", "iter", ",", " ", "then", " ", "calls", "\\", "10", ";", " ", " ", " ", " ", "close", "\\u", "func", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "add", "\\u", "close_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "iter\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "chained", "\\u", "app", "\\u", "iters_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Chain", "s", " ", "sever", "al", " ", "app", "\\u", "iters", " ", "tog", "ether", ",", " ", "als", "o", " ", "delegat", "ing", " ", ".", "close", "()", " ", "to", " ", "each", "\\", "10", ";", " ", " ", " ", " ", "of", " ", "them", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "chained", "\\u", "app", "\\u", "iters_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "iter\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "\\u", "wrap", "\\u", "app", "\\u", "iter_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "\\u", "wrap", "\\u", "app", "\\u", "iter_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "iter\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "\\u", "wrap", "\\u", "app", "\\u", "iter", "\\u", "app_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "\\u", "wrap", "\\u", "app", "\\u", "iter", "\\u", "app_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "iter\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2 ]
Unused import
kylewm/redwind/redwind/services.py
[ { "content": "from . import contexts\nfrom . import util\nfrom .models import Venue\nfrom .views import geo_name\n\nfrom bs4 import BeautifulSoup\nfrom flask import request, jsonify, redirect, url_for, Blueprint, current_app, render_template\nimport datetime\nimport mf2py\nimport mf2util\nimport requests\nimport sys\nimport urllib\n\nservices = Blueprint('services', __name__)\n\nUSER_AGENT = 'Red Wind (https://github.com/kylewm/redwind)'\n\n\n\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "@services.route('/services/fetch_profile')\ndef fetch_profile():\n url = request.args.get('url')\n if not url:\n return \"\"\"\n<html><body>\n<h1>Fetch Profile</h1>\n<form><label>URL to fetch: <input name=\"url\"></label>\n<input type=\"Submit\">\n</form></body></html>\"\"\"\n\n try:\n name = None\n image = None\n\n d = mf2py.Parser(url=url).to_dict()\n\n relmes = d['rels'].get('me', [])\n\n # check for h-feed\n hfeed = next((item for item in d['items']\n if 'h-feed' in item['type']), None)\n if hfeed:\n authors = hfeed.get('properties', {}).get('author')\n images = hfeed.get('properties', {}).get('photo')\n if authors:\n if isinstance(authors[0], dict):\n name = authors[0].get('properties', {}).get('name')\n image = authors[0].get('properties', {}).get('photo')\n else:\n name = authors[0]\n if images and not image:\n image = images[0]\n\n # check for top-level h-card\n for item in d['items']:\n if 'h-card' in item.get('type', []):\n if not name:\n name = item.get('properties', {}).get('name')\n if not image:\n image = item.get('properties', {}).get('photo')\n\n return jsonify({\n 'name': name,\n 'image': image,\n 'social': relmes,\n })\n\n except BaseException as e:\n resp = jsonify({'error': str(e)})\n resp.status_code = 400\n return resp", "metadata": "root.fetch_profile", "header": "['module', '___EOS___']", "index": 18 }, { "content": "@services.route('/services/nearby')\ndef nearby_venues():\n lat = float(request.args.get('latitude'))\n lng = float(request.args.get('longitude'))\n venues = Venue.query.all()\n\n venues.sort(key=lambda venue: (float(venue.location['latitude']) - lat) ** 2\n + (float(venue.location['longitude']) - lng) ** 2)\n\n return jsonify({\n 'venues': [{\n 'id': venue.id,\n 'name': venue.name,\n 'latitude': venue.location['latitude'],\n 'longitude': venue.location['longitude'],\n 'geocode': geo_name(venue.location),\n } for venue in venues[:10]]\n })", "metadata": "root.nearby_venues", "header": "['module', '___EOS___']", "index": 72 }, { "content": "@services.route('/services/fetch_context')\ndef fetch_context_service():\n results = []\n for url in request.args.getlist('url[]'):\n ctx = contexts.create_context(url)\n results.append({\n 'title': ctx.title,\n 'permalink': ctx.permalink,\n 'html': render_template(\n 'admin/_context.jinja2', type=request.args.get('type'),\n context=ctx),\n })\n\n return jsonify({'contexts': results})", "metadata": "root.fetch_context_service", "header": "['module', '___EOS___']", "index": 92 }, { "content": "@services.route('/yt/<video>/<slug>/')\ndef youtube_shortener(video, slug):\n return redirect('https://youtube.com/watch?v={}'.format(video))", "metadata": "root.youtube_shortener", "header": "['module', '___EOS___']", "index": 108 }, { "content": "@services.route('/services/youtube/')\ndef create_youtube_link():\n url = request.args.get('url')\n if url:\n m = util.YOUTUBE_RE.match(url)\n if m:\n video_id = m.group(1)\n resp = requests.get(url)\n soup = BeautifulSoup(resp.text)\n title = soup.find('meta', {'property':'og:title'}).get('content')\n if title:\n url = url_for('.youtube_shortener', video=video_id, slug=util.slugify(title), _external=True)\n return \"\"\"<a href=\"{}\">{}</a>\"\"\".format(url, url)\n\n return \"\"\"<form><input name=\"url\"/><input type=\"submit\"/></form>\"\"\"", "metadata": "root.create_youtube_link", "header": "['module', '___EOS___']", "index": 113 } ]
[ { "span": "from flask import request, jsonify, redirect, url_for, Blueprint, current_app, render_template", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 94 }, { "span": "import datetime", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 15 }, { "span": "import mf2util", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 14 }, { "span": "import sys", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 10 }, { "span": "import urllib", "start_line": 12, "start_column": 0, "end_line": 12, "end_column": 13 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "._", "import_", "contexts_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "._", "import_", "util_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "._", "models_", "import_", "Ven", "ue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "._", "views_", "import_", "geo", "\\u", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "bs4_", "import_", "Bea", "uti", "ful", "Soup_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "flask_", "import_", "request_", ",_", "jsonify_", ",_", "redirect_", ",_", "url", "\\u", "for_", ",_", "Blueprint_", ",_", "current", "\\u", "app_", ",_", "render", "\\u", "template_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "mf", "2py", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "mf", "2u", "til_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "requests_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "urllib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "services_", "=_", "Blueprint_", "(_", "'", "service", "s", "'_", ",_", "\\u\\u", "name\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "USER", "\\u", "AGENT_", "=_", "'", "Red", " ", "Wind", " ", "(", "https", "://", "git", "hub", ".", "com", "/", "ky", "le", "wm", "/", "red", "wind", ")'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "services_", "._", "route_", "(_", "'/", "service", "s", "/", "fetch", "\\u", "profile", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "fetch", "\\u", "profile_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "request_", "._", "args_", "._", "get_", "(_", "'", "url", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "url_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\"\"\"", "\\", "10", ";<", "html", "><", "body", ">", "\\", "10", ";<", "h1", ">", "Fe", "tch", " ", "Profil", "e", "</", "h1", ">", "\\", "10", ";<", "form", "><", "label", ">", "URL", " ", "to", " ", "fetch", ":", " ", "<", "input", " ", "name", "=\"", "url", "\">", "</", "label", ">", "\\", "10", ";<", "input", " ", "type", "=\"", "Submit", "\">", "\\", "10", ";<", "/", "form", "><", "/", "body", "><", "/", "html", ">\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "name_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "image_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "d_", "=_", "mf", "2py", "_", "._", "Parser_", "(_", "url_", "=_", "url_", ")_", "._", "to", "\\u", "dict_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "rel", "mes_", "=_", "d_", "[_", "'", "rel", "s", "'_", "]_", "._", "get_", "(_", "'", "me", "'_", ",_", "[_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "check", " ", "for", " ", "h", "-", "feed_", "\\u\\u\\uNL\\u\\u\\u_", "hf", "eed_", "=_", "next_", "(_", "(_", "item_", "for_", "item_", "in_", "d_", "[_", "'", "items", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "'", "h", "-", "feed", "'_", "in_", "item_", "[_", "'", "type", "'_", "]_", ")_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "hf", "eed_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "authors_", "=_", "hf", "eed_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "author", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "images_", "=_", "hf", "eed_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "photo", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "authors_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "authors_", "[_", "0_", "]_", ",_", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "name_", "=_", "authors_", "[_", "0_", "]_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "image_", "=_", "authors_", "[_", "0_", "]_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "photo", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "name_", "=_", "authors_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "images_", "and_", "not_", "image_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "image_", "=_", "images_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "check", " ", "for", " ", "top", "-", "level", " ", "h", "-", "card_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "item_", "in_", "d_", "[_", "'", "items", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "'", "h", "-", "card", "'_", "in_", "item_", "._", "get_", "(_", "'", "type", "'_", ",_", "[_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "name_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "name_", "=_", "item_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "image_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "image_", "=_", "item_", "._", "get_", "(_", "'", "proper", "ties", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "photo", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "jsonify_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "image", "'_", ":_", "image_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "social", "'_", ":_", "rel", "mes_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Base", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "resp_", "=_", "jsonify_", "(_", "{_", "'", "error", "'_", ":_", "str_", "(_", "e_", ")_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "resp_", "._", "status", "\\u", "code_", "=_", "400_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "resp_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "services_", "._", "route_", "(_", "'/", "service", "s", "/", "nearby", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "nearby", "\\u", "venue", "s_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lat_", "=_", "float_", "(_", "request_", "._", "args_", "._", "get_", "(_", "'", "latitude", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "lng_", "=_", "float_", "(_", "request_", "._", "args_", "._", "get_", "(_", "'", "longitude", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "venue", "s_", "=_", "Ven", "ue_", "._", "query_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "venue", "s_", "._", "sort_", "(_", "key_", "=_", "lambda_", "venue", "_", ":_", "(_", "float_", "(_", "venue", "_", "._", "location_", "[_", "'", "latitude", "'_", "]_", ")_", "-_", "lat_", ")_", "**_", "2_", "\\u\\u\\uNL\\u\\u\\u_", "+_", "(_", "float_", "(_", "venue", "_", "._", "location_", "[_", "'", "longitude", "'_", "]_", ")_", "-_", "lng_", ")_", "**_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "jsonify_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "venue", "s", "'_", ":_", "[_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "venue", "_", "._", "id_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "venue", "_", "._", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "latitude", "'_", ":_", "venue", "_", "._", "location_", "[_", "'", "latitude", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "longitude", "'_", ":_", "venue", "_", "._", "location_", "[_", "'", "longitude", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "geocode", "'_", ":_", "geo", "\\u", "name_", "(_", "venue", "_", "._", "location_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "for_", "venue", "_", "in_", "venue", "s_", "[_", ":_", "10_", "]_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "services_", "._", "route_", "(_", "'/", "service", "s", "/", "fetch", "\\u", "context", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "fetch", "\\u", "context", "\\u", "service_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "results_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "url_", "in_", "request_", "._", "args_", "._", "getlist_", "(_", "'", "url", "[]'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ctx_", "=_", "contexts_", "._", "create", "\\u", "context_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "results_", "._", "append_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "ctx_", "._", "title_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "permalink", "'_", ":_", "ctx_", "._", "permalink", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "html", "'_", ":_", "render", "\\u", "template_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "admin", "/\\u", "context", ".", "jin", "ja", "2", "'_", ",_", "type_", "=_", "request_", "._", "args_", "._", "get_", "(_", "'", "type", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "context_", "=_", "ctx_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "jsonify_", "(_", "{_", "'", "context", "s", "'_", ":_", "results_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "services_", "._", "route_", "(_", "'/", "yt", "/", "<", "video", ">/", "<", "slug", ">/", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "youtu", "be", "\\u", "shorten", "er_", "(_", "video_", ",_", "slug_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "redirect_", "(_", "'", "https", "://", "youtu", "be", ".", "com", "/", "watch", "?", "v", "={}'_", "._", "format_", "(_", "video_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "services_", "._", "route_", "(_", "'/", "service", "s", "/", "youtu", "be", "/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "create", "\\u", "youtu", "be", "\\u", "link_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "request_", "._", "args_", "._", "get_", "(_", "'", "url", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "url_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "util_", "._", "YOU", "TUBE", "\\u", "RE_", "._", "match_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "m_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "video", "\\u", "id_", "=_", "m_", "._", "group_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "resp_", "=_", "requests_", "._", "get_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "soup_", "=_", "Bea", "uti", "ful", "Soup_", "(_", "resp_", "._", "text_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "title_", "=_", "soup_", "._", "find_", "(_", "'", "meta", "'_", ",_", "{_", "'", "property", "'_", ":_", "'", "og", ":", "title", "'_", "}_", ")_", "._", "get_", "(_", "'", "content", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "title_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "url", "\\u", "for_", "(_", "'.", "youtu", "be", "\\u", "shorten", "er", "'_", ",_", "video_", "=_", "video", "\\u", "id_", ",_", "slug_", "=_", "util_", "._", "slugify_", "(_", "title_", ")_", ",_", "\\u", "external_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\"\"\"", "<", "a", " ", "href", "=\"{}\"", ">{}</", "a", ">\"\"\"_", "._", "format_", "(_", "url_", ",_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\"\"\"", "<", "form", "><", "input", " ", "name", "=\"", "url", "\"/><", "input", " ", "type", "=\"", "submit", "\"/><", "/", "form", ">\"\"\"_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 0, 1, 2, 0, 1, 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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
globocom/tapioca/tapioca/__init__.py
[ { "content": "from tapioca.rest_api import TornadoRESTful, ResourceHandler, \\\n ResourceDoesNotExist\nfrom tapioca.serializers import Encoder, JsonEncoder, JsonpEncoder, HtmlEncoder\nfrom tapioca.request import RequestSchema, validate, optional, ParamError, \\\n ParamRequiredError, InvalidParamError\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from tapioca.rest_api import TornadoRESTful, ResourceHandler, \\\n ResourceDoesNotExist", "start_line": 0, "start_column": 0, "end_line": 1, "end_column": 28 }, { "span": "from tapioca.serializers import Encoder, JsonEncoder, JsonpEncoder, HtmlEncoder", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 79 }, { "span": "from tapioca.request import RequestSchema, validate, optional, ParamError, \\\n ParamRequiredError, InvalidParamError", "start_line": 3, "start_column": 0, "end_line": 4, "end_column": 45 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "tap", "ioc", "a_", "._", "rest", "\\u", "api_", "import_", "Tor", "nad", "o", "REST", "ful_", ",_", "Reso", "urc", "e", "Handler_", ",_", "Reso", "urc", "e", "Do", "es", "Not", "Exist_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "tap", "ioc", "a_", "._", "serializers_", "import_", "Encoder_", ",_", "Js", "on", "Encoder_", ",_", "Js", "onp", "Encoder_", ",_", "Ht", "ml", "Encoder_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "tap", "ioc", "a_", "._", "request_", "import_", "Request", "Schema_", ",_", "validate_", ",_", "optional_", ",_", "Param", "Error_", ",_", "Param", "Requ", "ired", "Error_", ",_", "Inva", "lid", "Param", "Error_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
Testing equality to None
mrknow/filmkodi/plugin.video.specto/resources/lib/libraries/trailer.py
[ { "content": " def play(self, name, url=None):\n try:\n url = self.worker(name, url)\n if url == None: return\n\n item = control.item(path=url)\n item.setProperty('IsPlayable', 'true')\n control.player.play(url, item)\n except:\n pass", "metadata": "root.trailer.play", "header": "['class', 'trailer', ':', '___EOS___']", "index": 37 }, { "content": " def worker(self, name, url):\n try:\n if url.startswith(self.base_link):\n url = self.resolve(url)\n if url == None: raise Exception()\n return url\n elif not url.startswith('http://'):\n url = self.youtube_watch % url\n url = self.resolve(url)\n if url == None: raise Exception()\n return url\n else:\n raise Exception()\n except:\n query = name + ' trailer'\n query = self.youtube_search + query\n url = self.search(query)\n if url == None: return\n return url", "metadata": "root.trailer.worker", "header": "['class', 'trailer', ':', '___EOS___']", "index": 48 } ]
[ { "span": "url == None:", "start_line": 40, "start_column": 15, "end_line": 40, "end_column": 26 }, { "span": "url == None:", "start_line": 52, "start_column": 19, "end_line": 52, "end_column": 30 }, { "span": "url == None:", "start_line": 57, "start_column": 19, "end_line": 57, "end_column": 30 }, { "span": "url == None:", "start_line": 65, "start_column": 15, "end_line": 65, "end_column": 26 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "trailer", "_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "play_", "(_", "self_", ",_", "name_", ",_", "url_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "self_", "._", "worker_", "(_", "name_", ",_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "url_", "==_", "None_", ":_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "item_", "=_", "control_", "._", "item_", "(_", "path_", "=_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "item_", "._", "set", "Property_", "(_", "'", "Is", "Playable", "'_", ",_", "'", "true", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "control_", "._", "player_", "._", "play_", "(_", "url_", ",_", "item_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "trailer", "_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "worker_", "(_", "self_", ",_", "name_", ",_", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "url_", "._", "startswith_", "(_", "self_", "._", "base", "\\u", "link_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "self_", "._", "resolve_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "url_", "==_", "None_", ":_", "raise_", "Exception_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "not_", "url_", "._", "startswith_", "(_", "'", "http", "://'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "url_", "=_", "self_", "._", "youtu", "be", "\\u", "watch_", "%_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "self_", "._", "resolve_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "url_", "==_", "None_", ":_", "raise_", "Exception_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Exception_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "query_", "=_", "name_", "+_", "'", " ", "trailer", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "self_", "._", "youtu", "be", "\\u", "search_", "+_", "query_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "self_", "._", "search_", "(_", "query_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "url_", "==_", "None_", ":_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2 ]
Unused local variable
bitxbay/BitXBay/BitXBay.py
[ { "content": " def start(self, daemon=False):\n from PyQt4 import QtGui, QtCore\n app = QtGui.QApplication(sys.argv)\n import bitmessage_icons_rc\n splash_pix = QtGui.QPixmap(':/newPrefix/images/loading.jpg')\n splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)\n\n splash.setMask(splash_pix.mask())\n splash.show()\n shared.daemon = daemon\n\n #electrum version\n electrumon = True\n settings = shelve.open(\"settings.slv\")\n if \"electrumon\" in settings.keys():\n if settings[\"electrumon\"] == True:\n electrumon = True\n settings.close()\n else:\n settings.close()\n electrumon = False\n else:\n #settings[\"electrumon\"] = True\n settings.close()\n splash.hide()\n import electrumfirst\n electrumfirst.run()\n\n if electrumon == False:\n try:\n datadir = os.getcwd()+\"/btc\"\n print datadir\n db_env = DBEnv(0)\n r = db_env.open(datadir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))\n walletname = \"wallet.dat\"\n fordel = shelve.open(\"fordel.slv\")\n try:\n for i in fordel:\n keydel = i\n deleted_items = delete_from_wallet(db_env, walletname, \"key\", keydel)\n print \"address:%s has been successfully deleted from %s/%s, resulting in %d deleted item\"%(keydel, datadir, walletname, deleted_items)\n priv = \"\"\n del fordel[i]\n fordel.sync()\n except:\n print \"can't delete addresses\"\n fordel.close()\n #changes start\n process = subprocess.Popen([os.getcwd()+'/btc/bitcoin-qt.exe', \"-datadir=\"+datadir], shell=True, creationflags=subprocess.SW_HIDE)\n print \"Wait bitcoin-qt\"\n time.sleep(5)\n except:\n error=\"\"\n\n\n\n #changes end here\n #\n # is the application already running? If yes then exit.\n thisapp = singleton.singleinstance()\n\n signal.signal(signal.SIGINT, helper_generic.signal_handler)\n # signal.signal(signal.SIGINT, signal.SIG_DFL)\n\n helper_bootstrap.knownNodes()\n # Start the address generation thread\n addressGeneratorThread = addressGenerator()\n addressGeneratorThread.daemon = True # close the main program even if there are threads left\n addressGeneratorThread.start()\n\n # Start the thread that calculates POWs\n singleWorkerThread = singleWorker()\n singleWorkerThread.daemon = True # close the main program even if there are threads left\n singleWorkerThread.start()\n\n #data_dir = os.getcwd()+\"/btc/testnet3/blocks\"\n #singleWorkerThread2 = worker(data_dir, config.addresses, config.days)\n #singleWorkerThread2.daemon = False\n #singleWorkerThread2.starttimer()\n\n\n\n # Start the SQL thread\n sqlLookup = sqlThread()\n sqlLookup.daemon = False # DON'T close the main program even if there are threads left. The closeEvent should command this thread to exit gracefully.\n sqlLookup.start()\n\n # Start the thread that calculates POWs\n objectProcessorThread = objectProcessor()\n objectProcessorThread.daemon = False # DON'T close the main program even the thread remains. This thread checks the shutdown variable after processing each object.\n objectProcessorThread.start()\n\n objectProcessorThread2 = objectProcessor2()\n objectProcessorThread2.daemon = False # DON'T close the main program even the thread remains. This thread checks the shutdown variable after processing each object.\n objectProcessorThread2.start()\n\n # Start the cleanerThread\n singleCleanerThread = singleCleaner()\n singleCleanerThread.daemon = True # close the main program even if there are threads left\n singleCleanerThread.start()\n shared.reloadMyAddressHashes()\n shared.reloadBroadcastSendersForWhichImWatching()\n\n\n if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):\n try:\n apiNotifyPath = shared.config.get(\n 'bitmessagesettings', 'apinotifypath')\n except:\n apiNotifyPath = ''\n if apiNotifyPath != '':\n with shared.printLock:\n print 'Trying to call', apiNotifyPath\n\n call([apiNotifyPath, \"startingUp\"])\n singleAPIThread = singleAPI()\n singleAPIThread.daemon = True # close the main program even if there are threads left\n singleAPIThread.start()\n\n connectToStream(1)\n\n singleListenerThread = singleListener()\n singleListenerThread.setup(selfInitiatedConnections)\n singleListenerThread.daemon = True # close the main program even if there are threads left\n singleListenerThread.start()\n\n if daemon == False and shared.safeConfigGetBoolean('bitmessagesettings', 'daemon') == False:\n try:\n from PyQt4 import QtCore, QtGui\n except Exception as err:\n print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \\'PyQt Download\\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'\n print 'Error message:', err\n try:\n process.kill()\n except:\n pass\n os._exit(0)\n\n import bitmessageqt\n splash.close()\n bitmessageqt.run()\n\n\n\n\n else:\n shared.config.remove_option('bitmessagesettings', 'dontconnect')\n\n if daemon:\n with shared.printLock:\n print 'Running as a daemon. The main program should exit this thread.'\n else:\n with shared.printLock:\n print 'Running as a daemon. You can use Ctrl+C to exit.'\n while True:\n time.sleep(20)", "metadata": "root.Main.start", "header": "['class', 'Main', ':', '___EOS___']", "index": 109 } ]
[ { "span": "app ", "start_line": 111, "start_column": 8, "end_line": 111, "end_column": 11 }, { "span": "r ", "start_line": 142, "start_column": 16, "end_line": 142, "end_column": 17 }, { "span": "priv ", "start_line": 150, "start_column": 24, "end_line": 150, "end_column": 28 }, { "span": "error=", "start_line": 161, "start_column": 16, "end_line": 161, "end_column": 21 }, { "span": "thisapp ", "start_line": 168, "start_column": 8, "end_line": 168, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "start_", "(_", "self_", ",_", "daemon_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "Py", "Qt4_", "import_", "Qt", "Gui_", ",_", "Qt", "Core_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "app_", "=_", "Qt", "Gui_", "._", "QA", "ppl", "ication", "_", "(_", "sys_", "._", "argv_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "bitm", "essage", "\\u", "icons", "\\u", "rc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "\\u", "pix_", "=_", "Qt", "Gui_", "._", "QP", "ix", "map_", "(_", "':/", "new", "Pref", "ix", "/", "images", "/", "load", "ing", ".", "jp", "g", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "=_", "Qt", "Gui_", "._", "QS", "plas", "h", "Screen_", "(_", "splash", "\\u", "pix_", ",_", "Qt", "Core_", "._", "Qt_", "._", "Window", "Sta", "ys", "On", "Top", "Hint_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "splash", "_", "._", "set", "Mask_", "(_", "splash", "\\u", "pix_", "._", "mask_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "show_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "daemon_", "=_", "daemon_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "electr", "um", " ", "version_", "\\u\\u\\uNL\\u\\u\\u_", "electr", "um", "on_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "=_", "shelve", "_", "._", "open_", "(_", "\"", "settings", ".", "sl", "v", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "\"", "electr", "um", "on", "\"_", "in_", "settings_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "settings_", "[_", "\"", "electr", "um", "on", "\"_", "]_", "==_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "electr", "um", "on_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "electr", "um", "on_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "settings", "[\"", "electr", "um", "on", "\"]", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "hide_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "electr", "um", "first_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "electr", "um", "first_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "electr", "um", "on_", "==_", "False_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "datadir_", "=_", "os_", "._", "getcwd_", "(_", ")_", "+_", "\"/", "btc", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "datadir_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "db", "\\u", "env_", "=_", "DB", "Env_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "r_", "=_", "db", "\\u", "env_", "._", "open_", "(_", "datadir_", ",_", "(_", "DB", "\\u", "CREATE_", "|_", "DB", "\\u", "INIT", "\\u", "LOCK_", "|_", "DB", "\\u", "INIT", "\\u", "LOG_", "|_", "DB", "\\u", "INIT", "\\u", "MP", "OO", "L_", "|_", "DB", "\\u", "INIT", "\\u", "TX", "N_", "|_", "DB", "\\u", "THREAD", "_", "|_", "DB", "\\u", "RECO", "VER_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "walle", "tname_", "=_", "\"", "walle", "t", ".", "dat", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for", "del_", "=_", "shelve", "_", "._", "open_", "(_", "\"", "for", "del", ".", "sl", "v", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "for_", "i_", "in_", "for", "del_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "keyd", "el_", "=_", "i_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "delete", "d\\u", "items_", "=_", "delete", "\\u", "from", "\\u", "wallet_", "(_", "db", "\\u", "env_", ",_", "walle", "tname_", ",_", "\"", "key", "\"_", ",_", "keyd", "el_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"", "address", ":", "%", "s", " ", "has", " ", "bee", "n", " ", "success", "full", "y", " ", "delete", "d", " ", "from", " ", "%", "s", "/", "%", "s", ",", " ", "result", "ing", " ", "in", " ", "%", "d", " ", "delete", "d", " ", "item", "\"_", "%_", "(_", "keyd", "el_", ",_", "datadir_", ",_", "walle", "tname_", ",_", "delete", "d\\u", "items_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "priv_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "del_", "for", "del_", "[_", "i_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for", "del_", "._", "sync_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "\"", "can", "'", "t", " ", "delete", " ", "addresse", "s", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for", "del_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "change", "s", " ", "start_", "\\u\\u\\uNL\\u\\u\\u_", "process_", "=_", "subprocess_", "._", "Popen_", "(_", "[_", "os_", "._", "getcwd_", "(_", ")_", "+_", "'/", "btc", "/", "bitcoin", "-", "qt", ".", "exe", "'_", ",_", "\"-", "datadir", "=\"_", "+_", "datadir_", "]_", ",_", "shell_", "=_", "True_", ",_", "creati", "onf", "lags_", "=_", "subprocess_", "._", "SW", "\\u", "HID", "E_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"", "Wait", " ", "bitcoin", "-", "qt", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "time_", "._", "sleep_", "(_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "error_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "change", "s", " ", "end", " ", "here_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "is", " ", "the", " ", "applica", "tion", " ", "alr", "ead", "y", " ", "runn", "ing", "?", " ", " ", "If", " ", "ye", "s", " ", "then", " ", "exit", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "this", "app_", "=_", "singleton_", "._", "single", "instance_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "signal_", "._", "signal_", "(_", "signal_", "._", "SIGINT_", ",_", "help", "er", "\\u", "generic_", "._", "signal", "\\u", "handler_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "signal", ".", "signal", "(", "signal", ".", "SIG", "INT", ",", " ", "signal", ".", "SIG", "\\u", "DF", "L", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "help", "er", "\\u", "bootstrap_", "._", "know", "n", "Nodes_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "address", " ", "generat", "ion", " ", "thread_", "\\u\\u\\uNL\\u\\u\\u_", "address", "Generat", "or", "Thread_", "=_", "address", "Generator_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address", "Generat", "or", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address", "Generat", "or", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "thread", " ", "tha", "t", " ", "calcul", "ates", " ", "PO", "Ws", "_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Worke", "r", "Thread_", "=_", "single", "Worker_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Worke", "r", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Worke", "r", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "data\\u", "dir", " ", "=", " ", "os", ".", "getc", "wd", "()", "+\"", "/", "btc", "/", "testn", "et", "3", "/", "blocks", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", " ", "=", " ", "worker", "(", "data\\u", "dir", ",", " ", "config", ".", "addresse", "s", ",", " ", "config", ".", "day", "s", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", ".", "daemon", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", ".", "startt", "ime", "r", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "SQL", " ", "thread_", "\\u\\u\\uNL\\u\\u\\u_", "sql", "Lookup_", "=_", "sql", "Thread_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sql", "Lookup_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left", ".", " ", "The", " ", "close", "Event", " ", "shou", "ld", " ", "command", " ", "this", " ", "thread", " ", "to", " ", "exit", " ", "graceful", "ly", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sql", "Lookup_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "thread", " ", "tha", "t", " ", "calcul", "ates", " ", "PO", "Ws", "_", "\\u\\u\\uNL\\u\\u\\u_", "object", "Process", "or", "Thread_", "=_", "object", "Processor_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "the", " ", "thread", " ", "remains", ".", " ", "Thi", "s", " ", "thread", " ", "checks", " ", "the", " ", "shut", "down", " ", "variab", "le", " ", "after", " ", "process", "ing", " ", "each", " ", "object", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "=_", "object", "Process", "or", "2_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "the", " ", "thread", " ", "remains", ".", " ", "Thi", "s", " ", "thread", " ", "checks", " ", "the", " ", "shut", "down", " ", "variab", "le", " ", "after", " ", "process", "ing", " ", "each", " ", "object", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "cleaner", "Thread_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "=_", "single", "Cleane", "r_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "relo", "ad", "My", "Address", "Hashe", "s_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "relo", "ad", "Broad", "cast", "Sen", "ders", "For", "Whi", "ch", "Im", "Watch", "ing_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "shared_", "._", "safe", "Config", "Get", "Boolean_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "enable", "d", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "Noti", "fy", "Path_", "=_", "shared_", "._", "config_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "notif", "ypa", "th", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "Noti", "fy", "Path_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "api", "Noti", "fy", "Path_", "!=_", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Tr", "ying", " ", "to", " ", "call", "'_", ",_", "api", "Noti", "fy", "Path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "call_", "(_", "[_", "api", "Noti", "fy", "Path_", ",_", "\"", "startin", "g", "Up", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "single", "API", "Thread_", "=_", "single", "API_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "API", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "API", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "connect", "To", "Stream_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Listen", "er", "Thread_", "=_", "single", "Listener_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "setup_", "(_", "self", "Initiat", "ed", "Connections_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "daemon_", "==_", "False_", "and_", "shared_", "._", "safe", "Config", "Get", "Boolean_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "daemon", "'_", ")_", "==_", "False_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "Py", "Qt4_", "import_", "Qt", "Core_", ",_", "Qt", "Gui_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "err_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "'", "Py", "Bit", "message", " ", "require", "s", " ", "Py", "Qt", " ", "unl", "ess", " ", "you", " ", "want", " ", "to", " ", "run", " ", "it", " ", "as", " ", "a", " ", "daemon", " ", "and", " ", "interact", " ", "with", " ", "it", " ", "usi", "ng", " ", "the", " ", "API", ".", " ", "You", " ", "can", " ", "download", " ", "Py", "Qt", " ", "from", " ", "http", "://", "www", ".", "river", "bank", "compu", "ting", ".", "com", "/", "software", "/", "pyqt", "/", "download", " ", " ", " ", "or", " ", "by", " ", "search", "ing", " ", "Goo", "gle", " ", "for", " ", "\\\\'", "Py", "Qt", " ", "Down", "load", "\\\\'", ".", " ", "If", " ", "you", " ", "want", " ", "to", " ", "run", " ", "in", " ", "daemon", " ", "mode", ",", " ", "see", " ", "https", "://", "bitm", "essage", ".", "org", "/", "wiki", "/", "Da", "emo", "n", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "'", "Error", " ", "message", ":'_", ",_", "err_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "process_", "._", "kill_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "os_", "._", "\\u", "exit_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "bitm", "essage", "qt_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "bitm", "essage", "qt_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shared_", "._", "config_", "._", "remove", "\\u", "option_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "don", "tcon", "nect", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "daemon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Run", "ning", " ", "as", " ", "a", " ", "daemon", ".", " ", "The", " ", "main", " ", "program", " ", "shou", "ld", " ", "exit", " ", "this", " ", "thread", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Run", "ning", " ", "as", " ", "a", " ", "daemon", ".", " ", "You", " ", "can", " ", "use", " ", "Ctrl", "+", "C", " ", "to", " ", "exit", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "while_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "time_", "._", "sleep_", "(_", "20_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
genzj/pybingwallpaper/src/setter.py
[ { "content": "def load_ext_setters(path):\n logger = log.getChild('load_ext_setters')\n for i in glob.iglob(os.path.join(path, '*setter.py')):\n if os.path.basename(i) == 'setter.py': continue\n logger.debug('\"%s\" seems like a setter', i)\n name, ext = os.path.splitext(os.path.basename(i))\n try:\n logger.debug('loading %s', name)\n import_module(name)\n except:\n logger.warning('cannot loading setter %s', name, exc_info=1)", "metadata": "root.load_ext_setters", "header": "['module', '___EOS___']", "index": 74 } ]
[ { "span": "except:", "start_line": 83, "start_column": 8, "end_line": 83, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "load", "\\u", "ext", "\\u", "sette", "rs_", "(_", "path_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "=_", "log_", "._", "get", "Child_", "(_", "'", "load", "\\u", "ext", "\\u", "sette", "rs", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "glob_", "._", "ig", "lob", "_", "(_", "os_", "._", "path_", "._", "join_", "(_", "path_", ",_", "'*", "sette", "r", ".", "py", "'_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "os_", "._", "path_", "._", "basename_", "(_", "i_", ")_", "==_", "'", "sette", "r", ".", "py", "'_", ":_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "'\"", "%", "s", "\"", " ", "see", "ms", " ", "like", " ", "a", " ", "sette", "r", "'_", ",_", "i_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", ",_", "ext_", "=_", "os_", "._", "path_", "._", "splitext_", "(_", "os_", "._", "path_", "._", "basename_", "(_", "i_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "debug_", "(_", "'", "load", "ing", " ", "%", "s", "'_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import", "\\u", "module_", "(_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "warning_", "(_", "'", "cann", "ot", " ", "load", "ing", " ", "sette", "r", " ", "%", "s", "'_", ",_", "name_", ",_", "exc", "\\u", "info_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
maraoz/proofofexistence/pycoin/tx/script/vm.py
[ { "content": "def check_signature(script, signature_hash, public_key_blob, sig_blob, hash_type):\n \"\"\"Ensure the given transaction has the correct signature. Invoked by the VM.\n Adapted from official Bitcoin-QT client.\n\n script: the script that is claimed to unlock the coins used in this transaction\n signature_hash: the signature hash of the transaction being verified\n public_key_blob: the blob representing the SEC-encoded public pair\n sig_blob: the blob representing the DER-encoded signature\n hash_type: expected signature_type (or 0 for wild card)\n \"\"\"\n signature_type = ord(sig_blob[-1:])\n if signature_type != 1:\n raise ScriptError(\"unknown signature type %d\" % signature_type)\n sig_pair = der.sigdecode_der(sig_blob[:-1])\n if hash_type == 0:\n hash_type = signature_type\n elif hash_type != signature_type:\n raise ScriptError(\"wrong hash type\")\n public_pair = sec_to_public_pair(public_key_blob)\n v = ecdsa.verify(ecdsa.generator_secp256k1, public_pair, signature_hash, sig_pair)\n return make_bool(v)", "metadata": "root.check_signature", "header": "['module', '___EOS___']", "index": 44 }, { "content": "def eval_script(script, signature_hash, hash_type, stack=[]):\n altstack = []\n if len(script) > 10000:\n return False\n\n pc = 0\n begin_code_hash = pc\n if_condition = None # or True or False\n\n try:\n while pc < len(script):\n opcode, data, pc = get_opcode(script, pc)\n if len(data) > 0:\n stack.append(data)\n continue\n\n # deal with if_condition first\n\n if if_condition is not None:\n # TODO: fix IF (which doesn't properly nest)\n if opcode == opcodes.OP_ELSE:\n if_condition = not if_condition\n continue\n if opcode == opcodes.OP_ENDIF:\n if_condition = None\n continue\n if not if_condition:\n continue\n if opcode in (opcodes.OP_IF, opcodes.OP_NOTIF):\n if_condition = (stack.pop() == VCH_TRUE)\n continue\n\n if opcode == opcodes.OP_CODESEPARATOR:\n begin_code_hash = pc - 1\n continue\n\n if opcode in INVALID_OPCODE_VALUES:\n raise ScriptError(\"invalid opcode %s at %d\" % (opcodes.INT_TO_OPCODE[opcode], pc-1))\n\n if opcode in MICROCODE_LOOKUP:\n MICROCODE_LOOKUP[opcode](stack)\n if opcode in VERIFY_OPS:\n v = stack.pop()\n if v != VCH_TRUE:\n raise ScriptError(\"VERIFY failed at %d\" % (pc-1))\n continue\n\n if opcode == opcodes.OP_TOALTSTACK:\n altstack.append(stack.pop())\n continue\n\n if opcode == opcodes.OP_FROMALTSTACK:\n stack.append(altstack.pop())\n continue\n\n if opcode >= opcodes.OP_1NEGATE and opcode <= opcodes.OP_16:\n stack.append(opcode + 1 - opcodes.OP_1)\n continue\n\n if opcode in (opcodes.OP_ELSE, opcodes.OP_ENDIF):\n raise ScriptError(\"%s without OP_IF\" % opcodes.INT_TO_OPCODE[opcode])\n\n if opcode in (opcodes.OP_CHECKSIG, opcodes.OP_CHECKSIGVERIFY):\n public_key_blob = stack.pop()\n sig_blob = stack.pop()\n v = check_signature(script, signature_hash, public_key_blob, sig_blob, hash_type)\n stack.append(v)\n if opcode == opcodes.OP_CHECKSIGVERIFY:\n if stack.pop() != VCH_TRUE:\n raise ScriptError(\"VERIFY failed at %d\" % pc-1)\n continue\n\n # BRAIN DAMAGE -- does it always get down here for each verify op? I think not\n if opcode in VERIFY_OPS:\n v = stack.pop()\n if v != VCH_TRUE:\n raise ScriptError(\"VERIFY failed at %d\" % pc-1)\n\n logging.error(\"can't execute opcode %s\", opcode)\n\n except Exception:\n logging.exception(\"script failed\")\n\n return len(stack) != 0", "metadata": "root.eval_script", "header": "['module', '___EOS___']", "index": 66 } ]
[ { "span": "hash_type ", "start_line": 59, "start_column": 8, "end_line": 59, "end_column": 17 }, { "span": "begin_code_hash ", "start_line": 99, "start_column": 16, "end_line": 99, "end_column": 31 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "check", "\\u", "signature_", "(_", "script_", ",_", "signa", "ture", "\\u", "hash_", ",_", "public", "\\u", "key", "\\u", "blob_", ",_", "sig", "\\u", "blob_", ",_", "hash", "\\u", "type_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Ensur", "e", " ", "the", " ", "give", "n", " ", "transaction", " ", "has", " ", "the", " ", "correct", " ", "signa", "ture", ".", " ", "Invok", "ed", " ", "by", " ", "the", " ", "VM", ".", "\\", "10", ";", " ", " ", " ", " ", "Adapt", "ed", " ", "from", " ", "official", " ", "Bit", "coin", "-", "QT", " ", "client", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "script", ":", " ", "the", " ", "script", " ", "tha", "t", " ", "is", " ", "claimed", " ", "to", " ", "unlock", " ", "the", " ", "coins", " ", "used", " ", "in", " ", "this", " ", "transaction", "\\", "10", ";", " ", " ", " ", " ", "signa", "ture", "\\u", "hash", ":", " ", "the", " ", "signa", "ture", " ", "hash", " ", "of", " ", "the", " ", "transaction", " ", "bei", "ng", " ", "verifie", "d", "\\", "10", ";", " ", " ", " ", " ", "public", "\\u", "key", "\\u", "blob", ":", " ", "the", " ", "blob", " ", "represent", "ing", " ", "the", " ", "SEC", "-", "encode", "d", " ", "public", " ", "pair", "\\", "10", ";", " ", " ", " ", " ", "sig", "\\u", "blob", ":", " ", "the", " ", "blob", " ", "represent", "ing", " ", "the", " ", "DER", "-", "encode", "d", " ", "signa", "ture", "\\", "10", ";", " ", " ", " ", " ", "hash", "\\u", "type", ":", " ", "expected", " ", "signa", "ture", "\\u", "type", " ", "(", "or", " ", "0", " ", "for", " ", "wild", " ", "card", ")", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "signa", "ture", "\\u", "type_", "=_", "ord_", "(_", "sig", "\\u", "blob_", "[_", "-_", "1_", ":_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "signa", "ture", "\\u", "type_", "!=_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Script", "Error_", "(_", "\"", "unknown", " ", "signa", "ture", " ", "type", " ", "%", "d", "\"_", "%_", "signa", "ture", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "sig", "\\u", "pair_", "=_", "der_", "._", "sig", "decode", "\\u", "der_", "(_", "sig", "\\u", "blob_", "[_", ":_", "-_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "hash", "\\u", "type_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "hash", "\\u", "type_", "=_", "signa", "ture", "\\u", "type_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "hash", "\\u", "type_", "!=_", "signa", "ture", "\\u", "type_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Script", "Error_", "(_", "\"", "wrong", " ", "hash", " ", "type", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "public", "\\u", "pair_", "=_", "sec", "\\u", "to", "\\u", "public", "\\u", "pair_", "(_", "public", "\\u", "key", "\\u", "blob_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "v_", "=_", "ecd", "sa_", "._", "verify_", "(_", "ecd", "sa_", "._", "generat", "or", "\\u", "sec", "p2", "56", "k1_", ",_", "public", "\\u", "pair_", ",_", "signa", "ture", "\\u", "hash_", ",_", "sig", "\\u", "pair_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "make", "\\u", "bool_", "(_", "v_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "eval", "\\u", "script_", "(_", "script_", ",_", "signa", "ture", "\\u", "hash_", ",_", "hash", "\\u", "type_", ",_", "stack_", "=_", "[_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "alts", "tack_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "script_", ")_", ">_", "10000_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "pc_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "begin", "\\u", "code", "\\u", "hash_", "=_", "pc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if", "\\u", "condition_", "=_", "None_", "#", " ", "or", " ", "Tru", "e", " ", "or", " ", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "while_", "pc_", "<_", "len_", "(_", "script_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "opcode_", ",_", "data_", ",_", "pc_", "=_", "get", "\\u", "opcode_", "(_", "script_", ",_", "pc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "data_", ")_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "stack_", "._", "append_", "(_", "data_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "deal", " ", "with", " ", "if", "\\u", "condition", " ", "first_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "if", "\\u", "condition_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "fix", " ", "IF", " ", "(", "whi", "ch", " ", "doe", "sn", "'", "t", " ", "proper", "ly", " ", "nest", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "ELS", "E_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "if", "\\u", "condition_", "=_", "not_", "if", "\\u", "condition_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "ENDI", "F_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "if", "\\u", "condition_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "if", "\\u", "condition_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "(_", "opcodes_", "._", "OP", "\\u", "IF_", ",_", "opcodes_", "._", "OP", "\\u", "NOTIF", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if", "\\u", "condition_", "=_", "(_", "stack_", "._", "pop_", "(_", ")_", "==_", "VC", "H", "\\u", "TRUE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "CODE", "SEPARATOR_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "begin", "\\u", "code", "\\u", "hash_", "=_", "pc_", "-_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "INVALID", "\\u", "OPCODE", "\\u", "VALUES_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Script", "Error_", "(_", "\"", "invalid", " ", "opcode", " ", "%", "s", " ", "at", " ", "%", "d", "\"_", "%_", "(_", "opcodes_", "._", "INT", "\\u", "TO", "\\u", "OPCODE", "_", "[_", "opcode_", "]_", ",_", "pc_", "-_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "MICRO", "CODE", "\\u", "LOOKUP", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "MICRO", "CODE", "\\u", "LOOKUP", "_", "[_", "opcode_", "]_", "(_", "stack_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "opcode_", "in_", "VERIFY", "\\u", "OPS", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "v_", "=_", "stack_", "._", "pop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "v_", "!=_", "VC", "H", "\\u", "TRUE_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "raise_", "Script", "Error_", "(_", "\"", "VERIFY", " ", "fail", "ed", " ", "at", " ", "%", "d", "\"_", "%_", "(_", "pc_", "-_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "TO", "ALT", "STACK", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "alts", "tack_", "._", "append_", "(_", "stack_", "._", "pop_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "FROM", "ALT", "STACK", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "stack_", "._", "append_", "(_", "alts", "tack_", "._", "pop_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", ">=_", "opcodes_", "._", "OP", "\\u", "1", "NEGAT", "E_", "and_", "opcode_", "<=_", "opcodes_", "._", "OP", "\\u", "16_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "stack_", "._", "append_", "(_", "opcode_", "+_", "1_", "-_", "opcodes_", "._", "OP", "\\u", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "(_", "opcodes_", "._", "OP", "\\u", "ELS", "E_", ",_", "opcodes_", "._", "OP", "\\u", "ENDI", "F_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Script", "Error_", "(_", "\"%", "s", " ", "with", "out", " ", "OP", "\\u", "IF", "\"_", "%_", "opcodes_", "._", "INT", "\\u", "TO", "\\u", "OPCODE", "_", "[_", "opcode_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "(_", "opcodes_", "._", "OP", "\\u", "CHECKS", "IG", "_", ",_", "opcodes_", "._", "OP", "\\u", "CHECKS", "IG", "VERIFY", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "public", "\\u", "key", "\\u", "blob_", "=_", "stack_", "._", "pop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sig", "\\u", "blob_", "=_", "stack_", "._", "pop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "v_", "=_", "check", "\\u", "signature_", "(_", "script_", ",_", "signa", "ture", "\\u", "hash_", ",_", "public", "\\u", "key", "\\u", "blob_", ",_", "sig", "\\u", "blob_", ",_", "hash", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "stack_", "._", "append_", "(_", "v_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "opcode_", "==_", "opcodes_", "._", "OP", "\\u", "CHECKS", "IG", "VERIFY", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "if_", "stack_", "._", "pop_", "(_", ")_", "!=_", "VC", "H", "\\u", "TRUE_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "raise_", "Script", "Error_", "(_", "\"", "VERIFY", " ", "fail", "ed", " ", "at", " ", "%", "d", "\"_", "%_", "pc_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "BRAI", "N", " ", "DA", "MAGE", " ", "--", " ", "doe", "s", " ", "it", " ", "alw", "ay", "s", " ", "get", " ", "down", " ", "here", " ", "for", " ", "each", " ", "verify", " ", "op", "?", " ", "I", " ", "think", " ", "not_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "opcode_", "in_", "VERIFY", "\\u", "OPS", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "v_", "=_", "stack_", "._", "pop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "v_", "!=_", "VC", "H", "\\u", "TRUE_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "raise_", "Script", "Error_", "(_", "\"", "VERIFY", " ", "fail", "ed", " ", "at", " ", "%", "d", "\"_", "%_", "pc_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "logging_", "._", "error_", "(_", "\"", "can", "'", "t", " ", "execute", " ", "opcode", " ", "%", "s", "\"_", ",_", "opcode_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "exception_", "(_", "\"", "script", " ", "fail", "ed", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "len_", "(_", "stack_", ")_", "!=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Module is imported with 'import' and 'import from'
AppScale/appscale/AppServer/lib/django-1.4/django/core/management/templates.py
[ { "content": "from __future__ import with_statement\nimport cgi\nimport errno\nimport mimetypes\nimport os\nimport posixpath\nimport re\nimport shutil\nimport stat\nimport sys\nimport tempfile\nimport urllib\n\nfrom optparse import make_option\nfrom os import path\n\nimport django\nfrom django.template import Template, Context\nfrom django.utils import archive\nfrom django.utils.encoding import smart_str\nfrom django.utils._os import rmtree_errorhandler\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core.management.commands.makemessages import handle_extensions\n\n\n_drive_re = re.compile('^([a-z]):', re.I)\n_url_drive_re = re.compile('^([a-z])[:|]', re.I)\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import os", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 9 } ]
[]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "with_", "'", "import", "'_", "and_", "'", "import", " ", "from", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "with", "\\u", "statement_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "cgi_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "errno_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "mimetypes_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "posixpath_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "shutil_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "stat_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "tempfile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "urllib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "optparse_", "import_", "make", "\\u", "option_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "os_", "import_", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "django_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "template_", "import_", "Template_", ",_", "Context_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "utils_", "import_", "archive_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "utils_", "._", "encoding_", "import_", "smart", "\\u", "str_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "utils_", "._", "\\u", "os_", "import_", "rm", "tree", "\\u", "errorhandler_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "core_", "._", "management_", "._", "base_", "import_", "Base", "Command_", ",_", "Command", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "core_", "._", "management_", "._", "commands_", "._", "make", "messages_", "import_", "handle", "\\u", "extensions_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "drive", "\\u", "re_", "=_", "re_", "._", "compile_", "(_", "'", "^", "([", "a", "-", "z", "])", ":'_", ",_", "re_", "._", "I_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "url", "\\u", "drive", "\\u", "re_", "=_", "re_", "._", "compile_", "(_", "'", "^", "([", "a", "-", "z", "])", "[:", "|", "]'_", ",_", "re_", "._", "I_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
nextml/NEXT/next/broker/broker.py
[ { "content": " def applySyncByNamespace(self, app_id, exp_uid, task_name, args, namespace=None, ignore_result=False,time_limit=0):\n \"\"\"\n Run a task (task_name) on a set of args with a given app_id, and exp_uid asynchronously. \n Waits for computation to finish and returns the answer unless ignore_result=True in which case its a non-blocking call. \n If this method is called a sequence of times with the same namespace (defaults to exp_uid if not set) it is guaranteed that they will execute in order, each job finishing before the next begins\n\n Inputs: ::\\n\n (string) app_id, (string) exp_id, (string) task_name, (json) args\n\n \"\"\"\n submit_timestamp = utils.datetimeNow('string')\n if namespace==None:\n namespace=exp_uid\n domain = self.__get_domain_for_job(app_id+\"_\"+exp_uid)\n num_queues = next.constants.CELERY_SYNC_WORKER_COUNT\n\n # assign namespaces to queues (with worker of concurrency 1) in round-robbin \n try:\n namespace_cnt = int(self.r.get(namespace+\"_cnt\"))\n except:\n pipe = self.r.pipeline(True)\n while 1:\n try:\n pipe.watch(namespace+\"_cnt\",\"namespace_counter\")\n\n if not pipe.exists(namespace+\"_cnt\"):\n if not pipe.exists('namespace_counter'):\n namespace_counter = 0\n else:\n namespace_counter = pipe.get('namespace_counter')\n pipe.multi()\n pipe.set(namespace+\"_cnt\",int(namespace_counter)+1)\n pipe.set('namespace_counter',int(namespace_counter)+1)\n pipe.execute()\n else:\n pipe.unwatch()\n break\n except redis.exceptions.WatchError:\n continue\n finally:\n pipe.reset()\n namespace_cnt = int(self.r.get(namespace+\"_cnt\"))\n queue_number = (namespace_cnt % num_queues) + 1\n queue_name = 'sync_queue_'+str(queue_number)+'@'+domain\n\n job_uid = utils.getNewUID()\n if time_limit == 0:\n soft_time_limit = None\n hard_time_limit = None\n else:\n soft_time_limit = time_limit\n hard_time_limit = time_limit + .01\n result = tasks.apply_sync_by_namespace.apply_async(args=[app_id,exp_uid,task_name, args, namespace, job_uid, submit_timestamp, time_limit], queue=queue_name,soft_time_limit=soft_time_limit,time_limit=hard_time_limit)\n if ignore_result:\n return True\n else:\n return result.get(interval=.001) ", "metadata": "root.JobBroker.applySyncByNamespace", "header": "['class', 'JobBroker', ':', '___NEWLINE___', '___NL___', '# Initialization method for the broker', '___NL___', '___EOS___']", "index": 48 }, { "content": " def refresh_domain_hashes(self):\n\n # see what workers are out there\n worker_pings = None\n while worker_pings==None:\n try:\n # one could also use app.control.inspect().active_queues()\n worker_pings = app.control.inspect().ping()\n except:\n worker_pings = None\n worker_names = worker_pings.keys()\n domain_names_with_dups = [ item.split('@')[1] for item in worker_names]\n domain_names = list(set(domain_names_with_dups)) # remove duplicates!\n\n timestamp = utils.datetime2str(utils.datetimeNow())\n print \"[ %s ] domains with active workers = %s\" % (timestamp,str(domain_names))\n\n replicated_domains_hash = []\n for domain in domain_names:\n for i in range(self.num_replicas):\n replicated_domains_hash.append((domain, self.hash(domain+'_replica_'+str(i)), i))\n replicated_domains_hash = sorted( replicated_domains_hash, key = lambda x: x[1]) \n\n self.r.set('replicated_domains_hash',json.dumps(replicated_domains_hash))", "metadata": "root.JobBroker.refresh_domain_hashes", "header": "['class', 'JobBroker', ':', '___NEWLINE___', '___NL___', '# Initialization method for the broker', '___NL___', '___EOS___']", "index": 125 } ]
[ { "span": "except:", "start_line": 67, "start_column": 8, "end_line": 67, "end_column": 15 }, { "span": "except:", "start_line": 133, "start_column": 12, "end_line": 133, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Jo", "b", "Broker", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Initializ", "ation", " ", "method", " ", "for", " ", "the", " ", "broker_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "appl", "y", "Sync", "By", "Namespace_", "(_", "self_", ",_", "app", "\\u", "id_", ",_", "exp", "\\u", "uid_", ",_", "task", "\\u", "name_", ",_", "args_", ",_", "namespace_", "=_", "None_", ",_", "ignore", "\\u", "result_", "=_", "False_", ",_", "time", "\\u", "limit_", "=_", "0_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Run", " ", "a", " ", "task", " ", "(", "task", "\\u", "name", ")", " ", "on", " ", "a", " ", "set", " ", "of", " ", "args", " ", "with", " ", "a", " ", "give", "n", " ", "app", "\\u", "id", ",", " ", "and", " ", "exp", "\\u", "uid", " ", "async", "hronous", "ly", ".", " ", "\\", "10", ";", " ", " ", " ", " ", "Wait", "s", " ", "for", " ", "computation", " ", "to", " ", "finish", " ", "and", " ", "return", "s", " ", "the", " ", "answer", " ", "unl", "ess", " ", "ignore", "\\u", "result", "=", "Tru", "e", " ", "in", " ", "whi", "ch", " ", "case", " ", "its", " ", "a", " ", "non", "-", "blockin", "g", " ", "call", ".", " ", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "this", " ", "method", " ", "is", " ", "call", "ed", " ", "a", " ", "sequence", " ", "of", " ", "times", " ", "with", " ", "the", " ", "same", " ", "namespace", " ", "(", "default", "s", " ", "to", " ", "exp", "\\u", "uid", " ", "if", " ", "not", " ", "set", ")", " ", "it", " ", "is", " ", "guaran", "tee", "d", " ", "tha", "t", " ", "the", "y", " ", "will", " ", "execute", " ", "in", " ", "order", ",", " ", "each", " ", "job", " ", "finish", "ing", " ", "bef", "ore", " ", "the", " ", "next", " ", "begins", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Inp", "uts", ":", " ", "::", "\\\\", "n", "\\", "10", ";", " ", " ", " ", " ", "(", "string", ")", " ", "app", "\\u", "id", ",", " ", "(", "string", ")", " ", "exp", "\\u", "id", ",", " ", "(", "string", ")", " ", "task", "\\u", "name", ",", " ", "(", "json", ")", " ", "args", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "submit", "\\u", "timestamp_", "=_", "utils_", "._", "datetime", "Now_", "(_", "'", "string", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "namespace_", "==_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "namespace_", "=_", "exp", "\\u", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "domain_", "=_", "self_", "._", "\\u\\u", "get", "\\u", "domain", "\\u", "for", "\\u", "job_", "(_", "app", "\\u", "id_", "+_", "\"\\u\"_", "+_", "exp", "\\u", "uid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "num", "\\u", "queues_", "=_", "next_", "._", "constants_", "._", "CEL", "ER", "Y", "\\u", "SYNC", "\\u", "WORKER", "\\u", "COUNT_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "assign", " ", "namespace", "s", " ", "to", " ", "queue", "s", " ", "(", "with", " ", "worker", " ", "of", " ", "concurrency", " ", "1", ")", " ", "in", " ", "round", "-", "rob", "bin", " _", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "namespace", "\\u", "cnt_", "=_", "int_", "(_", "self_", "._", "r_", "._", "get_", "(_", "namespace_", "+_", "\"\\u", "cnt", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pipe_", "=_", "self_", "._", "r_", "._", "pipeline_", "(_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pipe_", "._", "watch_", "(_", "namespace_", "+_", "\"\\u", "cnt", "\"_", ",_", "\"", "namespace", "\\u", "counter", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "pipe_", "._", "exists_", "(_", "namespace_", "+_", "\"\\u", "cnt", "\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "if_", "not_", "pipe_", "._", "exists_", "(_", "'", "namespace", "\\u", "counter", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "namespace", "\\u", "counter_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "namespace", "\\u", "counter_", "=_", "pipe_", "._", "get_", "(_", "'", "namespace", "\\u", "counter", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "pipe_", "._", "multi_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pipe_", "._", "set_", "(_", "namespace_", "+_", "\"\\u", "cnt", "\"_", ",_", "int_", "(_", "namespace", "\\u", "counter_", ")_", "+_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pipe_", "._", "set_", "(_", "'", "namespace", "\\u", "counter", "'_", ",_", "int_", "(_", "namespace", "\\u", "counter_", ")_", "+_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pipe_", "._", "execute_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "pipe_", "._", "unwa", "tch_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "redis_", "._", "exceptions_", "._", "Watch", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "finally_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pipe_", "._", "reset_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "namespace", "\\u", "cnt_", "=_", "int_", "(_", "self_", "._", "r_", "._", "get_", "(_", "namespace_", "+_", "\"\\u", "cnt", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "queue", "\\u", "number_", "=_", "(_", "namespace", "\\u", "cnt_", "%_", "num", "\\u", "queues_", ")_", "+_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "queue", "\\u", "name_", "=_", "'", "sync", "\\u", "queue", "\\u'_", "+_", "str_", "(_", "queue", "\\u", "number_", ")_", "+_", "'@'_", "+_", "domain_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "job", "\\u", "uid_", "=_", "utils_", "._", "get", "New", "UID_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "time", "\\u", "limit_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "soft", "\\u", "time", "\\u", "limit_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hard", "\\u", "time", "\\u", "limit_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "soft", "\\u", "time", "\\u", "limit_", "=_", "time", "\\u", "limit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hard", "\\u", "time", "\\u", "limit_", "=_", "time", "\\u", "limit_", "+_", ".01_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "tasks_", "._", "appl", "y", "\\u", "sync", "\\u", "by", "\\u", "namespace_", "._", "appl", "y", "\\u", "async_", "(_", "args_", "=_", "[_", "app", "\\u", "id_", ",_", "exp", "\\u", "uid_", ",_", "task", "\\u", "name_", ",_", "args_", ",_", "namespace_", ",_", "job", "\\u", "uid_", ",_", "submit", "\\u", "timestamp_", ",_", "time", "\\u", "limit_", "]_", ",_", "queue_", "=_", "queue", "\\u", "name_", ",_", "soft", "\\u", "time", "\\u", "limit_", "=_", "soft", "\\u", "time", "\\u", "limit_", ",_", "time", "\\u", "limit_", "=_", "hard", "\\u", "time", "\\u", "limit_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ignore", "\\u", "result_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "result_", "._", "get_", "(_", "interval_", "=_", ".00", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Jo", "b", "Broker", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Initializ", "ation", " ", "method", " ", "for", " ", "the", " ", "broker_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "refre", "sh", "\\u", "domain", "\\u", "hashes_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "see", " ", "what", " ", "worker", "s", " ", "are", " ", "out", " ", "there", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "worker", "\\u", "ping", "s_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "worker", "\\u", "ping", "s_", "==_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "one", " ", "coul", "d", " ", "als", "o", " ", "use", " ", "app", ".", "control", ".", "inspect", "()", ".", "active", "\\u", "queue", "s", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "worker", "\\u", "ping", "s_", "=_", "app_", "._", "control_", "._", "inspect_", "(_", ")_", "._", "ping_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "worker", "\\u", "ping", "s_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "worker", "\\u", "names_", "=_", "worker", "\\u", "ping", "s_", "._", "keys_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "domain", "\\u", "names", "\\u", "with", "\\u", "dup", "s_", "=_", "[_", "item_", "._", "split_", "(_", "'@'_", ")_", "[_", "1_", "]_", "for_", "item_", "in_", "worker", "\\u", "names_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "domain", "\\u", "names_", "=_", "list_", "(_", "set_", "(_", "domain", "\\u", "names", "\\u", "with", "\\u", "dup", "s_", ")_", ")_", "#", " ", "remove", " ", "duplicat", "es", "!", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "timestamp_", "=_", "utils_", "._", "datetime", "2str_", "(_", "utils_", "._", "datetime", "Now_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"[", " ", "%", "s", " ", "]", " ", "domains", " ", "with", " ", "active", " ", "worker", "s", " ", "=", " ", "%", "s", "\"_", "%_", "(_", "timestamp_", ",_", "str_", "(_", "domain", "\\u", "names_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "replicate", "d\\u", "domains", "\\u", "hash_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "domain_", "in_", "domain", "\\u", "names_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "i_", "in_", "range_", "(_", "self_", "._", "num", "\\u", "replicas_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "replicate", "d\\u", "domains", "\\u", "hash_", "._", "append_", "(_", "(_", "domain_", ",_", "self_", "._", "hash_", "(_", "domain_", "+_", "'\\u", "replica", "\\u'_", "+_", "str_", "(_", "i_", ")_", ")_", ",_", "i_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "replicate", "d\\u", "domains", "\\u", "hash_", "=_", "sorted_", "(_", "replicate", "d\\u", "domains", "\\u", "hash_", ",_", "key_", "=_", "lambda_", "x_", ":_", "x_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "r_", "._", "set_", "(_", "'", "replicate", "d\\u", "domains", "\\u", "hash", "'_", ",_", "json_", "._", "dumps_", "(_", "replicate", "d\\u", "domains", "\\u", "hash_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
First argument to super() is not enclosing class
django-leonardo/django-leonardo/leonardo/module/nav/widget/contextnavigation/models.py
[ { "content": " def filter_items(self, items):\n return super(NavigationWidget, self).filter_items(items)", "metadata": "root.ContextNavigationWidget.filter_items", "header": "['class', 'ContextNavigationWidget', '(', 'ListWidgetMixin', ',', 'NavigationWidget', ')', ':', '___EOS___']", "index": 59 } ]
[ { "span": "super(NavigationWidget, self).", "start_line": 60, "start_column": 15, "end_line": 60, "end_column": 44 } ]
[]
1
true
[ "[CLS]_", "First_", "argument_", "to_", "super_", "(_", ")_", "is_", "not_", "encl", "osin", "g_", "class_", "[SEP]_", "class_", "Context", "Navigat", "ion", "Widget_", "(_", "List", "Wid", "get", "Mixin_", ",_", "Navigat", "ion", "Widget_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "filter", "\\u", "items_", "(_", "self_", ",_", "items_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "super_", "(_", "Navigat", "ion", "Widget_", ",_", "self_", ")_", "._", "filter", "\\u", "items_", "(_", "items_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2 ]
Duplicate key in dict literal
christabor/MoAL/MOAL/software_engineering/problem_solving/design_patterns/grasp/pattern_controller.py
[ { "content": " def __init__(self, *args, **kwargs):\n self.conn = {\n 'name': '',\n 'password': '',\n 'name': None,\n 'url': None\n }\n self.data = {}", "metadata": "root.MockDBAdapter.__init__", "header": "['class', 'MockDBAdapter', ':', '___EOS___']", "index": 24 } ]
[ { "span": "'name':", "start_line": 26, "start_column": 12, "end_line": 26, "end_column": 18 } ]
[ { "span": "'name':", "start_line": 28, "start_column": 12, "end_line": 28, "end_column": 18 } ]
1
true
[ "[CLS]_", "Duplicate", "_", "key_", "in_", "dict_", "literal_", "[SEP]_", "class_", "Moc", "k", "DBA", "dap", "ter_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "conn_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "''_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "password", "'_", ":_", "''_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "url", "'_", ":_", "None_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "data_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
lsbardel/python-stdnet/tests/all/benchmarks/__init__.py
[ { "content": "import os\n\nfrom stdnet.utils import test\n\nfrom examples.models import Instrument, Fund, Position, PortfolioView,\\\n UserDefaultView\nfrom examples.data import finance_data, INSTS_TYPES, CCYS_TYPES\n\n\n \n ", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Benchmarks(test.TestWrite):\n __benchmark__ = True\n data_cls = finance_data\n models = (Instrument, Fund, Position)\n ", "metadata": "root.Benchmarks", "header": "['module', '___EOS___']", "index": 9 }, { "content": " def test_create(self):\n session = yield self.data.create(self)", "metadata": "root.Benchmarks.test_create", "header": "['class', 'Benchmarks', '(', 'test', '.', 'TestWrite', ')', ':', '___EOS___']", "index": 14 } ]
[ { "span": "import os", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 9 }, { "span": "from examples.models import Instrument, Fund, Position, PortfolioView,\\\n UserDefaultView", "start_line": 4, "start_column": 0, "end_line": 5, "end_column": 44 }, { "span": "from examples.data import finance_data, INSTS_TYPES, CCYS_TYPES", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 63 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "std", "net_", "._", "utils_", "import_", "test_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "examples_", "._", "models_", "import_", "Instrument_", ",_", "Fund", "_", ",_", "Position_", ",_", "Port", "folio", "View_", ",_", "User", "Default", "View_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "examples_", "._", "data_", "import_", "finance", "\\u", "data_", ",_", "INST", "S", "\\u", "TYPES_", ",_", "CC", "YS", "\\u", "TYPES_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Benchmark", "s_", "(_", "test_", "._", "Test", "Write_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\\u\\u", "bench", "mark", "\\u\\u_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "data\\u", "cls_", "=_", "finance", "\\u", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "models_", "=_", "(_", "Instrument_", ",_", "Fund", "_", ",_", "Position_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Benchmark", "s_", "(_", "test_", "._", "Test", "Write_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "create_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "session_", "=_", "yield_", "self_", "._", "data_", "._", "create_", "(_", "self_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Redundant assignment
lbryio/lbry/tests/functional_tests.py
[ { "content": " def test_live_transfer(self):\n\n sd_hash_queue = Queue()\n kill_event = Event()\n dead_event = Event()\n server_args = (sd_hash_queue, kill_event, dead_event)\n server = Process(target=start_live_server, args=server_args)\n server.start()\n self.server_processes.append(server)\n\n wallet = FakeWallet()\n peer_manager = PeerManager()\n peer_finder = FakePeerFinder(5553, peer_manager, 1)\n hash_announcer = FakeAnnouncer()\n rate_limiter = DummyRateLimiter()\n sd_identifier = StreamDescriptorIdentifier()\n\n db_dir = \"client\"\n os.mkdir(db_dir)\n\n self.session = LBRYSession(MIN_BLOB_DATA_PAYMENT_RATE, db_dir=db_dir, lbryid=\"abcd\",\n peer_finder=peer_finder, hash_announcer=hash_announcer, blob_dir=None,\n peer_port=5553, use_upnp=False, rate_limiter=rate_limiter, wallet=wallet)\n\n self.stream_info_manager = TempLiveStreamMetadataManager(hash_announcer)\n\n d = self.wait_for_hash_from_queue(sd_hash_queue)\n\n def create_downloader(metadata, prm):\n info_validator = metadata.validator\n options = metadata.options\n factories = metadata.factories\n chosen_options = [o.default_value for o in options.get_downloader_options(info_validator, prm)]\n return factories[0].make_downloader(metadata, chosen_options, prm)\n\n def start_lbry_file(lbry_file):\n lbry_file = lbry_file\n logging.debug(\"Calling lbry_file.start()\")\n return lbry_file.start()\n\n def download_stream(sd_blob_hash):\n logging.debug(\"Downloaded the sd blob. Reading it now\")\n prm = PaymentRateManager(self.session.base_payment_rate_manager)\n d = download_sd_blob(self.session, sd_blob_hash, prm)\n d.addCallback(sd_identifier.get_metadata_for_sd_blob)\n d.addCallback(create_downloader, prm)\n d.addCallback(start_lbry_file)\n return d\n\n def do_download(sd_blob_hash):\n logging.debug(\"Starting the download\")\n d = self.session.setup()\n d.addCallback(lambda _: enable_live_stream())\n d.addCallback(lambda _: download_stream(sd_blob_hash))\n return d\n\n def enable_live_stream():\n base_live_stream_payment_rate_manager = BaseLiveStreamPaymentRateManager(\n MIN_BLOB_INFO_PAYMENT_RATE\n )\n add_live_stream_to_sd_identifier(sd_identifier,\n base_live_stream_payment_rate_manager)\n add_full_live_stream_downloader_to_sd_identifier(self.session, self.stream_info_manager,\n sd_identifier,\n base_live_stream_payment_rate_manager)\n\n d.addCallback(do_download)\n\n def check_md5_sum():\n f = open('test_file')\n hashsum = MD5.new()\n hashsum.update(f.read())\n self.assertEqual(hashsum.hexdigest(), \"215b177db8eed86d028b37e5cbad55c7\")\n\n d.addCallback(lambda _: check_md5_sum())\n\n def stop(arg):\n if isinstance(arg, Failure):\n logging.debug(\"Client is stopping due to an error. Error: %s\", arg.getTraceback())\n else:\n logging.debug(\"Client is stopping normally.\")\n kill_event.set()\n logging.debug(\"Set the kill event\")\n d = self.wait_for_event(dead_event, 15)\n\n def print_shutting_down():\n logging.info(\"Client is shutting down\")\n\n d.addCallback(lambda _: print_shutting_down())\n d.addCallback(lambda _: arg)\n return d\n\n d.addBoth(stop)\n return d", "metadata": "root.TestTransfer.test_live_transfer", "header": "['class', 'TestTransfer', '(', 'TestCase', ')', ':', '___EOS___']", "index": 841 } ]
[ { "span": "lbry_file = lbry_file", "start_line": 877, "start_column": 12, "end_line": 877, "end_column": 33 } ]
[]
1
true
[ "[CLS]_", "Redu", "ndan", "t_", "assignment_", "[SEP]_", "class_", "Test", "Transfer", "_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "live", "\\u", "transfer_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sd", "\\u", "hash", "\\u", "queue_", "=_", "Queue_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "kill", "\\u", "event_", "=_", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dead", "\\u", "event_", "=_", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "server", "\\u", "args_", "=_", "(_", "sd", "\\u", "hash", "\\u", "queue_", ",_", "kill", "\\u", "event_", ",_", "dead", "\\u", "event_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "server_", "=_", "Process_", "(_", "target_", "=_", "start", "\\u", "live", "\\u", "server_", ",_", "args_", "=_", "server", "\\u", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "server_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "server", "\\u", "processes_", "._", "append_", "(_", "server_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "wallet_", "=_", "Fake", "Wallet_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "peer", "\\u", "manager_", "=_", "Peer", "Manager_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "peer", "\\u", "finder_", "=_", "Fake", "Peer", "Finder_", "(_", "555", "3_", ",_", "peer", "\\u", "manager_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hash", "\\u", "announce", "r_", "=_", "Fake", "Announce", "r_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "rate", "\\u", "limiter", "_", "=_", "Du", "mm", "y", "Rat", "e", "Limit", "er_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sd", "\\u", "identifier_", "=_", "Stream", "Descrip", "tor", "Identifier_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "db", "\\u", "dir_", "=_", "\"", "client", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "os_", "._", "mkdir_", "(_", "db", "\\u", "dir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "session_", "=_", "LB", "RY", "Session_", "(_", "MIN", "\\u", "BLOB", "\\u", "DATA", "\\u", "PAY", "MENT", "\\u", "RATE_", ",_", "db", "\\u", "dir_", "=_", "db", "\\u", "dir_", ",_", "lbr", "yi", "d_", "=_", "\"", "abc", "d", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "peer", "\\u", "finder_", "=_", "peer", "\\u", "finder_", ",_", "hash", "\\u", "announce", "r_", "=_", "hash", "\\u", "announce", "r_", ",_", "blob", "\\u", "dir_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "peer", "\\u", "port_", "=_", "555", "3_", ",_", "use", "\\u", "upnp", "_", "=_", "False_", ",_", "rate", "\\u", "limiter", "_", "=_", "rate", "\\u", "limiter", "_", ",_", "wallet_", "=_", "wallet_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "stream", "\\u", "info", "\\u", "manager_", "=_", "Temp", "Live", "Stream", "Meta", "data", "Manager_", "(_", "hash", "\\u", "announce", "r_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "d_", "=_", "self_", "._", "wait", "\\u", "for", "\\u", "hash", "\\u", "from", "\\u", "queue_", "(_", "sd", "\\u", "hash", "\\u", "queue_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "create", "\\u", "downloader_", "(_", "metadata_", ",_", "prm_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "info", "\\u", "validator_", "=_", "metadata_", "._", "validator_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", "=_", "metadata_", "._", "options_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "factories_", "=_", "metadata_", "._", "factories_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "chosen", "\\u", "options_", "=_", "[_", "o_", "._", "default", "\\u", "value_", "for_", "o_", "in_", "options_", "._", "get", "\\u", "downloader", "\\u", "options_", "(_", "info", "\\u", "validator_", ",_", "prm_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "factories_", "[_", "0_", "]_", "._", "make", "\\u", "downloader_", "(_", "metadata_", ",_", "chosen", "\\u", "options_", ",_", "prm_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "start", "\\u", "lbr", "y", "\\u", "file_", "(_", "lbr", "y", "\\u", "file_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lbr", "y", "\\u", "file_", "=_", "lbr", "y", "\\u", "file_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logging_", "._", "debug_", "(_", "\"", "Call", "ing", " ", "lbr", "y", "\\u", "file", ".", "start", "()\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "lbr", "y", "\\u", "file_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "download", "\\u", "stream_", "(_", "sd", "\\u", "blob", "\\u", "hash_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "debug_", "(_", "\"", "Downloade", "d", " ", "the", " ", "sd", " ", "blob", ".", " ", "Reading", " ", "it", " ", "now", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "prm_", "=_", "Payment", "Rat", "e", "Manager_", "(_", "self_", "._", "session_", "._", "base", "\\u", "pay", "ment", "\\u", "rate", "\\u", "manager_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "=_", "download", "\\u", "sd", "\\u", "blob_", "(_", "self_", "._", "session_", ",_", "sd", "\\u", "blob", "\\u", "hash_", ",_", "prm_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "sd", "\\u", "identifier_", "._", "get", "\\u", "metadata", "\\u", "for", "\\u", "sd", "\\u", "blob_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "create", "\\u", "downloader_", ",_", "prm_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "start", "\\u", "lbr", "y", "\\u", "file_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "do", "\\u", "download_", "(_", "sd", "\\u", "blob", "\\u", "hash_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "debug_", "(_", "\"", "Start", "ing", " ", "the", " ", "download", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "=_", "self_", "._", "session_", "._", "setup_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "lambda_", "\\u_", ":_", "enable", "\\u", "live", "\\u", "stream_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "lambda_", "\\u_", ":_", "download", "\\u", "stream_", "(_", "sd", "\\u", "blob", "\\u", "hash_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "enable", "\\u", "live", "\\u", "stream_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "base", "\\u", "live", "\\u", "stream", "\\u", "pay", "ment", "\\u", "rate", "\\u", "manager_", "=_", "Base", "Live", "Stream", "Payment", "Rat", "e", "Manager_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "MIN", "\\u", "BLOB", "\\u", "INFO", "\\u", "PAY", "MENT", "\\u", "RATE_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "add", "\\u", "live", "\\u", "stream", "\\u", "to", "\\u", "sd", "\\u", "identifier_", "(_", "sd", "\\u", "identifier_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "base", "\\u", "live", "\\u", "stream", "\\u", "pay", "ment", "\\u", "rate", "\\u", "manager_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "add", "\\u", "full", "\\u", "live", "\\u", "stream", "\\u", "downloader", "\\u", "to", "\\u", "sd", "\\u", "identifier_", "(_", "self_", "._", "session_", ",_", "self_", "._", "stream", "\\u", "info", "\\u", "manager_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sd", "\\u", "identifier_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "base", "\\u", "live", "\\u", "stream", "\\u", "pay", "ment", "\\u", "rate", "\\u", "manager_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "do", "\\u", "download_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "check", "\\u", "md5", "\\u", "sum_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "f_", "=_", "open_", "(_", "'", "test\\u", "file", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hash", "sum_", "=_", "MD", "5_", "._", "new_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hash", "sum_", "._", "update_", "(_", "f_", "._", "read_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "hash", "sum_", "._", "hexdigest_", "(_", ")_", ",_", "\"", "215", "b1", "7", "7d", "b8", "eed", "86", "d0", "2", "8b", "3", "7e", "5c", "bad", "5", "5c", "7", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "lambda_", "\\u_", ":_", "check", "\\u", "md5", "\\u", "sum_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "stop_", "(_", "arg_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "arg_", ",_", "Failure_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "debug_", "(_", "\"", "Client", " ", "is", " ", "stopping", " ", "due", " ", "to", " ", "an", " ", "error", ".", " ", "Error", ":", " ", "%", "s", "\"_", ",_", "arg_", "._", "get", "Trace", "back_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "debug_", "(_", "\"", "Client", " ", "is", " ", "stopping", " ", "normal", "ly", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "kill", "\\u", "event_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logging_", "._", "debug_", "(_", "\"", "Set", " ", "the", " ", "kill", " ", "event", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "=_", "self_", "._", "wait", "\\u", "for", "\\u", "event_", "(_", "dead", "\\u", "event_", ",_", "15_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "print", "\\u", "shutt", "ing", "\\u", "down_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "info_", "(_", "\"", "Client", " ", "is", " ", "shutt", "ing", " ", "down", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "lambda_", "\\u_", ":_", "print", "\\u", "shutt", "ing", "\\u", "down_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d_", "._", "add", "Callback_", "(_", "lambda_", "\\u_", ":_", "arg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "d_", "._", "add", "Bot", "h_", "(_", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
UDST/activitysim/activitysim/defaults/tables/__init__.py
[ { "content": "# ActivitySim\n# See full license in LICENSE.txt.\n\nimport households\nimport persons\nimport landuse\nimport skims\nimport accessibility\nimport tours\nimport size_terms\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import households", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 17 }, { "span": "import persons", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 14 }, { "span": "import landuse", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 14 }, { "span": "import skims", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 12 }, { "span": "import accessibility", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 20 }, { "span": "import tours", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 12 }, { "span": "import size_terms", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 17 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Activ", "it", "y", "Sim_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "See", " ", "full", " ", "license", " ", "in", " ", "LICENSE", ".", "txt", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "household", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "persons_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "land", "use_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "ski", "ms_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "accessi", "bility_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "tour", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "size", "\\u", "terms_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 1 ]
Comparison using is when operands support `__eq__`
azoft-dev-team/imagrium/env/Lib/test/test_unittest.py
[ { "content": "class Foo(unittest.TestCase):", "metadata": "root.Foo", "header": "['module', '___EOS___']", "index": 1234 }, { "content": " def test_1(self): pass", "metadata": "root.Foo.test_1", "header": "['class', 'Foo', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 1235 }, { "content": " def test_2(self): pass", "metadata": "root.Foo.test_2", "header": "['class', 'Foo', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 1236 }, { "content": " def test_3(self): pass", "metadata": "root.Foo.test_3", "header": "['class', 'Foo', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 1237 }, { "content": " def runTest(self): pass", "metadata": "root.Foo.runTest", "header": "['class', 'Foo', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 1238 }, { "content": " def test_addFailure(self):\n import sys\n\n class Foo(unittest.TestCase):\n def test_1(self):\n pass\n\n test = Foo('test_1')\n try:\n test.fail(\"foo\")\n except:\n exc_info_tuple = sys.exc_info()\n\n result = unittest.TestResult()\n\n result.startTest(test)\n result.addFailure(test, exc_info_tuple)\n result.stopTest(test)\n\n self.failIf(result.wasSuccessful())\n self.assertEqual(len(result.errors), 0)\n self.assertEqual(len(result.failures), 1)\n self.assertEqual(result.testsRun, 1)\n self.assertEqual(result.shouldStop, False)\n\n test_case, formatted_exc = result.failures[0]\n self.failUnless(test_case is test)\n self.failUnless(isinstance(formatted_exc, str))", "metadata": "root.Test_TestResult.test_addFailure", "header": "['class', 'Test_TestResult', '(', 'TestCase', ')', ':', '___NEWLINE___', '# Note: there are not separate tests for TestResult.wasSuccessful(),', '___NL___', '# TestResult.errors, TestResult.failures, TestResult.testsRun or', '___NL___', '# TestResult.shouldStop because these only have meaning in terms of', '___NL___', '# other TestResult methods.', '___NL___', '#', '___NL___', '# Accordingly, tests for the aforenamed attributes are incorporated', '___NL___', '# in with the tests for the defining methods.', '___NL___', '################################################################', '___NL___', '___EOS___']", "index": 1794 }, { "content": " def test_addError(self):\n import sys\n\n class Foo(unittest.TestCase):\n def test_1(self):\n pass\n\n test = Foo('test_1')\n try:\n raise TypeError()\n except:\n exc_info_tuple = sys.exc_info()\n\n result = unittest.TestResult()\n\n result.startTest(test)\n result.addError(test, exc_info_tuple)\n result.stopTest(test)\n\n self.failIf(result.wasSuccessful())\n self.assertEqual(len(result.errors), 1)\n self.assertEqual(len(result.failures), 0)\n self.assertEqual(result.testsRun, 1)\n self.assertEqual(result.shouldStop, False)\n\n test_case, formatted_exc = result.errors[0]\n self.failUnless(test_case is test)\n self.failUnless(isinstance(formatted_exc, str))", "metadata": "root.Test_TestResult.test_addError", "header": "['class', 'Test_TestResult', '(', 'TestCase', ')', ':', '___NEWLINE___', '# Note: there are not separate tests for TestResult.wasSuccessful(),', '___NL___', '# TestResult.errors, TestResult.failures, TestResult.testsRun or', '___NL___', '# TestResult.shouldStop because these only have meaning in terms of', '___NL___', '# other TestResult methods.', '___NL___', '#', '___NL___', '# Accordingly, tests for the aforenamed attributes are incorporated', '___NL___', '# in with the tests for the defining methods.', '___NL___', '################################################################', '___NL___', '___EOS___']", "index": 1844 } ]
[ { "span": "test_case is test)", "start_line": 1820, "start_column": 24, "end_line": 1820, "end_column": 41 }, { "span": "test_case is test)", "start_line": 1870, "start_column": 24, "end_line": 1870, "end_column": 41 } ]
[]
1
false
[ "[CLS]_", "Compari", "son_", "using_", "is_", "when_", "operands_", "support_", " _", "`_", "\\u\\u", "eq\\u\\u_", "`_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "1_", "(_", "self_", ")_", ":_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "2_", "(_", "self_", ")_", ":_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "3_", "(_", "self_", ")_", ":_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "run", "Test_", "(_", "self_", ")_", ":_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "\\u", "Test", "Result_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Not", "e", ":", " ", "there", " ", "are", " ", "not", " ", "separate", " ", "tests", " ", "for", " ", "Test", "Result", ".", "was", "Success", "ful", "()", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "Result", ".", "error", "s", ",", " ", "Test", "Result", ".", "fail", "ure", "s", ",", " ", "Test", "Result", ".", "tests", "Run", " ", "or_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "Result", ".", "shou", "ld", "Sto", "p", " ", "bec", "aus", "e", " ", "these", " ", "only", " ", "have", " ", "meaning", " ", "in", " ", "term", "s", " ", "of_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "other", " ", "Test", "Result", " ", "method", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Acco", "rdin", "gly", ",", " ", "tests", " ", "for", " ", "the", " ", "af", "ore", "named", " ", "attribute", "s", " ", "are", " ", "inco", "rpor", "ated", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "in", " ", "with", " ", "the", " ", "tests", " ", "for", " ", "the", " ", "defini", "ng", " ", "method", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "Failure_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "1_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "test_", "=_", "Foo_", "(_", "'", "test\\u", "1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test_", "._", "fail_", "(_", "\"", "foo", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exc", "\\u", "info", "\\u", "tuple_", "=_", "sys_", "._", "exc", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "unittest_", "._", "Test", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "._", "start", "Test_", "(_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "._", "add", "Failure_", "(_", "test_", ",_", "exc", "\\u", "info", "\\u", "tuple_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "._", "stop", "Test_", "(_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "fail", "If_", "(_", "result_", "._", "was", "Success", "ful_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "result_", "._", "errors_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "result_", "._", "failures_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "result_", "._", "tests", "Run_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "result_", "._", "shou", "ld", "Stop_", ",_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test\\u", "case_", ",_", "format", "ted", "\\u", "exc_", "=_", "result_", "._", "failures_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail", "Unless_", "(_", "test\\u", "case_", "is_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail", "Unless_", "(_", "isinstance_", "(_", "format", "ted", "\\u", "exc_", ",_", "str_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "\\u", "Test", "Result_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Not", "e", ":", " ", "there", " ", "are", " ", "not", " ", "separate", " ", "tests", " ", "for", " ", "Test", "Result", ".", "was", "Success", "ful", "()", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "Result", ".", "error", "s", ",", " ", "Test", "Result", ".", "fail", "ure", "s", ",", " ", "Test", "Result", ".", "tests", "Run", " ", "or_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Test", "Result", ".", "shou", "ld", "Sto", "p", " ", "bec", "aus", "e", " ", "these", " ", "only", " ", "have", " ", "meaning", " ", "in", " ", "term", "s", " ", "of_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "other", " ", "Test", "Result", " ", "method", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Acco", "rdin", "gly", ",", " ", "tests", " ", "for", " ", "the", " ", "af", "ore", "named", " ", "attribute", "s", " ", "are", " ", "inco", "rpor", "ated", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "in", " ", "with", " ", "the", " ", "tests", " ", "for", " ", "the", " ", "defini", "ng", " ", "method", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "add", "Error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Foo_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "1_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "test_", "=_", "Foo_", "(_", "'", "test\\u", "1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Type", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exc", "\\u", "info", "\\u", "tuple_", "=_", "sys_", "._", "exc", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "unittest_", "._", "Test", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "._", "start", "Test_", "(_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "._", "add", "Error_", "(_", "test_", ",_", "exc", "\\u", "info", "\\u", "tuple_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "._", "stop", "Test_", "(_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "fail", "If_", "(_", "result_", "._", "was", "Success", "ful_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "result_", "._", "errors_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "result_", "._", "failures_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "result_", "._", "tests", "Run_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "result_", "._", "shou", "ld", "Stop_", ",_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test\\u", "case_", ",_", "format", "ted", "\\u", "exc_", "=_", "result_", "._", "errors_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail", "Unless_", "(_", "test\\u", "case_", "is_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail", "Unless_", "(_", "isinstance_", "(_", "format", "ted", "\\u", "exc_", ",_", "str_", ")_", ")_", "\\u\\u\\uNEW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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
ilastik/ilastik-0.5/ilastik/modules/unsupervised_decomposition/gui/__init__.py
[ { "content": "import unsupervisedRibbon", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import unsupervisedRibbon", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 25 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "unsup", "ervi", "sed", "Rib", "bon", "_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1 ]
Unused import
lyst/lightfm/lightfm/datasets/__init__.py
[ { "content": "from lightfm.datasets.movielens import fetch_movielens\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from lightfm.datasets.movielens import fetch_movielens", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 54 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "light", "fm_", "._", "datasets_", "._", "movie", "lens_", "import_", "fetch", "\\u", "movie", "lens_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
Except block handles 'BaseException'
azoft-dev-team/imagrium/jars/Lib/sikuli/Sikuli.py
[ { "content": "def _exposeAllMethods(anyObject, saved, theGlobals, exclude_list):\n if not exclude_list:\n exclude_list = [ 'class', 'classDictInit', 'clone', 'equals', 'finalize',\n 'getClass', 'hashCode', 'notify', 'notifyAll',\n 'toGlobalCoord', 'toString', 'getLocationFromPSRML', 'getRegionFromPSRM',\n 'capture', 'selectRegion', 'create', 'observeInBackground', 'waitAll',\n 'updateSelf', 'findNow', 'findAllNow', 'getEventManager',\n 'lastMatch', 'lastMatches', 'lastScreenImage', 'lastScreenImageFile']\n #Debug.log(3, \"Sikuli: _exposeAllMethods: %s called from: %s\", anyObject, theGlobals['__name__'])\n tosave = []\n if not saved:\n saved = []\n for name in dir(anyObject):\n if name in exclude_list: continue\n try:\n if not inspect.ismethod(getattr(anyObject,name)): continue\n except:\n continue\n if name[0] != '_' and name[:7] != 'super__':\n try:\n saved.remove(name)\n except:\n pass\n tosave.append(name)\n #print \"added:\", name\n theGlobals[name] = eval(\"anyObject.\"+name)\n if name == 'checkWith': Debug.log(3, \"%s %s\", name, str(dict[name])[1:])\n for name in saved:\n if name in theGlobals:\n #print \"removed:\", name\n theGlobals.pop(name)\n return tosave", "metadata": "root._exposeAllMethods", "header": "['module', '___EOS___']", "index": 395 } ]
[ { "span": "except:", "start_line": 411, "start_column": 8, "end_line": 411, "end_column": 15 }, { "span": "except:", "start_line": 416, "start_column": 12, "end_line": 416, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "expos", "e", "All", "Methods_", "(_", "any", "Object_", ",_", "saved_", ",_", "the", "Globals_", ",_", "exclu", "de", "\\u", "list_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "exclu", "de", "\\u", "list_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exclu", "de", "\\u", "list_", "=_", "[_", "'", "class", "'_", ",_", "'", "class", "Dict", "Ini", "t", "'_", ",_", "'", "clone", "'_", ",_", "'", "equals", "'_", ",_", "'", "finalize", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "get", "Class", "'_", ",_", "'", "hash", "Code", "'_", ",_", "'", "notif", "y", "'_", ",_", "'", "notif", "y", "All", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "to", "Global", "Coord", "'_", ",_", "'", "to", "String", "'_", ",_", "'", "get", "Locat", "ion", "Fro", "m", "PSR", "ML", "'_", ",_", "'", "get", "Region", "Fro", "m", "PSR", "M", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "captur", "e", "'_", ",_", "'", "select", "Region", "'_", ",_", "'", "create", "'_", ",_", "'", "observe", "In", "Back", "ground", "'_", ",_", "'", "wait", "All", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "update", "Self", "'_", ",_", "'", "find", "No", "w", "'_", ",_", "'", "find", "All", "No", "w", "'_", ",_", "'", "get", "Event", "Manager", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "last", "Match", "'_", ",_", "'", "last", "Match", "es", "'_", ",_", "'", "last", "Scr", "een", "Image", "'_", ",_", "'", "last", "Scr", "een", "Image", "File", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "Deb", "ug", ".", "log", "(", "3", ",", " ", "\"", "Si", "kul", "i", ":", " ", "\\u", "expos", "e", "All", "Meth", "ods", ":", " ", "%", "s", " ", "call", "ed", " ", "from", ":", " ", "%", "s", "\",", " ", "any", "Object", ",", " ", "the", "Global", "s", "['", "\\u\\u", "name", "\\u\\u'", "])", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "tos", "ave_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "saved_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "saved_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "name_", "in_", "dir_", "(_", "any", "Object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "name_", "in_", "exclu", "de", "\\u", "list_", ":_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "inspect_", "._", "isme", "thod", "_", "(_", "getattr_", "(_", "any", "Object_", ",_", "name_", ")_", ")_", ":_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "name_", "[_", "0_", "]_", "!=_", "'\\u'_", "and_", "name_", "[_", ":_", "7_", "]_", "!=_", "'", "super", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "saved_", "._", "remove_", "(_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "tos", "ave_", "._", "append_", "(_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "\"", "adde", "d", ":\"", ",", " ", "name_", "\\u\\u\\uNL\\u\\u\\u_", "the", "Globals_", "[_", "name_", "]_", "=_", "eval_", "(_", "\"", "any", "Object", ".\"_", "+_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "name_", "==_", "'", "check", "With", "'_", ":_", "Debug_", "._", "log_", "(_", "3_", ",_", "\"%", "s", " ", "%", "s", "\"_", ",_", "name_", ",_", "str_", "(_", "dict_", "[_", "name_", "]_", ")_", "[_", "1_", ":_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "name_", "in_", "saved_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "name_", "in_", "the", "Globals_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "\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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
saga-project/BigJob/pilot/coordination/advert_adaptor.py
[ { "content": "import logging\nimport saga\nimport json\nimport pdb\n\nfrom pilot import *\nfrom bigjob import logger\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class AdvertCoordinationAdaptor:\n \"\"\"\n BigData persists its data in a central data space, e.g. the Advert service\n to facilitate distributed coordination:\n \n advert://advert.cct.lsu.edu/pilot/3d0d5960-296d-11e1-8896-00264a13ca4c/data/ => namespace for pilot data\n \n advert://advert.cct.lsu.edu/pilot/3d0d5960-296d-11e1-8896-00264a13ca4c/data/pds => pilot data service\n advert://advert.cct.lsu.edu/pilot/3d0d5960-296d-11e1-8896-00264a13ca4c/data/pds/pilot-data-description => pilot data description\n ...\n \n \n advert://advert.cct.lsu.edu/pilot/3d0d5960-296d-11e1-8896-00264a13ca4c/data/pds/ => pilot store service\n advert://advert.cct.lsu.edu/pilot/3d0d5960-296d-11e1-8896-00264a13ca4c/data/pds/pilot-data-description => pilot data description\n \n This class is stateless - the application's base_url needs to be passed into every method. \n \"\"\"\n BASE_URL=\"advert://localhost/\"\n BASE_URL_QUERY_STRING=\"?dbtype=sqlite3\"\n \n PILOT_PATH=\"pilot\"\n PILOT_DATA_PATH=PILOT_PATH\n PILOT_DATA_SERVICE_PATH=PILOT_DATA_PATH+\"/pds\"\n DATA_UNIT_SERVICE_PATH=PILOT_DATA_PATH+\"/dus\"\n COMPUTE_DATA_SERVICE_PATH = PILOT_DATA_PATH + \"/cds\"\n\n \n ###########################################################################\n # Construct a base url for an application\n \n \n ###########################################################################\n # Pilot Store Service related methods\n \n \n \n \n ###########################################################################\n # Pilot Data related methods\n \n \n \n \n \n \n \n \n \n ###########################################################################\n # Compute Data Service related methods\n \n \n \n \n \n \n \n ###########################################################################\n # Data Unit related methods\n\n \n \n \n \n \n \n \n \n \n \n ###########################################################################\n # URL Tweaking\n \n \n \n ###########################################################################\n # internal methods\n \n \n \n ", "metadata": "root.AdvertCoordinationAdaptor", "header": "['module', '___EOS___']", "index": 8 }, { "content": " @classmethod\n def get_base_url(cls, application_id):\n surl = saga.url(cls.BASE_URL)\n base_url = surl.scheme + \"://\" + surl.host + \"/\" + application_id + \"/\"\n logging.debug(base_url)\n return base_url", "metadata": "root.AdvertCoordinationAdaptor.get_base_url", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 38 }, { "content": " @classmethod \n def add_pds(cls, application_url, pds):\n pds_url_no_dbtype = cls.get_pds_url(application_url, pds.id)\n pds_url = cls.__get_url(pds_url_no_dbtype)\n logger.debug(\"Create PDS directory at %s\"%pds_url)\n saga.advert.directory(pds_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n return pds_url_no_dbtype", "metadata": "root.AdvertCoordinationAdaptor.add_pds", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 48 }, { "content": " @classmethod\n def delete_pds(cls, pds_url):\n pds_url = cls.__get_url(pds_url)\n pds_dir = saga.advert.directory(saga.url(pds_url), \n saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n pds_dir.remove(pds_url, saga.name_space.Recursive) ", "metadata": "root.AdvertCoordinationAdaptor.delete_pds", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 59 }, { "content": " @classmethod\n def add_pd(cls, pds_url, pd):\n pds_url = cls.__remove_dbtype(pds_url) \n pd_url =pds_url+\"/\" + pd.id\n pd_description_url = cls.__get_url(pd_url + \"/description\")\n logger.debug(\"PDS URL: %s, PD Description URL: %s\"%(pds_url, pd_description_url))\n # directory is recursively created\n pd_desc_entry = saga.advert.entry(saga.url(pd_description_url),\n saga.advert.Create | saga.advert.CreateParents | saga.advert.ReadWrite)\n logger.debug(\"initialized advert entry for pds: \" + pd_description_url)\n pd_desc_entry.store_string(json.dumps(pd.data_unit_description))\n return pd_url", "metadata": "root.AdvertCoordinationAdaptor.add_pd", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 71 }, { "content": " @classmethod\n def update_pd(cls, pd):\n if len(pd.data_units) > 0:\n du_urls = [i.url for i in pd.data_units.values()]\n cls.__store_entry(cls.__remove_dbtype(pd.url)+\"/data-units\", du_urls)\n cls.__store_entry(cls.__remove_dbtype(pd.url)+\"/pilot-data\", pd.to_dict())", "metadata": "root.AdvertCoordinationAdaptor.update_pd", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 84 }, { "content": " @classmethod\n def get_pd(cls, pds_url):\n logger.debug(\"GET PD: \" + pds_url) \n pd_dict={} \n #pd_dict[\"pilot_data\" ]= cls.__retrieve_entry(cls.__remove_dbtype(pds_url)+\"/pilot-data\")\n pd_dict[\"pilot_data\"] = cls.__retrieve_entry(cls.__remove_dbtype(pds_url)+\"/pilot-data\") \n return pd_dict", "metadata": "root.AdvertCoordinationAdaptor.get_pd", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 92 }, { "content": " @classmethod\n def list_pd(cls, pds_url):\n \"\"\" return a list of urls to pd managed by the PDS \"\"\"\n pds_url = cls.__get_url(pds_url)\n logger.debug(\"List PD at %s\"%pds_url)\n pds_dir = saga.advert.directory(pds_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n \n pd_list = pds_dir.list()\n pd_full_urls = []\n for i in pd_list:\n pd_full_urls.append(pds_url + \"/\" + i) \n return pd_full_urls", "metadata": "root.AdvertCoordinationAdaptor.list_pd", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 101 }, { "content": " @classmethod\n def delete_pd(cls, pds_url):\n pds_url = cls.__get_url(pds_url)\n pd_dir = saga.advert.directory(saga.url(pds_url), \n saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n pd_dir.remove(pds_url, saga.name_space.Recursive) ", "metadata": "root.AdvertCoordinationAdaptor.delete_pd", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 116 }, { "content": " @classmethod \n def add_cds(cls, application_url, cds):\n cds_url_no_dbtype = cls.get_cds_url(application_url, cds.id)\n cds_url = cls.__get_url(cds_url_no_dbtype)\n logger.debug(\"Create CDS directory at %s\"%cds_url)\n saga.advert.directory(cds_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n return cds_url_no_dbtype", "metadata": "root.AdvertCoordinationAdaptor.add_cds", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 128 }, { "content": " @classmethod \n def update_cds(cls, cds_url, cds):\n \n # Storage and Compute Resources\n pds_urls = [cls.__remove_dbtype(i.url) for i in cds.pilot_data_services]\n cls.__store_entry(cls.__remove_dbtype(cds_url)+\"/pds/\", pds_urls)\n \n pjs_urls = [i.url for i in cds.pilot_job_services]\n cls.__store_entry(cls.__remove_dbtype(cds_url)+\"/cds/\", pjs_urls)\n \n # currently managed PDs and WUs\n pd_urls = [i.url for i in cds.data_units.values()]\n cls.__store_entry(cls.__remove_dbtype(cds_url)+\"/du/\", pd_urls)\n \n wu_urls = [i.url for i in cds.compute_units.values()]\n cls.__store_entry(cls.__remove_dbtype(cds_url)+\"/cu/\", wu_urls)", "metadata": "root.AdvertCoordinationAdaptor.update_cds", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 138 }, { "content": " @classmethod\n def delete_cds(cls, cds_url):\n cds_url = cls.__get_url(cls.__remove_dbtype(cds_url))\n cds_dir = saga.advert.directory(saga.url(cds_url), \n saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n # cds_dir.remove(cds_url, saga.name_space.Recursive)", "metadata": "root.AdvertCoordinationAdaptor.delete_cds", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 156 }, { "content": " @classmethod\n def add_du(cls, dus_url, du):\n du_url = cls.__remove_dbtype(dus_url) + \"/\" + du.id \n du_url = cls.__get_url(du_url)\n # directory is recursively created\n #saga.advert.directory(saga.url(du_url),\n # saga.advert.Create | saga.advert.CreateParents | saga.advert.ReadWrite)\n #logger.debug(\"initialized advert entry for dus: \" + du_url)\n return du_url", "metadata": "root.AdvertCoordinationAdaptor.add_du", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 170 }, { "content": " @classmethod\n def get_du(cls, du_url):\n logger.debug(\"**** GET PD: \" + du_url)\n du_dict={} \n du_dict[\"data_unit_description\" ]= cls.__retrieve_entry(cls.__remove_dbtype(du_url)+\"/description\")\n du_dict[\"state\"] = cls.__retrieve_entry(cls.__remove_dbtype(du_url)+\"/state\") \n du_dict[\"data_units\"] = cls.__retrieve_entry(cls.__remove_dbtype(du_url)+\"/data-units\")\n du_dict[\"pilot_data\"] = cls.__retrieve_entry(cls.__remove_dbtype(du_url)+\"/pilot-data\") \n logger.debug(\"Open pilot data at: \" + du_url + \" State: \" + str(du_dict)) \n return du_dict", "metadata": "root.AdvertCoordinationAdaptor.get_du", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 181 }, { "content": " @classmethod \n def update_du(cls, du):\n logger.debug(\"**** Update pilot data at: \" + du.url)\n cls.__store_entry(cls.__remove_dbtype(du.url)+\"/description\", du.data_unit_description)\n cls.__store_entry(cls.__remove_dbtype(du.url)+\"/state\", du.state)\n \n du_urls = [i.url for i in du.pilot_data]\n cls.__store_entry(cls.__remove_dbtype(du.url)+\"/pilot-data\", du_urls)\n \n du_dict_list = [i.to_dict() for i in du.data_unit_items]\n cls.__store_entry(cls.__remove_dbtype(du.url)+\"/data-units\", du_dict_list)", "metadata": "root.AdvertCoordinationAdaptor.update_du", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 193 }, { "content": " @classmethod\n def list_du(cls, dus_url):\n \"\"\" return a list of urls to du managed by the PDS \"\"\"\n dus_url = cls.__get_url(dus_url)\n logger.debug(\"List PDS at %s\"%dus_url)\n dus_dir = saga.advert.directory(dus_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n \n du_list = dus_dir.list()\n du_full_urls = []\n for i in du_list:\n du_full_urls.append(dus_url + \"/\" + i) \n return du_full_urls", "metadata": "root.AdvertCoordinationAdaptor.list_du", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 206 }, { "content": " @classmethod\n def delete_du(cls, du_url):\n du_url = cls.__get_url(du_url)\n du_dir = saga.advert.directory(saga.url(du_url), \n saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.ReadWrite)\n du_dir.remove(du_url, saga.name_space.Recursive) ", "metadata": "root.AdvertCoordinationAdaptor.delete_du", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 222 }, { "content": " @classmethod\n def get_pds_url(cls, application_url, pds_id):\n pds_url = application_url+AdvertCoordinationAdaptor.PILOT_DATA_SERVICE_PATH+\"/\"+pds_id \n logger.debug(\"PDS URL: %s\"%(pds_url))\n return pds_url", "metadata": "root.AdvertCoordinationAdaptor.get_pds_url", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 236 }, { "content": " @classmethod\n def get_cds_url(cls, application_url, cds_id):\n cds_url = application_url+AdvertCoordinationAdaptor.COMPUTE_DATA_SERVICE_PATH+\"/\"+cds_id \n logger.debug(\"CDS URL: %s\"%(cds_url))\n return cds_url", "metadata": "root.AdvertCoordinationAdaptor.get_cds_url", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 242 }, { "content": " @classmethod\n def __get_url(cls, url):\n \"\"\" appends advert querystring for dbtype to url \"\"\"\n url = url + AdvertCoordinationAdaptor.BASE_URL_QUERY_STRING\n return url", "metadata": "root.AdvertCoordinationAdaptor.__get_url", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 251 }, { "content": " @classmethod\n def __remove_dbtype(cls, url):\n surl = saga.url(url)\n surl.query = \"\" \n return surl.get_string()", "metadata": "root.AdvertCoordinationAdaptor.__remove_dbtype", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 257 }, { "content": " @classmethod\n def __store_entry(cls, entry_url, content):\n entry_url = cls.__get_url(entry_url)\n \n # directory is recursively created\n entry = saga.advert.entry(saga.url(entry_url),\n saga.advert.Create | \n saga.advert.CreateParents | saga.advert.ReadWrite)\n entry.store_string(json.dumps(content))\n #logger.debug(\"Store Advert entry at: \" + entry_url \n # + \" Content: \" + str(json.dumps(content)))", "metadata": "root.AdvertCoordinationAdaptor.__store_entry", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 263 }, { "content": " @classmethod\n def __retrieve_entry(cls, entry_url):\n entry_url = cls.__get_url(entry_url)\n #logger.debug(\"Retrieve Advert entry at: \" + entry_url)\n # directory is recursively created\n entry = saga.advert.entry(saga.url(entry_url),\n saga.advert.Create | \n saga.advert.CreateParents | saga.advert.ReadWrite)\n content = json.loads(entry.retrieve_string())\n #logger.debug(\"Retrieve Advert entry at: \" + entry_url \n # + \" Content: \" + str(json.dumps(content)))\n return content", "metadata": "root.AdvertCoordinationAdaptor.__retrieve_entry", "header": "['class', 'AdvertCoordinationAdaptor', ':', '___EOS___']", "index": 275 } ]
[ { "span": "import pdb", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 10 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sag", "a_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pdb_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "pilot", "_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "big", "job_", "import_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Big", "Data", " ", "persist", "s", " ", "its", " ", "data", " ", "in", " ", "a", " ", "central", " ", "data", " ", "space", ",", " ", "e", ".", "g", ".", " ", "the", " ", "Advert", " ", "service", "\\", "10", ";", " ", " ", " ", " ", "to", " ", "facilit", "ate", " ", "distributed", " ", "coordin", "ation", ":", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "adver", "t", "://", "adver", "t", ".", "cct", ".", "ls", "u", ".", "edu", "/", "pilot", "/", "3d", "0d", "596", "0", "-", "296", "d", "-1", "1e1", "-", "889", "6", "-0", "026", "4a", "13", "ca", "4c", "/", "data", "/", " ", "=>", " ", "namespace", " ", "for", " ", "pilot", " ", "data", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "adver", "t", "://", "adver", "t", ".", "cct", ".", "ls", "u", ".", "edu", "/", "pilot", "/", "3d", "0d", "596", "0", "-", "296", "d", "-1", "1e1", "-", "889", "6", "-0", "026", "4a", "13", "ca", "4c", "/", "data", "/", "pd", "s", " ", "=>", " ", "pilot", " ", "data", " ", "service", "\\", "10", ";", " ", " ", " ", " ", "adver", "t", "://", "adver", "t", ".", "cct", ".", "ls", "u", ".", "edu", "/", "pilot", "/", "3d", "0d", "596", "0", "-", "296", "d", "-1", "1e1", "-", "889", "6", "-0", "026", "4a", "13", "ca", "4c", "/", "data", "/", "pd", "s", "/", "pilot", "-", "data", "-", "description", " ", " ", "=>", " ", "pilot", " ", "data", " ", "description", "\\", "10", ";", " ", " ", " ", " ", "...", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "adver", "t", "://", "adver", "t", ".", "cct", ".", "ls", "u", ".", "edu", "/", "pilot", "/", "3d", "0d", "596", "0", "-", "296", "d", "-1", "1e1", "-", "889", "6", "-0", "026", "4a", "13", "ca", "4c", "/", "data", "/", "pd", "s", "/", " ", "=>", " ", "pilot", " ", "store", " ", "service", "\\", "10", ";", " ", " ", " ", " ", "adver", "t", "://", "adver", "t", ".", "cct", ".", "ls", "u", ".", "edu", "/", "pilot", "/", "3d", "0d", "596", "0", "-", "296", "d", "-1", "1e1", "-", "889", "6", "-0", "026", "4a", "13", "ca", "4c", "/", "data", "/", "pd", "s", "/", "pilot", "-", "data", "-", "description", " ", "=>", " ", "pilot", " ", "data", " ", "description", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "class", " ", "is", " ", "state", "less", " ", "-", " ", "the", " ", "applica", "tion", "'", "s", " ", "base", "\\u", "url", " ", "need", "s", " ", "to", " ", "be", " ", "pass", "ed", " ", "int", "o", " ", "every", " ", "method", ".", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "BASE", "\\u", "URL_", "=_", "\"", "adver", "t", "://", "local", "host", "/\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "BASE", "\\u", "URL", "\\u", "QUE", "RY", "\\u", "STRING_", "=_", "\"?", "dbt", "ype", "=", "sql", "ite", "3", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "PI", "LOT", "\\u", "PATH_", "=_", "\"", "pilot", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "PI", "LOT", "\\u", "DATA", "\\u", "PATH_", "=_", "PI", "LOT", "\\u", "PATH_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "PI", "LOT", "\\u", "DATA", "\\u", "SERV", "ICE", "\\u", "PATH_", "=_", "PI", "LOT", "\\u", "DATA", "\\u", "PATH_", "+_", "\"/", "pd", "s", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "DATA", "\\u", "UNIT", "\\u", "SERV", "ICE", "\\u", "PATH_", "=_", "PI", "LOT", "\\u", "DATA", "\\u", "PATH_", "+_", "\"/", "dus", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "COMPUTE", "\\u", "DATA", "\\u", "SERV", "ICE", "\\u", "PATH_", "=_", "PI", "LOT", "\\u", "DATA", "\\u", "PATH_", "+_", "\"/", "cds", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Construct", " ", "a", " ", "base", " ", "url", " ", "for", " ", "an", " ", "application_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Pilo", "t", " ", "Stor", "e", " ", "Service", " ", "relate", "d", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Pilo", "t", " ", "Data", " ", "relate", "d", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Compute", " ", "Data", " ", "Service", " ", "relate", "d", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "Data", " ", "Unit", " ", "relate", "d", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "URL", " ", "Twe", "aki", "ng_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "internal", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "base", "\\u", "url_", "(_", "cls_", ",_", "applica", "tion", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sur", "l_", "=_", "sag", "a_", "._", "url_", "(_", "cls_", "._", "BASE", "\\u", "URL_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "base", "\\u", "url_", "=_", "sur", "l_", "._", "scheme_", "+_", "\":", "//", "\"_", "+_", "sur", "l_", "._", "host_", "+_", "\"/\"_", "+_", "applica", "tion", "\\u", "id_", "+_", "\"/\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logging_", "._", "debug_", "(_", "base", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "base", "\\u", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "add", "\\u", "pd", "s_", "(_", "cls_", ",_", "applica", "tion", "\\u", "url_", ",_", "pd", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", "=_", "cls_", "._", "get", "\\u", "pd", "s", "\\u", "url_", "(_", "applica", "tion", "\\u", "url_", ",_", "pd", "s_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "s", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "pd", "s", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "Creat", "e", " ", "PD", "S", " ", "director", "y", " ", "at", " ", "%", "s", "\"_", "%_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "pd", "s", "\\u", "url_", ",_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "pd", "s", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "delete", "\\u", "pd", "s_", "(_", "cls_", ",_", "pd", "s", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "s", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "sag", "a_", "._", "url_", "(_", "pd", "s", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "s", "\\u", "dir_", "._", "remove_", "(_", "pd", "s", "\\u", "url_", ",_", "sag", "a_", "._", "name", "\\u", "space_", "._", "Recursive", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "add", "\\u", "pd_", "(_", "cls_", ",_", "pd", "s", "\\u", "url_", ",_", "pd_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "url_", "=_", "pd", "s", "\\u", "url_", "+_", "\"/\"_", "+_", "pd_", "._", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "description", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "pd", "\\u", "url_", "+_", "\"/", "description", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "PD", "S", " ", "URL", ":", " ", "%", "s", ",", " ", "PD", " ", "Descripti", "on", " ", "URL", ":", " ", "%", "s", "\"_", "%_", "(_", "pd", "s", "\\u", "url_", ",_", "pd", "\\u", "description", "\\u", "url_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "director", "y", " ", "is", " ", "recurs", "ively", " ", "created_", "\\u\\u\\uNL\\u\\u\\u_", "pd", "\\u", "desc", "\\u", "entry_", "=_", "sag", "a_", "._", "adver", "t_", "._", "entry_", "(_", "sag", "a_", "._", "url_", "(_", "pd", "\\u", "description", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "initialize", "d", " ", "adver", "t", " ", "entry", " ", "for", " ", "pd", "s", ":", " ", "\"_", "+_", "pd", "\\u", "description", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "desc", "\\u", "entry_", "._", "store", "\\u", "string_", "(_", "json_", "._", "dumps_", "(_", "pd_", "._", "data\\u", "unit", "\\u", "description_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "pd", "\\u", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "update", "\\u", "pd_", "(_", "cls_", ",_", "pd_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "len_", "(_", "pd_", "._", "data\\u", "units_", ")_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "du", "\\u", "urls_", "=_", "[_", "i_", "._", "url_", "for_", "i_", "in_", "pd_", "._", "data\\u", "units_", "._", "values_", "(_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "pd_", "._", "url_", ")_", "+_", "\"/", "data", "-", "unit", "s", "\"_", ",_", "du", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "pd_", "._", "url_", ")_", "+_", "\"/", "pilot", "-", "data", "\"_", ",_", "pd_", "._", "to", "\\u", "dict_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "pd_", "(_", "cls_", ",_", "pd", "s", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "debug_", "(_", "\"", "GET", " ", "PD", ":", " ", "\"_", "+_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "pd", "\\u", "dict", "[\"", "pilot", "\\u", "data", "\"", " ", "]=", " ", " ", "cls", ".\\u", "\\u", "retrieve", "\\u", "entry", "(", "cls", ".\\u", "\\u", "remove", "\\u", "dbt", "ype", "(", "pd", "s", "\\u", "url", ")+", "\"/", "pilot", "-", "data", "\")", "_", "\\u\\u\\uNL\\u\\u\\u_", "pd", "\\u", "dict_", "[_", "\"", "pilot", "\\u", "data", "\"_", "]_", "=_", "cls_", "._", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "pd", "s", "\\u", "url_", ")_", "+_", "\"/", "pilot", "-", "data", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "pd", "\\u", "dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "list", "\\u", "pd_", "(_", "cls_", ",_", "pd", "s", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "return", " ", "a", " ", "list", " ", "of", " ", "urls", " ", "to", " ", "pd", " ", "manage", "d", " ", "by", " ", "the", " ", "PD", "S", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "s", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "List", " ", "PD", " ", "at", " ", "%", "s", "\"_", "%_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "s", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "pd", "s", "\\u", "url_", ",_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pd", "\\u", "list_", "=_", "pd", "s", "\\u", "dir_", "._", "list_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "full", "\\u", "urls_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "pd", "\\u", "list_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "\\u", "full", "\\u", "urls_", "._", "append_", "(_", "pd", "s", "\\u", "url_", "+_", "\"/\"_", "+_", "i_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "pd", "\\u", "full", "\\u", "urls_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "delete", "\\u", "pd_", "(_", "cls_", ",_", "pd", "s", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "pd", "s", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "sag", "a_", "._", "url_", "(_", "pd", "s", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pd", "\\u", "dir_", "._", "remove_", "(_", "pd", "s", "\\u", "url_", ",_", "sag", "a_", "._", "name", "\\u", "space_", "._", "Recursive", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "add", "\\u", "cds", "_", "(_", "cls_", ",_", "applica", "tion", "\\u", "url_", ",_", "cds", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cds", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", "=_", "cls_", "._", "get", "\\u", "cds", "\\u", "url_", "(_", "applica", "tion", "\\u", "url_", ",_", "cds", "_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cds", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "cds", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "Creat", "e", " ", "CD", "S", " ", "director", "y", " ", "at", " ", "%", "s", "\"_", "%_", "cds", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "cds", "\\u", "url_", ",_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "cds", "\\u", "url", "\\u", "no", "\\u", "dbt", "ype_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "update", "\\u", "cds", "_", "(_", "cls_", ",_", "cds", "\\u", "url_", ",_", "cds", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Stor", "age", " ", "and", " ", "Compute", " ", "Resources_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "urls_", "=_", "[_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "i_", "._", "url_", ")_", "for_", "i_", "in_", "cds", "_", "._", "pilot", "\\u", "data\\u", "services_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cds", "\\u", "url_", ")_", "+_", "\"/", "pd", "s", "/\"_", ",_", "pd", "s", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pj", "s", "\\u", "urls_", "=_", "[_", "i_", "._", "url_", "for_", "i_", "in_", "cds", "_", "._", "pilot", "\\u", "job", "\\u", "services_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cds", "\\u", "url_", ")_", "+_", "\"/", "cds", "/\"_", ",_", "pj", "s", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "currentl", "y", " ", "manage", "d", " ", "PD", "s", " ", "and", " ", "WU", "s_", "\\u\\u\\uNL\\u\\u\\u_", "pd", "\\u", "urls_", "=_", "[_", "i_", "._", "url_", "for_", "i_", "in_", "cds", "_", "._", "data\\u", "units_", "._", "values_", "(_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cds", "\\u", "url_", ")_", "+_", "\"/", "du", "/\"_", ",_", "pd", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "wu", "\\u", "urls_", "=_", "[_", "i_", "._", "url_", "for_", "i_", "in_", "cds", "_", "._", "compute", "\\u", "units_", "._", "values_", "(_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cds", "\\u", "url_", ")_", "+_", "\"/", "cu", "/\"_", ",_", "wu", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "delete", "\\u", "cds", "_", "(_", "cls_", ",_", "cds", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cds", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cds", "\\u", "url_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cds", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "sag", "a_", "._", "url_", "(_", "cds", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "cds", "\\u", "dir", ".", "remove", "(", "cds", "\\u", "url", ",", " ", "sag", "a", ".", "name", "\\u", "space", ".", "Recursive", ")_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "add", "\\u", "du_", "(_", "cls_", ",_", "dus", "\\u", "url_", ",_", "du_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "du", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "dus", "\\u", "url_", ")_", "+_", "\"/\"_", "+_", "du_", "._", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "du", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "director", "y", " ", "is", " ", "recurs", "ively", " ", "created_", "\\u\\u\\uNL\\u\\u\\u_", "#", "sag", "a", ".", "adver", "t", ".", "director", "y", "(", "sag", "a", ".", "url", "(", "du", "\\u", "url", "),", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", " ", "sag", "a", ".", "adver", "t", ".", "Creat", "e", " ", "|", " ", "sag", "a", ".", "adver", "t", ".", "Creat", "e", "Parent", "s", " ", "|", " ", "sag", "a", ".", "adver", "t", ".", "Read", "Write", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "logg", "er", ".", "debug", "(\"", "initialize", "d", " ", "adver", "t", " ", "entry", " ", "for", " ", "dus", ":", " ", "\"", " ", "+", " ", "du", "\\u", "url", ")_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "du", "\\u", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "du_", "(_", "cls_", ",_", "du", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "debug_", "(_", "\"****", " ", "GET", " ", "PD", ":", " ", "\"_", "+_", "du", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dict_", "[_", "\"", "data\\u", "unit", "\\u", "description", "\"_", "]_", "=_", "cls_", "._", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du", "\\u", "url_", ")_", "+_", "\"/", "description", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dict_", "[_", "\"", "state", "\"_", "]_", "=_", "cls_", "._", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du", "\\u", "url_", ")_", "+_", "\"/", "state", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dict_", "[_", "\"", "data\\u", "unit", "s", "\"_", "]_", "=_", "cls_", "._", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du", "\\u", "url_", ")_", "+_", "\"/", "data", "-", "unit", "s", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dict_", "[_", "\"", "pilot", "\\u", "data", "\"_", "]_", "=_", "cls_", "._", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du", "\\u", "url_", ")_", "+_", "\"/", "pilot", "-", "data", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "Open", " ", "pilot", " ", "data", " ", "at", ":", " ", "\"_", "+_", "du", "\\u", "url_", "+_", "\"", " ", "State", ":", " ", "\"_", "+_", "str_", "(_", "du", "\\u", "dict_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "du", "\\u", "dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "update", "\\u", "du_", "(_", "cls_", ",_", "du_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "debug_", "(_", "\"****", " ", "Update", " ", "pilot", " ", "data", " ", "at", ":", " ", "\"_", "+_", "du_", "._", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du_", "._", "url_", ")_", "+_", "\"/", "description", "\"_", ",_", "du_", "._", "data\\u", "unit", "\\u", "description_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du_", "._", "url_", ")_", "+_", "\"/", "state", "\"_", ",_", "du_", "._", "state_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "du", "\\u", "urls_", "=_", "[_", "i_", "._", "url_", "for_", "i_", "in_", "du_", "._", "pilot", "\\u", "data_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du_", "._", "url_", ")_", "+_", "\"/", "pilot", "-", "data", "\"_", ",_", "du", "\\u", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "du", "\\u", "dict", "\\u", "list_", "=_", "[_", "i_", "._", "to", "\\u", "dict_", "(_", ")_", "for_", "i_", "in_", "du_", "._", "data\\u", "unit", "\\u", "items_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cls_", "._", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", "._", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "du_", "._", "url_", ")_", "+_", "\"/", "data", "-", "unit", "s", "\"_", ",_", "du", "\\u", "dict", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "list", "\\u", "du_", "(_", "cls_", ",_", "dus", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "return", " ", "a", " ", "list", " ", "of", " ", "urls", " ", "to", " ", "du", " ", "manage", "d", " ", "by", " ", "the", " ", "PD", "S", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dus", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "dus", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "List", " ", "PD", "S", " ", "at", " ", "%", "s", "\"_", "%_", "dus", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dus", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "dus", "\\u", "url_", ",_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "du", "\\u", "list_", "=_", "dus", "\\u", "dir_", "._", "list_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "full", "\\u", "urls_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "du", "\\u", "list_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "du", "\\u", "full", "\\u", "urls_", "._", "append_", "(_", "dus", "\\u", "url_", "+_", "\"/\"_", "+_", "i_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "du", "\\u", "full", "\\u", "urls_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "delete", "\\u", "du_", "(_", "cls_", ",_", "du", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "du", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "du", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dir_", "=_", "sag", "a_", "._", "adver", "t_", "._", "directory_", "(_", "sag", "a_", "._", "url_", "(_", "du", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "du", "\\u", "dir_", "._", "remove_", "(_", "du", "\\u", "url_", ",_", "sag", "a_", "._", "name", "\\u", "space_", "._", "Recursive", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "pd", "s", "\\u", "url_", "(_", "cls_", ",_", "applica", "tion", "\\u", "url_", ",_", "pd", "s", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pd", "s", "\\u", "url_", "=_", "applica", "tion", "\\u", "url_", "+_", "Advert", "Coordinat", "ion", "Adapt", "or_", "._", "PI", "LOT", "\\u", "DATA", "\\u", "SERV", "ICE", "\\u", "PATH_", "+_", "\"/\"_", "+_", "pd", "s", "\\u", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "PD", "S", " ", "URL", ":", " ", "%", "s", "\"_", "%_", "(_", "pd", "s", "\\u", "url_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "pd", "s", "\\u", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "cds", "\\u", "url_", "(_", "cls_", ",_", "applica", "tion", "\\u", "url_", ",_", "cds", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cds", "\\u", "url_", "=_", "applica", "tion", "\\u", "url_", "+_", "Advert", "Coordinat", "ion", "Adapt", "or_", "._", "COMPUTE", "\\u", "DATA", "\\u", "SERV", "ICE", "\\u", "PATH_", "+_", "\"/\"_", "+_", "cds", "\\u", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "CD", "S", " ", "URL", ":", " ", "%", "s", "\"_", "%_", "(_", "cds", "\\u", "url_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "cds", "\\u", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "get", "\\u", "url_", "(_", "cls_", ",_", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "append", "s", " ", "adver", "t", " ", "querystring", " ", "for", " ", "dbt", "ype", " ", "to", " ", "url", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "url_", "+_", "Advert", "Coordinat", "ion", "Adapt", "or_", "._", "BASE", "\\u", "URL", "\\u", "QUE", "RY", "\\u", "STRING_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "remove", "\\u", "dbt", "ype_", "(_", "cls_", ",_", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sur", "l_", "=_", "sag", "a_", "._", "url_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sur", "l_", "._", "query_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "sur", "l_", "._", "get", "\\u", "string_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "store", "\\u", "entry_", "(_", "cls_", ",_", "entry", "\\u", "url_", ",_", "content_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "entry", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "entry", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "director", "y", " ", "is", " ", "recurs", "ively", " ", "created_", "\\u\\u\\uNL\\u\\u\\u_", "entry_", "=_", "sag", "a_", "._", "adver", "t_", "._", "entry_", "(_", "sag", "a_", "._", "url_", "(_", "entry", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "entry_", "._", "store", "\\u", "string_", "(_", "json_", "._", "dumps_", "(_", "content_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "logg", "er", ".", "debug", "(\"", "Stor", "e", " ", "Advert", " ", "entry", " ", "at", ":", " ", "\"", " ", "+", " ", "entry", "\\u", "url", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", " ", " ", "+", " ", "\"", " ", "Conten", "t", ":", " ", "\"", " ", "+", " ", "str", "(", "json", ".", "dump", "s", "(", "content", ")))", "_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Advert", "Coordinat", "ion", "Adapt", "or_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "retrieve", "\\u", "entry_", "(_", "cls_", ",_", "entry", "\\u", "url_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "entry", "\\u", "url_", "=_", "cls_", "._", "\\u\\u", "get", "\\u", "url_", "(_", "entry", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "logg", "er", ".", "debug", "(\"", "Retrieve", " ", "Advert", " ", "entry", " ", "at", ":", " ", "\"", " ", "+", " ", "entry", "\\u", "url", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "director", "y", " ", "is", " ", "recurs", "ively", " ", "created_", "\\u\\u\\uNL\\u\\u\\u_", "entry_", "=_", "sag", "a_", "._", "adver", "t_", "._", "entry_", "(_", "sag", "a_", "._", "url_", "(_", "entry", "\\u", "url_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Create_", "|_", "\\u\\u\\uNL\\u\\u\\u_", "sag", "a_", "._", "adver", "t_", "._", "Creat", "e", "Parent", "s_", "|_", "sag", "a_", "._", "adver", "t_", "._", "Read", "Write_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "content_", "=_", "json_", "._", "loads_", "(_", "entry_", "._", "retrieve", "\\u", "string_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "logg", "er", ".", "debug", "(\"", "Retrieve", " ", "Advert", " ", "entry", " ", "at", ":", " ", "\"", " ", "+", " ", "entry", "\\u", "url", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", " ", " ", "+", " ", "\"", " ", "Conten", "t", ":", " ", "\"", " ", "+", " ", "str", "(", "json", ".", "dump", "s", "(", "content", ")))", "_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "content_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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tuples specified at construction time.\n \"\"\"\n self.connection_error = False\n sleep_exp = 1\n connect_count = 0\n\n while self.running and self.socket is None and connect_count < self.__reconnect_attempts_max:\n for host_and_port in self.__host_and_ports:\n try:\n log.info(\"Attempting connection to host %s, port %s\", host_and_port[0], host_and_port[1])\n self.socket = get_socket(host_and_port[0], host_and_port[1], self.__timeout)\n self.__enable_keepalive()\n need_ssl = self.__need_ssl(host_and_port)\n\n if need_ssl: # wrap socket\n ssl_params = self.get_ssl(host_and_port)\n if ssl_params['ca_certs']:\n cert_validation = ssl.CERT_REQUIRED\n else:\n cert_validation = ssl.CERT_NONE\n self.socket = ssl.wrap_socket(\n self.socket,\n keyfile=ssl_params['key_file'],\n certfile=ssl_params['cert_file'],\n cert_reqs=cert_validation,\n ca_certs=ssl_params['ca_certs'],\n ssl_version=ssl_params['ssl_version'])\n\n self.socket.settimeout(self.__timeout)\n\n if self.blocking is not None:\n self.socket.setblocking(self.blocking)\n\n #\n # Validate server cert\n #\n if need_ssl and ssl_params['cert_validator']:\n cert = self.socket.getpeercert()\n (ok, errmsg) = ssl_params['cert_validator'](cert, host_and_port[0])\n if not ok:\n raise SSLError(\"Server certificate validation failed: %s\", errmsg)\n\n self.current_host_and_port = host_and_port\n log.info(\"Established connection to host %s, port %s\", host_and_port[0], host_and_port[1])\n break\n except socket.error:\n self.socket = None\n connect_count += 1\n log.warning(\"Could not connect to host %s, port %s\", host_and_port[0], host_and_port[1], exc_info=1)\n\n if self.socket is None:\n sleep_duration = (min(self.__reconnect_sleep_max,\n ((self.__reconnect_sleep_initial / (1.0 + self.__reconnect_sleep_increase))\n * math.pow(1.0 + self.__reconnect_sleep_increase, sleep_exp)))\n * (1.0 + random.random() * self.__reconnect_sleep_jitter))\n sleep_end = monotonic() + sleep_duration\n log.debug(\"Sleeping for %.1f seconds before attempting reconnect\", sleep_duration)\n while self.running and monotonic() < sleep_end:\n time.sleep(0.2)\n\n if sleep_duration < self.__reconnect_sleep_max:\n sleep_exp += 1\n\n if not self.socket:\n raise exception.ConnectFailedException()", "metadata": "root.Transport.attempt_connection", "header": "['class', 'Transport', '(', 'BaseTransport', ')', ':', '___EOS___']", "index": 643 } ]
[ { "span": "raise SSLError(\"Server certificate validation failed: %s\", errmsg)", "start_line": 685, "start_column": 28, "end_line": 685, "end_column": 94 } ]
[]
1
true
[ "[CLS]_", "Il", "lega", "l_", "raise_", "[SEP]_", "class_", "Transport_", "(_", "Base", "Transport_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "atte", "mpt", "\\u", "connection_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Tr", "y", " ", "connecti", "ng", " ", "to", " ", "the", " ", "(", "host", ",", " ", "port", ")", " ", "tuple", "s", " ", "specified", " ", "at", " ", "constructi", "on", " ", "time", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "connecti", "on", "\\u", "error_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sleep", "\\u", "exp_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "connect", "\\u", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "while_", "self_", "._", "running_", "and_", "self_", "._", "socket_", "is_", "None_", "and_", "connect", "\\u", "count_", "<_", "self_", "._", "\\u\\u", "reconnect", "\\u", "atte", "mpt", "s", "\\u", "max_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "host", "\\u", "and", "\\u", "port_", "in_", "self_", "._", "\\u\\u", "host", "\\u", "and", "\\u", "ports_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "log_", "._", "info_", "(_", "\"", "Atte", "mpt", "ing", " ", "connecti", "on", " ", "to", " ", "host", " ", "%", "s", ",", " ", "port", " ", "%", "s", "\"_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "0_", "]_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "socket_", "=_", "get", "\\u", "socket_", "(_", "host", "\\u", "and", "\\u", "port_", "[_", "0_", "]_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "1_", "]_", ",_", "self_", "._", "\\u\\u", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u\\u", "enable", "\\u", "keepalive", "_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "need", "\\u", "ssl_", "=_", "self_", "._", "\\u\\u", "need", "\\u", "ssl_", "(_", "host", "\\u", "and", "\\u", "port_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "need", "\\u", "ssl_", ":_", "#", " ", "wrap", " ", "socket_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "ssl", "\\u", "params_", "=_", "self_", "._", "get", "\\u", "ssl_", "(_", "host", "\\u", "and", "\\u", "port_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ssl", "\\u", "params_", "[_", "'", "ca", "\\u", "cert", "s", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "cert", "\\u", "validation_", "=_", "ssl_", "._", "CERT", "\\u", "REQUIRED_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "cert", "\\u", "validation_", "=_", "ssl_", "._", "CERT", "\\u", "NONE_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "socket_", "=_", "ssl_", "._", "wrap", "\\u", "socket_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "socket_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "keyfile_", "=_", "ssl", "\\u", "params_", "[_", "'", "key", "\\u", "file", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "certfile", "_", "=_", "ssl", "\\u", "params_", "[_", "'", "cert", "\\u", "file", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "cert", "\\u", "reqs_", "=_", "cert", "\\u", "validation_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ca", "\\u", "certs_", "=_", "ssl", "\\u", "params_", "[_", "'", "ca", "\\u", "cert", "s", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ssl", "\\u", "version_", "=_", "ssl", "\\u", "params_", "[_", "'", "ssl", "\\u", "version", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "socket_", "._", "settimeout_", "(_", "self_", "._", "\\u\\u", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "blocking_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "self_", "._", "socket_", "._", "setb", "locking_", "(_", "self_", "._", "blocking_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Validate", " ", "server", " ", "cert_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "need", "\\u", "ssl_", "and_", "ssl", "\\u", "params_", "[_", "'", "cert", "\\u", "validator", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "cert_", "=_", "self_", "._", "socket_", "._", "getp", "eer", "cert_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "(_", "ok_", ",_", "errmsg_", ")_", "=_", "ssl", "\\u", "params_", "[_", "'", "cert", "\\u", "validator", "'_", "]_", "(_", "cert_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "ok_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "raise_", "SS", "LE", "rror_", "(_", "\"", "Server", " ", "certifica", "te", " ", "validation", " ", "fail", "ed", ":", " ", "%", "s", "\"_", ",_", "errmsg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "current", "\\u", "host", "\\u", "and", "\\u", "port_", "=_", "host", "\\u", "and", "\\u", "port_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "log_", "._", "info_", "(_", "\"", "Esta", "blis", "hed", " ", "connecti", "on", " ", "to", " ", "host", " ", "%", "s", ",", " ", "port", " ", "%", "s", "\"_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "0_", "]_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "socket_", "._", "error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "socket_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "connect", "\\u", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "log_", "._", "warning_", "(_", "\"", "Cou", "ld", " ", "not", " ", "connect", " ", "to", " ", "host", " ", "%", "s", ",", " ", "port", " ", "%", "s", "\"_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "0_", "]_", ",_", "host", "\\u", "and", "\\u", "port_", "[_", "1_", "]_", ",_", "exc", "\\u", "info_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "self_", "._", "socket_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sleep", "\\u", "duration_", "=_", "(_", "min_", "(_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "max_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "(_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "initial_", "/_", "(_", "1.0_", "+_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "increase", "_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "*_", "math_", "._", "pow_", "(_", "1.0_", "+_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "increase", "_", ",_", "sleep", "\\u", "exp_", ")_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "*_", "(_", "1.0_", "+_", "random_", "._", "random_", "(_", ")_", "*_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "jitter_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sleep", "\\u", "end_", "=_", "monotonic", "_", "(_", ")_", "+_", "sleep", "\\u", "duration_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "log_", "._", "debug_", "(_", "\"", "Sleep", "ing", " ", "for", " ", "%", ".1", "f", " ", "second", "s", " ", "bef", "ore", " ", "atte", "mpt", "ing", " ", "reconnect", "\"_", ",_", "sleep", "\\u", "duration_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "self_", "._", "running_", "and_", "monotonic", "_", "(_", ")_", "<_", "sleep", "\\u", "end_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "time_", "._", "sleep_", "(_", "0.2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "sleep", "\\u", "duration_", "<_", "self_", "._", "\\u\\u", "reconnect", "\\u", "sleep", "\\u", "max_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "sleep", "\\u", "exp_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "self_", "._", "socket_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "exception_", "._", "Connect", "Fail", "ed", "Exception_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
modflowpy/flopy/autotest/t015_test.py
[ { "content": "__author__ = 'aleaf'\n\n#import sys\n#sys.path.append('/Users/aleaf/Documents/GitHub/flopy3')\nimport os\nimport matplotlib\nmatplotlib.use('agg')\nimport flopy\nimport pytest\n\nprint(os.getcwd())\n\nif os.path.split(os.getcwd())[-1] == 'flopy3':\n path = os.path.join('examples', 'data', 'mf2005_test')\nelse:\n path = os.path.join('..', 'examples', 'data', 'mf2005_test')\n\nstr_items = {0: {'mfnam': 'str.nam',\n 'sfrfile': 'str.str'}}\n\n\nif __name__ == '__main__':\n test_str_plot()", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def test_str_plot():\n\n m = flopy.modflow.Modflow.load(str_items[0]['mfnam'], model_ws=path, verbose=True)\n assert isinstance(m.str.plot()[0], matplotlib.axes.Axes)", "metadata": "root.test_str_plot", "header": "['module', '___EOS___']", "index": 20 } ]
[ { "span": "import pytest", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 13 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u", "author\\u\\u_", "=_", "'", "ale", "af", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "import", " ", "sys_", "\\u\\u\\uNL\\u\\u\\u_", "#", "sys", ".", "path", ".", "append", "('", "/", "User", "s", "/", "ale", "af", "/", "Document", "s", "/", "Git", "Hub", "/", "flop", "y", "3", "')", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "matplotlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "matplotlib_", "._", "use_", "(_", "'", "agg", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "flop", "y_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pytest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "(_", "os_", "._", "getcwd_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "os_", "._", "path_", "._", "split_", "(_", "os_", "._", "getcwd_", "(_", ")_", ")_", "[_", "-_", "1_", "]_", "==_", "'", "flop", "y", "3", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "os_", "._", "path_", "._", "join_", "(_", "'", "example", "s", "'_", ",_", "'", "data", "'_", ",_", "'", "mf", "2005", "\\u", "test", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "os_", "._", "path_", "._", "join_", "(_", "'..'_", ",_", "'", "example", "s", "'_", ",_", "'", "data", "'_", ",_", "'", "mf", "2005", "\\u", "test", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "str", "\\u", "items_", "=_", "{_", "0_", ":_", "{_", "'", "mf", "nam", "'_", ":_", "'", "str", ".", "nam", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "sfr", "file", "'_", ":_", "'", "str", ".", "str", "'_", "}_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test\\u", "str", "\\u", "plot_", "(_", ")_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "str", "\\u", "plot_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "flop", "y_", "._", "mod", "flow_", "._", "Mod", "flow_", "._", "load_", "(_", "str", "\\u", "items_", "[_", "0_", "]_", "[_", "'", "mf", "nam", "'_", "]_", ",_", "model", "\\u", "ws_", "=_", "path_", ",_", "verbose_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_",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jasonbot/arcrest/arcrest/server.py
[ { "content": " def _get_subfolder(self, foldername, returntype,\n params=None, file_data=None):\n \"\"\"Return an object of the requested type with the path relative\n to the current object's URL. Optionally, query parameters\n may be set.\"\"\"\n newurl = compat.urljoin(self.url, compat.quote(foldername), False)\n\n params = params or {}\n file_data = file_data or {}\n\n # Add the key-value pairs sent in params to query string if they\n # are so defined.\n query_dict = {}\n url_tuple = compat.urlsplit(newurl)\n urllist = list(url_tuple)\n\n if params:\n # As above, pull out first element from parse_qs' values\n query_dict = dict((k, v[0]) for k, v in \n cgi.parse_qs(urllist[3]).items())\n for key, val in params.items():\n # Lowercase bool string\n if isinstance(val, bool):\n query_dict[key] = str(val).lower()\n # Special case: convert an envelope to .bbox in the bb\n # parameter\n elif isinstance(val, geometry.Envelope):\n query_dict[key] = val.bbox\n # Another special case: strings can't be quoted/escaped at the\n # top level\n elif isinstance(val, gptypes.GPString):\n query_dict[key] = val.value\n # Just use the wkid of SpatialReferences\n elif isinstance(val, geometry.SpatialReference): \n query_dict[key] = val.wkid\n # If it's a list, make it a comma-separated string\n elif isinstance(val, (list, tuple, set)):\n val = \",\".join([str(v.id) \n if isinstance(v, Layer)\n else str(v) for v in val])\n # If it's a dictionary, dump as JSON\n elif isinstance(val, dict):\n val = json.dumps(val)\n # Ignore null values, and coerce string values (hopefully\n # everything sent in to a query has a sane __str__)\n elif val is not None:\n query_dict[key] = str(val)\n if self.__token__ is not None:\n query_dict['token'] = self.__token__\n query_dict[REQUEST_REFERER_MAGIC_NAME] = self._referer or self.url\n # Replace URL query component with newly altered component\n urllist[3] = compat.urlencode(query_dict)\n newurl = urllist\n # Instantiate new RestURL or subclass\n rt = returntype(newurl, file_data)\n # Remind the resource where it came from\n try:\n rt.parent = self\n except:\n rt._parent = self\n return rt", "metadata": "root.RestURL._get_subfolder", "header": "['class', 'RestURL', '(', 'object', ')', ':', '___EOS___']", "index": 111 } ]
[ { "span": "except:", "start_line": 169, "start_column": 8, "end_line": 169, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Rest", "URL_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "get", "\\u", "subfolder", "_", "(_", "self_", ",_", "folder", "name_", ",_", "return", "type_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "params_", "=_", "None_", ",_", "file", "\\u", "data_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Return", " ", "an", " ", "object", " ", "of", " ", "the", " ", "request", "ed", " ", "type", " ", "with", " ", "the", " ", "path", " ", "relative", "\\", "10", ";", " ", " ", " ", "to", " ", "the", " ", "current", " ", "object", "'", "s", " ", "URL", ".", " ", "Optio", "nal", "ly", ",", " ", "query", " ", "parameter", "s", "\\", "10", ";", " ", " ", " ", "may", " ", "be", " ", "set", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "newu", "rl_", "=_", "compat_", "._", "urljoin_", "(_", "self_", "._", "url_", ",_", "compat_", "._", "quote_", "(_", "folder", "name_", ")_", ",_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "params_", "=_", "params_", "or_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "file", "\\u", "data_", "=_", "file", "\\u", "data_", "or_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "the", " ", "key", "-", "value", " ", "pair", "s", " ", "sent", " ", "in", " ", "params", " ", "to", " ", "query", " ", "string", " ", "if", " ", "the", "y_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "are", " ", "so", " ", "defin", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "query", "\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url", "\\u", "tuple_", "=_", "compat_", "._", "urlsplit_", "(_", "newu", "rl_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url", "list_", "=_", "list_", "(_", "url", "\\u", "tuple_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "params_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "As", " ", "above", ",", " ", "pull", " ", "out", " ", "first", " ", "element", " ", "from", " ", "parse", "\\u", "qs", "'", " ", "values_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "query", "\\u", "dict_", "=_", "dict_", "(_", "(_", "k_", ",_", "v_", "[_", "0_", "]_", ")_", "for_", "k_", ",_", "v_", "in_", "\\u\\u\\uNL\\u\\u\\u_", "cgi_", "._", "parse", "\\u", "qs_", "(_", "url", "list_", "[_", "3_", "]_", ")_", "._", "items_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "key_", ",_", "val_", "in_", "params_", "._", "items_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Lower", "case", " ", "bool", " ", "string_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "val_", ",_", "bool_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "query", "\\u", "dict_", "[_", "key_", "]_", "=_", "str_", "(_", "val_", ")_", "._", "lower_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Special", " ", "case", ":", " ", "convert", " ", "an", " ", "envelop", "e", " ", "to", " ", ".", "bbox", " ", "in", " ", "the", " ", "bb_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "parameter_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "val_", ",_", "geometry_", "._", "Env", "elope", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "query", "\\u", "dict_", "[_", "key_", "]_", "=_", "val_", "._", "bbox_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Ano", "ther", " ", "special", " ", "case", ":", " ", "string", "s", " ", "can", "'", "t", " ", "be", " ", "quoted", "/", "escaped", " ", "at", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "top", " ", "level_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "val_", ",_", "gp", "types_", "._", "GPS", "tring_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "query", "\\u", "dict_", "[_", "key_", "]_", "=_", "val_", "._", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Ju", "st", " ", "use", " ", "the", " ", "wk", "id", " ", "of", " ", "Spa", "tial", "Reference", "s_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "val_", ",_", "geometry_", "._", "Spa", "tial", "Reference_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "query", "\\u", "dict_", "[_", "key_", "]_", "=_", "val_", "._", "wk", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "If", " ", "it", "'", "s", " ", "a", " ", "list", ",", " ", "make", " ", "it", " ", "a", " ", "comma", "-", "separate", "d", " ", "string_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "val_", ",_", "(_", "list_", ",_", "tuple_", ",_", "set_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "val_", "=_", "\",\"_", "._", "join_", "(_", "[_", "str_", "(_", "v_", "._", "id_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "v_", ",_", "Layer_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "else_", "str_", "(_", "v_", ")_", "for_", "v_", "in_", "val_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "If", " ", "it", "'", "s", " ", "a", " ", "dictionar", "y", ",", " ", "dump", " ", "as", " ", "JSON_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "val_", ",_", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "val_", "=_", "json_", "._", "dumps_", "(_", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Ignor", "e", " ", "null", " ", "values", ",", " ", "and", " ", "coerce", " ", "string", " ", "values", " ", "(", "hop", "efu", "ll", "y_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "every", "thing", " ", "sent", " ", "in", " ", "to", " ", "a", " ", "query", " ", "has", " ", "a", " ", "sane", " ", "\\u\\u", "str", "\\u\\u)", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "val_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "query", "\\u", "dict_", "[_", "key_", "]_", "=_", "str_", "(_", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "self_", "._", "\\u\\u", "token", "\\u\\u_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "query", "\\u", "dict_", "[_", "'", "token", "'_", "]_", "=_", "self_", "._", "\\u\\u", "token", "\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "query", "\\u", "dict_", "[_", "REQUEST", "\\u", "REFE", "RER", "\\u", "MAGIC", "\\u", "NAME_", "]_", "=_", "self_", "._", "\\u", "referer_", "or_", "self_", "._", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Replace", " ", "URL", " ", "query", " ", "component", " ", "with", " ", "newl", "y", " ", "alter", "ed", " ", "component_", "\\u\\u\\uNL\\u\\u\\u_", "url", "list_", "[_", "3_", "]_", "=_", "compat_", "._", "urlencode_", "(_", "query", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "newu", "rl_", "=_", "url", "list_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Instantiate", " ", "new", " ", "Rest", "URL", " ", "or", " ", "subclass_", "\\u\\u\\uNL\\u\\u\\u_", "rt_", "=_", "return", "type_", "(_", "newu", "rl_", ",_", "file", "\\u", "data_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Remi", "nd", " ", "the", " ", "resource", " ", "where", " ", "it", " ", "came", " ", "from_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "rt_", "._", "parent_", "=_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "rt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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
lisa-lab/pylearn2/pylearn2/datasets/tests/test_adult.py
[ { "content": "\"\"\"\nTest code for adult.py\n=======\nTesting class that simply checks to see if the adult dataset\nis loadable\n\"\"\"\nimport numpy\nfrom pylearn2.datasets.adult import adult\nfrom pylearn2.testing.skip import skip_if_no_data\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def test_adult():\n \"\"\"\n Tests if it will work correctly for train and test set.\n \"\"\"\n skip_if_no_data()\n adult_train = adult(which_set='train')\n assert (adult_train.X >= 0.).all()\n assert adult_train.y.dtype == bool\n assert adult_train.X.shape == (30162, 104)\n assert adult_train.y.shape == (30162, 1)\n\n adult_test = adult(which_set='test')\n assert (adult_test.X >= 0.).all()\n assert adult_test.y.dtype == bool\n assert adult_test.X.shape == (15060, 103)\n assert adult_test.y.shape == (15060, 1)", "metadata": "root.test_adult", "header": "['module', '___EOS___']", "index": 11 } ]
[ { "span": "import numpy", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 12 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Test", " ", "code", " ", "for", " ", "adult", ".", "py", "\\", "10", ";", "=======", "\\", "10", ";", "Test", "ing", " ", "class", " ", "tha", "t", " ", "simp", "ly", " ", "checks", " ", "to", " ", "see", " ", "if", " ", "the", " ", "adult", " ", "dataset", "\\", "10", ";", "is", " ", "loada", "ble", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "datasets_", "._", "adult", "_", "import_", "adult", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyl", "earn", "2_", "._", "testing_", "._", "skip_", "import_", "skip", "\\u", "if", "\\u", "no", "\\u", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "adult", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "if", " ", "it", " ", "will", " ", "work", " ", "correct", "ly", " ", "for", " ", "train", " ", "and", " ", "test", " ", "set", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "skip", "\\u", "if", "\\u", "no", "\\u", "data_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "adult", "\\u", "train_", "=_", "adult", "_", "(_", "whi", "ch", "\\u", "set_", "=_", "'", "train", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "(_", "adult", "\\u", "train_", "._", "X_", ">=_", "0._", ")_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "train_", "._", "y_", "._", "dtype_", "==_", "bool_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "train_", "._", "X_", "._", "shape_", "==_", "(_", "301", "62_", ",_", "104_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "train_", "._", "y_", "._", "shape_", "==_", "(_", "301", "62_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "adult", "\\u", "test_", "=_", "adult", "_", "(_", "whi", "ch", "\\u", "set_", "=_", "'", "test", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "(_", "adult", "\\u", "test_", "._", "X_", ">=_", "0._", ")_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "test_", "._", "y_", "._", "dtype_", "==_", "bool_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "test_", "._", "X_", "._", "shape_", "==_", "(_", "150", "60_", ",_", "103_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "adult", "\\u", "test_", "._", "y_", "._", "shape_", "==_", "(_", "150", "60_", ",_", "1_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
Stiivi/brewery/brewery/nodes/record_nodes.py
[ { "content": " def __init__(self, keys=None, measures=None, default_aggregations=None,\n record_count_field=\"record_count\"):\n \"\"\"Creates a new node for aggregations. Supported aggregations: sum, avg, min, max\"\"\"\n\n super(AggregateNode, self).__init__()\n if default_aggregations is None:\n default_aggregations= [\"sum\"]\n if keys:\n self.key_fields = keys\n else:\n self.key_fields = []\n\n self.aggregations = {}\n self.record_count_field = record_count_field\n self.measures = measures or []", "metadata": "root.AggregateNode.__init__", "header": "['class', 'AggregateNode', '(', 'Node', ')', ':', '___EOS___']", "index": 496 } ]
[ { "span": "default_aggregations=", "start_line": 502, "start_column": 12, "end_line": 502, "end_column": 32 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Aggregate", "Node_", "(_", "Node_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "keys_", "=_", "None_", ",_", "measures_", "=_", "None_", ",_", "default", "\\u", "aggregation", "s_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "record", "\\u", "count", "\\u", "field_", "=_", "\"", "record", "\\u", "count", "\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Creat", "es", " ", "a", " ", "new", " ", "node", " ", "for", " ", "aggregation", "s", ".", " ", "Supp", "orte", "d", " ", "aggregation", "s", ":", " ", "sum", ",", " ", "avg", ",", " ", "min", ",", " ", "max", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Aggregate", "Node_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "default", "\\u", "aggregation", "s_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "default", "\\u", "aggregation", "s_", "=_", "[_", "\"", "sum", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "keys_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "key", "\\u", "fields_", "=_", "keys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "key", "\\u", "fields_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "aggregation", "s_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "record", "\\u", "count", "\\u", "field_", "=_", "record", "\\u", "count", "\\u", "field_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "measures_", "=_", "measures_", "or_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Imprecise assert
spotify/luigi/test/test_ssh.py
[ { "content": " def test_subprocess_delegation(self):\n \"\"\" Test subprocess call structure using mock module \"\"\"\n orig_Popen = subprocess.Popen\n self.last_test = None\n\n def Popen(cmd, **kwargs):\n self.last_test = cmd\n\n subprocess.Popen = Popen\n context = RemoteContext(\n \"some_host\",\n username=\"luigi\",\n key_file=\"/some/key.pub\"\n )\n context.Popen([\"ls\"])\n self.assertTrue(\"ssh\" in self.last_test)\n self.assertTrue(\"-i\" in self.last_test)\n self.assertTrue(\"/some/key.pub\" in self.last_test)\n self.assertTrue(\"luigi@some_host\" in self.last_test)\n self.assertTrue(\"ls\" in self.last_test)\n\n subprocess.Popen = orig_Popen", "metadata": "root.TestMockedRemoteContext.test_subprocess_delegation", "header": "['class', 'TestMockedRemoteContext', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 25 } ]
[ { "span": "self.assertTrue(\"ssh\" in self.last_test)", "start_line": 40, "start_column": 8, "end_line": 40, "end_column": 48 }, { "span": "self.assertTrue(\"-i\" in self.last_test)", "start_line": 41, "start_column": 8, "end_line": 41, "end_column": 47 }, { "span": "self.assertTrue(\"/some/key.pub\" in self.last_test)", "start_line": 42, "start_column": 8, "end_line": 42, "end_column": 58 }, { "span": "self.assertTrue(\"luigi@some_host\" in self.last_test)", "start_line": 43, "start_column": 8, "end_line": 43, "end_column": 60 }, { "span": "self.assertTrue(\"ls\" in self.last_test)", "start_line": 44, "start_column": 8, "end_line": 44, "end_column": 47 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Mocke", "d", "Remo", "te", "Context_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "subproc", "ess", "\\u", "delegat", "ion_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "subproc", "ess", " ", "call", " ", "structure", " ", "usi", "ng", " ", "mock", " ", "module", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "orig", "\\u", "Popen_", "=_", "subprocess_", "._", "Popen_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "last", "\\u", "test_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "Popen_", "(_", "cmd_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "last", "\\u", "test_", "=_", "cmd_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "subprocess_", "._", "Popen_", "=_", "Popen_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "context_", "=_", "Remo", "te", "Context_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "some", "\\u", "host", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "\"", "lui", "gi", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key", "\\u", "file_", "=_", "\"/", "some", "/", "key", ".", "pub", "\"_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "context_", "._", "Popen_", "(_", "[_", "\"", "ls", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "ssh", "\"_", "in_", "self_", "._", "last", "\\u", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"-", "i", "\"_", "in_", "self_", "._", "last", "\\u", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"/", "some", "/", "key", ".", "pub", "\"_", "in_", "self_", "._", "last", "\\u", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "lui", "gi", "@", "some", "\\u", "host", "\"_", "in_", "self_", "._", "last", "\\u", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "\"", "ls", "\"_", "in_", "self_", "._", "last", "\\u", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "subprocess_", "._", "Popen_", "=_", "orig", "\\u", "Popen_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
dsiroky/snakemq/tests/performance/packeter_multiple_small.py
[ { "content": "#!/usr/bin/env python\n\"\"\"\nSend many small packets over a single connection.\n\n@author: David Siroky ([email protected])\n@license: MIT License (see LICENSE.txt or \n U{http://www.opensource.org/licenses/mit-license.php})\n\"\"\"\n\nimport time\nimport logging\nimport sys\nimport os\nimport cProfile as profile\n\nsys.path.insert(0, \"../..\")\n\nimport snakemq\nimport snakemq.link\nimport snakemq.packeter\n\n###########################################################################\n\nDATA_SIZE = 5\nCOUNT = 100000\nPORT = 4000\n\n###########################################################################\n\n\n###########################################################################\n\n\n###########################################################################\n\n# avoid logging overhead\nlogger = logging.getLogger(\"snakemq\")\nlogger.setLevel(logging.ERROR)\n\nif os.fork() > 0:\n srv()\nelse:\n cli()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def srv():\n s = snakemq.link.Link()\n container = {\"start_time\": None, \"count\": 0}\n\n def on_connect(conn_id):\n container[\"start_time\"] = time.time()\n\n def on_packet_recv(conn_id, packet):\n assert len(packet) == DATA_SIZE\n container[\"count\"] += 1\n\n def on_disconnect(conn_id):\n diff = time.time() - container[\"start_time\"]\n print \"flow: %.02f MBps, %i pkts/s\" % (DATA_SIZE * COUNT / diff / 1024**2,\n COUNT / diff)\n s.stop()\n\n s.add_listener((\"\", PORT))\n tr = snakemq.packeter.Packeter(s)\n tr.on_connect = on_connect\n tr.on_packet_recv = on_packet_recv\n tr.on_disconnect = on_disconnect\n s.loop()\n s.cleanup()\n assert container[\"count\"] == COUNT", "metadata": "root.srv", "header": "['module', '___EOS___']", "index": 29 }, { "content": "def cli():\n s = snakemq.link.Link()\n container = {\"count\": 0}\n\n def on_connect(conn_id):\n for i in xrange(COUNT):\n tr.send_packet(conn_id, \"x\" * DATA_SIZE)\n\n def on_packet_sent(conn_id, packet_id):\n container[\"count\"] += 1\n if container[\"count\"] == COUNT:\n s.stop()\n\n s.add_connector((\"localhost\", PORT))\n tr = snakemq.packeter.Packeter(s)\n tr.on_connect = on_connect\n tr.on_packet_sent = on_packet_sent\n #profile.runctx(\"s.loop()\", globals(), locals(), \"/tmp/prof_cli.dat\")\n s.loop()\n s.cleanup()", "metadata": "root.cli", "header": "['module', '___EOS___']", "index": 57 } ]
[ { "span": "import cProfile as profile", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 26 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Sen", "d", " ", "many", " ", "small", " ", "packet", "s", " ", "over", " ", "a", " ", "single", " ", "connecti", "on", ".", "\\", "10", ";", "\\", "10", ";", "@", "author", ":", " ", "Dav", "id", " ", "Si", "rok", "y", " ", "(", "sir", "ok", "y", "@", "das", "ir", ".", "cz", ")", "\\", "10", ";", "@", "license", ":", " ", "MIT", " ", "License", " ", "(", "see", " ", "LICENSE", ".", "txt", " ", "or", " ", "\\", "10", ";", " ", " ", "U", "{", "http", "://", "www", ".", "opens", "ource", ".", "org", "/", "license", "s", "/", "mit", "-", "license", ".", "php", "})", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "c", "Profile_", "as_", "profile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "sys_", "._", "path_", "._", "insert_", "(_", "0_", ",_", "\"../..", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "snake", "mq", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "snake", "mq", "_", "._", "link_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "snake", "mq", "_", "._", "packet", "er_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "DATA", "\\u", "SIZE_", "=_", "5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "COUNT_", "=_", "100000_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "PORT_", "=_", "4000_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "avoid", " ", "logg", "ing", " ", "overhead", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "logger_", "=_", "logging_", "._", "get", "Logger_", "(_", "\"", "snake", "mq", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "set", "Level_", "(_", "logging_", "._", "ERROR_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "os_", "._", "fork_", "(_", ")_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "srv_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cli_", "(_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "srv_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s_", "=_", "snake", "mq", "_", "._", "link_", "._", "Link_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "container_", "=_", "{_", "\"", "start", "\\u", "time", "\"_", ":_", "None_", ",_", "\"", "count", "\"_", ":_", "0_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "on", "\\u", "connect_", "(_", "conn", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "container_", "[_", "\"", "start", "\\u", "time", "\"_", "]_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "on", "\\u", "packet", "\\u", "recv_", "(_", "conn", "\\u", "id_", ",_", "packet_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "len_", "(_", "packet_", ")_", "==_", "DATA", "\\u", "SIZE_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "container_", "[_", "\"", "count", "\"_", "]_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "on", "\\u", "disconnect_", "(_", "conn", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "diff_", "=_", "time_", "._", "time_", "(_", ")_", "-_", "container_", "[_", "\"", "start", "\\u", "time", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"", "flow", ":", " ", "%", ".02", "f", " ", "MB", "ps", ",", " ", "%", "i", " ", "pkts", "/", "s", "\"_", "%_", "(_", "DATA", "\\u", "SIZE_", "*_", "COUNT_", "/_", "diff_", "/_", "1024_", "**_", "2_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "COUNT_", "/_", "diff_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "s_", "._", "add", "\\u", "listener_", "(_", "(_", "\"\"_", ",_", "PORT_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "=_", "snake", "mq", "_", "._", "packet", "er_", "._", "Packe", "ter_", "(_", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "._", "on", "\\u", "connect_", "=_", "on", "\\u", "connect_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "._", "on", "\\u", "packet", "\\u", "recv_", "=_", "on", "\\u", "packet", "\\u", "recv_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "._", "on", "\\u", "disconnect_", "=_", "on", "\\u", "disconnect_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "._", "loop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "._", "cleanup_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "container_", "[_", "\"", "count", "\"_", "]_", "==_", "COUNT_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cli_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s_", "=_", "snake", "mq", "_", "._", "link_", "._", "Link_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "container_", "=_", "{_", "\"", "count", "\"_", ":_", "0_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "on", "\\u", "connect_", "(_", "conn", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "i_", "in_", "xrange_", "(_", "COUNT_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tr_", "._", "send", "\\u", "packet_", "(_", "conn", "\\u", "id_", ",_", "\"", "x", "\"_", "*_", "DATA", "\\u", "SIZE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "on", "\\u", "packet", "\\u", "sent_", "(_", "conn", "\\u", "id_", ",_", "packet", "\\u", "id_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "container_", "[_", "\"", "count", "\"_", "]_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "container_", "[_", "\"", "count", "\"_", "]_", "==_", "COUNT_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "s_", "._", "add", "\\u", "connector_", "(_", "(_", "\"", "local", "host", "\"_", ",_", "PORT_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "=_", "snake", "mq", "_", "._", "packet", "er_", "._", "Packe", "ter_", "(_", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "._", "on", "\\u", "connect_", "=_", "on", "\\u", "connect_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tr_", "._", "on", "\\u", "packet", "\\u", "sent_", "=_", "on", "\\u", "packet", "\\u", "sent_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "profile", ".", "runc", "tx", "(\"", "s", ".", "loop", "()\"", ",", " ", "globals", "()", ",", " ", "locals", "()", ",", " ", "\"/", "tmp", "/", "prof", "\\u", "cli", ".", "dat", "\")", "_", "\\u\\u\\uNL\\u\\u\\u_", "s_", "._", "loop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "._", "cleanup_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
splunk/splunk-webframework/server/splunkdj/auth/backends.py
[ { "content": "from django.contrib.auth.models import AbstractUser\nfrom splunklib.client import connect, Service\nimport requests\nimport os, time\n\nfrom django.conf import settings\nfrom encryption import SimplerAES\n\nimport logging\n\nlogger = logging.getLogger('spl.django.service')\n\naes = SimplerAES(settings.SECRET_KEY)\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def get_splunkweb_url(path):\n splunkweb_mount = \"\"\n if settings.SPLUNK_WEB_MOUNT:\n splunkweb_mount = \"%s/\" % settings.SPLUNK_WEB_MOUNT\n \n return \"%s://%s:%s/%s%s\" % (settings.SPLUNK_WEB_SCHEME, settings.SPLUNK_WEB_HOST, settings.SPLUNK_WEB_PORT, splunkweb_mount, path)", "metadata": "root.get_splunkweb_url", "header": "['module', '___EOS___']", "index": 14 }, { "content": "def logout_user(cookies, username):\n try:\n logger.info(\"%s logging out.\"% username)\n r1 = requests.get(\n get_splunkweb_url(\"account/logout\"),\n allow_redirects=True,\n cookies=cookies)\n except Exception, e:\n logger.exception(e)\n pass", "metadata": "root.logout_user", "header": "['module', '___EOS___']", "index": 21 }, { "content": "class SplunkUser(AbstractUser):\n ", "metadata": "root.SplunkUser", "header": "['module', '___EOS___']", "index": 32 }, { "content": " def __init__(self, id=None, splunkweb=None, service=None, tz=None, realname=\"\", is_free=False, *args, **kwargs):\n super(SplunkUser, self).__init__(*args, **kwargs)\n \n self.id = id\n self.splunkweb = splunkweb\n self.realname = realname\n self.service = service\n self.tz = tz\n self.is_free = is_free", "metadata": "root.SplunkUser.__init__", "header": "['class', 'SplunkUser', '(', 'AbstractUser', ')', ':', '___EOS___']", "index": 33 }, { "content": " def save(self, *args, **kwargs):\n #TODO:remove if implemented\n logger.debug(\"Failed to save SplunkUser: Function not implemented.\")\n pass", "metadata": "root.SplunkUser.save", "header": "['class', 'SplunkUser', '(', 'AbstractUser', ')', ':', '___EOS___']", "index": 43 }, { "content": "class SplunkWebInfo(object):", "metadata": "root.SplunkWebInfo", "header": "['module', '___EOS___']", "index": 48 }, { "content": " def __init__(self, cookies):\n self.session_id = cookies['session_id_%s' % settings.SPLUNK_WEB_PORT]\n self.cval = cookies['cval']\n self.uid = cookies['uid']", "metadata": "root.SplunkWebInfo.__init__", "header": "['class', 'SplunkWebInfo', '(', 'object', ')', ':', '___EOS___']", "index": 49 }, { "content": "def get_user(username, token):\n if not username or not token:\n return None\n \n user = None\n properties = {}\n is_free = False\n try:\n service = Service(\n username=username, \n token=token, \n scheme=settings.SPLUNKD_SCHEME,\n host=settings.SPLUNKD_HOST,\n port=settings.SPLUNKD_PORT\n )\n \n server_info = service.info\n \n if (server_info.get('isFree', '0') == '0'):\n user = service.users[username]\n properties = user.content()\n else: \n is_free = True\n properties = {\n \"email\": \"[email protected]\",\n \"roles\": [\"admin\"],\n \"realname\": \"Administrator\",\n \"tz\": None\n }\n \n except Exception, e:\n if hasattr(e, 'status') and e.status == 401:\n logger.error(\"Failed to get user: %s. Server returned 401: Unauthorized.\" % username)\n return None\n elif settings.DEBUG:\n logger.exception(e)\n raise\n else:\n logger.exception(e)\n return None\n \n \n user_id = \"%s:%s\" % (username, token)\n user_id = aes.encrypt(str(user_id))\n \n return SplunkUser(\n id=user_id,\n service=service,\n username=username,\n email=properties[\"email\"],\n is_superuser=\"admin\" in properties[\"roles\"],\n is_staff=\"admin\" in properties[\"roles\"],\n is_active=True,\n is_free=is_free,\n realname=properties[\"realname\"],\n tz=properties['tz']\n )", "metadata": "root.get_user", "header": "['module', '___EOS___']", "index": 54 }, { "content": "class SplunkAuthenticationBackend(object):\n supports_inactive_user = False\n \n ", "metadata": "root.SplunkAuthenticationBackend", "header": "['module', '___EOS___']", "index": 112 }, { "content": " def authenticate(self, username=None, password=None, *args, **kwargs): \n try:\n logger.info(\"%s attempting to connect to Splunk server at %s:%s\"%\n (username, settings.SPLUNKD_HOST, settings.SPLUNKD_PORT) ) \n service = connect(\n username=username,\n password=password,\n scheme=settings.SPLUNKD_SCHEME,\n host=settings.SPLUNKD_HOST,\n port=settings.SPLUNKD_PORT\n )\n except Exception, e:\n if hasattr(e, 'status') and e.status == 401:\n logger.error(\"Failed to connect. Server returned 401: Unauthorized.\" % username)\n return None\n else:\n logger.exception(e)\n raise\n \n user = service.users[username]\n properties = user.content()\n user_id = \"%s:%s\" % (username, service.token)\n user_id = aes.encrypt(str(user_id))\n \n splunkweb_info = None\n \n try:\n r1 = requests.get(\n get_splunkweb_url(\"account/login\"),\n allow_redirects=True)\n \n cval = r1.cookies['cval']\n r = requests.post(\n r1.url,\n cookies=r1.cookies,\n data={\"username\":username, \"password\":password, \"cval\":cval})\n \n splunkweb_info = SplunkWebInfo(r.cookies)\n except Exception, e:\n logger.exception(e)\n pass\n \n # TODO: We need to find a better way to do this, specifically,\n # the way we pass the session_id, which are the Splunkweb cookie\n # values, is a hack.\n return SplunkUser(\n id=user_id,\n splunkweb=splunkweb_info,\n service=service,\n username=username, \n password=password, \n email=properties[\"email\"],\n is_superuser=\"admin\" in properties[\"roles\"],\n is_staff=\"admin\" in properties[\"roles\"],\n is_active=True,\n realname=properties[\"realname\"],\n tz=properties['tz']\n )", "metadata": "root.SplunkAuthenticationBackend.authenticate", "header": "['class', 'SplunkAuthenticationBackend', '(', 'object', ')', ':', '___EOS___']", "index": 115 }, { "content": " def get_user(self, user_id, *args, **kwargs):\n username = None\n token = None\n try:\n user_id = aes.decrypt(user_id)\n parts = user_id.split(\":\")\n username = parts[0]\n token = parts[1]\n except Exception, e:\n logger.exception(e)\n return None\n \n return get_user(username, token)", "metadata": "root.SplunkAuthenticationBackend.get_user", "header": "['class', 'SplunkAuthenticationBackend', '(', 'object', ')', ':', '___EOS___']", "index": 174 } ]
[ { "span": "import os, time", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "contrib_", "._", "auth_", "._", "models_", "import_", "Abstract", "User_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "splu", "nk", "lib_", "._", "client_", "import_", "connect_", ",_", "Service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "requests_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", ",_", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "django_", "._", "conf_", "import_", "settings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "encryption_", "import_", "Simple", "r", "AES_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "logger_", "=_", "logging_", "._", "get", "Logger_", "(_", "'", "spl", ".", "django", ".", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "aes", "_", "=_", "Simple", "r", "AES_", "(_", "settings_", "._", "SEC", "RET", "\\u", "KEY_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get", "\\u", "splu", "nk", "web", "\\u", "url_", "(_", "path_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "splu", "nk", "web", "\\u", "mount_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "MOUNT", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "splu", "nk", "web", "\\u", "mount_", "=_", "\"%", "s", "/\"_", "%_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "MOUNT", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\"%", "s", "://", "%", "s", ":", "%", "s", "/", "%", "s", "%", "s", "\"_", "%_", "(_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "SCHEME", "_", ",_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "HOST_", ",_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "PORT_", ",_", "splu", "nk", "web", "\\u", "mount_", ",_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "logo", "ut", "\\u", "user_", "(_", "cookies_", ",_", "username_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "info_", "(_", "\"%", "s", " ", "logg", "ing", " ", "out", ".\"_", "%_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "r1_", "=_", "requests_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "get", "\\u", "splu", "nk", "web", "\\u", "url_", "(_", "\"", "account", "/", "logo", "ut", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "allow", "\\u", "redirects_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "cookies_", "=_", "cookies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Spl", "unk", "User_", "(_", "Abstract", "User_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Spl", "unk", "User_", "(_", "Abstract", "User_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "id_", "=_", "None_", ",_", "splu", "nk", "web_", "=_", "None_", ",_", "service_", "=_", "None_", ",_", "tz_", "=_", "None_", ",_", "real", "name_", "=_", "\"\"_", ",_", "is", "\\u", "free_", "=_", "False_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Spl", "unk", "User_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "id_", "=_", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "splu", "nk", "web_", "=_", "splu", "nk", "web_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "real", "name_", "=_", "real", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "service_", "=_", "service_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tz_", "=_", "tz_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "is", "\\u", "free_", "=_", "is", "\\u", "free_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Spl", "unk", "User_", "(_", "Abstract", "User_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "save_", "(_", "self_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "TOD", "O", ":", "remove", " ", "if", " ", "implemented", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "debug_", "(_", "\"", "Fail", "ed", " ", "to", " ", "save", " ", "Spl", "unk", "User", ":", " ", "Function", " ", "not", " ", "implemented", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Spl", "unk", "Web", "Info_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Spl", "unk", "Web", "Info_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "cookies_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "session", "\\u", "id_", "=_", "cookies_", "[_", "'", "session", "\\u", "id", "\\u", "%", "s", "'_", "%_", "settings_", "._", "SPL", "UNK", "\\u", "WEB", "\\u", "PORT_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "cval", "_", "=_", "cookies_", "[_", "'", "cval", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "uid_", "=_", "cookies_", "[_", "'", "uid", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "user_", "(_", "username_", ",_", "token_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "username_", "or_", "not_", "token_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "properties_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "is", "\\u", "free_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "service_", "=_", "Service_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "token_", "=_", "token_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "scheme_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "SCHEME", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "host_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "HOST_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "port_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "PORT_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "server", "\\u", "info_", "=_", "service_", "._", "info_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "(_", "server", "\\u", "info_", "._", "get_", "(_", "'", "is", "Free", "'_", ",_", "'", "0", "'_", ")_", "==_", "'", "0", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "service_", "._", "users_", "[_", "username_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "properties_", "=_", "user_", "._", "content_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "is", "\\u", "free_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "properties_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "email", "\"_", ":_", "\"", "nous", "er", "@", "splu", "nk", "free", ".", "com", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "role", "s", "\"_", ":_", "[_", "\"", "admin", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "real", "name", "\"_", ":_", "\"", "Administra", "tor", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "tz", "\"_", ":_", "None_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "hasattr_", "(_", "e_", ",_", "'", "status", "'_", ")_", "and_", "e_", "._", "status_", "==_", "401_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "error_", "(_", "\"", "Fail", "ed", " ", "to", " ", "get", " ", "user", ":", " ", "%", "s", ".", " ", "Server", " ", "return", "ed", " ", "401", ":", " ", "Una", "uthor", "ize", "d", ".\"_", "%_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "settings_", "._", "DEBUG_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user", "\\u", "id_", "=_", "\"%", "s", ":", "%", "s", "\"_", "%_", "(_", "username_", ",_", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "id_", "=_", "aes", "_", "._", "encrypt_", "(_", "str_", "(_", "user", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Spl", "unk", "User_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "id_", "=_", "user", "\\u", "id_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "service_", "=_", "service_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "email_", "=_", "properties_", "[_", "\"", "email", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "superuser_", "=_", "\"", "admin", "\"_", "in_", "properties_", "[_", "\"", "role", "s", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "staff_", "=_", "\"", "admin", "\"_", "in_", "properties_", "[_", "\"", "role", "s", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "active_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "free_", "=_", "is", "\\u", "free_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "real", "name_", "=_", "properties_", "[_", "\"", "real", "name", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "tz_", "=_", "properties_", "[_", "'", "tz", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Spl", "unk", "Auth", "entica", "tion", "Backend_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "support", "s", "\\u", "inact", "ive", "\\u", "user_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Spl", "unk", "Auth", "entica", "tion", "Backend_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "authenticate_", "(_", "self_", ",_", "username_", "=_", "None_", ",_", "password_", "=_", "None_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "info_", "(_", "\"%", "s", " ", "atte", "mpt", "ing", " ", "to", " ", "connect", " ", "to", " ", "Spl", "unk", " ", "server", " ", "at", " ", "%", "s", ":", "%", "s", "\"_", "%_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "username_", ",_", "settings_", "._", "SPL", "UNK", "D", "\\u", "HOST_", ",_", "settings_", "._", "SPL", "UNK", "D", "\\u", "PORT_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "service_", "=_", "connect_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "password_", "=_", "password_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "scheme_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "SCHEME", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "host_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "HOST_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "port_", "=_", "settings_", "._", "SPL", "UNK", "D", "\\u", "PORT_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "hasattr_", "(_", "e_", ",_", "'", "status", "'_", ")_", "and_", "e_", "._", "status_", "==_", "401_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "error_", "(_", "\"", "Fail", "ed", " ", "to", " ", "connect", ".", " ", "Server", " ", "return", "ed", " ", "401", ":", " ", "Una", "uthor", "ize", "d", ".\"_", "%_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user_", "=_", "service_", "._", "users_", "[_", "username_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "properties_", "=_", "user_", "._", "content_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "id_", "=_", "\"%", "s", ":", "%", "s", "\"_", "%_", "(_", "username_", ",_", "service_", "._", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user", "\\u", "id_", "=_", "aes", "_", "._", "encrypt_", "(_", "str_", "(_", "user", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "splu", "nk", "web", "\\u", "info_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "r1_", "=_", "requests_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "get", "\\u", "splu", "nk", "web", "\\u", "url_", "(_", "\"", "account", "/", "login", "\"_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "allow", "\\u", "redirects_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cval", "_", "=_", "r1_", "._", "cookies_", "[_", "'", "cval", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "r_", "=_", "requests_", "._", "post_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "r1_", "._", "url_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "cookies_", "=_", "r1_", "._", "cookies_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "data_", "=_", "{_", "\"", "user", "name", "\"_", ":_", "username_", ",_", "\"", "password", "\"_", ":_", "password_", ",_", "\"", "cval", "\"_", ":_", "cval", "_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "splu", "nk", "web", "\\u", "info_", "=_", "Spl", "unk", "Web", "Info_", "(_", "r_", "._", "cookies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "We", " ", "need", " ", "to", " ", "find", " ", "a", " ", "bett", "er", " ", "way", " ", "to", " ", "do", " ", "this", ",", " ", "specifica", "ll", "y", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "the", " ", "way", " ", "we", " ", "pass", " ", "the", " ", "session", "\\u", "id", ",", " ", "whi", "ch", " ", "are", " ", "the", " ", "Spl", "unk", "web", " ", "cookie_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "values", ",", " ", "is", " ", "a", " ", "hack", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "Spl", "unk", "User_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "id_", "=_", "user", "\\u", "id_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "splu", "nk", "web_", "=_", "splu", "nk", "web", "\\u", "info_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "service_", "=_", "service_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "username_", "=_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "password_", "=_", "password_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "email_", "=_", "properties_", "[_", "\"", "email", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "superuser_", "=_", "\"", "admin", "\"_", "in_", "properties_", "[_", "\"", "role", "s", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "staff_", "=_", "\"", "admin", "\"_", "in_", "properties_", "[_", "\"", "role", "s", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "is", "\\u", "active_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "real", "name_", "=_", "properties_", "[_", "\"", "real", "name", "\"_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "tz_", "=_", "properties_", "[_", "'", "tz", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Spl", "unk", "Auth", "entica", "tion", "Backend_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "user_", "(_", "self_", ",_", "user", "\\u", "id_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "username_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "token_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "id_", "=_", "aes", "_", "._", "decrypt_", "(_", "user", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "parts_", "=_", "user", "\\u", "id_", "._", "split_", "(_", "\":\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "username_", "=_", "parts_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "token_", "=_", "parts_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "exception_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "get", "\\u", "user_", "(_", "username_",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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
openstack/bandit/examples/ciphers.py
[ { "content": "from Crypto.Cipher import ARC2\nfrom Crypto.Cipher import ARC4\nfrom Crypto.Cipher import Blowfish\nfrom Crypto.Cipher import DES\nfrom Crypto.Cipher import XOR\nfrom Crypto.Hash import SHA\nfrom Crypto import Random\nfrom Crypto.Util import Counter\nfrom cryptography.hazmat.primitives.ciphers import Cipher\nfrom cryptography.hazmat.primitives.ciphers import algorithms\nfrom cryptography.hazmat.primitives.ciphers import modes\nfrom cryptography.hazmat.backends import default_backend\nfrom struct import pack\n\nkey = b'Sixteen byte key'\niv = Random.new().read(ARC2.block_size)\ncipher = ARC2.new(key, ARC2.MODE_CFB, iv)\nmsg = iv + cipher.encrypt(b'Attack at dawn')\n\nkey = b'Very long and confidential key'\nnonce = Random.new().read(16)\ntempkey = SHA.new(key+nonce).digest()\ncipher = ARC4.new(tempkey)\nmsg = nonce + cipher.encrypt(b'Open the pod bay doors, HAL')\n\nbs = Blowfish.block_size\nkey = b'An arbitrarily long key'\niv = Random.new().read(bs)\ncipher = Blowfish.new(key, Blowfish.MODE_CBC, iv)\nplaintext = b'docendo discimus '\nplen = bs - divmod(len(plaintext),bs)[1]\npadding = [plen]*plen\npadding = pack('b'*plen, *padding)\nmsg = iv + cipher.encrypt(plaintext + padding)\n\nkey = b'-8B key-'\nnonce = Random.new().read(DES.block_size/2)\nctr = Counter.new(DES.block_size*8/2, prefix=nonce)\ncipher = DES.new(key, DES.MODE_CTR, counter=ctr)\nplaintext = b'We are no longer the knights who say ni!'\nmsg = nonce + cipher.encrypt(plaintext)\n\nkey = b'Super secret key'\ncipher = XOR.new(key)\nplaintext = b'Encrypt me'\nmsg = cipher.encrypt(plaintext)\n\ncipher = Cipher(algorithms.ARC4(key), mode=None, backend=default_backend())\nencryptor = cipher.encryptor()\nct = encryptor.update(b\"a secret message\")\n\ncipher = Cipher(algorithms.Blowfish(key), mode=None, backend=default_backend())\nencryptor = cipher.encryptor()\nct = encryptor.update(b\"a secret message\")\n\ncipher = Cipher(algorithms.IDEA(key), mode=None, backend=default_backend())\nencryptor = cipher.encryptor()\nct = encryptor.update(b\"a secret message\")\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from cryptography.hazmat.primitives.ciphers import modes", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 56 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "Crypto_", "._", "Cipher_", "import_", "ARC", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Cipher_", "import_", "ARC", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Cipher_", "import_", "Blo", "wf", "ish_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Cipher_", "import_", "DES", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Cipher_", "import_", "XO", "R_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Hash_", "import_", "SHA", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "import_", "Random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Crypto_", "._", "Util_", "import_", "Counter_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cryptography", "_", "._", "haz", "mat_", "._", "primitives_", "._", "ciphers", "_", "import_", "Cipher_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cryptography", "_", "._", "haz", "mat_", "._", "primitives_", "._", "ciphers", "_", "import_", "algorithms_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cryptography", "_", "._", "haz", "mat_", "._", "primitives_", "._", "ciphers", "_", "import_", "modes_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "cryptography", "_", "._", "haz", "mat_", "._", "backends_", "import_", "default", "\\u", "backend_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "struct_", "import_", "pack_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "b", "'", "Six", "teen", " ", "byte", " ", "key", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "iv_", "=_", "Random_", "._", "new_", "(_", ")_", "._", "read_", "(_", "ARC", "2_", "._", "block", "\\u", "size_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cipher_", "=_", "ARC", "2_", "._", "new_", "(_", "key_", ",_", "ARC", "2_", "._", "MODE", "\\u", "CF", "B_", ",_", "iv_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "iv_", "+_", "cipher_", "._", "encrypt_", "(_", "b", "'", "Attack", " ", "at", " ", "da", "wn", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "b", "'", "Ver", "y", " ", "long", " ", "and", " ", "confi", "denti", "al", " ", "key", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nonce_", "=_", "Random_", "._", "new_", "(_", ")_", "._", "read_", "(_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "temp", "key_", "=_", "SHA", "_", "._", "new_", "(_", "key_", "+_", "nonce_", ")_", "._", "digest_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cipher_", "=_", "ARC", "4_", "._", "new_", "(_", "temp", "key_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "nonce_", "+_", "cipher_", "._", "encrypt_", "(_", "b", "'", "Open", " ", "the", " ", "pod", " ", "bay", " ", "door", "s", ",", " ", "HAL", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "bs_", "=_", "Blo", "wf", "ish_", "._", "block", "\\u", "size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "b", "'", "An", " ", "arbitra", "ri", "ly", " ", "long", " ", "key", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "iv_", "=_", "Random_", "._", "new_", "(_", ")_", "._", "read_", "(_", "bs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cipher_", "=_", "Blo", "wf", "ish_", "._", "new_", "(_", "key_", ",_", "Blo", "wf", "ish_", "._", "MODE", "\\u", "CBC", "_", ",_", "iv_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "b", "'", "doc", "endo", " ", "disc", "imu", "s", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plen", "_", "=_", "bs_", "-_", "divmod_", "(_", "len_", "(_", "plaintext_", ")_", ",_", "bs_", ")_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "padding_", "=_", "[_", "plen", "_", "]_", "*_", "plen", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "padding_", "=_", "pack_", "(_", "'", "b", "'_", "*_", "plen", "_", ",_", "*_", "padding_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "iv_", "+_", "cipher_", "._", "encrypt_", "(_", "plaintext_", "+_", "padding_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "b", "'-", "8", "B", " ", "key", "-'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nonce_", "=_", "Random_", "._", "new_", "(_", ")_", "._", "read_", "(_", "DES", "_", "._", "block", "\\u", "size_", "/_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ctr_", "=_", "Counter_", "._", "new_", "(_", "DES", "_", "._", "block", "\\u", "size_", "*_", "8_", "/_", "2_", ",_", "prefix_", "=_", "nonce_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cipher_", "=_", "DES", "_", "._", "new_", "(_", "key_", ",_", "DES", "_", "._", "MODE", "\\u", "CTR", "_", ",_", "counter_", "=_", "ctr_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "b", "'", "We", " ", "are", " ", "no", " ", "long", "er", " ", "the", " ", "knight", "s", " ", "who", " ", "say", " ", "ni", "!'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "nonce_", "+_", "cipher_", "._", "encrypt_", "(_", "plaintext_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "b", "'", "Super", " ", "secret", " ", "key", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cipher_", "=_", "XO", "R_", "._", "new_", "(_", "key_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "b", "'", "Encrypt", " ", "me", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "cipher_", "._", "encrypt_", "(_", "plaintext_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cipher_", "=_", "Cipher_", "(_", "algorithms_", "._", "ARC", "4_", "(_", "key_", ")_", ",_", "mode_", "=_", "None_", ",_", "backend_", "=_", "default", "\\u", "backend_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "encrypt", "or_", "=_", "cipher_", "._", "encrypt", "or_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "encrypt", "or_", "._", "update_", "(_", "b", "\"", "a", " ", "secret", " ", "message", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cipher_", "=_", "Cipher_", "(_", "algorithms_", "._", "Blo", "wf", "ish_", "(_", "key_", ")_", ",_", "mode_", "=_", "None_", ",_", "backend_", "=_", "default", "\\u", "backend_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "encrypt", "or_", "=_", "cipher_", "._", "encrypt", "or_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "encrypt", "or_", "._", "update_", "(_", "b", "\"", "a", " ", "secret", " ", "message", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cipher_", "=_", "Cipher_", "(_", "algorithms_", "._", "IDE", "A_", "(_", "key_", ")_", ",_", "mode_", "=_", "None_", ",_", "backend_", "=_", "default", "\\u", "backend_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "encrypt", "or_", "=_", "cipher_", "._", "encrypt", "or_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "encrypt", "or_", "._", "update_", "(_", "b", "\"", "a", " ", "secret", " ", "message", "\"_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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il\nimport os\nimport hashlib\nimport contextlib\nimport gzip\nimport fnmatch\nimport tarfile\nimport zipfile\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nalpha_tests = [\n (do_test, 'baseline', '2bf250ec4e5dd8bfd73b3ccd0a5ff749569763cf', []),\n (do_test, 'degrief', '2b7eecd5e660f20415413707b4576b1234debfcb', ['degrief']),\n (do_test_match_output, 'analyze', '9cb4aec2ed7a895c3a5d20d6e29e26459e00bd53', ['analyze']),\n (do_test, 'relight', 'f3b3445b0abca1fe2b183bc48b24fb734dfca781', ['relight']),\n (do_test, 'replace', '4e816038f9851817b0d75df948d058143708d2ec', ['replace', 'Water (active)', 'with', 'Lava (active)']),\n (do_test, 'fill', '94566d069edece4ff0cc52ef2d8f877fbe9720ab', ['fill', 'Water (active)']),\n (do_test, 'heightmap', '71c20e7d7e335cb64b3eb0e9f6f4c9abaa09b070', ['heightmap', 'regression_test/mars.png']),\n]\n\nimport optparse\n\nparser = optparse.OptionParser()\nparser.add_option(\"--profile\", help=\"Perform profiling on regression tests\", action=\"store_true\")\n\n\n\n\nif __name__ == '__main__':\n sys.exit(main(sys.argv))\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def main(argv):\n options, args = parser.parse_args(argv)\n\n if len(args) <= 1:\n do_these_regressions = ['*']\n else:\n do_these_regressions = args[1:]\n\n with directory_clone(\"testfiles/AnvilWorld\") as directory:\n test_data = directory\n passes = []\n fails = []\n\n for func, name, sha, args in alpha_tests:\n print \"Starting regression {0} ({1})\".format(name, args)\n\n if any(fnmatch.fnmatch(name, x) for x in do_these_regressions):\n if options.profile:\n print >> sys.stderr, \"Starting to profile to %s.profile\" % name\n os.environ['MCE_PROFILE'] = '%s.profile' % name\n try:\n func(test_data, sha, args)\n except RegressionError, e:\n fails.append(\"Regression {0} failed: {1}\".format(name, e))\n print fails[-1]\n else:\n passes.append(\"Regression {0!r} complete.\".format(name))\n print passes[-1]\n\n print \"{0} tests passed.\".format(len(passes))\n for line in fails:\n print line", "metadata": "root.main", "header": "['module', '___EOS___']", "index": 162 } ]
[ { "span": "main(sys.argv))", "start_line": 197, "start_column": 13, "end_line": 197, "end_column": 27 } ]
[ { "span": "def main(argv):", "start_line": 162, "start_column": 0, "end_line": 162, "end_column": 15 } ]
1
false
[ "[CLS]_", "Use_", "of_", "the_", "return_", "value_", "of_", "a_", "procedure_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "tempfile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "subprocess_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "shutil_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "hashlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "contextlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "gzip_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "fnmatch_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "tarfile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "zipfile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "alpha", "\\u", "tests_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "baseline", "'_", ",_", "'", "2b", "f2", "50", "ec", "4e", "5d", "d8", "bf", "d7", "3b", "3c", "cd", "0a", "5f", "f7", "495", "697", "6", "3c", "f", "'_", ",_", "[_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "degr", "ie", "f", "'_", ",_", "'", "2b", "7e", "ecd", "5e", "660", "f2", "041", "541", "370", "7b", "457", "6b", "1234", "deb", "fc", "b", "'_", ",_", "[_", "'", "degr", "ie", "f", "'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test\\u", "match", "\\u", "output_", ",_", "'", "analyze", "'_", ",_", "'", "9c", "b4", "ae", "c2", "ed", "7a", "895", "c3", "a5", "d2", "0d", "6e", "2", "9e", "264", "5", "9e", "00", "bd", "5", "3", "'_", ",_", "[_", "'", "analyze", "'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "reli", "ght", "'_", ",_", "'", "f3", "b3", "445", "b0", "abc", "a1", "fe", "2b", "183", "bc", "4", "8b", "24", "fb", "734", "df", "ca", "781", "'_", ",_", "[_", "'", "reli", "ght", "'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "replace", "'_", ",_", "'", "4e", "816", "038", "f9", "851", "817", "b0", "d7", "5d", "f9", "4", "8d", "058", "143", "708", "d2", "ec", "'_", ",_", "[_", "'", "replace", "'_", ",_", "'", "Water", " ", "(", "active", ")'_", ",_", "'", "with", "'_", ",_", "'", "La", "va", " ", "(", "active", ")'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "fill", "'_", ",_", "'", "945", "6", "6d", "069", "ede", "ce", "4f", "f0", "cc", "5", "2e", "f2", "d8", "f8", "7", "7f", "be", "972", "0a", "b", "'_", ",_", "[_", "'", "fill", "'_", ",_", "'", "Water", " ", "(", "active", ")'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "do", "\\u", "test_", ",_", "'", "height", "map", "'_", ",_", "'", "7", "1c", "20", "e7", "d7", "e3", "3", "5c", "b64", "b3", "eb", "0e", "9", "f6", "f4", "c9", "aba", "a0", "9", "b0", "7", "0", "'_", ",_", "[_", "'", "height", "map", "'_", ",_", "'", "regress", "ion", "\\u", "test", "/", "mars", ".", "png", "'_", "]_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "optparse_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "parser_", "=_", "optparse_", "._", "Optio", "n", "Parser_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "parser_", "._", "add", "\\u", "option_", "(_", "\"--", "profile", "\"_", ",_", "help_", "=_", "\"", "Perform", " ", "profiling", " ", "on", " ", "regress", "ion", " ", "tests", "\"_", ",_", "action_", "=_", "\"", "store", "\\u", "true", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sys_", "._", "exit_", "(_", "main_", "(_", "sys_", "._", "argv_", ")_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "main_", "(_", "argv_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "options_", ",_", "args_", "=_", "parser_", "._", "parse", "\\u", "args_", "(_", "argv_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "len_", "(_", "args_", ")_", "<=_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "do", "\\u", "these", "\\u", "regress", "ions_", "=_", "[_", "'*'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "do", "\\u", "these", "\\u", "regress", "ions_", "=_", "args_", "[_", "1_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "director", "y", "\\u", "clone_", "(_", "\"", "testfile", "s", "/", "An", "vil", "Wor", "ld", "\"_", ")_", "as_", "directory_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test\\u", "data_", "=_", "directory_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "passes_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fails_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "func_", ",_", "name_", ",_", "sha_", ",_", "args_", "in_", "alpha", "\\u", "tests_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "\"", "Start", "ing", " ", "regress", "ion", " ", "{", "0", "}", " ", "({", "1", "})\"_", "._", "format_", "(_", "name_", ",_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "any_", "(_", "fnmatch_", "._", "fnmatch_", "(_", "name_", ",_", "x_", ")_", "for_", "x_", "in_", "do", "\\u", "these", "\\u", "regress", "ions_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "options_", "._", "profile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", ">>_", "sys_", "._", "stderr_", ",_", "\"", "Start", "ing", " ", "to", " ", "profile", " ", "to", " ", "%", "s", ".", "profile", "\"_", "%_", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "os_", "._", "environ_", "[_", "'", "MC", "E", "\\u", "PROFILE", "'_", "]_", "=_", "'%", "s", ".", "profile", "'_", "%_", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "func_", "(_", "test\\u", "data_", ",_", "sha_", ",_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Regr", "ession", "Error_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "fails_", "._", "append_", "(_", "\"", "Regr", "ession", " ", "{", "0", "}", " ", "fail", "ed", ":", " ", "{", "1", "}\"_", "._", "format_", "(_", "name_", ",_", "e_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "fails_", "[_", "-_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "passes_", "._", "append_", "(_", "\"", "Regr", "ession", " ", "{", "0", "!", "r", "}", " ", "complete", ".\"_", "._", "format_", "(_", "name_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "passes_", "[_", "-_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "print_", "\"{", "0", "}", " ", "tests", " ", "pass", "ed", ".\"_", "._", "format_", "(_", "len_", "(_", "passes_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "line_", "in_", "fails_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "line_", "\\u\\u\\uNEWLINE\\u\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Variable defined multiple times
uber/clay/clay/server.py
[ { "content": "def load_middleware(app, name, mwconfig):\n log.info('Loading WSGI middleware %s' % name)\n try:\n modulename, wsgi = name.rsplit('.', 1)\n mw = __import__(modulename)\n mw = sys.modules[modulename]\n mw = getattr(mw, wsgi, None)\n if mw is None or not callable(mw):\n log.error('No callable named %s in %s (%r)' % (wsgi, modulename, mw))\n else:\n app = mw(app, **mwconfig)\n except Exception:\n log.exception('Unable to load WSGI middleware %s' % name)\n return app", "metadata": "root.load_middleware", "header": "['module', '___EOS___']", "index": 12 } ]
[ { "span": "mw ", "start_line": 16, "start_column": 8, "end_line": 16, "end_column": 10 } ]
[ { "span": "mw ", "start_line": 17, "start_column": 8, "end_line": 17, "end_column": 10 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "load", "\\u", "middleware_", "(_", "app_", ",_", "name_", ",_", "mw", "config_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "log_", "._", "info_", "(_", "'", "Load", "ing", " ", "WS", "GI", " ", "middle", "ware", " ", "%", "s", "'_", "%_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "modulename", "_", ",_", "wsgi_", "=_", "name_", "._", "rsplit_", "(_", "'.'_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mw_", "=_", "\\u\\u", "import\\u\\u_", "(_", "modulename", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mw_", "=_", "sys_", "._", "modules_", "[_", "modulename", "_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mw_", "=_", "getattr_", "(_", "mw_", ",_", "wsgi_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "mw_", "is_", "None_", "or_", "not_", "callable_", "(_", "mw_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "log_", "._", "error_", "(_", "'", "No", " ", "calla", "ble", " ", "named", " ", "%", "s", " ", "in", " ", "%", "s", " ", "(%", "r", ")'_", "%_", "(_", "wsgi_", ",_", "modulename", "_", ",_", "mw_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "app_", "=_", "mw_", "(_", "app_", ",_", "**_", "mw", "config_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "log_", "._", "exception_", "(_", "'", "Una", "ble", " ", "to", " ", "load", " ", "WS", "GI", " ", "middle", "ware", " ", "%", "s", "'_", "%_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "app_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/extras/completion/py/pymel/internal/pmcmds.py
[ { "content": "\"\"\"\nThere are a number of pymel objects which must be converted to a \"mel-friendly\"\nrepresentation. For example, in versions prior to 2009, some mel commands (ie, getAttr) which expect\nstring arguments will simply reject custom classes, even if they have a valid string representation.\nAnother Example is mel's matrix inputs, which expects a flat list of 16 flaots, while pymel's Matrix has a more typical\n4x4 representation.\n\nIf you're having compatibility issues with your custom classes when passing them to maya.cmds,\nsimply add a __melobject__ function that returns a mel-friendly result and pass them to pymel's wrapped commands.\n\nThe wrapped commands in this module are the starting point for any other pymel customizations.\n\"\"\"\n\nimport pymel.versions as versions\nimport sys\nimport os\nimport warnings\nimport maya\nimport pymel.util as util\n\nfrom maya.cmds import *\n\nfrom exceptions import ValueError as objectErrorType\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nobjectErrorReg = None\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def instance(*args, **kwargs):\n pass", "metadata": "root.instance", "header": "['module', '___EOS___']", "index": 24 }, { "content": "def polySplit(*args, **kwargs):\n pass", "metadata": "root.polySplit", "header": "['module', '___EOS___']", "index": 28 }, { "content": "def toolPropertyWindow(*args, **kwargs):\n pass", "metadata": "root.toolPropertyWindow", "header": "['module', '___EOS___']", "index": 32 }, { "content": "def getCmdName(inFunc):\n \"\"\"\n Use in place of inFunc.__name__ when inFunc could be a maya.cmds cmd\n \n handles stubFuncs\n \"\"\"\n\n pass", "metadata": "root.getCmdName", "header": "['module', '___EOS___']", "index": 36 }, { "content": "def toolBar(*args, **kwargs):\n pass", "metadata": "root.toolBar", "header": "['module', '___EOS___']", "index": 46 }, { "content": "def getPanel(*args, **kwargs):\n pass", "metadata": "root.getPanel", "header": "['module', '___EOS___']", "index": 50 }, { "content": "def polyReduce(*args, **kwargs):\n pass", "metadata": "root.polyReduce", "header": "['module', '___EOS___']", "index": 54 }, { "content": "def pointConstraint(*args, **kwargs):\n pass", "metadata": "root.pointConstraint", "header": "['module', '___EOS___']", "index": 58 }, { "content": "def floatScrollBar(*args, **kwargs):\n pass", "metadata": "root.floatScrollBar", "header": "['module', '___EOS___']", "index": 62 }, { "content": "def getAttr(*args, **kwargs):\n pass", "metadata": "root.getAttr", "header": "['module', '___EOS___']", "index": 66 }, { "content": "def polyColorPerVertex(*args, **kwargs):\n pass", "metadata": "root.polyColorPerVertex", "header": "['module', '___EOS___']", "index": 70 }, { "content": "def polyDelEdge(*args, **kwargs):\n pass", "metadata": "root.polyDelEdge", "header": "['module', '___EOS___']", "index": 74 }, { "content": "def textField(*args, **kwargs):\n pass", "metadata": "root.textField", "header": "['module', '___EOS___']", "index": 78 }, { "content": "def pointOnPolyConstraint(*args, **kwargs):\n pass", "metadata": "root.pointOnPolyConstraint", "header": "['module', '___EOS___']", "index": 82 }, { "content": "def filter(*args, **kwargs):\n pass", "metadata": "root.filter", "header": "['module', '___EOS___']", "index": 86 }, { "content": "def extendSurface(*args, **kwargs):\n pass", "metadata": "root.extendSurface", "header": "['module', '___EOS___']", "index": 90 }, { "content": "def insertKnotCurve(*args, **kwargs):\n pass", "metadata": "root.insertKnotCurve", "header": "['module', '___EOS___']", "index": 94 }, { "content": "def curveIntersect(*args, **kwargs):\n pass", "metadata": "root.curveIntersect", "header": "['module', '___EOS___']", "index": 98 }, { "content": "def parentConstraint(*args, **kwargs):\n pass", "metadata": "root.parentConstraint", "header": "['module', '___EOS___']", "index": 102 }, { "content": "def fontDialog(*args, **kwargs):\n pass", "metadata": "root.fontDialog", "header": "['module', '___EOS___']", "index": 106 }, { "content": "def rebuildSurface(*args, **kwargs):\n pass", "metadata": "root.rebuildSurface", "header": "['module', '___EOS___']", "index": 110 }, { "content": "def connectAttr(*args, **kwargs):\n pass", "metadata": "root.connectAttr", "header": "['module', '___EOS___']", "index": 114 }, { "content": "def polyNormalizeUV(*args, **kwargs):\n pass", "metadata": "root.polyNormalizeUV", "header": "['module', '___EOS___']", "index": 118 }, { "content": "def polyToSubdiv(*args, **kwargs):\n pass", "metadata": "root.polyToSubdiv", "header": "['module', '___EOS___']", "index": 122 }, { "content": "def polyCone(*args, **kwargs):\n pass", "metadata": "root.polyCone", "header": "['module', '___EOS___']", "index": 126 }, { "content": "def polyTriangulate(*args, **kwargs):\n pass", "metadata": "root.polyTriangulate", "header": "['module', '___EOS___']", "index": 130 }, { "content": "def createDisplayLayer(*args, **kwargs):\n pass", "metadata": "root.createDisplayLayer", "header": "['module', '___EOS___']", "index": 134 }, { "content": "def polyBoolOp(*args, **kwargs):\n pass", "metadata": "root.polyBoolOp", "header": "['module', '___EOS___']", "index": 138 }, { "content": "def skinCluster(*args, **kwargs):\n pass", "metadata": "root.skinCluster", "header": "['module', '___EOS___']", "index": 142 }, { "content": "def directionalLight(*args, **kwargs):\n pass", "metadata": "root.directionalLight", "header": "['module', '___EOS___']", "index": 146 }, { "content": "def nurbsPlane(*args, **kwargs):\n pass", "metadata": "root.nurbsPlane", "header": "['module', '___EOS___']", "index": 150 }, { "content": "def offsetSurface(*args, **kwargs):\n pass", "metadata": "root.offsetSurface", "header": "['module', '___EOS___']", "index": 154 }, { "content": "def fluidEmitter(*args, **kwargs):\n pass", "metadata": "root.fluidEmitter", "header": "['module', '___EOS___']", "index": 158 }, { "content": "def scriptJob(*args, **kwargs):\n pass", "metadata": "root.scriptJob", "header": "['module', '___EOS___']", "index": 162 }, { "content": "def manipMoveContext(*args, **kwargs):\n pass", "metadata": "root.manipMoveContext", "header": "['module', '___EOS___']", "index": 166 }, { "content": "def sceneEditor(*args, **kwargs):\n pass", "metadata": "root.sceneEditor", "header": "['module', '___EOS___']", "index": 170 }, { "content": "def loft(*args, **kwargs):\n pass", "metadata": "root.loft", "header": "['module', '___EOS___']", "index": 174 }, { "content": "def commandLine(*args, **kwargs):\n pass", "metadata": "root.commandLine", "header": "['module', '___EOS___']", "index": 178 }, { "content": "def colorIndexSliderGrp(*args, **kwargs):\n pass", "metadata": "root.colorIndexSliderGrp", "header": "['module', '___EOS___']", "index": 182 }, { "content": "def exportEdits(*args, **kwargs):\n pass", "metadata": "root.exportEdits", "header": "['module', '___EOS___']", "index": 186 }, { "content": "def listConnections(*args, **kwargs):\n pass", "metadata": "root.listConnections", "header": "['module', '___EOS___']", "index": 190 }, { "content": "def workspace(*args, **kwargs):\n pass", "metadata": "root.workspace", "header": "['module', '___EOS___']", "index": 194 }, { "content": "def MentalRayApproxEditor(*args, **kwargs):\n pass", "metadata": "root.MentalRayApproxEditor", "header": "['module', '___EOS___']", "index": 198 }, { "content": "def hudButton(*args, **kwargs):\n pass", "metadata": "root.hudButton", "header": "['module', '___EOS___']", "index": 202 }, { "content": "def boundary(*args, **kwargs):\n pass", "metadata": "root.boundary", "header": "['module', '___EOS___']", "index": 206 }, { "content": "def visor(*args, **kwargs):\n pass", "metadata": "root.visor", "header": "['module', '___EOS___']", "index": 210 }, { "content": "def subdMapCut(*args, **kwargs):\n pass", "metadata": "root.subdMapCut", "header": "['module', '___EOS___']", "index": 214 }, { "content": "def move(*args, **kwargs):\n pass", "metadata": "root.move", "header": "['module', '___EOS___']", "index": 218 }, { "content": "def GpuCacheExportSelectionOptions(*args, **kwargs):\n pass", "metadata": "root.GpuCacheExportSelectionOptions", "header": "['module', '___EOS___']", "index": 222 }, { "content": "def nurbsCurveToBezier(*args, **kwargs):\n pass", "metadata": "root.nurbsCurveToBezier", "header": "['module', '___EOS___']", "index": 226 }, { "content": "def nonLinear(*args, **kwargs):\n pass", "metadata": "root.nonLinear", "header": "['module', '___EOS___']", "index": 230 }, { "content": "def spotLight(*args, **kwargs):\n pass", "metadata": "root.spotLight", "header": "['module', '___EOS___']", "index": 234 }, { "content": "def intScrollBar(*args, **kwargs):\n pass", "metadata": "root.intScrollBar", "header": "['module', '___EOS___']", "index": 238 }, { "content": "def nodeOutliner(*args, **kwargs):\n pass", "metadata": "root.nodeOutliner", "header": "['module', '___EOS___']", "index": 242 }, { "content": "def lattice(*args, **kwargs):\n pass", "metadata": "root.lattice", "header": "['module', '___EOS___']", "index": 246 }, { "content": "def checkBox(*args, **kwargs):\n pass", "metadata": "root.checkBox", "header": "['module', '___EOS___']", "index": 250 }, { "content": "def menu(*args, **kwargs):\n pass", "metadata": "root.menu", "header": "['module', '___EOS___']", "index": 254 }, { "content": "def checkBoxGrp(*args, **kwargs):\n pass", "metadata": "root.checkBoxGrp", "header": "['module', '___EOS___']", "index": 258 }, { "content": "def select(*args, **kwargs):\n pass", "metadata": "root.select", "header": "['module', '___EOS___']", "index": 262 }, { "content": "def image(*args, **kwargs):\n pass", "metadata": "root.image", "header": "['module', '___EOS___']", "index": 266 }, { "content": "def unloadPlugin(*args, **kwargs):\n pass", "metadata": "root.unloadPlugin", "header": "['module', '___EOS___']", "index": 270 }, { "content": "def lightList(*args, **kwargs):\n pass", "metadata": "root.lightList", "header": "['module', '___EOS___']", "index": 274 }, { "content": "def distanceDimension(*args, **kwargs):\n pass", "metadata": "root.distanceDimension", "header": "['module', '___EOS___']", "index": 278 }, { "content": "def hudSlider(*args, **kwargs):\n pass", "metadata": "root.hudSlider", "header": "['module', '___EOS___']", "index": 282 }, { "content": "def attrEnumOptionMenu(*args, **kwargs):\n pass", "metadata": "root.attrEnumOptionMenu", "header": "['module', '___EOS___']", "index": 286 }, { "content": "def symbolButton(*args, **kwargs):\n pass", "metadata": "root.symbolButton", "header": "['module', '___EOS___']", "index": 290 }, { "content": "def menuEditor(*args, **kwargs):\n pass", "metadata": "root.menuEditor", "header": "['module', '___EOS___']", "index": 294 }, { "content": "def polyColorDel(*args, **kwargs):\n pass", "metadata": "root.polyColorDel", "header": "['module', '___EOS___']", "index": 298 }, { "content": "def createRenderLayer(*args, **kwargs):\n pass", "metadata": "root.createRenderLayer", "header": "['module', '___EOS___']", "index": 302 }, { "content": "def reverseCurve(*args, **kwargs):\n pass", "metadata": "root.reverseCurve", "header": "['module', '___EOS___']", "index": 306 }, { "content": "def manipScaleContext(*args, **kwargs):\n pass", "metadata": "root.manipScaleContext", "header": "['module', '___EOS___']", "index": 310 }, { "content": "def MentalRayLogfileRender(*args, **kwargs):\n pass", "metadata": "root.MentalRayLogfileRender", "header": "['module', '___EOS___']", "index": 314 }, { "content": "def scrollField(*args, **kwargs):\n pass", "metadata": "root.scrollField", "header": "['module', '___EOS___']", "index": 318 }, { "content": "def imageWindowEditor(*args, **kwargs):\n pass", "metadata": "root.imageWindowEditor", "header": "['module', '___EOS___']", "index": 322 }, { "content": "def polyHelix(*args, **kwargs):\n pass", "metadata": "root.polyHelix", "header": "['module', '___EOS___']", "index": 326 }, { "content": "def shelfButton(*args, **kwargs):\n pass", "metadata": "root.shelfButton", "header": "['module', '___EOS___']", "index": 330 }, { "content": "def group(*args, **kwargs):\n pass", "metadata": "root.group", "header": "['module', '___EOS___']", "index": 334 }, { "content": "def arrayMapper(*args, **kwargs):\n pass", "metadata": "root.arrayMapper", "header": "['module', '___EOS___']", "index": 338 }, { "content": "def userCtx(*args, **kwargs):\n pass", "metadata": "root.userCtx", "header": "['module', '___EOS___']", "index": 342 }, { "content": "def animLayer(*args, **kwargs):\n pass", "metadata": "root.animLayer", "header": "['module', '___EOS___']", "index": 346 }, { "content": "def sets(*args, **kwargs):\n pass", "metadata": "root.sets", "header": "['module', '___EOS___']", "index": 350 }, { "content": "def savePrefs(*args, **kwargs):\n pass", "metadata": "root.savePrefs", "header": "['module', '___EOS___']", "index": 354 }, { "content": "def iconTextScrollList(*args, **kwargs):\n pass", "metadata": "root.iconTextScrollList", "header": "['module', '___EOS___']", "index": 358 }, { "content": "def rowLayout(*args, **kwargs):\n pass", "metadata": "root.rowLayout", "header": "['module', '___EOS___']", "index": 362 }, { "content": "def uiTemplate(*args, **kwargs):\n pass", "metadata": "root.uiTemplate", "header": "['module', '___EOS___']", "index": 366 }, { "content": "def polyStraightenUVBorder(*args, **kwargs):\n pass", "metadata": "root.polyStraightenUVBorder", "header": "['module', '___EOS___']", "index": 370 }, { "content": "def iconTextRadioButton(*args, **kwargs):\n pass", "metadata": "root.iconTextRadioButton", "header": "['module', '___EOS___']", "index": 374 }, { "content": "def iconTextCheckBox(*args, **kwargs):\n pass", "metadata": "root.iconTextCheckBox", "header": "['module', '___EOS___']", "index": 378 }, { "content": "def rampColorPort(*args, **kwargs):\n pass", "metadata": "root.rampColorPort", "header": "['module', '___EOS___']", "index": 382 }, { "content": "def radioButton(*args, **kwargs):\n pass", "metadata": "root.radioButton", "header": "['module', '___EOS___']", "index": 386 }, { "content": "def polySoftEdge(*args, **kwargs):\n pass", "metadata": "root.polySoftEdge", "header": "['module', '___EOS___']", "index": 390 }, { "content": "def gradientControl(*args, **kwargs):\n pass", "metadata": "root.gradientControl", "header": "['module', '___EOS___']", "index": 394 }, { "content": "def turbulence(*args, **kwargs):\n pass", "metadata": "root.turbulence", "header": "['module', '___EOS___']", "index": 398 }, { "content": "def polySewEdge(*args, **kwargs):\n pass", "metadata": "root.polySewEdge", "header": "['module', '___EOS___']", "index": 402 }, { "content": "def toolButton(*args, **kwargs):\n pass", "metadata": "root.toolButton", "header": "['module', '___EOS___']", "index": 406 }, { "content": "def flowLayout(*args, **kwargs):\n pass", "metadata": "root.flowLayout", "header": "['module', '___EOS___']", "index": 410 }, { "content": "def projectCurve(*args, **kwargs):\n pass", "metadata": "root.projectCurve", "header": "['module', '___EOS___']", "index": 414 }, { "content": "def timeControl(*args, **kwargs):\n pass", "metadata": "root.timeControl", "header": "['module', '___EOS___']", "index": 418 }, { "content": "def floatSlider(*args, **kwargs):\n pass", "metadata": "root.floatSlider", "header": "['module', '___EOS___']", "index": 422 }, { "content": "def getClassification(*args, **kwargs):\n pass", "metadata": "root.getClassification", "header": "['module', '___EOS___']", "index": 426 }, { "content": "def attrFieldSliderGrp(*args, **kwargs):\n pass", "metadata": "root.attrFieldSliderGrp", "header": "['module', '___EOS___']", "index": 430 }, { "content": "def addPP(*args, **kwargs):\n pass", "metadata": "root.addPP", "header": "['module', '___EOS___']", "index": 434 }, { "content": "def picture(*args, **kwargs):\n pass", "metadata": "root.picture", "header": "['module', '___EOS___']", "index": 438 }, { "content": "def GpuCacheExportAllOptions(*args, **kwargs):\n pass", "metadata": "root.GpuCacheExportAllOptions", "header": "['module', '___EOS___']", "index": 442 }, { "content": "def attrEnumOptionMenuGrp(*args, **kwargs):\n pass", "metadata": "root.attrEnumOptionMenuGrp", "header": "['module', '___EOS___']", "index": 446 }, { "content": "def expression(*args, **kwargs):\n pass", "metadata": "root.expression", "header": "['module', '___EOS___']", "index": 450 }, { "content": "def tangentConstraint(*args, **kwargs):\n pass", "metadata": "root.tangentConstraint", "header": "['module', '___EOS___']", "index": 454 }, { "content": "def dagPose(*args, **kwargs):\n pass", "metadata": "root.dagPose", "header": "['module', '___EOS___']", "index": 458 }, { "content": "def transferAttributes(*args, **kwargs):\n pass", "metadata": "root.transferAttributes", "header": "['module', '___EOS___']", "index": 462 }, { "content": "def AlembicExportSelection(*args, **kwargs):\n pass", "metadata": "root.AlembicExportSelection", "header": "['module', '___EOS___']", "index": 466 }, { "content": "def attachCurve(*args, **kwargs):\n pass", "metadata": "root.attachCurve", "header": "['module', '___EOS___']", "index": 470 }, { "content": "def polyPrism(*args, **kwargs):\n pass", "metadata": "root.polyPrism", "header": "['module', '___EOS___']", "index": 474 }, { "content": "def polyPlane(*args, **kwargs):\n pass", "metadata": "root.polyPlane", "header": "['module', '___EOS___']", "index": 478 }, { "content": "def polyMapCut(*args, **kwargs):\n pass", "metadata": "root.polyMapCut", "header": "['module', '___EOS___']", "index": 482 }, { "content": "def polyOptUvs(*args, **kwargs):\n pass", "metadata": "root.polyOptUvs", "header": "['module', '___EOS___']", "index": 486 }, { "content": "def assignCommand(*args, **kwargs):\n pass", "metadata": "root.assignCommand", "header": "['module', '___EOS___']", "index": 490 }, { "content": "def polyTorus(*args, **kwargs):\n pass", "metadata": "root.polyTorus", "header": "['module', '___EOS___']", "index": 494 }, { "content": "def polyMoveVertex(*args, **kwargs):\n pass", "metadata": "root.polyMoveVertex", "header": "['module', '___EOS___']", "index": 498 }, { "content": "def polyCloseBorder(*args, **kwargs):\n pass", "metadata": "root.polyCloseBorder", "header": "['module', '___EOS___']", "index": 502 }, { "content": "def paneLayout(*args, **kwargs):\n pass", "metadata": "root.paneLayout", "header": "['module', '___EOS___']", "index": 506 }, { "content": "def polyAverageVertex(*args, **kwargs):\n pass", "metadata": "root.polyAverageVertex", "header": "['module', '___EOS___']", "index": 510 }, { "content": "def orientConstraint(*args, **kwargs):\n pass", "metadata": "root.orientConstraint", "header": "['module', '___EOS___']", "index": 514 }, { "content": "def optionMenu(*args, **kwargs):\n pass", "metadata": "root.optionMenu", "header": "['module', '___EOS___']", "index": 518 }, { "content": "def objectTypeUI(*args, **kwargs):\n \"\"\"\n This command returns the type of UI element such as button, sliders, etc.\n \n Flags:\n - isType : i (unicode) [create]\n Returns true|false if the object is of the specified type.\n \n - listAll : la (bool) [create]\n Returns a list of all known UI commands and their respective types. Each entry contains three strings which are the\n command name, ui type and class name. Note that the class name is internal and is subject to change.\n \n - superClasses : sc (bool) [create]\n Returns a list of the names of all super classes for the given object. Note that all class names are internal and are\n subject to change.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or\n a list.\n \n \n Derived from mel command `maya.cmds.objectTypeUI`\n \"\"\"\n\n pass", "metadata": "root.objectTypeUI", "header": "['module', '___EOS___']", "index": 522 }, { "content": "def scrollLayout(*args, **kwargs):\n pass", "metadata": "root.scrollLayout", "header": "['module', '___EOS___']", "index": 546 }, { "content": "def shelfLayout(*args, **kwargs):\n pass", "metadata": "root.shelfLayout", "header": "['module', '___EOS___']", "index": 550 }, { "content": "def nameCommand(*args, **kwargs):\n pass", "metadata": "root.nameCommand", "header": "['module', '___EOS___']", "index": 554 }, { "content": "def detachSurface(*args, **kwargs):\n pass", "metadata": "root.detachSurface", "header": "['module', '___EOS___']", "index": 558 }, { "content": "def cameraSet(*args, **kwargs):\n pass", "metadata": "root.cameraSet", "header": "['module', '___EOS___']", "index": 562 }, { "content": "def commandPort(*args, **kwargs):\n pass", "metadata": "root.commandPort", "header": "['module', '___EOS___']", "index": 566 }, { "content": "def MentalRayCustomTextEditor(*args, **kwargs):\n pass", "metadata": "root.MentalRayCustomTextEditor", "header": "['module', '___EOS___']", "index": 570 }, { "content": "def listAnimatable(*args, **kwargs):\n pass", "metadata": "root.listAnimatable", "header": "['module', '___EOS___']", "index": 574 }, { "content": "def cmdScrollFieldExecuter(*args, **kwargs):\n pass", "metadata": "root.cmdScrollFieldExecuter", "header": "['module', '___EOS___']", "index": 578 }, { "content": "def roundConstantRadius(*args, **kwargs):\n pass", "metadata": "root.roundConstantRadius", "header": "['module', '___EOS___']", "index": 582 }, { "content": "def window(*args, **kwargs):\n pass", "metadata": "root.window", "header": "['module', '___EOS___']", "index": 586 }, { "content": "def clipSchedulerOutliner(*args, **kwargs):\n pass", "metadata": "root.clipSchedulerOutliner", "header": "['module', '___EOS___']", "index": 590 }, { "content": "def webBrowser(*args, **kwargs):\n pass", "metadata": "root.webBrowser", "header": "['module', '___EOS___']", "index": 594 }, { "content": "def volumeAxis(*args, **kwargs):\n pass", "metadata": "root.volumeAxis", "header": "['module', '___EOS___']", "index": 598 }, { "content": "def blendShapePanel(*args, **kwargs):\n pass", "metadata": "root.blendShapePanel", "header": "['module', '___EOS___']", "index": 602 }, { "content": "def psdChannelOutliner(*args, **kwargs):\n \"\"\"\n Dynamic library stub function\n \"\"\"\n\n pass", "metadata": "root.psdChannelOutliner", "header": "['module', '___EOS___']", "index": 606 }, { "content": "def subdMapSewMove(*args, **kwargs):\n pass", "metadata": "root.subdMapSewMove", "header": "['module', '___EOS___']", "index": 614 }, { "content": "def polyBlindData(*args, **kwargs):\n pass", "metadata": "root.polyBlindData", "header": "['module', '___EOS___']", "index": 618 }, { "content": "def flushUndo(*args, **kwargs):\n pass", "metadata": "root.flushUndo", "header": "['module', '___EOS___']", "index": 622 }, { "content": "def confirmDialog(*args, **kwargs):\n pass", "metadata": "root.confirmDialog", "header": "['module', '___EOS___']", "index": 626 }, { "content": "def spotLightPreviewPort(*args, **kwargs):\n pass", "metadata": "root.spotLightPreviewPort", "header": "['module', '___EOS___']", "index": 630 }, { "content": "def soundControl(*args, **kwargs):\n pass", "metadata": "root.soundControl", "header": "['module', '___EOS___']", "index": 634 }, { "content": "def normalConstraint(*args, **kwargs):\n pass", "metadata": "root.normalConstraint", "header": "['module', '___EOS___']", "index": 638 }, { "content": "def layeredShaderPort(*args, **kwargs):\n pass", "metadata": "root.layeredShaderPort", "header": "['module', '___EOS___']", "index": 642 }, { "content": "def modelEditor(*args, **kwargs):\n pass", "metadata": "root.modelEditor", "header": "['module', '___EOS___']", "index": 646 }, { "content": "def rotate(*args, **kwargs):\n pass", "metadata": "root.rotate", "header": "['module', '___EOS___']", "index": 650 }, { "content": "def jointCluster(*args, **kwargs):\n pass", "metadata": "root.jointCluster", "header": "['module', '___EOS___']", "index": 654 }, { "content": "def layout(*args, **kwargs):\n pass", "metadata": "root.layout", "header": "['module', '___EOS___']", "index": 658 }, { "content": "def menuBarLayout(*args, **kwargs):\n pass", "metadata": "root.menuBarLayout", "header": "['module', '___EOS___']", "index": 662 }, { "content": "def keyframeStats(*args, **kwargs):\n pass", "metadata": "root.keyframeStats", "header": "['module', '___EOS___']", "index": 666 }, { "content": "def imagePlane(*args, **kwargs):\n pass", "metadata": "root.imagePlane", "header": "['module', '___EOS___']", "index": 670 }, { "content": "def ikSystem(*args, **kwargs):\n pass", "metadata": "root.ikSystem", "header": "['module', '___EOS___']", "index": 674 }, { "content": "def undoInfo(*args, **kwargs):\n pass", "metadata": "root.undoInfo", "header": "['module', '___EOS___']", "index": 678 }, { "content": "def removeWrappedCmd(cmdname):\n pass", "metadata": "root.removeWrappedCmd", "header": "['module', '___EOS___']", "index": 682 }, { "content": "def iconTextRadioCollection(*args, **kwargs):\n pass", "metadata": "root.iconTextRadioCollection", "header": "['module', '___EOS___']", "index": 686 }, { "content": "def polyEditEdgeFlow(*args, **kwargs):\n pass", "metadata": "root.polyEditEdgeFlow", "header": "['module', '___EOS___']", "index": 690 }, { "content": "def hyperPanel(*args, **kwargs):\n pass", "metadata": "root.hyperPanel", "header": "['module', '___EOS___']", "index": 694 }, { "content": "def attributeMenu(*args, **kwargs):\n pass", "metadata": "root.attributeMenu", "header": "['module', '___EOS___']", "index": 698 }, { "content": "def progressBar(*args, **kwargs):\n pass", "metadata": "root.progressBar", "header": "['module', '___EOS___']", "index": 702 }, { "content": "def adskAssetListUI(*args, **kwargs):\n pass", "metadata": "root.adskAssetListUI", "header": "['module', '___EOS___']", "index": 706 }, { "content": "def poleVectorConstraint(*args, **kwargs):\n pass", "metadata": "root.poleVectorConstraint", "header": "['module', '___EOS___']", "index": 710 }, { "content": "def artUserPaintCtx(*args, **kwargs):\n pass", "metadata": "root.artUserPaintCtx", "header": "['module', '___EOS___']", "index": 714 }, { "content": "def SelectedAnimLayer(*args, **kwargs):\n pass", "metadata": "root.SelectedAnimLayer", "header": "['module', '___EOS___']", "index": 718 }, { "content": "def joint(*args, **kwargs):\n pass", "metadata": "root.joint", "header": "['module', '___EOS___']", "index": 722 }, { "content": "def draggerContext(*args, **kwargs):\n pass", "metadata": "root.draggerContext", "header": "['module', '___EOS___']", "index": 726 }, { "content": "def GpuCacheImport(*args, **kwargs):\n pass", "metadata": "root.GpuCacheImport", "header": "['module', '___EOS___']", "index": 730 }, { "content": "def reverseSurface(*args, **kwargs):\n pass", "metadata": "root.reverseSurface", "header": "['module', '___EOS___']", "index": 734 }, { "content": "def character(*args, **kwargs):\n pass", "metadata": "root.character", "header": "['module', '___EOS___']", "index": 738 }, { "content": "def AlembicExportAll(*args, **kwargs):\n pass", "metadata": "root.AlembicExportAll", "header": "['module', '___EOS___']", "index": 742 }, { "content": "def loadPlugin(*args, **kwargs):\n pass", "metadata": "root.loadPlugin", "header": "['module', '___EOS___']", "index": 746 }, { "content": "def renderer(*args, **kwargs):\n pass", "metadata": "root.renderer", "header": "['module', '___EOS___']", "index": 750 }, { "content": "def polyLayoutUV(*args, **kwargs):\n pass", "metadata": "root.polyLayoutUV", "header": "['module', '___EOS___']", "index": 754 }, { "content": "def polyCut(*args, **kwargs):\n pass", "metadata": "root.polyCut", "header": "['module', '___EOS___']", "index": 758 }, { "content": "def headsUpDisplay(*args, **kwargs):\n pass", "metadata": "root.headsUpDisplay", "header": "['module', '___EOS___']", "index": 762 }, { "content": "def hotBox(*args, **kwargs):\n pass", "metadata": "root.hotBox", "header": "['module', '___EOS___']", "index": 766 }, { "content": "def art3dPaintCtx(*args, **kwargs):\n pass", "metadata": "root.art3dPaintCtx", "header": "['module', '___EOS___']", "index": 770 }, { "content": "def addAttr(*args, **kwargs):\n pass", "metadata": "root.addAttr", "header": "['module', '___EOS___']", "index": 774 }, { "content": "def ambientLight(*args, **kwargs):\n pass", "metadata": "root.ambientLight", "header": "['module', '___EOS___']", "index": 778 }, { "content": "def polyNormal(*args, **kwargs):\n pass", "metadata": "root.polyNormal", "header": "['module', '___EOS___']", "index": 782 }, { "content": "def editMetadata(*args, **kwargs):\n pass", "metadata": "root.editMetadata", "header": "['module', '___EOS___']", "index": 786 }, { "content": "def repeatLast(*args, **kwargs):\n pass", "metadata": "root.repeatLast", "header": "['module', '___EOS___']", "index": 790 }, { "content": "def dynPaintEditor(*args, **kwargs):\n pass", "metadata": "root.dynPaintEditor", "header": "['module', '___EOS___']", "index": 794 }, { "content": "def keyframeOutliner(*args, **kwargs):\n pass", "metadata": "root.keyframeOutliner", "header": "['module', '___EOS___']", "index": 798 }, { "content": "def callbacks(*args, **kwargs):\n pass", "metadata": "root.callbacks", "header": "['module', '___EOS___']", "index": 802 }, { "content": "def nBase(*args, **kwargs):\n pass", "metadata": "root.nBase", "header": "['module', '___EOS___']", "index": 806 }, { "content": "def listSets(*args, **kwargs):\n pass", "metadata": "root.listSets", "header": "['module', '___EOS___']", "index": 810 }, { "content": "def rebuildCurve(*args, **kwargs):\n pass", "metadata": "root.rebuildCurve", "header": "['module', '___EOS___']", "index": 814 }, { "content": "def gradientControlNoAttr(*args, **kwargs):\n pass", "metadata": "root.gradientControlNoAttr", "header": "['module', '___EOS___']", "index": 818 }, { "content": "def polySphere(*args, **kwargs):\n pass", "metadata": "root.polySphere", "header": "['module', '___EOS___']", "index": 822 }, { "content": "def polyFlipEdge(*args, **kwargs):\n pass", "metadata": "root.polyFlipEdge", "header": "['module', '___EOS___']", "index": 826 }, { "content": "def globalStitch(*args, **kwargs):\n pass", "metadata": "root.globalStitch", "header": "['module', '___EOS___']", "index": 830 }, { "content": "def timePort(*args, **kwargs):\n pass", "metadata": "root.timePort", "header": "['module', '___EOS___']", "index": 834 }, { "content": "def air(*args, **kwargs):\n pass", "metadata": "root.air", "header": "['module', '___EOS___']", "index": 838 }, { "content": "def assembly(*args, **kwargs):\n pass", "metadata": "root.assembly", "header": "['module', '___EOS___']", "index": 842 }, { "content": "def textureWindow(*args, **kwargs):\n pass", "metadata": "root.textureWindow", "header": "['module', '___EOS___']", "index": 846 }, { "content": "def flexor(*args, **kwargs):\n pass", "metadata": "root.flexor", "header": "['module', '___EOS___']", "index": 850 }, { "content": "def polyBevel(*args, **kwargs):\n pass", "metadata": "root.polyBevel", "header": "['module', '___EOS___']", "index": 854 }, { "content": "def textFieldGrp(*args, **kwargs):\n pass", "metadata": "root.textFieldGrp", "header": "['module', '___EOS___']", "index": 858 }, { "content": "def offsetCurve(*args, **kwargs):\n pass", "metadata": "root.offsetCurve", "header": "['module', '___EOS___']", "index": 862 }, { "content": "def addDynamic(*args, **kwargs):\n pass", "metadata": "root.addDynamic", "header": "['module', '___EOS___']", "index": 866 }, { "content": "def fileInfo(*args, **kwargs):\n pass", "metadata": "root.fileInfo", "header": "['module', '___EOS___']", "index": 870 }, { "content": "def defaultLightListCheckBox(*args, **kwargs):\n pass", "metadata": "root.defaultLightListCheckBox", "header": "['module', '___EOS___']", "index": 874 }, { "content": "def manipRotateContext(*args, **kwargs):\n pass", "metadata": "root.manipRotateContext", "header": "['module', '___EOS___']", "index": 878 }, { "content": "def choice(*args, **kwargs):\n pass", "metadata": "root.choice", "header": "['module', '___EOS___']", "index": 882 }, { "content": "def quit(*args, **kwargs):\n pass", "metadata": "root.quit", "header": "['module', '___EOS___']", "index": 886 }, { "content": "def arclen(*args, **kwargs):\n pass", "metadata": "root.arclen", "header": "['module', '___EOS___']", "index": 890 }, { "content": "def AlembicOpen(*args, **kwargs):\n pass", "metadata": "root.AlembicOpen", "header": "['module', '___EOS___']", "index": 894 }, { "content": "def pairBlend(*args, **kwargs):\n pass", "metadata": "root.pairBlend", "header": "['module', '___EOS___']", "index": 898 }, { "content": "def polyProjectCurve(*args, **kwargs):\n pass", "metadata": "root.polyProjectCurve", "header": "['module', '___EOS___']", "index": 902 }, { "content": "def getMelRepresentation(args, recursionLimit=None, maintainDicts=True):\n \"\"\"\n Will return a list which contains each element of the iterable 'args' converted to a mel-friendly representation.\n \n :Parameters:\n recursionLimit : int or None\n If an element of args is itself iterable, recursionLimit specifies the depth to which iterable elements\n will recursively search for objects to convert; if ``recursionLimit==0``, only the elements\n of args itself will be searched for PyNodes - if it is 1, iterables within args will have getMelRepresentation called\n on them, etc. If recursionLimit==None, then there is no limit to recursion depth.\n \n maintainDicts : bool\n In general, all iterables will be converted to tuples in the returned copy - however, if maintainDicts==True,\n then iterables for which ``util.isMapping()`` returns True will be returned as dicts.\n \"\"\"\n\n pass", "metadata": "root.getMelRepresentation", "header": "['module', '___EOS___']", "index": 906 }, { "content": "def polyCopyUV(*args, **kwargs):\n pass", "metadata": "root.polyCopyUV", "header": "['module', '___EOS___']", "index": 925 }, { "content": "def preloadRefEd(*args, **kwargs):\n pass", "metadata": "root.preloadRefEd", "header": "['module', '___EOS___']", "index": 929 }, { "content": "def softMod(*args, **kwargs):\n pass", "metadata": "root.softMod", "header": "['module', '___EOS___']", "index": 933 }, { "content": "def eval(*args, **kwargs):\n \"\"\"\n Dynamic library stub function\n \"\"\"\n\n pass", "metadata": "root.eval", "header": "['module', '___EOS___']", "index": 937 }, { "content": "def outlinerEditor(*args, **kwargs):\n pass", "metadata": "root.outlinerEditor", "header": "['module', '___EOS___']", "index": 945 }, { "content": "def optionMenuGrp(*args, **kwargs):\n pass", "metadata": "root.optionMenuGrp", "header": "['module', '___EOS___']", "index": 949 }, { "content": "def hyperGraph(*args, **kwargs):\n pass", "metadata": "root.hyperGraph", "header": "['module', '___EOS___']", "index": 953 }, { "content": "def insertKnotSurface(*args, **kwargs):\n pass", "metadata": "root.insertKnotSurface", "header": "['module', '___EOS___']", "index": 957 }, { "content": "def scriptTable(*args, **kwargs):\n pass", "metadata": "root.scriptTable", "header": "['module', '___EOS___']", "index": 961 }, { "content": "def scaleConstraint(*args, **kwargs):\n pass", "metadata": "root.scaleConstraint", "header": "['module', '___EOS___']", "index": 965 }, { "content": "def ls(*args, **kwargs):\n pass", "metadata": "root.ls", "header": "['module', '___EOS___']", "index": 969 }, { "content": "def componentBox(*args, **kwargs):\n pass", "metadata": "root.componentBox", "header": "['module', '___EOS___']", "index": 973 }, { "content": "def colorSliderGrp(*args, **kwargs):\n pass", "metadata": "root.colorSliderGrp", "header": "['module', '___EOS___']", "index": 977 }, { "content": "def setParent(*args, **kwargs):\n pass", "metadata": "root.setParent", "header": "['module', '___EOS___']", "index": 981 }, { "content": "def listHistory(*args, **kwargs):\n pass", "metadata": "root.listHistory", "header": "['module', '___EOS___']", "index": 985 }, { "content": "def cmdScrollFieldReporter(*args, **kwargs):\n pass", "metadata": "root.cmdScrollFieldReporter", "header": "['module', '___EOS___']", "index": 989 }, { "content": "def listAttr(*args, **kwargs):\n pass", "metadata": "root.listAttr", "header": "['module', '___EOS___']", "index": 993 }, { "content": "def closeCurve(*args, **kwargs):\n pass", "metadata": "root.closeCurve", "header": "['module', '___EOS___']", "index": 997 }, { "content": "def polyInstallAction(*args, **kwargs):\n pass", "metadata": "root.polyInstallAction", "header": "['module', '___EOS___']", "index": 1001 }, { "content": "def blendTwoAttr(*args, **kwargs):\n pass", "metadata": "root.blendTwoAttr", "header": "['module', '___EOS___']", "index": 1005 }, { "content": "def fileBrowserDialog(*args, **kwargs):\n pass", "metadata": "root.fileBrowserDialog", "header": "['module', '___EOS___']", "index": 1009 }, { "content": "def bezierCurveToNurbs(*args, **kwargs):\n pass", "metadata": "root.bezierCurveToNurbs", "header": "['module', '___EOS___']", "index": 1013 }, { "content": "def polyUVRectangle(*args, **kwargs):\n pass", "metadata": "root.polyUVRectangle", "header": "['module', '___EOS___']", "index": 1017 }, { "content": "def polyQuad(*args, **kwargs):\n pass", "metadata": "root.polyQuad", "header": "['module', '___EOS___']", "index": 1021 }, { "content": "def batchRender(*args, **kwargs):\n pass", "metadata": "root.batchRender", "header": "['module', '___EOS___']", "index": 1025 }, { "content": "def nodeTreeLister(*args, **kwargs):\n pass", "metadata": "root.nodeTreeLister", "header": "['module', '___EOS___']", "index": 1029 }, { "content": "def switchTable(*args, **kwargs):\n pass", "metadata": "root.switchTable", "header": "['module', '___EOS___']", "index": 1033 }, { "content": "def modelPanel(*args, **kwargs):\n pass", "metadata": "root.modelPanel", "header": "['module', '___EOS___']", "index": 1037 }, { "content": "def nodeEditor(*args, **kwargs):\n pass", "metadata": "root.nodeEditor", "header": "['module', '___EOS___']", "index": 1041 }, { "content": "def messageLine(*args, **kwargs):\n pass", "metadata": "root.messageLine", "header": "['module', '___EOS___']", "index": 1045 }, { "content": "def sequenceManager(*args, **kwargs):\n pass", "metadata": "root.sequenceManager", "header": "['module', '___EOS___']", "index": 1049 }, { "content": "def nameField(*args, **kwargs):\n pass", "metadata": "root.nameField", "header": "['module', '___EOS___']", "index": 1053 }, { "content": "def mute(*args, **kwargs):\n pass", "metadata": "root.mute", "header": "['module', '___EOS___']", "index": 1057 }, { "content": "def attrNavigationControlGrp(*args, **kwargs):\n pass", "metadata": "root.attrNavigationControlGrp", "header": "['module', '___EOS___']", "index": 1061 }, { "content": "def keyingGroup(*args, **kwargs):\n pass", "metadata": "root.keyingGroup", "header": "['module', '___EOS___']", "index": 1065 }, { "content": "def untrim(*args, **kwargs):\n pass", "metadata": "root.untrim", "header": "['module', '___EOS___']", "index": 1069 }, { "content": "def ikSolver(*args, **kwargs):\n pass", "metadata": "root.ikSolver", "header": "['module', '___EOS___']", "index": 1073 }, { "content": "def jointLattice(*args, **kwargs):\n pass", "metadata": "root.jointLattice", "header": "['module', '___EOS___']", "index": 1077 }, { "content": "def hyperShade(*args, **kwargs):\n pass", "metadata": "root.hyperShade", "header": "['module', '___EOS___']", "index": 1081 }, { "content": "def attrFieldGrp(*args, **kwargs):\n pass", "metadata": "root.attrFieldGrp", "header": "['module', '___EOS___']", "index": 1085 }, { "content": "def treeLister(*args, **kwargs):\n pass", "metadata": "root.treeLister", "header": "['module', '___EOS___']", "index": 1089 }, { "content": "def hotkey(*args, **kwargs):\n pass", "metadata": "root.hotkey", "header": "['module', '___EOS___']", "index": 1093 }, { "content": "def attrColorSliderGrp(*args, **kwargs):\n pass", "metadata": "root.attrColorSliderGrp", "header": "['module', '___EOS___']", "index": 1097 }, { "content": "def swatchDisplayPort(*args, **kwargs):\n pass", "metadata": "root.swatchDisplayPort", "header": "['module', '___EOS___']", "index": 1101 }, { "content": "def saveImage(*args, **kwargs):\n pass", "metadata": "root.saveImage", "header": "['module', '___EOS___']", "index": 1105 }, { "content": "def intSlider(*args, **kwargs):\n pass", "metadata": "root.intSlider", "header": "['module', '___EOS___']", "index": 1109 }, { "content": "def keyframe(*args, **kwargs):\n pass", "metadata": "root.keyframe", "header": "['module', '___EOS___']", "index": 1113 }, { "content": "def runTimeCommand(*args, **kwargs):\n pass", "metadata": "root.runTimeCommand", "header": "['module', '___EOS___']", "index": 1117 }, { "content": "def revolve(*args, **kwargs):\n pass", "metadata": "root.revolve", "header": "['module', '___EOS___']", "index": 1121 }, { "content": "def AlembicImport(*args, **kwargs):\n pass", "metadata": "root.AlembicImport", "header": "['module', '___EOS___']", "index": 1125 }, { "content": "def reference(*args, **kwargs):\n pass", "metadata": "root.reference", "header": "['module', '___EOS___']", "index": 1129 }, { "content": "def polyDelFacet(*args, **kwargs):\n pass", "metadata": "root.polyDelFacet", "header": "['module', '___EOS___']", "index": 1133 }, { "content": "def polyMoveUV(*args, **kwargs):\n pass", "metadata": "root.polyMoveUV", "header": "['module', '___EOS___']", "index": 1137 }, { "content": "def popupMenu(*args, **kwargs):\n pass", "metadata": "root.popupMenu", "header": "['module', '___EOS___']", "index": 1141 }, { "content": "def polyColorMod(*args, **kwargs):\n pass", "metadata": "root.polyColorMod", "header": "['module', '___EOS___']", "index": 1145 }, { "content": "def annotate(*args, **kwargs):\n pass", "metadata": "root.annotate", "header": "['module', '___EOS___']", "index": 1149 }, { "content": "def addWrappedCmd(cmdname, cmd=None):\n pass", "metadata": "root.addWrappedCmd", "header": "['module', '___EOS___']", "index": 1153 }, { "content": "def angleBetween(*args, **kwargs):\n pass", "metadata": "root.angleBetween", "header": "['module', '___EOS___']", "index": 1157 }, { "content": "def radioMenuItemCollection(*args, **kwargs):\n pass", "metadata": "root.radioMenuItemCollection", "header": "['module', '___EOS___']", "index": 1161 }, { "content": "def radioCollection(*args, **kwargs):\n pass", "metadata": "root.radioCollection", "header": "['module', '___EOS___']", "index": 1165 }, { "content": "def canvas(*args, **kwargs):\n pass", "metadata": "root.canvas", "header": "['module', '___EOS___']", "index": 1169 }, { "content": "def polySmooth(*args, **kwargs):\n pass", "metadata": "root.polySmooth", "header": "['module', '___EOS___']", "index": 1173 }, { "content": "def referenceEdit(*args, **kwargs):\n pass", "metadata": "root.referenceEdit", "header": "['module', '___EOS___']", "index": 1177 }, { "content": "def polySplitEdge(*args, **kwargs):\n pass", "metadata": "root.polySplitEdge", "header": "['module', '___EOS___']", "index": 1181 }, { "content": "def radioButtonGrp(*args, **kwargs):\n pass", "metadata": "root.radioButtonGrp", "header": "['module', '___EOS___']", "index": 1185 }, { "content": "def toolCollection(*args, **kwargs):\n pass", "metadata": "root.toolCollection", "header": "['module', '___EOS___']", "index": 1189 }, { "content": "def polySeparate(*args, **kwargs):\n pass", "metadata": "root.polySeparate", "header": "['module', '___EOS___']", "index": 1193 }, { "content": "def polyUnite(*args, **kwargs):\n pass", "metadata": "root.polyUnite", "header": "['module', '___EOS___']", "index": 1197 }, { "content": "def polySelectConstraintMonitor(*args, **kwargs):\n pass", "metadata": "root.polySelectConstraintMonitor", "header": "['module', '___EOS___']", "index": 1201 }, { "content": "def timeWarp(*args, **kwargs):\n pass", "metadata": "root.timeWarp", "header": "['module', '___EOS___']", "index": 1205 }, { "content": "def floatSliderButtonGrp(*args, **kwargs):\n pass", "metadata": "root.floatSliderButtonGrp", "header": "['module', '___EOS___']", "index": 1209 }, { "content": "def intField(*args, **kwargs):\n pass", "metadata": "root.intField", "header": "['module', '___EOS___']", "index": 1213 }, { "content": "def floatField(*args, **kwargs):\n pass", "metadata": "root.floatField", "header": "['module', '___EOS___']", "index": 1217 }, { "content": "def polyCylinder(*args, **kwargs):\n pass", "metadata": "root.polyCylinder", "header": "['module', '___EOS___']", "index": 1221 }, { "content": "def file(*args, **kwargs):\n pass", "metadata": "root.file", "header": "['module', '___EOS___']", "index": 1225 }, { "content": "def particle(*args, **kwargs):\n pass", "metadata": "root.particle", "header": "['module', '___EOS___']", "index": 1229 }, { "content": "def pointLight(*args, **kwargs):\n pass", "metadata": "root.pointLight", "header": "['module', '___EOS___']", "index": 1233 }, { "content": "def layoutDialog(*args, **kwargs):\n pass", "metadata": "root.layoutDialog", "header": "['module', '___EOS___']", "index": 1237 }, { "content": "def floatSlider2(*args, **kwargs):\n pass", "metadata": "root.floatSlider2", "header": "['module', '___EOS___']", "index": 1241 }, { "content": "def hwReflectionMap(*args, **kwargs):\n pass", "metadata": "root.hwReflectionMap", "header": "['module', '___EOS___']", "index": 1245 }, { "content": "def cylinder(*args, **kwargs):\n pass", "metadata": "root.cylinder", "header": "['module', '___EOS___']", "index": 1249 }, { "content": "def nParticle(*args, **kwargs):\n pass", "metadata": "root.nParticle", "header": "['module', '___EOS___']", "index": 1253 }, { "content": "def projectTangent(*args, **kwargs):\n pass", "metadata": "root.projectTangent", "header": "['module', '___EOS___']", "index": 1257 }, { "content": "def polyDelVertex(*args, **kwargs):\n pass", "metadata": "root.polyDelVertex", "header": "['module', '___EOS___']", "index": 1261 }, { "content": "def textScrollList(*args, **kwargs):\n pass", "metadata": "root.textScrollList", "header": "['module', '___EOS___']", "index": 1265 }, { "content": "def polyPoke(*args, **kwargs):\n pass", "metadata": "root.polyPoke", "header": "['module', '___EOS___']", "index": 1269 }, { "content": "def plane(*args, **kwargs):\n pass", "metadata": "root.plane", "header": "['module', '___EOS___']", "index": 1273 }, { "content": "def fitBspline(*args, **kwargs):\n pass", "metadata": "root.fitBspline", "header": "['module', '___EOS___']", "index": 1277 }, { "content": "def textFieldButtonGrp(*args, **kwargs):\n pass", "metadata": "root.textFieldButtonGrp", "header": "['module', '___EOS___']", "index": 1281 }, { "content": "def iconTextButton(*args, **kwargs):\n pass", "metadata": "root.iconTextButton", "header": "['module', '___EOS___']", "index": 1285 }, { "content": "def polyCrease(*args, **kwargs):\n pass", "metadata": "root.polyCrease", "header": "['module', '___EOS___']", "index": 1289 }, { "content": "def polyTransfer(*args, **kwargs):\n pass", "metadata": "root.polyTransfer", "header": "['module', '___EOS___']", "index": 1293 }, { "content": "def polyMapSew(*args, **kwargs):\n pass", "metadata": "root.polyMapSew", "header": "['module', '___EOS___']", "index": 1297 }, { "content": "def EmptyAnimLayer(*args, **kwargs):\n pass", "metadata": "root.EmptyAnimLayer", "header": "['module', '___EOS___']", "index": 1301 }, { "content": "def palettePort(*args, **kwargs):\n pass", "metadata": "root.palettePort", "header": "['module', '___EOS___']", "index": 1305 }, { "content": "def polyAppendVertex(*args, **kwargs):\n pass", "metadata": "root.polyAppendVertex", "header": "['module', '___EOS___']", "index": 1309 }, { "content": "def text(*args, **kwargs):\n pass", "metadata": "root.text", "header": "['module', '___EOS___']", "index": 1313 }, { "content": "def outlinerPanel(*args, **kwargs):\n pass", "metadata": "root.outlinerPanel", "header": "['module', '___EOS___']", "index": 1317 }, { "content": "def GpuCacheExportSelection(*args, **kwargs):\n pass", "metadata": "root.GpuCacheExportSelection", "header": "['module', '___EOS___']", "index": 1321 }, { "content": "def optionVar(*args, **kwargs):\n pass", "metadata": "root.optionVar", "header": "['module', '___EOS___']", "index": 1325 }, { "content": "def disconnectAttr(*args, **kwargs):\n pass", "metadata": "root.disconnectAttr", "header": "['module', '___EOS___']", "index": 1329 }, { "content": "def currentTime(*args, **kwargs):\n pass", "metadata": "root.currentTime", "header": "['module', '___EOS___']", "index": 1333 }, { "content": "def selectKeyframe(*args, **kwargs):\n pass", "metadata": "root.selectKeyframe", "header": "['module', '___EOS___']", "index": 1337 }, { "content": "def showManipCtx(*args, **kwargs):\n pass", "metadata": "root.showManipCtx", "header": "['module', '___EOS___']", "index": 1341 }, { "content": "def shot(*args, **kwargs):\n pass", "metadata": "root.shot", "header": "['module', '___EOS___']", "index": 1345 }, { "content": "def scriptedPanel(*args, **kwargs):\n pass", "metadata": "root.scriptedPanel", "header": "['module', '___EOS___']", "index": 1349 }, { "content": "def shadingNode(*args, **kwargs):\n pass", "metadata": "root.shadingNode", "header": "['module', '___EOS___']", "index": 1353 }, { "content": "def lsThroughFilter(*args, **kwargs):\n pass", "metadata": "root.lsThroughFilter", "header": "['module', '___EOS___']", "index": 1357 }, { "content": "def extrude(*args, **kwargs):\n pass", "metadata": "root.extrude", "header": "['module', '___EOS___']", "index": 1361 }, { "content": "def AlembicExportSelectionOptions(*args, **kwargs):\n pass", "metadata": "root.AlembicExportSelectionOptions", "header": "['module', '___EOS___']", "index": 1365 }, { "content": "def columnLayout(*args, **kwargs):\n pass", "metadata": "root.columnLayout", "header": "['module', '___EOS___']", "index": 1369 }, { "content": "def selectionConnection(*args, **kwargs):\n pass", "metadata": "root.selectionConnection", "header": "['module', '___EOS___']", "index": 1373 }, { "content": "def cmdShell(*args, **kwargs):\n pass", "metadata": "root.cmdShell", "header": "['module', '___EOS___']", "index": 1377 }, { "content": "def extendCurve(*args, **kwargs):\n pass", "metadata": "root.extendCurve", "header": "['module', '___EOS___']", "index": 1381 }, { "content": "def button(*args, **kwargs):\n pass", "metadata": "root.button", "header": "['module', '___EOS___']", "index": 1385 }, { "content": "def closeSurface(*args, **kwargs):\n pass", "metadata": "root.closeSurface", "header": "['module', '___EOS___']", "index": 1389 }, { "content": "def parent(*args, **kwargs):\n pass", "metadata": "root.parent", "header": "['module', '___EOS___']", "index": 1393 }, { "content": "def intFieldGrp(*args, **kwargs):\n pass", "metadata": "root.intFieldGrp", "header": "['module', '___EOS___']", "index": 1397 }, { "content": "def vortex(*args, **kwargs):\n pass", "metadata": "root.vortex", "header": "['module', '___EOS___']", "index": 1401 }, { "content": "def _testDecorator(function):\n pass", "metadata": "root._testDecorator", "header": "['module', '___EOS___']", "index": 1405 }, { "content": "def AlembicImportOptions(*args, **kwargs):\n pass", "metadata": "root.AlembicImportOptions", "header": "['module', '___EOS___']", "index": 1409 }, { "content": "def exclusiveLightCheckBox(*args, **kwargs):\n pass", "metadata": "root.exclusiveLightCheckBox", "header": "['module', '___EOS___']", "index": 1413 }, { "content": "def deformer(*args, **kwargs):\n pass", "metadata": "root.deformer", "header": "['module', '___EOS___']", "index": 1417 }, { "content": "def polyWedgeFace(*args, **kwargs):\n pass", "metadata": "root.polyWedgeFace", "header": "['module', '___EOS___']", "index": 1421 }, { "content": "def bevel(*args, **kwargs):\n pass", "metadata": "root.bevel", "header": "['module', '___EOS___']", "index": 1425 }, { "content": "def subdCleanTopology(*args, **kwargs):\n pass", "metadata": "root.subdCleanTopology", "header": "['module', '___EOS___']", "index": 1429 }, { "content": "def panel(*args, **kwargs):\n pass", "metadata": "root.panel", "header": "['module', '___EOS___']", "index": 1433 }, { "content": "def spring(*args, **kwargs):\n pass", "metadata": "root.spring", "header": "['module', '___EOS___']", "index": 1437 }, { "content": "def nurbsCube(*args, **kwargs):\n pass", "metadata": "root.nurbsCube", "header": "['module', '___EOS___']", "index": 1441 }, { "content": "def shelfTabLayout(*args, **kwargs):\n pass", "metadata": "root.shelfTabLayout", "header": "['module', '___EOS___']", "index": 1445 }, { "content": "def spaceLocator(*args, **kwargs):\n pass", "metadata": "root.spaceLocator", "header": "['module', '___EOS___']", "index": 1449 }, { "content": "def nodeType(*args, **kwargs):\n pass", "metadata": "root.nodeType", "header": "['module', '___EOS___']", "index": 1453 }, { "content": "def menuItem(*args, **kwargs):\n pass", "metadata": "root.menuItem", "header": "['module', '___EOS___']", "index": 1457 }, { "content": "def MentalRayLogfileBatch(*args, **kwargs):\n pass", "metadata": "root.MentalRayLogfileBatch", "header": "['module', '___EOS___']", "index": 1461 }, { "content": "def iconTextStaticLabel(*args, **kwargs):\n pass", "metadata": "root.iconTextStaticLabel", "header": "['module', '___EOS___']", "index": 1465 }, { "content": "def treeView(*args, **kwargs):\n pass", "metadata": "root.treeView", "header": "['module', '___EOS___']", "index": 1469 }, { "content": "def hudSliderButton(*args, **kwargs):\n pass", "metadata": "root.hudSliderButton", "header": "['module', '___EOS___']", "index": 1473 }, { "content": "def hotkeyCheck(*args, **kwargs):\n pass", "metadata": "root.hotkeyCheck", "header": "['module', '___EOS___']", "index": 1477 }, { "content": "def dropoffLocator(*args, **kwargs):\n pass", "metadata": "root.dropoffLocator", "header": "['module', '___EOS___']", "index": 1481 }, { "content": "def dockControl(*args, **kwargs):\n pass", "metadata": "root.dockControl", "header": "['module', '___EOS___']", "index": 1485 }, { "content": "def flow(*args, **kwargs):\n pass", "metadata": "root.flow", "header": "['module', '___EOS___']", "index": 1489 }, { "content": "def layeredTexturePort(*args, **kwargs):\n pass", "metadata": "root.layeredTexturePort", "header": "['module', '___EOS___']", "index": 1493 }, { "content": "def rigidBody(*args, **kwargs):\n pass", "metadata": "root.rigidBody", "header": "['module', '___EOS___']", "index": 1497 }, { "content": "def smoothCurve(*args, **kwargs):\n pass", "metadata": "root.smoothCurve", "header": "['module', '___EOS___']", "index": 1501 }, { "content": "def help(*args, **kwargs):\n pass", "metadata": "root.help", "header": "['module', '___EOS___']", "index": 1505 }, { "content": "def flagTest(*args, **kwargs):\n pass", "metadata": "root.flagTest", "header": "['module', '___EOS___']", "index": 1509 }, { "content": "def grid(*args, **kwargs):\n pass", "metadata": "root.grid", "header": "['module', '___EOS___']", "index": 1513 }, { "content": "def artAttrCtx(*args, **kwargs):\n pass", "metadata": "root.artAttrCtx", "header": "['module', '___EOS___']", "index": 1517 }, { "content": "def arcLengthDimension(*args, **kwargs):\n pass", "metadata": "root.arcLengthDimension", "header": "['module', '___EOS___']", "index": 1521 }, { "content": "def gravity(*args, **kwargs):\n pass", "metadata": "root.gravity", "header": "['module', '___EOS___']", "index": 1525 }, { "content": "def polyAppend(*args, **kwargs):\n pass", "metadata": "root.polyAppend", "header": "['module', '___EOS___']", "index": 1529 }, { "content": "def animCurveEditor(*args, **kwargs):\n pass", "metadata": "root.animCurveEditor", "header": "['module', '___EOS___']", "index": 1533 }, { "content": "def GpuCacheExportAll(*args, **kwargs):\n pass", "metadata": "root.GpuCacheExportAll", "header": "['module', '___EOS___']", "index": 1537 }, { "content": "def alignCurve(*args, **kwargs):\n pass", "metadata": "root.alignCurve", "header": "['module', '___EOS___']", "index": 1541 }, { "content": "def instancer(*args, **kwargs):\n pass", "metadata": "root.instancer", "header": "['module', '___EOS___']", "index": 1545 }, { "content": "def polyPrimitive(*args, **kwargs):\n pass", "metadata": "root.polyPrimitive", "header": "['module', '___EOS___']", "index": 1549 }, { "content": "def polyPlatonicSolid(*args, **kwargs):\n pass", "metadata": "root.polyPlatonicSolid", "header": "['module', '___EOS___']", "index": 1553 }, { "content": "def rename(*args, **kwargs):\n pass", "metadata": "root.rename", "header": "['module', '___EOS___']", "index": 1557 }, { "content": "def characterMap(*args, **kwargs):\n pass", "metadata": "root.characterMap", "header": "['module', '___EOS___']", "index": 1561 }, { "content": "def AlembicExportAllOptions(*args, **kwargs):\n pass", "metadata": "root.AlembicExportAllOptions", "header": "['module', '___EOS___']", "index": 1565 }, { "content": "def referenceQuery(*args, **kwargs):\n pass", "metadata": "root.referenceQuery", "header": "['module', '___EOS___']", "index": 1569 }, { "content": "def frameLayout(*args, **kwargs):\n pass", "metadata": "root.frameLayout", "header": "['module', '___EOS___']", "index": 1573 }, { "content": "def polySplitRing(*args, **kwargs):\n pass", "metadata": "root.polySplitRing", "header": "['module', '___EOS___']", "index": 1577 }, { "content": "def rangeControl(*args, **kwargs):\n pass", "metadata": "root.rangeControl", "header": "['module', '___EOS___']", "index": 1581 }, { "content": "def symbolCheckBox(*args, **kwargs):\n pass", "metadata": "root.symbolCheckBox", "header": "['module', '___EOS___']", "index": 1585 }, { "content": "def polyMapDel(*args, **kwargs):\n pass", "metadata": "root.polyMapDel", "header": "['module', '___EOS___']", "index": 1589 }, { "content": "def polyExtrudeEdge(*args, **kwargs):\n pass", "metadata": "root.polyExtrudeEdge", "header": "['module', '___EOS___']", "index": 1593 }, { "content": "def floatSliderGrp(*args, **kwargs):\n pass", "metadata": "root.floatSliderGrp", "header": "['module', '___EOS___']", "index": 1597 }, { "content": "def polyConnectComponents(*args, **kwargs):\n pass", "metadata": "root.polyConnectComponents", "header": "['module', '___EOS___']", "index": 1601 }, { "content": "def pluginInfo(*args, **kwargs):\n pass", "metadata": "root.pluginInfo", "header": "['module', '___EOS___']", "index": 1605 }, { "content": "def floatFieldGrp(*args, **kwargs):\n pass", "metadata": "root.floatFieldGrp", "header": "['module', '___EOS___']", "index": 1609 }, { "content": "def polyCollapseEdge(*args, **kwargs):\n pass", "metadata": "root.polyCollapseEdge", "header": "['module', '___EOS___']", "index": 1613 }, { "content": "def polyMoveFacetUV(*args, **kwargs):\n pass", "metadata": "root.polyMoveFacetUV", "header": "['module', '___EOS___']", "index": 1617 }, { "content": "def container(*args, **kwargs):\n pass", "metadata": "root.container", "header": "['module', '___EOS___']", "index": 1621 }, { "content": "def filletCurve(*args, **kwargs):\n pass", "metadata": "root.filletCurve", "header": "['module', '___EOS___']", "index": 1625 }, { "content": "def polyMoveEdge(*args, **kwargs):\n pass", "metadata": "root.polyMoveEdge", "header": "['module', '___EOS___']", "index": 1629 }, { "content": "def paramDimension(*args, **kwargs):\n pass", "metadata": "root.paramDimension", "header": "['module', '___EOS___']", "index": 1633 }, { "content": "def polyMergeUV(*args, **kwargs):\n pass", "metadata": "root.polyMergeUV", "header": "['module', '___EOS___']", "index": 1637 }, { "content": "def camera(*args, **kwargs):\n pass", "metadata": "root.camera", "header": "['module', '___EOS___']", "index": 1641 }, { "content": "def polyMergeEdge(*args, **kwargs):\n pass", "metadata": "root.polyMergeEdge", "header": "['module', '___EOS___']", "index": 1645 }, { "content": "def polyMapSewMove(*args, **kwargs):\n pass", "metadata": "root.polyMapSewMove", "header": "['module', '___EOS___']", "index": 1649 }, { "content": "def polyPyramid(*args, **kwargs):\n pass", "metadata": "root.polyPyramid", "header": "['module', '___EOS___']", "index": 1653 }, { "content": "def prepareRender(*args, **kwargs):\n pass", "metadata": "root.prepareRender", "header": "['module', '___EOS___']", "index": 1657 }, { "content": "def polyBridgeEdge(*args, **kwargs):\n pass", "metadata": "root.polyBridgeEdge", "header": "['module', '___EOS___']", "index": 1661 }, { "content": "def polyPipe(*args, **kwargs):\n pass", "metadata": "root.polyPipe", "header": "['module', '___EOS___']", "index": 1665 }, { "content": "def polyFlipUV(*args, **kwargs):\n pass", "metadata": "root.polyFlipUV", "header": "['module', '___EOS___']", "index": 1669 }, { "content": "def polyNormalPerVertex(*args, **kwargs):\n pass", "metadata": "root.polyNormalPerVertex", "header": "['module', '___EOS___']", "index": 1673 }, { "content": "def event(*args, **kwargs):\n pass", "metadata": "root.event", "header": "['module', '___EOS___']", "index": 1677 }, { "content": "def polyChipOff(*args, **kwargs):\n pass", "metadata": "root.polyChipOff", "header": "['module', '___EOS___']", "index": 1681 }, { "content": "def snapshot(*args, **kwargs):\n pass", "metadata": "root.snapshot", "header": "['module', '___EOS___']", "index": 1685 }, { "content": "def cone(*args, **kwargs):\n pass", "metadata": "root.cone", "header": "['module', '___EOS___']", "index": 1689 }, { "content": "def scriptedPanelType(*args, **kwargs):\n pass", "metadata": "root.scriptedPanelType", "header": "['module', '___EOS___']", "index": 1693 }, { "content": "def devicePanel(*args, **kwargs):\n pass", "metadata": "root.devicePanel", "header": "['module', '___EOS___']", "index": 1697 }, { "content": "def layerButton(*args, **kwargs):\n pass", "metadata": "root.layerButton", "header": "['module', '___EOS___']", "index": 1701 }, { "content": "def detachCurve(*args, **kwargs):\n pass", "metadata": "root.detachCurve", "header": "['module', '___EOS___']", "index": 1705 }, { "content": "def AlembicHelp(*args, **kwargs):\n pass", "metadata": "root.AlembicHelp", "header": "['module', '___EOS___']", "index": 1709 }, { "content": "def lsUI(*args, **kwargs):\n pass", "metadata": "root.lsUI", "header": "['module', '___EOS___']", "index": 1713 }, { "content": "def circle(*args, **kwargs):\n pass", "metadata": "root.circle", "header": "['module', '___EOS___']", "index": 1717 }, { "content": "def condition(*args, **kwargs):\n pass", "metadata": "root.condition", "header": "['module', '___EOS___']", "index": 1721 }, { "content": "def AlembicReplace(*args, **kwargs):\n pass", "metadata": "root.AlembicReplace", "header": "['module', '___EOS___']", "index": 1725 }, { "content": "def addAllWrappedCmds():\n pass", "metadata": "root.addAllWrappedCmds", "header": "['module', '___EOS___']", "index": 1729 }, { "content": "def surface(*args, **kwargs):\n pass", "metadata": "root.surface", "header": "['module', '___EOS___']", "index": 1733 }, { "content": "def cluster(*args, **kwargs):\n pass", "metadata": "root.cluster", "header": "['module', '___EOS___']", "index": 1737 }, { "content": "def boneLattice(*args, **kwargs):\n pass", "metadata": "root.boneLattice", "header": "['module', '___EOS___']", "index": 1741 }, { "content": "def polyDuplicateEdge(*args, **kwargs):\n pass", "metadata": "root.polyDuplicateEdge", "header": "['module', '___EOS___']", "index": 1745 }, { "content": "def blendShape(*args, **kwargs):\n pass", "metadata": "root.blendShape", "header": "['module', '___EOS___']", "index": 1749 }, { "content": "def geometryConstraint(*args, **kwargs):\n pass", "metadata": "root.geometryConstraint", "header": "['module', '___EOS___']", "index": 1753 }, { "content": "def bevelPlus(*args, **kwargs):\n pass", "metadata": "root.bevelPlus", "header": "['module', '___EOS___']", "index": 1757 }, { "content": "def formLayout(*args, **kwargs):\n pass", "metadata": "root.formLayout", "header": "['module', '___EOS___']", "index": 1761 }, { "content": "def pointPosition(*args, **kwargs):\n pass", "metadata": "root.pointPosition", "header": "['module', '___EOS___']", "index": 1765 }, { "content": "def control(*args, **kwargs):\n pass", "metadata": "root.control", "header": "['module', '___EOS___']", "index": 1769 }, { "content": "def nurbsSquare(*args, **kwargs):\n pass", "metadata": "root.nurbsSquare", "header": "['module', '___EOS___']", "index": 1773 }, { "content": "def stroke(*args, **kwargs):\n pass", "metadata": "root.stroke", "header": "['module', '___EOS___']", "index": 1777 }, { "content": "def sculpt(*args, **kwargs):\n pass", "metadata": "root.sculpt", "header": "['module', '___EOS___']", "index": 1781 }, { "content": "def sphere(*args, **kwargs):\n pass", "metadata": "root.sphere", "header": "['module', '___EOS___']", "index": 1785 }, { "content": "def createNode(*args, **kwargs):\n pass", "metadata": "root.createNode", "header": "['module', '___EOS___']", "index": 1789 }, { "content": "def nurbsToSubdiv(*args, **kwargs):\n pass", "metadata": "root.nurbsToSubdiv", "header": "['module', '___EOS___']", "index": 1793 }, { "content": "def nodeIconButton(*args, **kwargs):\n pass", "metadata": "root.nodeIconButton", "header": "['module', '___EOS___']", "index": 1797 }, { "content": "def namespaceInfo(*args, **kwargs):\n pass", "metadata": "root.namespaceInfo", "header": "['module', '___EOS___']", "index": 1801 }, { "content": "def menuSet(*args, **kwargs):\n pass", "metadata": "root.menuSet", "header": "['module', '___EOS___']", "index": 1805 }, { "content": "def channelBox(*args, **kwargs):\n pass", "metadata": "root.channelBox", "header": "['module', '___EOS___']", "index": 1809 }, { "content": "def partition(*args, **kwargs):\n pass", "metadata": "root.partition", "header": "['module', '___EOS___']", "index": 1813 }, { "content": "def shadingLightRelCtx(*args, **kwargs):\n pass", "metadata": "root.shadingLightRelCtx", "header": "['module', '___EOS___']", "index": 1817 }, { "content": "def shadingGeometryRelCtx(*args, **kwargs):\n pass", "metadata": "root.shadingGeometryRelCtx", "header": "['module', '___EOS___']", "index": 1821 }, { "content": "def scriptCtx(*args, **kwargs):\n pass", "metadata": "root.scriptCtx", "header": "['module', '___EOS___']", "index": 1825 }, { "content": "def cameraView(*args, **kwargs):\n pass", "metadata": "root.cameraView", "header": "['module', '___EOS___']", "index": 1829 }, { "content": "def uniform(*args, **kwargs):\n pass", "metadata": "root.uniform", "header": "['module', '___EOS___']", "index": 1833 }, { "content": "def ikHandle(*args, **kwargs):\n pass", "metadata": "root.ikHandle", "header": "['module', '___EOS___']", "index": 1837 }, { "content": "def polyCube(*args, **kwargs):\n pass", "metadata": "root.polyCube", "header": "['module', '___EOS___']", "index": 1841 }, { "content": "def trim(*args, **kwargs):\n pass", "metadata": "root.trim", "header": "['module', '___EOS___']", "index": 1845 }, { "content": "def attrControlGrp(*args, **kwargs):\n pass", "metadata": "root.attrControlGrp", "header": "['module', '___EOS___']", "index": 1849 }, { "content": "def tabLayout(*args, **kwargs):\n pass", "metadata": "root.tabLayout", "header": "['module', '___EOS___']", "index": 1853 }, { "content": "def torus(*args, **kwargs):\n pass", "metadata": "root.torus", "header": "['module', '___EOS___']", "index": 1857 }, { "content": "def scale(*args, **kwargs):\n pass", "metadata": "root.scale", "header": "['module', '___EOS___']", "index": 1861 }, { "content": "def subdLayoutUV(*args, **kwargs):\n pass", "metadata": "root.subdLayoutUV", "header": "['module', '___EOS___']", "index": 1865 }, { "content": "def delete(*args, **kwargs):\n pass", "metadata": "root.delete", "header": "['module', '___EOS___']", "index": 1869 }, { "content": "def duplicate(*args, **kwargs):\n pass", "metadata": "root.duplicate", "header": "['module', '___EOS___']", "index": 1873 }, { "content": "def drag(*args, **kwargs):\n pass", "metadata": "root.drag", "header": "['module', '___EOS___']", "index": 1877 }, { "content": "def rigidSolver(*args, **kwargs):\n pass", "metadata": "root.rigidSolver", "header": "['module', '___EOS___']", "index": 1881 }, { "content": "def listRelatives(*args, **kwargs):\n pass", "metadata": "root.listRelatives", "header": "['module', '___EOS___']", "index": 1885 }, { "content": "def colorSliderButtonGrp(*args, **kwargs):\n pass", "metadata": "root.colorSliderButtonGrp", "header": "['module', '___EOS___']", "index": 1889 }, { "content": "def renderWindowEditor(*args, **kwargs):\n pass", "metadata": "root.renderWindowEditor", "header": "['module', '___EOS___']", "index": 1893 }, { "content": "def subdiv(*args, **kwargs):\n pass", "metadata": "root.subdiv", "header": "['module', '___EOS___']", "index": 1897 }, { "content": "def colorEditor(*args, **kwargs):\n pass", "metadata": "root.colorEditor", "header": "['module', '___EOS___']", "index": 1901 }, { "content": "def polyExtrudeVertex(*args, **kwargs):\n pass", "metadata": "root.polyExtrudeVertex", "header": "['module', '___EOS___']", "index": 1905 }, { "content": "def helpLine(*args, **kwargs):\n pass", "metadata": "root.helpLine", "header": "['module', '___EOS___']", "index": 1909 }, { "content": "def hardwareRenderPanel(*args, **kwargs):\n pass", "metadata": "root.hardwareRenderPanel", "header": "['module', '___EOS___']", "index": 1913 }, { "content": "def promptDialog(*args, **kwargs):\n pass", "metadata": "root.promptDialog", "header": "['module', '___EOS___']", "index": 1917 }, { "content": "def gridLayout(*args, **kwargs):\n pass", "metadata": "root.gridLayout", "header": "['module', '___EOS___']", "index": 1921 }, { "content": "def aimConstraint(*args, **kwargs):\n pass", "metadata": "root.aimConstraint", "header": "['module', '___EOS___']", "index": 1925 }, { "content": "def wire(*args, **kwargs):\n pass", "metadata": "root.wire", "header": "['module', '___EOS___']", "index": 1929 }, { "content": "def GpuCacheImportOptions(*args, **kwargs):\n pass", "metadata": "root.GpuCacheImportOptions", "header": "['module', '___EOS___']", "index": 1933 }, { "content": "def emitter(*args, **kwargs):\n pass", "metadata": "root.emitter", "header": "['module', '___EOS___']", "index": 1937 }, { "content": "def alignSurface(*args, **kwargs):\n pass", "metadata": "root.alignSurface", "header": "['module', '___EOS___']", "index": 1941 }, { "content": "def curve(*args, **kwargs):\n pass", "metadata": "root.curve", "header": "['module', '___EOS___']", "index": 1945 }, { "content": "def intSliderGrp(*args, **kwargs):\n pass", "metadata": "root.intSliderGrp", "header": "['module', '___EOS___']", "index": 1949 }, { "content": "def dynGlobals(*args, **kwargs):\n pass", "metadata": "root.dynGlobals", "header": "['module', '___EOS___']", "index": 1953 }, { "content": "def separator(*args, **kwargs):\n pass", "metadata": "root.separator", "header": "['module', '___EOS___']", "index": 1957 }, { "content": "def attachSurface(*args, **kwargs):\n pass", "metadata": "root.attachSurface", "header": "['module', '___EOS___']", "index": 1961 }, { "content": "def rowColumnLayout(*args, **kwargs):\n pass", "metadata": "root.rowColumnLayout", "header": "['module', '___EOS___']", "index": 1965 }, { "content": "def setAttr(*args, **kwargs):\n pass", "metadata": "root.setAttr", "header": "['module', '___EOS___']", "index": 1969 } ]
[ { "span": "import pymel.versions as versions", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 33 }, { "span": "import sys", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 10 }, { "span": "import os", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 9 }, { "span": "import warnings", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 15 }, { "span": "import maya", "start_line": 17, "start_column": 0, "end_line": 17, "end_column": 11 }, { "span": "import pymel.util as util", "start_line": 18, "start_column": 0, "end_line": 18, "end_column": 25 }, { "span": "from exceptions import ValueError as objectErrorType", "start_line": 22, "start_column": 0, "end_line": 22, "end_column": 52 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "There", " ", "are", " ", "a", " ", "number", " ", "of", " ", "pym", "el", " ", "object", "s", " ", "whi", "ch", " ", "must", " ", "be", " ", "convert", "ed", " ", "to", " ", "a", " ", "\"", "mel", "-", "frie", "ndl", "y", "\"", "\\", "10", ";", "represent", "ation", ".", " ", "For", " ", "example", ",", " ", "in", " ", "version", "s", " ", "prior", " ", "to", " ", "200", "9", ",", " ", "some", " ", "mel", " ", "command", "s", " ", "(", "ie", ",", " ", "get", "Attr", ")", " ", "whi", "ch", " ", "expect", "\\", "10", ";", "string", " ", "argu", "ment", "s", " ", "will", " ", "simp", "ly", " ", "reject", " ", "custom", " ", "classe", "s", ",", " ", "even", " ", "if", " ", "the", "y", " ", "have", " ", "a", " ", "valid", " ", "string", " ", "represent", "ation", ".", "\\", "10", ";", "Ano", "ther", " ", "Exam", "ple", " ", "is", " ", "mel", "'", "s", " ", "matrix", " ", "inputs", ",", " ", "whi", "ch", " ", "expect", "s", " ", "a", " ", "flat", " ", "list", " ", "of", " ", "16", " ", "fla", "ots", ",", " ", "whi", "le", " ", "pym", "el", "'", "s", " ", "Matrix", " ", "has", " ", "a", " ", "more", " ", "typical", "\\", "10", ";", "4", "x4", " ", "represent", "ation", ".", "\\", "10", ";", "\\", "10", ";", "If", " ", "you", "'", "re", " ", "hav", "ing", " ", "compatibility", " ", "issue", "s", " ", "with", " ", "your", " ", "custom", " ", "classe", "s", " ", "whe", "n", " ", "passi", "ng", " ", "them", " ", "to", " ", "maya", ".", "cmds", ",", "\\", "10", ";", "simp", "ly", " ", "add", " ", "a", " ", "\\u\\u", "melo", "bject", "\\u\\u", " ", "function", " ", "tha", "t", " ", "return", "s", " ", "a", " ", "mel", "-", "frie", "ndl", "y", " ", "result", " ", "and", " ", "pass", " ", "them", " ", "to", " ", "pym", "el", "'", "s", " ", "wrapp", "ed", " ", "command", "s", ".", "\\", "10", ";", "\\", "10", ";", "The", " ", "wrapp", "ed", " ", "command", "s", " ", "in", " ", "this", " ", "module", " ", "are", " ", "the", " ", "startin", "g", " ", "point", " ", "for", " ", "any", " ", "other", " ", "pym", "el", " ", "customization", "s", ".", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "pym", "el_", "._", "versions_", "as_", "versions_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "warnings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "maya", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pym", "el_", "._", "util_", "as_", "util_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "maya", "_", "._", "cmds_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "exceptions_", "import_", "Value", "Error_", "as_", "object", "Error", "Type_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uN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\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "object", "Error", "Reg_", "=_", "None_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "instance_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Split_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tool", "Proper", "ty", "Window_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Cmd", "Name_", "(_", "in", "Func_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Us", "e", " ", "in", " ", "place", " ", "of", " ", "in", "Func", ".\\u", "\\u", "name", "\\u\\u", " ", "whe", "n", " ", "in", "Func", " ", "coul", "d", " ", "be", " ", "a", " ", "maya", ".", "cmds", " ", "cmd", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "handle", "s", " ", "stub", "Func", "s", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tool", "Bar_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Reduce", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "point", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Scroll", "Bar_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Color", "Per", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Del", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "text", "Field_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "point", "On", "Poly", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "filter_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "extend", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "insert", "Kno", "t", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "curve", "Intersect", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "parent", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "font", "Dialog_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rebu", "ild", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "connect", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Normalize", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "To", "Subd", "iv_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Cone", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Tria", "ngul", "ate_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "create", "Display", "Layer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Boo", "l", "Op_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "skin", "Cluster_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "direction", "al", "Light_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "nur", "bs", "Plane_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "offset", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fluid", "Emitte", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "script", "Job_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "manip", "Move", "Context_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scen", "e", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "lof", "t_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "command", "Line_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "color", "Index", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "export", "Edit", "s_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "Connections_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "workspace_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ment", "al", "Ray", "Approx", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hud", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "boundary_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "visor", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subd", "Map", "Cut", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "move_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Export", "Selecti", "on", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "nur", "bs", "Curve", "To", "Bez", "ier_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "non", "Linear_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spot", "Light_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "int", "Scroll", "Bar_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "node", "Outline", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "lattice_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "check", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "menu_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "check", "Box", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "select_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "image_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "unload", "Plugin_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "light", "List_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "distance", "Dimension_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hud", "Slider_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Enum", "Optio", "n", "Menu_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "symbol", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "menu", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Color", "Del", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "create", "Render", "Layer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reverse", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "manip", "Scale", "Context_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ment", "al", "Ray", "Log", "file", "Render_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scroll", "Field_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "image", "Window", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Heli", "x_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shelf", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "group_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "array", "Mapper_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "user", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "anim", "Layer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sets_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "save", "Prefs", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Scroll", "List_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "row", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ui", "Template_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Strai", "ghte", "n", "UV", "Border", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Radio", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Check", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ramp", "Color", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "radio", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Sof", "t", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "gradi", "ent", "Control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "turb", "ulen", "ce_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Se", "w", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tool", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flow", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "project", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "time", "Control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Slider_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Classificat", "ion_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Field", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "PP", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "picture_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Export", "All", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Enum", "Optio", "n", "Menu", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "expression_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tangent", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dag", "Pose", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "transfer", "Attributes_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Export", "Selection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attach", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Pri", "sm_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Plane_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Map", "Cut", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Opt", "Uv", "s_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "assign", "Command_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Tor", "us_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Move", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Clos", "e", "Border", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pane", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Average", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "orient", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "option", "Menu_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "object", "Type", "UI_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "command", " ", "return", "s", " ", "the", " ", "type", " ", "of", " ", "UI", " ", "element", " ", "suc", "h", " ", "as", " ", "button", ",", " ", "slide", "rs", ",", " ", "etc", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "Fla", "gs", ":", "\\", "10", ";", " ", " ", "-", " ", "is", "Type", " ", ":", " ", "i", " ", " ", " ", "(", "unicode", ")", " ", " ", " ", "[", "create", "]", "\\", "10", ";", " ", " ", "Return", "s", " ", "true", "|", "fal", "se", " ", "if", " ", "the", " ", "object", " ", "is", " ", "of", " ", "the", " ", "specified", " ", "type", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", "-", " ", "list", "All", " ", ":", " ", "la", " ", "(", "bool", ")", " ", " ", "[", "create", "]", "\\", "10", ";", " ", " ", "Return", "s", " ", "a", " ", "list", " ", "of", " ", "all", " ", "know", "n", " ", "UI", " ", "command", "s", " ", "and", " ", "thei", "r", " ", "respec", "tiv", "e", " ", "types", ".", " ", "Ea", "ch", " ", "entry", " ", "contain", "s", " ", "three", " ", "string", "s", " ", "whi", "ch", " ", "are", " ", "the", "\\", "10", ";", " ", " ", "command", " ", "name", ",", " ", "ui", " ", "type", " ", "and", " ", "class", " ", "name", ".", " ", "Not", "e", " ", "tha", "t", " ", "the", " ", "class", " ", "name", " ", "is", " ", "internal", " ", "and", " ", "is", " ", "subject", " ", "to", " ", "change", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", "-", " ", "super", "Class", "es", " ", ":", " ", "sc", " ", " ", " ", " ", " ", " ", "(", "bool", ")", " ", " ", "[", "create", "]", "\\", "10", ";", " ", " ", "Return", "s", " ", "a", " ", "list", " ", "of", " ", "the", " ", "names", " ", "of", " ", "all", " ", "super", " ", "classe", "s", " ", "for", " ", "the", " ", "give", "n", " ", "object", ".", " ", "Not", "e", " ", "tha", "t", " ", "all", " ", "class", " ", "names", " ", "are", " ", "internal", " ", "and", " ", "are", "\\", "10", ";", " ", " ", "subject", " ", "to", " ", "change", ".", "Fla", "g", " ", "can", " ", "appear", " ", "in", " ", "Creat", "e", " ", "mode", " ", "of", " ", "command", "Fla", "g", " ", "can", " ", "have", " ", "multiple", " ", "argu", "ment", "s", ",", " ", "pass", "ed", " ", "eit", "her", " ", "as", " ", "a", " ", "tuple", " ", "or", "\\", "10", ";", " ", " ", "a", " ", "list", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "Derive", "d", " ", "from", " ", "mel", " ", "command", " ", "`", "maya", ".", "cmds", ".", "object", "Type", "UI", "`", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scroll", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shelf", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "name", "Command_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "deta", "ch", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "came", "ra", "Set_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "command", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ment", "al", "Ray", "Custom", "Text", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "Animat", "able_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cmd", "Scroll", "Field", "Execut", "er_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "round", "Const", "ant", "Radius_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "window_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "clip", "Schedule", "r", "Outline", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "web", "Browser_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "volume", "Axis_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "blend", "Shape", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "psd", "Chan", "nel", "Outline", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Dynamic", " ", "librar", "y", " ", "stub", " ", "function", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subd", "Map", "Se", "w", "Move_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Blin", "d", "Data_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flush", "Und", "o_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "confirm", "Dialog_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spot", "Light", "Preview", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sound", "Control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "normal", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "layer", "ed", "Shader", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "model", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rotate_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "joint", "Cluster_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "menu", "Bar", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "keyframe", "Stats_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "image", "Plane_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ik", "System_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "undo", "Info_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "remove", "Wrapp", "ed", "Cmd_", "(_", "cmd", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Radio", "Collection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Edit", "Ed", "ge", "Flow_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hyper", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attribute", "Menu_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "progress", "Bar_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ads", "k", "Asset", "List", "UI_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pole", "Vector", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "art", "User", "Paint", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Select", "ed", "Anim", "Layer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "joint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dragg", "er", "Context_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Import_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reverse", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "character_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Export", "All_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "load", "Plugin_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "renderer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Lay", "out", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Cut", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "head", "s", "Up", "Display_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hot", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "art", "3d", "Paint", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ambient", "Light_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Normal_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "edit", "Metadata_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "repeat", "Last_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dyn", "Paint", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "keyframe", "Outline", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "callbacks_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "n", "Base_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "Sets_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rebu", "ild", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "gradi", "ent", "Control", "No", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Sphere", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Flip", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "global", "Sti", "tch_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "time", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "air_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "assembly_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "textu", "re", "Window_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flex", "or_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Be", "vel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "text", "Field", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "offset", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Dynamic", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "file", "Info_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "default", "Light", "List", "Check", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "manip", "Rotate", "Context_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "choice_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "quit_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "arc", "len_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Open_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pair", "Ble", "nd_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Project", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Mel", "Representation", "_", "(_", "args_", ",_", "recursion", "Limit_", "=_", "None_", ",_", "maintain", "Dict", "s_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Wil", "l", " ", "return", " ", "a", " ", "list", " ", "whi", "ch", " ", "contain", "s", " ", "each", " ", "element", " ", "of", " ", "the", " ", "iterable", " ", "'", "args", "'", " ", "convert", "ed", " ", "to", " ", "a", " ", "mel", "-", "frie", "ndl", "y", " ", "represent", "ation", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", ":", "Parameter", "s", ":", "\\", "10", ";", " ", " ", " ", " ", "recursion", "Limit", " ", ":", " ", "int", " ", "or", " ", "Non", "e", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "an", " ", "element", " ", "of", " ", "args", " ", "is", " ", "its", "elf", " ", "iterable", ",", " ", "recursion", "Limit", " ", "speci", "fie", "s", " ", "the", " ", "depth", " ", "to", " ", "whi", "ch", " ", "iterable", " ", "element", "s", "\\", "10", ";", " ", " ", " ", " ", "will", " ", "recurs", "ively", " ", "search", " ", "for", " ", "object", "s", " ", "to", " ", "convert", ";", " ", "if", " ", "``", "recursion", "Limit", "==", "0", "``", ",", " ", "only", " ", "the", " ", "element", "s", "\\", "10", ";", " ", " ", " ", " ", "of", " ", "args", " ", "its", "elf", " ", "will", " ", "be", " ", "searche", "d", " ", "for", " ", "Py", "Node", "s", " ", "-", " ", " ", "if", " ", "it", " ", "is", " ", "1", ",", " ", "iterable", "s", " ", "within", " ", "args", " ", "will", " ", "have", " ", "get", "Mel", "Representation", " ", "call", "ed", "\\", "10", ";", " ", " ", " ", " ", "on", " ", "them", ",", " ", "etc", ".", " ", " ", "If", " ", "recursion", "Limit", "==", "Non", "e", ",", " ", "then", " ", "there", " ", "is", " ", "no", " ", "limit", " ", "to", " ", "recursion", " ", "depth", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "maintain", "Dict", "s", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "In", " ", "genera", "l", ",", " ", "all", " ", "iterable", "s", " ", "will", " ", "be", " ", "convert", "ed", " ", "to", " ", "tuple", "s", " ", "in", " ", "the", " ", "return", "ed", " ", "copy", " ", "-", " ", "how", "ever", ",", " ", "if", " ", "maintain", "Dict", "s", "==", "Tru", "e", ",", "\\", "10", ";", " ", " ", " ", " ", "then", " ", "iterable", "s", " ", "for", " ", "whi", "ch", " ", "``", "util", ".", "is", "Map", "ping", "()``", " ", "return", "s", " ", "Tru", "e", " ", "will", " ", "be", " ", "return", "ed", " ", "as", " ", "dict", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Copy", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "prelo", "ad", "Ref", "Ed", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "soft", "Mod_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "eval_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Dynamic", " ", "librar", "y", " ", "stub", " ", "function", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "outline", "r", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "option", "Menu", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hyper", "Graph_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "insert", "Kno", "t", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "script", "Table_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scale", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ls_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "component", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "color", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set", "Parent_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "History_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cmd", "Scroll", "Field", "Reporter_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "close", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Install", "Action_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "blend", "Tw", "o", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "file", "Brows", "er", "Dialog_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "bezier", "Curve", "To", "Nu", "rb", "s_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "UV", "Rectangle_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Quad", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "batch", "Render_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "node", "Tree", "Liste", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "switch", "Table_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "model", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "node", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "message", "Line_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sequence", "Manager_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "name", "Field_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "mute_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Navigat", "ion", "Control", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "key", "ing", "Group_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "untr", "im_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ik", "Solver_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "joint", "Lattice", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hyper", "Shad", "e_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Field", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tree", "Liste", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hotkey", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Color", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "swa", "tch", "Display", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "save", "Image_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "int", "Slider_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "keyframe", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run", "Time", "Command_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "revo", "lve", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Import_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reference_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Del", "Facet", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Move", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "popu", "p", "Menu_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Color", "Mod_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "annotate_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Wrapp", "ed", "Cmd_", "(_", "cmd", "name_", ",_", "cmd_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "angle", "Bet", "ween", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "radio", "Menu", "Item", "Collection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "radio", "Collection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "canvas_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Smooth", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reference", "Edit_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Split", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "radio", "Butt", "on", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tool", "Collection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Separate", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Unit", "e_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Select", "Constr", "aint", "Monitor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "time", "War", "p_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Slide", "r", "Butt", "on", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "int", "Field_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Field_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Cylinder", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "file_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "particle_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "point", "Light_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "layout", "Dialog_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Slide", "r2_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hw", "Reflect", "ion", "Map_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cylinder", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "n", "Particle_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "project", "Tang", "ent_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Del", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "text", "Scroll", "List_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Poke", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "plane_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fit", "Bs", "plin", "e_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "text", "Field", "Butt", "on", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Crea", "se_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Transfer", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Map", "Se", "w_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Emp", "ty", "Anim", "Layer_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "palette", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Append", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "text_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "outline", "r", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Export", "Selection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "option", "Var_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "discon", "nect", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "current", "Time_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "select", "Key", "frame_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "show", "Mani", "p", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shot_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "script", "ed", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shad", "ing", "Node_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ls", "Through", "Filter_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "extrude", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Export", "Selecti", "on", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "column", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "selection", "Connection_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cmd", "Shell_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "extend", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "close", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "parent_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "int", "Field", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "vor", "tex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test", "Decorator_", "(_", "function_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Import", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "exclu", "sive", "Light", "Check", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "deform", "er_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "We", "dge", "Face_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "bev", "el_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subd", "Clean", "Topology", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spring", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "nur", "bs", "Cube_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shelf", "Tab", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "space", "Locator_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "node", "Type_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "menu", "Item_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ment", "al", "Ray", "Log", "file", "Batch_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "icon", "Text", "Static", "Label_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tree", "View_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hud", "Slide", "r", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hotkey", "Check_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "drop", "off", "Locator_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dock", "Control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flow_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "layer", "ed", "Text", "ure", "Port_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rigid", "Body_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "smooth", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "help_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flag", "Test_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "grid_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "art", "Attr", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "arc", "Length", "Dimension_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "gravity", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Append_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "anim", "Curve", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Export", "All_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "align", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "instance", "r_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Primitive", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Plat", "onic", "Soli", "d_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rename_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "character", "Map_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Export", "All", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reference", "Query_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "frame", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Split", "Ring_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "range", "Control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "symbol", "Check", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Map", "Del", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Extr", "ude", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Connect", "Components_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "plugin", "Info_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "float", "Field", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Collaps", "e", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Move", "Facet", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "container_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fill", "et", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Move", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "param", "Dimension_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Merge", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "camera_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Merge", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Map", "Se", "w", "Move_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Pyr", "amid", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "prepar", "e", "Render_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Bridge", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Pipe_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Flip", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Normal", "Per", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "event_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Chip", "Off_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "snapshot_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cone", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "script", "ed", "Pane", "l", "Type_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "device", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "layer", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "deta", "ch", "Curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Help_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ls", "UI_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "circle_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "condition_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Ale", "mbic", "Replace", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "All", "Wrapp", "ed", "Cmd", "s_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cluster_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "bone", "Lattice", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Duplicate", "Edge_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "blend", "Shape_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "geom", "etry", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "bev", "el", "Plus", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "form", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "point", "Position_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "control_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "nur", "bs", "Square_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stroke_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scu", "lpt", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sphere_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "create", "Node_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "nur", "bs", "To", "Subd", "iv_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "node", "Ico", "n", "Button_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "namespace", "Info_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "menu", "Set_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "channel", "Box_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "partition_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shad", "ing", "Light", "Rel", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shad", "ing", "Geometr", "y", "Rel", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "script", "Ctx_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "came", "ra", "View_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "uniform_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ik", "Handle_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Cube_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "trim_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attr", "Control", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tab", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tor", "us_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "scale_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subd", "Lay", "out", "UV", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "delete_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "duplicate_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "drag", "_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rigid", "Solver_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "Relative", "s_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "color", "Slide", "r", "Butt", "on", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "render", "Window", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subd", "iv_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "color", "Editor_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "poly", "Extr", "ude", "Vertex_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "help", "Line_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "hard", "ware", "Render", "Panel_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "prompt", "Dialog_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "grid", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "aim", "Constraint_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "wire_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Gp", "u", "Cache", "Import", "Options_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "emitter_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "align", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "curve_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "int", "Slide", "r", "Grp_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "dyn", "Globals_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "separator_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "attach", "Surface_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "row", "Colum", "n", "Layout_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set", "Attr_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
AppScale/appscale/AppDashboard/lib/app_dashboard_helper.py
[ { "content": " def does_app_exist(self, appname):\n \"\"\" Queries the UserAppServer to see if the named application id has been\n registered.\n\n Args:\n appname: A str containing the name of the application we wish to query.\n Returns:\n True if the app id has been registered, and False otherwise.\n \"\"\"\n try:\n result = self.get_uaserver().does_app_exists(appname, GLOBAL_SECRET_KEY)\n if search_data:\n num_ports = int(search_data.group(1))\n return num_ports > 0\n else:\n return False\n except Exception as err:\n logging.exception(err)\n return False", "metadata": "root.AppDashboardHelper.does_app_exist", "header": "['class', 'AppDashboardHelper', '(', 'object', ')', ':', '___EOS___']", "index": 419 } ]
[ { "span": "result ", "start_line": 429, "start_column": 6, "end_line": 429, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "App", "Dash", "board", "Helper_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "doe", "s", "\\u", "app", "\\u", "exist_", "(_", "self_", ",_", "appname_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Querie", "s", " ", "the", " ", "User", "App", "Server", " ", "to", " ", "see", " ", "if", " ", "the", " ", "named", " ", "applica", "tion", " ", "id", " ", "has", " ", "bee", "n", "\\", "10", ";", " ", " ", " ", " ", "register", "ed", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Arg", "s", ":", "\\", "10", ";", " ", " ", "app", "name", ":", " ", "A", " ", "str", " ", "contain", "ing", " ", "the", " ", "name", " ", "of", " ", "the", " ", "applica", "tion", " ", "we", " ", "wish", " ", "to", " ", "query", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", ":", "\\", "10", ";", " ", " ", "Tru", "e", " ", "if", " ", "the", " ", "app", " ", "id", " ", "has", " ", "bee", "n", " ", "register", "ed", ",", " ", "and", " ", "Fal", "se", " ", "other", "wis", "e", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result_", "=_", "self_", "._", "get", "\\u", "ua", "server_", "(_", ")_", "._", "doe", "s", "\\u", "app", "\\u", "exists_", "(_", "appname_", ",_", "GLOB", "AL", "\\u", "SEC", "RET", "\\u", "KEY_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "search", "\\u", "data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "num", "\\u", "ports_", "=_", "int_", "(_", "search", "\\u", "data_", "._", "group_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "num", "\\u", "ports_", ">_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "err_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "exception_", "(_", "err_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
agiliq/merchant/billing/tests/test_eway.py
[ { "content": " def testPaymentSuccessfulSignal(self):\n # Since in the test mode, all transactions are\n # failures, we need to be checking for transaction_was_unsuccessful\n received_signals = []\n\n def receive(sender, **kwargs):\n received_signals.append(kwargs.get(\"signal\"))\n\n transaction_was_unsuccessful.connect(receive)\n\n resp = self.merchant.purchase(1, self.credit_card,\n options=fake_options)\n self.assertEquals(received_signals, [transaction_was_unsuccessful])", "metadata": "root.EWayGatewayTestCase.testPaymentSuccessfulSignal", "header": "['class', 'EWayGatewayTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 105 }, { "content": " def testPaymentUnSuccessfulSignal(self):\n received_signals = []\n\n def receive(sender, **kwargs):\n received_signals.append(kwargs.get(\"signal\"))\n\n transaction_was_unsuccessful.connect(receive)\n\n resp = self.merchant.purchase(6, self.credit_card,\n options=fake_options)\n self.assertEquals(received_signals, [transaction_was_unsuccessful])", "metadata": "root.EWayGatewayTestCase.testPaymentUnSuccessfulSignal", "header": "['class', 'EWayGatewayTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 119 } ]
[ { "span": "resp ", "start_line": 115, "start_column": 8, "end_line": 115, "end_column": 12 }, { "span": "resp ", "start_line": 127, "start_column": 8, "end_line": 127, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "EW", "ay", "Gat", "ewa", "y", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Payment", "Success", "ful", "Signal_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Sin", "ce", " ", "in", " ", "the", " ", "test", " ", "mode", ",", " ", "all", " ", "transaction", "s", " ", "are", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "fail", "ure", "s", ",", " ", "we", " ", "need", " ", "to", " ", "be", " ", "checking", " ", "for", " ", "transaction", "\\u", "was", "\\u", "unsuc", "cess", "ful_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "receive", "d\\u", "signals_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "receive_", "(_", "sender_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "receive", "d\\u", "signals_", "._", "append_", "(_", "kwargs_", "._", "get_", "(_", "\"", "signal", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "transaction", "\\u", "was", "\\u", "unsuc", "cess", "ful_", "._", "connect_", "(_", "receive_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "resp_", "=_", "self_", "._", "merchant", "_", "._", "purchase", "_", "(_", "1_", ",_", "self_", "._", "credit", "\\u", "card_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "options_", "=_", "fake", "\\u", "options_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "receive", "d\\u", "signals_", ",_", "[_", "transaction", "\\u", "was", "\\u", "unsuc", "cess", "ful_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "EW", "ay", "Gat", "ewa", "y", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Payment", "Un", "Success", "ful", "Signal_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "receive", "d\\u", "signals_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "receive_", "(_", "sender_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "receive", "d\\u", "signals_", "._", "append_", "(_", "kwargs_", "._", "get_", "(_", "\"", "signal", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "transaction", "\\u", "was", "\\u", "unsuc", "cess", "ful_", "._", "connect_", "(_", "receive_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "resp_", "=_", "self_", "._", "merchant", "_", "._", "purchase", "_", "(_", "6_", ",_", "self_", "._", "credit", "\\u", "card_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "options_", "=_", "fake", "\\u", "options_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "receive", "d\\u", "signals_", ",_", "[_", "transaction", "\\u", "was", "\\u", "unsuc", "cess", "ful_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
Cimpress-MCP/JustReleaseNotes/JustReleaseNotes/issuers/JiraIssues.py
[ { "content": "import sys, re\nimport requests\nimport json\nfrom JustReleaseNotes.issuers import BaseIssues\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class JiraIssues(BaseIssues.BaseIssues):\n __restSearchUrl = None\n __jiraAuthorization = None\n __cache = {}\n\n\n\n\n", "metadata": "root.JiraIssues", "header": "['module', '___EOS___']", "index": 5 }, { "content": " def __init__(self, conf):\n self.__restSearchUrl = conf[\"Url\"]\n self.__jiraAuthorization = conf[\"Authorization\"]\n self.__conf = conf\n self.ticketRegex = '([A-Z]{2,5}-[0-9]+)'\n if \"TicketRegex\" in conf:\n self.ticketRegex = conf[\"TicketRegex\"]", "metadata": "root.JiraIssues.__init__", "header": "['class', 'JiraIssues', '(', 'BaseIssues', '.', 'BaseIssues', ')', ':', '___EOS___']", "index": 10 }, { "content": " def __log(self, message):\n print (\"Jira: \" + message)\n sys.stdout.flush()", "metadata": "root.JiraIssues.__log", "header": "['class', 'JiraIssues', '(', 'BaseIssues', '.', 'BaseIssues', ')', ':', '___EOS___']", "index": 18 }, { "content": " def __readJsonInfo(self, ticket):\n\n if ticket in self.__cache:\n self.__log(\"Cached ticket info for \" + ticket)\n return self.__cache[ticket]\n\n uri = \"{0}/{1}\".format(self.__restSearchUrl,ticket)\n headers = { 'Authorization': self.__jiraAuthorization }\n self.__log(\"Retrieving ticket info for \" + ticket)\n r = requests.get( uri, headers = headers, verify=False )\n data = json.loads(r.text)\n if \"errorMessages\" in data:\n self.__log(\"Error retrieving Jira info: \" + \",\".join(data[\"errorMessages\"]))\n self.__cache[ticket] = data\n return data", "metadata": "root.JiraIssues.__readJsonInfo", "header": "['class', 'JiraIssues', '(', 'BaseIssues', '.', 'BaseIssues', ')', ':', '___EOS___']", "index": 22 }, { "content": " def getTicketInfo(self, ticket):\n data = self.__readJsonInfo(ticket)\n\n embedded_links = {}\n title = \"Untitled\"\n ret = { \"html_url\" : \"{0}/{1}\".format(self.__conf[\"HtmlUrl\"],ticket),\n \"ticket\" : ticket,\n \"title\" : title }\n\n if \"fields\" in data.keys():\n title = data[\"fields\"][\"summary\"]\n ret[\"title\"] = title\n for ticket in self.extractTicketsFromMessage(title):\n embedded_links[ticket] = \"{0}/{1}\".format(self.__conf[\"HtmlUrl\"],ticket)\n ret[\"state_icon\"] = self.__fieldIcon(data[\"fields\"][\"status\"])\n ret[\"issue_type_icon\"] = self.__fieldIcon(data[\"fields\"][\"issuetype\"])\n ret[\"priority_icon\"] = self.__fieldIcon(data[\"fields\"][\"priority\"])\n ret[\"embedded_link\"] = embedded_links\n ret[\"reporter\"] = data[\"fields\"][\"reporter\"][\"displayName\"]\n else:\n return None\n\n return ret", "metadata": "root.JiraIssues.getTicketInfo", "header": "['class', 'JiraIssues', '(', 'BaseIssues', '.', 'BaseIssues', ')', ':', '___EOS___']", "index": 38 }, { "content": " def __fieldIcon(self, f):\n if \"WebImagesPath\" in self.__conf:\n parts = f[\"iconUrl\"].split(\"/\")\n return '{0}/{1}'.format(self.__conf[\"WebImagesPath\"], parts[len(parts)-1], f[\"name\"])\n else:\n return f[\"iconUrl\"]", "metadata": "root.JiraIssues.__fieldIcon", "header": "['class', 'JiraIssues', '(', 'BaseIssues', '.', 'BaseIssues', ')', ':', '___EOS___']", "index": 62 } ]
[ { "span": "import sys, re", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 14 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "sys_", ",_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "requests_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Ju", "st", "Release", "Notes_", "._", "issue", "rs_", "import_", "Base", "Issues", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\\u\\u", "rest", "Sear", "ch", "Url_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u", "jira", "Authorization_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u", "cache_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "conf_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u\\u", "rest", "Sear", "ch", "Url_", "=_", "conf_", "[_", "\"", "Ur", "l", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u\\u", "jira", "Authorization_", "=_", "conf_", "[_", "\"", "Authoriz", "ation", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u\\u", "conf_", "=_", "conf_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tick", "et", "Regex_", "=_", "'(", "[", "A", "-", "Z", "]{", "2", ",", "5", "}-", "[", "0", "-", "9", "]+)'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "\"", "Ticke", "t", "Rege", "x", "\"_", "in_", "conf_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "tick", "et", "Regex_", "=_", "conf_", "[_", "\"", "Ticke", "t", "Rege", "x", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "log_", "(_", "self_", ",_", "message_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "\"", "Ji", "ra", ":", " ", "\"_", "+_", "message_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "stdout_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "read", "Js", "on", "Info_", "(_", "self_", ",_", "ticket_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "ticket_", "in_", "self_", "._", "\\u\\u", "cache_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u\\u", "log_", "(_", "\"", "Cache", "d", " ", "tick", "et", " ", "info", " ", "for", " ", "\"_", "+_", "ticket_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "\\u\\u", "cache_", "[_", "ticket_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "uri_", "=_", "\"{", "0", "}/", "{", "1", "}\"_", "._", "format_", "(_", "self_", "._", "\\u\\u", "rest", "Sear", "ch", "Url_", ",_", "ticket_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "headers_", "=_", "{_", "'", "Authoriz", "ation", "'_", ":_", "self_", "._", "\\u\\u", "jira", "Authorization_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u\\u", "log_", "(_", "\"", "Retriev", "ing", " ", "tick", "et", " ", "info", " ", "for", " ", "\"_", "+_", "ticket_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "r_", "=_", "requests_", "._", "get_", "(_", "uri_", ",_", "headers_", "=_", "headers_", ",_", "verify_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "data_", "=_", "json_", "._", "loads_", "(_", "r_", "._", "text_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "\"", "error", "Messag", "es", "\"_", "in_", "data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u\\u", "log_", "(_", "\"", "Error", " ", "retrie", "ving", " ", "Ji", "ra", " ", "info", ":", " ", "\"_", "+_", "\",\"_", "._", "join_", "(_", "data_", "[_", "\"", "error", "Messag", "es", "\"_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u\\u", "cache_", "[_", "ticket_", "]_", "=_", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Ticke", "t", "Info_", "(_", "self_", ",_", "ticket_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "data_", "=_", "self_", "._", "\\u\\u", "read", "Js", "on", "Info_", "(_", "ticket_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "embedde", "d\\u", "links_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "title_", "=_", "\"", "Unti", "tle", "d", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "=_", "{_", "\"", "html", "\\u", "url", "\"_", ":_", "\"{", "0", "}/", "{", "1", "}\"_", "._", "format_", "(_", "self_", "._", "\\u\\u", "conf_", "[_", "\"", "Ht", "ml", "Ur", "l", "\"_", "]_", ",_", "ticket_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "tick", "et", "\"_", ":_", "ticket_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "title", "\"_", ":_", "title_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "\"", "fields", "\"_", "in_", "data_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "title_", "=_", "data_", "[_", "\"", "fields", "\"_", "]_", "[_", "\"", "summar", "y", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "[_", "\"", "title", "\"_", "]_", "=_", "title_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "ticket_", "in_", "self_", "._", "extract", "Ticke", "ts", "Fro", "m", "Message_", "(_", "title_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "embedde", "d\\u", "links_", "[_", "ticket_", "]_", "=_", "\"{", "0", "}/", "{", "1", "}\"_", "._", "format_", "(_", "self_", "._", "\\u\\u", "conf_", "[_", "\"", "Ht", "ml", "Ur", "l", "\"_", "]_", ",_", "ticket_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ret_", "[_", "\"", "state", "\\u", "icon", "\"_", "]_", "=_", "self_", "._", "\\u\\u", "field", "Icon_", "(_", "data_", "[_", "\"", "fields", "\"_", "]_", "[_", "\"", "status", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "[_", "\"", "issue", "\\u", "type", "\\u", "icon", "\"_", "]_", "=_", "self_", "._", "\\u\\u", "field", "Icon_", "(_", "data_", "[_", "\"", "fields", "\"_", "]_", "[_", "\"", "issue", "type", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "[_", "\"", "priorit", "y", "\\u", "icon", "\"_", "]_", "=_", "self_", "._", "\\u\\u", "field", "Icon_", "(_", "data_", "[_", "\"", "fields", "\"_", "]_", "[_", "\"", "priorit", "y", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "[_", "\"", "embedde", "d\\u", "link", "\"_", "]_", "=_", "embedde", "d\\u", "links_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ret_", "[_", "\"", "reporter", "\"_", "]_", "=_", "data_", "[_", "\"", "fields", "\"_", "]_", "[_", "\"", "reporter", "\"_", "]_", "[_", "\"", "display", "Name", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "ret_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Ji", "ra", "Issues", "_", "(_", "Base", "Issues", "_", "._", "Base", "Issues", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "field", "Icon_", "(_", "self_", ",_", "f_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "\"", "Web", "Image", "s", "Path", "\"_", "in_", "self_", "._", "\\u\\u", "conf_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "parts_", "=_", "f_", "[_", "\"", "icon", "Ur", "l", "\"_", "]_", "._", "split_", "(_", "\"/\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "'{", "0", "}/", "{", "1", "}'_", "._", "format_", "(_", "self_", "._", "\\u\\u", "conf_", "[_", "\"", "Web", "Image", "s", "Path", "\"_", "]_", ",_", "parts_", "[_", "len_", "(_", "parts_", ")_", "-_", "1_", "]_", ",_", "f_", "[_", "\"", "name", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "f_", "[_", "\"", "icon", "Ur", "l", "\"_", "]_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
arq5x/gemini/gemini/tool_pathways.py
[ { "content": "def get_pathways(args):\n\n version_dic = defaultdict()\n version_dic = {'66': 'kegg_pathways_ensembl66', '67': 'kegg_pathways_ensembl67',\n '68': 'kegg_pathways_ensembl68', '69': 'kegg_pathways_ensembl69',\n '70': 'kegg_pathways_ensembl70', '71': 'kegg_pathways_ensembl71'}\n\n config = read_gemini_config( args = args )\n path_dirname = config[\"annotation_dir\"]\n if args.version in version_dic:\n path_file = os.path.join(path_dirname, version_dic[args.version])\n\n else:\n sys.exit(\"Unsupported Ensembl gene version.\\n\")\n\n agn_paths = defaultdict(list)\n hgnc_paths = defaultdict(list)\n ensembl_paths = defaultdict(list)\n\n for line in open(path_file, 'r'):\n fields=line.strip().split(\"\\t\")\n uniprot = fields[0]\n agn = fields[1]\n hgnc = fields[2]\n ensid = fields[3]\n ens_transcript = fields[4]\n hsa = fields[5]\n path = fields[6] if fields[6] != 'None' else None\n\n # clean up the pathways such that this:\n # path:hsa00260;Glycine_serine_and_threonine_metabolism\n # becomes this:\n # hsa00260:Glycine_serine_and_threonine_metabolism\n if path is not None and path.startswith(\"path:\"):\n path = path[5:]\n path = path.replace(\";\", \":\")\n\n # build gene/transcript -> pathway mappings using\n # all three gene naming conventions\n agn_paths[(agn, ens_transcript)].append(path)\n hgnc_paths[(hgnc, ens_transcript)].append(path)\n ensembl_paths[(ensid, ens_transcript)].append(path)\n\n return agn_paths, hgnc_paths, ensembl_paths", "metadata": "root.get_pathways", "header": "['module', '___EOS___']", "index": 13 } ]
[ { "span": "uniprot ", "start_line": 34, "start_column": 8, "end_line": 34, "end_column": 15 }, { "span": "hsa ", "start_line": 39, "start_column": 8, "end_line": 39, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get", "\\u", "pathway", "s_", "(_", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "version", "\\u", "dic_", "=_", "defaultdict_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "version", "\\u", "dic_", "=_", "{_", "'", "6", "6", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "6", "6", "'_", ",_", "'", "6", "7", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "6", "7", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "6", "8", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "6", "8", "'_", ",_", "'", "6", "9", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "6", "9", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "7", "0", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "7", "0", "'_", ",_", "'", "7", "1", "'_", ":_", "'", "keg", "g", "\\u", "pathway", "s", "\\u", "ensembl", "7", "1", "'_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "config_", "=_", "read", "\\u", "gem", "ini", "\\u", "config_", "(_", "args_", "=_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "path", "\\u", "dirname_", "=_", "config_", "[_", "\"", "annot", "ation", "\\u", "dir", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "args_", "._", "version_", "in_", "version", "\\u", "dic_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path", "\\u", "file_", "=_", "os_", "._", "path_", "._", "join_", "(_", "path", "\\u", "dirname_", ",_", "version", "\\u", "dic_", "[_", "args_", "._", "version_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sys_", "._", "exit_", "(_", "\"", "Unsu", "ppo", "rted", " ", "Ens", "embl", " ", "gene", " ", "version", ".\\\\", "n", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "agn", "\\u", "paths_", "=_", "defaultdict_", "(_", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hg", "nc", "\\u", "paths_", "=_", "defaultdict_", "(_", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ensembl", "\\u", "paths_", "=_", "defaultdict_", "(_", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "line_", "in_", "open_", "(_", "path", "\\u", "file_", ",_", "'", "r", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fields_", "=_", "line_", "._", "strip_", "(_", ")_", "._", "split_", "(_", "\"\\\\", "t", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "uniprot", "_", "=_", "fields_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "agn", "_", "=_", "fields_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hg", "nc_", "=_", "fields_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ensi", "d_", "=_", "fields_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ens", "\\u", "transcript_", "=_", "fields_", "[_", "4_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hs", "a_", "=_", "fields_", "[_", "5_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "path_", "=_", "fields_", "[_", "6_", "]_", "if_", "fields_", "[_", "6_", "]_", "!=_", "'", "Non", "e", "'_", "else_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "clean", " ", "up", " ", "the", " ", "pathway", "s", " ", "suc", "h", " ", "tha", "t", " ", "this", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "path", ":", "hs", "a0", "026", "0", ";", "Gl", "yc", "ine", "\\u", "seri", "ne", "\\u", "and", "\\u", "thr", "eon", "ine", "\\u", "meta", "boli", "sm_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "bec", "ome", "s", " ", "this", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "hs", "a0", "026", "0", ":", "Gl", "yc", "ine", "\\u", "seri", "ne", "\\u", "and", "\\u", "thr", "eon", "ine", "\\u", "meta", "boli", "sm_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "path_", "is_", "not_", "None_", "and_", "path_", "._", "startswith_", "(_", "\"", "path", ":\"_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "path_", "[_", "5_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "path_", "=_", "path_", "._", "replace_", "(_", "\";\"_", ",_", "\":\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "build", " ", "gene", "/", "transcri", "pt", " ", "->", " ", "pathway", " ", "mapping", "s", " ", "using_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "all", " ", "three", " ", "gene", " ", "nami", "ng", " ", "convention", "s_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "agn", "\\u", "paths_", "[_", "(_", "agn", "_", ",_", "ens", "\\u", "transcript_", ")_", "]_", "._", "append_", "(_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hg", "nc", "\\u", "paths_", "[_", "(_", "hg", "nc_", ",_", "ens", "\\u", "transcript_", ")_", "]_", "._", "append_", "(_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ensembl", "\\u", "paths_", "[_", "(_", "ensi", "d_", ",_", "ens", "\\u", "transcript_", ")_", "]_", "._", "append_", "(_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "agn", "\\u", "paths_", ",_", "hg", "nc", "\\u", "paths_", ",_", "ensembl", "\\u", "paths_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
quantopian/zipline/tests/utils/test_final.py
[ { "content": " def test_subclass_no_override(self):\n \"\"\"\n Tests that it is valid to create a subclass that does not override\n any methods.\n \"\"\"\n class SubClass(self.class_):\n pass", "metadata": "root.FinalMetaTestCase.test_subclass_no_override", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 28 }, { "content": " def test_subclass_no_final_override(self):\n \"\"\"\n Tests that it is valid to create a subclass that does not override\n and final methods.\n \"\"\"\n class SubClass(self.class_):\n b = 'SubClass: b'\n\n def g(self):\n return 'SubClass: g'", "metadata": "root.FinalMetaTestCase.test_subclass_no_final_override", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 36 }, { "content": " def test_override_final_no_decorator(self):\n \"\"\"\n Tests that attempting to create a subclass that overrides a final\n method will raise a `TypeError`.\n \"\"\"\n with self.assertRaises(TypeError):\n class SubClass(self.class_):\n def f(self):\n return 'SubClass: f'", "metadata": "root.FinalMetaTestCase.test_override_final_no_decorator", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 47 }, { "content": " def test_override_final_attribute(self):\n \"\"\"\n Tests that attempting to create a subclass that overrides a final\n attribute will raise a `TypeError`.\n \"\"\"\n with self.assertRaises(TypeError):\n class SubClass(self.class_):\n a = 'SubClass: a'", "metadata": "root.FinalMetaTestCase.test_override_final_attribute", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 57 }, { "content": " def test_override_final_with_decorator(self):\n \"\"\"\n Tests that attempting to create a subclass that overrides a final\n method will raise a `TypeError` even if you mark the new version as\n final.\n \"\"\"\n with self.assertRaises(TypeError):\n class SubClass(self.class_):\n @final\n def f(self):\n return 'SubClass: f'", "metadata": "root.FinalMetaTestCase.test_override_final_with_decorator", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 66 }, { "content": " def test_override_final_attribute_with_final(self):\n \"\"\"\n Tests that attempting to create a subclass that overrides a final\n attribute will raise a `TypeError` even if you mark the new version as\n final.\n \"\"\"\n with self.assertRaises(TypeError):\n class SubClass(self.class_):\n a = final('SubClass: a')", "metadata": "root.FinalMetaTestCase.test_override_final_attribute_with_final", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 78 }, { "content": " def test_override___setattr___on_subclass(self):\n \"\"\"\n Tests an attempt to override __setattr__ which is implicitly final.\n \"\"\"\n with self.assertRaises(TypeError):\n class SubClass(self.class_):\n def __setattr__(self, name, value):\n object.__setattr__(self, name, value)", "metadata": "root.FinalMetaTestCase.test_override___setattr___on_subclass", "header": "['class', 'FinalMetaTestCase', '(', 'TestCase', ')', ':', '___EOS___']", "index": 137 }, { "content": " def test_final_classmethod(self):\n\n class ClassWithClassMethod(with_metaclass(FinalMeta, object)):\n count = 0\n\n @final\n @classmethod\n def f(cls):\n cls.count += 1\n return cls.count\n\n with self.assertRaises(TypeError):\n class ClassOverridingClassMethod(ClassWithClassMethod):\n @classmethod\n def f(cls):\n return \"Oh Noes!\"\n\n with self.assertRaises(TypeError):\n ClassWithClassMethod.f = lambda cls: 0\n\n self.assertEqual(ClassWithClassMethod.f(), 1)\n self.assertEqual(ClassWithClassMethod.f(), 2)\n self.assertEqual(ClassWithClassMethod.f(), 3)\n\n instance = ClassWithClassMethod()\n\n with self.assertRaises(TypeError):\n instance.f = lambda cls: 0\n\n self.assertEqual(ClassWithClassMethod.f(), 4)\n self.assertEqual(ClassWithClassMethod.f(), 5)\n self.assertEqual(ClassWithClassMethod.f(), 6)", "metadata": "root.FinalABCMetaTestCase.test_final_classmethod", "header": "['class', 'FinalABCMetaTestCase', '(', 'FinalMetaTestCase', ')', ':', '___EOS___']", "index": 232 } ]
[ { "span": "SubClass(", "start_line": 33, "start_column": 14, "end_line": 33, "end_column": 22 }, { "span": "SubClass(", "start_line": 41, "start_column": 14, "end_line": 41, "end_column": 22 }, { "span": "SubClass(", "start_line": 53, "start_column": 18, "end_line": 53, "end_column": 26 }, { "span": "SubClass(", "start_line": 63, "start_column": 18, "end_line": 63, "end_column": 26 }, { "span": "SubClass(", "start_line": 73, "start_column": 18, "end_line": 73, "end_column": 26 }, { "span": "SubClass(", "start_line": 85, "start_column": 18, "end_line": 85, "end_column": 26 }, { "span": "SubClass(", "start_line": 142, "start_column": 18, "end_line": 142, "end_column": 26 }, { "span": "ClassOverridingClassMethod(", "start_line": 244, "start_column": 18, "end_line": 244, "end_column": 44 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "subclass", "\\u", "no", "\\u", "override_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "it", " ", "is", " ", "valid", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "doe", "s", " ", "not", " ", "override", "\\", "10", ";", " ", " ", " ", " ", "any", " ", "method", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "subclass", "\\u", "no", "\\u", "final", "\\u", "override_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "it", " ", "is", " ", "valid", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "doe", "s", " ", "not", " ", "override", "\\", "10", ";", " ", " ", " ", " ", "and", " ", "final", " ", "method", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "b_", "=_", "'", "Sub", "Class", ":", " ", "b", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "g_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "'", "Sub", "Class", ":", " ", "g", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u", "final", "\\u", "no", "\\u", "decorator_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "atte", "mpt", "ing", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "override", "s", " ", "a", " ", "final", "\\", "10", ";", " ", " ", " ", " ", "method", " ", "will", " ", "raise", " ", "a", " ", "`", "Type", "Error", "`.", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "f_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "return_", "'", "Sub", "Class", ":", " ", "f", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u", "final", "\\u", "attribute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "atte", "mpt", "ing", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "override", "s", " ", "a", " ", "final", "\\", "10", ";", " ", " ", " ", " ", "attribute", " ", "will", " ", "raise", " ", "a", " ", "`", "Type", "Error", "`.", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "a_", "=_", "'", "Sub", "Class", ":", " ", "a", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u", "final", "\\u", "with", "\\u", "decorator_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "atte", "mpt", "ing", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "override", "s", " ", "a", " ", "final", "\\", "10", ";", " ", " ", " ", " ", "method", " ", "will", " ", "raise", " ", "a", " ", "`", "Type", "Error", "`", " ", "even", " ", "if", " ", "you", " ", "mark", " ", "the", " ", "new", " ", "version", " ", "as", "\\", "10", ";", " ", " ", " ", " ", "final", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "@_", "final_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "f_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "return_", "'", "Sub", "Class", ":", " ", "f", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u", "final", "\\u", "attribute", "\\u", "with", "\\u", "final_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "tha", "t", " ", "atte", "mpt", "ing", " ", "to", " ", "create", " ", "a", " ", "subclass", " ", "tha", "t", " ", "override", "s", " ", "a", " ", "final", "\\", "10", ";", " ", " ", " ", " ", "attribute", " ", "will", " ", "raise", " ", "a", " ", "`", "Type", "Error", "`", " ", "even", " ", "if", " ", "you", " ", "mark", " ", "the", " ", "new", " ", "version", " ", "as", "\\", "10", ";", " ", " ", " ", " ", "final", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "a_", "=_", "final_", "(_", "'", "Sub", "Class", ":", " ", "a", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "Meta", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u\\u\\u", "setattr", "\\u\\u\\u", "on", "\\u", "subclass_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Test", "s", " ", "an", " ", "atte", "mpt", " ", "to", " ", "override", " ", "\\u\\u", "setattr", "\\u\\u", " ", "whi", "ch", " ", "is", " ", "implicit", "ly", " ", "final", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Sub", "Class_", "(_", "self_", "._", "class\\u_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "setattr\\u\\u_", "(_", "self_", ",_", "name_", ",_", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "object_", "._", "\\u\\u", "setattr\\u\\u_", "(_", "self_", ",_", "name_", ",_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Final", "ABC", "Meta", "Test", "Case_", "(_", "Final", "Meta", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "final", "\\u", "classmethod_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Class", "With", "Class", "Method_", "(_", "with", "\\u", "metaclass_", "(_", "Final", "Meta_", ",_", "object_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "final_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "f_", "(_", "cls_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cls_", "._", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "cls_", "._", "count_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Class", "Over", "rid", "ing", "Class", "Method_", "(_", "Class", "With", "Class", "Method_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "f_", "(_", "cls_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "return_", "\"", "Oh", " ", "No", "es", "!\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Class", "With", "Class", "Method_", "._", "f_", "=_", "lambda_", "cls_", ":_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "instance_", "=_", "Class", "With", "Class", "Method_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "instance_", "._", "f_", "=_", "lambda_", "cls_", ":_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "4_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "Class", "With", "Class", "Method_", "._", "f_", "(_", ")_", ",_", "6_", ")_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
bitxbay/BitXBay/BitXBay.py
[ { "content": "#!/usr/bin/env python\n# Copyright (c) 2012 Jonathan Warren\n# Copyright (c) 2012 The Bitmessage developers\n# Distributed under the MIT/X11 software license. See the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\n# Right now, PyBitmessage only support connecting to stream 1. It doesn't\n# yet contain logic to expand into further streams.\n\n# The software version variable is now held in shared.py\n\nimport signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully.\n# The next 3 are used for the API\nimport singleton\nimport os\nimport bitcoin\nfrom bitcoin.exceptions import InsufficientFunds\nfrom SimpleXMLRPCServer import SimpleXMLRPCServer\nfrom api import MySimpleXMLRPCRequestHandler\nfrom helper_startup import isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections\n\nimport shared\nfrom helper_sql import sqlQuery\nimport threading\nimport helper\n\n# Classes\n#from helper_sql import *\n#from class_sqlThread import *\n\nfrom class_sqlThread import sqlThread\nfrom class_singleCleaner import singleCleaner\n#from class_singleWorker import *\nfrom class_objectProcessor import objectProcessor\nfrom class_outgoingSynSender import outgoingSynSender\nfrom class_singleListener import singleListener\nfrom class_singleWorker import singleWorker\nfrom class_worker import objectProcessor2\nfrom helper import worker\n#from class_addressGenerator import *\nfrom class_addressGenerator import addressGenerator\nfrom debug import logger\n\n# Helper Functions\nimport helper_bootstrap\nimport helper_generic\nimport threading\n\n\nfrom subprocess import call\nimport time\n\n# OSX python version check\nimport sys\n\n\nif sys.platform == 'darwin':\n if float(\"{1}.{2}\".format(*sys.version_info)) < 7.5:\n msg = \"You should use python 2.7.5 or greater. Your version: %s\", \"{0}.{1}.{2}\".format(*sys.version_info)\n logger.critical(msg)\n print msg\n sys.exit(0)\n\n\n\n# This thread, of which there is only one, runs the API.\n\n# This is a list of current connections (the thread pointers at least)\nselfInitiatedConnections = {}\n\nif shared.useVeryEasyProofOfWorkForTesting:\n shared.networkDefaultProofOfWorkNonceTrialsPerByte = int(\n shared.networkDefaultProofOfWorkNonceTrialsPerByte / 16)\n shared.networkDefaultPayloadLengthExtraBytes = int(\n shared.networkDefaultPayloadLengthExtraBytes / 7000)\nimport subprocess\nimport config\nimport shelve\nfrom bsddb.db import *\nfrom pywa import delete_from_wallet\n\nif __name__ == \"__main__\":\n mainprogram = Main()\n mainprogram.start()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def connectToStream(streamNumber):\n shared.streamsInWhichIAmParticipating[streamNumber] = 'no data'\n selfInitiatedConnections[streamNumber] = {}\n shared.inventorySets[streamNumber] = set()\n queryData = sqlQuery('''SELECT hash FROM inventory WHERE streamnumber=?''', streamNumber)\n for row in queryData:\n shared.inventorySets[streamNumber].add(row[0])\n\n \n if isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():\n # Some XP and Vista systems can only have 10 outgoing connections at a time.\n maximumNumberOfHalfOpenConnections = 9\n else:\n maximumNumberOfHalfOpenConnections = 64\n for i in range(maximumNumberOfHalfOpenConnections):\n a = outgoingSynSender()\n a.setup(streamNumber, selfInitiatedConnections)\n a.start()", "metadata": "root.connectToStream", "header": "['module', '___EOS___']", "index": 63 }, { "content": "class singleAPI(threading.Thread):\n\n", "metadata": "root.singleAPI", "header": "['module', '___EOS___']", "index": 84 }, { "content": " def __init__(self):\n threading.Thread.__init__(self)", "metadata": "root.singleAPI.__init__", "header": "['class', 'singleAPI', '(', 'threading', '.', 'Thread', ')', ':', '___EOS___']", "index": 86 }, { "content": " def run(self):\n se = SimpleXMLRPCServer((shared.config.get('bitmessagesettings', 'apiinterface'), shared.config.getint(\n 'bitmessagesettings', 'apiport')), MySimpleXMLRPCRequestHandler, True, True)\n se.register_introspection_functions()\n se.serve_forever()", "metadata": "root.singleAPI.run", "header": "['class', 'singleAPI', '(', 'threading', '.', 'Thread', ')', ':', '___EOS___']", "index": 89 }, { "content": "class Main:\n\n\n\n\n\n\n\n #TODO: nice function but no one is using this", "metadata": "root.Main", "header": "['module', '___EOS___']", "index": 108 }, { "content": " def start(self, daemon=False):\n from PyQt4 import QtGui, QtCore\n app = QtGui.QApplication(sys.argv)\n import bitmessage_icons_rc\n splash_pix = QtGui.QPixmap(':/newPrefix/images/loading.jpg')\n splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)\n\n splash.setMask(splash_pix.mask())\n splash.show()\n shared.daemon = daemon\n\n #electrum version\n electrumon = True\n settings = shelve.open(\"settings.slv\")\n if \"electrumon\" in settings.keys():\n if settings[\"electrumon\"] == True:\n electrumon = True\n settings.close()\n else:\n settings.close()\n electrumon = False\n else:\n #settings[\"electrumon\"] = True\n settings.close()\n splash.hide()\n import electrumfirst\n electrumfirst.run()\n\n if electrumon == False:\n try:\n datadir = os.getcwd()+\"/btc\"\n print datadir\n db_env = DBEnv(0)\n r = db_env.open(datadir, (DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER))\n walletname = \"wallet.dat\"\n fordel = shelve.open(\"fordel.slv\")\n try:\n for i in fordel:\n keydel = i\n deleted_items = delete_from_wallet(db_env, walletname, \"key\", keydel)\n print \"address:%s has been successfully deleted from %s/%s, resulting in %d deleted item\"%(keydel, datadir, walletname, deleted_items)\n priv = \"\"\n del fordel[i]\n fordel.sync()\n except:\n print \"can't delete addresses\"\n fordel.close()\n #changes start\n process = subprocess.Popen([os.getcwd()+'/btc/bitcoin-qt.exe', \"-datadir=\"+datadir], shell=True, creationflags=subprocess.SW_HIDE)\n print \"Wait bitcoin-qt\"\n time.sleep(5)\n except:\n error=\"\"\n\n\n\n #changes end here\n #\n # is the application already running? If yes then exit.\n thisapp = singleton.singleinstance()\n\n signal.signal(signal.SIGINT, helper_generic.signal_handler)\n # signal.signal(signal.SIGINT, signal.SIG_DFL)\n\n helper_bootstrap.knownNodes()\n # Start the address generation thread\n addressGeneratorThread = addressGenerator()\n addressGeneratorThread.daemon = True # close the main program even if there are threads left\n addressGeneratorThread.start()\n\n # Start the thread that calculates POWs\n singleWorkerThread = singleWorker()\n singleWorkerThread.daemon = True # close the main program even if there are threads left\n singleWorkerThread.start()\n\n #data_dir = os.getcwd()+\"/btc/testnet3/blocks\"\n #singleWorkerThread2 = worker(data_dir, config.addresses, config.days)\n #singleWorkerThread2.daemon = False\n #singleWorkerThread2.starttimer()\n\n\n\n # Start the SQL thread\n sqlLookup = sqlThread()\n sqlLookup.daemon = False # DON'T close the main program even if there are threads left. The closeEvent should command this thread to exit gracefully.\n sqlLookup.start()\n\n # Start the thread that calculates POWs\n objectProcessorThread = objectProcessor()\n objectProcessorThread.daemon = False # DON'T close the main program even the thread remains. This thread checks the shutdown variable after processing each object.\n objectProcessorThread.start()\n\n objectProcessorThread2 = objectProcessor2()\n objectProcessorThread2.daemon = False # DON'T close the main program even the thread remains. This thread checks the shutdown variable after processing each object.\n objectProcessorThread2.start()\n\n # Start the cleanerThread\n singleCleanerThread = singleCleaner()\n singleCleanerThread.daemon = True # close the main program even if there are threads left\n singleCleanerThread.start()\n shared.reloadMyAddressHashes()\n shared.reloadBroadcastSendersForWhichImWatching()\n\n\n if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):\n try:\n apiNotifyPath = shared.config.get(\n 'bitmessagesettings', 'apinotifypath')\n except:\n apiNotifyPath = ''\n if apiNotifyPath != '':\n with shared.printLock:\n print 'Trying to call', apiNotifyPath\n\n call([apiNotifyPath, \"startingUp\"])\n singleAPIThread = singleAPI()\n singleAPIThread.daemon = True # close the main program even if there are threads left\n singleAPIThread.start()\n\n connectToStream(1)\n\n singleListenerThread = singleListener()\n singleListenerThread.setup(selfInitiatedConnections)\n singleListenerThread.daemon = True # close the main program even if there are threads left\n singleListenerThread.start()\n\n if daemon == False and shared.safeConfigGetBoolean('bitmessagesettings', 'daemon') == False:\n try:\n from PyQt4 import QtCore, QtGui\n except Exception as err:\n print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \\'PyQt Download\\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'\n print 'Error message:', err\n try:\n process.kill()\n except:\n pass\n os._exit(0)\n\n import bitmessageqt\n splash.close()\n bitmessageqt.run()\n\n\n\n\n else:\n shared.config.remove_option('bitmessagesettings', 'dontconnect')\n\n if daemon:\n with shared.printLock:\n print 'Running as a daemon. The main program should exit this thread.'\n else:\n with shared.printLock:\n print 'Running as a daemon. You can use Ctrl+C to exit.'\n while True:\n time.sleep(20)", "metadata": "root.Main.start", "header": "['class', 'Main', ':', '___EOS___']", "index": 109 }, { "content": " def chkaddresses(self):\n data_dir = os.getcwd()+\"/btc/blocks\"\n #config.path#os.path.join(os.getenv('APPDATA'),'Bitcoin', 'blocks')\n if not os.path.exists(data_dir):\n print('ERROR: Database %s was not found!' % os.path.join(data_dir))\n else:\n print ('Selected Database: %s' % os.path.join(data_dir))\n w = helper.worker(data_dir, config.addresses, config.days)\n w.starttimer()", "metadata": "root.Main.chkaddresses", "header": "['class', 'Main', ':', '___EOS___']", "index": 269 }, { "content": " def stop(self):\n with shared.printLock:\n print 'Stopping Bitmessage Deamon.'\n shared.doCleanShutdown()", "metadata": "root.Main.stop", "header": "['class', 'Main', ':', '___EOS___']", "index": 279 }, { "content": " def getApiAddress(self):\n if not shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):\n return None\n address = shared.config.get('bitmessagesettings', 'apiinterface')\n port = shared.config.getint('bitmessagesettings', 'apiport')\n return {'address':address,'port':port}", "metadata": "root.Main.getApiAddress", "header": "['class', 'Main', ':', '___EOS___']", "index": 286 } ]
[ { "span": "import bitcoin", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 14 }, { "span": "from bitcoin.exceptions import InsufficientFunds", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 48 }, { "span": "from helper import worker", "start_line": 38, "start_column": 0, "end_line": 38, "end_column": 25 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2012", " ", "Jon", "ath", "an", " ", "War", "ren", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2012", " ", "The", " ", "Bit", "message", " ", "developer", "s_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Distribut", "ed", " ", "under", " ", "the", " ", "MIT", "/", "X1", "1", " ", "software", " ", "license", ".", " ", "See", " ", "the", " ", "accom", "pan", "ying", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "file", " ", "COPY", "ING", " ", "or", " ", "http", "://", "www", ".", "opens", "ource", ".", "org", "/", "license", "s", "/", "mit", "-", "license", ".", "php", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Rig", "ht", " ", "now", ",", " ", "Py", "Bit", "message", " ", "only", " ", "support", " ", "connecti", "ng", " ", "to", " ", "stream", " ", "1", ".", " ", "It", " ", "doe", "sn", "'", "t_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "ye", "t", " ", "contain", " ", "logic", " ", "to", " ", "expand", " ", "int", "o", " ", "fur", "ther", " ", "stream", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "software", " ", "version", " ", "variab", "le", " ", "is", " ", "now", " ", "hel", "d", " ", "in", " ", "shared", ".", "py_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "signal_", "#", " ", "Us", "ed", " ", "to", " ", "captur", "e", " ", "a", " ", "Ctrl", "-", "C", " ", "keypress", " ", "so", " ", "tha", "t", " ", "Bit", "message", " ", "can", " ", "shut", "down", " ", "graceful", "ly", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "The", " ", "next", " ", "3", " ", "are", " ", "used", " ", "for", " ", "the", " ", "API_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "singleton_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "bitcoin", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "bitcoin", "_", "._", "exceptions_", "import_", "Ins", "uff", "icient", "Fund", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "XMLRPC", "Server_", "import_", "Simple", "XMLRPC", "Server_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "api_", "import_", "My", "Simple", "XMLRPC", "Request", "Handler_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "help", "er", "\\u", "startup_", "import_", "is", "Ou", "r", "Opera", "ting", "System", "Limit", "ed", "To", "Ha", "ving", "Ver", "y", "Fe", "w", "Hal", "f", "Open", "Connections_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "shared_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "help", "er", "\\u", "sql_", "import_", "sql", "Query_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "threading_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "helper_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Classes_", "\\u\\u\\uNL\\u\\u\\u_", "#", "from", " ", "help", "er", "\\u", "sql", " ", "import", " ", "*_", "\\u\\u\\uNL\\u\\u\\u_", "#", "from", " ", "class", "\\u", "sql", "Thread", " ", "import", " ", "*_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "class", "\\u", "sql", "Thread_", "import_", "sql", "Thread_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "class", "\\u", "single", "Cleane", "r_", "import_", "single", "Cleane", "r_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "from", " ", "class", "\\u", "single", "Worke", "r", " ", "import", " ", "*_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "class", "\\u", "object", "Processor_", "import_", "object", "Processor_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "class", "\\u", "outgoing", "Syn", "Sender_", "import_", "outgoing", "Syn", "Sender_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "class", "\\u", "single", "Listener_", "import_", "single", "Listener_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "class", "\\u", "single", "Worker_", "import_", "single", "Worker_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "class", "\\u", "worker_", "import_", "object", "Process", "or", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "helper_", "import_", "worker_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "from", " ", "class", "\\u", "address", "Generat", "or", " ", "import", " ", "*_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "class", "\\u", "address", "Generator_", "import_", "address", "Generator_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "debug_", "import_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Help", "er", " ", "Functions_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "help", "er", "\\u", "bootstrap_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "help", "er", "\\u", "generic_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "threading_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "subprocess_", "import_", "call_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "OSX", " ", "python", " ", "version", " ", "check_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "sys_", "._", "platform_", "==_", "'", "dar", "win", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "float_", "(_", "\"{", "1", "}.", "{", "2", "}\"_", "._", "format_", "(_", "*_", "sys_", "._", "version", "\\u", "info_", ")_", ")_", "<_", "7.5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "msg_", "=_", "\"", "You", " ", "shou", "ld", " ", "use", " ", "python", " ", "2.7", ".5", " ", "or", " ", "great", "er", ".", " ", "You", "r", " ", "version", ":", " ", "%", "s", "\"_", ",_", "\"{", "0", "}.", "{", "1", "}.", "{", "2", "}\"_", "._", "format_", "(_", "*_", "sys_", "._", "version", "\\u", "info_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "critical_", "(_", "msg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "msg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "exit_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "thread", ",", " ", "of", " ", "whi", "ch", " ", "there", " ", "is", " ", "only", " ", "one", ",", " ", "runs", " ", "the", " ", "API", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "is", " ", "a", " ", "list", " ", "of", " ", "current", " ", "connections", " ", "(", "the", " ", "thread", " ", "pointers", " ", "at", " ", "leas", "t", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self", "Initiat", "ed", "Connections_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "shared_", "._", "use", "Ver", "y", "Eas", "y", "Pro", "of", "Of", "Work", "For", "Test", "ing_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shared_", "._", "network", "Default", "Pro", "of", "Of", "Work", "Non", "ce", "Trial", "s", "Per", "Byte_", "=_", "int_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "shared_", "._", "network", "Default", "Pro", "of", "Of", "Work", "Non", "ce", "Trial", "s", "Per", "Byte_", "/_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "network", "Default", "Pay", "load", "Length", "Extra", "Bytes_", "=_", "int_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "shared_", "._", "network", "Default", "Pay", "load", "Length", "Extra", "Bytes_", "/_", "7000", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "subprocess_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "config_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "shelve", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "bsd", "db_", "._", "db_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pyw", "a_", "import_", "delete", "\\u", "from", "\\u", "wallet_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "\"\\u\\u", "main", "\\u\\u\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "main", "program_", "=_", "Main_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "main", "program_", "._", "start_", "(_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "connect", "To", "Stream_", "(_", "stream", "Number_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shared_", "._", "stream", "s", "In", "Whi", "ch", "IA", "m", "Parti", "cipa", "ting_", "[_", "stream", "Number_", "]_", "=_", "'", "no", " ", "data", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self", "Initiat", "ed", "Connections_", "[_", "stream", "Number_", "]_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "inventor", "y", "Sets_", "[_", "stream", "Number_", "]_", "=_", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query", "Data_", "=_", "sql", "Query_", "(_", "'''", "SELECT", " ", "hash", " ", "FROM", " ", "inventor", "y", " ", "WHE", "RE", " ", "stream", "number", "=?", "'''_", ",_", "stream", "Number_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "row_", "in_", "query", "Data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shared_", "._", "inventor", "y", "Sets_", "[_", "stream", "Number_", "]_", "._", "add_", "(_", "row_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "is", "Ou", "r", "Opera", "ting", "System", "Limit", "ed", "To", "Ha", "ving", "Ver", "y", "Fe", "w", "Hal", "f", "Open", "Connections_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Some", " ", "XP", " ", "and", " ", "Vis", "ta", " ", "system", "s", " ", "can", " ", "only", " ", "have", " ", "10", " ", "outgoing", " ", "connections", " ", "at", " ", "a", " ", "time", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "maxim", "um", "Number", "Of", "Hal", "f", "Open", "Connections_", "=_", "9_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "maxim", "um", "Number", "Of", "Hal", "f", "Open", "Connections_", "=_", "64_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "maxim", "um", "Number", "Of", "Hal", "f", "Open", "Connections_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "a_", "=_", "outgoing", "Syn", "Sender_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "a_", "._", "setup_", "(_", "stream", "Number_", ",_", "self", "Initiat", "ed", "Connections_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "a_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "single", "API_", "(_", "threading_", "._", "Thread_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "single", "API_", "(_", "threading_", "._", "Thread_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "threading_", "._", "Thread_", "._", "\\u\\u", "init\\u\\u_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "single", "API_", "(_", "threading_", "._", "Thread_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "se_", "=_", "Simple", "XMLRPC", "Server_", "(_", "(_", "shared_", "._", "config_", "._", "get_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "interface", "'_", ")_", ",_", "shared_", "._", "config_", "._", "getint_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "port", "'_", ")_", ")_", ",_", "My", "Simple", "XMLRPC", "Request", "Handler_", ",_", "True_", ",_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "se_", "._", "register", "\\u", "introspect", "ion", "\\u", "functions_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "se_", "._", "serve", "\\u", "forever_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "class_", "Main_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "TOD", "O", ":", " ", "nice", " ", "function", " ", "but", " ", "no", " ", "one", " ", "is", " ", "usi", "ng", " ", "this_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "start_", "(_", "self_", ",_", "daemon_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "Py", "Qt4_", "import_", "Qt", "Gui_", ",_", "Qt", "Core_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "app_", "=_", "Qt", "Gui_", "._", "QA", "ppl", "ication", "_", "(_", "sys_", "._", "argv_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "bitm", "essage", "\\u", "icons", "\\u", "rc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "\\u", "pix_", "=_", "Qt", "Gui_", "._", "QP", "ix", "map_", "(_", "':/", "new", "Pref", "ix", "/", "images", "/", "load", "ing", ".", "jp", "g", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "=_", "Qt", "Gui_", "._", "QS", "plas", "h", "Screen_", "(_", "splash", "\\u", "pix_", ",_", "Qt", "Core_", "._", "Qt_", "._", "Window", "Sta", "ys", "On", "Top", "Hint_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "splash", "_", "._", "set", "Mask_", "(_", "splash", "\\u", "pix_", "._", "mask_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "show_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "daemon_", "=_", "daemon_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "electr", "um", " ", "version_", "\\u\\u\\uNL\\u\\u\\u_", "electr", "um", "on_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "=_", "shelve", "_", "._", "open_", "(_", "\"", "settings", ".", "sl", "v", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "\"", "electr", "um", "on", "\"_", "in_", "settings_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "settings_", "[_", "\"", "electr", "um", "on", "\"_", "]_", "==_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "electr", "um", "on_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "electr", "um", "on_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "settings", "[\"", "electr", "um", "on", "\"]", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "settings_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "hide_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "electr", "um", "first_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "electr", "um", "first_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "electr", "um", "on_", "==_", "False_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "datadir_", "=_", "os_", "._", "getcwd_", "(_", ")_", "+_", "\"/", "btc", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "datadir_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "db", "\\u", "env_", "=_", "DB", "Env_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "r_", "=_", "db", "\\u", "env_", "._", "open_", "(_", "datadir_", ",_", "(_", "DB", "\\u", "CREATE_", "|_", "DB", "\\u", "INIT", "\\u", "LOCK_", "|_", "DB", "\\u", "INIT", "\\u", "LOG_", "|_", "DB", "\\u", "INIT", "\\u", "MP", "OO", "L_", "|_", "DB", "\\u", "INIT", "\\u", "TX", "N_", "|_", "DB", "\\u", "THREAD", "_", "|_", "DB", "\\u", "RECO", "VER_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "walle", "tname_", "=_", "\"", "walle", "t", ".", "dat", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for", "del_", "=_", "shelve", "_", "._", "open_", "(_", "\"", "for", "del", ".", "sl", "v", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "for_", "i_", "in_", "for", "del_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "keyd", "el_", "=_", "i_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "delete", "d\\u", "items_", "=_", "delete", "\\u", "from", "\\u", "wallet_", "(_", "db", "\\u", "env_", ",_", "walle", "tname_", ",_", "\"", "key", "\"_", ",_", "keyd", "el_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"", "address", ":", "%", "s", " ", "has", " ", "bee", "n", " ", "success", "full", "y", " ", "delete", "d", " ", "from", " ", "%", "s", "/", "%", "s", ",", " ", "result", "ing", " ", "in", " ", "%", "d", " ", "delete", "d", " ", "item", "\"_", "%_", "(_", "keyd", "el_", ",_", "datadir_", ",_", "walle", "tname_", ",_", "delete", "d\\u", "items_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "priv_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "del_", "for", "del_", "[_", "i_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for", "del_", "._", "sync_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "\"", "can", "'", "t", " ", "delete", " ", "addresse", "s", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for", "del_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "change", "s", " ", "start_", "\\u\\u\\uNL\\u\\u\\u_", "process_", "=_", "subprocess_", "._", "Popen_", "(_", "[_", "os_", "._", "getcwd_", "(_", ")_", "+_", "'/", "btc", "/", "bitcoin", "-", "qt", ".", "exe", "'_", ",_", "\"-", "datadir", "=\"_", "+_", "datadir_", "]_", ",_", "shell_", "=_", "True_", ",_", "creati", "onf", "lags_", "=_", "subprocess_", "._", "SW", "\\u", "HID", "E_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "\"", "Wait", " ", "bitcoin", "-", "qt", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "time_", "._", "sleep_", "(_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "error_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "change", "s", " ", "end", " ", "here_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "is", " ", "the", " ", "applica", "tion", " ", "alr", "ead", "y", " ", "runn", "ing", "?", " ", " ", "If", " ", "ye", "s", " ", "then", " ", "exit", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "this", "app_", "=_", "singleton_", "._", "single", "instance_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "signal_", "._", "signal_", "(_", "signal_", "._", "SIGINT_", ",_", "help", "er", "\\u", "generic_", "._", "signal", "\\u", "handler_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "signal", ".", "signal", "(", "signal", ".", "SIG", "INT", ",", " ", "signal", ".", "SIG", "\\u", "DF", "L", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "help", "er", "\\u", "bootstrap_", "._", "know", "n", "Nodes_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "address", " ", "generat", "ion", " ", "thread_", "\\u\\u\\uNL\\u\\u\\u_", "address", "Generat", "or", "Thread_", "=_", "address", "Generator_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address", "Generat", "or", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address", "Generat", "or", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "thread", " ", "tha", "t", " ", "calcul", "ates", " ", "PO", "Ws", "_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Worke", "r", "Thread_", "=_", "single", "Worker_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Worke", "r", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Worke", "r", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "data\\u", "dir", " ", "=", " ", "os", ".", "getc", "wd", "()", "+\"", "/", "btc", "/", "testn", "et", "3", "/", "blocks", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", " ", "=", " ", "worker", "(", "data\\u", "dir", ",", " ", "config", ".", "addresse", "s", ",", " ", "config", ".", "day", "s", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", ".", "daemon", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "#", "single", "Worke", "r", "Thread", "2", ".", "startt", "ime", "r", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "SQL", " ", "thread_", "\\u\\u\\uNL\\u\\u\\u_", "sql", "Lookup_", "=_", "sql", "Thread_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sql", "Lookup_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left", ".", " ", "The", " ", "close", "Event", " ", "shou", "ld", " ", "command", " ", "this", " ", "thread", " ", "to", " ", "exit", " ", "graceful", "ly", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sql", "Lookup_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "thread", " ", "tha", "t", " ", "calcul", "ates", " ", "PO", "Ws", "_", "\\u\\u\\uNL\\u\\u\\u_", "object", "Process", "or", "Thread_", "=_", "object", "Processor_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "the", " ", "thread", " ", "remains", ".", " ", "Thi", "s", " ", "thread", " ", "checks", " ", "the", " ", "shut", "down", " ", "variab", "le", " ", "after", " ", "process", "ing", " ", "each", " ", "object", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "=_", "object", "Process", "or", "2_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "._", "daemon_", "=_", "False_", "#", " ", "DON", "'", "T", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "the", " ", "thread", " ", "remains", ".", " ", "Thi", "s", " ", "thread", " ", "checks", " ", "the", " ", "shut", "down", " ", "variab", "le", " ", "after", " ", "process", "ing", " ", "each", " ", "object", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "object", "Process", "or", "Thread", "2_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "cleaner", "Thread_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "=_", "single", "Cleane", "r_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Cleane", "r", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "relo", "ad", "My", "Address", "Hashe", "s_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shared_", "._", "relo", "ad", "Broad", "cast", "Sen", "ders", "For", "Whi", "ch", "Im", "Watch", "ing_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "shared_", "._", "safe", "Config", "Get", "Boolean_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "enable", "d", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "Noti", "fy", "Path_", "=_", "shared_", "._", "config_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "notif", "ypa", "th", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "Noti", "fy", "Path_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "api", "Noti", "fy", "Path_", "!=_", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Tr", "ying", " ", "to", " ", "call", "'_", ",_", "api", "Noti", "fy", "Path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "call_", "(_", "[_", "api", "Noti", "fy", "Path_", ",_", "\"", "startin", "g", "Up", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "single", "API", "Thread_", "=_", "single", "API_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "API", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "API", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "connect", "To", "Stream_", "(_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "single", "Listen", "er", "Thread_", "=_", "single", "Listener_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "setup_", "(_", "self", "Initiat", "ed", "Connections_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "daemon_", "=_", "True_", "#", " ", "close", " ", "the", " ", "main", " ", "program", " ", "even", " ", "if", " ", "there", " ", "are", " ", "thread", "s", " ", "left_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "single", "Listen", "er", "Thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "daemon_", "==_", "False_", "and_", "shared_", "._", "safe", "Config", "Get", "Boolean_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "daemon", "'_", ")_", "==_", "False_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "Py", "Qt4_", "import_", "Qt", "Core_", ",_", "Qt", "Gui_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "err_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "'", "Py", "Bit", "message", " ", "require", "s", " ", "Py", "Qt", " ", "unl", "ess", " ", "you", " ", "want", " ", "to", " ", "run", " ", "it", " ", "as", " ", "a", " ", "daemon", " ", "and", " ", "interact", " ", "with", " ", "it", " ", "usi", "ng", " ", "the", " ", "API", ".", " ", "You", " ", "can", " ", "download", " ", "Py", "Qt", " ", "from", " ", "http", "://", "www", ".", "river", "bank", "compu", "ting", ".", "com", "/", "software", "/", "pyqt", "/", "download", " ", " ", " ", "or", " ", "by", " ", "search", "ing", " ", "Goo", "gle", " ", "for", " ", "\\\\'", "Py", "Qt", " ", "Down", "load", "\\\\'", ".", " ", "If", " ", "you", " ", "want", " ", "to", " ", "run", " ", "in", " ", "daemon", " ", "mode", ",", " ", "see", " ", "https", "://", "bitm", "essage", ".", "org", "/", "wiki", "/", "Da", "emo", "n", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "'", "Error", " ", "message", ":'_", ",_", "err_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "process_", "._", "kill_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "os_", "._", "\\u", "exit_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "bitm", "essage", "qt_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "splash", "_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "bitm", "essage", "qt_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shared_", "._", "config_", "._", "remove", "\\u", "option_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "don", "tcon", "nect", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "daemon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Run", "ning", " ", "as", " ", "a", " ", "daemon", ".", " ", "The", " ", "main", " ", "program", " ", "shou", "ld", " ", "exit", " ", "this", " ", "thread", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "print_", "'", "Run", "ning", " ", "as", " ", "a", " ", "daemon", ".", " ", "You", " ", "can", " ", "use", " ", "Ctrl", "+", "C", " ", "to", " ", "exit", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "while_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "time_", "._", "sleep_", "(_", "20_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "chk", "addresses_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "data\\u", "dir_", "=_", "os_", "._", "getcwd_", "(_", ")_", "+_", "\"/", "btc", "/", "blocks", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "config", ".", "path", "#", "os", ".", "path", ".", "join", "(", "os", ".", "gete", "nv", "('", "APP", "DATA", "')", ",'", "Bit", "coin", "',", " ", "'", "blocks", "')", "_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "os_", "._", "path_", "._", "exists_", "(_", "data\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "'", "ERROR", ":", " ", "Databa", "se", " ", "%", "s", " ", "was", " ", "not", " ", "found", "!'_", "%_", "os_", "._", "path_", "._", "join_", "(_", "data\\u", "dir_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "'", "Select", "ed", " ", "Databa", "se", ":", " ", "%", "s", "'_", "%_", "os_", "._", "path_", "._", "join_", "(_", "data\\u", "dir_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "=_", "helper_", "._", "worker_", "(_", "data\\u", "dir_", ",_", "config_", "._", "addresses_", ",_", "config_", "._", "days_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "w_", "._", "startt", "ime", "r_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "shared_", "._", "print", "Lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "'", "Stopp", "ing", " ", "Bit", "message", " ", "Dea", "mon", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "shared_", "._", "do", "Clean", "Shut", "down_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Ap", "i", "Address_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "shared_", "._", "safe", "Config", "Get", "Boolean_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "enable", "d", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "address_", "=_", "shared_", "._", "config_", "._", "get_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "interface", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "port_", "=_", "shared_", "._", "config_", "._", "getint_", "(_", "'", "bitm", "essage", "settings", "'_", ",_", "'", "api", "port", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "{_", "'", "address", "'_", ":_", "address_", ",_", "'", "port", "'_", ":_", "port_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
michaelcontento/revolver/revolver/log.py
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import, division, with_statement\n\nfrom fabric.contrib.console import confirm\nfrom fabric.utils import abort, warn\nfrom fabric.utils import fastprint as put_fast\nfrom fabric.utils import puts as put\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from fabric.contrib.console import confirm", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 42 }, { "span": "from fabric.utils import abort, warn", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 36 }, { "span": "from fabric.utils import fastprint as put_fast", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 46 }, { "span": "from fabric.utils import puts as put", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 36 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "abs", "olute", "\\u", "import_", ",_", "division_", ",_", "with", "\\u", "statement_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "fabric_", "._", "contrib_", "._", "console_", "import_", "confirm_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fabric_", "._", "utils_", "import_", "abort_", ",_", "warn_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fabric_", "._", "utils_", "import_", "fast", "print_", "as_", "put", "\\u", "fast_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fabric_", "._", "utils_", "import_", "puts_", "as_", "put_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1 ]
Unused local variable
kaleidos/django-sampledatahelper/tests/tests.py
[ { "content": " def test_chars(self):\n value = self.sd.chars()\n self.assertTrue(isinstance(value, six.string_types))\n self.assertTrue(len(value) >= 1)\n self.assertTrue(len(value) <= 5)\n\n value = self.sd.chars(5, 5)\n self.assertTrue(len(value) == 5)\n\n self.assertEqual(self.sd.chars(0, 0), '')\n\n with self.assertRaises(ParameterError):\n value = self.sd.chars(10, 5)", "metadata": "root.TestTextHelpers.test_chars", "header": "['class', 'TestTextHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 98 }, { "content": " def test_words(self):\n value = self.sd.words()\n self.assertTrue(isinstance(value, six.string_types))\n self.assertTrue(len(value.split(' ')) >= 1)\n self.assertTrue(len(value.split(' ')) <= 5)\n\n value = self.sd.words(5, 5)\n self.assertTrue(len(value.split(' ')) == 5)\n\n self.assertEqual(self.sd.words(0, 0), '')\n\n with self.assertRaises(ParameterError):\n value = self.sd.words(10, 5)", "metadata": "root.TestTextHelpers.test_words", "header": "['class', 'TestTextHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 116 }, { "content": " def test_paragraphs(self):\n for x in range(1, 10):\n value = self.sd.paragraphs()\n self.assertTrue(isinstance(value, six.string_types))\n\n self.assertTrue(len(value.split('\\n\\n')) >= 1)\n self.assertTrue(len(value.split('\\n\\n')) <= 5)\n\n with self.assertRaises(ParameterError):\n value = self.sd.paragraphs(5, 1)", "metadata": "root.TestTextHelpers.test_paragraphs", "header": "['class', 'TestTextHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 160 }, { "content": " def test_slug(self):\n value = self.sd.slug()\n validate_slug(value)\n\n value = self.sd.slug(5, 5)\n self.assertEqual(len(value.split(' ')), 1)\n validate_slug(value)\n\n with self.assertRaises(ParameterError):\n value = self.sd.slug(10, 5)", "metadata": "root.TestTextHelpers.test_slug", "header": "['class', 'TestTextHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 171 }, { "content": " def test_tags(self):\n value = self.sd.tags()\n self.assertTrue(isinstance(value, six.string_types))\n\n value = self.sd.tags(5, 5)\n self.assertEqual(len(value.split(',')), 5)\n\n value = self.sd.tags(5, 5, ['a', 'b', 'c'])\n self.assertTrue(value.split(',')[0] in ['a', 'b', 'c'])\n\n with self.assertRaises(ParameterError):\n value = self.sd.tags(10, 5)", "metadata": "root.TestTextHelpers.test_tags", "header": "['class', 'TestTextHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 182 }, { "content": " def test_name(self):\n value = self.sd.name()\n self.assertTrue(isinstance(value, six.string_types))\n\n value = self.sd.name(as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.name(number=3, as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 3)\n\n value = self.sd.name(locale='es', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.name(locale='cat', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.name(locale='fr', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.name(locale='us', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n with self.assertRaises(ParameterError):\n value = self.sd.name(number=0)\n\n with self.assertRaises(ParameterError):\n value = self.sd.name(number=-1)\n\n with self.assertRaises(ParameterError):\n value = self.sd.name(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_name", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 364 }, { "content": " def test_surname(self):\n value = self.sd.surname()\n self.assertTrue(isinstance(value, six.string_types))\n\n value = self.sd.surname(as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.surname(number=3, as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 3)\n\n value = self.sd.surname(locale='es', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 2)\n\n value = self.sd.surname(locale='cat', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 2)\n\n value = self.sd.surname(locale='fr', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n value = self.sd.surname(locale='us', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 1)\n\n with self.assertRaises(ParameterError):\n value = self.sd.surname(number=0)\n\n with self.assertRaises(ParameterError):\n value = self.sd.surname(number=-1)\n\n with self.assertRaises(ParameterError):\n value = self.sd.surname(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_surname", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 401 }, { "content": " def test_fullname(self):\n value = self.sd.fullname()\n self.assertTrue(isinstance(value, six.string_types))\n\n value = self.sd.fullname(as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 2)\n\n value = self.sd.fullname(locale='es', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 3)\n\n value = self.sd.fullname(locale='cat', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 3)\n\n value = self.sd.fullname(locale='fr', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 2)\n\n value = self.sd.fullname(locale='us', as_list=True)\n self.assertTrue(isinstance(value, list))\n self.assertEqual(len(value), 2)\n\n with self.assertRaises(ParameterError):\n value = self.sd.fullname(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_fullname", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 438 }, { "content": " def test_phone(self):\n value = self.sd.phone(locale='es')\n self.assertTrue(isinstance(value, six.string_types))\n self.assertEqual(len(value), 9)\n self.assertTrue(value[0] in ['6', '9'])\n\n value = self.sd.phone(locale='es', country_code=True)\n self.assertTrue(isinstance(value, six.string_types))\n self.assertEqual(len(value), 13)\n self.assertTrue(value[0:5] in ['+34 6', '+34 9'])\n\n with self.assertRaises(ParameterError):\n value = self.sd.phone(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_phone", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 465 }, { "content": " def test_zip_code(self):\n value = self.sd.zip_code(locale='es')\n self.assertTrue(isinstance(value, six.string_types))\n self.assertEqual(len(value), 5)\n\n with self.assertRaises(ParameterError):\n value = self.sd.zip_code(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_zip_code", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 479 }, { "content": " def test_id_card(self):\n value = self.sd.id_card(locale='es')\n self.assertTrue(isinstance(value, six.string_types))\n self.assertEqual(len(value), 9)\n self.assertTrue(value[8] in \"TRWAGMYFPDXBNJZSQVHLCKET\")\n\n with self.assertRaises(ParameterError):\n value = self.sd.id_card(locale=\"not-valid-locale\")", "metadata": "root.TestLocalizedHelpers.test_id_card", "header": "['class', 'TestLocalizedHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 487 }, { "content": " def test_image(self):\n value = self.sd.image(100, 100)\n self.assertTrue(isinstance(value, ImageFile))\n\n value = self.sd.image(100, 100, typ=\"simple\")\n self.assertTrue(isinstance(value, ImageFile))\n\n value = self.sd.image(100, 100, typ=\"plasma\")\n self.assertTrue(isinstance(value, ImageFile))\n\n value = self.sd.image(100, 100, typ=\"mandelbrot\")\n self.assertTrue(isinstance(value, ImageFile))\n\n value = self.sd.image(100, 100, typ=\"ifs\")\n self.assertTrue(isinstance(value, ImageFile))\n\n value = self.sd.image(100, 100, typ=\"random\")\n self.assertTrue(isinstance(value, ImageFile))\n\n image_mixin.PIL_INSTALLED = False\n with self.assertRaises(ImportError):\n value = self.sd.image(100, 100, typ=\"random\")\n image_mixin.PIL_INSTALLED = True\n\n with self.assertRaises(ParameterError):\n value = self.sd.image(100, 100, typ=\"not-valid-type\")\n\n with self.assertRaises(ParameterError):\n value = self.sd.image(0, 100)\n\n with self.assertRaises(ParameterError):\n value = self.sd.image(100, 0)", "metadata": "root.TestImageHelpers.test_image", "header": "['class', 'TestImageHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 512 }, { "content": " def test_hex_chars(self):\n value = self.sd.hex_chars()\n self.assertTrue(isinstance(value, six.string_types))\n self.assertTrue(len(value) >= 1)\n self.assertTrue(len(value) <= 5)\n\n value = self.sd.hex_chars(5, 5)\n self.assertTrue(len(value) == 5)\n\n self.assertEqual(self.sd.hex_chars(0, 0), '')\n\n with self.assertRaises(ParameterError):\n value = self.sd.hex_chars(10, 5)", "metadata": "root.TestOtherHelpers.test_hex_chars", "header": "['class', 'TestOtherHelpers', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 585 } ]
[ { "span": "value ", "start_line": 110, "start_column": 12, "end_line": 110, "end_column": 17 }, { "span": "value ", "start_line": 128, "start_column": 12, "end_line": 128, "end_column": 17 }, { "span": "value ", "start_line": 169, "start_column": 12, "end_line": 169, "end_column": 17 }, { "span": "value ", "start_line": 180, "start_column": 12, "end_line": 180, "end_column": 17 }, { "span": "value ", "start_line": 193, "start_column": 12, "end_line": 193, "end_column": 17 }, { "span": "value ", "start_line": 399, "start_column": 12, "end_line": 399, "end_column": 17 }, { "span": "value ", "start_line": 436, "start_column": 12, "end_line": 436, "end_column": 17 }, { "span": "value ", "start_line": 463, "start_column": 12, "end_line": 463, "end_column": 17 }, { "span": "value ", "start_line": 477, "start_column": 12, "end_line": 477, "end_column": 17 }, { "span": "value ", "start_line": 485, "start_column": 12, "end_line": 485, "end_column": 17 }, { "span": "value ", "start_line": 494, "start_column": 12, "end_line": 494, "end_column": 17 }, { "span": "value ", "start_line": 543, "start_column": 12, "end_line": 543, "end_column": 17 }, { "span": "value ", "start_line": 597, "start_column": 12, "end_line": 597, "end_column": 17 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "Text", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "chars_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "chars_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", "<=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "chars_", "(_", "5_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", "==_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "sd_", "._", "chars_", "(_", "0_", ",_", "0_", ")_", ",_", "''_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "chars_", "(_", "10_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Text", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "words_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "words_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'", " ", "'_", ")_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'", " ", "'_", ")_", ")_", "<=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "words_", "(_", "5_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'", " ", "'_", ")_", ")_", "==_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "sd_", "._", "words_", "(_", "0_", ",_", "0_", ")_", ",_", "''_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "words_", "(_", "10_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Text", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "paragraphs_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "x_", "in_", "range_", "(_", "1_", ",_", "10_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "paragraphs_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'\\\\", "n", "\\\\", "n", "'_", ")_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'\\\\", "n", "\\\\", "n", "'_", ")_", ")_", "<=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "paragraphs_", "(_", "5_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Text", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "slug_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "slug_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "validat", "e\\u", "slug_", "(_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "slug_", "(_", "5_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "'", " ", "'_", ")_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "validat", "e\\u", "slug_", "(_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "slug_", "(_", "10_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Text", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "tags_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "tags_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "tags_", "(_", "5_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", "._", "split_", "(_", "','_", ")_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "tags_", "(_", "5_", ",_", "5_", ",_", "[_", "'", "a", "'_", ",_", "'", "b", "'_", ",_", "'", "c", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "value_", "._", "split_", "(_", "','_", ")_", "[_", "0_", "]_", "in_", "[_", "'", "a", "'_", ",_", "'", "b", "'_", ",_", "'", "c", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "tags_", "(_", "10_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "name_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "number_", "=_", "3_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "locale_", "=_", "'", "es", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "locale_", "=_", "'", "cat", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "locale_", "=_", "'", "fr", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "locale_", "=_", "'", "us", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "number_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "number_", "=_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "name_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "surname_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "number_", "=_", "3_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "locale_", "=_", "'", "es", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "locale_", "=_", "'", "cat", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "locale_", "=_", "'", "fr", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "locale_", "=_", "'", "us", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "number_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "number_", "=_", "-_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "surname_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "fullname_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "locale_", "=_", "'", "es", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "locale_", "=_", "'", "cat", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "3_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "locale_", "=_", "'", "fr", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "locale_", "=_", "'", "us", "'_", ",_", "as", "\\u", "list_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "list_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "fullname_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "phone_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "phone_", "(_", "locale_", "=_", "'", "es", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "9_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "value_", "[_", "0_", "]_", "in_", "[_", "'", "6", "'_", ",_", "'", "9", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "phone_", "(_", "locale_", "=_", "'", "es", "'_", ",_", "countr", "y", "\\u", "code_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "13_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "value_", "[_", "0_", ":_", "5_", "]_", "in_", "[_", "'+", "3", "4", " ", "6", "'_", ",_", "'+", "3", "4", " ", "9", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "phone_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "zip", "\\u", "code_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "zip", "\\u", "code_", "(_", "locale_", "=_", "'", "es", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "zip", "\\u", "code_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Locali", "zed", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "id", "\\u", "card_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "id", "\\u", "card_", "(_", "locale_", "=_", "'", "es", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "value_", ")_", ",_", "9_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "value_", "[_", "8_", "]_", "in_", "\"", "TR", "WA", "GM", "YF", "PD", "XB", "NJ", "ZS", "QV", "HL", "CK", "ET", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "id", "\\u", "card_", "(_", "locale_", "=_", "\"", "not", "-", "valid", "-", "locale", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Image", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "image_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "simple", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "plasma", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "mand", "elb", "rot", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "ifs", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "random", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "Image", "File_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "image", "\\u", "mixin_", "._", "PI", "L", "\\u", "INSTALLE", "D_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Import", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "random", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "image", "\\u", "mixin_", "._", "PI", "L", "\\u", "INSTALLE", "D_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "100_", ",_", "typ_", "=_", "\"", "not", "-", "valid", "-", "type", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "0_", ",_", "100_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "image_", "(_", "100_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Ot", "her", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "hex", "\\u", "chars_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "sd_", "._", "hex", "\\u", "chars_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "isinstance_", "(_", "value_", ",_", "six_", "._", "string", "\\u", "types_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", ">=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", "<=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "value_", "=_", "self_", "._", "sd_", "._", "hex", "\\u", "chars_", "(_", "5_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "value_", ")_", "==_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "self_", "._", "sd_", "._", "hex", "\\u", "chars_", "(_", "0_", ",_", "0_", ")_", ",_", "''_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Parameter", "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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
worldcompany/djangoembed/oembed/fields.py
[ { "content": "import re\n\nfrom django.db import models\nfrom django.db.models import signals, Max\nfrom django.db.models.fields import TextField\n\nimport oembed\nfrom oembed.constants import URL_RE\nfrom oembed.exceptions import OEmbedMissingEndpoint\nfrom oembed.models import AggregateMedia\n\n\n\n\n\n\n\n\n \n\n\ntry:\n from south.modelsinspector import add_introspection_rules\n add_introspection_rules([\n (\n [EmbeddedMediaField], # Class(es) these apply to\n [], # Positional arguments (not used)\n { # Keyword argument\n \"media_type\": [\"media_type\", {}],\n },\n ),\n ], [\"^oembed\\.fields\\.EmbeddedMediaField\"])\n\nexcept ImportError:\n pass\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class FieldRegistry(object):\n \"\"\"\n FieldRegistry -> modified Borg pattern from Marty Alchin's Pro Django\n \"\"\"\n _registry = {}\n \n \n ", "metadata": "root.FieldRegistry", "header": "['module', '___EOS___']", "index": 12 }, { "content": " @classmethod\n def add_field(cls, model, field):\n reg = cls._registry.setdefault(model, [])\n reg.append(field)", "metadata": "root.FieldRegistry.add_field", "header": "['class', 'FieldRegistry', '(', 'object', ')', ':', '___EOS___']", "index": 18 }, { "content": " @classmethod\n def get_fields(cls, model):\n return cls._registry.get(model, [])", "metadata": "root.FieldRegistry.get_fields", "header": "['class', 'FieldRegistry', '(', 'object', ')', ':', '___EOS___']", "index": 23 }, { "content": " @classmethod\n def __contains__(cls, model):\n return model in cls._registry", "metadata": "root.FieldRegistry.__contains__", "header": "['class', 'FieldRegistry', '(', 'object', ')', ':', '___EOS___']", "index": 27 }, { "content": "class EmbeddedSignalCreator(object):\n ", "metadata": "root.EmbeddedSignalCreator", "header": "['module', '___EOS___']", "index": 32 }, { "content": " def __init__(self, field):\n self.field = field\n self.name = '_%s' % self.field.name", "metadata": "root.EmbeddedSignalCreator.__init__", "header": "['class', 'EmbeddedSignalCreator', '(', 'object', ')', ':', '___EOS___']", "index": 33 }, { "content": " def contribute_to_class(self, cls, name):\n register_field(cls, self.field)", "metadata": "root.EmbeddedSignalCreator.contribute_to_class", "header": "['class', 'EmbeddedSignalCreator', '(', 'object', ')', ':', '___EOS___']", "index": 37 }, { "content": "class EmbeddedMediaField(models.ManyToManyField):\n ", "metadata": "root.EmbeddedMediaField", "header": "['module', '___EOS___']", "index": 41 }, { "content": " def __init__(self, media_type=None, to=None, **kwargs):\n if media_type and not isinstance(media_type, (basestring, list)):\n raise TypeError('media_type must be either a list or string')\n elif isinstance(media_type, basestring):\n media_type = [media_type]\n self.media_type = media_type\n \n super(EmbeddedMediaField, self).__init__(AggregateMedia, **kwargs)", "metadata": "root.EmbeddedMediaField.__init__", "header": "['class', 'EmbeddedMediaField', '(', 'models', '.', 'ManyToManyField', ')', ':', '___EOS___']", "index": 42 }, { "content": " def contribute_to_class(self, cls, name):\n \"\"\"\n I need a way to ensure that this signal gets created for all child\n models, and since model inheritance doesn't have a 'contrubite_to_class'\n style hook, I am creating a fake virtual field which will be added to\n all subclasses and handles creating the signal\n \"\"\"\n super(EmbeddedMediaField, self).contribute_to_class(cls, name)\n register_field(cls, self)\n \n # add a virtual field that will create signals on any/all subclasses\n cls._meta.add_virtual_field(EmbeddedSignalCreator(self))", "metadata": "root.EmbeddedMediaField.contribute_to_class", "header": "['class', 'EmbeddedMediaField', '(', 'models', '.', 'ManyToManyField', ')', ':', '___EOS___']", "index": 51 }, { "content": "def register_field(cls, field):\n \"\"\"\n Handles registering the fields with the FieldRegistry and creating a \n post-save signal for the model.\n \"\"\"\n FieldRegistry.add_field(cls, field)\n \n signals.post_save.connect(handle_save_embeds, sender=cls,\n dispatch_uid='%s.%s.%s' % \\\n (cls._meta.app_label, cls._meta.module_name, field.name))", "metadata": "root.register_field", "header": "['module', '___EOS___']", "index": 65 }, { "content": "def handle_save_embeds(sender, instance, **kwargs):\n embedded_media_fields = FieldRegistry.get_fields(sender)\n if not embedded_media_fields:\n return\n \n urls = []\n for field in instance._meta.fields:\n if isinstance(field, TextField):\n urls.extend(re.findall(URL_RE, getattr(instance, field.name)))\n\n urls = set(urls)\n for embedded_field in embedded_media_fields:\n m2m = getattr(instance, embedded_field.name)\n m2m.clear()\n for url in urls:\n try:\n provider = oembed.site.provider_for_url(url)\n except OEmbedMissingEndpoint:\n pass\n else:\n if not embedded_field.media_type or \\\n provider.resource_type in embedded_field.media_type:\n media_obj, created = AggregateMedia.objects.get_or_create(url=url)\n m2m.add(media_obj)", "metadata": "root.handle_save_embeds", "header": "['module', '___EOS___']", "index": 77 } ]
[ { "span": "from django.db.models import signals, Max", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 41 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "._", "models_", "import_", "signals_", ",_", "Max_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "._", "models_", "._", "fields_", "import_", "Text", "Field_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "oem", "bed_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "oem", "bed_", "._", "constants_", "import_", "URL", "\\u", "RE_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "oem", "bed_", "._", "exceptions_", "import_", "OE", "mbed", "Missing", "Endpoint_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "oem", "bed_", "._", "models_", "import_", "Aggregate", "Media_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "south_", "._", "model", "sin", "spect", "or_", "import_", "add", "\\u", "introspect", "ion", "\\u", "rules_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "add", "\\u", "introspect", "ion", "\\u", "rules_", "(_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "Emb", "edd", "ed", "Media", "Field_", "]_", ",_", "#", " ", "Class", "(", "es", ")", " ", "these", " ", "appl", "y", " ", "to_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "]_", ",_", "#", " ", "Position", "al", " ", "argu", "ment", "s", " ", "(", "not", " ", "used", ")_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "#", " ", "Key", "word", " ", "argument_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "media", "\\u", "type", "\"_", ":_", "[_", "\"", "media", "\\u", "type", "\"_", ",_", "{_", "}_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", ",_", "[_", "\"", "^", "oem", "bed", "\\\\.", "fields", "\\\\.", "Emb", "edd", "ed", "Media", "Field", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Field", "Registry_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Field", "Regi", "stry", " ", "->", " ", "modifi", "ed", " ", "Bor", "g", " ", "pattern", " ", "from", " ", "Mart", "y", " ", "Al", "chin", "'", "s", " ", "Pro", " ", "Dj", "ang", "o", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "registry_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Field", "Registry_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "add", "\\u", "field_", "(_", "cls_", ",_", "model_", ",_", "field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "reg_", "=_", "cls_", "._", "\\u", "registry_", "._", "setdefault_", "(_", "model_", ",_", "[_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "reg_", "._", "append_", "(_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Field", "Registry_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "get", "\\u", "fields_", "(_", "cls_", ",_", "model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "cls_", "._", "\\u", "registry_", "._", "get_", "(_", "model_", ",_", "[_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Field", "Registry_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "contains\\u\\u_", "(_", "cls_", ",_", "model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "model_", "in_", "cls_", "._", "\\u", "registry_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Emb", "edd", "ed", "Signal", "Creator_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Emb", "edd", "ed", "Signal", "Creator_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "field_", "=_", "field_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "name_", "=_", "'\\u", "%", "s", "'_", "%_", "self_", "._", "field_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Emb", "edd", "ed", "Signal", "Creator_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "contribute", "\\u", "to", "\\u", "class_", "(_", "self_", ",_", "cls_", ",_", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "register", "\\u", "field_", "(_", "cls_", ",_", "self_", "._", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Emb", "edd", "ed", "Media", "Field_", "(_", "models_", "._", "Many", "To", "Many", "Field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Emb", "edd", "ed", "Media", "Field_", "(_", "models_", "._", "Many", "To", "Many", "Field_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "media", "\\u", "type_", "=_", "None_", ",_", "to_", "=_", "None_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "media", "\\u", "type_", "and_", "not_", "isinstance_", "(_", "media", "\\u", "type_", ",_", "(_", "basestring_", ",_", "list_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Type", "Error_", "(_", "'", "media", "\\u", "type", " ", "must", " ", "be", " ", "eit", "her", " ", "a", " ", "list", " ", "or", " ", "string", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "isinstance_", "(_", "media", "\\u", "type_", ",_", "basestring_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "media", "\\u", "type_", "=_", "[_", "media", "\\u", "type_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "media", "\\u", "type_", "=_", "media", "\\u", "type_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Emb", "edd", "ed", "Media", "Field_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", "Aggregate", "Media_", ",_", "**_", "kwargs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Emb", "edd", "ed", "Media", "Field_", "(_", "models_", "._", "Many", "To", "Many", "Field_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "contribute", "\\u", "to", "\\u", "class_", "(_", "self_", ",_", "cls_", ",_", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "I", " ", "need", " ", "a", " ", "way", " ", "to", " ", "ensure", " ", "tha", "t", " ", "this", " ", "signal", " ", "gets", " ", "created", " ", "for", " ", "all", " ", "child", "\\", "10", ";", " ", " ", " ", " ", "model", "s", ",", " ", "and", " ", "sinc", "e", " ", "model", " ", "inherita", "nce", " ", "doe", "sn", "'", "t", " ", "have", " ", "a", " ", "'", "contr", "ubi", "te", "\\u", "to", "\\u", "class", "'", "\\", "10", ";", " ", " ", " ", " ", "style", " ", "hook", ",", " ", "I", " ", "am", " ", "creati", "ng", " ", "a", " ", "fake", " ", "virtual", " ", "field", " ", "whi", "ch", " ", "will", " ", "be", " ", "adde", "d", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "all", " ", "subclasses", " ", "and", " ", "handle", "s", " ", "creati", "ng", " ", "the", " ", "signal", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "Emb", "edd", "ed", "Media", "Field_", ",_", "self_", ")_", "._", "contribute", "\\u", "to", "\\u", "class_", "(_", "cls_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "register", "\\u", "field_", "(_", "cls_", ",_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "add", " ", "a", " ", "virtual", " ", "field", " ", "tha", "t", " ", "will", " ", "create", " ", "signal", "s", " ", "on", " ", "any", "/", "all", " ", "subclasses", "_", "\\u\\u\\uNL\\u\\u\\u_", "cls_", "._", "\\u", "meta_", "._", "add", "\\u", "virtual", "\\u", "field_", "(_", "Emb", "edd", "ed", "Signal", "Creator_", "(_", "self_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "register", "\\u", "field_", "(_", "cls_", ",_", "field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Handle", "s", " ", "register", "ing", " ", "the", " ", "fields", " ", "with", " ", "the", " ", "Field", "Regi", "stry", " ", "and", " ", "creati", "ng", " ", "a", " ", "\\", "10", ";", " ", " ", " ", " ", "post", "-", "save", " ", "signal", " ", "for", " ", "the", " ", "model", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Field", "Registry_", "._", "add", "\\u", "field_", "(_", "cls_", ",_", "field_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "signals_", "._", "post", "\\u", "save_", "._", "connect_", "(_", "handle", "\\u", "save", "\\u", "embeds", "_", ",_", "sender_", "=_", "cls_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dispatch", "\\u", "uid_", "=_", "'%", "s", ".", "%", "s", ".", "%", "s", "'_", "%_", "(_", "cls_", "._", "\\u", "meta_", "._", "app", "\\u", "label_", ",_", "cls_", "._", "\\u", "meta_", "._", "module", "\\u", "name_", ",_", "field_", "._", "name_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "handle", "\\u", "save", "\\u", "embeds", "_", "(_", "sender_", ",_", "instance_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "embedde", "d\\u", "media", "\\u", "fields_", "=_", "Field", "Registry_", "._", "get", "\\u", "fields_", "(_", "sender_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "embedde", "d\\u", "media", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "urls_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "field_", "in_", "instance_", "._", "\\u", "meta_", "._", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "field_", ",_", "Text", "Field_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "urls_", "._", "extend_", "(_", "re_", "._", "findall_", "(_", "URL", "\\u", "RE_", ",_", "getattr_", "(_", "instance_", ",_", "field_", "._", "name_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "urls_", "=_", "set_", "(_", "urls_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "embedde", "d\\u", "field_", "in_", "embedde", "d\\u", "media", "\\u", "fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m2", "m_", "=_", "getattr_", "(_", "instance_", ",_", "embedde", "d\\u", "field_", "._", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m2", "m_", "._", "clear_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "url_", "in_", "urls_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "provider_", "=_", "oem", "bed_", "._", "site_", "._", "provide", "r", "\\u", "for", "\\u", "url_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "OE", "mbed", "Missing", "Endpoint_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "embedde", "d\\u", "field_", "._", "media", "\\u", "type_", "or_", "provider_", "._", "resource", "\\u", "type_", "in_", "embedde", "d\\u", "field_", "._", "media", "\\u", "type_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "media", "\\u", "obj_", ",_", "created_", "=_", "Aggregate", "Media_", "._", "objects_", "._", "get", "\\u", "or", "\\u", "create_", "(_", "url_", "=_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m2", "m_", "._", "add_", "(_", "media", "\\u", "obj_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
divio/django-mailchimp/mailchimp/chimpy/test_chimpy.py
[ { "content": "\"\"\"\nTests for chimpy. Run them with noserunner\n\nYou need to activate groups in the Mailchimp web UI before running tests:\n\n * Browse to http://admin.mailchimp.com\n * List setting -> Groups for segmentation \n * Check \"add groups to my list\"\n\n\"\"\"\n\nimport os\nimport pprint\nimport operator\nimport random\nimport md5\nimport datetime\n\nimport chimpy\n\nchimp = None\n\n\nEMAIL_ADDRESS = '[email protected]'\nEMAIL_ADDRESS2 = '[email protected]'\nLIST_NAME = 'unittests'\nLIST_ID = None\n\n\n\n\n\n\n\n\n\n# use double_optin=False to prevent manual intervention\n\n\n\n\n\n\n\n\n\n\nif __name__ == '__main__':\n setup_module()\n for f in globals().keys():\n if f.startswith('test_') and callable(globals()[f]):\n print f\n globals()[f]()\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def setup_module():\n assert 'MAILCHIMP_APIKEY' in os.environ, \\\n \"please set the MAILCHIMP_APIKEY environment variable\\n\" \\\n \"you can get a new api key by calling:\\n\" \\\n \" wget 'http://api.mailchimp.com/1.1/?output=json&method=login\" \\\n \"&password=xxxxxx&username=yyyyyyyy' -O apikey\"\n\n\n global chimp\n chimp = chimpy.Connection(os.environ['MAILCHIMP_APIKEY'])", "metadata": "root.setup_module", "header": "['module', '___EOS___']", "index": 29 }, { "content": "def test_ping():\n assert chimp.ping() == \"Everything's Chimpy!\"", "metadata": "root.test_ping", "header": "['module', '___EOS___']", "index": 41 }, { "content": "def test_lists():\n lists = chimp.lists()\n pprint.pprint(lists)\n list_names = map(lambda x: x['name'], lists)\n assert LIST_NAME in list_names", "metadata": "root.test_lists", "header": "['module', '___EOS___']", "index": 45 }, { "content": "def list_id():\n global LIST_ID\n if LIST_ID is None:\n test_list = [x for x in chimp.lists() if x['name'] == LIST_NAME].pop()\n LIST_ID = test_list['id']\n return LIST_ID", "metadata": "root.list_id", "header": "['module', '___EOS___']", "index": 52 }, { "content": "def test_list_subscribe_and_unsubscribe():\n result = chimp.list_subscribe(list_id(), EMAIL_ADDRESS,\n {'FIRST': 'unit', 'LAST': 'tests'},\n double_optin=False)\n pprint.pprint(result)\n assert result == True\n\n members = chimp.list_members(list_id())['data']\n print members\n emails = map(lambda x: x['email'], members)\n print members\n assert EMAIL_ADDRESS in emails\n\n result = chimp.list_unsubscribe(list_id(),\n EMAIL_ADDRESS,\n delete_member=True,\n send_goodbye=False,\n send_notify=False)\n pprint.pprint(result)\n assert result == True", "metadata": "root.test_list_subscribe_and_unsubscribe", "header": "['module', '___EOS___']", "index": 60 }, { "content": "def test_list_batch_subscribe_and_batch_unsubscribe():\n batch = [{'EMAIL':EMAIL_ADDRESS,'EMAIL_TYPE':'html'},\n {'EMAIL':EMAIL_ADDRESS2,'EMAIL_TYPE':'text'}]\n\n result = chimp.list_batch_subscribe(list_id(),\n batch,\n double_optin=False,\n update_existing=False,\n replace_interests=False)\n assert result['add_count'] == 2\n\n members = chimp.list_members(list_id())['data']\n emails = map(lambda x: x['email'], members)\n assert EMAIL_ADDRESS in emails\n assert EMAIL_ADDRESS2 in emails\n\n result = chimp.list_batch_unsubscribe(list_id(),\n [EMAIL_ADDRESS,EMAIL_ADDRESS2],\n delete_member=True,\n send_goodbye=False,\n send_notify=False)\n assert result['success_count'] == 2", "metadata": "root.test_list_batch_subscribe_and_batch_unsubscribe", "header": "['module', '___EOS___']", "index": 81 }, { "content": "def test_list_interest_groups_add_and_delete():\n # check no lists exists\n# pprint.pprint(chimp.list_interest_groups(list_id()))\n grouping_id = chimp.list_interest_groupings_add(list_id(), 'test grouping', 'hidden', ['first group'])\n assert len(chimp.list_interest_groups(list_id(), grouping_id)['groups']) == 1\n\n # add list\n assert chimp.list_interest_group_add(list_id(), 'test', grouping_id)\n assert len(chimp.list_interest_groups(list_id(), grouping_id)['groups']) == 2\n\n # delete list\n assert chimp.list_interest_group_del(list_id(), 'test', grouping_id)\n assert len(chimp.list_interest_groups(list_id(), grouping_id)['groups']) == 1\n assert (chimp.list_interest_groupings_del(grouping_id))", "metadata": "root.test_list_interest_groups_add_and_delete", "header": "['module', '___EOS___']", "index": 104 }, { "content": "def test_list_merge_vars_add_and_delete():\n pprint.pprint(chimp.list_merge_vars(list_id()))\n assert len(chimp.list_merge_vars(list_id())) == 3\n\n # add list\n assert chimp.list_merge_var_add(list_id(), 'test', 'some_text')\n assert len(chimp.list_merge_vars(list_id())) == 4\n\n # delete list\n assert chimp.list_merge_var_del(list_id(), 'test')\n assert len(chimp.list_merge_vars(list_id())) == 3", "metadata": "root.test_list_merge_vars_add_and_delete", "header": "['module', '___EOS___']", "index": 119 }, { "content": "def test_list_update_member_and_member_info():\n # set up\n assert chimp.list_subscribe(list_id(), EMAIL_ADDRESS,\n {'FIRST': 'unit', 'LAST': 'tests'},\n double_optin=False)\n assert chimp.list_merge_var_add(list_id(), 'TEST', 'test_merge_var')\n grouping_id = chimp.list_interest_groupings_add(list_id(), 'tlistg', 'hidden', ['tlist'])\n\n\n # update member and get the info back\n assert chimp.list_update_member(list_id(), EMAIL_ADDRESS,\n {'TEST': 'abc',\n 'INTERESTS': 'tlist'}, replace_interests=False)\n info = chimp.list_member_info(list_id(), EMAIL_ADDRESS)\n pprint.pprint(info)\n\n # tear down\n assert chimp.list_merge_var_del(list_id(), 'TEST')\n assert chimp.list_interest_group_del(list_id(), 'tlist', grouping_id)\n assert chimp.list_interest_groupings_del(grouping_id)\n assert chimp.list_unsubscribe(list_id(), EMAIL_ADDRESS,\n delete_member=True,\n send_goodbye=False,\n send_notify=False)\n\n # check the info matches the set up\n assert 'TEST' in info['merges']\n assert info['merges']['TEST'] == 'abc'", "metadata": "root.test_list_update_member_and_member_info", "header": "['module', '___EOS___']", "index": 131 }, { "content": "def test_create_delete_campaign():\n uid = md5.new(str(random.random())).hexdigest()\n subject = 'chimpy campaign test %s' % uid\n options = {'list_id': list_id(),\n 'subject': subject,\n 'from_email': EMAIL_ADDRESS,\n 'from_name': 'chimpy',\n 'generate_text': True\n }\n\n #this just to be sure flatten utility is working\n segment_opts = {'match': 'any', \n 'conditions':[{'field': 'date', 'op': 'gt', 'value': '2000-01-01'},\n {'field': 'email', 'op': 'like', 'value': '@'}]}\n\n html = \"\"\" <html><body><h1>My test newsletter</h1><p>Just testing</p>\n <a href=\"*|UNSUB|*\">Unsubscribe</a>*|REWARDS|*</body>\"\"\"\n\n\n content = {'html': html}\n cid = chimp.campaign_create('regular', options, content, segment_opts=segment_opts)\n assert isinstance(cid, basestring)\n\n # check if the new campaign really is there\n campaigns = chimp.campaigns(filter_subject=subject)\n assert len(campaigns['data'])==1\n assert campaigns['data'][0]['id'] == cid\n\n # our content properly addd?\n final_content = chimp.campaign_content(cid)\n assert '<h1>My test newsletter</h1>' in final_content['html']\n assert 'My test newsletter' in final_content['text']\n\n # clean up\n chimp.campaign_delete(cid)", "metadata": "root.test_create_delete_campaign", "header": "['module', '___EOS___']", "index": 161 }, { "content": "def test_replicate_update_campaign():\n \"\"\" replicates and updates a campaign \"\"\"\n\n uid = md5.new(str(random.random())).hexdigest()\n subject = 'chimpy campaign test %s' % uid\n options = {'list_id': list_id(),\n 'subject': subject,\n 'from_email': EMAIL_ADDRESS,\n 'from_name': 'chimpy',\n 'generate_text': True\n }\n\n html = \"\"\" <html><body><h1>My test newsletter</h1><p>Just testing</p>\n <a href=\"*|UNSUB|*\">Unsubscribe</a>*|REWARDS|*</body>\"\"\"\n\n\n content = {'html': html}\n cid = chimp.campaign_create('regular', options, content)\n\n newcid = chimp.campaign_replicate(cid=cid)\n assert isinstance(newcid, basestring)\n\n newsubject = 'Fresh subject ' + uid\n newtitle = 'Custom title ' + uid\n\n res = chimp.campaign_update(newcid, 'subject', newsubject)\n assert res is True\n res = chimp.campaign_update(newcid, 'title', newtitle)\n assert res is True\n\n# campaigns = chimp.campaigns(filter_subject=newsubject)\n# pprint.pprint(campaigns['data'])\n# assert len(campaigns['data'])==1\n# campaigns = chimp.campaigns(filter_title=newtitle)\n# assert len(campaigns['data'])==1\n\n #clean up\n chimp.campaign_delete(newcid)\n chimp.campaign_delete(cid)", "metadata": "root.test_replicate_update_campaign", "header": "['module', '___EOS___']", "index": 197 }, { "content": "def test_schedule_campaign():\n \"\"\" schedules and unschedules a campaign \"\"\"\n\n uid = md5.new(str(random.random())).hexdigest()\n subject = 'chimpy campaign schedule test %s' % uid\n options = {'list_id': list_id(),\n 'subject': subject,\n 'from_email': EMAIL_ADDRESS,\n 'from_name': 'chimpy',\n 'generate_text': True\n }\n\n html = \"\"\" <html><body><h1>My test newsletter</h1><p>Just testing</p>\n <a href=\"*|UNSUB|*\">Unsubscribe</a>*|REWARDS|*</body>\"\"\"\n\n\n content = {'html': html}\n cid = chimp.campaign_create('regular', options, content)\n\n schedule_time = datetime.datetime(2012, 12, 20, 19, 0, 0)\n chimp.campaign_schedule(cid, schedule_time)\n\n campaign = chimp.campaigns(filter_subject=subject)['data'][0]\n assert campaign['status'] == 'schedule'\n assert campaign['send_time'] in ('Dec 20, 2012 07:00 pm', '2012-12-20 19:00:00')\n\n chimp.campaign_unschedule(cid)\n campaign = chimp.campaigns(filter_subject=subject)['data'][0]\n assert campaign['status'] == 'save'\n\n #clean up\n chimp.campaign_delete(cid)", "metadata": "root.test_schedule_campaign", "header": "['module', '___EOS___']", "index": 237 }, { "content": "def test_rss_campaign():\n \"\"\" add, pause, resume rss campaign \"\"\"\n\n uid = md5.new(str(random.random())).hexdigest()\n subject = 'chimpy campaign rss test %s' % uid\n options = {'list_id': list_id(),\n 'subject': subject,\n 'from_email': EMAIL_ADDRESS,\n 'from_name': 'chimpy',\n 'generate_text': True\n }\n\n html = \"\"\" <html><body><h1>My test RSS newsletter</h1><p>Just testing</p>\n <a href=\"*|UNSUB|*\">Unsubscribe</a>*|REWARDS|*</body>\"\"\"\n\n\n content = {'html': html}\n type_opts = {'url': 'http://mailchimp.com/blog/rss'}\n\n cid = chimp.campaign_create('rss', options, content, type_opts=type_opts)\n campaign = chimp.campaigns(filter_subject=subject)['data'][0]\n assert campaign['type'] == 'rss'\n\n # Todo: Could not find a way to activate the RSS from the API. You need to\n # activate before being able to test pause and resume. send_now and schedule\n # didn't do the trick.\n\n #chimp.campaign_pause(cid)\n #chimp.campaign_resume(cid)\n\n #clean up\n chimp.campaign_delete(cid)", "metadata": "root.test_rss_campaign", "header": "['module', '___EOS___']", "index": 270 } ]
[ { "span": "import operator", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Test", "s", " ", "for", " ", "chi", "mpy", ".", " ", "Run", " ", "them", " ", "with", " ", "nose", "runn", "er", "\\", "10", ";", "\\", "10", ";", "You", " ", "need", " ", "to", " ", "activat", "e", " ", "group", "s", " ", "in", " ", "the", " ", "Mail", "chi", "mp", " ", "web", " ", "UI", " ", "bef", "ore", " ", "runn", "ing", " ", "tests", ":", "\\", "10", ";", "\\", "10", ";", " ", "*", " ", "Brows", "e", " ", "to", " ", "http", "://", "admin", ".", "mail", "chi", "mp", ".", "com", "\\", "10", ";", " ", "*", " ", "List", " ", "setti", "ng", " ", "->", " ", "Group", "s", " ", "for", " ", "segmentation", " ", "\\", "10", ";", " ", "*", " ", "Check", " ", "\"", "add", " ", "group", "s", " ", "to", " ", "my", " ", "list", "\"", "\\", "10", ";", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pprint_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "operator_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "md5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "chi", "mpy", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "EMA", "IL", "\\u", "ADDRESS_", "=_", "'", "cas", "ual", "bear", "@", "google", "mail", ".", "com", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "EMA", "IL", "\\u", "ADDR", "ESS", "2_", "=_", "'", "dummy", "@", "dummy", ".", "com", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "LIST", "\\u", "NAME_", "=_", "'", "unittest", "s", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "LIST", "\\u", "ID_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "use", " ", "double", "\\u", "opti", "n", "=", "Fal", "se", " ", "to", " ", "prevent", " ", "manu", "al", " ", "interv", "enti", "on_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "setup", "\\u", "module_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "f_", "in_", "globals_", "(_", ")_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "f_", "._", "startswith_", "(_", "'", "test\\u", "'_", ")_", "and_", "callable_", "(_", "globals_", "(_", ")_", "[_", "f_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "f_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "globals_", "(_", ")_", "[_", "f_", "]_", "(_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "setup", "\\u", "module_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "'", "MAIL", "CHI", "MP", "\\u", "API", "KEY", "'_", "in_", "os_", "._", "environ_", ",_", "\"", "plea", "se", " ", "set", " ", "the", " ", "MAIL", "CHI", "MP", "\\u", "API", "KEY", " ", "environ", "ment", " ", "variab", "le", "\\\\", "n", "\"_", "\"", "you", " ", "can", " ", "get", " ", "a", " ", "new", " ", "api", " ", "key", " ", "by", " ", "calling", ":\\\\", "n", "\"_", "\"", " ", "wg", "et", " ", "'", "http", "://", "api", ".", "mail", "chi", "mp", ".", "com", "/", "1.1", "/?", "output", "=", "json", "&", "method", "=", "login", "\"_", "\"&", "password", "=", "xxxxxx", "&", "user", "name", "=", "yyyy", "yyyy", "'", " ", "-", "O", " ", "api", "key", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "global_", "chi", "mp_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "chi", "mp_", "=_", "chi", "mpy", "_", "._", "Connection_", "(_", "os_", "._", "environ_", "[_", "'", "MAIL", "CHI", "MP", "\\u", "API", "KEY", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "ping_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "chi", "mp_", "._", "ping_", "(_", ")_", "==_", "\"", "Every", "thing", "'", "s", " ", "Chi", "mpy", "!\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "lists_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lists_", "=_", "chi", "mp_", "._", "lists_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pprint_", "._", "pprint_", "(_", "lists_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "list", "\\u", "names_", "=_", "map_", "(_", "lambda_", "x_", ":_", "x_", "[_", "'", "name", "'_", "]_", ",_", "lists_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "LIST", "\\u", "NAME_", "in_", "list", "\\u", "names_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "list", "\\u", "id_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "LIST", "\\u", "ID_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "LIST", "\\u", "ID_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test\\u", "list_", "=_", "[_", "x_", "for_", "x_", "in_", "chi", "mp_", "._", "lists_", "(_", ")_", "if_", "x_", "[_", "'", "name", "'_", "]_", "==_", "LIST", "\\u", "NAME_", "]_", "._", "pop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "LIST", "\\u", "ID_", "=_", "test\\u", "list_", "[_", "'", "id", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "LIST", "\\u", "ID_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", "\\u", "subscribe", "\\u", "and", "\\u", "unsubscribe_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "result_", "=_", "chi", "mp_", "._", "list", "\\u", "subscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "FIR", "ST", "'_", ":_", "'", "unit", "'_", ",_", "'", "LAS", "T", "'_", ":_", "'", "tests", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "double", "\\u", "opti", "n_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pprint_", "._", "pprint_", "(_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "result_", "==_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "members_", "=_", "chi", "mp_", "._", "list", "\\u", "members_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", "[_", "'", "data", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "members_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "emails_", "=_", "map_", "(_", "lambda_", "x_", ":_", "x_", "[_", "'", "email", "'_", "]_", ",_", "members_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "members_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "EMA", "IL", "\\u", "ADDRESS_", "in_", "emails_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "chi", "mp_", "._", "list", "\\u", "unsubscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "delete", "\\u", "member_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "good", "bye", "_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "notify_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pprint_", "._", "pprint_", "(_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "result_", "==_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", "\\u", "batch", "\\u", "subscribe", "\\u", "and", "\\u", "batch", "\\u", "unsubscribe_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "batch_", "=_", "[_", "{_", "'", "EMA", "IL", "'_", ":_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "'", "EMA", "IL", "\\u", "TYPE", "'_", ":_", "'", "html", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "EMA", "IL", "'_", ":_", "EMA", "IL", "\\u", "ADDR", "ESS", "2_", ",_", "'", "EMA", "IL", "\\u", "TYPE", "'_", ":_", "'", "text", "'_", "}_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "chi", "mp_", "._", "list", "\\u", "batch", "\\u", "subscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "batch_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "double", "\\u", "opti", "n_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "update", "\\u", "existing_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "replace", "\\u", "interest", "s_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "result_", "[_", "'", "add", "\\u", "count", "'_", "]_", "==_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "members_", "=_", "chi", "mp_", "._", "list", "\\u", "members_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", "[_", "'", "data", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "emails_", "=_", "map_", "(_", "lambda_", "x_", ":_", "x_", "[_", "'", "email", "'_", "]_", ",_", "members_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "EMA", "IL", "\\u", "ADDRESS_", "in_", "emails_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "EMA", "IL", "\\u", "ADDR", "ESS", "2_", "in_", "emails_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "chi", "mp_", "._", "list", "\\u", "batch", "\\u", "unsubscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "EMA", "IL", "\\u", "ADDR", "ESS", "2_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "delete", "\\u", "member_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "good", "bye", "_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "notify_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "result_", "[_", "'", "success", "\\u", "count", "'_", "]_", "==_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", "\\u", "interest", "\\u", "group", "s", "\\u", "add", "\\u", "and", "\\u", "delete_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "check", " ", "no", " ", "lists", " ", "exists_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "ppr", "int", ".", "ppr", "int", "(", "chi", "mp", ".", "list", "\\u", "interest", "\\u", "group", "s", "(", "list", "\\u", "id", "())", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "grouping", "\\u", "id_", "=_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "grouping", "s", "\\u", "add_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "test", " ", "grouping", "'_", ",_", "'", "hidden", "'_", ",_", "[_", "'", "first", " ", "group", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "groups_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "grouping", "\\u", "id_", ")_", "[_", "'", "group", "s", "'_", "]_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "add", " ", "list_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "group", "\\u", "add_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "test", "'_", ",_", "grouping", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "groups_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "grouping", "\\u", "id_", ")_", "[_", "'", "group", "s", "'_", "]_", ")_", "==_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "delete", " ", "list_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "group", "\\u", "del_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "test", "'_", ",_", "grouping", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "groups_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "grouping", "\\u", "id_", ")_", "[_", "'", "group", "s", "'_", "]_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "(_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "grouping", "s", "\\u", "del_", "(_", "grouping", "\\u", "id_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", "\\u", "merge", "\\u", "vars", "\\u", "add", "\\u", "and", "\\u", "delete_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pprint_", "._", "pprint_", "(_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "vars_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "vars_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", ")_", "==_", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "add", " ", "list_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "var", "\\u", "add_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "test", "'_", ",_", "'", "some", "\\u", "text", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "vars_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", ")_", "==_", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "delete", " ", "list_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "var", "\\u", "del_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "test", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "vars_", "(_", "list", "\\u", "id_", "(_", ")_", ")_", ")_", "==_", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", "\\u", "update", "\\u", "member", "\\u", "and", "\\u", "member", "\\u", "info_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "set", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "chi", "mp_", "._", "list", "\\u", "subscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "FIR", "ST", "'_", ":_", "'", "unit", "'_", ",_", "'", "LAS", "T", "'_", ":_", "'", "tests", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "double", "\\u", "opti", "n_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "var", "\\u", "add_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "TEST", "'_", ",_", "'", "test\\u", "merge", "\\u", "var", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "grouping", "\\u", "id_", "=_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "grouping", "s", "\\u", "add_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "tli", "stg", "'_", ",_", "'", "hidden", "'_", ",_", "[_", "'", "tli", "st", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "update", " ", "member", " ", "and", " ", "get", " ", "the", " ", "info", " ", "back_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "update", "\\u", "member_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "TEST", "'_", ":_", "'", "abc", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "INTER", "EST", "S", "'_", ":_", "'", "tli", "st", "'_", "}_", ",_", "replace", "\\u", "interest", "s_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "info_", "=_", "chi", "mp_", "._", "list", "\\u", "member", "\\u", "info_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "EMA", "IL", "\\u", "ADDRESS_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pprint_", "._", "pprint_", "(_", "info_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "tear", " ", "down_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "merge", "\\u", "var", "\\u", "del_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "TEST", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "group", "\\u", "del_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "'", "tli", "st", "'_", ",_", "grouping", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "interest", "\\u", "grouping", "s", "\\u", "del_", "(_", "grouping", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "chi", "mp_", "._", "list", "\\u", "unsubscribe_", "(_", "list", "\\u", "id_", "(_", ")_", ",_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "delete", "\\u", "member_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "good", "bye", "_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "send", "\\u", "notify_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "check", " ", "the", " ", "info", " ", "matche", "s", " ", "the", " ", "set", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "'", "TEST", "'_", "in_", "info_", "[_", "'", "merges", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "info_", "[_", "'", "merges", "'_", "]_", "[_", "'", "TEST", "'_", "]_", "==_", "'", "abc", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "create", "\\u", "delete", "\\u", "campaign_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "uid_", "=_", "md5_", "._", "new_", "(_", "str_", "(_", "random_", "._", "random_", "(_", ")_", ")_", ")_", "._", "hexdigest_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "'", "chi", "mpy", " ", "camp", "aig", "n", " ", "test", " ", "%", "s", "'_", "%_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", "=_", "{_", "'", "list", "\\u", "id", "'_", ":_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "subject", "'_", ":_", "subject_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "email", "'_", ":_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "name", "'_", ":_", "'", "chi", "mpy", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "generat", "e\\u", "text", "'_", ":_", "True_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "this", " ", "just", " ", "to", " ", "be", " ", "sure", " ", "flat", "ten", " ", "utility", " ", "is", " ", "working", "_", "\\u\\u\\uNL\\u\\u\\u_", "segment", "\\u", "opts_", "=_", "{_", "'", "match", "'_", ":_", "'", "any", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "condition", "s", "'_", ":_", "[_", "{_", "'", "field", "'_", ":_", "'", "date", "'_", ",_", "'", "op", "'_", ":_", "'", "gt", "'_", ",_", "'", "value", "'_", ":_", "'", "2000", "-0", "1", "-0", "1", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "field", "'_", ":_", "'", "email", "'_", ",_", "'", "op", "'_", ":_", "'", "like", "'_", ",_", "'", "value", "'_", ":_", "'@'_", "}_", "]_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "html_", "=_", "\"\"\"", " ", "<", "html", "><", "body", "><", "h1", ">", "My", " ", "test", " ", "newsletter", "</", "h1", "><", "p", ">", "Ju", "st", " ", "testi", "ng", "</", "p", ">", "\\", "10", ";", " ", " ", " ", "<", "a", " ", "href", "=\"", "*|", "UNSU", "B", "|", "*\"", ">", "Unsu", "bsc", "ribe", "</", "a", ">*", "|", "RE", "WARD", "S", "|", "*<", "/", "body", ">\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "content_", "=_", "{_", "'", "html", "'_", ":_", "html_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cid_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "create_", "(_", "'", "regular", "'_", ",_", "options_", ",_", "content_", ",_", "segment", "\\u", "opts_", "=_", "segment", "\\u", "opts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "isinstance_", "(_", "cid_", ",_", "basestring_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "check", " ", "if", " ", "the", " ", "new", " ", "camp", "aig", "n", " ", "reall", "y", " ", "is", " ", "there", "_", "\\u\\u\\uNL\\u\\u\\u_", "campaigns", "_", "=_", "chi", "mp_", "._", "campaigns", "_", "(_", "filter", "\\u", "subject_", "=_", "subject_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "campaigns", "_", "[_", "'", "data", "'_", "]_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "campaigns", "_", "[_", "'", "data", "'_", "]_", "[_", "0_", "]_", "[_", "'", "id", "'_", "]_", "==_", "cid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "our", " ", "content", " ", "proper", "ly", " ", "add", "d", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "final", "\\u", "content_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "content_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "'<", "h1", ">", "My", " ", "test", " ", "newsletter", "</", "h1", ">'_", "in_", "final", "\\u", "content_", "[_", "'", "html", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "'", "My", " ", "test", " ", "newsletter", "'_", "in_", "final", "\\u", "content_", "[_", "'", "text", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "clean", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "delete_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "replicate", "\\u", "update", "\\u", "campaign_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "replicate", "s", " ", "and", " ", "update", "s", " ", "a", " ", "camp", "aig", "n", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "uid_", "=_", "md5_", "._", "new_", "(_", "str_", "(_", "random_", "._", "random_", "(_", ")_", ")_", ")_", "._", "hexdigest_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "'", "chi", "mpy", " ", "camp", "aig", "n", " ", "test", " ", "%", "s", "'_", "%_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", "=_", "{_", "'", "list", "\\u", "id", "'_", ":_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "subject", "'_", ":_", "subject_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "email", "'_", ":_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "name", "'_", ":_", "'", "chi", "mpy", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "generat", "e\\u", "text", "'_", ":_", "True_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "html_", "=_", "\"\"\"", " ", "<", "html", "><", "body", "><", "h1", ">", "My", " ", "test", " ", "newsletter", "</", "h1", "><", "p", ">", "Ju", "st", " ", "testi", "ng", "</", "p", ">", "\\", "10", ";", " ", " ", " ", "<", "a", " ", "href", "=\"", "*|", "UNSU", "B", "|", "*\"", ">", "Unsu", "bsc", "ribe", "</", "a", ">*", "|", "RE", "WARD", "S", "|", "*<", "/", "body", ">\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "content_", "=_", "{_", "'", "html", "'_", ":_", "html_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cid_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "create_", "(_", "'", "regular", "'_", ",_", "options_", ",_", "content_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "newc", "id_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "replicate", "_", "(_", "cid_", "=_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "isinstance_", "(_", "newc", "id_", ",_", "basestring_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "news", "ub", "ject_", "=_", "'", "Fre", "sh", " ", "subject", " ", "'_", "+_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "newt", "itle_", "=_", "'", "Custom", " ", "title", " ", "'_", "+_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "update_", "(_", "newc", "id_", ",_", "'", "subject", "'_", ",_", "news", "ub", "ject_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "res_", "is_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "update_", "(_", "newc", "id_", ",_", "'", "title", "'_", ",_", "newt", "itle_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "res_", "is_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "campaigns", " ", "=", " ", "chi", "mp", ".", "campaigns", "(", "filter", "\\u", "subject", "=", "news", "ub", "ject", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "ppr", "int", ".", "ppr", "int", "(", "campaigns", "['", "data", "'])", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "assert", " ", "len", "(", "campaigns", "['", "data", "'])", "==", "1_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "campaigns", " ", "=", " ", "chi", "mp", ".", "campaigns", "(", "filter", "\\u", "title", "=", "newt", "itle", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "assert", " ", "len", "(", "campaigns", "['", "data", "'])", "==", "1_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "clean", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "delete_", "(_", "newc", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "delete_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "schedule", "\\u", "campaign_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "schedules", " ", "and", " ", "unsc", "hedule", "s", " ", "a", " ", "camp", "aig", "n", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "uid_", "=_", "md5_", "._", "new_", "(_", "str_", "(_", "random_", "._", "random_", "(_", ")_", ")_", ")_", "._", "hexdigest_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "'", "chi", "mpy", " ", "camp", "aig", "n", " ", "schedule", " ", "test", " ", "%", "s", "'_", "%_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", "=_", "{_", "'", "list", "\\u", "id", "'_", ":_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "subject", "'_", ":_", "subject_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "email", "'_", ":_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "name", "'_", ":_", "'", "chi", "mpy", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "generat", "e\\u", "text", "'_", ":_", "True_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "html_", "=_", "\"\"\"", " ", "<", "html", "><", "body", "><", "h1", ">", "My", " ", "test", " ", "newsletter", "</", "h1", "><", "p", ">", "Ju", "st", " ", "testi", "ng", "</", "p", ">", "\\", "10", ";", " ", " ", " ", "<", "a", " ", "href", "=\"", "*|", "UNSU", "B", "|", "*\"", ">", "Unsu", "bsc", "ribe", "</", "a", ">*", "|", "RE", "WARD", "S", "|", "*<", "/", "body", ">\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "content_", "=_", "{_", "'", "html", "'_", ":_", "html_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "cid_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "create_", "(_", "'", "regular", "'_", ",_", "options_", ",_", "content_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "schedule", "\\u", "time_", "=_", "datetime_", "._", "datetime_", "(_", "2012_", ",_", "12_", ",_", "20_", ",_", "19_", ",_", "0_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "schedule_", "(_", "cid_", ",_", "schedule", "\\u", "time_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "campaign_", "=_", "chi", "mp_", "._", "campaigns", "_", "(_", "filter", "\\u", "subject_", "=_", "subject_", ")_", "[_", "'", "data", "'_", "]_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "campaign_", "[_", "'", "status", "'_", "]_", "==_", "'", "schedule", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "campaign_", "[_", "'", "send", "\\u", "time", "'_", "]_", "in_", "(_", "'", "De", "c", " ", "20", ",", " ", "2012", " ", "0", "7", ":", "00", " ", "pm", "'_", ",_", "'", "2012", "-1", "2", "-", "20", " ", "1", "9", ":", "00", ":", "00", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "unsc", "hedule", "_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "campaign_", "=_", "chi", "mp_", "._", "campaigns", "_", "(_", "filter", "\\u", "subject_", "=_", "subject_", ")_", "[_", "'", "data", "'_", "]_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "campaign_", "[_", "'", "status", "'_", "]_", "==_", "'", "save", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "clean", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "delete_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "rs", "s", "\\u", "campaign_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "add", ",", " ", "paus", "e", ",", " ", "resum", "e", " ", "rs", "s", " ", "camp", "aig", "n", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "uid_", "=_", "md5_", "._", "new_", "(_", "str_", "(_", "random_", "._", "random_", "(_", ")_", ")_", ")_", "._", "hexdigest_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "'", "chi", "mpy", " ", "camp", "aig", "n", " ", "rs", "s", " ", "test", " ", "%", "s", "'_", "%_", "uid_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "options_", "=_", "{_", "'", "list", "\\u", "id", "'_", ":_", "list", "\\u", "id_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "subject", "'_", ":_", "subject_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "email", "'_", ":_", "EMA", "IL", "\\u", "ADDRESS_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "from", "\\u", "name", "'_", ":_", "'", "chi", "mpy", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "generat", "e\\u", "text", "'_", ":_", "True_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "html_", "=_", "\"\"\"", " ", "<", "html", "><", "body", "><", "h1", ">", "My", " ", "test", " ", "RSS", " ", "newsletter", "</", "h1", "><", "p", ">", "Ju", "st", " ", "testi", "ng", "</", "p", ">", "\\", "10", ";", " ", " ", " ", "<", "a", " ", "href", "=\"", "*|", "UNSU", "B", "|", "*\"", ">", "Unsu", "bsc", "ribe", "</", "a", ">*", "|", "RE", "WARD", "S", "|", "*<", "/", "body", ">\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "content_", "=_", "{_", "'", "html", "'_", ":_", "html_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "type", "\\u", "opts_", "=_", "{_", "'", "url", "'_", ":_", "'", "http", "://", "mail", "chi", "mp", ".", "com", "/", "blog", "/", "rs", "s", "'_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cid_", "=_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "create_", "(_", "'", "rs", "s", "'_", ",_", "options_", ",_", "content_", ",_", "type", "\\u", "opts_", "=_", "type", "\\u", "opts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "campaign_", "=_", "chi", "mp_", "._", "campaigns", "_", "(_", "filter", "\\u", "subject_", "=_", "subject_", ")_", "[_", "'", "data", "'_", "]_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "campaign_", "[_", "'", "type", "'_", "]_", "==_", "'", "rs", "s", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Todo", ":", " ", "Cou", "ld", " ", "not", " ", "find", " ", "a", " ", "way", " ", "to", " ", "activat", "e", " ", "the", " ", "RSS", " ", "from", " ", "the", " ", "API", ".", " ", "You", " ", "need", " ", "to_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "activat", "e", " ", "bef", "ore", " ", "bei", "ng", " ", "able", " ", "to", " ", "test", " ", "paus", "e", " ", "and", " ", "resum", "e", ".", " ", "send", "\\u", "now", " ", "and", " ", "schedule_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "did", "n", "'", "t", " ", "do", " ", "the", " ", "trick", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "chi", "mp", ".", "camp", "aig", "n", "\\u", "paus", "e", "(", "cid", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "chi", "mp", ".", "camp", "aig", "n", "\\u", "resum", "e", "(", "cid", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "clean", " ", "up_", "\\u\\u\\uNL\\u\\u\\u_", "chi", "mp_", "._", "camp", "aig", "n", "\\u", "delete_", "(_", "cid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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"\tdef test_load_config_with_multiple_entries(self):\n\t\tpettingzoo.discovery.write_distributed_config(\n\t\t\tself.connection, 'mysql', 'reports', self.sample, '127.0.0.1')\n\t\tpettingzoo.discovery.write_distributed_config(\n\t\t\tself.connection, 'mysql', 'reports', self.sample2, '127.0.0.2')\n\t\tdmc = pettingzoo.discovery.DistributedMultiDiscovery(self.connection)\n\t\tconfigs = dmc.load_config('mysql', 'reports')\n\t\tself.assertTrue(len(configs), 2)\n\t\tips = ['127.0.0.1', '127.0.0.2']\n\t\tfor config in configs:\n\t\t\tmismatch_keys = [\n\t\t\t\tkey for key in self.sample\n\t\t\t\t\tif not key in config or self.sample[key] != config[key]]\n\t\t\tips.remove(config['header']['metadata']['key'])\n\t\tself.assertEquals(len(ips), 0)", "metadata": "root.DistributedMultiDiscovery.test_load_config_with_multiple_entries", "header": "['class', 'DistributedMultiDiscovery', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 259 } ]
[ { "span": "mismatch_keys ", "start_line": 269, "start_column": 3, "end_line": 269, "end_column": 16 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Distribut", "ed", "Multi", "Discover", "y_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "load", "\\u", "config", "\\u", "with", "\\u", "multiple", "\\u", "entries_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "pet", "ting", "zoo", "_", "._", "discovery_", "._", "write", "\\u", "distributed", "\\u", "config_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "connection_", ",_", "'", "mysql", "'_", ",_", "'", "report", "s", "'_", ",_", "self_", "._", "sample_", ",_", "'", "127", ".0", ".0", ".1", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pet", "ting", "zoo", "_", "._", "discovery_", "._", "write", "\\u", "distributed", "\\u", "config_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "connection_", ",_", "'", "mysql", "'_", ",_", "'", "report", "s", "'_", ",_", "self_", "._", "sample", "2_", ",_", "'", "127", ".0", ".0", ".2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dm", "c_", "=_", "pet", "ting", "zoo", "_", "._", "discovery_", "._", "Distribut", "ed", "Multi", "Discover", "y_", "(_", "self_", "._", "connection_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "configs_", "=_", "dm", "c_", "._", "load", "\\u", "config_", "(_", "'", "mysql", "'_", ",_", "'", "report", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "len_", "(_", "configs_", ")_", ",_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ips_", "=_", "[_", "'", "127", ".0", ".0", ".1", "'_", ",_", "'", "127", ".0", ".0", ".2", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "config_", "in_", "configs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "mism", "atch", "\\u", "keys_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "for_", "key_", "in_", "self_", "._", "sample_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "key_", "in_", "config_", "or_", "self_", "._", "sample_", "[_", "key_", "]_", "!=_", "config_", "[_", "key_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ips_", "._", "remove_", "(_", "config_", "[_", "'", "header", "'_", "]_", "[_", "'", "metadata", "'_", "]_", "[_", "'", "key", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "ips_", ")_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Variable defined multiple times
yspanchal/docli/docli/commands/ssh_keys.py
[ { "content": "@ssh_keys_group.command(name='ssh-key', context_settings=CONTEXT_SETTINGS)\[email protected]('--getlist', '-l', is_flag=True, help='list all ssh keys')\[email protected]('--create', '-c', is_flag=True, help='add new ssh key')\[email protected]('--name', '-n', type=str, help='name of ssh key', metavar='<My SSH Key>')\[email protected]('--key', '-k', type=str, help='public ssh keys string', metavar='<ssh-rsa xxx... >')\[email protected]('--retrieve', '-r', type=int, help='retrieve ssh key from id', metavar='<512190>')\[email protected]('--update', '-u', type=int, help='update ssh key from id', metavar='<512190>')\[email protected]('--delete', '-d', type=int, help='delete ssh key from id', metavar='<512190>')\[email protected]('--token', '-t', type=str, help='digital ocean authentication token', metavar='<token>')\[email protected]('--tablefmt', '-f', type=click.Choice(['fancy_grid', 'simple', 'plain', 'grid', 'pipe', 'orgtbl', 'psql', 'rst', 'mediawiki', 'html', 'latex', 'latex_booktabs', 'tsv']), help='output table format', default='fancy_grid', metavar='<format>')\[email protected]('--proxy', '-p', help='proxy url to be used for this call', metavar='<http://ip:port>')\[email protected]_context\ndef ssh_keys(ctx, getlist, create, name, key, retrieve, update, delete, token, \n\t\t\ttablefmt, proxy):\n\t\"\"\"\n\tDigitalOcean allows you to add SSH public keys to the interface \n\tso that you can embed your public key into a Droplet at the time of creation.\n\t\"\"\"\n\tif (not ctx.params['getlist'] and not ctx.params['create'] and not ctx.params['name'] \n\t\tand not ctx.params['key'] and not ctx.params['retrieve'] and not ctx.params['update'] \n\t\tand not ctx.params['delete']):\n\t\treturn click.echo(ctx.get_help())\n\n\toption_list = ['getlist', 'create', 'retrieve', 'update', 'delete']\n\n\tif validate(ctx.params, option_list):\n\t\tif getlist:\n\t\t\tpage = 1\n\t\t\thas_page = True\n\t\t\twhile has_page:\n\t\t\t\turl = KEYS\n\t\t\t\tresult = invoke_list(token, proxy, page)\n\t\t\t\tif result['has_error']:\n\t\t\t\t\thas_page = False\n\t\t\t\t\tclick.echo()\n\t\t\t\t\tclick.echo('Error: %s' %(result['error_message']))\n\t\t\t\telse:\n\t\t\t\t\trecord = 'ssh key list'\n\t\t\t\t\theaders = ['Fields', 'Values']\n\t\t\t\t\tfor dic in result['ssh_keys']:\n\t\t\t\t\t\tclick.echo(\"-----------------------------------------\")\n\t\t\t\t\t\tclick.echo(\"Id: %d\" % (dic['id']))\n\t\t\t\t\t\tclick.echo(\"Finger Print: %s\" % (dic['fingerprint']))\n\t\t\t\t\t\tclick.echo(\"Public Key: %s\" % (dic['public_key']))\n\t\t\t\t\t\tclick.echo(\"Name: %s\" % (dic['name']))\n\t\t\t\t\t\tclick.echo(\"-----------------------------------------\")\n\t\t\t\t\ttotal = 'Total ssh keys: %d' % (result['meta']['total'])\n\t\t\t\t\tclick.echo(total)\n\t\t\t\t\tif result['links'].has_key('pages'):\n\t\t\t\t\t\tif result['links']['pages'].has_key('next'):\n\t\t\t\t\t\t\tpage += 1\n\t\t\t\t\t\t\tvalue = click.prompt('Do you want to continue ?', type=str, default='n')\n\t\t\t\t\t\t\tif value.lower() != 'y':\n\t\t\t\t\t\t\t\thas_page = False\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\thas_page = False\n\t\t\t\t\telse:\n\t\t\t\t\t\thas_page = False\n\n\t\tif create:\n\t\t\tmethod = 'POST'\n\t\t\turl = KEYS\n\t\t\tparams = {'name':name, 'public_key':key}\n\t\t\tresult = DigitalOcean.do_request(method, url, token=token, proxy=proxy, params=params)\n\t\t\tif result['has_error']:\n\t\t\t\tclick.echo()\n\t\t\t\tclick.echo('Error: %s' %(result['error_message']))\n\t\t\telse:\n\t\t\t\trecord = 'ssh key create'\n\t\t\t\tdic = result['ssh_key']\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\t\t\t\tclick.echo(\"Id: %d\" % (dic['id']))\n\t\t\t\tclick.echo(\"Finger Print: %s\" % (dic['fingerprint']))\n\t\t\t\tclick.echo(\"Public Key: %s\" % (dic['public_key']))\n\t\t\t\tclick.echo(\"Name: %s\" % (dic['name']))\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\n\t\tif retrieve:\n\t\t\tmethod = 'GET'\n\t\t\turl = KEYS + str(retrieve)\n\t\t\tresult = DigitalOcean.do_request(method, url, token=token, proxy=proxy)\n\t\t\tif result['has_error']:\n\t\t\t\tclick.echo()\n\t\t\t\tclick.echo('Error: %s' %(result['error_message']))\n\t\t\telse:\n\t\t\t\tdic = result['ssh_key']\n\t\t\t\trecord = 'ssh key retrieve'\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\t\t\t\tclick.echo(\"Id: %d\" % (dic['id']))\n\t\t\t\tclick.echo(\"Finger Print: %s\" % (dic['fingerprint']))\n\t\t\t\tclick.echo(\"Public Key: %s\" % (dic['public_key']))\n\t\t\t\tclick.echo(\"Name: %s\" % (dic['name']))\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\n\t\tif update:\n\t\t\tmethod = 'PUT'\n\t\t\turl = KEYS + str(update)\n\t\t\tparams = {}\n\t\t\tif name:\n\t\t\t\tparams.update({'name':name})\n\t\t\tif key:\n\t\t\t\tparams.update({'public_key':key})\n\n\t\t\tresult = DigitalOcean.do_request(method, url, token=token, proxy=proxy, params=params)\n\t\t\tif result['has_error']:\n\t\t\t\tclick.echo()\n\t\t\t\tclick.echo('Error: %s' %(result['error_message']))\n\t\t\telse:\n\t\t\t\trecord = 'ssh key update'\n\t\t\t\tdic = result['ssh_key']\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\t\t\t\tclick.echo(\"Id: %d\" % (dic['id']))\n\t\t\t\tclick.echo(\"Finger Print: %s\" % (dic['fingerprint']))\n\t\t\t\tclick.echo(\"Public Key: %s\" % (dic['public_key']))\n\t\t\t\tclick.echo(\"Name: %s\" % (dic['name']))\n\t\t\t\tclick.echo(\"-----------------------------------------\")\n\n\t\tif delete:\n\t\t\tmethod = 'DELETE'\n\t\t\turl = KEYS + str(delete)\n\t\t\tresult = DigitalOcean.do_request(method, url, token=token, proxy=proxy)\n\t\t\tif result['has_error']:\n\t\t\t\tclick.echo()\n\t\t\t\tclick.echo('Error: %s' %(result['error_message']))\n\t\t\telse:\n\t\t\t\tmsg = \"ssh key id %d deleted.\" % delete\n\t\t\t\tclick.echo()\n\t\t\t\tclick.echo(msg)", "metadata": "root.ssh_keys", "header": "['module', '___EOS___']", "index": 50 } ]
[ { "span": "url ", "start_line": 80, "start_column": 4, "end_line": 80, "end_column": 7 }, { "span": "record ", "start_line": 87, "start_column": 5, "end_line": 87, "end_column": 11 }, { "span": "record ", "start_line": 118, "start_column": 4, "end_line": 118, "end_column": 10 }, { "span": "record ", "start_line": 136, "start_column": 4, "end_line": 136, "end_column": 10 } ]
[ { "span": "url ", "start_line": 111, "start_column": 3, "end_line": 111, "end_column": 6 }, { "span": "url ", "start_line": 129, "start_column": 3, "end_line": 129, "end_column": 6 }, { "span": "url ", "start_line": 146, "start_column": 3, "end_line": 146, "end_column": 6 }, { "span": "record ", "start_line": 158, "start_column": 4, "end_line": 158, "end_column": 10 }, { "span": "url ", "start_line": 169, "start_column": 3, "end_line": 169, "end_column": 6 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "ssh", "\\u", "keys", "\\u", "group_", "._", "command_", "(_", "name_", "=_", "'", "ssh", "-", "key", "'_", ",_", "context", "\\u", "settings_", "=_", "CONTE", "XT", "\\u", "SETTINGS_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "getl", "ist", "'_", ",_", "'-", "l", "'_", ",_", "is", "\\u", "flag_", "=_", "True_", ",_", "help_", "=_", "'", "list", " ", "all", " ", "ssh", " ", "keys", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "create", "'_", ",_", "'-", "c", "'_", ",_", "is", "\\u", "flag_", "=_", "True_", ",_", "help_", "=_", "'", "add", " ", "new", " ", "ssh", " ", "key", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "name", "'_", ",_", "'-", "n", "'_", ",_", "type_", "=_", "str_", ",_", "help_", "=_", "'", "name", " ", "of", " ", "ssh", " ", "key", "'_", ",_", "metavar_", "=_", "'<", "My", " ", "SSH", " ", "Key", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "key", "'_", ",_", "'-", "k", "'_", ",_", "type_", "=_", "str_", ",_", "help_", "=_", "'", "public", " ", "ssh", " ", "keys", " ", "string", "'_", ",_", "metavar_", "=_", "'<", "ssh", "-", "rsa", " ", "xxx", "...", " ", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "retrieve", "'_", ",_", "'-", "r", "'_", ",_", "type_", "=_", "int_", ",_", "help_", "=_", "'", "retrieve", " ", "ssh", " ", "key", " ", "from", " ", "id", "'_", ",_", "metavar_", "=_", "'<", "512", "190", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "update", "'_", ",_", "'-", "u", "'_", ",_", "type_", "=_", "int_", ",_", "help_", "=_", "'", "update", " ", "ssh", " ", "key", " ", "from", " ", "id", "'_", ",_", "metavar_", "=_", "'<", "512", "190", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "delete", "'_", ",_", "'-", "d", "'_", ",_", "type_", "=_", "int_", ",_", "help_", "=_", "'", "delete", " ", "ssh", " ", "key", " ", "from", " ", "id", "'_", ",_", "metavar_", "=_", "'<", "512", "190", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "token", "'_", ",_", "'-", "t", "'_", ",_", "type_", "=_", "str_", ",_", "help_", "=_", "'", "digital", " ", "oce", "an", " ", "authenticat", "ion", " ", "token", "'_", ",_", "metavar_", "=_", "'<", "token", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "table", "fmt", "'_", ",_", "'-", "f", "'_", ",_", "type_", "=_", "click_", "._", "Choice_", "(_", "[_", "'", "fancy", "\\u", "grid", "'_", ",_", "'", "simple", "'_", ",_", "'", "plain", "'_", ",_", "'", "grid", "'_", ",_", "'", "pipe", "'_", ",_", "'", "org", "tbl", "'_", ",_", "'", "psql", "'_", ",_", "'", "rst", "'_", ",_", "'", "media", "wiki", "'_", ",_", "'", "html", "'_", ",_", "'", "late", "x", "'_", ",_", "'", "late", "x", "\\u", "book", "tabs", "'_", ",_", "'", "tsv", "'_", "]_", ")_", ",_", "help_", "=_", "'", "output", " ", "table", " ", "format", "'_", ",_", "default_", "=_", "'", "fancy", "\\u", "grid", "'_", ",_", "metavar_", "=_", "'<", "format", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "option_", "(_", "'--", "proxy", "'_", ",_", "'-", "p", "'_", ",_", "help_", "=_", "'", "proxy", " ", "url", " ", "to", " ", "be", " ", "used", " ", "for", " ", "this", " ", "call", "'_", ",_", "metavar_", "=_", "'<", "http", "://", "ip", ":", "port", ">'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "click_", "._", "pass", "\\u", "context_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "ssh", "\\u", "keys_", "(_", "ctx_", ",_", "getlist_", ",_", "create_", ",_", "name_", ",_", "key_", ",_", "retrieve_", ",_", "update_", ",_", "delete_", ",_", "token_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "table", "fmt_", ",_", "proxy_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "_", "\"\"\"", "\\", "10", ";", "\t", "Digit", "al", "Ocean", " ", "allow", "s", " ", "you", " ", "to", " ", "add", " ", "SSH", " ", "public", " ", "keys", " ", "to", " ", "the", " ", "interface", " ", "\\", "10", ";", "\t", "so", " ", "tha", "t", " ", "you", " ", "can", " ", "embed", " ", "your", " ", "public", " ", "key", " ", "int", "o", " ", "a", " ", "Drop", "let", " ", "at", " ", "the", " ", "time", " ", "of", " ", "creati", "on", ".", "\\", "10", ";", "\t", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "(_", "not_", "ctx_", "._", "params_", "[_", "'", "getl", "ist", "'_", "]_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "create", "'_", "]_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "key", "'_", "]_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "retrieve", "'_", "]_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "update", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "and_", "not_", "ctx_", "._", "params_", "[_", "'", "delete", "'_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "return_", "click_", "._", "echo_", "(_", "ctx_", "._", "get", "\\u", "help_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "option", "\\u", "list_", "=_", "[_", "'", "getl", "ist", "'_", ",_", "'", "create", "'_", ",_", "'", "retrieve", "'_", ",_", "'", "update", "'_", ",_", "'", "delete", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "validate_", "(_", "ctx_", "._", "params_", ",_", "option", "\\u", "list_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "if_", "getlist_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "page_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "has", "\\u", "page_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "has", "\\u", "page_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "url_", "=_", "KEYS_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "invoke", "\\u", "list_", "(_", "token_", ",_", "proxy_", ",_", "page_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "has", "\\u", "error", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t_", "has", "\\u", "page_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "'", "Error", ":", " ", "%", "s", "'_", "%_", "(_", "result_", "[_", "'", "error", "\\u", "message", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t_", "record_", "=_", "'", "ssh", " ", "key", " ", "list", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "headers_", "=_", "[_", "'", "Field", "s", "'_", ",_", "'", "Value", "s", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "dic_", "in_", "result_", "[_", "'", "ssh", "\\u", "keys", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Id", ":", " ", "%", "d", "\"_", "%_", "(_", "dic_", "[_", "'", "id", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Fin", "ger", " ", "Print", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "fingerprint", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Public", " ", "Key", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "public", "\\u", "key", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Name", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "name", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "total_", "=_", "'", "Total", " ", "ssh", " ", "keys", ":", " ", "%", "d", "'_", "%_", "(_", "result_", "[_", "'", "meta", "'_", "]_", "[_", "'", "total", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "total_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "link", "s", "'_", "]_", "._", "has", "\\u", "key_", "(_", "'", "page", "s", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t_", "if_", "result_", "[_", "'", "link", "s", "'_", "]_", "[_", "'", "page", "s", "'_", "]_", "._", "has", "\\u", "key_", "(_", "'", "next", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t\t_", "page_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "value_", "=_", "click_", "._", "prompt_", "(_", "'", "Do", " ", "you", " ", "want", " ", "to", " ", "continue", " ", "?'_", ",_", "type_", "=_", "str_", ",_", "default_", "=_", "'", "n", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "value_", "._", "lower_", "(_", ")_", "!=_", "'", "y", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t\t\t_", "has", "\\u", "page_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t\t_", "has", "\\u", "page_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t\t\t_", "has", "\\u", "page_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "create_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "method_", "=_", "'", "POST", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "KEYS_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "params_", "=_", "{_", "'", "name", "'_", ":_", "name_", ",_", "'", "public", "\\u", "key", "'_", ":_", "key_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "Digit", "al", "Ocean", "_", "._", "do", "\\u", "request_", "(_", "method_", ",_", "url_", ",_", "token_", "=_", "token_", ",_", "proxy_", "=_", "proxy_", ",_", "params_", "=_", "params_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "has", "\\u", "error", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "'", "Error", ":", " ", "%", "s", "'_", "%_", "(_", "result_", "[_", "'", "error", "\\u", "message", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "record_", "=_", "'", "ssh", " ", "key", " ", "create", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dic_", "=_", "result_", "[_", "'", "ssh", "\\u", "key", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Id", ":", " ", "%", "d", "\"_", "%_", "(_", "dic_", "[_", "'", "id", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Fin", "ger", " ", "Print", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "fingerprint", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Public", " ", "Key", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "public", "\\u", "key", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Name", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "name", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "retrieve_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "method_", "=_", "'", "GET", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "KEYS_", "+_", "str_", "(_", "retrieve_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "Digit", "al", "Ocean", "_", "._", "do", "\\u", "request_", "(_", "method_", ",_", "url_", ",_", "token_", "=_", "token_", ",_", "proxy_", "=_", "proxy_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "has", "\\u", "error", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "'", "Error", ":", " ", "%", "s", "'_", "%_", "(_", "result_", "[_", "'", "error", "\\u", "message", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "dic_", "=_", "result_", "[_", "'", "ssh", "\\u", "key", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "record_", "=_", "'", "ssh", " ", "key", " ", "retrieve", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Id", ":", " ", "%", "d", "\"_", "%_", "(_", "dic_", "[_", "'", "id", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Fin", "ger", " ", "Print", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "fingerprint", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Public", " ", "Key", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "public", "\\u", "key", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Name", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "name", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "update_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "method_", "=_", "'", "PU", "T", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "KEYS_", "+_", "str_", "(_", "update_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "params_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "name_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "params_", "._", "update_", "(_", "{_", "'", "name", "'_", ":_", "name_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "key_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "params_", "._", "update_", "(_", "{_", "'", "public", "\\u", "key", "'_", ":_", "key_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "=_", "Digit", "al", "Ocean", "_", "._", "do", "\\u", "request_", "(_", "method_", ",_", "url_", ",_", "token_", "=_", "token_", ",_", "proxy_", "=_", "proxy_", ",_", "params_", "=_", "params_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "has", "\\u", "error", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "'", "Error", ":", " ", "%", "s", "'_", "%_", "(_", "result_", "[_", "'", "error", "\\u", "message", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "record_", "=_", "'", "ssh", " ", "key", " ", "update", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dic_", "=_", "result_", "[_", "'", "ssh", "\\u", "key", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Id", ":", " ", "%", "d", "\"_", "%_", "(_", "dic_", "[_", "'", "id", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Fin", "ger", " ", "Print", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "fingerprint", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Public", " ", "Key", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "public", "\\u", "key", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"", "Name", ":", " ", "%", "s", "\"_", "%_", "(_", "dic_", "[_", "'", "name", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "\"-------", "--------------", "--------------", "------", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "delete_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "method_", "=_", "'", "DELET", "E", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "KEYS_", "+_", "str_", "(_", "delete_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "Digit", "al", "Ocean", "_", "._", "do", "\\u", "request_", "(_", "method_", ",_", "url_", ",_", "token_", "=_", "token_", ",_", "proxy_", "=_", "proxy_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "result_", "[_", "'", "has", "\\u", "error", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "'", "Error", ":", " ", "%", "s", "'_", "%_", "(_", "result_", "[_", "'", "error", "\\u", "message", "'_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t\t_", "msg_", "=_", "\"", "ssh", " ", "key", " ", "id", " ", "%", "d", " ", "delete", "d", ".\"_", "%_", "delete_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "click_", "._", "echo_", "(_", "msg_", ")_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
ryands/imghost/image/migrations/0001_initial.py
[ { "content": "# encoding: utf-8\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Migration(SchemaMigration):\n\n\n\n\n\n models = {\n 'auth.group': {\n 'Meta': {'object_name': 'Group'},\n 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\n 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),\n 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': \"orm['auth.Permission']\", 'symmetrical': 'False', 'blank': 'True'})\n },\n 'auth.permission': {\n 'Meta': {'ordering': \"('content_type__app_label', 'content_type__model', 'codename')\", 'unique_together': \"(('content_type', 'codename'),)\", 'object_name': 'Permission'},\n 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\n 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': \"orm['contenttypes.ContentType']\"}),\n 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\n 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})\n },\n 'auth.user': {\n 'Meta': {'object_name': 'User'},\n 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\n 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),\n 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\n 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': \"orm['auth.Group']\", 'symmetrical': 'False', 'blank': 'True'}),\n 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\n 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),\n 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),\n 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),\n 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\n 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\n 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),\n 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': \"orm['auth.Permission']\", 'symmetrical': 'False', 'blank': 'True'}),\n 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})\n },\n 'contenttypes.contenttype': {\n 'Meta': {'ordering': \"('name',)\", 'unique_together': \"(('app_label', 'model'),)\", 'object_name': 'ContentType', 'db_table': \"'django_content_type'\"},\n 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\n 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\n 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\n 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})\n },\n 'image.image': {\n 'Meta': {'object_name': 'Image', 'db_table': \"u'images'\"},\n 'base62': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}),\n 'date_added': ('django.db.models.fields.CharField', [], {'max_length': '765'}),\n 'description': ('django.db.models.fields.CharField', [], {'max_length': '765', 'null': 'True', 'blank': 'True'}),\n 'filename': ('django.db.models.fields.CharField', [], {'max_length': '36'}),\n 'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),\n 'md5sum': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '96', 'blank': 'True'}),\n 'orig_filename': ('django.db.models.fields.CharField', [], {'max_length': '765', 'blank': 'True'}),\n 'type': ('django.db.models.fields.CharField', [], {'max_length': '192', 'null': 'True', 'blank': 'True'}),\n 'uploader': ('django.db.models.fields.related.ForeignKey', [], {'to': \"orm['auth.User']\", 'null': 'True', 'blank': 'True'})\n }\n }\n\n complete_apps = ['image']", "metadata": "root.Migration", "header": "['module', '___EOS___']", "index": 6 }, { "content": " def forwards(self, orm):\n \n # Adding model 'Image'\n db.create_table(u'images', (\n ('id', self.gf('django.db.models.fields.IntegerField')(primary_key=True)),\n ('base62', self.gf('django.db.models.fields.CharField')(unique=True, max_length=48)),\n ('filename', self.gf('django.db.models.fields.CharField')(max_length=36)),\n ('orig_filename', self.gf('django.db.models.fields.CharField')(max_length=765, blank=True)),\n ('type', self.gf('django.db.models.fields.CharField')(max_length=192, null=True, blank=True)),\n ('md5sum', self.gf('django.db.models.fields.CharField')(unique=True, max_length=96, blank=True)),\n ('description', self.gf('django.db.models.fields.CharField')(max_length=765, null=True, blank=True)),\n ('date_added', self.gf('django.db.models.fields.CharField')(max_length=765)),\n ('uploader', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),\n ))\n db.send_create_signal('image', ['Image'])", "metadata": "root.Migration.forwards", "header": "['class', 'Migration', '(', 'SchemaMigration', ')', ':', '___EOS___']", "index": 8 }, { "content": " def backwards(self, orm):\n \n # Deleting model 'Image'\n db.delete_table(u'images')", "metadata": "root.Migration.backwards", "header": "['class', 'Migration', '(', 'SchemaMigration', ')', ':', '___EOS___']", "index": 25 } ]
[ { "span": "import datetime", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 }, { "span": "from django.db import models", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 28 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "encoding", ":", " ", "utf", "-", "8_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "._", "db_", "import_", "db_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "._", "v2_", "import_", "Schema", "Migration_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "models_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "auth", ".", "group", "'_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Meta", "'_", ":_", "{_", "'", "object\\u", "name", "'_", ":_", "'", "Group", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Auto", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "primary", "\\u", "key", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "unique", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "max", "\\u", "length", "'_", ":_", "'", "80", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "permissi", "ons", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Many", "To", "Many", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "to", "'_", ":_", "\"", "orm", "['", "auth", ".", "Permi", "ssion", "']\"_", ",_", "'", "symmetric", "al", "'_", ":_", "'", "Fal", "se", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "auth", ".", "permissi", "on", "'_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Meta", "'_", ":_", "{_", "'", "orderi", "ng", "'_", ":_", "\"(", "'", "content", "\\u", "type\\u\\u", "app", "\\u", "label", "',", " ", "'", "content", "\\u", "type\\u\\u", "model", "',", " ", "'", "code", "name", "')\"_", ",_", "'", "unique", "\\u", "tog", "ether", "'_", ":_", "\"(", "('", "content", "\\u", "type", "',", " ", "'", "code", "name", "'),)\"_", ",_", "'", "object\\u", "name", "'_", ":_", "'", "Permi", "ssion", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "code", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "100", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "content", "\\u", "type", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Fore", "ign", "Key", "'_", ",_", "[_", "]_", ",_", "{_", "'", "to", "'_", ":_", "\"", "orm", "['", "contenttype", "s", ".", "Conten", "t", "Type", "']\"_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Auto", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "primary", "\\u", "key", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "50", "'_", "}_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "auth", ".", "user", "'_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Meta", "'_", ":_", "{_", "'", "object\\u", "name", "'_", ":_", "'", "User", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "date", "\\u", "joine", "d", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Date", "Time", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "default", "'_", ":_", "'", "datetime", ".", "datetime", ".", "now", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "email", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Ema", "il", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "7", "5", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "first", "\\u", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "30", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "group", "s", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Many", "To", "Many", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "to", "'_", ":_", "\"", "orm", "['", "auth", ".", "Group", "']\"_", ",_", "'", "symmetric", "al", "'_", ":_", "'", "Fal", "se", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Auto", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "primary", "\\u", "key", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "is", "\\u", "active", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Boo", "lean", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "default", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "is", "\\u", "sta", "ff", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Boo", "lean", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "default", "'_", ":_", "'", "Fal", "se", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "is", "\\u", "super", "user", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Boo", "lean", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "default", "'_", ":_", "'", "Fal", "se", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "last", "\\u", "login", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Date", "Time", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "default", "'_", ":_", "'", "datetime", ".", "datetime", ".", "now", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "last", "\\u", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "30", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "password", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "128", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "user", "\\u", "permissi", "ons", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Many", "To", "Many", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "to", "'_", ":_", "\"", "orm", "['", "auth", ".", "Permi", "ssion", "']\"_", ",_", "'", "symmetric", "al", "'_", ":_", "'", "Fal", "se", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "user", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "unique", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "max", "\\u", "length", "'_", ":_", "'", "30", "'_", "}_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "contenttype", "s", ".", "contenttype", "'_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Meta", "'_", ":_", "{_", "'", "orderi", "ng", "'_", ":_", "\"(", "'", "name", "',)\"_", ",_", "'", "unique", "\\u", "tog", "ether", "'_", ":_", "\"(", "('", "app", "\\u", "label", "',", " ", "'", "model", "'),)\"_", ",_", "'", "object\\u", "name", "'_", ":_", "'", "Conten", "t", "Type", "'_", ",_", "'", "db", "\\u", "table", "'_", ":_", "\"'", "django", "\\u", "content", "\\u", "type", "'\"_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "app", "\\u", "label", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "100", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Auto", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "primary", "\\u", "key", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "model", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "100", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "name", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "100", "'_", "}_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "image", ".", "image", "'_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Meta", "'_", ":_", "{_", "'", "object\\u", "name", "'_", ":_", "'", "Image", "'_", ",_", "'", "db", "\\u", "table", "'_", ":_", "\"", "u", "'", "images", "'\"_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "base", "6", "2", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "unique", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "max", "\\u", "length", "'_", ":_", "'", "4", "8", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "date", "\\u", "adde", "d", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "765", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "765", "'_", ",_", "'", "null", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "filename", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "3", "6", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Integer", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "primary", "\\u", "key", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "md5sum", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "unique", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "max", "\\u", "length", "'_", ":_", "'", "96", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "orig", "\\u", "filename", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "765", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "type", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ",_", "[_", "]_", ",_", "{_", "'", "max", "\\u", "length", "'_", ":_", "'", "192", "'_", ",_", "'", "null", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "uploade", "r", "'_", ":_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Fore", "ign", "Key", "'_", ",_", "[_", "]_", ",_", "{_", "'", "to", "'_", ":_", "\"", "orm", "['", "auth", ".", "User", "']\"_", ",_", "'", "null", "'_", ":_", "'", "Tru", "e", "'_", ",_", "'", "blank", "'_", ":_", "'", "Tru", "e", "'_", "}_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "complete", "\\u", "apps_", "=_", "[_", "'", "image", "'_", "]_", "[SEP]_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "forwards_", "(_", "self_", ",_", "orm_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", "ing", " ", "model", " ", "'", "Image", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "db_", "._", "create", "\\u", "table_", "(_", "u", "'", "images", "'_", ",_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "id", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Integer", "Field", "'_", ")_", "(_", "primary", "\\u", "key_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "base", "6", "2", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "unique_", "=_", "True_", ",_", "max", "\\u", "length_", "=_", "48_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "filename", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "max", "\\u", "length_", "=_", "36_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "orig", "\\u", "filename", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "max", "\\u", "length_", "=_", "765", "_", ",_", "blank_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "type", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "max", "\\u", "length_", "=_", "192_", ",_", "null_", "=_", "True_", ",_", "blank_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "md5sum", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "unique_", "=_", "True_", ",_", "max", "\\u", "length_", "=_", "96_", ",_", "blank_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "description", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "max", "\\u", "length_", "=_", "765", "_", ",_", "null_", "=_", "True_", ",_", "blank_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "date", "\\u", "adde", "d", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "Char", "Field", "'_", ")_", "(_", "max", "\\u", "length_", "=_", "765", "_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "uploade", "r", "'_", ",_", "self_", "._", "gf_", "(_", "'", "django", ".", "db", ".", "model", "s", ".", "fields", ".", "relate", "d", ".", "Fore", "ign", "Key", "'_", ")_", "(_", "to_", "=_", "orm_", "[_", "'", "auth", ".", "User", "'_", "]_", ",_", "null_", "=_", "True_", ",_", "blank_", "=_", "True_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "db_", "._", "send", "\\u", "create", "\\u", "signal_", "(_", "'", "image", "'_", ",_", "[_", "'", "Image", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Migration_", "(_", "Schema", "Migration_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "backwards_", "(_", "self_", ",_", "orm_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Del", "eti", "ng", " ", "model", " ", "'", "Image", "'_", "\\u\\u\\uNL\\u\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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
open-cloud/xos/xos/services/vrouter/models.py
[ { "content": "from django.db import models\nfrom core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber, NetworkParameter, NetworkParameterType, Port, AddressPool\nfrom core.models.plcorebase import StrippedCharField\nimport os\nfrom django.db import models, transaction\nfrom django.forms.models import model_to_dict\nfrom django.db.models import Q\nfrom operator import itemgetter, attrgetter, methodcaller\nfrom core.models import Tag\nfrom core.models.service import LeastLoadedNodeScheduler\nimport traceback\nfrom xos.exceptions import *\nfrom xos.config import Config\n\n\nVROUTER_KIND = \"vROUTER\"\n\nCORD_USE_VTN = getattr(Config(), \"networking_use_vtn\", False)\n\n\n#VRouterService.setup_simple_attributes()\n\n\nVRouterTenant.setup_simple_attributes()\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class ConfigurationError(Exception):\n pass", "metadata": "root.ConfigurationError", "header": "['module', '___EOS___']", "index": 14 }, { "content": "class VRouterService(Service):\n KIND = VROUTER_KIND\n\n class Meta:\n app_label = \"vrouter\"\n verbose_name = \"vRouter Service\"\n proxy = True\n\n\n\n", "metadata": "root.VRouterService", "header": "['module', '___EOS___']", "index": 21 }, { "content": " def ip_to_mac(self, ip):\n (a, b, c, d) = ip.split('.')\n return \"02:42:%02x:%02x:%02x:%02x\" % (int(a), int(b), int(c), int(d))", "metadata": "root.VRouterService.ip_to_mac", "header": "['class', 'VRouterService', '(', 'Service', ')', ':', '___EOS___']", "index": 29 }, { "content": " def get_gateways(self):\n gateways=[]\n\n aps = self.addresspools.all()\n for ap in aps:\n gateways.append( {\"gateway_ip\": ap.gateway_ip, \"gateway_mac\": ap.gateway_mac} )\n\n return gateways", "metadata": "root.VRouterService.get_gateways", "header": "['class', 'VRouterService', '(', 'Service', ')', ':', '___EOS___']", "index": 33 }, { "content": " def get_address_pool(self, name):\n ap = AddressPool.objects.filter(name=name, service=self)\n if not ap:\n raise Exception(\"vRouter unable to find addresspool %s\" % name)\n return ap[0]", "metadata": "root.VRouterService.get_address_pool", "header": "['class', 'VRouterService', '(', 'Service', ')', ':', '___EOS___']", "index": 42 }, { "content": " def get_tenant(self, **kwargs):\n address_pool_name = kwargs.pop(\"address_pool_name\")\n\n ap = self.get_address_pool(address_pool_name)\n\n ip = ap.get_address()\n if not ip:\n raise Exception(\"AddressPool '%s' has run out of addresses.\" % ap.name)\n\n t = VRouterTenant(provider_service=self, **kwargs)\n t.public_ip = ip\n t.public_mac = self.ip_to_mac(ip)\n t.address_pool_id = ap.id\n t.save()\n\n return t", "metadata": "root.VRouterService.get_tenant", "header": "['class', 'VRouterService', '(', 'Service', ')', ':', '___EOS___']", "index": 48 }, { "content": "class VRouterTenant(Tenant):\n class Meta:\n proxy = True\n\n KIND = VROUTER_KIND\n\n simple_attributes = ( (\"public_ip\", None),\n (\"public_mac\", None),\n (\"address_pool_id\", None),\n )\n\n\n\n\n\n\n\n", "metadata": "root.VRouterTenant", "header": "['module', '___EOS___']", "index": 67 }, { "content": " @property\n def gateway_ip(self):\n if not self.address_pool:\n return None\n return self.address_pool.gateway_ip", "metadata": "root.VRouterTenant.gateway_ip", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 78 }, { "content": " @property\n def gateway_mac(self):\n if not self.address_pool:\n return None\n return self.address_pool.gateway_mac", "metadata": "root.VRouterTenant.gateway_mac", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 84 }, { "content": " @property\n def cidr(self):\n if not self.address_pool:\n return None\n return self.address_pool.cidr", "metadata": "root.VRouterTenant.cidr", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 90 }, { "content": " @property\n def netbits(self):\n # return number of bits in the network portion of the cidr\n if self.cidr:\n parts = self.cidr.split(\"/\")\n if len(parts)==2:\n return int(parts[1].strip())\n return None", "metadata": "root.VRouterTenant.netbits", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 96 }, { "content": " @property\n def address_pool(self):\n if getattr(self, \"cached_address_pool\", None):\n return self.cached_address_pool\n if not self.address_pool_id:\n return None\n aps=AddressPool.objects.filter(id=self.address_pool_id)\n if not aps:\n return None\n ap=aps[0]\n self.cached_address_pool = ap\n return ap", "metadata": "root.VRouterTenant.address_pool", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 105 }, { "content": " @address_pool.setter\n def address_pool(self, value):\n if value:\n value = value.id\n if (value != self.get_attribute(\"address_pool_id\", None)):\n self.cached_address_pool=None\n self.set_attribute(\"address_pool_id\", value)", "metadata": "root.VRouterTenant.address_pool", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 118 }, { "content": " def cleanup_addresspool(self):\n if self.address_pool_id:\n ap = AddressPool.objects.filter(id=self.address_pool_id)\n if ap:\n ap[0].put_address(self.public_ip)\n self.public_ip = None", "metadata": "root.VRouterTenant.cleanup_addresspool", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 126 }, { "content": " def delete(self, *args, **kwargs):\n self.cleanup_addresspool()\n super(VRouterTenant, self).delete(*args, **kwargs)", "metadata": "root.VRouterTenant.delete", "header": "['class', 'VRouterTenant', '(', 'Tenant', ')', ':', '___EOS___']", "index": 133 } ]
[ { "span": "from django.db import models", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 28 }, { "span": "from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber, NetworkParameter, NetworkParameterType, Port, AddressPool", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 187 }, { "span": "from core.models.plcorebase import StrippedCharField", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 52 }, { "span": "import os", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 9 }, { "span": "from django.db import models, transaction", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 41 }, { "span": "from django.forms.models import model_to_dict", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 45 }, { "span": "from django.db.models import Q", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 30 }, { "span": "from operator import itemgetter, attrgetter, methodcaller", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 57 }, { "span": "from core.models import Tag", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 27 }, { "span": "from core.models.service import LeastLoadedNodeScheduler", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 56 }, { "span": "import traceback", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 16 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "core_", "._", "models_", "import_", "Service_", ",_", "Pl", "Core", "Base_", ",_", "Slice_", ",_", "Instance_", ",_", "Ten", "ant_", ",_", "Ten", "ant", "With", "Container_", ",_", "Node_", ",_", "Image_", ",_", "User_", ",_", "Flavor_", ",_", "Subscriber_", ",_", "Network", "Parameter_", ",_", "Network", "Parameter", "Type_", ",_", "Port_", ",_", "Address", "Pool_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "core_", "._", "models_", "._", "plc", "ore", "base_", "import_", "Strip", "ped", "Char", "Field_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", ",_", "transaction_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "forms_", "._", "models_", "import_", "model", "\\u", "to", "\\u", "dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "._", "models_", "import_", "Q_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "operator_", "import_", "itemgetter_", ",_", "attrgetter_", ",_", "method", "caller_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "core_", "._", "models_", "import_", "Tag_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "core_", "._", "models_", "._", "service_", "import_", "Leas", "t", "Load", "ed", "Node", "Scheduler_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "traceback_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "xo", "s_", "._", "exceptions_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "xo", "s_", "._", "config_", "import_", "Config_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "VR", "OUTE", "R", "\\u", "KIND", "_", "=_", "\"", "v", "ROUTER", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "COR", "D", "\\u", "USE", "\\u", "VT", "N_", "=_", "getattr_", "(_", "Config_", "(_", ")_", ",_", "\"", "networking", "\\u", "use", "\\u", "vt", "n", "\"_", ",_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "VR", "outer", "Service", ".", "setup", "\\u", "simple", "\\u", "attribute", "s", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "VR", "outer", "Ten", "ant_", "._", "setup", "\\u", "simple", "\\u", "attributes_", "(_", ")_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Configura", "tion", "Error_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "VR", "outer", "Service_", "(_", "Service_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "KIND", "_", "=_", "VR", "OUTE", "R", "\\u", "KIND", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Meta_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "app", "\\u", "label_", "=_", "\"", "vro", "uter", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "verbo", "se", "\\u", "name_", "=_", "\"", "v", "Route", "r", " ", "Service", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "proxy_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Service_", "(_", "Service_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "ip", "\\u", "to", "\\u", "mac_", "(_", "self_", ",_", "ip_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "a_", ",_", "b_", ",_", "c_", ",_", "d_", ")_", "=_", "ip_", "._", "split_", "(_", "'.'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\"", "02", ":", "4", "2", ":", "%", "02", "x", ":", "%", "02", "x", ":", "%", "02", "x", ":", "%", "02", "x", "\"_", "%_", "(_", "int_", "(_", "a_", ")_", ",_", "int_", "(_", "b_", ")_", ",_", "int_", "(_", "c_", ")_", ",_", "int_", "(_", "d_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Service_", "(_", "Service_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "gateway", "s_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gateway", "s_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "aps_", "=_", "self_", "._", "address", "pools_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "ap_", "in_", "aps_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gateway", "s_", "._", "append_", "(_", "{_", "\"", "gateway", "\\u", "ip", "\"_", ":_", "ap_", "._", "gateway", "\\u", "ip_", ",_", "\"", "gateway", "\\u", "mac", "\"_", ":_", "ap_", "._", "gateway", "\\u", "mac_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "gateway", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Service_", "(_", "Service_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "address", "\\u", "pool_", "(_", "self_", ",_", "name_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ap_", "=_", "Address", "Pool_", "._", "objects_", "._", "filter_", "(_", "name_", "=_", "name_", ",_", "service_", "=_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "ap_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Exception_", "(_", "\"", "v", "Route", "r", " ", "una", "ble", " ", "to", " ", "find", " ", "address", "pool", " ", "%", "s", "\"_", "%_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "ap_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Service_", "(_", "Service_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "tenant_", "(_", "self_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "address", "\\u", "pool", "\\u", "name_", "=_", "kwargs_", "._", "pop_", "(_", "\"", "address", "\\u", "pool", "\\u", "name", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ap_", "=_", "self_", "._", "get", "\\u", "address", "\\u", "pool_", "(_", "address", "\\u", "pool", "\\u", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ip_", "=_", "ap_", "._", "get", "\\u", "address_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "ip_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Exception_", "(_", "\"", "Address", "Poo", "l", " ", "'%", "s", "'", " ", "has", " ", "run", " ", "out", " ", "of", " ", "addresse", "s", ".\"_", "%_", "ap_", "._", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "t_", "=_", "VR", "outer", "Ten", "ant_", "(_", "provide", "r", "\\u", "service_", "=_", "self_", ",_", "**_", "kwargs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "public", "\\u", "ip_", "=_", "ip_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "public", "\\u", "mac_", "=_", "self_", "._", "ip", "\\u", "to", "\\u", "mac_", "(_", "ip_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "address", "\\u", "pool", "\\u", "id_", "=_", "ap_", "._", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "t_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "Meta_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "proxy_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "KIND", "_", "=_", "VR", "OUTE", "R", "\\u", "KIND", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "simple", "\\u", "attributes_", "=_", "(_", "(_", "\"", "public", "\\u", "ip", "\"_", ",_", "None_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "\"", "public", "\\u", "mac", "\"_", ",_", "None_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "\"", "address", "\\u", "pool", "\\u", "id", "\"_", ",_", "None_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "gateway", "\\u", "ip_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "self_", "._", "address", "\\u", "pool_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "address", "\\u", "pool_", "._", "gateway", "\\u", "ip_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "gateway", "\\u", "mac_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "self_", "._", "address", "\\u", "pool_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "address", "\\u", "pool_", "._", "gateway", "\\u", "mac_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "cidr_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "self_", "._", "address", "\\u", "pool_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "address", "\\u", "pool_", "._", "cidr_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "netb", "its_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "return", " ", "number", " ", "of", " ", "bits", " ", "in", " ", "the", " ", "network", " ", "porti", "on", " ", "of", " ", "the", " ", "cidr_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "cidr_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "parts_", "=_", "self_", "._", "cidr_", "._", "split_", "(_", "\"/\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "parts_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "int_", "(_", "parts_", "[_", "1_", "]_", "._", "strip_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "address", "\\u", "pool_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "getattr_", "(_", "self_", ",_", "\"", "cache", "d\\u", "address", "\\u", "pool", "\"_", ",_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "cache", "d\\u", "address", "\\u", "pool_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "self_", "._", "address", "\\u", "pool", "\\u", "id_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "aps_", "=_", "Address", "Pool_", "._", "objects_", "._", "filter_", "(_", "id_", "=_", "self_", "._", "address", "\\u", "pool", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "aps_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ap_", "=_", "aps_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "cache", "d\\u", "address", "\\u", "pool_", "=_", "ap_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "ap_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "address", "\\u", "pool_", "._", "setter_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "address", "\\u", "pool_", "(_", "self_", ",_", "value_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "value_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "value_", "._", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "(_", "value_", "!=_", "self_", "._", "get", "\\u", "attribute_", "(_", "\"", "address", "\\u", "pool", "\\u", "id", "\"_", ",_", "None_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "cache", "d\\u", "address", "\\u", "pool_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "set\\u", "attribute_", "(_", "\"", "address", "\\u", "pool", "\\u", "id", "\"_", ",_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "clean", "up", "\\u", "address", "pool_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "address", "\\u", "pool", "\\u", "id_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ap_", "=_", "Address", "Pool_", "._", "objects_", "._", "filter_", "(_", "id_", "=_", "self_", "._", "address", "\\u", "pool", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ap_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ap_", "[_", "0_", "]_", "._", "put", "\\u", "address_", "(_", "self_", "._", "public", "\\u", "ip_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "public", "\\u", "ip_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "VR", "outer", "Ten", "ant_", "(_", "Ten", "ant_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "delete_", "(_", "self_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "clean", "up", "\\u", "address", "pool_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "VR", "outer", "Ten", "ant_", ",_", "self_", ")_", "._", "delete_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
modflowpy/flopy/flopy/modflow/mfhfb.py
[ { "content": " @staticmethod\n def load(f, model, ext_unit_dict=None):\n \"\"\"\n Load an existing package.\n\n Parameters\n ----------\n f : filename or file handle\n File to load.\n model : model object\n The model object (of type: class:`flopy.modflow.mf.Modflow`) \n to which this package will be added.\n ext_unit_dict : dictionary, optional\n If the arrays in the file are specified using EXTERNAL,\n or older style array control records, then `f` should be a file\n handle. In this case ext_unit_dict is required, which can be\n constructed using the function\n :class:`flopy.utils.mfreadnam.parsenamefile`.\n\n Returns\n -------\n hfb : ModflowHfb object\n ModflowHfb object (of type :class:`flopy.modflow.mfbas.ModflowHfb`)\n\n Examples\n --------\n\n >>> import flopy\n >>> m = flopy.modflow.Modflow()\n >>> hfb = flopy.modflow.ModflowHfb.load('test.hfb', m)\n\n \"\"\"\n\n if model.verbose:\n sys.stdout.write('loading hfb6 package file...\\n')\n\n if not hasattr(f, 'read'):\n filename = f\n f = open(filename, 'r')\n # dataset 0 -- header\n while True:\n line = f.readline()\n if line[0] != '#':\n break\n # dataset 1\n t = line.strip().split()\n nphfb = int(t[0])\n mxfb = int(t[1])\n nhfbnp = int(t[2])\n # check for no-print suppressor\n options = []\n aux_names = []\n if len(t) > 2:\n it = 2\n while it < len(t):\n toption = t[it]\n #print it, t[it]\n if toption.lower() is 'noprint':\n options.append(toption)\n elif 'aux' in toption.lower():\n options.append(' '.join(t[it:it + 2]))\n aux_names.append(t[it + 1].lower())\n it += 1\n it += 1\n # data set 2 and 3\n if nphfb > 0:\n dt = ModflowHfb.get_empty(1).dtype\n pak_parms = mfparbc.load(f, nphfb, dt, model.verbose)\n # data set 4\n bnd_output = None\n if nhfbnp > 0:\n specified = ModflowHfb.get_empty(nhfbnp)\n for ibnd in range(nhfbnp):\n line = f.readline()\n if \"open/close\" in line.lower():\n raise NotImplementedError(\"load() method does not support \\'open/close\\'\")\n t = line.strip().split()\n specified[ibnd] = tuple(t[:len(specified.dtype.names)])\n\n # convert indices to zero-based\n specified['k'] -= 1\n specified['irow1'] -= 1\n specified['icol1'] -= 1\n specified['irow2'] -= 1\n specified['icol2'] -= 1\n\n bnd_output = np.recarray.copy(specified)\n\n if nphfb > 0:\n partype = ['hydchr']\n line = f.readline()\n t = line.strip().split()\n nacthfb = int(t[0])\n for iparm in range(nacthfb):\n line = f.readline()\n t = line.strip().split()\n pname = t[0].lower()\n iname = 'static'\n par_dict, current_dict = pak_parms.get(pname)\n data_dict = current_dict[iname]\n #print par_dict\n #print data_dict\n\n par_current = ModflowHfb.get_empty(par_dict['nlst'])\n\n #\n if model.mfpar.pval is None:\n parval = np.float(par_dict['parval'])\n else:\n try:\n parval = np.float(model.mfpar.pval.pval_dict[pname])\n except:\n parval = np.float(par_dict['parval'])\n\n # fill current parameter data (par_current)\n for ibnd, t in enumerate(data_dict):\n par_current[ibnd] = tuple(t[:len(par_current.dtype.names)])\n\n # convert indices to zero-based\n par_current['k'] -= 1\n par_current['irow1'] -= 1\n par_current['icol1'] -= 1\n par_current['irow2'] -= 1\n par_current['icol2'] -= 1\n\n for ptype in partype:\n par_current[ptype] *= parval\n\n if bnd_output is None:\n bnd_output = np.recarray.copy(par_current)\n else:\n bnd_output = stack_arrays((bnd_output, par_current),\n asrecarray=True, usemask=False)\n\n hfb = ModflowHfb(model, nphfb=0, mxfb=0, nhfbnp=len(bnd_output),\n hfb_data=bnd_output,\n nacthfb=0, options=options)\n return hfb", "metadata": "root.ModflowHfb.load", "header": "['class', 'ModflowHfb', '(', 'Package', ')', ':', '___EOS___']", "index": 196 } ]
[ { "span": "mxfb ", "start_line": 243, "start_column": 8, "end_line": 243, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Mod", "flow", "Hf", "b_", "(_", "Package_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "staticmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "load_", "(_", "f_", ",_", "model_", ",_", "ext", "\\u", "unit", "\\u", "dict_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Load", " ", "an", " ", "exist", "ing", " ", "package", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Parameter", "s", "\\", "10", ";", " ", " ", " ", " ", "----------", "\\", "10", ";", " ", " ", " ", " ", "f", " ", ":", " ", "filename", " ", "or", " ", "file", " ", "handle", "\\", "10", ";", " ", " ", " ", " ", "File", " ", "to", " ", "load", ".", "\\", "10", ";", " ", " ", " ", " ", "model", " ", ":", " ", "model", " ", "object", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "model", " ", "object", " ", "(", "of", " ", "type", ":", " ", "class", ":`", "flop", "y", ".", "mod", "flow", ".", "mf", ".", "Mod", "flow", "`)", " ", "\\", "10", ";", " ", " ", " ", " ", "to", " ", "whi", "ch", " ", "this", " ", "package", " ", "will", " ", "be", " ", "adde", "d", ".", "\\", "10", ";", " ", " ", " ", " ", "ext", "\\u", "unit", "\\u", "dict", " ", ":", " ", "dictionar", "y", ",", " ", "option", "al", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "the", " ", "arrays", " ", "in", " ", "the", " ", "file", " ", "are", " ", "specified", " ", "usi", "ng", " ", "EXTERNAL", ",", "\\", "10", ";", " ", " ", " ", " ", "or", " ", "older", " ", "style", " ", "array", " ", "control", " ", "record", "s", ",", " ", "then", " ", "`", "f", "`", " ", "shou", "ld", " ", "be", " ", "a", " ", "file", "\\", "10", ";", " ", " ", " ", " ", "handle", ".", " ", " ", "In", " ", "this", " ", "case", " ", "ext", "\\u", "unit", "\\u", "dict", " ", "is", " ", "require", "d", ",", " ", "whi", "ch", " ", "can", " ", "be", "\\", "10", ";", " ", " ", " ", " ", "construct", "ed", " ", "usi", "ng", " ", "the", " ", "function", "\\", "10", ";", " ", " ", " ", " ", ":", "class", ":`", "flop", "y", ".", "util", "s", ".", "mf", "read", "nam", ".", "parse", "name", "file", "`.", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", "\\", "10", ";", " ", " ", " ", " ", "-------", "\\", "10", ";", " ", " ", " ", " ", "hf", "b", " ", ":", " ", "Mod", "flow", "Hf", "b", " ", "object", "\\", "10", ";", " ", " ", " ", " ", "Mod", "flow", "Hf", "b", " ", "object", " ", "(", "of", " ", "type", " ", ":", "class", ":`", "flop", "y", ".", "mod", "flow", ".", "mf", "bas", ".", "Mod", "flow", "Hf", "b", "`)", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Exam", "ples", "\\", "10", ";", " ", " ", " ", " ", "--------", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", ">>>", " ", "import", " ", "flop", "y", "\\", "10", ";", " ", " ", " ", " ", ">>>", " ", "m", " ", "=", " ", "flop", "y", ".", "mod", "flow", ".", "Mod", "flow", "()", "\\", "10", ";", " ", " ", " ", " ", ">>>", " ", "hf", "b", " ", "=", " ", "flop", "y", ".", "mod", "flow", ".", "Mod", "flow", "Hf", "b", ".", "load", "('", "test", ".", "hf", "b", "',", " ", "m", ")", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "model_", "._", "verbose_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sys_", "._", "stdout_", "._", "write_", "(_", "'", "load", "ing", " ", "hf", "b6", " ", "package", " ", "file", "...", "\\\\", "n", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "hasattr_", "(_", "f_", ",_", "'", "read", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "filename_", "=_", "f_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "f_", "=_", "open_", "(_", "filename_", ",_", "'", "r", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "dataset", " ", "0", " ", "--", " ", "header_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "while_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "line_", "=_", "f_", "._", "readline_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "line_", "[_", "0_", "]_", "!=_", "'#'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "dataset", " ", "1_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "t_", "=_", "line_", "._", "strip_", "(_", ")_", "._", "split_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "np", "hf", "b_", "=_", "int_", "(_", "t_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mx", "fb_", "=_", "int_", "(_", "t_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nh", "fb", "np_", "=_", "int_", "(_", "t_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "check", " ", "for", " ", "no", "-", "print", " ", "suppress", "or_", "\\u\\u\\uNL\\u\\u\\u_", "options_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "aux", "\\u", "names_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "t_", ")_", ">_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "it_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "it_", "<_", "len_", "(_", "t_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "top", "tion_", "=_", "t_", "[_", "it_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "it", ",", " ", "t", "[", "it", "]_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "top", "tion_", "._", "lower_", "(_", ")_", "is_", "'", "nop", "rint", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "options_", "._", "append_", "(_", "top", "tion_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "'", "aux", "'_", "in_", "top", "tion_", "._", "lower_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "options_", "._", "append_", "(_", "'", " ", "'_", "._", "join_", "(_", "t_", "[_", "it_", ":_", "it_", "+_", "2_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "aux", "\\u", "names_", "._", "append_", "(_", "t_", "[_", "it_", "+_", "1_", "]_", "._", "lower_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "it_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "it_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "data", " ", "set", " ", "2", " ", "and", " ", "3_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "np", "hf", "b_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "dt_", "=_", "Mod", "flow", "Hf", "b_", "._", "get", "\\u", "empty_", "(_", "1_", ")_", "._", "dtype_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pak", "\\u", "parms_", "=_", "mf", "par", "bc_", "._", "load_", "(_", "f_", ",_", "np", "hf", "b_", ",_", "dt_", ",_", "model_", "._", "verbose_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "data", " ", "set", " ", "4_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "bnd", "\\u", "output_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "nh", "fb", "np_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "specified", "_", "=_", "Mod", "flow", "Hf", "b_", "._", "get", "\\u", "empty_", "(_", "nh", "fb", "np_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "ib", "nd_", "in_", "range_", "(_", "nh", "fb", "np_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "line_", "=_", "f_", "._", "readline_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "\"", "open", "/", "close", "\"_", "in_", "line_", "._", "lower_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", "\"", "load", "()", " ", "method", " ", "doe", "s", " ", "not", " ", "support", " ", "\\\\'", "open", "/", "close", "\\\\'\"", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "t_", "=_", "line_", "._", "strip_", "(_", ")_", "._", "split_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "specified", "_", "[_", "ib", "nd_", "]_", "=_", "tuple_", "(_", "t_", "[_", ":_", "len_", "(_", "specified", "_", "._", "dtype_", "._", "names_", ")_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "convert", " ", "indice", "s", " ", "to", " ", "zero", "-", "based", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "specified", "_", "[_", "'", "k", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "specified", "_", "[_", "'", "iro", "w", "1", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "specified", "_", "[_", "'", "ico", "l1", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "specified", "_", "[_", "'", "iro", "w2", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "specified", "_", "[_", "'", "ico", "l2", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "bnd", "\\u", "output_", "=_", "np_", "._", "reca", "rray_", "._", "copy_", "(_", "specified", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "np", "hf", "b_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "part", "ype_", "=_", "[_", "'", "hy", "dch", "r", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "line_", "=_", "f_", "._", "readline_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "=_", "line_", "._", "strip_", "(_", ")_", "._", "split_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nac", "th", "fb_", "=_", "int_", "(_", "t_", "[_", "0_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "ipa", "rm_", "in_", "range_", "(_", "nac", "th", "fb_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "line_", "=_", "f_", "._", "readline_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "=_", "line_", "._", "strip_", "(_", ")_", "._", "split_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pname_", "=_", "t_", "[_", "0_", "]_", "._", "lower_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "iname", "_", "=_", "'", "static", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "par", "\\u", "dict_", ",_", "current", "\\u", "dict_", "=_", "pak", "\\u", "parms_", "._", "get_", "(_", "pname_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "data\\u", "dict_", "=_", "current", "\\u", "dict_", "[_", "iname", "_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "par", "\\u", "dict_", "\\u\\u\\uNL\\u\\u\\u_", "#", "print", " ", "data\\u", "dict_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "par", "\\u", "current_", "=_", "Mod", "flow", "Hf", "b_", "._", "get", "\\u", "empty_", "(_", "par", "\\u", "dict_", "[_", "'", "nl", "st", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "model_", "._", "mf", "par_", "._", "pval_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "par", "val_", "=_", "np_", "._", "float_", "(_", "par", "\\u", "dict_", "[_", "'", "par", "val", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "par", "val_", "=_", "np_", "._", "float_", "(_", "model_", "._", "mf", "par_", "._", "pval_", "._", "pval", "\\u", "dict_", "[_", "pname_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "par", "val_", "=_", "np_", "._", "float_", "(_", "par", "\\u", "dict_", "[_", "'", "par", "val", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "fill", " ", "current", " ", "parameter", " ", "data", " ", "(", "par", "\\u", "current", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "ib", "nd_", ",_", "t_", "in_", "enumerate_", "(_", "data\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "par", "\\u", "current_", "[_", "ib", "nd_", "]_", "=_", "tuple_", "(_", "t_", "[_", ":_", "len_", "(_", "par", "\\u", "current_", "._", "dtype_", "._", "names_", ")_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "convert", " ", "indice", "s", " ", "to", " ", "zero", "-", "based", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "par", "\\u", "current_", "[_", "'", "k", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "par", "\\u", "current_", "[_", "'", "iro", "w", "1", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "par", "\\u", "current_", "[_", "'", "ico", "l1", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "par", "\\u", "current_", "[_", "'", "iro", "w2", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "par", "\\u", "current_", "[_", "'", "ico", "l2", "'_", "]_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "ptype_", "in_", "part", "ype_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "par", "\\u", "current_", "[_", "ptype_", "]_", "*=_", "par", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "bnd", "\\u", "output_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "bnd", "\\u", "output_", "=_", "np_", "._", "reca", "rray_", "._", "copy_", "(_", "par", "\\u", "current_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "bnd", "\\u", "output_", "=_", "stack", "\\u", "arrays_", "(_", "(_", "bnd", "\\u", "output_", ",_", "par", "\\u", "current_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "as", "reca", "rray_", "=_", "True_", ",_", "use", "mask_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "hf", "b_", "=_", "Mod", "flow", "Hf", "b_", "(_", "model_", ",_", "np", "hf", "b_", "=_", "0_", ",_", "mx", "fb_", "=_", "0_", ",_", "nh", "fb", "np_", "=_", "len_", "(_", "bnd", "\\u", "output_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "hf", "b", "\\u", "data_", "=_", "bnd", "\\u", "output_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "nac", "th", "fb_", "=_", "0_", ",_", "options_", "=_", "options_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "hf", "b_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
zoofIO/flexx/setup.py
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\" Flexx setup script.\n\nRelease:\n\n* bump __version__\n* python setup.py register\n* python setup.py sdist bdist_wheel --universal upload\n* update conda recipe (meta.yaml)\n* build and upload the (noarch) conda package\n* git tag\n\n\"\"\"\n\nimport os\nimport sys\nimport shutil\n\ntry:\n import setuptools # noqa, analysis:ignore\nexcept ImportError:\n pass # setuptools allows for \"develop\", but it's not essential\n\nfrom distutils.core import setup\n\n\n## Function we need\n\n\n\n\n\n\n\n## Collect info for setup()\n\nTHIS_DIR = os.path.dirname(__file__)\n\n# Define name and description\nname = 'flexx'\ndescription = \"Pure Python toolkit for creating GUI's using web technology.\"\n\n# Get version and docstring (i.e. long description)\nversion, doc = get_version_and_doc(os.path.join(THIS_DIR, name, '__init__.py'))\n\n# Define dependencies per subpackage\nextras_require = {'app': ['tornado']}\nextras_require['ui'] = extras_require['app']\nextras_require['all'] = [i for ii in extras_require.values() for i in ii]\n\n# Import to trigger download of phosphorjs\nif 'sdist' in sys.argv and sys.version_info[0] == 3:\n from flexx import ui # noqa\n\n# Support for legacy Python: we install a second package with the\n# translated code. We generate that code when we can. We use\n# \"name_legacy\" below in \"packages\", \"package_dir\", and \"package_data\".\nname_legacy = name + '_legacy'\nif os.path.isfile(os.path.join(THIS_DIR, 'translate_to_legacy.py')):\n copy_for_legacy_python(os.path.join(THIS_DIR, name),\n os.path.join(THIS_DIR, name_legacy))\n\n## Setup\n\nsetup(\n name=name,\n version=version,\n author='Flexx contributors',\n author_email='[email protected]',\n license='(new) BSD',\n url='http://flexx.readthedocs.org',\n download_url='https://pypi.python.org/pypi/flexx',\n keywords=\"ui design, web runtime, pyscript, reactive programming, FRP\",\n description=description,\n long_description=doc,\n platforms='any',\n provides=[name],\n install_requires=[], # react, pyscript and webruntime require nothing\n extras_require=extras_require,\n packages=package_tree(name) + package_tree(name_legacy),\n package_dir={name: name, name_legacy: name_legacy},\n package_data={name: ['resources/*'], name_legacy: ['resources/*']},\n entry_points={'console_scripts': ['flexx = flexx.__main__:main'], },\n zip_safe=False,\n classifiers=[\n 'Development Status :: 3 - Alpha',\n 'Intended Audience :: Science/Research',\n 'Intended Audience :: Education',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: BSD License',\n 'Operating System :: MacOS :: MacOS X',\n 'Operating System :: Microsoft :: Windows',\n 'Operating System :: POSIX',\n 'Programming Language :: Python',\n 'Programming Language :: Python :: 2.7',\n 'Programming Language :: Python :: 3.4',\n 'Programming Language :: Python :: 3.5',\n ],\n)\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def get_version_and_doc(filename):\n NS = dict(__version__='', __doc__='')\n docStatus = 0 # Not started, in progress, done\n for line in open(filename, 'rb').read().decode().splitlines():\n if line.startswith('__version__'):\n exec(line.strip(), NS, NS)\n elif line.startswith('\"\"\"'):\n if docStatus == 0:\n docStatus = 1\n line = line.lstrip('\"')\n elif docStatus == 1:\n docStatus = 2\n if docStatus == 1:\n NS['__doc__'] += line\n if not NS['__version__']:\n raise RuntimeError('Could not find __version__')\n return NS['__version__'], NS['__doc__']", "metadata": "root.get_version_and_doc", "header": "['module', '___EOS___']", "index": 29 }, { "content": "def package_tree(pkgroot):\n subdirs = [os.path.relpath(i[0], THIS_DIR).replace(os.path.sep, '.')\n for i in os.walk(os.path.join(THIS_DIR, pkgroot))\n if '__init__.py' in i[2]]\n return subdirs", "metadata": "root.package_tree", "header": "['module', '___EOS___']", "index": 48 }, { "content": "def copy_for_legacy_python(src_dir, dest_dir):\n from translate_to_legacy import LegacyPythonTranslator\n # Dirs and files to explicitly not translate\n skip = ['pyscript/tests/python_sample.py', \n 'pyscript/tests/python_sample2.py',\n 'pyscript/tests/python_sample3.py']\n # Make a fresh copy of the flexx package\n if os.path.isdir(dest_dir):\n shutil.rmtree(dest_dir)\n ignore = lambda src, names: [n for n in names if n == '__pycache__']\n shutil.copytree(src_dir, dest_dir, ignore=ignore)\n # Translate in-place\n LegacyPythonTranslator.translate_dir(dest_dir, skip=skip)", "metadata": "root.copy_for_legacy_python", "header": "['module', '___EOS___']", "index": 55 } ]
[ { "span": "import setuptools ", "start_line": 20, "start_column": 4, "end_line": 20, "end_column": 21 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", " ", "Fle", "xx", " ", "setup", " ", "script", ".", "\\", "10", ";", "\\", "10", ";", "Release", ":", "\\", "10", ";", "\\", "10", ";", "*", " ", "bump", " ", "\\u\\u", "version", "\\u\\u", "\\", "10", ";", "*", " ", "python", " ", "setup", ".", "py", " ", "register", "\\", "10", ";", "*", " ", "python", " ", "setup", ".", "py", " ", "sdist", " ", "bdist", "\\u", "wheel", " ", "--", "universal", " ", "upload", "\\", "10", ";", "*", " ", "update", " ", "cond", "a", " ", "recip", "e", " ", "(", "meta", ".", "yaml", ")", "\\", "10", ";", "*", " ", "build", " ", "and", " ", "upload", " ", "the", " ", "(", "noar", "ch", ")", " ", "cond", "a", " ", "package", "\\", "10", ";", "*", " ", "git", " ", "tag", "\\", "10", ";", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "shutil_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "setuptools_", "#", " ", "no", "qa", ",", " ", "analys", "is", ":", "ignore_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "#", " ", "setup", "tool", "s", " ", "allow", "s", " ", "for", " ", "\"", "develop", "\",", " ", "but", " ", "it", "'", "s", " ", "not", " ", "essential", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "distutils_", "._", "core_", "import_", "setup_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Function", " ", "we", " ", "need", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Collect", " ", "info", " ", "for", " ", "setup", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "THIS", "\\u", "DIR_", "=_", "os_", "._", "path_", "._", "dirname_", "(_", "\\u\\u", "file\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Define", " ", "name", " ", "and", " ", "description_", "\\u\\u\\uNL\\u\\u\\u_", "name_", "=_", "'", "flex", "x", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "description_", "=_", "\"", "Pur", "e", " ", "Pyth", "on", " ", "tool", "kit", " ", "for", " ", "creati", "ng", " ", "GU", "I", "'", "s", " ", "usi", "ng", " ", "web", " ", "technology", ".\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Get", " ", "version", " ", "and", " ", "docstr", "ing", " ", "(", "i", ".", "e", ".", " ", "long", " ", "description", ")_", "\\u\\u\\uNL\\u\\u\\u_", "version_", ",_", "doc_", "=_", "get", "\\u", "version", "\\u", "and", "\\u", "doc_", "(_", "os_", "._", "path_", "._", "join_", "(_", "THIS", "\\u", "DIR_", ",_", "name_", ",_", "'\\u", "\\u", "init", "\\u\\u", ".", "py", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Define", " ", "dependen", "cies", " ", "per", " ", "subpa", "ckage", "_", "\\u\\u\\uNL\\u\\u\\u_", "extra", "s", "\\u", "require_", "=_", "{_", "'", "app", "'_", ":_", "[_", "'", "torn", "ado", "'_", "]_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "extra", "s", "\\u", "require_", "[_", "'", "ui", "'_", "]_", "=_", "extra", "s", "\\u", "require_", "[_", "'", "app", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "extra", "s", "\\u", "require_", "[_", "'", "all", "'_", "]_", "=_", "[_", "i_", "for_", "ii_", "in_", "extra", "s", "\\u", "require_", "._", "values_", "(_", ")_", "for_", "i_", "in_", "ii_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Import", " ", "to", " ", "trigger", " ", "download", " ", "of", " ", "phos", "phor", "js_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "'", "sdist", "'_", "in_", "sys_", "._", "argv_", "and_", "sys_", "._", "version", "\\u", "info_", "[_", "0_", "]_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "flex", "x_", "import_", "ui_", "#", " ", "no", "qa_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Supp", "ort", " ", "for", " ", "lega", "cy", " ", "Pyth", "on", ":", " ", "we", " ", "install", " ", "a", " ", "second", " ", "package", " ", "with", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "translat", "ed", " ", "code", ".", " ", "We", " ", "generat", "e", " ", "tha", "t", " ", "code", " ", "whe", "n", " ", "we", " ", "can", ".", " ", "We", " ", "use_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\"", "name", "\\u", "lega", "cy", "\"", " ", "belo", "w", " ", "in", " ", "\"", "package", "s", "\",", " ", "\"", "package", "\\u", "dir", "\",", " ", "and", " ", "\"", "package", "\\u", "data", "\".", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "name", "\\u", "legacy_", "=_", "name_", "+_", "'\\u", "lega", "cy", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "os_", "._", "path_", "._", "isfile_", "(_", "os_", "._", "path_", "._", "join_", "(_", "THIS", "\\u", "DIR_", ",_", "'", "translat", "e\\u", "to", "\\u", "lega", "cy", ".", "py", "'_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "copy", "\\u", "for", "\\u", "lega", "cy", "\\u", "python_", "(_", "os_", "._", "path_", "._", "join_", "(_", "THIS", "\\u", "DIR_", ",_", "name_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "os_", "._", "path_", "._", "join_", "(_", "THIS", "\\u", "DIR_", ",_", "name", "\\u", "legacy_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Setup_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "setup_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "name_", "=_", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "version_", "=_", "version_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "author_", "=_", "'", "Fle", "xx", " ", "contributor", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "author", "\\u", "email_", "=_", "'", "alma", "r", ".", "kle", "in", "@", "gma", "il", ".", "com", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "license_", "=_", "'(", "new", ")", " ", "BS", "D", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "url_", "=_", "'", "http", "://", "flex", "x", ".", "read", "the", "docs", ".", "org", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "download", "\\u", "url_", "=_", "'", "https", "://", "pypi", ".", "python", ".", "org", "/", "pypi", "/", "flex", "x", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "keywords_", "=_", "\"", "ui", " ", "design", ",", " ", "web", " ", "runt", "ime", ",", " ", "pys", "cript", ",", " ", "reacti", "ve", " ", "program", "ming", ",", " ", "FR", "P", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "description_", "=_", "description_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "long", "\\u", "description_", "=_", "doc_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "platforms_", "=_", "'", "any", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "provides_", "=_", "[_", "name_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "install", "\\u", "requires_", "=_", "[_", "]_", ",_", "#", " ", "react", ",", " ", "pys", "cript", " ", "and", " ", "webr", "unti", "me", " ", "require", " ", "nothing_", "\\u\\u\\uNL\\u\\u\\u_", "extra", "s", "\\u", "require_", "=_", "extra", "s", "\\u", "require_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "packages_", "=_", "package", "\\u", "tree_", "(_", "name_", ")_", "+_", "package", "\\u", "tree_", "(_", "name", "\\u", "legacy_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "package", "\\u", "dir_", "=_", "{_", "name_", ":_", "name_", ",_", "name", "\\u", "legacy_", ":_", "name", "\\u", "legacy_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "package", "\\u", "data_", "=_", "{_", "name_", ":_", "[_", "'", "resource", "s", "/*'_", "]_", ",_", "name", "\\u", "legacy_", ":_", "[_", "'", "resource", "s", "/*'_", "]_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "entry", "\\u", "points_", "=_", "{_", "'", "console", "\\u", "scripts", "'_", ":_", "[_", "'", "flex", "x", " ", "=", " ", "flex", "x", ".\\u", "\\u", "main", "\\u\\u:", "main", "'_", "]_", ",_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "zip", "\\u", "safe_", "=_", "False_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "classifiers_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Dev", "elo", "pme", "nt", " ", "Status", " ", "::", " ", "3", " ", "-", " ", "Al", "pha", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Inten", "ded", " ", "Audi", "ence", " ", "::", " ", "Sci", "ence", "/", "Rese", "arch", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Inten", "ded", " ", "Audi", "ence", " ", "::", " ", "Ed", "uca", "tion", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Inten", "ded", " ", "Audi", "ence", " ", "::", " ", "Dev", "elope", "rs", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "License", " ", "::", " ", "OSI", " ", "Appro", "ved", " ", "::", " ", "BS", "D", " ", "License", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Opera", "ting", " ", "System", " ", "::", " ", "Mac", "OS", " ", "::", " ", "Mac", "OS", " ", "X", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Opera", "ting", " ", "System", " ", "::", " ", "Micro", "soft", " ", "::", " ", "Window", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Opera", "ting", " ", "System", " ", "::", " ", "POSI", "X", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Programm", "ing", " ", "Lang", "ua", "ge", " ", "::", " ", "Pyth", "on", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Programm", "ing", " ", "Lang", "ua", "ge", " ", "::", " ", "Pyth", "on", " ", "::", " ", "2.7", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Programm", "ing", " ", "Lang", "ua", "ge", " ", "::", " ", "Pyth", "on", " ", "::", " ", "3.4", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Programm", "ing", " ", "Lang", "ua", "ge", " ", "::", " ", "Pyth", "on", " ", "::", " ", "3.5", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get", "\\u", "version", "\\u", "and", "\\u", "doc_", "(_", "filename_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "NS_", "=_", "dict_", "(_", "\\u\\u", "version\\u\\u_", "=_", "''_", ",_", "\\u\\u", "doc\\u\\u_", "=_", "''_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "doc", "Status_", "=_", "0_", "#", " ", "Not", " ", "start", "ed", ",", " ", "in", " ", "progress", ",", " ", "done_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "line_", "in_", "open_", "(_", "filename_", ",_", "'", "rb", "'_", ")_", "._", "read_", "(_", ")_", "._", "decode_", "(_", ")_", "._", "splitlines_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "line_", "._", "startswith_", "(_", "'\\u", "\\u", "version", "\\u\\u'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exec_", "(_", "line_", "._", "strip_", "(_", ")_", ",_", "NS_", ",_", "NS_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "line_", "._", "startswith_", "(_", "'\"", "\"\"", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "doc", "Status_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "doc", "Status_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "line_", "=_", "line_", "._", "lstrip_", "(_", "'\"'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "doc", "Status_", "==_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "doc", "Status_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "doc", "Status_", "==_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "NS_", "[_", "'\\u", "\\u", "doc", "\\u\\u'_", "]_", "+=_", "line_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "NS_", "[_", "'\\u", "\\u", "version", "\\u\\u'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Run", "time", "Error_", "(_", "'", "Cou", "ld", " ", "not", " ", "find", " ", "\\u\\u", "version", "\\u\\u'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "NS_", "[_", "'\\u", "\\u", "version", "\\u\\u'_", "]_", ",_", "NS_", "[_", "'\\u", "\\u", "doc", "\\u\\u'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "package", "\\u", "tree_", "(_", "pkg", "root_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "subdirs_", "=_", "[_", "os_", "._", "path_", "._", "relpath_", "(_", "i_", "[_", "0_", "]_", ",_", "THIS", "\\u", "DIR_", ")_", "._", "replace_", "(_", "os_", "._", "path_", "._", "sep_", ",_", "'.'_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "i_", "in_", "os_", "._", "walk_", "(_", "os_", "._", "path_", "._", "join_", "(_", "THIS", "\\u", "DIR_", ",_", "pkg", "root_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "'\\u", "\\u", "init", "\\u\\u", ".", "py", "'_", "in_", "i_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "subdirs_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "copy", "\\u", "for", "\\u", "lega", "cy", "\\u", "python_", "(_", "src", "\\u", "dir_", ",_", "dest", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "translat", "e\\u", "to", "\\u", "legacy_", "import_", "Leg", "ac", "y", "Pyth", "on", "Translator_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Dir", "s", " ", "and", " ", "files", " ", "to", " ", "explicit", "ly", " ", "not", " ", "translate_", "\\u\\u\\uNL\\u\\u\\u_", "skip_", "=_", "[_", "'", "pys", "cript", "/", "tests", "/", "python", "\\u", "sample", ".", "py", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "pys", "cript", "/", "tests", "/", "python", "\\u", "sample", "2", ".", "py", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "pys", "cript", "/", "tests", "/", "python", "\\u", "sample", "3", ".", "py", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Make", " ", "a", " ", "fresh", " ", "copy", " ", "of", " ", "the", " ", "flex", "x", " ", "package_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "os_", "._", "path_", "._", "isdir_", "(_", "dest", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shutil_", "._", "rmtree_", "(_", "dest", "\\u", "dir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ignore_", "=_", "lambda_", "src_", ",_", "names_", ":_", "[_", "n_", "for_", "n_", "in_", "names_", "if_", "n_", "==_", "'\\u", "\\u", "pyca", "che", "\\u\\u'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shutil_", "._", "copytree_", "(_", "src", "\\u", "dir_", ",_", "dest", "\\u", "dir_", ",_", "ignore_", "=_", "ignore_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Translate", " ", "in", "-", "place_", "\\u\\u\\uNL\\u\\u\\u_", "Leg", "ac", "y", "Pyth", "on", "Translator_", "._", "translat", "e\\u", "dir_", "(_", "dest", "\\u", "dir_", ",_", "skip_", "=_", "skip_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
landaire/deoplete-swift/rplugin/python3/deoplete/sources/swift.py
[ { "content": "import os\nimport re\nimport subprocess\nimport sys\nimport json\nimport tempfile\n\nfrom .base import Base\n\nfrom deoplete.util import charpos2bytepos\nfrom deoplete.util import error\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Source(Base):\n\n\n\n\n\n\n", "metadata": "root.Source", "header": "['module', '___EOS___']", "index": 12 }, { "content": " def __init__(self, vim):\n Base.__init__(self, vim)\n\n self.name = 'Swift'\n self.mark = '[Swift]'\n self.filetypes = ['swift']\n self.input_pattern = r'(?:\\b[^\\W\\d]\\w*|[\\]\\)])(?:\\.(?:[^\\W\\d]\\w*)?)*\\(?'\n self.rank = 500\n\n self._source_kitten_binary = self.vim.vars['deoplete#sources#swift#source_kitten_binary']", "metadata": "root.Source.__init__", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 13 }, { "content": " def get_complete_position(self, context):\n m = re.search(r'\\w*$', context['input'])\n return m.start() if m else -1", "metadata": "root.Source.get_complete_position", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 24 }, { "content": " def gather_candidates(self, context):\n line = self.vim.current.window.cursor[0]\n column = context['complete_position']\n\n buf = self.vim.current.buffer\n offset = self.vim.call('line2byte', line) + \\\n charpos2bytepos(self.vim, context['input'][: column], column) - 1\n source = '\\n'.join(buf).encode()\n\n fp = tempfile.NamedTemporaryFile(delete=False, suffix=\".swift\")\n fp.write(source)\n fp.flush()\n fp.close()\n\n args = [self.source_kitten_binary(), \"complete\", \"--file\", fp.name, \"--offset\", str(offset)]\n\n process = subprocess.Popen(args,\n stdin=subprocess.PIPE,\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE,\n start_new_session=True)\n stdout_data, stderr_data = process.communicate()\n result = stdout_data.decode()\n\n os.remove(fp.name)\n\n if stderr_data != b'':\n raise Exception((args, stderr_data.decode()))\n\n results = json.loads(result)\n\n return self.identifiers_from_result(results)", "metadata": "root.Source.gather_candidates", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 28 }, { "content": " def identifiers_from_result(self, result):\n out = []\n\n candidates = []\n longest_desc_length = 0\n longest_desc = ''\n for complete in result:\n candidates.append(complete)\n\n desc_len = len(complete['name'])\n\n if desc_len > longest_desc_length:\n longest_desc = complete['name']\n longest_desc_length = desc_len\n\n for completion in candidates:\n description = completion['name']\n _type = completion['typeName']\n abbr = description + ' ' + _type.rjust((len(description) - longest_desc_length) + 1)\n info = _type\n\n candidate = dict(word=description,\n abbr=abbr,\n info=info,\n dup=1\n )\n\n out.append(candidate)\n\n return out", "metadata": "root.Source.identifiers_from_result", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 61 }, { "content": " def calltips_from_result(self, result):\n out = []\n\n result = result[1:]\n for calltip in result:\n candidate = dict(\n abbr=calltip,\n word=self.parse_function_parameters(calltip),\n info=calltip\n )\n\n out.append(candidate)\n\n return out", "metadata": "root.Source.calltips_from_result", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 92 }, { "content": " def parse_function_parameters(self, decl):\n \"\"\"Parses the function parameters from a function decl, returns them as a string\"\"\"\n last_lparen = decl.rfind('(')\n last_rparen = decl.rfind(')')\n\n param_list = decl[last_lparen + 1 : last_rparen]\n param_list = param_list.split(' ')\n # take only the names\n param_list = param_list[1::2]\n\n return ' '.join(param_list)", "metadata": "root.Source.parse_function_parameters", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 107 }, { "content": " def source_kitten_binary(self):\n try:\n if os.path.isfile(self._source_kitten_binary):\n return self._source_kitten_binary\n else:\n raise\n except Exception:\n return self.find_binary_path('sourcekitten')", "metadata": "root.Source.source_kitten_binary", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 119 }, { "content": " def find_binary_path(self, cmd):\n def is_exec(fpath):\n return os.path.isfile(fpath) and os.access(fpath, os.X_OK)\n\n fpath, fname = os.path.split(cmd)\n if fpath:\n if is_exec(cmd):\n return cmd\n else:\n for path in os.environ[\"PATH\"].split(os.pathsep):\n path = path.strip('\"')\n binary = os.path.join(path, cmd)\n if is_exec(binary):\n return binary\n return error(self.vim, cmd + ' binary not found')", "metadata": "root.Source.find_binary_path", "header": "['class', 'Source', '(', 'Base', ')', ':', '___EOS___']", "index": 128 } ]
[ { "span": "import sys", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 10 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "subprocess_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "tempfile_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "._", "base_", "import_", "Base_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "deo", "ple", "te_", "._", "util_", "import_", "char", "pos", "2b", "yte", "pos_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "deo", "ple", "te_", "._", "util_", "import_", "error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "vim_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Base_", "._", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "vim_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "name_", "=_", "'", "Swi", "ft", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "mark_", "=_", "'[", "Swi", "ft", "]'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "filetypes_", "=_", "[_", "'", "swift", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "input", "\\u", "pattern_", "=_", "r", "'(?:", "\\\\", "b", "[", "^", "\\\\", "W", "\\\\", "d", "]\\\\", "w", "*|", "[\\\\", "]\\\\", ")])", "(?:\\\\", ".(", "?:[", "^", "\\\\", "W", "\\\\", "d", "]\\\\", "w", "*)", "?)", "*\\\\", "(?", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "rank_", "=_", "500_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "source", "\\u", "kitt", "en", "\\u", "binary_", "=_", "self_", "._", "vim_", "._", "vars_", "[_", "'", "deo", "ple", "te", "#", "source", "s", "#", "swift", "#", "source", "\\u", "kitt", "en", "\\u", "binar", "y", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "complete", "\\u", "position_", "(_", "self_", ",_", "context_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "re_", "._", "search_", "(_", "r", "'\\\\", "w", "*$'_", ",_", "context_", "[_", "'", "input", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "m_", "._", "start_", "(_", ")_", "if_", "m_", "else_", "-_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "gather", "\\u", "candidates_", "(_", "self_", ",_", "context_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "line_", "=_", "self_", "._", "vim_", "._", "current_", "._", "window_", "._", "cursor_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "column_", "=_", "context_", "[_", "'", "complete", "\\u", "position", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "buf_", "=_", "self_", "._", "vim_", "._", "current_", "._", "buffer_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "offset_", "=_", "self_", "._", "vim_", "._", "call_", "(_", "'", "line", "2b", "yte", "'_", ",_", "line_", ")_", "+_", "char", "pos", "2b", "yte", "pos_", "(_", "self_", "._", "vim_", ",_", "context_", "[_", "'", "input", "'_", "]_", "[_", ":_", "column_", "]_", ",_", "column_", ")_", "-_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "source_", "=_", "'\\\\", "n", "'_", "._", "join_", "(_", "buf_", ")_", "._", "encode_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "fp_", "=_", "tempfile_", "._", "Name", "d", "Tempora", "ry", "File_", "(_", "delete_", "=_", "False_", ",_", "suffix_", "=_", "\".", "swift", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fp_", "._", "write_", "(_", "source_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fp_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fp_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "args_", "=_", "[_", "self_", "._", "source", "\\u", "kitt", "en", "\\u", "binary_", "(_", ")_", ",_", "\"", "complete", "\"_", ",_", "\"--", "file", "\"_", ",_", "fp_", "._", "name_", ",_", "\"--", "offset", "\"_", ",_", "str_", "(_", "offset_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "process_", "=_", "subprocess_", "._", "Popen_", "(_", "args_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "stdin_", "=_", "subprocess_", "._", "PIPE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "stdout_", "=_", "subprocess_", "._", "PIPE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "stderr_", "=_", "subprocess_", "._", "PIPE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "new", "\\u", "session_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "stdout", "\\u", "data_", ",_", "std", "err", "\\u", "data_", "=_", "process_", "._", "communicate_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "stdout", "\\u", "data_", "._", "decode_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "os_", "._", "remove_", "(_", "fp_", "._", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "std", "err", "\\u", "data_", "!=_", "b", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Exception_", "(_", "(_", "args_", ",_", "std", "err", "\\u", "data_", "._", "decode_", "(_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "results_", "=_", "json_", "._", "loads_", "(_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "self_", "._", "identifi", "ers", "\\u", "from", "\\u", "result_", "(_", "results_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "identifi", "ers", "\\u", "from", "\\u", "result_", "(_", "self_", ",_", "result_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "out_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "candidates_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "long", "est", "\\u", "desc", "\\u", "length_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "long", "est", "\\u", "desc_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "complete_", "in_", "result_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "candidates_", "._", "append_", "(_", "complete_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "desc", "\\u", "len_", "=_", "len_", "(_", "complete_", "[_", "'", "name", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "desc", "\\u", "len_", ">_", "long", "est", "\\u", "desc", "\\u", "length_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "long", "est", "\\u", "desc_", "=_", "complete_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "long", "est", "\\u", "desc", "\\u", "length_", "=_", "desc", "\\u", "len_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "completion_", "in_", "candidates_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "description_", "=_", "completion_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "type_", "=_", "completion_", "[_", "'", "type", "Name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "abbr_", "=_", "description_", "+_", "'", " ", "'_", "+_", "\\u", "type_", "._", "rjust_", "(_", "(_", "len_", "(_", "description_", ")_", "-_", "long", "est", "\\u", "desc", "\\u", "length_", ")_", "+_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "info_", "=_", "\\u", "type_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "candidate_", "=_", "dict_", "(_", "word_", "=_", "description_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "abbr_", "=_", "abbr_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "info_", "=_", "info_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dup_", "=_", "1_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "out_", "._", "append_", "(_", "candidate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "out_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "call", "tips", "\\u", "from", "\\u", "result_", "(_", "self_", ",_", "result_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "out_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "result_", "[_", "1_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "call", "tip_", "in_", "result_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "candidate_", "=_", "dict_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "abbr_", "=_", "call", "tip_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "word_", "=_", "self_", "._", "parse", "\\u", "function", "\\u", "parameters_", "(_", "call", "tip_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "info_", "=_", "call", "tip_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "out_", "._", "append_", "(_", "candidate_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "out_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "parse", "\\u", "function", "\\u", "parameters_", "(_", "self_", ",_", "decl_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Pars", "es", " ", "the", " ", "function", " ", "parameter", "s", " ", "from", " ", "a", " ", "function", " ", "decl", ",", " ", "return", "s", " ", "them", " ", "as", " ", "a", " ", "string", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "last", "\\u", "lpar", "en_", "=_", "decl_", "._", "rfind_", "(_", "'('_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "last", "\\u", "rpa", "ren", "_", "=_", "decl_", "._", "rfind_", "(_", "')'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "param", "\\u", "list_", "=_", "decl_", "[_", "last", "\\u", "lpar", "en_", "+_", "1_", ":_", "last", "\\u", "rpa", "ren", "_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "param", "\\u", "list_", "=_", "param", "\\u", "list_", "._", "split_", "(_", "'", " ", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "take", " ", "only", " ", "the", " ", "names_", "\\u\\u\\uNL\\u\\u\\u_", "param", "\\u", "list_", "=_", "param", "\\u", "list_", "[_", "1_", ":_", ":_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "'", " ", "'_", "._", "join_", "(_", "param", "\\u", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "source", "\\u", "kitt", "en", "\\u", "binary_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "os_", "._", "path_", "._", "isfile_", "(_", "self_", "._", "\\u", "source", "\\u", "kitt", "en", "\\u", "binary_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "\\u", "source", "\\u", "kitt", "en", "\\u", "binary_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "find", "\\u", "binar", "y", "\\u", "path_", "(_", "'", "source", "kitt", "en", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Source_", "(_", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "find", "\\u", "binar", "y", "\\u", "path_", "(_", "self_", ",_", "cmd_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "is", "\\u", "exec_", "(_", "fpath_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "os_", "._", "path_", "._", "isfile_", "(_", "fpath_", ")_", "and_", "os_", "._", "access_", "(_", "fpath_", ",_", "os_", "._", "X", "\\u", "OK_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "fpath_", ",_", "fname_", "=_", "os_", "._", "path_", "._", "split_", "(_", "cmd_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "fpath_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "is", "\\u", "exec_", "(_", "cmd_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "cmd_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "path_", "in_", "os_", "._", "environ_", "[_", "\"", "PATH", "\"_", "]_", "._", "split_", "(_", "os_", "._", "pathsep_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "path_", "=_", "path_", "._", "strip_", "(_", "'\"'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "binary_", "=_", "os_", "._", "path_", "._", "join_", "(_", "path_", ",_", "cmd_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "is", "\\u", "exec_", "(_", "binary_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "return_", "binary_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
sightmachine/SimpleCV/SimpleCV/Segmentation/ColorSegmentation.py
[ { "content": "from SimpleCV.base import *\nfrom SimpleCV.Features import Feature, FeatureSet, BlobMaker\nfrom SimpleCV.ColorModel import ColorModel\nfrom SimpleCV.Color import Color\nfrom SimpleCV.ImageClass import Image\nfrom SimpleCV.Segmentation.SegmentationBase import SegmentationBase\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class ColorSegmentation(SegmentationBase):\n \"\"\"\n Perform color segmentation based on a color model or color provided. This class\n uses ColorModel.py to create a color model.\n \"\"\"\n mColorModel = []\n mError = False\n mCurImg = []\n mTruthImg = []\n mBlobMaker = []\n\n\n\n\n\n\n\n\n\n\n\n\n # The following are class specific methods\n\n\n\n", "metadata": "root.ColorSegmentation", "header": "['module', '___EOS___']", "index": 7 }, { "content": " def __init__(self):\n self.mColorModel = ColorModel()\n self.mError = False\n self.mCurImg = Image()\n self.mTruthImg = Image()\n self.mBlobMaker = BlobMaker()", "metadata": "root.ColorSegmentation.__init__", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 18 }, { "content": " def addImage(self, img):\n \"\"\"\n Add a single image to the segmentation algorithm\n \"\"\"\n self.mTruthImg = img\n self.mCurImg = self.mColorModel.threshold(img)\n return", "metadata": "root.ColorSegmentation.addImage", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 26 }, { "content": " def isReady(self):\n \"\"\"\n Returns true if the camera has a segmented image ready.\n \"\"\"\n return True;", "metadata": "root.ColorSegmentation.isReady", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 35 }, { "content": " def isError(self):\n \"\"\"\n Returns true if the segmentation system has detected an error.\n Eventually we'll consruct a syntax of errors so this becomes\n more expressive\n \"\"\"\n return self.mError #need to make a generic error checker", "metadata": "root.ColorSegmentation.isError", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 41 }, { "content": " def resetError(self):\n \"\"\"\n Clear the previous error.\n \"\"\"\n self.mError = false\n return", "metadata": "root.ColorSegmentation.resetError", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 49 }, { "content": " def reset(self):\n \"\"\"\n Perform a reset of the segmentation systems underlying data.\n \"\"\"\n self.mColorModel.reset()", "metadata": "root.ColorSegmentation.reset", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 56 }, { "content": " def getRawImage(self):\n \"\"\"\n Return the segmented image with white representing the foreground\n and black the background.\n \"\"\"\n return self.mCurImg", "metadata": "root.ColorSegmentation.getRawImage", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 62 }, { "content": " def getSegmentedImage(self, whiteFG=True):\n \"\"\"\n Return the segmented image with white representing the foreground\n and black the background.\n \"\"\"\n return self.mCurImg", "metadata": "root.ColorSegmentation.getSegmentedImage", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 69 }, { "content": " def getSegmentedBlobs(self):\n \"\"\"\n return the segmented blobs from the fg/bg image\n \"\"\"\n return self.mBlobMaker.extractFromBinary(self.mCurImg,self.mTruthImg)", "metadata": "root.ColorSegmentation.getSegmentedBlobs", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 76 }, { "content": " def addToModel(self, data):\n self.mColorModel.add(data)", "metadata": "root.ColorSegmentation.addToModel", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 84 }, { "content": " def subtractModel(self, data):\n self.mColorModel.remove(data)", "metadata": "root.ColorSegmentation.subtractModel", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 87 }, { "content": " def __getstate__(self):\n mydict = self.__dict__.copy()\n self.mBlobMaker = None\n del mydict['mBlobMaker']\n return mydict", "metadata": "root.ColorSegmentation.__getstate__", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 90 }, { "content": " def __setstate__(self, mydict):\n self.__dict__ = mydict\n self.mBlobMaker = BlobMaker()", "metadata": "root.ColorSegmentation.__setstate__", "header": "['class', 'ColorSegmentation', '(', 'SegmentationBase', ')', ':', '___EOS___']", "index": 96 } ]
[ { "span": "from SimpleCV.Features import Feature, FeatureSet, BlobMaker", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 60 }, { "span": "from SimpleCV.Color import Color", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 32 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "Simple", "CV_", "._", "base_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "CV_", "._", "Features_", "import_", "Feature_", ",_", "Feature", "Set_", ",_", "Blo", "b", "Maker_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "CV_", "._", "Color", "Model_", "import_", "Color", "Model_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "CV_", "._", "Color_", "import_", "Color_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "CV_", "._", "Image", "Class_", "import_", "Image_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Simple", "CV_", "._", "Segmentation", "_", "._", "Segmentation", "Base_", "import_", "Segmentation", "Base_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Perform", " ", "color", " ", "segmentation", " ", "based", " ", "on", " ", "a", " ", "color", " ", "model", " ", "or", " ", "color", " ", "provided", ".", " ", "Thi", "s", " ", "class", "\\", "10", ";", " ", " ", " ", " ", "use", "s", " ", "Color", "Model", ".", "py", " ", "to", " ", "create", " ", "a", " ", "color", " ", "model", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m", "Color", "Model_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m", "Error_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m", "Cur", "Img_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m", "Tru", "th", "Img_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "m", "Blo", "b", "Maker_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "follow", "ing", " ", "are", " ", "class", " ", "specific", " ", "methods_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "m", "Color", "Model_", "=_", "Color", "Model_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Error_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Cur", "Img_", "=_", "Image_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Tru", "th", "Img_", "=_", "Image_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Blo", "b", "Maker_", "=_", "Blo", "b", "Maker_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Image_", "(_", "self_", ",_", "img_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Add", " ", "a", " ", "single", " ", "image", " ", "to", " ", "the", " ", "segmentation", " ", "algo", "rit", "hm", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Tru", "th", "Img_", "=_", "img_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Cur", "Img_", "=_", "self_", "._", "m", "Color", "Model_", "._", "threshold_", "(_", "img_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "Ready_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", " ", "true", " ", "if", " ", "the", " ", "came", "ra", " ", "has", " ", "a", " ", "segment", "ed", " ", "image", " ", "read", "y", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "True_", ";_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "Error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Return", "s", " ", "true", " ", "if", " ", "the", " ", "segmentation", " ", "system", " ", "has", " ", "detect", "ed", " ", "an", " ", "error", ".", "\\", "10", ";", " ", " ", " ", " ", "Event", "ual", "ly", " ", "we", "'", "ll", " ", "cons", "ruct", " ", "a", " ", "synta", "x", " ", "of", " ", "error", "s", " ", "so", " ", "this", " ", "bec", "ome", "s", "\\", "10", ";", " ", " ", " ", " ", "more", " ", "express", "ive", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "m", "Error_", "#", "need", " ", "to", " ", "make", " ", "a", " ", "gener", "ic", " ", "error", " ", "checker_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reset", "Error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Clear", " ", "the", " ", "previ", "ous", " ", "error", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Error_", "=_", "false_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "reset_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Perform", " ", "a", " ", "reset", " ", "of", " ", "the", " ", "segmentation", " ", "system", "s", " ", "underl", "ying", " ", "data", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Color", "Model_", "._", "reset_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Ra", "w", "Image_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "the", " ", "segment", "ed", " ", "image", " ", "with", " ", "white", " ", "represent", "ing", " ", "the", " ", "fore", "ground", "\\", "10", ";", " ", " ", " ", " ", "and", " ", "black", " ", "the", " ", "background", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "m", "Cur", "Img_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Segme", "nte", "d", "Image_", "(_", "self_", ",_", "white", "FG", "_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "the", " ", "segment", "ed", " ", "image", " ", "with", " ", "white", " ", "represent", "ing", " ", "the", " ", "fore", "ground", "\\", "10", ";", " ", " ", " ", " ", "and", " ", "black", " ", "the", " ", "background", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "m", "Cur", "Img_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Segme", "nte", "d", "Blo", "bs_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "return", " ", "the", " ", "segment", "ed", " ", "blobs", " ", "from", " ", "the", " ", "fg", "/", "bg", " ", "image", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "m", "Blo", "b", "Maker_", "._", "extract", "Fro", "m", "Binary_", "(_", "self_", "._", "m", "Cur", "Img_", ",_", "self_", "._", "m", "Tru", "th", "Img_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "To", "Model_", "(_", "self_", ",_", "data_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "m", "Color", "Model_", "._", "add_", "(_", "data_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "subtract", "Model_", "(_", "self_", ",_", "data_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "m", "Color", "Model_", "._", "remove_", "(_", "data_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "getstate", "\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mydi", "ct_", "=_", "self_", "._", "\\u\\u", "dict\\u\\u_", "._", "copy_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Blo", "b", "Maker_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "del_", "mydi", "ct_", "[_", "'", "m", "Blo", "b", "Make", "r", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "mydi", "ct_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Color", "Segmentation", "_", "(_", "Segmentation", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "setstate", "\\u\\u_", "(_", "self_", ",_", "mydi", "ct_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u\\u", "dict\\u\\u_", "=_", "mydi", "ct_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "m", "Blo", "b", "Maker_", "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 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Imprecise assert
SmileyChris/django-countries/django_countries/tests/test_settings.py
[ { "content": " def test_override_only(self):\n with self.settings(COUNTRIES_ONLY={'AU': 'Desert'}):\n self.assertTrue(len(countries.countries) == 1)\n self.assertIn('AU', countries)\n self.assertEqual(countries.name('AU'), 'Desert')", "metadata": "root.TestSettings.test_override_only", "header": "['class', 'TestSettings', '(', 'TestCase', ')', ':', '___EOS___']", "index": 28 } ]
[ { "span": "self.assertTrue(len(countries.countries) == 1)", "start_line": 30, "start_column": 12, "end_line": 30, "end_column": 58 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Settings_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "override", "\\u", "only_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "settings_", "(_", "COUNT", "RIE", "S", "\\u", "ONLY_", "=_", "{_", "'", "AU", "'_", ":_", "'", "Des", "ert", "'_", "}_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "len_", "(_", "countries_", "._", "countries_", ")_", "==_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "In_", "(_", "'", "AU", "'_", ",_", "countries_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "countries_", "._", "name_", "(_", "'", "AU", "'_", ")_", ",_", "'", "Des", "ert", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
pydata/pandas/pandas/io/tests/test_ga.py
[ { "content": "# flake8: noqa\n\nimport os\nfrom datetime import datetime\n\nimport warnings\nimport nose\nimport pandas as pd\nfrom pandas import compat\nfrom pandas.util.testing import network, assert_frame_equal, with_connectivity_check\nfrom numpy.testing.decorators import slow\nimport pandas.util.testing as tm\n\nif compat.PY3:\n raise nose.SkipTest(\"python-gflags does not support Python 3 yet\")\n\ntry:\n import httplib2\n import apiclient\n\n # deprecated\n with warnings.catch_warnings(record=True):\n import pandas.io.ga as ga\n\n from pandas.io.ga import GAnalytics, read_ga\n from pandas.io.auth import AuthenticationConfigError, reset_default_token_store\n from pandas.io import auth\nexcept ImportError:\n raise nose.SkipTest(\"need httplib2 and auth libs\")\n\n\n\n\nif __name__ == '__main__':\n nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],\n exit=False)\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class TestGoogle(tm.TestCase):\n\n _multiprocess_can_split_ = True\n\n\n\n\n\n\n\n\n", "metadata": "root.TestGoogle", "header": "['module', '___EOS___']", "index": 31 }, { "content": " def test_remove_token_store(self):\n auth.DEFAULT_TOKEN_FILE = 'test.dat'\n with open(auth.DEFAULT_TOKEN_FILE, 'w') as fh:\n fh.write('test')\n\n reset_default_token_store()\n self.assertFalse(os.path.exists(auth.DEFAULT_TOKEN_FILE))", "metadata": "root.TestGoogle.test_remove_token_store", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 35 }, { "content": " @with_connectivity_check(\"http://www.google.com\")\n def test_getdata(self):\n try:\n end_date = datetime.now()\n start_date = end_date - pd.offsets.Day() * 5\n end_date = end_date.strftime('%Y-%m-%d')\n start_date = start_date.strftime('%Y-%m-%d')\n\n reader = GAnalytics()\n df = reader.get_data(\n metrics=['avgTimeOnSite', 'visitors', 'newVisits',\n 'pageviewsPerVisit'],\n start_date=start_date,\n end_date=end_date,\n dimensions=['date', 'hour'],\n parse_dates={'ts': ['date', 'hour']},\n index_col=0)\n\n self.assertIsInstance(df, pd.DataFrame)\n self.assertIsInstance(df.index, pd.DatetimeIndex)\n self.assertGreater(len(df), 1)\n self.assertTrue('date' not in df)\n self.assertTrue('hour' not in df)\n self.assertEqual(df.index.name, 'ts')\n self.assertTrue('avgTimeOnSite' in df)\n self.assertTrue('visitors' in df)\n self.assertTrue('newVisits' in df)\n self.assertTrue('pageviewsPerVisit' in df)\n\n df2 = read_ga(\n metrics=['avgTimeOnSite', 'visitors', 'newVisits',\n 'pageviewsPerVisit'],\n start_date=start_date,\n end_date=end_date,\n dimensions=['date', 'hour'],\n parse_dates={'ts': ['date', 'hour']},\n index_col=0)\n\n assert_frame_equal(df, df2)\n\n except AuthenticationConfigError:\n raise nose.SkipTest(\"authentication error\")", "metadata": "root.TestGoogle.test_getdata", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 43 }, { "content": " @with_connectivity_check(\"http://www.google.com\")\n def test_iterator(self):\n try:\n reader = GAnalytics()\n\n it = reader.get_data(\n metrics='visitors',\n start_date='2005-1-1',\n dimensions='date',\n max_results=10, chunksize=5,\n index_col=0)\n\n df1 = next(it)\n df2 = next(it)\n\n for df in [df1, df2]:\n self.assertIsInstance(df, pd.DataFrame)\n self.assertIsInstance(df.index, pd.DatetimeIndex)\n self.assertEqual(len(df), 5)\n self.assertTrue('date' not in df)\n self.assertEqual(df.index.name, 'date')\n self.assertTrue('visitors' in df)\n\n self.assertTrue((df2.index > df1.index).all())\n\n except AuthenticationConfigError:\n raise nose.SkipTest(\"authentication error\")", "metadata": "root.TestGoogle.test_iterator", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 86 }, { "content": " def test_v2_advanced_segment_format(self):\n advanced_segment_id = 1234567\n query = ga.format_query('google_profile_id', ['visits'], '2013-09-01', segment=advanced_segment_id)\n self.assertEqual(query['segment'], 'gaid::' + str(advanced_segment_id), \"An integer value should be formatted as an advanced segment.\")", "metadata": "root.TestGoogle.test_v2_advanced_segment_format", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 114 }, { "content": " def test_v2_dynamic_segment_format(self):\n dynamic_segment_id = 'medium==referral'\n query = ga.format_query('google_profile_id', ['visits'], '2013-09-01', segment=dynamic_segment_id)\n self.assertEqual(query['segment'], 'dynamic::ga:' + str(dynamic_segment_id), \"A string value with more than just letters and numbers should be formatted as a dynamic segment.\")", "metadata": "root.TestGoogle.test_v2_dynamic_segment_format", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 119 }, { "content": " def test_v3_advanced_segment_common_format(self):\n advanced_segment_id = 'aZwqR234'\n query = ga.format_query('google_profile_id', ['visits'], '2013-09-01', segment=advanced_segment_id)\n self.assertEqual(query['segment'], 'gaid::' + str(advanced_segment_id), \"A string value with just letters and numbers should be formatted as an advanced segment.\")", "metadata": "root.TestGoogle.test_v3_advanced_segment_common_format", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 124 }, { "content": " def test_v3_advanced_segment_weird_format(self):\n advanced_segment_id = '_aZwqR234-s1'\n query = ga.format_query('google_profile_id', ['visits'], '2013-09-01', segment=advanced_segment_id)\n self.assertEqual(query['segment'], 'gaid::' + str(advanced_segment_id), \"A string value with just letters, numbers, and hyphens should be formatted as an advanced segment.\")", "metadata": "root.TestGoogle.test_v3_advanced_segment_weird_format", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 129 }, { "content": " def test_v3_advanced_segment_with_underscore_format(self):\n advanced_segment_id = 'aZwqR234_s1'\n query = ga.format_query('google_profile_id', ['visits'], '2013-09-01', segment=advanced_segment_id)\n self.assertEqual(query['segment'], 'gaid::' + str(advanced_segment_id), \"A string value with just letters, numbers, and underscores should be formatted as an advanced segment.\")", "metadata": "root.TestGoogle.test_v3_advanced_segment_with_underscore_format", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 134 }, { "content": " @with_connectivity_check(\"http://www.google.com\")\n def test_segment(self):\n try:\n end_date = datetime.now()\n start_date = end_date - pd.offsets.Day() * 5\n end_date = end_date.strftime('%Y-%m-%d')\n start_date = start_date.strftime('%Y-%m-%d')\n\n reader = GAnalytics()\n df = reader.get_data(\n metrics=['avgTimeOnSite', 'visitors', 'newVisits',\n 'pageviewsPerVisit'],\n start_date=start_date,\n end_date=end_date,\n segment=-2,\n dimensions=['date', 'hour'],\n parse_dates={'ts': ['date', 'hour']},\n index_col=0)\n\n self.assertIsInstance(df, pd.DataFrame)\n self.assertIsInstance(df.index, pd.DatetimeIndex)\n self.assertGreater(len(df), 1)\n self.assertTrue('date' not in df)\n self.assertTrue('hour' not in df)\n self.assertEqual(df.index.name, 'ts')\n self.assertTrue('avgTimeOnSite' in df)\n self.assertTrue('visitors' in df)\n self.assertTrue('newVisits' in df)\n self.assertTrue('pageviewsPerVisit' in df)\n\n # dynamic\n df = read_ga(\n metrics=['avgTimeOnSite', 'visitors', 'newVisits',\n 'pageviewsPerVisit'],\n start_date=start_date,\n end_date=end_date,\n segment=\"source=~twitter\",\n dimensions=['date', 'hour'],\n parse_dates={'ts': ['date', 'hour']},\n index_col=0)\n\n assert isinstance(df, pd.DataFrame)\n assert isinstance(df.index, pd.DatetimeIndex)\n self.assertGreater(len(df), 1)\n self.assertTrue('date' not in df)\n self.assertTrue('hour' not in df)\n self.assertEqual(df.index.name, 'ts')\n self.assertTrue('avgTimeOnSite' in df)\n self.assertTrue('visitors' in df)\n self.assertTrue('newVisits' in df)\n self.assertTrue('pageviewsPerVisit' in df)\n\n except AuthenticationConfigError:\n raise nose.SkipTest(\"authentication error\")", "metadata": "root.TestGoogle.test_segment", "header": "['class', 'TestGoogle', '(', 'tm', '.', 'TestCase', ')', ':', '___EOS___']", "index": 139 } ]
[ { "span": "from pandas.util.testing import network, assert_frame_equal, with_connectivity_check", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 84 }, { "span": "from numpy.testing.decorators import slow", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 41 }, { "span": "import httplib2", "start_line": 17, "start_column": 4, "end_line": 17, "end_column": 19 }, { "span": "import apiclient", "start_line": 18, "start_column": 4, "end_line": 18, "end_column": 20 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "flake", "8", ":", " ", "no", "qa_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "warnings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "nose_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pandas_", "as_", "pd_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pandas_", "import_", "compat_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pandas_", "._", "util_", "._", "testing_", "import_", "network_", ",_", "assert", "\\u", "frame", "\\u", "equal_", ",_", "with", "\\u", "connecti", "vity", "\\u", "check_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "numpy_", "._", "testing_", "._", "decorators_", "import_", "slow_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pandas_", "._", "util_", "._", "testing_", "as_", "tm_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "compat_", "._", "PY", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "nose_", "._", "Ski", "p", "Test_", "(_", "\"", "python", "-", "gf", "lags", " ", "doe", "s", " ", "not", " ", "support", " ", "Pyth", "on", " ", "3", " ", "ye", "t", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "httplib2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "apiclient_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "deprecated_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "warnings_", "._", "catch", "\\u", "warnings_", "(_", "record_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "pandas_", "._", "io_", "._", "ga_", "as_", "ga_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "pandas_", "._", "io_", "._", "ga_", "import_", "GA", "nal", "yti", "cs_", ",_", "read", "\\u", "ga_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pandas_", "._", "io_", "._", "auth_", "import_", "Auth", "entica", "tion", "Config", "Error_", ",_", "reset", "\\u", "default", "\\u", "token", "\\u", "store_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pandas_", "._", "io_", "import_", "auth_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "nose_", "._", "Ski", "p", "Test_", "(_", "\"", "need", " ", "http", "lib", "2", " ", "and", " ", "auth", " ", "libs", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "nose_", "._", "run", "module_", "(_", "argv_", "=_", "[_", "\\u\\u", "file\\u\\u_", ",_", "'-", "vv", "s", "'_", ",_", "'-", "x", "'_", ",_", "'--", "pdb", "'_", ",_", "'--", "pdb", "-", "fail", "ure", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "exit_", "=_", "False_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\\u", "multipro", "cess", "\\u", "can", "\\u", "split", "\\u_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "remove", "\\u", "token", "\\u", "store_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "auth_", "._", "DEF", "AUL", "T", "\\u", "TOKEN", "\\u", "FILE_", "=_", "'", "test", ".", "dat", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "open_", "(_", "auth_", "._", "DEF", "AUL", "T", "\\u", "TOKEN", "\\u", "FILE_", ",_", "'", "w", "'_", ")_", "as_", "fh_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fh_", "._", "write_", "(_", "'", "test", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "reset", "\\u", "default", "\\u", "token", "\\u", "store_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "os_", "._", "path_", "._", "exists_", "(_", "auth_", "._", "DEF", "AUL", "T", "\\u", "TOKEN", "\\u", "FILE_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "with", "\\u", "connecti", "vity", "\\u", "check_", "(_", "\"", "http", "://", "www", ".", "google", ".", "com", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "getdata_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "end", "\\u", "date_", "=_", "datetime_", "._", "now_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "\\u", "date_", "=_", "end", "\\u", "date_", "-_", "pd_", "._", "offsets_", "._", "Day_", "(_", ")_", "*_", "5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", "._", "strftime_", "(_", "'%", "Y", "-%", "m", "-%", "d", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", "._", "strftime_", "(_", "'%", "Y", "-%", "m", "-%", "d", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "reader_", "=_", "GA", "nal", "yti", "cs_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "df_", "=_", "reader_", "._", "get", "\\u", "data_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "metrics_", "=_", "[_", "'", "avg", "Time", "On", "Site", "'_", ",_", "'", "visitor", "s", "'_", ",_", "'", "new", "Visit", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "page", "views", "Per", "Visit", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dimensions_", "=_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "parse", "\\u", "dates_", "=_", "{_", "'", "ts", "'_", ":_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "index", "\\u", "col_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", ",_", "pd_", "._", "Data", "Frame_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", "._", "index_", ",_", "pd_", "._", "Date", "time", "Index_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Greater_", "(_", "len_", "(_", "df_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "date", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "hour", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "df_", "._", "index_", "._", "name_", ",_", "'", "ts", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "avg", "Time", "On", "Site", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "visitor", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "new", "Visit", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "page", "views", "Per", "Visit", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "df2_", "=_", "read", "\\u", "ga_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "metrics_", "=_", "[_", "'", "avg", "Time", "On", "Site", "'_", ",_", "'", "visitor", "s", "'_", ",_", "'", "new", "Visit", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "page", "views", "Per", "Visit", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dimensions_", "=_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "parse", "\\u", "dates_", "=_", "{_", "'", "ts", "'_", ":_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "index", "\\u", "col_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert", "\\u", "frame", "\\u", "equal_", "(_", "df_", ",_", "df2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Auth", "entica", "tion", "Config", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "nose_", "._", "Ski", "p", "Test_", "(_", "\"", "authenticat", "ion", " ", "error", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "with", "\\u", "connecti", "vity", "\\u", "check_", "(_", "\"", "http", "://", "www", ".", "google", ".", "com", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "iterator_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "reader_", "=_", "GA", "nal", "yti", "cs_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "it_", "=_", "reader_", "._", "get", "\\u", "data_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "metrics_", "=_", "'", "visitor", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "date_", "=_", "'", "2005", "-1", "-1", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dimensions_", "=_", "'", "date", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "max", "\\u", "results_", "=_", "10_", ",_", "chunksize_", "=_", "5_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "index", "\\u", "col_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "df1_", "=_", "next_", "(_", "it_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "df2_", "=_", "next_", "(_", "it_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "df_", "in_", "[_", "df1_", ",_", "df2_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", ",_", "pd_", "._", "Data", "Frame_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", "._", "index_", ",_", "pd_", "._", "Date", "time", "Index_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "len_", "(_", "df_", ")_", ",_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "date", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "df_", "._", "index_", "._", "name_", ",_", "'", "date", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "visitor", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "(_", "df2_", "._", "index_", ">_", "df1_", "._", "index_", ")_", "._", "all_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Auth", "entica", "tion", "Config", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "nose_", "._", "Ski", "p", "Test_", "(_", "\"", "authenticat", "ion", " ", "error", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "v2", "\\u", "advanced", "\\u", "segment", "\\u", "format_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "advanced", "\\u", "segment", "\\u", "id_", "=_", "1234567", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "ga_", "._", "format\\u", "query_", "(_", "'", "google", "\\u", "profile", "\\u", "id", "'_", ",_", "[_", "'", "visits", "'_", "]_", ",_", "'", "2013", "-0", "9", "-0", "1", "'_", ",_", "segment_", "=_", "advanced", "\\u", "segment", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "query_", "[_", "'", "segment", "'_", "]_", ",_", "'", "gai", "d", "::'", "_", "+_", "str_", "(_", "advanced", "\\u", "segment", "\\u", "id_", ")_", ",_", "\"", "An", " ", "integ", "er", " ", "value", " ", "shou", "ld", " ", "be", " ", "format", "ted", " ", "as", " ", "an", " ", "advanced", " ", "segment", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "v2", "\\u", "dynami", "c\\u", "segment", "\\u", "format_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "dynami", "c\\u", "segment", "\\u", "id_", "=_", "'", "medium", "==", "referral", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "ga_", "._", "format\\u", "query_", "(_", "'", "google", "\\u", "profile", "\\u", "id", "'_", ",_", "[_", "'", "visits", "'_", "]_", ",_", "'", "2013", "-0", "9", "-0", "1", "'_", ",_", "segment_", "=_", "dynami", "c\\u", "segment", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "query_", "[_", "'", "segment", "'_", "]_", ",_", "'", "dynami", "c", "::", "ga", ":'_", "+_", "str_", "(_", "dynami", "c\\u", "segment", "\\u", "id_", ")_", ",_", "\"", "A", " ", "string", " ", "value", " ", "with", " ", "more", " ", "than", " ", "just", " ", "letter", "s", " ", "and", " ", "numbers", " ", "shou", "ld", " ", "be", " ", "format", "ted", " ", "as", " ", "a", " ", "dynami", "c", " ", "segment", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "v", "3", "\\u", "advanced", "\\u", "segment", "\\u", "common", "\\u", "format_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "advanced", "\\u", "segment", "\\u", "id_", "=_", "'", "a", "Zw", "q", "R2", "3", "4", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "ga_", "._", "format\\u", "query_", "(_", "'", "google", "\\u", "profile", "\\u", "id", "'_", ",_", "[_", "'", "visits", "'_", "]_", ",_", "'", "2013", "-0", "9", "-0", "1", "'_", ",_", "segment_", "=_", "advanced", "\\u", "segment", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "query_", "[_", "'", "segment", "'_", "]_", ",_", "'", "gai", "d", "::'", "_", "+_", "str_", "(_", "advanced", "\\u", "segment", "\\u", "id_", ")_", ",_", "\"", "A", " ", "string", " ", "value", " ", "with", " ", "just", " ", "letter", "s", " ", "and", " ", "numbers", " ", "shou", "ld", " ", "be", " ", "format", "ted", " ", "as", " ", "an", " ", "advanced", " ", "segment", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "v", "3", "\\u", "advanced", "\\u", "segment", "\\u", "weird", "\\u", "format_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "advanced", "\\u", "segment", "\\u", "id_", "=_", "'\\u", "a", "Zw", "q", "R2", "3", "4", "-", "s1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "ga_", "._", "format\\u", "query_", "(_", "'", "google", "\\u", "profile", "\\u", "id", "'_", ",_", "[_", "'", "visits", "'_", "]_", ",_", "'", "2013", "-0", "9", "-0", "1", "'_", ",_", "segment_", "=_", "advanced", "\\u", "segment", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "query_", "[_", "'", "segment", "'_", "]_", ",_", "'", "gai", "d", "::'", "_", "+_", "str_", "(_", "advanced", "\\u", "segment", "\\u", "id_", ")_", ",_", "\"", "A", " ", "string", " ", "value", " ", "with", " ", "just", " ", "letter", "s", ",", " ", "numbers", ",", " ", "and", " ", "hyphen", "s", " ", "shou", "ld", " ", "be", " ", "format", "ted", " ", "as", " ", "an", " ", "advanced", " ", "segment", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "v", "3", "\\u", "advanced", "\\u", "segment", "\\u", "with", "\\u", "underscore", "\\u", "format_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "advanced", "\\u", "segment", "\\u", "id_", "=_", "'", "a", "Zw", "q", "R2", "3", "4", "\\u", "s1", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "query_", "=_", "ga_", "._", "format\\u", "query_", "(_", "'", "google", "\\u", "profile", "\\u", "id", "'_", ",_", "[_", "'", "visits", "'_", "]_", ",_", "'", "2013", "-0", "9", "-0", "1", "'_", ",_", "segment_", "=_", "advanced", "\\u", "segment", "\\u", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "query_", "[_", "'", "segment", "'_", "]_", ",_", "'", "gai", "d", "::'", "_", "+_", "str_", "(_", "advanced", "\\u", "segment", "\\u", "id_", ")_", ",_", "\"", "A", " ", "string", " ", "value", " ", "with", " ", "just", " ", "letter", "s", ",", " ", "numbers", ",", " ", "and", " ", "underscore", "s", " ", "shou", "ld", " ", "be", " ", "format", "ted", " ", "as", " ", "an", " ", "advanced", " ", "segment", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "with", "\\u", "connecti", "vity", "\\u", "check_", "(_", "\"", "http", "://", "www", ".", "google", ".", "com", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "segment_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "end", "\\u", "date_", "=_", "datetime_", "._", "now_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "\\u", "date_", "=_", "end", "\\u", "date_", "-_", "pd_", "._", "offsets_", "._", "Day_", "(_", ")_", "*_", "5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", "._", "strftime_", "(_", "'%", "Y", "-%", "m", "-%", "d", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", "._", "strftime_", "(_", "'%", "Y", "-%", "m", "-%", "d", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "reader_", "=_", "GA", "nal", "yti", "cs_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "df_", "=_", "reader_", "._", "get", "\\u", "data_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "metrics_", "=_", "[_", "'", "avg", "Time", "On", "Site", "'_", ",_", "'", "visitor", "s", "'_", ",_", "'", "new", "Visit", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "page", "views", "Per", "Visit", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "segment_", "=_", "-_", "2_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dimensions_", "=_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "parse", "\\u", "dates_", "=_", "{_", "'", "ts", "'_", ":_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "index", "\\u", "col_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", ",_", "pd_", "._", "Data", "Frame_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "df_", "._", "index_", ",_", "pd_", "._", "Date", "time", "Index_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Greater_", "(_", "len_", "(_", "df_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "date", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "hour", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "df_", "._", "index_", "._", "name_", ",_", "'", "ts", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "avg", "Time", "On", "Site", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "visitor", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "new", "Visit", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "page", "views", "Per", "Visit", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "dynamic_", "\\u\\u\\uNL\\u\\u\\u_", "df_", "=_", "read", "\\u", "ga_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "metrics_", "=_", "[_", "'", "avg", "Time", "On", "Site", "'_", ",_", "'", "visitor", "s", "'_", ",_", "'", "new", "Visit", "s", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "page", "views", "Per", "Visit", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "start", "\\u", "date_", "=_", "start", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "end", "\\u", "date_", "=_", "end", "\\u", "date_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "segment_", "=_", "\"", "source", "=", "~", "twit", "ter", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "dimensions_", "=_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "parse", "\\u", "dates_", "=_", "{_", "'", "ts", "'_", ":_", "[_", "'", "date", "'_", ",_", "'", "hour", "'_", "]_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "index", "\\u", "col_", "=_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "isinstance_", "(_", "df_", ",_", "pd_", "._", "Data", "Frame_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "isinstance_", "(_", "df_", "._", "index_", ",_", "pd_", "._", "Date", "time", "Index_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Greater_", "(_", "len_", "(_", "df_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "date", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "hour", "'_", "not_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "df_", "._", "index_", "._", "name_", ",_", "'", "ts", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "avg", "Time", "On", "Site", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "visitor", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "new", "Visit", "s", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "True_", "(_", "'", "page", "views", "Per", "Visit", "'_", "in_", "df_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Auth", "entica", "tion", "Config", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "nose_", "._", "Ski", "p", "Test_", "(_", "\"", "authenticat", "ion", " ", "error", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
newsapps/englewood/englewood/__init__.py
[ { "content": "#!/usr/bin/env python\n\nfrom dotdensity import DotDensityPlotter\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from dotdensity import DotDensityPlotter", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 40 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "dot", "density_", "import_", "Dot", "Den", "sity", "Plotter", "_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1 ]
Comparison using is when operands support `__eq__`
azoft-dev-team/imagrium/env/Lib/test/test_import_pep328.py
[ { "content": " def runImport(self, statement):\n l = {}\n g = {}\n try:\n exec statement in g, l \n except TestImportStatementError,e:\n self.assert_(e.globals is g, \"globals is changed\")\n self.assert_(e.locals is l, \"locals is changed\")\n return e\n self.fail(\"Expected a TestImportStatementError\")", "metadata": "root.TestImportStatement.runImport", "header": "['class', 'TestImportStatement', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 70 } ]
[ { "span": "e.globals is g,", "start_line": 76, "start_column": 25, "end_line": 76, "end_column": 39 }, { "span": "e.locals is l,", "start_line": 77, "start_column": 25, "end_line": 77, "end_column": 38 } ]
[]
1
false
[ "[CLS]_", "Compari", "son_", "using_", "is_", "when_", "operands_", "support_", " _", "`_", "\\u\\u", "eq\\u\\u_", "`_", "[SEP]_", "class_", "Test", "Import", "Statement_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run", "Import_", "(_", "self_", ",_", "statement_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "l_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "g_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "exec_", "statement_", "in_", "g_", ",_", "l_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Test", "Import", "State", "ment", "Error_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert\\u_", "(_", "e_", "._", "globals_", "is_", "g_", ",_", "\"", "globals", " ", "is", " ", "change", "d", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "e_", "._", "locals_", "is_", "l_", ",_", "\"", "locals", " ", "is", " ", "change", "d", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "e_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "fail_", "(_", "\"", "Expect", "ed", " ", "a", " ", "Test", "Import", "State", "ment", "Error", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
rohe/pyoidc/oidc_example/rp2/oidc.py
[ { "content": " def phaseN(self, environ, query, server_env, session):\n \"\"\"Step 2: Once the consumer has redirected the user back to the\n callback URL you can request the access token the user has\n approved.\"\"\"\n\n client = session['client']\n logger.debug(\"info: %s\", query)\n logger.debug(\"keyjar: %s\", client.keyjar)\n\n authresp = client.parse_response(AuthorizationResponse, query,\n sformat=\"dict\", keyjar=client.keyjar)\n\n if isinstance(authresp, ErrorResponse):\n return False, \"Access denied\"\n try:\n client.id_token = authresp[\"id_token\"]\n except:\n pass\n # session.session_id = msg[\"state\"]\n\n logger.debug(\"callback environ: %s\", environ)\n\n if self.flow_type == \"code\":\n # get the access token\n try:\n tokenresp = self.get_accesstoken(client, authresp)\n except Exception as err:\n logger.error(\"%s\", err)\n raise\n\n if isinstance(tokenresp, ErrorResponse):\n return (False, \"Invalid response %s.\" % tokenresp[\"error\"])\n\n access_token = tokenresp[\"access_token\"]\n else:\n access_token = authresp[\"access_token\"]\n\n userinfo = self.verify_token(client, access_token)\n\n inforesp = self.get_userinfo(client, authresp, access_token)\n\n if isinstance(inforesp, ErrorResponse):\n return False, \"Invalid response %s.\" % inforesp[\"error\"], session\n\n tot_info = userinfo.update(inforesp.to_dict())\n\n logger.debug(\"UserInfo: %s\", inforesp)\n\n return True, userinfo, access_token, client", "metadata": "root.OpenIDConnect.phaseN", "header": "['class', 'OpenIDConnect', '(', 'object', ')', ':', '___EOS___']", "index": 257 } ]
[ { "span": "except:", "start_line": 273, "start_column": 8, "end_line": 273, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Open", "ID", "Connect_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "phase", "N_", "(_", "self_", ",_", "environ_", ",_", "query_", ",_", "server", "\\u", "env_", ",_", "session_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Step", " ", "2", ":", " ", "On", "ce", " ", "the", " ", "consume", "r", " ", "has", " ", "redirected", " ", "the", " ", "user", " ", "back", " ", "to", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "callback", " ", "URL", " ", "you", " ", "can", " ", "request", " ", "the", " ", "access", " ", "token", " ", "the", " ", "user", " ", "has", "\\", "10", ";", " ", " ", " ", " ", "approved", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", "=_", "session_", "[_", "'", "client", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "info", ":", " ", "%", "s", "\"_", ",_", "query_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "key", "jar", ":", " ", "%", "s", "\"_", ",_", "client_", "._", "key", "jar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "auth", "resp_", "=_", "client_", "._", "parse", "\\u", "response_", "(_", "Authoriz", "ation", "Response_", ",_", "query_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sfo", "rmat", "_", "=_", "\"", "dict", "\"_", ",_", "key", "jar_", "=_", "client_", "._", "key", "jar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "auth", "resp_", ",_", "Error", "Response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "False_", ",_", "\"", "Access", " ", "deni", "ed", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "client_", "._", "id", "\\u", "token_", "=_", "auth", "resp_", "[_", "\"", "id", "\\u", "token", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "session", ".", "session", "\\u", "id", " ", "=", " ", "msg", "[\"", "state", "\"]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "callback", " ", "environ", ":", " ", "%", "s", "\"_", ",_", "environ_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "flow", "\\u", "type_", "==_", "\"", "code", "\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "get", " ", "the", " ", "access", " ", "token_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "token", "resp_", "=_", "self_", "._", "get", "\\u", "access", "token_", "(_", "client_", ",_", "auth", "resp_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "err_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "error_", "(_", "\"%", "s", "\"_", ",_", "err_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "isinstance_", "(_", "token", "resp_", ",_", "Error", "Response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "(_", "False_", ",_", "\"", "Inva", "lid", " ", "response", " ", "%", "s", ".\"_", "%_", "token", "resp_", "[_", "\"", "error", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "access", "\\u", "token_", "=_", "token", "resp_", "[_", "\"", "access", "\\u", "token", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "access", "\\u", "token_", "=_", "auth", "resp_", "[_", "\"", "access", "\\u", "token", "\"_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "userinfo_", "=_", "self_", "._", "verify", "\\u", "token_", "(_", "client_", ",_", "access", "\\u", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "info", "resp_", "=_", "self_", "._", "get", "\\u", "userinfo_", "(_", "client_", ",_", "auth", "resp_", ",_", "access", "\\u", "token_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "info", "resp_", ",_", "Error", "Response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "False_", ",_", "\"", "Inva", "lid", " ", "response", " ", "%", "s", ".\"_", "%_", "info", "resp_", "[_", "\"", "error", "\"_", "]_", ",_", "session_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "tot", "\\u", "info_", "=_", "userinfo_", "._", "update_", "(_", "info", "resp_", "._", "to", "\\u", "dict_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "logger_", "._", "debug_", "(_", "\"", "User", "Info", ":", " ", "%", "s", "\"_",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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
First parameter of a method is not named 'self'
kayhayen/Nuitka/tests/basics/BuiltinSuper.py
[ { "content": " def f6(self_by_another_name): # @NoSelf\n try:\n print(\"f6\", super())\n except TypeError:\n import sys\n assert sys.version < (3,)", "metadata": "root.X.f6", "header": "['class', 'X', ':', '___EOS___']", "index": 92 } ]
[ { "span": "def f6(self_by_another_name): ", "start_line": 92, "start_column": 4, "end_line": 92, "end_column": 33 } ]
[]
1
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "X_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "f6", "_", "(_", "self", "\\u", "by", "\\u", "anot", "her", "\\u", "name_", ")_", ":_", "#", " ", "@", "No", "Self", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "\"", "f6", "\"_", ",_", "super_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Type", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "sys_", "._", "version_", "<_", "(_", "3_", ",_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
kedz/sumpy/sumpy/document.py
[ { "content": "import re\nimport textwrap\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Summary(object):\n\n\n", "metadata": "root.Summary", "header": "['module', '___EOS___']", "index": 3 }, { "content": " def __init__(self, df):\n self._df = df", "metadata": "root.Summary.__init__", "header": "['class', 'Summary', '(', 'object', ')', ':', '___EOS___']", "index": 4 }, { "content": " def budget(self, type=\"byte\", size=600):\n summary = []\n if size == \"all\":\n summary = self._df[\"sent text\"].tolist()\n elif type == \"word\":\n remaining = size\n for idx, sent in self._df.iterrows():\n num_words = min(len(sent[\"words\"]), remaining)\n summary.append(u\" \".join(sent[\"words\"][0 : num_words]))\n remaining -= num_words\n if remaining < 1:\n break\n elif type == \"byte\":\n remaining = size\n for idx, sent in self._df.iterrows():\n num_chars = min(len(sent[\"sent text\"]), remaining)\n print num_chars\n summary.append(sent[\"sent text\"][0 : num_chars])\n remaining -= num_chars\n if remaining < 1:\n break\n return u\"\\n\".join(textwrap.fill(u\"{}) {}\".format(i, sent))\n for i, sent in enumerate(summary, 1)) + u\" ...\" ", "metadata": "root.Summary.budget", "header": "['class', 'Summary', '(', 'object', ')', ':', '___EOS___']", "index": 7 }, { "content": " def __unicode__(self):\n return self.budget()", "metadata": "root.Summary.__unicode__", "header": "['class', 'Summary', '(', 'object', ')', ':', '___EOS___']", "index": 31 }, { "content": " def __str__(self):\n return unicode(self).encode(\"utf-8\")", "metadata": "root.Summary.__str__", "header": "['class', 'Summary', '(', 'object', ')', ':', '___EOS___']", "index": 34 }, { "content": "class Document(object):\n\n ", "metadata": "root.Document", "header": "['module', '___EOS___']", "index": 38 }, { "content": " def __init__(self, name, text):\n self.name = name\n if isinstance(self.name, str):\n self.name = self.name.decode(u\"utf-8\")\n self.text = text\n if isinstance(self.text, str):\n self.text = self.text.decode(u\"utf-8\")", "metadata": "root.Document.__init__", "header": "['class', 'Document', '(', 'object', ')', ':', '___EOS___']", "index": 39 }, { "content": " def __str__(self):\n return unicode(self).encode(u\"utf-8\")", "metadata": "root.Document.__str__", "header": "['class', 'Document', '(', 'object', ')', ':', '___EOS___']", "index": 47 }, { "content": " def __unicode__(self):\n return self.name + u\"\\n\" + self.text", "metadata": "root.Document.__unicode__", "header": "['class', 'Document', '(', 'object', ')', ':', '___EOS___']", "index": 50 }, { "content": "class DocSet(object):", "metadata": "root.DocSet", "header": "['module', '___EOS___']", "index": 53 }, { "content": " def __init__(self, docs):\n self.docs = docs", "metadata": "root.DocSet.__init__", "header": "['class', 'DocSet', '(', 'object', ')', ':', '___EOS___']", "index": 54 } ]
[ { "span": "import re", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 9 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "textwrap_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Summary_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Summary_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "df_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "df_", "=_", "df_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Summary_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "budget_", "(_", "self_", ",_", "type_", "=_", "\"", "byte", "\"_", ",_", "size_", "=_", "600_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "summary_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "size_", "==_", "\"", "all", "\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "summary_", "=_", "self_", "._", "\\u", "df_", "[_", "\"", "sent", " ", "text", "\"_", "]_", "._", "tolist_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "type_", "==_", "\"", "word", "\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "remaining_", "=_", "size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "idx_", ",_", "sent_", "in_", "self_", "._", "\\u", "df_", "._", "iterrows_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "num", "\\u", "words_", "=_", "min_", "(_", "len_", "(_", "sent_", "[_", "\"", "words", "\"_", "]_", ")_", ",_", "remaining_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "summary_", "._", "append_", "(_", "u", "\"", " ", "\"_", "._", "join_", "(_", "sent_", "[_", "\"", "words", "\"_", "]_", "[_", "0_", ":_", "num", "\\u", "words_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "remaining_", "-=_", "num", "\\u", "words_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "remaining_", "<_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "type_", "==_", "\"", "byte", "\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "remaining_", "=_", "size_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "idx_", ",_", "sent_", "in_", "self_", "._", "\\u", "df_", "._", "iterrows_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "num", "\\u", "chars_", "=_", "min_", "(_", "len_", "(_", "sent_", "[_", "\"", "sent", " ", "text", "\"_", "]_", ")_", ",_", "remaining_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "num", "\\u", "chars_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "summary_", "._", "append_", "(_", "sent_", "[_", "\"", "sent", " ", "text", "\"_", "]_", "[_", "0_", ":_", "num", "\\u", "chars_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "remaining_", "-=_", "num", "\\u", "chars_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "remaining_", "<_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "u", "\"\\\\", "n", "\"_", "._", "join_", "(_", "textwrap_", "._", "fill_", "(_", "u", "\"{}", ")", " ", "{}\"_", "._", "format_", "(_", "i_", ",_", "sent_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "i_", ",_", "sent_", "in_", "enumerate_", "(_", "summary_", ",_", "1_", ")_", ")_", "+_", "u", "\"", " ", "...\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Summary_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "unicode\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "budget_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Summary_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "str\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "unicode_", "(_", "self_", ")_", "._", "encode_", "(_", "\"", "utf", "-", "8", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Document_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Document_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "name_", ",_", "text_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "name_", "=_", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "isinstance_", "(_", "self_", "._", "name_", ",_", "str_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "name_", "=_", "self_", "._", "name_", "._", "decode_", "(_", "u", "\"", "utf", "-", "8", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "text_", "=_", "text_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "isinstance_", "(_", "self_", "._", "text_", ",_", "str_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "text_", "=_", "self_", "._", "text_", "._", "decode_", "(_", "u", "\"", "utf", "-", "8", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Document_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "str\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "unicode_", "(_", "self_", ")_", "._", "encode_", "(_", "u", "\"", "utf", "-", "8", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Document_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "unicode\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "+_", "u", "\"\\\\", "n", "\"_", "+_", "self_", "._", "text_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Doc", "Set_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Doc", "Set_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "docs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "docs_", "=_", "docs_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
PMEAL/OpenPNM/test/integration/script_test.py
[ { "content": "def test_linear_solvers():\n pn = OpenPNM.Network.Cubic([1, 40, 30], spacing=0.0001)\n geom = OpenPNM.Geometry.Toray090(network=pn,\n pores=pn.pores(),\n throats=pn.throats())\n air = OpenPNM.Phases.Air(network=pn)\n phys_air = OpenPNM.Physics.Standard(network=pn,\n phase=air,\n pores=pn.pores(),\n throats=pn.throats())\n\n BC1_pores = pn.pores(labels=['left'])\n BC2_pores = pn.pores(labels=['right'])\n\n alg_1 = OpenPNM.Algorithms.FickianDiffusion(network=pn, phase=air)\n alg_1.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=1,\n pores=BC1_pores)\n alg_1.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0,\n pores=BC2_pores)\n alg_1.run(iterative_solver='gmres')\n\n alg_2 = OpenPNM.Algorithms.FickianDiffusion(network=pn, phase=air)\n alg_2.set_boundary_conditions(bctype='Neumann',\n bcvalue=-1e-11,\n pores=BC1_pores)\n alg_2.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0,\n pores=BC2_pores)\n alg_2.run(iterative_solver='cg')\n\n alg_3 = OpenPNM.Algorithms.FickianDiffusion(network=pn, phase=air)\n alg_3.set_boundary_conditions(bctype='Neumann_group',\n bcvalue=-3e-10,\n pores=BC1_pores)\n alg_3.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0,\n pores=BC2_pores)\n alg_3.run()\n\n alg_4 = OpenPNM.Algorithms.FickianDiffusion(network=pn, phase=air)\n alg_4.set_boundary_conditions(bctype='Neumann_group',\n bcvalue=-3e-10,\n pores=BC1_pores)\n alg_4.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0,\n pores=BC2_pores)\n alg_4.setup()\n alg_4.solve()\n\n assert round(sp.absolute(alg_1.rate(BC1_pores))[0], 16) ==\\\n round(sp.absolute(alg_1.rate(BC2_pores))[0], 16)\n assert round(sp.absolute(alg_2.rate(BC2_pores))[0], 16) ==\\\n round(sp.absolute(sp.unique(alg_2['pore.bcval_Neumann']))[0] *\n len(BC1_pores), 16)\n assert round(sp.absolute(alg_3.rate(BC2_pores))[0], 16) ==\\\n round(sp.absolute(sp.unique(alg_3['pore.bcval_Neumann_group']))[0], 16)\n assert round(sp.absolute(alg_4.rate(BC2_pores))[0], 16) ==\\\n round(sp.absolute(sp.unique(alg_4['pore.bcval_Neumann_group']))[0], 16)\n\n assert round(sp.absolute(sp.sum(alg_1.rate(BC1_pores, mode='single'))), 16) ==\\\n round(sp.absolute(alg_1.rate(BC1_pores))[0], 16)\n assert round(sp.absolute(sp.sum(alg_2.rate(BC2_pores, mode='single'))), 16) ==\\\n round(sp.absolute(alg_2.rate(BC2_pores))[0], 16)\n assert round(sp.absolute(sp.sum(alg_3.rate(BC2_pores, mode='single'))), 16) ==\\\n round(sp.absolute(alg_3.rate(BC2_pores))[0], 16)\n assert round(sp.absolute(sp.sum(alg_4.rate(BC2_pores, mode='single'))), 16) ==\\\n round(sp.absolute(alg_4.rate(BC2_pores))[0], 16)", "metadata": "root.test_linear_solvers", "header": "['module', '___EOS___']", "index": 6 }, { "content": "def test_open_air_diffusivity():\n pn = OpenPNM.Network.Cubic([5, 5, 5], spacing=1)\n pn.add_boundaries()\n Ps = pn.pores('boundary', mode='not')\n Ts = pn.find_neighbor_throats(pores=Ps, mode='intersection', flatten=True)\n geom = OpenPNM.Geometry.Cube_and_Cuboid(network=pn, pores=Ps, throats=Ts)\n geom['pore.diameter'] = 0.999999\n geom['throat.diameter'] = 0.999999\n geom.regenerate(['pore.diameter', 'throat.diameter'], mode='exclude')\n Ps = pn.pores('boundary')\n Ts = pn.find_neighbor_throats(pores=Ps, mode='not_intersection')\n boun = OpenPNM.Geometry.Boundary(network=pn,\n pores=Ps,\n throats=Ts,\n shape='cubes')\n air = OpenPNM.Phases.Air(network=pn)\n Ps = pn.pores()\n Ts = pn.throats()\n phys_air = OpenPNM.Physics.Standard(network=pn,\n phase=air,\n pores=Ps,\n throats=Ts)\n BC1_pores = pn.pores(labels=['top_boundary'])\n BC2_pores = pn.pores(labels=['bottom_boundary'])\n Diff = OpenPNM.Algorithms.FickianDiffusion(network=pn,\n phase=air)\n # Assign Dirichlet boundary conditions to top and bottom surface pores\n Diff.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0.6,\n pores=BC1_pores)\n Diff.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=0.4,\n pores=BC2_pores)\n Diff.run()\n Diff.return_results()\n Diff_deff = Diff.calc_eff_diffusivity()/np.mean(air['pore.diffusivity'])\n assert np.round(Diff_deff, 3) == 1", "metadata": "root.test_open_air_diffusivity", "header": "['module', '___EOS___']", "index": 99 }, { "content": "def test_Darcy_alg():\n # Generate Network and clean up some of boundaries\n divs = [1, 50, 10]\n Lc = 0.00004\n pn = OpenPNM.Network.Cubic(shape=divs, spacing=Lc)\n pn.add_boundaries()\n Ps = pn.pores(['front_boundary', 'back_boundary'])\n pn.trim(pores=Ps)\n # Generate Geometry objects for internal and boundary pores\n Ps = pn.pores('boundary', mode='not')\n Ts = pn.find_neighbor_throats(pores=Ps, mode='intersection', flatten=True)\n geom = OpenPNM.Geometry.Toray090(network=pn, pores=Ps, throats=Ts)\n Ps = pn.pores('boundary')\n Ts = pn.find_neighbor_throats(pores=Ps, mode='not_intersection')\n boun = OpenPNM.Geometry.Boundary(network=pn, pores=Ps, throats=Ts)\n # Create Phase object and associate with a Physics object\n air = OpenPNM.Phases.Air(network=pn)\n Ps = pn.pores()\n Ts = pn.throats()\n phys = OpenPNM.Physics.GenericPhysics(network=pn,\n phase=air,\n pores=Ps,\n throats=Ts)\n from OpenPNM.Physics import models as pm\n phys.add_model(propname='throat.hydraulic_conductance',\n model=pm.hydraulic_conductance.hagen_poiseuille,\n calc_pore_len=False)\n phys.regenerate() # Update the conductance values\n # Setup Algorithm objects\n Darcy1 = OpenPNM.Algorithms.StokesFlow(network=pn, phase=air)\n inlets = pn.pores('bottom_boundary')\n Ps = pn.pores('top_boundary')\n outlets = Ps[pn['pore.coords'][Ps, 1] < (divs[1]*Lc/2)]\n P_out = 0 # Pa\n Q_in = 0.6667*(Lc**2)*divs[1]*divs[0] # m^3/s\n Darcy1.set_boundary_conditions(bctype='Neumann_group',\n bcvalue=-Q_in,\n pores=inlets)\n Darcy1.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=P_out,\n pores=outlets)\n Darcy1.run()\n Darcy1.return_results()\n print('pore pressure for Darcy1 algorithm:')\n print(air['pore.pressure'])\n Darcy2 = OpenPNM.Algorithms.StokesFlow(network=pn, phase=air)\n inlets = pn.pores('bottom_boundary')\n outlets = pn.pores('top_boundary')\n P_out = 10 # Pa\n P_in = 1000 # Pa\n Darcy2.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=P_in,\n pores=inlets)\n Darcy2.set_boundary_conditions(bctype='Dirichlet',\n bcvalue=P_out,\n pores=outlets)\n Darcy2.run()\n print('pore pressure for Darcy2 algorithm:')\n print(Darcy2['pore.pressure'])\n Q = -Darcy2.rate(inlets)\n K = Q*air['pore.viscosity'][0]*divs[2]*Lc/(divs[0]*divs[1]*Lc**2*(P_in-P_out))\n Vp = sp.sum(pn['pore.volume']) + sp.sum(pn['throat.volume'])\n Vb = sp.prod(divs)*Lc**3\n e = Vp/Vb\n print('Effective permeability: ', K, '- Porosity: ', e)\n\n a = round(sp.absolute(Darcy1.rate(outlets))[0], 16)\n pore_prop = 'pore.bcval_Neumann_group'\n b = round(sp.absolute(sp.unique(Darcy1[pore_prop]))[0], 16)\n assert a == b\n\n a = round(sp.absolute(Darcy2.rate(inlets))[0], 16)\n b = round(sp.absolute(Darcy2.rate(outlets))[0], 16)\n assert a == b", "metadata": "root.test_Darcy_alg", "header": "['module', '___EOS___']", "index": 192 } ]
[ { "span": "geom ", "start_line": 8, "start_column": 4, "end_line": 8, "end_column": 8 }, { "span": "phys_air ", "start_line": 12, "start_column": 4, "end_line": 12, "end_column": 12 }, { "span": "boun ", "start_line": 110, "start_column": 4, "end_line": 110, "end_column": 8 }, { "span": "phys_air ", "start_line": 117, "start_column": 4, "end_line": 117, "end_column": 12 }, { "span": "geom ", "start_line": 203, "start_column": 4, "end_line": 203, "end_column": 8 }, { "span": "boun ", "start_line": 206, "start_column": 4, "end_line": 206, "end_column": 8 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "linear", "\\u", "solvers", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pn_", "=_", "Open", "PN", "M_", "._", "Network_", "._", "Cub", "ic_", "(_", "[_", "1_", ",_", "40_", ",_", "30_", "]_", ",_", "spacing_", "=_", "0.0001_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "=_", "Open", "PN", "M_", "._", "Geometry_", "._", "Tor", "ay", "090", "_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "thro", "ats_", "=_", "pn_", "._", "thro", "ats_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "air_", "=_", "Open", "PN", "M_", "._", "Phase", "s_", "._", "Air", "_", "(_", "network_", "=_", "pn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "phys", "\\u", "air_", "=_", "Open", "PN", "M_", "._", "Phys", "ics_", "._", "Standard", "_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "phase_", "=_", "air_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "thro", "ats_", "=_", "pn_", "._", "thro", "ats_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "BC", "1", "\\u", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "labels_", "=_", "[_", "'", "left", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "BC", "2", "\\u", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "labels_", "=_", "[_", "'", "right", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "alg", "\\u", "1_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Fi", "ck", "ian", "Diffus", "ion_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "1_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "1", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "1_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "2", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "1_", "._", "run_", "(_", "iterative", "\\u", "solver_", "=_", "'", "gm", "res", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "alg", "\\u", "2_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Fi", "ck", "ian", "Diffus", "ion_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "2_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Neu", "man", "n", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "-_", "1e-1", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "1", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "2_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "2", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "2_", "._", "run_", "(_", "iterative", "\\u", "solver_", "=_", "'", "cg", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "alg", "\\u", "3_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Fi", "ck", "ian", "Diffus", "ion_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "3_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Neu", "man", "n", "\\u", "group", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "-_", "3e", "-1", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "1", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "3_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "2", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "3_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "alg", "\\u", "4_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Fi", "ck", "ian", "Diffus", "ion_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "4_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Neu", "man", "n", "\\u", "group", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "-_", "3e", "-1", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "1", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "4_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "2", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "4_", "._", "setup_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alg", "\\u", "4_", "._", "solve_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "1_", "._", "rate_", "(_", "BC", "1", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "1_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "2_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "unique_", "(_", "alg", "\\u", "2_", "[_", "'", "pore", ".", "bc", "val", "\\u", "Neu", "man", "n", "'_", "]_", ")_", ")_", "[_", "0_", "]_", "*_", "\\u\\u\\uNL\\u\\u\\u_", "len_", "(_", "BC", "1", "\\u", "pore", "s_", ")_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "3_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "unique_", "(_", "alg", "\\u", "3_", "[_", "'", "pore", ".", "bc", "val", "\\u", "Neu", "man", "n", "\\u", "group", "'_", "]_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "4_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "unique_", "(_", "alg", "\\u", "4_", "[_", "'", "pore", ".", "bc", "val", "\\u", "Neu", "man", "n", "\\u", "group", "'_", "]_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "sum_", "(_", "alg", "\\u", "1_", "._", "rate_", "(_", "BC", "1", "\\u", "pore", "s_", ",_", "mode_", "=_", "'", "single", "'_", ")_", ")_", ")_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "1_", "._", "rate_", "(_", "BC", "1", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "sum_", "(_", "alg", "\\u", "2_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ",_", "mode_", "=_", "'", "single", "'_", ")_", ")_", ")_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "2_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "sum_", "(_", "alg", "\\u", "3_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ",_", "mode_", "=_", "'", "single", "'_", ")_", ")_", ")_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "3_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "sum_", "(_", "alg", "\\u", "4_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ",_", "mode_", "=_", "'", "single", "'_", ")_", ")_", ")_", ",_", "16_", ")_", "==_", "round_", "(_", "sp_", "._", "absolute_", "(_", "alg", "\\u", "4_", "._", "rate_", "(_", "BC", "2", "\\u", "pore", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "open", "\\u", "air", "\\u", "diff", "usi", "vity", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pn_", "=_", "Open", "PN", "M_", "._", "Network_", "._", "Cub", "ic_", "(_", "[_", "5_", ",_", "5_", ",_", "5_", "]_", ",_", "spacing_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pn_", "._", "add", "\\u", "boundaries_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bound", "ary", "'_", ",_", "mode_", "=_", "'", "not", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "find", "\\u", "neighbor", "\\u", "thro", "ats_", "(_", "pore", "s_", "=_", "Ps_", ",_", "mode_", "=_", "'", "intersect", "ion", "'_", ",_", "flatten_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "=_", "Open", "PN", "M_", "._", "Geometry_", "._", "Cub", "e\\u", "and", "\\u", "Cub", "oid_", "(_", "network_", "=_", "pn_", ",_", "pore", "s_", "=_", "Ps_", ",_", "thro", "ats_", "=_", "Ts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "[_", "'", "pore", ".", "diam", "eter", "'_", "]_", "=_", "0.999", "999_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "[_", "'", "thro", "at", ".", "diam", "eter", "'_", "]_", "=_", "0.999", "999_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "._", "regenerate", "_", "(_", "[_", "'", "pore", ".", "diam", "eter", "'_", ",_", "'", "thro", "at", ".", "diam", "eter", "'_", "]_", ",_", "mode_", "=_", "'", "exclu", "de", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "find", "\\u", "neighbor", "\\u", "thro", "ats_", "(_", "pore", "s_", "=_", "Ps_", ",_", "mode_", "=_", "'", "not", "\\u", "intersect", "ion", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "bou", "n_", "=_", "Open", "PN", "M_", "._", "Geometry_", "._", "Boundar", "y_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "Ps_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "thro", "ats_", "=_", "Ts_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "shape_", "=_", "'", "cubes", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "air_", "=_", "Open", "PN", "M_", "._", "Phase", "s_", "._", "Air", "_", "(_", "network_", "=_", "pn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "thro", "ats_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "phys", "\\u", "air_", "=_", "Open", "PN", "M_", "._", "Phys", "ics_", "._", "Standard", "_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "phase_", "=_", "air_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "Ps_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "thro", "ats_", "=_", "Ts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "BC", "1", "\\u", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "labels_", "=_", "[_", "'", "top", "\\u", "bound", "ary", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "BC", "2", "\\u", "pore", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "labels_", "=_", "[_", "'", "bottom", "\\u", "bound", "ary", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Diff_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Fi", "ck", "ian", "Diffus", "ion_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Assign", " ", "Dir", "ich", "let", " ", "bound", "ary", " ", "condition", "s", " ", "to", " ", "top", " ", "and", " ", "bottom", " ", "surf", "ace", " ", "pore", "s_", "\\u\\u\\uNL\\u\\u\\u_", "Diff_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0.6_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "1", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Diff_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "0.4_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "BC", "2", "\\u", "pore", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Diff_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Diff_", "._", "return", "\\u", "results_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Diff", "\\u", "def", "f_", "=_", "Diff_", "._", "calc", "\\u", "eff", "\\u", "diff", "usi", "vity", "_", "(_", ")_", "/_", "np_", "._", "mean_", "(_", "air_", "[_", "'", "pore", ".", "diff", "usi", "vity", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "np_", "._", "round_", "(_", "Diff", "\\u", "def", "f_", ",_", "3_", ")_", "==_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "Dar", "cy", "\\u", "alg_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Generate", " ", "Network", " ", "and", " ", "clean", " ", "up", " ", "some", " ", "of", " ", "boundaries_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "div", "s_", "=_", "[_", "1_", ",_", "50_", ",_", "10_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Lc", "_", "=_", "0.0000", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pn_", "=_", "Open", "PN", "M_", "._", "Network_", "._", "Cub", "ic_", "(_", "shape_", "=_", "div", "s_", ",_", "spacing_", "=_", "Lc", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pn_", "._", "add", "\\u", "boundaries_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "[_", "'", "front", "\\u", "bound", "ary", "'_", ",_", "'", "back", "\\u", "bound", "ary", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pn_", "._", "trim_", "(_", "pore", "s_", "=_", "Ps_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Generate", " ", "Geometr", "y", " ", "object", "s", " ", "for", " ", "internal", " ", "and", " ", "bound", "ary", " ", "pore", "s_", "\\u\\u\\uNL\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bound", "ary", "'_", ",_", "mode_", "=_", "'", "not", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "find", "\\u", "neighbor", "\\u", "thro", "ats_", "(_", "pore", "s_", "=_", "Ps_", ",_", "mode_", "=_", "'", "intersect", "ion", "'_", ",_", "flatten_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "geom_", "=_", "Open", "PN", "M_", "._", "Geometry_", "._", "Tor", "ay", "090", "_", "(_", "network_", "=_", "pn_", ",_", "pore", "s_", "=_", "Ps_", ",_", "thro", "ats_", "=_", "Ts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "find", "\\u", "neighbor", "\\u", "thro", "ats_", "(_", "pore", "s_", "=_", "Ps_", ",_", "mode_", "=_", "'", "not", "\\u", "intersect", "ion", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "bou", "n_", "=_", "Open", "PN", "M_", "._", "Geometry_", "._", "Boundar", "y_", "(_", "network_", "=_", "pn_", ",_", "pore", "s_", "=_", "Ps_", ",_", "thro", "ats_", "=_", "Ts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Creat", "e", " ", "Phase", " ", "object", " ", "and", " ", "associate", " ", "with", " ", "a", " ", "Phys", "ics", " ", "object_", "\\u\\u\\uNL\\u\\u\\u_", "air_", "=_", "Open", "PN", "M_", "._", "Phase", "s_", "._", "Air", "_", "(_", "network_", "=_", "pn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ts_", "=_", "pn_", "._", "thro", "ats_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "phys", "_", "=_", "Open", "PN", "M_", "._", "Phys", "ics_", "._", "Gene", "ric", "Phys", "ics_", "(_", "network_", "=_", "pn_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "phase_", "=_", "air_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "Ps_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "thro", "ats_", "=_", "Ts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Open", "PN", "M_", "._", "Phys", "ics_", "import_", "models_", "as_", "pm_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "phys", "_", "._", "add", "\\u", "model_", "(_", "prop", "name_", "=_", "'", "thro", "at", ".", "hydra", "uli", "c\\u", "conduct", "anc", "e", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "model_", "=_", "pm_", "._", "hydra", "uli", "c\\u", "conduct", "ance_", "._", "ha", "gen", "\\u", "pois", "eu", "ille", "_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "calc", "\\u", "pore", "\\u", "len_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "phys", "_", "._", "regenerate", "_", "(_", ")_", "#", " ", "Update", " ", "the", " ", "conduct", "anc", "e", " ", "values_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Set", "up", " ", "Algorit", "hm", " ", "objects_", "\\u\\u\\uNL\\u\\u\\u_", "Dar", "cy", "1_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Sto", "kes", "Flow_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "inlet", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bottom", "\\u", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Ps_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "top", "\\u", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "outlet", "s_", "=_", "Ps_", "[_", "pn_", "[_", "'", "pore", ".", "coords", "'_", "]_", "[_", "Ps_", ",_", "1_", "]_", "<_", "(_", "div", "s_", "[_", "1_", "]_", "*_", "Lc", "_", "/_", "2_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "P", "\\u", "out_", "=_", "0_", "#", " ", "Pa", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Q", "\\u", "in_", "=_", "0.66", "67_", "*_", "(_", "Lc", "_", "**_", "2_", ")_", "*_", "div", "s_", "[_", "1_", "]_", "*_", "div", "s_", "[_", "0_", "]_", "#", " ", "m", "^", "3", "/", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "1_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Neu", "man", "n", "\\u", "group", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "-_", "Q", "\\u", "in_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "inlet", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "1_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "P", "\\u", "out_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "outlet", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "1_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "1_", "._", "return", "\\u", "results_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "'", "pore", " ", "press", "ure", " ", "for", " ", "Dar", "cy", "1", " ", "algo", "rit", "hm", ":'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "air_", "[_", "'", "pore", ".", "press", "ure", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "2_", "=_", "Open", "PN", "M_", "._", "Algorit", "hms", "_", "._", "Sto", "kes", "Flow_", "(_", "network_", "=_", "pn_", ",_", "phase_", "=_", "air_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "inlet", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "bottom", "\\u", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "outlet", "s_", "=_", "pn_", "._", "pore", "s_", "(_", "'", "top", "\\u", "bound", "ary", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "P", "\\u", "out_", "=_", "10_", "#", " ", "Pa", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "P", "\\u", "in_", "=_", "1000_", "#", " ", "Pa", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "2_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "P", "\\u", "in_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "inlet", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "2_", "._", "set\\u", "bound", "ary", "\\u", "conditions_", "(_", "bc", "type_", "=_", "'", "Dir", "ich", "let", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "bc", "value_", "=_", "P", "\\u", "out_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pore", "s_", "=_", "outlet", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Dar", "cy", "2_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "'", "pore", " ", "press", "ure", " ", "for", " ", "Dar", "cy", "2", " ", "algo", "rit", "hm", ":'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "Dar", "cy", "2_", "[_", "'", "pore", ".", "press", "ure", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Q_", "=_", "-_", "Dar", "cy", "2_", "._", "rate_", "(_", "inlet", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "K_", "=_", "Q_", "*_", "air_", "[_", "'", "pore", ".", "visc", "osity", "'_", "]_", "[_", "0_", "]_", "*_", "div", "s_", "[_", "2_", "]_", "*_", "Lc", "_", "/_", "(_", "div", "s_", "[_", "0_", "]_", "*_", "div", "s_", "[_", "1_", "]_", "*_", "Lc", "_", "**_", "2_", "*_", "(_", "P", "\\u", "in_", "-_", "P", "\\u", "out_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Vp", "_", "=_", "sp_", "._", "sum_", "(_", "pn_", "[_", "'", "pore", ".", "volume", "'_", "]_", ")_", "+_", "sp_", "._", "sum_", "(_", "pn_", "[_", "'", "thro", "at", ".", "volume", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Vb", "_", "=_", "sp_", "._", "prod_", "(_", "div", "s_", ")_", "*_", "Lc", "_", "**_", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "e_", "=_", "Vp", "_", "/_", "Vb", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "(_", "'", "Effe", "ctive", " ", "perm", "eab", "ilit", "y", ":", " ", "'_", ",_", "K_", ",_", "'-", " ", "Por", "osity", ":", " ", "'_", ",_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "a_", "=_", "round_", "(_", "sp_", "._", "absolute_", "(_", "Dar", "cy", "1_", "._", "rate_", "(_", "outlet", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pore", "\\u", "prop_", "=_", "'", "pore", ".", "bc", "val", "\\u", "Neu", "man", "n", "\\u", "group", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "b_", "=_", "round_", "(_", "sp_", "._", "absolute_", "(_", "sp_", "._", "unique_", "(_", "Dar", "cy", "1_", "[_", "pore", "\\u", "prop_", "]_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "a_", "==_", "b_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "a_", "=_", "round_", "(_", "sp_", "._", "absolute_", "(_", "Dar", "cy", "2_", "._", "rate_", "(_", "inlet", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "b_", "=_", "round_", "(_", "sp_", "._", "absolute_", "(_", "Dar", "cy", "2_", "._", "rate_", "(_", "outlet", "s_", ")_", ")_", "[_", "0_", "]_", ",_", "16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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
wesabe/fixofx/3rdparty/wsgi_intercept/webtest_intercept/webtest.py
[ { "content": " def run(self, test):\n \"Run the given test case or test suite.\"\n # Overridden to remove unnecessary empty lines and separators\n result = self._makeResult()\n startTime = time.time()\n test(result)\n timeTaken = float(time.time() - startTime)\n result.printErrors()\n if not result.wasSuccessful():\n self.stream.write(\"FAILED (\")\n failed, errored = map(len, (result.failures, result.errors))\n if failed:\n self.stream.write(\"failures=%d\" % failed)\n if errored:\n if failed: self.stream.write(\", \")\n self.stream.write(\"errors=%d\" % errored)\n self.stream.writeln(\")\")\n return result", "metadata": "root.TerseTestRunner.run", "header": "['class', 'TerseTestRunner', '(', 'TextTestRunner', ')', ':', '___EOS___']", "index": 46 } ]
[ { "span": "timeTaken ", "start_line": 52, "start_column": 8, "end_line": 52, "end_column": 17 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Ter", "se", "Test", "Runner_", "(_", "Text", "Test", "Runner_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run_", "(_", "self_", ",_", "test_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"", "Run", " ", "the", " ", "give", "n", " ", "test", " ", "case", " ", "or", " ", "test", " ", "suit", "e", ".\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Over", "rid", "den", " ", "to", " ", "remove", " ", "unne", "cess", "ary", " ", "empty", " ", "lines", " ", "and", " ", "separators_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "=_", "self_", "._", "\\u", "make", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "Time_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "test_", "(_", "result_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "time", "Taken", "_", "=_", "float_", "(_", "time_", "._", "time_", "(_", ")_", "-_", "start", "Time_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "._", "print", "Errors_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "result_", "._", "was", "Success", "ful_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "stream_", "._", "write_", "(_", "\"", "FAIL", "ED", " ", "(\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "failed_", ",_", "errore", "d_", "=_", "map_", "(_", "len_", ",_", "(_", "result_", "._", "failures_", ",_", "result_", "._", "errors_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "failed_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "stream_", "._", "write_", "(_", "\"", "fail", "ure", "s", "=", "%", "d", "\"_", "%_", "failed_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "errore", "d_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "failed_", ":_", "self_", "._", "stream_", "._", "write_", "(_", "\",", " ", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "stream_", "._", "write_", "(_", "\"", "error", "s", "=", "%", "d", "\"_", "%_", "errore", "d_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "stream_", "._", "writeln_", "(_", "\")\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
gosquadron/squadron/tests/exthandlers/test_git.py
[ { "content": "import os\nimport squadron\nfrom squadron.exthandlers.makegit import ext_git\nfrom quik import FileLoader\nimport pytest\nimport git\nimport mock\nimport json\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def get_loader():\n return FileLoader(os.getcwd())", "metadata": "root.get_loader", "header": "['module', '___EOS___']", "index": 9 }, { "content": "def get_git_file(url, refspec = None, sshkey = None, args = None):\n obj = {'url': url}\n\n if refspec:\n obj['refspec'] = refspec\n if sshkey:\n obj['sshkey'] = sshkey\n if args:\n obj['args'] = args\n\n return json.dumps(obj)", "metadata": "root.get_git_file", "header": "['module', '___EOS___']", "index": 12 }, { "content": "@pytest.mark.timeout(10)\ndef test_basic(tmpdir):\n tmpdir = str(tmpdir)\n\n abs_source = os.path.join(tmpdir, 'deploy~git')\n with open(abs_source, 'w') as gfile:\n gfile.write(get_git_file('https://github.com/cxxr/test-git-repo.git'))\n\n dest = os.path.join(tmpdir, 'dest-dir')\n\n finalfile = ext_git(abs_source, dest, {}, get_loader(), {})\n\n assert os.path.exists(finalfile)\n assert os.path.exists(os.path.join(finalfile, '.git'))\n assert os.path.exists(os.path.join(finalfile, '.git', 'config'))\n assert os.path.exists(os.path.join(finalfile, 'install'))", "metadata": "root.test_basic", "header": "['module', '___EOS___']", "index": 24 }, { "content": "@pytest.mark.timeout(10)\ndef test_refspec(tmpdir):\n tmpdir = str(tmpdir)\n\n abs_source = os.path.join(tmpdir, 'deploy~git')\n with open(abs_source, 'w') as gfile:\n gfile.write(get_git_file('https://github.com/cxxr/test-git-repo.git',\n '@version', None, '--depth=3 --origin=github'))\n\n dest = os.path.join(tmpdir, 'dest-dir')\n\n finalfile = ext_git(abs_source, dest, {'version':'a057eb0faaa8'}, get_loader(), {})\n\n assert os.path.exists(finalfile)\n assert os.path.exists(os.path.join(finalfile, '.git'))\n\n # make sure that --origin=github was applied\n with open(os.path.join(finalfile, '.git', 'config')) as cfile:\n assert 'remote \"github\"' in cfile.read()\n\n install_file = os.path.join(finalfile, 'install')\n assert os.path.exists(install_file)\n\n with open(install_file) as ifile:\n assert ifile.read().strip() == 'echo \"Success\"'", "metadata": "root.test_refspec", "header": "['module', '___EOS___']", "index": 41 }, { "content": "@pytest.mark.timeout(10)\[email protected](\"ssh_command\", [None, \"fake_ssh_command\"])\ndef test_sshkey(tmpdir,ssh_command):\n tmpdir = str(tmpdir)\n\n test_path = os.path.dirname(os.path.realpath(__file__))\n\n with open(os.path.join(test_path, 'private_key')) as k:\n private_key = k.read()\n\n abs_source = os.path.join(tmpdir, 'deploy~git')\n dest = os.path.join(tmpdir, 'dest-dir')\n\n # Patch check_call so we don't actually call git\n with mock.patch('subprocess.check_call') as submock:\n # Patch git.Repo as there's no git repository made\n with mock.patch('git.Repo') as gitmock:\n # We need a side effect to see if the env variable is being set\n def check_environ(*args):\n if ssh_command:\n with open(os.environ['GIT_SSH']) as gitfile:\n assert ssh_command in gitfile.read()\n\n # Apply the side effect\n submock.check_call.side_effect = check_environ\n\n # Since this is mocked, it won't actually be hit\n url = '[email protected]:squadron/test-repo.git'\n version = 'a057eb0faaa8'\n with open(abs_source, 'w') as gfile:\n gfile.write(get_git_file(url, '@version', 'filename', '--depth=1'))\n\n dest = os.path.join(tmpdir, 'dest-dir2')\n\n # If we have a special ssh_command to use, use it\n if ssh_command:\n os.environ['GIT_SSH'] = ssh_command\n\n finalfile = ext_git(abs_source, dest, {'version':version}, get_loader(),\n {'filename': lambda: private_key})\n\n # This is the exact command we expect to subprocess\n expected_sub_calls = [mock.call('git clone --depth=1 -- {} {} '.format(url, finalfile).split())]\n # First we make the git.Repo on the destination file, and then we\n # call checkout on the specific version provided\n expected_git_calls = [mock.call(finalfile), mock.call().git.checkout(version)]\n\n assert expected_sub_calls == submock.mock_calls\n assert expected_git_calls == gitmock.mock_calls\n\n # Make sure the environment was set up properly\n if ssh_command:\n assert 'GIT_SSH' in os.environ\n assert os.environ['GIT_SSH'] == ssh_command\n else:\n assert 'GIT_SSH' not in os.environ", "metadata": "root.test_sshkey", "header": "['module', '___EOS___']", "index": 67 } ]
[ { "span": "import squadron", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 }, { "span": "import git", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 10 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "squa", "dro", "n_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "squa", "dro", "n_", "._", "ext", "handlers_", "._", "make", "git_", "import_", "ext", "\\u", "git_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "qui", "k_", "import_", "File", "Loader_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pytest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "git_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "mock_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get", "\\u", "loader_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "File", "Loader_", "(_", "os_", "._", "getcwd_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "git", "\\u", "file_", "(_", "url_", ",_", "refs", "pec_", "=_", "None_", ",_", "ssh", "key_", "=_", "None_", ",_", "args_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "obj_", "=_", "{_", "'", "url", "'_", ":_", "url_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "refs", "pec_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "obj_", "[_", "'", "refs", "pec", "'_", "]_", "=_", "refs", "pec_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "ssh", "key_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "obj_", "[_", "'", "ssh", "key", "'_", "]_", "=_", "ssh", "key_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "args_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "obj_", "[_", "'", "args", "'_", "]_", "=_", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "json_", "._", "dumps_", "(_", "obj_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "pytest_", "._", "mark_", "._", "timeout_", "(_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "basic_", "(_", "tmpdir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tmpdir_", "=_", "str_", "(_", "tmpdir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "abs", "\\u", "source_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "deploy", "~", "git", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "open_", "(_", "abs", "\\u", "source_", ",_", "'", "w", "'_", ")_", "as_", "gfile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gfile_", "._", "write_", "(_", "get", "\\u", "git", "\\u", "file_", "(_", "'", "https", "://", "git", "hub", ".", "com", "/", "cxx", "r", "/", "test", "-", "git", "-", "repo", ".", "git", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "dest_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "dest", "-", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "final", "file_", "=_", "ext", "\\u", "git_", "(_", "abs", "\\u", "source_", ",_", "dest_", ",_", "{_", "}_", ",_", "get", "\\u", "loader_", "(_", ")_", ",_", "{_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "final", "file_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'.", "git", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'.", "git", "'_", ",_", "'", "config", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'", "install", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "pytest_", "._", "mark_", "._", "timeout_", "(_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "refs", "pec_", "(_", "tmpdir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tmpdir_", "=_", "str_", "(_", "tmpdir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "abs", "\\u", "source_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "deploy", "~", "git", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "open_", "(_", "abs", "\\u", "source_", ",_", "'", "w", "'_", ")_", "as_", "gfile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gfile_", "._", "write_", "(_", "get", "\\u", "git", "\\u", "file_", "(_", "'", "https", "://", "git", "hub", ".", "com", "/", "cxx", "r", "/", "test", "-", "git", "-", "repo", ".", "git", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'@", "version", "'_", ",_", "None_", ",_", "'--", "depth", "=", "3", " ", "--", "orig", "in", "=", "git", "hub", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "dest_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "dest", "-", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "final", "file_", "=_", "ext", "\\u", "git_", "(_", "abs", "\\u", "source_", ",_", "dest_", ",_", "{_", "'", "version", "'_", ":_", "'", "a0", "5", "7e", "b0", "fa", "aa", "8", "'_", "}_", ",_", "get", "\\u", "loader_", "(_", ")_", ",_", "{_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "final", "file_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'.", "git", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "make", " ", "sure", " ", "tha", "t", " ", "--", "orig", "in", "=", "git", "hub", " ", "was", " ", "applied", "_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "open_", "(_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'.", "git", "'_", ",_", "'", "config", "'_", ")_", ")_", "as_", "cfile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "'", "remote", " ", "\"", "git", "hub", "\"'_", "in_", "cfile_", "._", "read_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "install", "\\u", "file_", "=_", "os_", "._", "path_", "._", "join_", "(_", "final", "file_", ",_", "'", "install", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "path_", "._", "exists_", "(_", "install", "\\u", "file_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "open_", "(_", "install", "\\u", "file_", ")_", "as_", "ifile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "ifile_", "._", "read_", "(_", ")_", "._", "strip_", "(_", ")_", "==_", "'", "echo", " ", "\"", "Success", "\"'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "pytest_", "._", "mark_", "._", "timeout_", "(_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "pytest_", "._", "mark_", "._", "parametrize_", "(_", "\"", "ssh", "\\u", "command", "\"_", ",_", "[_", "None_", ",_", "\"", "fake", "\\u", "ssh", "\\u", "command", "\"_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "ssh", "key_", "(_", "tmpdir_", ",_", "ssh", "\\u", "command_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tmpdir_", "=_", "str_", "(_", "tmpdir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "test\\u", "path_", "=_", "os_", "._", "path_", "._", "dirname_", "(_", "os_", "._", "path_", "._", "realpath_", "(_", "\\u\\u", "file\\u\\u_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "open_", "(_", "os_", "._", "path_", "._", "join_", "(_", "test\\u", "path_", ",_", "'", "private", "\\u", "key", "'_", ")_", ")_", "as_", "k_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "private", "\\u", "key_", "=_", "k_", "._", "read_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "abs", "\\u", "source_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "deploy", "~", "git", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dest_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "dest", "-", "dir", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Pat", "ch", " ", "check", "\\u", "call", " ", "so", " ", "we", " ", "don", "'", "t", " ", "actual", "ly", " ", "call", " ", "git_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "mock_", "._", "patch_", "(_", "'", "subproc", "ess", ".", "check", "\\u", "call", "'_", ")_", "as_", "subm", "ock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Pat", "ch", " ", "git", ".", "Rep", "o", " ", "as", " ", "there", "'", "s", " ", "no", " ", "git", " ", "repos", "itor", "y", " ", "made", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "mock_", "._", "patch_", "(_", "'", "git", ".", "Rep", "o", "'_", ")_", "as_", "git", "mock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "We", " ", "need", " ", "a", " ", "side", " ", "effect", " ", "to", " ", "see", " ", "if", " ", "the", " ", "env", " ", "variab", "le", " ", "is", " ", "bei", "ng", " ", "set_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "check", "\\u", "environ_", "(_", "*_", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "ssh", "\\u", "command_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "with_", "open_", "(_", "os_", "._", "environ_", "[_", "'", "GIT", "\\u", "SSH", "'_", "]_", ")_", "as_", "git", "file_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "assert_", "ssh", "\\u", "command_", "in_", "git", "file_", "._", "read_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Apply", " ", "the", " ", "side", " ", "effect_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "subm", "ock_", "._", "check", "\\u", "call_", "._", "side", "\\u", "effect_", "=_", "check", "\\u", "environ_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sin", "ce", " ", "this", " ", "is", " ", "mocked", ",", " ", "it", " ", "won", "'", "t", " ", "actual", "ly", " ", "be", " ", "hit_", "\\u\\u\\uNL\\u\\u\\u_", "url_", "=_", "'", "git", "@", "example", ".", "org", ":", "squa", "dro", "n", "/", "test", "-", "repo", ".", "git", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "version_", "=_", "'", "a0", "5", "7e", "b0", "fa", "aa", "8", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "open_", "(_", "abs", "\\u", "source_", ",_", "'", "w", "'_", ")_", "as_", "gfile_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gfile_", "._", "write_", "(_", "get", "\\u", "git", "\\u", "file_", "(_", "url_", ",_", "'@", "version", "'_", ",_", "'", "filename", "'_", ",_", "'--", "depth", "=", "1", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "dest_", "=_", "os_", "._", "path_", "._", "join_", "(_", "tmpdir_", ",_", "'", "dest", "-", "dir", "2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "we", " ", "have", " ", "a", " ", "special", " ", "ssh", "\\u", "command", " ", "to", " ", "use", ",", " ", "use", " ", "it_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ssh", "\\u", "command_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "os_", "._", "environ_", "[_", "'", "GIT", "\\u", "SSH", "'_", "]_", "=_", "ssh", "\\u", "command_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "final", "file_", "=_", "ext", "\\u", "git_", "(_", "abs", "\\u", "source_", ",_", "dest_", ",_", "{_", "'", "version", "'_", ":_", "version_", "}_", ",_", "get", "\\u", "loader_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "filename", "'_", ":_", "lambda_", ":_", "private", "\\u", "key_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "is", " ", "the", " ", "exact", " ", "command", " ", "we", " ", "expect", " ", "to", " ", "subprocess_", "\\u\\u\\uNL\\u\\u\\u_", "expected", "\\u", "sub\\u", "calls_", "=_", "[_", "mock_", "._", "call_", "(_", "'", "git", " ", "clone", " ", "--", "depth", "=", "1", " ", "--", " ", "{}", " ", "{}", " ", "'_", "._", "format_", "(_", "url_", ",_", "final", "file_", ")_", "._", "split_", "(_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Fi", "rst", " ", "we", " ", "make", " ", "the", " ", "git", ".", "Rep", "o", " ", "on", " ", "the", " ", "destinat", "ion", " ", "file", ",", " ", "and", " ", "then", " ", "we", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "call", " ", "check", "out", " ", "on", " ", "the", " ", "specific", " ", "version", " ", "provided", "_", "\\u\\u\\uNL\\u\\u\\u_", "expected", "\\u", "git", "\\u", "calls_", "=_", "[_", "mock_", "._", "call_", "(_", "final", "file_", ")_", ",_", "mock_", "._", "call_", "(_", ")_", "._", "git_", "._", "checkout_", "(_", "version_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "expected", "\\u", "sub\\u", "calls_", "==_", "subm", "ock_", "._", "mock", "\\u", "calls_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "expected", "\\u", "git", "\\u", "calls_", "==_", "git", "mock_", "._", "mock", "\\u", "calls_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Make", " ", "sure", " ", "the", " ", "environ", "ment", " ", "was", " ", "set", " ", "up", " ", "proper", "ly_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "ssh", "\\u", "command_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "'", "GIT", "\\u", "SSH", "'_", "in_", "os_", "._", "environ_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "os_", "._", "environ_", "[_", "'", "GIT", "\\u", "SSH", "'_", "]_", "==_", "ssh", "\\u", "command_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "'", "GIT", "\\u", "SSH", "'_", "not_", "in_", "os_", "._", "environ_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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defined multiple times
tanghaibao/jcvi/apps/blastplus.py
[ { "content": "def main():\n \"\"\"\n %prog database.fa query.fa [options]\n\n Wrapper for NCBI BLAST+.\n \"\"\"\n p = OptionParser(main.__doc__)\n\n p.add_option(\"--format\", default=\" \\'6 qseqid sseqid pident length \" \\\n \"mismatch gapopen qstart qend sstart send evalue bitscore\\' \",\n help=\"0-11, learn more with \\\"blastp -help\\\". [default: %default]\")\n p.add_option(\"--path\", dest=\"blast_path\", default=None,\n help=\"specify BLAST+ path including the program name\")\n p.add_option(\"--prog\", dest=\"blast_program\", default=\"blastp\",\n help=\"specify BLAST+ program to use. See complete list here: \" \\\n \"http://www.ncbi.nlm.nih.gov/books/NBK52640/#chapter1.Installation\"\n \" [default: %default]\")\n p.set_align(evalue=.01)\n p.add_option(\"--best\", default=1, type=\"int\",\n help=\"Only look for best N hits [default: %default]\")\n p.set_cpus()\n p.add_option(\"--nprocs\", default=1, type=\"int\",\n help=\"number of BLAST processes to run in parallel. \" + \\\n \"split query.fa into `nprocs` chunks, \" + \\\n \"each chunk uses -num_threads=`cpus`\")\n p.set_params()\n p.set_outfile()\n opts, args = p.parse_args()\n\n if len(args) != 2 or opts.blast_program is None:\n sys.exit(not p.print_help())\n\n bfasta_fn, afasta_fn = args\n for fn in (afasta_fn, bfasta_fn):\n assert op.exists(fn)\n\n afasta_fn = op.abspath(afasta_fn)\n bfasta_fn = op.abspath(bfasta_fn)\n out_fh = must_open(opts.outfile, \"w\")\n\n extra = opts.extra\n blast_path = opts.blast_path\n blast_program = opts.blast_program\n\n blast_bin = blast_path or blast_program\n if op.basename(blast_bin) != blast_program:\n blast_bin = op.join(blast_bin, blast_program)\n\n nprocs, cpus = opts.nprocs, opts.cpus\n if nprocs > 1:\n logging.debug(\"Dispatch job to %d processes\" % nprocs)\n outdir = \"outdir\"\n fs = split([afasta_fn, outdir, str(nprocs)])\n queries = fs.names\n else:\n queries = [afasta_fn]\n\n dbtype = \"prot\" if op.basename(blast_bin) in (\"blastp\", \"blastx\") \\\n else \"nucl\"\n\n db = bfasta_fn\n if dbtype == \"prot\":\n nin = db + \".pin\"\n else:\n nin = db + \".nin\"\n nin00 = db + \".00.nin\"\n nin = nin00 if op.exists(nin00) else (db + \".nin\")\n\n run_formatdb(infile=db, outfile=nin, dbtype=dbtype)\n\n lock = Lock()\n\n blastplus_template = \"{0} -db {1} -outfmt {2}\"\n blast_cmd = blastplus_template.format(blast_bin, bfasta_fn, opts.format)\n blast_cmd += \" -evalue {0} -max_target_seqs {1}\".\\\n format(opts.evalue, opts.best)\n blast_cmd += \" -num_threads {0}\".format(cpus)\n if extra:\n blast_cmd += \" \" + extra.strip()\n\n args = [(out_fh, blast_cmd, query, lock) for query in queries]\n g = Jobs(target=blastplus, args=args)\n g.run()", "metadata": "root.main", "header": "['module', '___EOS___']", "index": 30 } ]
[ { "span": "nin ", "start_line": 94, "start_column": 8, "end_line": 94, "end_column": 11 } ]
[ { "span": "nin ", "start_line": 96, "start_column": 8, "end_line": 96, "end_column": 11 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "main_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "%", "prog", " ", "databa", "se", ".", "fa", " ", "query", ".", "fa", " ", "[", "options", "]", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Wrapper", " ", "for", " ", "NCB", "I", " ", "BLAS", "T", "+.", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Optio", "n", "Parser_", "(_", "main_", "._", "\\u\\u", "doc\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "p_", "._", "add", "\\u", "option_", "(_", "\"--", "format", "\"_", ",_", "default_", "=_", "\"", " ", "\\\\'", "6", " ", "qse", "qid", " ", "sse", "qid", " ", "pid", "ent", " ", "length", " ", "\"_", "\"", "mism", "atch", " ", "gap", "open", " ", "qst", "art", " ", "qe", "nd", " ", "ssta", "rt", " ", "send", " ", "evalue", " ", "bits", "core", "\\\\'", " ", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "help_", "=_", "\"", "0", "-1", "1", ",", " ", "learn", " ", "more", " ", "with", " ", "\\\\\"", "blast", "p", " ", "-", "help", "\\\\\".", " ", "[", "default", ":", " ", "%", "default", "]\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "add", "\\u", "option_", "(_", "\"--", "path", "\"_", ",_", "dest_", "=_", "\"", "blast", "\\u", "path", "\"_", ",_", "default_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "help_", "=_", "\"", "speci", "fy", " ", "BLAS", "T", "+", " ", "path", " ", "inclu", "ding", " ", "the", " ", "program", " ", "name", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "add", "\\u", "option_", "(_", "\"--", "prog", "\"_", ",_", "dest_", "=_", "\"", "blast", "\\u", "program", "\"_", ",_", "default_", "=_", "\"", "blast", "p", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "help_", "=_", "\"", "speci", "fy", " ", "BLAS", "T", "+", " ", "program", " ", "to", " ", "use", ".", " ", "See", " ", "complete", " ", "list", " ", "here", ":", " ", "\"_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "books", "/", "NB", "K", "526", "40", "/", "#", "chap", "ter", "1", ".", "Install", "ation", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "\"", " ", "[", "default", ":", " ", "%", "default", "]\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "set\\u", "align_", "(_", "evalue", "_", "=_", ".01_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "add", "\\u", "option_", "(_", "\"--", "best", "\"_", ",_", "default_", "=_", "1_", ",_", "type_", "=_", "\"", "int", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "help_", "=_", "\"", "On", "ly", " ", "look", " ", "for", " ", "best", " ", "N", " ", "hits", " ", "[", "default", ":", " ", "%", "default", "]\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "set\\u", "cpus_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "add", "\\u", "option_", "(_", "\"--", "nproc", "s", "\"_", ",_", "default_", "=_", "1_", ",_", "type_", "=_", "\"", "int", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "help_", "=_", "\"", "number", " ", "of", " ", "BLAS", "T", " ", "process", "es", " ", "to", " ", "run", " ", "in", " ", "parall", "el", ".", " ", "\"_", "+_", "\"", "split", " ", "query", ".", "fa", " ", "int", "o", " ", "`", "nproc", "s", "`", " ", "chunks", ",", " ", "\"_", "+_", "\"", "each", " ", "chunk", " ", "use", "s", " ", "-", "num", "\\u", "thread", "s", "=", "`", "cpus", "`\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "set\\u", "params_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "set\\u", "outfile_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "opts_", ",_", "args_", "=_", "p_", "._", "parse", "\\u", "args_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "len_", "(_", "args_", ")_", "!=_", "2_", "or_", "opts_", "._", "blast", "\\u", "program_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "sys_", "._", "exit_", "(_", "not_", "p_", "._", "print", "\\u", "help_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "bf", "asta", "\\u", "fn_", ",_", "afa", "sta", "\\u", "fn_", "=_", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "fn_", "in_", "(_", "afa", "sta", "\\u", "fn_", ",_", "bf", "asta", "\\u", "fn_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "assert_", "op_", "._", "exists_", "(_", "fn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "afa", "sta", "\\u", "fn_", "=_", "op_", "._", "abspath_", "(_", "afa", "sta", "\\u", "fn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "bf", "asta", "\\u", "fn_", "=_", "op_", "._", "abspath_", "(_", "bf", "asta", "\\u", "fn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "out", "\\u", "fh_", "=_", "must", "\\u", "open_", "(_", "opts_", "._", "outfile_", ",_", "\"", "w", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "extra_", "=_", "opts_", "._", "extra_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blast", "\\u", "path_", "=_", "opts_", "._", "blast", "\\u", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blast", "\\u", "program_", "=_", "opts_", "._", "blast", "\\u", "program_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "blast", "\\u", "bin_", "=_", "blast", "\\u", "path_", "or_", "blast", "\\u", "program_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "op_", "._", "basename_", "(_", "blast", "\\u", "bin_", ")_", "!=_", "blast", "\\u", "program_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "blast", "\\u", "bin_", "=_", "op_", "._", "join_", "(_", "blast", "\\u", "bin_", ",_", "blast", "\\u", "program_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "nproc", "s_", ",_", "cpus_", "=_", "opts_", "._", "nproc", "s_", ",_", "opts_", "._", "cpus_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "nproc", "s_", ">_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logging_", "._", "debug_", "(_", "\"", "Dispa", "tch", " ", "job", " ", "to", " ", "%", "d", " ", "process", "es", "\"_", "%_", "nproc", "s_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "outdir_", "=_", "\"", "outd", "ir", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "fs_", "=_", "split_", "(_", "[_", "afa", "sta", "\\u", "fn_", ",_", "outdir_", ",_", "str_", "(_", "nproc", "s_", ")_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "queries_", "=_", "fs_", "._", "names_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "queries_", "=_", "[_", "afa", "sta", "\\u", "fn_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "dbt", "ype_", "=_", "\"", "prot", "\"_", "if_", "op_", "._", "basename_", "(_", "blast", "\\u", "bin_", ")_", "in_", "(_", "\"", "blast", "p", "\"_", ",_", "\"", "blast", "x", "\"_", ")_", "else_", "\"", "nuc", "l", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "db_", "=_", "bf", "asta", "\\u", "fn_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "dbt", "ype_", "==_", "\"", "prot", "\"_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "nin", "_", "=_", "db_", "+_", "\".", "pin", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "nin", "_", "=_", "db_", "+_", "\".", "nin", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nin", "00_", "=_", "db_", "+_", "\".", "00", ".", "nin", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "nin", "_", "=_", "nin", "00_", "if_", "op_", "._", "exists_", "(_", "nin", "00_", ")_", "else_", "(_", "db_", "+_", "\".", "nin", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "run", "\\u", "format", "db_", "(_", "infile_", "=_", "db_", ",_", "outfile_", "=_", "nin", "_", ",_", "dbt", "ype_", "=_", "dbt", "ype_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "lock_", "=_", "Lock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "blast", "plus", "\\u", "template_", "=_", "\"{", "0", "}", " ", "-", "db", " ", "{", "1", "}", " ", "-", "outf", "mt", " ", "{", "2", "}\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blast", "\\u", "cmd_", "=_", "blast", "plus", "\\u", "template_", "._", "format_", "(_", "blast", "\\u", "bin_", ",_", "bf", "asta", "\\u", "fn_", ",_", "opts_", "._", "format_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blast", "\\u", "cmd_", "+=_", "\"", " ", "-", "evalue", " ", "{", "0", "}", " ", "-", "max", "\\u", "target", "\\u", "seqs", " ", "{", "1", "}\"_", "._", "format_", "(_", "opts_", "._", "evalue", "_", ",_", "opts_", "._", "best_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blast", "\\u", "cmd_", "+=_", "\"", " ", "-", "num", "\\u", "thread", "s", " ", "{", "0", "}\"_", "._", "format_", "(_", "cpus_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "extra_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "blast", "\\u", "cmd_", "+=_", "\"", " ", "\"_", "+_", "extra_", "._", "strip_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "args_", "=_", "[_", "(_", "out", "\\u", "fh_", ",_", "blast", "\\u", "cmd_", ",_", "query_", ",_", "lock_", ")_", "for_", "query_", "in_", "queries_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "g_", "=_", "Jobs_", "(_", "target_", "=_", "blast", "plus_", ",_", "args_", "=_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "g_", "._", "run_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2015\n\n@author: kashefy\n'''\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport caffe\nfrom nideep.iow.read_img import read_img_cv2, read_img_PIL\n\nif __name__ == '__main__':\n \n caffe.set_mode_cpu()\n \n # load image, switch to BGR, subtract mean, and make dims C x H x W for Caffe\n path_img = '/home/kashefy/data/VOCdevkit/VOC2012/JPEGImagesX/2008_000015.jpg'\n \n bgr_mean = np.array((104.00698793,116.66876762,122.67891434))\n im = Image.open(path_img)\n in_ = np.array(im, dtype=np.float32)\n in_ = in_[:,:,::-1]\n print in_.shape\n print in_\n in_ -= bgr_mean\n print in_\n in_ = in_.transpose((2,0,1))\n \n in_ = read_img_PIL(path_img, mean=bgr_mean)\n \n print 'in_'\n print in_[0, 0, 0:6]\n print in_[1, 0, 0:6]\n print in_[2, 0, 0:6]\n \n in2 = read_img_cv2(path_img, mean=bgr_mean)\n print in2.shape\n #in2[0, :, :] -= 104.00698793\n #in2[1, :, :] -= 116.66876762\n #in2[2, :, :] -= 122.67891434\n \n print in2[0, 0, 0:6]\n print in2[1, 0, 0:6]\n print in2[2, 0, 0:6]\n \n print np.all(in_ == in2)\n print in_[in_ != in2]\n print in2[in_ != in2]\n return 0\n \n # load net\n path_model = '/home/kashefy/data/models/fcn_segm/fcn-32s-Pascal-context/deploy.prototxt'\n path_weights = '/home/kashefy/data/models/fcn_segm/fcn-32s-Pascal-context/fcn-32s-pascalcontext.caffemodel'\n net = caffe.Net(path_model, path_weights, caffe.TEST)\n # shape for input (data blob is N x C x H x W), set data\n net.blobs['data'].reshape(1, *in_.shape)\n net.blobs['data'].data[...] = in_ \n \n\n \n \n # run net and take argmax for prediction\n# net.forward()\n# out = net.blobs['score'].data[0].argmax(axis=0)\n# \n# \n# print 'data after fwd'\n# print net.blobs['data'].data[net.blobs['data'].data.shape[0]/2-3:net.blobs['data'].data.shape[0]/2+3,\n# net.blobs['data'].data.shape[1]/2-3:net.blobs['data'].data.shape[1]/2+3]\n# \n# print 'out'\n# print out[out.shape[0]/2-3:out.shape[0]/2+3,\n# out.shape[1]/2-3:out.shape[1]/2+3]\n# plt.imshow(out)\n# plt.show()\n \n pass", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "path_model = '/home/kashefy/data/models/fcn_segm/fcn-32s-Pascal-context/deploy.prototxt'", "start_line": 51, "start_column": 4, "end_line": 51, "end_column": 92 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "Ju", "l", " ", "21", ",", " ", "201", "5", "\\", "10", ";", "\\", "10", ";", "@", "author", ":", " ", "kas", "hef", "y", "\\", "10", ";'", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "matplotlib_", "._", "pyplot_", "as_", "plt_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "PIL_", "import_", "Image_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "caffe", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "nid", "eep", "_", "._", "io", "w_", "._", "read", "\\u", "img_", "import_", "read", "\\u", "img", "\\u", "cv2_", ",_", "read", "\\u", "img", "\\u", "PIL_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "caffe", "_", "._", "set\\u", "mode", "\\u", "cpu_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "load", " ", "image", ",", " ", "switch", " ", "to", " ", "BG", "R", ",", " ", "subtract", " ", "mean", ",", " ", "and", " ", "make", " ", "dims", " ", "C", " ", "x", " ", "H", " ", "x", " ", "W", " ", "for", " ", "Ca", "ffe", "_", "\\u\\u\\uNL\\u\\u\\u_", "path", "\\u", "img_", "=_", "'/", "home", "/", "kas", "hef", "y", "/", "data", "/", "VOC", "dev", "kit", "/", "VOC", "2012", "/", "JP", "EG", "Image", "s", "X", "/", "2008", "\\u", "00001", "5", ".", "jp", "g", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "bgr", "\\u", "mean_", "=_", "np_", "._", "array_", "(_", "(_", "104", ".00", "698", "793", "_", ",_", "116", ".6", "687", "676", "2_", ",_", "122.", "678", "914", "34_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "im_", "=_", "Image_", "._", "open_", "(_", "path", "\\u", "img_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "in\\u_", "=_", "np_", "._", "array_", "(_", "im_", ",_", "dtype_", "=_", "np_", "._", "float32_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "in\\u_", "=_", "in\\u_", "[_", ":_", ",_", ":_", ",_", ":_", ":_", "-_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "._", "shape_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "in\\u_", "-=_", "bgr", "\\u", "mean_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "in\\u_", "=_", "in\\u_", "._", "transpose_", "(_", "(_", "2_", ",_", "0_", ",_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "in\\u_", "=_", "read", "\\u", "img", "\\u", "PIL_", "(_", "path", "\\u", "img_", ",_", "mean_", "=_", "bgr", "\\u", "mean_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "'", "in", "\\u'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "[_", "0_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "[_", "1_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "[_", "2_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "in", "2_", "=_", "read", "\\u", "img", "\\u", "cv2_", "(_", "path", "\\u", "img_", ",_", "mean_", "=_", "bgr", "\\u", "mean_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in", "2_", "._", "shape_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "in", "2", "[", "0", ",", " ", ":,", " ", ":]", " ", "-=", " ", "104", ".00", "698", "793", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "in", "2", "[", "1", ",", " ", ":,", " ", ":]", " ", "-=", " ", "116", ".6", "687", "676", "2_", "\\u\\u\\uNL\\u\\u\\u_", "#", "in", "2", "[", "2", ",", " ", ":,", " ", ":]", " ", "-=", " ", "122.", "678", "914", "34_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "in", "2_", "[_", "0_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in", "2_", "[_", "1_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in", "2_", "[_", "2_", ",_", "0_", ",_", "0_", ":_", "6_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "np_", "._", "all_", "(_", "in\\u_", "==_", "in", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in\\u_", "[_", "in\\u_", "!=_", "in", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "in", "2_", "[_", "in\\u_", "!=_", "in", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "load", " ", "net_", "\\u\\u\\uNL\\u\\u\\u_", "path", "\\u", "model_", "=_", "'/", "home", "/", "kas", "hef", "y", "/", "data", "/", "model", "s", "/", "fcn", "\\u", "segm", "/", "fcn", "-", "32", "s", "-", "Pas", "cal", "-", "context", "/", "deploy", ".", "protot", "xt", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "path", "\\u", "weights_", "=_", "'/", "home", "/", "kas", "hef", "y", "/", "data", "/", "model", "s", "/", "fcn", "\\u", "segm", "/", "fcn", "-", "32", "s", "-", "Pas", "cal", "-", "context", "/", "fcn", "-", "32", "s", "-", "pasc", "alc", "onte", "xt", ".", "caffe", "model", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net_", "=_", "caffe", "_", "._", "Net_", "(_", "path", "\\u", "model_", ",_", "path", "\\u", "weights_", ",_", "caffe", "_", "._", "TEST_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "shape", " ", "for", " ", "input", " ", "(", "data", " ", "blob", " ", "is", " ", "N", " ", "x", " ", "C", " ", "x", " ", "H", " ", "x", " ", "W", "),", " ", "set", " ", "data_", "\\u\\u\\uNL\\u\\u\\u_", "net_", "._", "blobs_", "[_", "'", "data", "'_", "]_", "._", "reshape_", "(_", "1_", ",_", "*_", "in\\u_", "._", "shape_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "net_", "._", "blobs_", "[_", "'", "data", "'_", "]_", "._", "data_", "[_", "..._", "]_", "=_", "in\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "run", " ", "net", " ", "and", " ", "take", " ", "argm", "ax", " ", "for", " ", "prediction_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "net", ".", "forward", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "out", " ", "=", " ", "net", ".", "blobs", "['", "score", "']", ".", "data", "[", "0", "].", "argm", "ax", "(", "axis", "=", "0", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "print", " ", "'", "data", " ", "after", " ", "fw", "d", "'_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "print", " ", "net", ".", "blobs", "['", "data", "']", ".", "data", "[", "net", ".", "blobs", "['", "data", "']", ".", "data", ".", "shape", "[", "0", "]/", "2", "-", "3", ":", "net", ".", "blobs", "['", "data", "']", ".", "data", ".", "shape", "[", "0", "]/", "2", "+", "3", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "net", ".", "blobs", "['", "data", "']", ".", "data", ".", "shape", "[", "1", "]/", "2", "-", "3", ":", "net", ".", "blobs", "['", "data", "']", ".", "data", ".", "shape", "[", "1", "]/", "2", "+", "3", "]_", "\\u\\u\\uNL\\u\\u\\u_", "#", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "print", " ", "'", "out", "'_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "print", " ", "out", "[", "out", ".", "shape", "[", "0", "]/", "2", "-", "3", ":", "out", ".", "shape", "[", "0", "]/", "2", "+", "3", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "out", ".", "shape", "[", "1", "]/", "2", "-", "3", ":", "out", ".", "shape", "[", "1", "]/", "2", "+", "3", "]_", "\\u\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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unreachable code
sassoftware/conary/conary_test/cvctest/buildtest/windowsactiontest.py
[ { "content": " def testBasics(self):\n raise testhelp.SkipTestException('need to mock out the windows build service')\n built, d = self.buildRecipe(self.test_recipe1, 'WindowsAppTest', logBuild=True)", "metadata": "root.WindowsActionTest.testBasics", "header": "['class', 'WindowsActionTest', '(', 'rephelp', '.', 'RepositoryHelper', ')', ':', '___EOS___']", "index": 322 }, { "content": " def testWebApp(self):\n raise testhelp.SkipTestException('need to mock out the windows build service')\n built, d = self.buildRecipe(self.test_recipe2, 'WindowsAppTest', logBuild=True)", "metadata": "root.WindowsActionTest.testWebApp", "header": "['class', 'WindowsActionTest', '(', 'rephelp', '.', 'RepositoryHelper', ')', ':', '___EOS___']", "index": 326 } ]
[ { "span": "built, d = self.buildRecipe(self.test_recipe1, 'WindowsAppTest', logBuild=True)", "start_line": 324, "start_column": 8, "end_line": 324, "end_column": 87 }, { "span": "built, d = self.buildRecipe(self.test_recipe2, 'WindowsAppTest', logBuild=True)", "start_line": 328, "start_column": 8, "end_line": 328, "end_column": 87 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "Window", "s", "Action", "Test_", "(_", "rep", "help_", "._", "Repos", "itor", "y", "Helper_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Basic", "s_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "testh", "elp", "_", "._", "Ski", "p", "Test", "Exception_", "(_", "'", "need", " ", "to", " ", "mock", " ", "out", " ", "the", " ", "windows", " ", "build", " ", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "built_", ",_", "d_", "=_", "self_", "._", "build", "Recipe_", "(_", "self_", "._", "test\\u", "recip", "e1_", ",_", "'", "Window", "s", "App", "Test", "'_", ",_", "log", "Build_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Window", "s", "Action", "Test_", "(_", "rep", "help_", "._", "Repos", "itor", "y", "Helper_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Web", "App_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "testh", "elp", "_", "._", "Ski", "p", "Test", "Exception_", "(_", "'", "need", " ", "to", " ", "mock", " ", "out", " ", "the", " ", "windows", " ", "build", " ", "service", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "built_", ",_", "d_", "=_", "self_", "._", "build", "Recipe_", "(_", "self_", "._", "test\\u", "recip", "e2_", ",_", "'", "Window", "s", "App", "Test", "'_", ",_", "log", "Build_", "=_", "True_", ")_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
Conflicting attributes in base classes
openstack/horizon/openstack_dashboard/test/integration_tests/regions/forms.py
[ { "content": "@six.add_metaclass(MetaBaseFormFieldRegion)\nclass BaseFormFieldRegion(baseregion.BaseRegion):\n \"\"\"Base class for form fields classes.\"\"\"\n\n _label_locator = None\n _element_locator = None\n\n\n\n\n", "metadata": "root.BaseFormFieldRegion", "header": "['module', '___EOS___']", "index": 59 }, { "content": " @property\n def label(self):\n return self._get_element(*self._label_locator)", "metadata": "root.BaseFormFieldRegion.label", "header": "['class', 'BaseFormFieldRegion', '(', 'baseregion', '.', 'BaseRegion', ')', ':', '___EOS___']", "index": 66 }, { "content": " @property\n def element(self):\n return self.src_elem", "metadata": "root.BaseFormFieldRegion.element", "header": "['class', 'BaseFormFieldRegion', '(', 'baseregion', '.', 'BaseRegion', ')', ':', '___EOS___']", "index": 70 }, { "content": " @property\n def name(self):\n return self.element.get_attribute('name')", "metadata": "root.BaseFormFieldRegion.name", "header": "['class', 'BaseFormFieldRegion', '(', 'baseregion', '.', 'BaseRegion', ')', ':', '___EOS___']", "index": 74 }, { "content": " def is_required(self):\n classes = self.driver.get_attribute('class')\n return 'required' in classes", "metadata": "root.BaseFormFieldRegion.is_required", "header": "['class', 'BaseFormFieldRegion', '(', 'baseregion', '.', 'BaseRegion', ')', ':', '___EOS___']", "index": 78 }, { "content": " def is_displayed(self):\n return self.element.is_displayed()", "metadata": "root.BaseFormFieldRegion.is_displayed", "header": "['class', 'BaseFormFieldRegion', '(', 'baseregion', '.', 'BaseRegion', ')', ':', '___EOS___']", "index": 82 }, { "content": "class CheckBoxMixin(object):\n\n\n\n", "metadata": "root.CheckBoxMixin", "header": "['module', '___EOS___']", "index": 86 }, { "content": " @property\n def label(self):\n id_attribute = self.element.get_attribute('id')\n return self.element.find_element(\n by.By.XPATH, '../..//label[@for=\"{}\"]'.format(id_attribute))", "metadata": "root.CheckBoxMixin.label", "header": "['class', 'CheckBoxMixin', '(', 'object', ')', ':', '___EOS___']", "index": 88 }, { "content": " def is_marked(self):\n return self.element.is_selected()", "metadata": "root.CheckBoxMixin.is_marked", "header": "['class', 'CheckBoxMixin', '(', 'object', ')', ':', '___EOS___']", "index": 94 }, { "content": " def mark(self):\n if not self.is_marked():\n self.label.click()", "metadata": "root.CheckBoxMixin.mark", "header": "['class', 'CheckBoxMixin', '(', 'object', ')', ':', '___EOS___']", "index": 97 }, { "content": " def unmark(self):\n if self.is_marked():\n self.label.click()", "metadata": "root.CheckBoxMixin.unmark", "header": "['class', 'CheckBoxMixin', '(', 'object', ')', ':', '___EOS___']", "index": 101 }, { "content": "class CheckBoxFormFieldRegion(CheckBoxMixin, BaseFormFieldRegion):\n \"\"\"Checkbox field.\"\"\"\n\n _element_locator_str_suffix = 'input[type=checkbox]'", "metadata": "root.CheckBoxFormFieldRegion", "header": "['module', '___EOS___']", "index": 106 } ]
[ { "span": "class CheckBoxFormFieldRegion(CheckBoxMixin, BaseFormFieldRegion):", "start_line": 106, "start_column": 0, "end_line": 106, "end_column": 66 } ]
[ { "span": "property", "start_line": 66, "start_column": 5, "end_line": 66, "end_column": 13 }, { "span": "property", "start_line": 88, "start_column": 5, "end_line": 88, "end_column": 13 } ]
1
false
[ "[CLS]_", "Confl", "ict", "ing_", "attributes_", "in_", "base_", "classes_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "six_", "._", "add", "\\u", "metaclass_", "(_", "Meta", "Base", "Form", "Field", "Region_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Base", " ", "class", " ", "for", " ", "form", " ", "fields", " ", "classe", "s", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "label", "\\u", "locator_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "element", "\\u", "locator_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "label_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "\\u", "get", "\\u", "element_", "(_", "*_", "self_", "._", "\\u", "label", "\\u", "locator_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "element_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "src", "\\u", "elem_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "name_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "element_", "._", "get", "\\u", "attribute_", "(_", "'", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "\\u", "required_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "classes_", "=_", "self_", "._", "driver_", "._", "get", "\\u", "attribute_", "(_", "'", "class", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "'", "require", "d", "'_", "in_", "classes_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Base", "Form", "Field", "Region_", "(_", "base", "region_", "._", "Base", "Region_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "\\u", "displayed_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "element_", "._", "is", "\\u", "displayed_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Check", "Box", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Check", "Box", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "@_", "property_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "label_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id", "\\u", "attribute_", "=_", "self_", "._", "element_", "._", "get", "\\u", "attribute_", "(_", "'", "id", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "element_", "._", "find", "\\u", "element_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "by_", "._", "By_", "._", "XPATH_", ",_", "'../../", "/", "label", "[", "@", "for", "=\"{}\"", "]'_", "._", "format_", "(_", "id", "\\u", "attribute_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Check", "Box", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "\\u", "marked", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "element_", "._", "is", "\\u", "selected_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Check", "Box", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "mark_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "self_", "._", "is", "\\u", "marked", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "label_", "._", "click_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Check", "Box", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "unma", "rk_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "is", "\\u", "marked", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "label_", "._", "click_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Check", "Box", "Form", "Field", "Region_", "(_", "Check", "Box", "Mixin_", ",_", "Base", "Form", "Field", "Region_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Checkb", "ox", " ", "field", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "element", "\\u", "locator", "\\u", "str", "\\u", "suffix_", "=_", "'", "input", "[", "type", "=", "checkb", "ox", "]'_", "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 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Imprecise assert
meejah/txtorcon/test/test_router.py
[ { "content": " def test_policy_error(self):\n router = Router(object())\n try:\n router.policy = 'foo 123'\n self.fail()\n except Exception, e:\n self.assertTrue(\"Don't understand\" in str(e))", "metadata": "root.RouterTests.test_policy_error", "header": "['class', 'RouterTests', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 145 }, { "content": " def test_policy_not_set_error(self):\n router = Router(object())\n try:\n router.accepts_port(123)\n self.fail()\n except Exception, e:\n self.assertTrue(\"policy\" in str(e))", "metadata": "root.RouterTests.test_policy_not_set_error", "header": "['class', 'RouterTests', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 153 } ]
[ { "span": "self.assertTrue(\"Don't understand\" in str(e))", "start_line": 151, "start_column": 12, "end_line": 151, "end_column": 57 }, { "span": "self.assertTrue(\"policy\" in str(e))", "start_line": 159, "start_column": 12, "end_line": 159, "end_column": 47 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Route", "r", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "policy", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "router_", "=_", "Router_", "(_", "object_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "router_", "._", "policy_", "=_", "'", "foo", " ", "123", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "\"", "Don", "'", "t", " ", "underst", "and", "\"_", "in_", "str_", "(_", "e_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Route", "r", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "policy", "\\u", "not", "\\u", "set\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "router_", "=_", "Router_", "(_", "object_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "router_", "._", "accepts", "\\u", "port_", "(_", "123_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "fail_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "True_", "(_", "\"", "policy", "\"_", "in_", "str_", "(_", "e_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 ]
Unused import
migurski/DEM-Tools/Hillup/data/SRTM1.py
[ { "content": "\"\"\" Starting point for DEM retrieval utilities.\n\"\"\"\nfrom sys import stderr\nfrom math import floor, log\nfrom os import unlink, close, write, chmod, makedirs\nfrom os.path import basename, exists, isdir, join\nfrom httplib import HTTPConnection\nfrom urlparse import urlparse\nfrom tempfile import mkstemp\nfrom zipfile import ZipFile\nfrom hashlib import md5\n\nfrom TileStache.Geography import SphericalMercator\n\nfrom osgeo import gdal, osr\n\nideal_zoom = 13 ## log(3600*360 / 256) / log(2) # ~12.3\n\nosr.UseExceptions() # <-- otherwise errors will be silent and useless.\n\nsref = osr.SpatialReference()\nsref.ImportFromProj4('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs')\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def region(lat, lon):\n \"\"\" Return the SRTM1 region number of a given lat, lon.\n \n Map of regions:\n http://dds.cr.usgs.gov/srtm/version2_1/SRTM1/Region_definition.jpg\n \"\"\"\n if 38 <= lat and lat < 50 and -125 <= lon and lon < -111:\n return 1\n \n if 38 <= lat and lat < 50 and -111 <= lon and lon < -97:\n return 2\n \n if 38 <= lat and lat < 50 and -97 <= lon and lon < -83:\n return 3\n \n if 28 <= lat and lat < 38 and -123 <= lon and lon < -100:\n return 4\n \n if 25 <= lat and lat < 38 and -100 <= lon and lon < -83:\n return 5\n \n if 17 <= lat and lat < 48 and -83 <= lon and lon < -64:\n return 6\n \n if -15 <= lat and lat < 60 and ((172 <= lon and lon < 180) or (-180 <= lon and lon < -129)):\n return 7\n \n raise ValueError('Unknown location: %s, %s' % (lat, lon))", "metadata": "root.region", "header": "['module', '___EOS___']", "index": 23 }, { "content": "def quads(minlon, minlat, maxlon, maxlat):\n \"\"\" Generate a list of southwest (lon, lat) for 1-degree quads of SRTM1 data.\n \"\"\"\n lon = floor(minlon)\n while lon <= maxlon:\n \n lat = floor(minlat)\n while lat <= maxlat:\n \n yield lon, lat\n \n lat += 1\n \n lon += 1", "metadata": "root.quads", "header": "['module', '___EOS___']", "index": 52 }, { "content": "def datasource(lat, lon, source_dir):\n \"\"\" Return a gdal datasource for an SRTM1 lat, lon corner.\n \n If it doesn't already exist locally in source_dir, grab a new one.\n \"\"\"\n #\n # Create a URL\n #\n try:\n reg = region(lat, lon)\n except ValueError:\n # we're probably outside a known region\n return None\n\n # FIXME for western / southern hemispheres\n fmt = 'http://dds.cr.usgs.gov/srtm/version2_1/SRTM1/Region_%02d/N%02dW%03d.hgt.zip'\n url = fmt % (reg, abs(lat), abs(lon))\n \n #\n # Create a local filepath\n #\n s, host, path, p, q, f = urlparse(url)\n \n dem_dir = md5(url).hexdigest()[:3]\n dem_dir = join(source_dir, dem_dir)\n \n dem_path = join(dem_dir, basename(path)[:-4])\n dem_none = dem_path[:-4]+'.404'\n \n #\n # Check if the file exists locally\n #\n if exists(dem_path):\n return gdal.Open(dem_path, gdal.GA_ReadOnly)\n\n if exists(dem_none):\n return None\n\n if not exists(dem_dir):\n makedirs(dem_dir)\n chmod(dem_dir, 0777)\n \n assert isdir(dem_dir)\n \n #\n # Grab a fresh remote copy\n #\n print >> stderr, 'Retrieving', url, 'in DEM.SRTM1.datasource().'\n \n conn = HTTPConnection(host, 80)\n conn.request('GET', path)\n resp = conn.getresponse()\n \n if resp.status == 404:\n # we're probably outside the coverage area\n print >> open(dem_none, 'w'), url\n return None\n \n assert resp.status == 200, (resp.status, resp.read())\n \n try:\n #\n # Get the DEM out of the zip file\n #\n handle, zip_path = mkstemp(prefix='srtm1-', suffix='.zip')\n write(handle, resp.read())\n close(handle)\n \n zipfile = ZipFile(zip_path, 'r')\n \n #\n # Write the actual DEM\n #\n dem_file = open(dem_path, 'w')\n dem_file.write(zipfile.read(zipfile.namelist()[0]))\n dem_file.close()\n \n chmod(dem_path, 0666)\n \n finally:\n unlink(zip_path)\n\n #\n # The file better exist locally now\n #\n return gdal.Open(dem_path, gdal.GA_ReadOnly)", "metadata": "root.datasource", "header": "['module', '___EOS___']", "index": 67 }, { "content": "def datasources(minlon, minlat, maxlon, maxlat, source_dir):\n \"\"\" Retrieve a list of SRTM1 datasources overlapping the tile coordinate.\n \"\"\"\n lonlats = quads(minlon, minlat, maxlon, maxlat)\n sources = [datasource(lat, lon, source_dir) for (lon, lat) in lonlats]\n return [ds for ds in sources if ds]", "metadata": "root.datasources", "header": "['module', '___EOS___']", "index": 154 } ]
[ { "span": "from math import floor, log", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 27 }, { "span": "from TileStache.Geography import SphericalMercator", "start_line": 12, "start_column": 0, "end_line": 12, "end_column": 50 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", " ", "Start", "ing", " ", "point", " ", "for", " ", "DEM", " ", "retrie", "val", " ", "util", "iti", "es", ".", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "sys_", "import_", "stderr_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "math_", "import_", "floor_", ",_", "log_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "os_", "import_", "unlink_", ",_", "close_", ",_", "write_", ",_", "chmod_", ",_", "makedirs_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "os_", "._", "path_", "import_", "basename_", ",_", "exists_", ",_", "isdir_", ",_", "join_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "httplib_", "import_", "HTTP", "Connection_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "urlparse_", "import_", "urlparse_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "tempfile_", "import_", "mkstemp_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "zipfile_", "import_", "Zip", "File_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "hashlib_", "import_", "md5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "Til", "e", "Sta", "che_", "._", "Geo", "graphy_", "import_", "Sph", "eric", "al", "Merc", "ator_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "osg", "eo_", "import_", "gdal_", ",_", "osr", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ideal", "\\u", "zoom_", "=_", "13_", "##", " ", "log", "(", "3600", "*", "360", " ", "/", " ", "256", ")", " ", "/", " ", "log", "(", "2", ")", " ", "#", " ", "~", "12.3", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "osr", "_", "._", "Us", "e", "Exceptions_", "(_", ")_", "#", " ", "<-", "-", " ", "other", "wis", "e", " ", "error", "s", " ", "will", " ", "be", " ", "sile", "nt", " ", "and", " ", "usel", "ess", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "sre", "f_", "=_", "osr", "_", "._", "Spa", "tial", "Reference_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sre", "f_", "._", "Import", "Fro", "m", "Proj", "4_", "(_", "'+", "proj", "=", "long", "lat", " ", "+", "ell", "ps", "=", "WG", "S", "84", " ", "+", "dat", "um", "=", "WG", "S", "84", " ", "+", "no", "\\u", "def", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "region_", "(_", "lat_", ",_", "lon_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Return", " ", "the", " ", "SR", "TM", "1", " ", "region", " ", "number", " ", "of", " ", "a", " ", "give", "n", " ", "lat", ",", " ", "lon", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "Map", " ", "of", " ", "regions", ":", "\\", "10", ";", " ", " ", " ", " ", "http", "://", "dds", ".", "cr", ".", "us", "gs", ".", "gov", "/", "srt", "m", "/", "version", "2", "\\u", "1", "/", "SR", "TM", "1", "/", "Region", "\\u", "definit", "ion", ".", "jp", "g", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "38_", "<=_", "lat_", "and_", "lat_", "<_", "50_", "and_", "-_", "125_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "111_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "38_", "<=_", "lat_", "and_", "lat_", "<_", "50_", "and_", "-_", "111_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "97_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "38_", "<=_", "lat_", "and_", "lat_", "<_", "50_", "and_", "-_", "97_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "83_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "28_", "<=_", "lat_", "and_", "lat_", "<_", "38_", "and_", "-_", "123_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "100_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "25_", "<=_", "lat_", "and_", "lat_", "<_", "38_", "and_", "-_", "100_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "83_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "5_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "17_", "<=_", "lat_", "and_", "lat_", "<_", "48_", "and_", "-_", "83_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "64_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "6_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "-_", "15_", "<=_", "lat_", "and_", "lat_", "<_", "60_", "and_", "(_", "(_", "172_", "<=_", "lon_", "and_", "lon_", "<_", "180_", ")_", "or_", "(_", "-_", "180_", "<=_", "lon_", "and_", "lon_", "<_", "-_", "129_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "7_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "raise_", "Value", "Error_", "(_", "'", "Un", "know", "n", " ", "location", ":", " ", "%", "s", ",", " ", "%", "s", "'_", "%_", "(_", "lat_", ",_", "lon_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "quad", "s_", "(_", "minl", "on_", ",_", "minl", "at_", ",_", "maxl", "on_", ",_", "maxl", "at_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Generate", " ", "a", " ", "list", " ", "of", " ", "south", "west", " ", "(", "lon", ",", " ", "lat", ")", " ", "for", " ", "1", "-", "degr", "ee", " ", "quad", "s", " ", "of", " ", "SR", "TM", "1", " ", "data", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "lon_", "=_", "floor_", "(_", "minl", "on_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "lon_", "<=_", "maxl", "on_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lat_", "=_", "floor_", "(_", "minl", "at_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "lat_", "<=_", "maxl", "at_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "yield_", "lon_", ",_", "lat_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "lat_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "lon_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "datasource_", "(_", "lat_", ",_", "lon_", ",_", "source", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Return", " ", "a", " ", "gdal", " ", "datas", "ource", " ", "for", " ", "an", " ", "SR", "TM", "1", " ", "lat", ",", " ", "lon", " ", "corn", "er", ".", "\\", "10", ";", " ", " ", " ", " ", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "it", " ", "doe", "sn", "'", "t", " ", "alr", "ead", "y", " ", "exist", " ", "local", "ly", " ", "in", " ", "source", "\\u", "dir", ",", " ", "gra", "b", " ", "a", " ", "new", " ", "one", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Creat", "e", " ", "a", " ", "URL_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "reg_", "=_", "region_", "(_", "lat_", ",_", "lon_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Value", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "we", "'", "re", " ", "probab", "ly", " ", "outsi", "de", " ", "a", " ", "know", "n", " ", "region_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "FIX", "ME", " ", "for", " ", "west", "ern", " ", "/", " ", "south", "ern", " ", "hemi", "sphere", "s_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "fmt_", "=_", "'", "http", "://", "dds", ".", "cr", ".", "us", "gs", ".", "gov", "/", "srt", "m", "/", "version", "2", "\\u", "1", "/", "SR", "TM", "1", "/", "Region", "\\u", "%", "02", "d", "/", "N", "%", "02", "d", "W", "%", "03", "d", ".", "hg", "t", ".", "zip", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "fmt_", "%_", "(_", "reg_", ",_", "abs_", "(_", "lat_", ")_", ",_", "abs_", "(_", "lon_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Creat", "e", " ", "a", " ", "local", " ", "filepath_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "s_", ",_", "host_", ",_", "path_", ",_", "p_", ",_", "q_", ",_", "f_", "=_", "urlparse_", "(_", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "dem", "\\u", "dir_", "=_", "md5_", "(_", "url_", ")_", "._", "hexdigest_", "(_", ")_", "[_", ":_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dem", "\\u", "dir_", "=_", "join_", "(_", "source", "\\u", "dir_", ",_", "dem", "\\u", "dir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "dem", "\\u", "path_", "=_", "join_", "(_", "dem", "\\u", "dir_", ",_", "basename_", "(_", "path_", ")_", "[_", ":_", "-_", "4_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dem", "\\u", "none_", "=_", "dem", "\\u", "path_", "[_", ":_", "-_", "4_", "]_", "+_", "'.", "404", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Check", " ", "if", " ", "the", " ", "file", " ", "exist", "s", " ", "local", "ly_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "exists_", "(_", "dem", "\\u", "path_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "gdal_", "._", "Open_", "(_", "dem", "\\u", "path_", ",_", "gdal_", "._", "GA", "\\u", "Read", "Only_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "exists_", "(_", "dem", "\\u", "none_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "exists_", "(_", "dem", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "makedirs_", "(_", "dem", "\\u", "dir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "chmod_", "(_", "dem", "\\u", "dir_", ",_", "0_", "777_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "assert_", "isdir_", "(_", "dem", "\\u", "dir_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Grab", " ", "a", " ", "fresh", " ", "remote", " ", "copy_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "print_", ">>_", "stderr_", ",_", "'", "Retriev", "ing", "'_", ",_", "url_", ",_", "'", "in", " ", "DEM", ".", "SR", "TM", "1", ".", "datas", "ource", "()", ".'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "conn_", "=_", "HTTP", "Connection_", "(_", "host_", ",_", "80_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "request_", "(_", "'", "GET", "'_", ",_", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "resp_", "=_", "conn_", "._", "getresponse_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "resp_", "._", "status_", "==_", "404_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "we", "'", "re", " ", "probab", "ly", " ", "outsi", "de", " ", "the", " ", "covera", "ge", " ", "area_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", ">>_", "open_", "(_", "dem", "\\u", "none_", ",_", "'", "w", "'_", ")_", ",_", "url_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "assert_", "resp_", "._", "status_", "==_", "200_", ",_", "(_", "resp_", "._", "status_", ",_", "resp_", "._", "read_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Get", " ", "the", " ", "DEM", " ", "out", " ", "of", " ", "the", " ", "zip", " ", "file_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "handle_", ",_", "zip", "\\u", "path_", "=_", "mkstemp_", "(_", "prefix_", "=_", "'", "srt", "m1", "-'_", ",_", "suffix_", "=_", "'.", "zip", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "write_", "(_", "handle_", ",_", "resp_", "._", "read_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "close_", "(_", "handle_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "zipfile_", "=_", "Zip", "File_", "(_", "zip", "\\u", "path_", ",_", "'", "r", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Write", " ", "the", " ", "actual", " ", "DEM", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "dem", "\\u", "file_", "=_", "open_", "(_", "dem", "\\u", "path_", ",_", "'", "w", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dem", "\\u", "file_", "._", "write_", "(_", "zipfile_", "._", "read_", "(_", "zipfile_", "._", "namelist_", "(_", ")_", "[_", "0_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dem", "\\u", "file_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "chmod_", "(_", "dem", "\\u", "path_", ",_", "0_", "666_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "finally_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "unlink_", "(_", "zip", "\\u", "path_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "file", " ", "bett", "er", " ", "exist", " ", "local", "ly", " ", "now_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "gdal_", "._", "Open_", "(_", "dem", "\\u", "path_", ",_", "gdal_", "._", "GA", "\\u", "Read", "Only_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "datasources", "_", "(_", "minl", "on_", ",_", "minl", "at_", ",_", "maxl", "on_", ",_", "maxl", "at_", ",_", "source", "\\u", "dir_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Retrieve", " ", "a", " ", "list", " ", "of", " ", "SR", "TM", "1", " ", "datasources", " ", "overlapping", " ", "the", " ", "tile", " ", "coordinate", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "lon", "lats_", "=_", "quad", "s_", "(_", "minl", "on_", ",_", "minl", "at_", ",_", "maxl", "on_", ",_", "maxl", "at_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sources_", "=_", "[_", "datasource_", "(_", "lat_", ",_", "lon_", ",_", "source", "\\u", "dir_", ")_", "for_", "(_", "lon_", ",_", "lat_", ")_", "in_", "lon", "lats_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "[_", "ds_", "for_", "ds_", "in_", "sources_", "if_", "ds_", "]_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
sahana/eden/models/000_1st_run.py
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n 1st RUN:\n - Run update_check if needed.\n - Import the S3 Framework Extensions\n - If needed, copy deployment templates to the live installation.\n\"\"\"\n\n# Debug why Eclipse breakpoints are ignored\n# http://stackoverflow.com/questions/29852426/pydev-ignoring-breakpoints\n#import sys\n#def trace_func(frame, event, arg):\n# print 'Context: ', frame.f_code.co_name, '\\tFile:', frame.f_code.co_filename, '\\tLine:', frame.f_lineno, '\\tEvent:', event\n# return trace_func\n#sys.settrace(trace_func)\n\n# -----------------------------------------------------------------------------\n# Perform update checks - will happen in 1st_run or on those upgrades when new\n# dependencies have been added.\n\n# Increment this when new dependencies are added\n# This will be compared to the version in the 0000_update_check.py 'canary' file.\nCURRENT_UPDATE_CHECK_ID = 4\nupdate_check_needed = False\ntry:\n if CANARY_UPDATE_CHECK_ID != CURRENT_UPDATE_CHECK_ID:\n update_check_needed = True\nexcept NameError:\n update_check_needed = True\n\n# shortcut\nappname = request.application\n\nif update_check_needed:\n # @ToDo: Load deployment_settings so that we can configure the update_check\n # - need to rework so that 000_config.py is parsed 1st\n import s3cfg\n settings = s3cfg.S3Config()\n # Run update checks\n from s3_update_check import update_check\n errors = []\n warnings = []\n messages = update_check(settings)\n errors.extend(messages.get(\"error_messages\", []))\n warnings.extend(messages.get(\"warning_messages\", []))\n\n # Catch-all check for dependency errors.\n # NB This does not satisfy the goal of calling out all the setup errors\n # at once - it will die on the first fatal error encountered.\n try:\n import s3 as s3base\n except Exception, e:\n errors.append(e.message)\n\n import sys\n\n if warnings:\n # Report (non-fatal) warnings.\n prefix = \"\\n%s: \" % T(\"WARNING\")\n msg = prefix + prefix.join(warnings)\n print >> sys.stderr, msg\n if errors:\n # Report errors and stop.\n actionrequired = T(\"ACTION REQUIRED\")\n prefix = \"\\n%s: \" % actionrequired\n msg = prefix + prefix.join(errors)\n print >> sys.stderr, msg\n htmlprefix = \"\\n<br /><b>%s</b>: \" % actionrequired\n html = \"<errors>\" + htmlprefix + htmlprefix.join(errors) + \"\\n</errors>\"\n raise HTTP(500, body=html)\n\n # Create or update the canary file.\n from gluon import portalocker\n canary = open(\"applications/%s/models/0000_update_check.py\" % appname, \"w\")\n portalocker.lock(canary, portalocker.LOCK_EX)\n\n statement = \"CANARY_UPDATE_CHECK_ID = %s\" % CURRENT_UPDATE_CHECK_ID\n canary.write(statement)\n canary.close()\n\n# -----------------------------------------------------------------------------\nimport os\ntry:\n # Python 2.7\n from collections import OrderedDict\nexcept:\n # Python 2.6\n from gluon.contrib.simplejson.ordered_dict import OrderedDict\n\nfrom gluon import current\nfrom gluon.storage import Storage\n\n# Keep all S3 framework-level elements stored in response.s3, so as to avoid\n# polluting global namespace & to make it clear which part of the framework is\n# being interacted with.\n# Avoid using this where a method parameter could be used:\n# http://en.wikipedia.org/wiki/Anti_pattern#Programming_anti-patterns\nresponse.s3 = Storage()\ns3 = response.s3\ns3.gis = Storage() # Defined early for use by S3Config.\n\ncurrent.cache = cache\n# Limit for filenames on filesystem:\n# https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits\n# NB This takes effect during the file renaming algorithm - the length of uploaded filenames is unaffected\ncurrent.MAX_FILENAME_LENGTH = 255 # Defined early for use by S3Config.\n\n# Import S3Config\nimport s3cfg\nsettings = s3cfg.S3Config()\ncurrent.deployment_settings = deployment_settings = settings\n\n# END =========================================================================\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import s3 as s3base", "start_line": 50, "start_column": 8, "end_line": 50, "end_column": 27 }, { "span": "import os", "start_line": 81, "start_column": 0, "end_line": 81, "end_column": 9 }, { "span": "from collections import OrderedDict", "start_line": 84, "start_column": 4, "end_line": 84, "end_column": 39 }, { "span": "from gluon.contrib.simplejson.ordered_dict import OrderedDict", "start_line": 87, "start_column": 4, "end_line": 87, "end_column": 65 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "1s", "t", " ", "RUN", ":", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "Run", " ", "update", "\\u", "check", " ", "if", " ", "need", "ed", ".", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "Import", " ", "the", " ", "S", "3", " ", "Frame", "work", " ", "Ext", "ensi", "ons", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "If", " ", "need", "ed", ",", " ", "copy", " ", "deploy", "ment", " ", "template", "s", " ", "to", " ", "the", " ", "live", " ", "installation", ".", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Deb", "ug", " ", "wh", "y", " ", "Ecl", "ipse", " ", "breakpoints", " ", "are", " ", "ignored_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "http", "://", "stack", "overflow", ".", "com", "/", "question", "s", "/", "298", "524", "2", "6", "/", "pydev", "-", "ign", "orin", "g", "-", "breakpoints", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "import", " ", "sys_", "\\u\\u\\uNL\\u\\u\\u_", "#", "def", " ", "trace", "\\u", "func", "(", "frame", ",", " ", "event", ",", " ", "arg", "):", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "print", " ", "'", "Context", ":", " ", "',", " ", "frame", ".", "f", "\\u", "code", ".", "co", "\\u", "name", ",", " ", "'\\\\", "t", "File", ":'", ",", " ", "frame", ".", "f", "\\u", "code", ".", "co", "\\u", "filename", ",", " ", "'\\\\", "t", "Line", ":'", ",", " ", "frame", ".", "f", "\\u", "linen", "o", ",", " ", "'\\\\", "t", "Event", ":'", ",", " ", "event_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "return", " ", "trace", "\\u", "func_", "\\u\\u\\uNL\\u\\u\\u_", "#", "sys", ".", "sett", "race", "(", "trace", "\\u", "func", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--------------", "--------------", "--------------", "--------------", "--------------", "-------", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Perform", " ", "update", " ", "checks", " ", "-", " ", "will", " ", "happ", "en", " ", "in", " ", "1s", "t", "\\u", "run", " ", "or", " ", "on", " ", "tho", "se", " ", "upgrade", "s", " ", "whe", "n", " ", "new_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "dependen", "cies", " ", "have", " ", "bee", "n", " ", "adde", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Increment", " ", "this", " ", "whe", "n", " ", "new", " ", "dependen", "cies", " ", "are", " ", "added_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "will", " ", "be", " ", "compare", "d", " ", "to", " ", "the", " ", "version", " ", "in", " ", "the", " ", "0000", "\\u", "update", "\\u", "check", ".", "py", " ", "'", "canar", "y", "'", " ", "file", "._", "\\u\\u\\uNL\\u\\u\\u_", "CURREN", "T", "\\u", "UPDATE", "\\u", "CHECK", "\\u", "ID_", "=_", "4_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "update", "\\u", "check", "\\u", "needed_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "CAN", "ARY", "\\u", "UPDATE", "\\u", "CHECK", "\\u", "ID_", "!=_", "CURREN", "T", "\\u", "UPDATE", "\\u", "CHECK", "\\u", "ID_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "update", "\\u", "check", "\\u", "needed_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Name", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "update", "\\u", "check", "\\u", "needed_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "shortcut_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "appname_", "=_", "request_", "._", "application_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "update", "\\u", "check", "\\u", "needed_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "@", "To", "Do", ":", " ", "Load", " ", "deploy", "ment", "\\u", "settings", " ", "so", " ", "tha", "t", " ", "we", " ", "can", " ", "configur", "e", " ", "the", " ", "update", "\\u", "check_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-", " ", "need", " ", "to", " ", "rew", "ork", " ", "so", " ", "tha", "t", " ", "000", "\\u", "config", ".", "py", " ", "is", " ", "parsed", " ", "1s", "t_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "s3", "cfg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "=_", "s3", "cfg_", "._", "S", "3", "Config_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Run", " ", "update", " ", "checks_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "s3", "\\u", "update", "\\u", "check_", "import_", "update", "\\u", "check_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "errors_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "warnings_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "messages_", "=_", "update", "\\u", "check_", "(_", "settings_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "errors_", "._", "extend_", "(_", "messages_", "._", "get_", "(_", "\"", "error", "\\u", "message", "s", "\"_", ",_", "[_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "warnings_", "._", "extend_", "(_", "messages_", "._", "get_", "(_", "\"", "warn", "ing", "\\u", "message", "s", "\"_", ",_", "[_", "]_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Catch", "-", "all", " ", "check", " ", "for", " ", "dependen", "cy", " ", "error", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "NB", " ", "Thi", "s", " ", "doe", "s", " ", "not", " ", "satisfy", " ", "the", " ", "goal", " ", "of", " ", "calling", " ", "out", " ", "all", " ", "the", " ", "setup", " ", "errors_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", " ", "at", " ", "onc", "e", " ", "-", " ", "it", " ", "will", " ", "die", " ", "on", " ", "the", " ", "first", " ", "fat", "al", " ", "error", " ", "encounter", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "s3_", "as_", "s3", "base_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "errors_", "._", "append_", "(_", "e_", "._", "message_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "warnings_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Report", " ", "(", "non", "-", "fat", "al", ")", " ", "warn", "ings", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "prefix_", "=_", "\"\\\\", "n", "%", "s", ":", " ", "\"_", "%_", "T_", "(_", "\"", "WARN", "ING", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "prefix_", "+_", "prefix_", "._", "join_", "(_", "warnings_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", ">>_", "sys_", "._", "stderr_", ",_", "msg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "errors_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Report", " ", "error", "s", " ", "and", " ", "stop", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "action", "required_", "=_", "T_", "(_", "\"", "ACTI", "ON", " ", "REQUIRE", "D", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "prefix_", "=_", "\"\\\\", "n", "%", "s", ":", " ", "\"_", "%_", "action", "required_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "prefix_", "+_", "prefix_", "._", "join_", "(_", "errors_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", ">>_", "sys_", "._", "stderr_", ",_", "msg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "html", "prefix_", "=_", "\"\\\\", "n", "<", "br", " ", "/>", "<", "b", ">", "%", "s", "</", "b", ">:", " ", "\"_", "%_", "action", "required_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "html_", "=_", "\"<", "error", "s", ">\"_", "+_", "html", "prefix_", "+_", "html", "prefix_", "._", "join_", "(_", "errors_", ")_", "+_", "\"\\\\", "n", "</", "error", "s", ">\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "HTTP_", "(_", "500_", ",_", "body_", "=_", "html_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Creat", "e", " ", "or", " ", "update", " ", "the", " ", "canar", "y", " ", "file", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "gluon_", "import_", "portal", "ock", "er_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "canar", "y_", "=_", "open_", "(_", "\"", "applica", "tion", "s", "/", "%", "s", "/", "model", "s", "/", "0000", "\\u", "update", "\\u", "check", ".", "py", "\"_", "%_", "appname_", ",_", "\"", "w", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "portal", "ock", "er_", "._", "lock_", "(_", "canar", "y_", ",_", "portal", "ock", "er_", "._", "LOCK", "\\u", "EX_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "statement_", "=_", "\"", "CAN", "ARY", "\\u", "UPDATE", "\\u", "CHECK", "\\u", "ID", " ", "=", " ", "%", "s", "\"_", "%_", "CURREN", "T", "\\u", "UPDATE", "\\u", "CHECK", "\\u", "ID_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "canar", "y_", "._", "write_", "(_", "statement_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "canar", "y_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--------------", "--------------", "--------------", "--------------", "--------------", "-------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Pyth", "on", " ", "2.7", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "collections_", "import_", "Order", "ed", "Dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Pyth", "on", " ", "2.6", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "gluon_", "._", "contrib_", "._", "simplejson_", "._", "order", "ed", "\\u", "dict_", "import_", "Order", "ed", "Dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "from_", "gluon_", "import_", "current_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "gluon_", "._", "storage_", "import_", "Storage_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Keep", " ", "all", " ", "S", "3", " ", "frame", "work", "-", "level", " ", "element", "s", " ", "store", "d", " ", "in", " ", "response", ".", "s3", ",", " ", "so", " ", "as", " ", "to", " ", "avoid", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "poll", "uti", "ng", " ", "global", " ", "namespace", " ", "&", " ", "to", " ", "make", " ", "it", " ", "clear", " ", "whi", "ch", " ", "part", " ", "of", " ", "the", " ", "frame", "work", " ", "is_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "bei", "ng", " ", "interact", "ed", " ", "with", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Av", "oid", " ", "usi", "ng", " ", "this", " ", "where", " ", "a", " ", "method", " ", "parameter", " ", "coul", "d", " ", "be", " ", "used", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "http", "://", "en", ".", "wikip", "edia", ".", "org", "/", "wiki", "/", "Anti", "\\u", "pattern", "#", "Programm", "ing", "\\u", "anti", "-", "patterns_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "._", "s3_", "=_", "Storage_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s3_", "=_", "response_", "._", "s3_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s3_", "._", "gis_", "=_", "Storage_", "(_", ")_", "#", " ", "Define", "d", " ", "ear", "ly", " ", "for", " ", "use", " ", "by", " ", "S", "3", "Config", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "current_", "._", "cache_", "=_", "cache_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Limit", " ", "for", " ", "filename", "s", " ", "on", " ", "filesystem", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "https", "://", "en", ".", "wikip", "edia", ".", "org", "/", "wiki", "/", "Compari", "son", "\\u", "of", "\\u", "file", "\\u", "system", "s", "#", "Limits_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "NB", " ", "Thi", "s", " ", "take", "s", " ", "effect", " ", "dur", "ing", " ", "the", " ", "file", " ", "rena", "ming", " ", "algo", "rit", "hm", " ", "-", " ", "the", " ", "length", " ", "of", " ", "uploade", "d", " ", "filename", "s", " ", "is", " ", "una", "ffe", "cte", "d_", "\\u\\u\\uNL\\u\\u\\u_", "current_", "._", "MAX", "\\u", "FILE", "NAME", "\\u", "LENGTH_", "=_", "255_", "#", " ", "Define", "d", " ", "ear", "ly", " ", "for", " ", "use", " ", "by", " ", "S", "3", "Config", "._", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Import", " ", "S", "3", "Config_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "s3", "cfg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "settings_", "=_", "s3", "cfg_", "._", "S", "3", "Config_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "current_", "._", "deploy", "ment", "\\u", "settings_", "=_", "deploy", "ment", "\\u", "settings_", "=_", "settings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "END", " ", "==============", "==============", "==============", "==============", "==============", "===", "_", "\\u\\u\\uNL\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Testing equality to None
grantjenks/python-diskcache/tests/test_fanout.py
[ { "content": "def test_operationalerror():\n cache = dc.FanoutCache('tmp', shards=1)\n\n shards = mock.Mock()\n shards.__getitem__ = mock.Mock(side_effect=sqlite3.OperationalError)\n\n object.__setattr__(cache, '_shards', shards)\n\n assert cache.set(0, 0) == False\n assert cache.get(0) == None\n assert (0 in cache) == False\n assert cache.__delitem__(0) == False\n\n shutil.rmtree('tmp')", "metadata": "root.test_operationalerror", "header": "['module', '___EOS___']", "index": 91 } ]
[ { "span": "cache.get(0) == None", "start_line": 100, "start_column": 11, "end_line": 100, "end_column": 31 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "operati", "onal", "error_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "cache_", "=_", "dc_", "._", "Fan", "out", "Cache_", "(_", "'", "tmp", "'_", ",_", "shards_", "=_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "shards_", "=_", "mock_", "._", "Mock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "shards_", "._", "\\u\\u", "getitem\\u\\u_", "=_", "mock_", "._", "Mock_", "(_", "side", "\\u", "effect_", "=_", "sqlite3_", "._", "Opera", "tion", "al", "Error_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "object_", "._", "\\u\\u", "setattr\\u\\u_", "(_", "cache_", ",_", "'\\u", "shard", "s", "'_", ",_", "shards_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "assert_", "cache_", "._", "set_", "(_", "0_", ",_", "0_", ")_", "==_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "cache_", "._", "get_", "(_", "0_", ")_", "==_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "(_", "0_", "in_", "cache_", ")_", "==_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "cache_", "._", "\\u\\u", "delitem\\u\\u_", "(_", "0_", ")_", "==_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "shutil_", "._", "rmtree_", "(_", "'", "tmp", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
ramen/phply/phply/phpparse.py
[ { "content": "# -----------------------------------------------------------------------------\n# phpparse.py\n#\n# A parser for PHP.\n# -----------------------------------------------------------------------------\n\nimport os\nimport sys\nimport phplex\nimport phpast as ast\nimport ply.yacc as yacc\n\n# Get the token map\ntokens = phplex.tokens\n\nprecedence = (\n ('left', 'INCLUDE', 'INCLUDE_ONCE', 'EVAL', 'REQUIRE', 'REQUIRE_ONCE'),\n ('left', 'COMMA'),\n ('left', 'LOGICAL_OR'),\n ('left', 'LOGICAL_XOR'),\n ('left', 'LOGICAL_AND'),\n ('right', 'PRINT'),\n ('left', 'EQUALS', 'PLUS_EQUAL', 'MINUS_EQUAL', 'MUL_EQUAL', 'DIV_EQUAL', 'CONCAT_EQUAL', 'MOD_EQUAL', 'AND_EQUAL', 'OR_EQUAL', 'XOR_EQUAL', 'SL_EQUAL', 'SR_EQUAL'),\n ('left', 'QUESTION', 'COLON'),\n ('left', 'BOOLEAN_OR'),\n ('left', 'BOOLEAN_AND'),\n ('left', 'OR'),\n ('left', 'XOR'),\n ('left', 'AND'),\n ('nonassoc', 'IS_EQUAL', 'IS_NOT_EQUAL', 'IS_IDENTICAL', 'IS_NOT_IDENTICAL'),\n ('nonassoc', 'IS_SMALLER', 'IS_SMALLER_OR_EQUAL', 'IS_GREATER', 'IS_GREATER_OR_EQUAL'),\n ('left', 'SL', 'SR'),\n ('left', 'PLUS', 'MINUS', 'CONCAT'),\n ('left', 'MUL', 'DIV', 'MOD'),\n ('right', 'BOOLEAN_NOT'),\n ('nonassoc', 'INSTANCEOF'),\n ('right', 'NOT', 'INC', 'DEC', 'INT_CAST', 'DOUBLE_CAST', 'STRING_CAST', 'ARRAY_CAST', 'OBJECT_CAST', 'BOOL_CAST', 'UNSET_CAST', 'AT'),\n ('right', 'LBRACKET'),\n ('nonassoc', 'NEW', 'CLONE'),\n # ('left', 'ELSEIF'),\n # ('left', 'ELSE'),\n ('left', 'ENDIF'),\n ('right', 'STATIC', 'ABSTRACT', 'FINAL', 'PRIVATE', 'PROTECTED', 'PUBLIC'),\n)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# Error rule for syntax errors\n\n# Build the grammar\nparser = yacc.yacc()\n\nif __name__ == '__main__':\n import readline\n import pprint\n s = ''\n lexer = phplex.lexer\n while True:\n try:\n if s:\n prompt = ' '\n else:\n prompt = lexer.current_state()\n if prompt == 'INITIAL': prompt = 'html'\n prompt += '> '\n s += raw_input(prompt)\n except EOFError:\n break\n if not s: continue\n s += '\\n'\n try:\n lexer.lineno = 1\n result = parser.parse(s, lexer=lexer)\n except SyntaxError, e:\n if e.lineno is not None:\n print e, 'near', repr(e.text)\n s = ''\n continue\n if result:\n for item in result:\n if hasattr(item, 'generic'):\n item = item.generic()\n pprint.pprint(item)\n s = ''\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def p_start(p):\n 'start : top_statement_list'\n p[0] = p[1]", "metadata": "root.p_start", "header": "['module', '___EOS___']", "index": 45 }, { "content": "def p_top_statement_list(p):\n '''top_statement_list : top_statement_list top_statement\n | empty'''\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = []", "metadata": "root.p_top_statement_list", "header": "['module', '___EOS___']", "index": 49 }, { "content": "def p_top_statement(p):\n '''top_statement : statement\n | function_declaration_statement\n | class_declaration_statement\n | HALT_COMPILER LPAREN RPAREN SEMI'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n # ???\n pass", "metadata": "root.p_top_statement", "header": "['module', '___EOS___']", "index": 57 }, { "content": "def p_top_statement_namespace(p):\n '''top_statement : NAMESPACE namespace_name SEMI\n | NAMESPACE LBRACE top_statement_list RBRACE\n | NAMESPACE namespace_name LBRACE top_statement_list RBRACE'''\n if len(p) == 4:\n p[0] = ast.Namespace(p[2], [], lineno=p.lineno(1))\n elif len(p) == 5:\n p[0] = ast.Namespace(None, p[3], lineno=p.lineno(1))\n else:\n p[0] = ast.Namespace(p[2], p[4], lineno=p.lineno(1))", "metadata": "root.p_top_statement_namespace", "header": "['module', '___EOS___']", "index": 68 }, { "content": "def p_top_statement_constant(p):\n 'top_statement : CONST constant_declarations SEMI'\n p[0] = ast.ConstantDeclarations(p[2], lineno=p.lineno(1))", "metadata": "root.p_top_statement_constant", "header": "['module', '___EOS___']", "index": 79 }, { "content": "def p_top_statement_use(p):\n 'top_statement : USE use_declarations SEMI'\n p[0] = ast.UseDeclarations(p[2], lineno=p.lineno(1))", "metadata": "root.p_top_statement_use", "header": "['module', '___EOS___']", "index": 83 }, { "content": "def p_use_declarations(p):\n '''use_declarations : use_declarations COMMA use_declaration\n | use_declaration'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_use_declarations", "header": "['module', '___EOS___']", "index": 87 }, { "content": "def p_use_declaration(p):\n '''use_declaration : namespace_name\n | NS_SEPARATOR namespace_name\n | namespace_name AS STRING\n | NS_SEPARATOR namespace_name AS STRING'''\n if len(p) == 2:\n p[0] = ast.UseDeclaration(p[1], None, lineno=p.lineno(1))\n elif len(p) == 3:\n p[0] = ast.UseDeclaration(p[1] + p[2], None, lineno=p.lineno(1))\n elif len(p) == 4:\n p[0] = ast.UseDeclaration(p[1], p[3], lineno=p.lineno(2))\n else:\n p[0] = ast.UseDeclaration(p[1] + p[2], p[4], lineno=p.lineno(1))", "metadata": "root.p_use_declaration", "header": "['module', '___EOS___']", "index": 95 }, { "content": "def p_constant_declarations(p):\n '''constant_declarations : constant_declarations COMMA constant_declaration\n | constant_declaration'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_constant_declarations", "header": "['module', '___EOS___']", "index": 109 }, { "content": "def p_constant_declaration(p):\n 'constant_declaration : STRING EQUALS static_scalar'\n p[0] = ast.ConstantDeclaration(p[1], p[3], lineno=p.lineno(1))", "metadata": "root.p_constant_declaration", "header": "['module', '___EOS___']", "index": 117 }, { "content": "def p_inner_statement_list(p):\n '''inner_statement_list : inner_statement_list inner_statement\n | empty'''\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = []", "metadata": "root.p_inner_statement_list", "header": "['module', '___EOS___']", "index": 121 }, { "content": "def p_inner_statement(p):\n '''inner_statement : statement\n | function_declaration_statement\n | class_declaration_statement\n | HALT_COMPILER LPAREN RPAREN SEMI'''\n assert len(p) == 2, \"__HALT_COMPILER() can only be used from the outermost scope\"\n p[0] = p[1]", "metadata": "root.p_inner_statement", "header": "['module', '___EOS___']", "index": 129 }, { "content": "def p_statement_block(p):\n 'statement : LBRACE inner_statement_list RBRACE'\n p[0] = ast.Block(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_block", "header": "['module', '___EOS___']", "index": 137 }, { "content": "def p_statement_if(p):\n '''statement : IF LPAREN expr RPAREN statement elseif_list else_single\n | IF LPAREN expr RPAREN COLON inner_statement_list new_elseif_list new_else_single ENDIF SEMI'''\n if len(p) == 8:\n p[0] = ast.If(p[3], p[5], p[6], p[7], lineno=p.lineno(1))\n else:\n p[0] = ast.If(p[3], ast.Block(p[6], lineno=p.lineno(5)),\n p[7], p[8], lineno=p.lineno(1))", "metadata": "root.p_statement_if", "header": "['module', '___EOS___']", "index": 141 }, { "content": "def p_statement_while(p):\n 'statement : WHILE LPAREN expr RPAREN while_statement'\n p[0] = ast.While(p[3], p[5], lineno=p.lineno(1))", "metadata": "root.p_statement_while", "header": "['module', '___EOS___']", "index": 150 }, { "content": "def p_statement_do_while(p):\n 'statement : DO statement WHILE LPAREN expr RPAREN SEMI'\n p[0] = ast.DoWhile(p[2], p[5], lineno=p.lineno(1))", "metadata": "root.p_statement_do_while", "header": "['module', '___EOS___']", "index": 154 }, { "content": "def p_statement_for(p):\n 'statement : FOR LPAREN for_expr SEMI for_expr SEMI for_expr RPAREN for_statement'\n p[0] = ast.For(p[3], p[5], p[7], p[9], lineno=p.lineno(1))", "metadata": "root.p_statement_for", "header": "['module', '___EOS___']", "index": 158 }, { "content": "def p_statement_foreach(p):\n 'statement : FOREACH LPAREN expr AS foreach_variable foreach_optional_arg RPAREN foreach_statement'\n if p[6] is None:\n p[0] = ast.Foreach(p[3], None, p[5], p[8], lineno=p.lineno(1))\n else:\n p[0] = ast.Foreach(p[3], p[5], p[6], p[8], lineno=p.lineno(1))", "metadata": "root.p_statement_foreach", "header": "['module', '___EOS___']", "index": 162 }, { "content": "def p_statement_switch(p):\n 'statement : SWITCH LPAREN expr RPAREN switch_case_list'\n p[0] = ast.Switch(p[3], p[5], lineno=p.lineno(1))", "metadata": "root.p_statement_switch", "header": "['module', '___EOS___']", "index": 169 }, { "content": "def p_statement_break(p):\n '''statement : BREAK SEMI\n | BREAK expr SEMI'''\n if len(p) == 3:\n p[0] = ast.Break(None, lineno=p.lineno(1))\n else:\n p[0] = ast.Break(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_break", "header": "['module', '___EOS___']", "index": 173 }, { "content": "def p_statement_continue(p):\n '''statement : CONTINUE SEMI\n | CONTINUE expr SEMI'''\n if len(p) == 3:\n p[0] = ast.Continue(None, lineno=p.lineno(1))\n else:\n p[0] = ast.Continue(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_continue", "header": "['module', '___EOS___']", "index": 181 }, { "content": "def p_statement_return(p):\n '''statement : RETURN SEMI\n | RETURN expr SEMI'''\n if len(p) == 3:\n p[0] = ast.Return(None, lineno=p.lineno(1))\n else:\n p[0] = ast.Return(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_return", "header": "['module', '___EOS___']", "index": 189 }, { "content": "def p_statement_global(p):\n 'statement : GLOBAL global_var_list SEMI'\n p[0] = ast.Global(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_global", "header": "['module', '___EOS___']", "index": 197 }, { "content": "def p_statement_static(p):\n 'statement : STATIC static_var_list SEMI'\n p[0] = ast.Static(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_static", "header": "['module', '___EOS___']", "index": 201 }, { "content": "def p_statement_echo(p):\n 'statement : ECHO echo_expr_list SEMI'\n p[0] = ast.Echo(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_echo", "header": "['module', '___EOS___']", "index": 205 }, { "content": "def p_statement_inline_html(p):\n 'statement : INLINE_HTML'\n p[0] = ast.InlineHTML(p[1], lineno=p.lineno(1))", "metadata": "root.p_statement_inline_html", "header": "['module', '___EOS___']", "index": 209 }, { "content": "def p_statement_expr(p):\n 'statement : expr SEMI'\n p[0] = p[1]", "metadata": "root.p_statement_expr", "header": "['module', '___EOS___']", "index": 213 }, { "content": "def p_statement_unset(p):\n 'statement : UNSET LPAREN unset_variables RPAREN SEMI'\n p[0] = ast.Unset(p[3], lineno=p.lineno(1))", "metadata": "root.p_statement_unset", "header": "['module', '___EOS___']", "index": 217 }, { "content": "def p_statement_empty(p):\n 'statement : SEMI'\n pass", "metadata": "root.p_statement_empty", "header": "['module', '___EOS___']", "index": 221 }, { "content": "def p_statement_try(p):\n 'statement : TRY LBRACE inner_statement_list RBRACE CATCH LPAREN fully_qualified_class_name VARIABLE RPAREN LBRACE inner_statement_list RBRACE additional_catches'\n p[0] = ast.Try(p[3], [ast.Catch(p[7], ast.Variable(p[8], lineno=p.lineno(8)),\n p[11], lineno=p.lineno(5))] + p[13],\n lineno=p.lineno(1))", "metadata": "root.p_statement_try", "header": "['module', '___EOS___']", "index": 225 }, { "content": "def p_additional_catches(p):\n '''additional_catches : additional_catches CATCH LPAREN fully_qualified_class_name VARIABLE RPAREN LBRACE inner_statement_list RBRACE\n | empty'''\n if len(p) == 10:\n p[0] = p[1] + [ast.Catch(p[4], ast.Variable(p[5], lineno=p.lineno(5)),\n p[8], lineno=p.lineno(2))]\n else:\n p[0] = []", "metadata": "root.p_additional_catches", "header": "['module', '___EOS___']", "index": 231 }, { "content": "def p_statement_throw(p):\n 'statement : THROW expr SEMI'\n p[0] = ast.Throw(p[2], lineno=p.lineno(1))", "metadata": "root.p_statement_throw", "header": "['module', '___EOS___']", "index": 240 }, { "content": "def p_statement_declare(p):\n 'statement : DECLARE LPAREN declare_list RPAREN declare_statement'\n p[0] = ast.Declare(p[3], p[5], lineno=p.lineno(1))", "metadata": "root.p_statement_declare", "header": "['module', '___EOS___']", "index": 244 }, { "content": "def p_declare_list(p):\n '''declare_list : STRING EQUALS static_scalar\n | declare_list COMMA STRING EQUALS static_scalar'''\n if len(p) == 4:\n p[0] = [ast.Directive(p[1], p[3], lineno=p.lineno(1))]\n else:\n p[0] = p[1] + [ast.Directive(p[3], p[5], lineno=p.lineno(2))]", "metadata": "root.p_declare_list", "header": "['module', '___EOS___']", "index": 248 }, { "content": "def p_declare_statement(p):\n '''declare_statement : statement\n | COLON inner_statement_list ENDDECLARE SEMI'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = ast.Block(p[2], lineno=p.lineno(1))", "metadata": "root.p_declare_statement", "header": "['module', '___EOS___']", "index": 256 }, { "content": "def p_elseif_list(p):\n '''elseif_list : empty\n | elseif_list ELSEIF LPAREN expr RPAREN statement'''\n if len(p) == 2:\n p[0] = []\n else:\n p[0] = p[1] + [ast.ElseIf(p[4], p[6], lineno=p.lineno(2))]", "metadata": "root.p_elseif_list", "header": "['module', '___EOS___']", "index": 264 }, { "content": "def p_else_single(p):\n '''else_single : empty\n | ELSE statement'''\n if len(p) == 3:\n p[0] = ast.Else(p[2], lineno=p.lineno(1))", "metadata": "root.p_else_single", "header": "['module', '___EOS___']", "index": 272 }, { "content": "def p_new_elseif_list(p):\n '''new_elseif_list : empty\n | new_elseif_list ELSEIF LPAREN expr RPAREN COLON inner_statement_list'''\n if len(p) == 2:\n p[0] = []\n else:\n p[0] = p[1] + [ast.ElseIf(p[4], ast.Block(p[7], lineo=p.lineno(6)),\n lineno=p.lineno(2))]", "metadata": "root.p_new_elseif_list", "header": "['module', '___EOS___']", "index": 278 }, { "content": "def p_new_else_single(p):\n '''new_else_single : empty\n | ELSE COLON inner_statement_list'''\n if len(p) == 4:\n p[0] = ast.Else(ast.Block(p[3], lineno=p.lineno(2)),\n lineno=p.lineno(1))", "metadata": "root.p_new_else_single", "header": "['module', '___EOS___']", "index": 287 }, { "content": "def p_while_statement(p):\n '''while_statement : statement\n | COLON inner_statement_list ENDWHILE SEMI'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = ast.Block(p[2], lineno=p.lineno(1))", "metadata": "root.p_while_statement", "header": "['module', '___EOS___']", "index": 294 }, { "content": "def p_for_expr(p):\n '''for_expr : empty\n | non_empty_for_expr'''\n p[0] = p[1]", "metadata": "root.p_for_expr", "header": "['module', '___EOS___']", "index": 302 }, { "content": "def p_non_empty_for_expr(p):\n '''non_empty_for_expr : non_empty_for_expr COMMA expr\n | expr'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_non_empty_for_expr", "header": "['module', '___EOS___']", "index": 307 }, { "content": "def p_for_statement(p):\n '''for_statement : statement\n | COLON inner_statement_list ENDFOR SEMI'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = ast.Block(p[2], lineno=p.lineno(1))", "metadata": "root.p_for_statement", "header": "['module', '___EOS___']", "index": 315 }, { "content": "def p_foreach_variable(p):\n '''foreach_variable : VARIABLE\n | AND VARIABLE'''\n if len(p) == 2:\n p[0] = ast.ForeachVariable(p[1], False, lineno=p.lineno(1))\n else:\n p[0] = ast.ForeachVariable(p[2], True, lineno=p.lineno(1))", "metadata": "root.p_foreach_variable", "header": "['module', '___EOS___']", "index": 323 }, { "content": "def p_foreach_optional_arg(p):\n '''foreach_optional_arg : empty\n | DOUBLE_ARROW foreach_variable'''\n if len(p) == 3:\n p[0] = p[2]", "metadata": "root.p_foreach_optional_arg", "header": "['module', '___EOS___']", "index": 331 }, { "content": "def p_foreach_statement(p):\n '''foreach_statement : statement\n | COLON inner_statement_list ENDFOREACH SEMI'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = ast.Block(p[2], lineno=p.lineno(1))", "metadata": "root.p_foreach_statement", "header": "['module', '___EOS___']", "index": 337 }, { "content": "def p_switch_case_list(p):\n '''switch_case_list : LBRACE case_list RBRACE\n | LBRACE SEMI case_list RBRACE'''\n if len(p) == 4:\n p[0] = p[2]\n else:\n p[0] = p[3]", "metadata": "root.p_switch_case_list", "header": "['module', '___EOS___']", "index": 345 }, { "content": "def p_switch_case_list_colon(p):\n '''switch_case_list : COLON case_list ENDSWITCH SEMI\n | COLON SEMI case_list ENDSWITCH SEMI'''\n if len(p) == 5:\n p[0] = p[2]\n else:\n p[0] = p[3]", "metadata": "root.p_switch_case_list_colon", "header": "['module', '___EOS___']", "index": 353 }, { "content": "def p_case_list(p):\n '''case_list : empty\n | case_list CASE expr case_separator inner_statement_list\n | case_list DEFAULT case_separator inner_statement_list'''\n if len(p) == 6:\n p[0] = p[1] + [ast.Case(p[3], p[5], lineno=p.lineno(2))]\n elif len(p) == 5:\n p[0] = p[1] + [ast.Default(p[4], lineno=p.lineno(2))]\n else:\n p[0] = []", "metadata": "root.p_case_list", "header": "['module', '___EOS___']", "index": 361 }, { "content": "def p_case_separator(p):\n '''case_separator : COLON\n | SEMI'''\n pass", "metadata": "root.p_case_separator", "header": "['module', '___EOS___']", "index": 372 }, { "content": "def p_global_var_list(p):\n '''global_var_list : global_var_list COMMA global_var\n | global_var'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_global_var_list", "header": "['module', '___EOS___']", "index": 377 }, { "content": "def p_global_var(p):\n '''global_var : VARIABLE\n | DOLLAR variable\n | DOLLAR LBRACE expr RBRACE'''\n if len(p) == 2:\n p[0] = ast.Variable(p[1], lineno=p.lineno(1))\n elif len(p) == 3:\n p[0] = ast.Variable(p[2], lineno=p.lineno(1))\n else:\n p[0] = ast.Variable(p[3], lineno=p.lineno(1))", "metadata": "root.p_global_var", "header": "['module', '___EOS___']", "index": 385 }, { "content": "def p_static_var_list(p):\n '''static_var_list : static_var_list COMMA static_var\n | static_var'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_static_var_list", "header": "['module', '___EOS___']", "index": 396 }, { "content": "def p_static_var(p):\n '''static_var : VARIABLE EQUALS static_scalar\n | VARIABLE'''\n if len(p) == 4:\n p[0] = ast.StaticVariable(p[1], p[3], lineno=p.lineno(1))\n else:\n p[0] = ast.StaticVariable(p[1], None, lineno=p.lineno(1))", "metadata": "root.p_static_var", "header": "['module', '___EOS___']", "index": 404 }, { "content": "def p_echo_expr_list(p):\n '''echo_expr_list : echo_expr_list COMMA expr\n | expr'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_echo_expr_list", "header": "['module', '___EOS___']", "index": 412 }, { "content": "def p_unset_variables(p):\n '''unset_variables : unset_variables COMMA unset_variable\n | unset_variable'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_unset_variables", "header": "['module', '___EOS___']", "index": 420 }, { "content": "def p_unset_variable(p):\n 'unset_variable : variable'\n p[0] = p[1]", "metadata": "root.p_unset_variable", "header": "['module', '___EOS___']", "index": 428 }, { "content": "def p_function_declaration_statement(p):\n 'function_declaration_statement : FUNCTION is_reference STRING LPAREN parameter_list RPAREN LBRACE inner_statement_list RBRACE'\n p[0] = ast.Function(p[3], p[5], p[8], p[2], lineno=p.lineno(1))", "metadata": "root.p_function_declaration_statement", "header": "['module', '___EOS___']", "index": 432 }, { "content": "def p_class_declaration_statement(p):\n '''class_declaration_statement : class_entry_type STRING extends_from implements_list LBRACE class_statement_list RBRACE\n | INTERFACE STRING interface_extends_list LBRACE class_statement_list RBRACE'''\n if len(p) == 8:\n p[0] = ast.Class(p[2], p[1], p[3], p[4], p[6], lineno=p.lineno(2))\n else:\n p[0] = ast.Interface(p[2], p[3], p[5], lineno=p.lineno(1))", "metadata": "root.p_class_declaration_statement", "header": "['module', '___EOS___']", "index": 436 }, { "content": "def p_class_entry_type(p):\n '''class_entry_type : CLASS\n | ABSTRACT CLASS\n | FINAL CLASS'''\n if len(p) == 3:\n p[0] = p[1].lower()", "metadata": "root.p_class_entry_type", "header": "['module', '___EOS___']", "index": 444 }, { "content": "def p_extends_from(p):\n '''extends_from : empty\n | EXTENDS fully_qualified_class_name'''\n if len(p) == 3:\n p[0] = p[2]", "metadata": "root.p_extends_from", "header": "['module', '___EOS___']", "index": 451 }, { "content": "def p_fully_qualified_class_name(p):\n '''fully_qualified_class_name : namespace_name\n | NS_SEPARATOR namespace_name\n | NAMESPACE NS_SEPARATOR namespace_name'''\n if len(p) == 2:\n p[0] = p[1]\n elif len(p) == 3:\n p[0] = p[1] + p[2]\n else:\n p[0] = p[1] + p[2] + p[3]", "metadata": "root.p_fully_qualified_class_name", "header": "['module', '___EOS___']", "index": 457 }, { "content": "def p_implements_list(p):\n '''implements_list : IMPLEMENTS interface_list\n | empty'''\n if len(p) == 3:\n p[0] = p[2]\n else:\n p[0] = []", "metadata": "root.p_implements_list", "header": "['module', '___EOS___']", "index": 468 }, { "content": "def p_class_statement_list(p):\n '''class_statement_list : class_statement_list class_statement\n | empty'''\n\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = []", "metadata": "root.p_class_statement_list", "header": "['module', '___EOS___']", "index": 476 }, { "content": "def p_class_statement(p):\n '''class_statement : method_modifiers FUNCTION is_reference STRING LPAREN parameter_list RPAREN method_body\n | variable_modifiers class_variable_declaration SEMI\n | class_constant_declaration SEMI'''\n if len(p) == 9:\n p[0] = ast.Method(p[4], p[1], p[6], p[8], p[3], lineno=p.lineno(2))\n elif len(p) == 4:\n p[0] = ast.ClassVariables(p[1], p[2], lineno=p.lineno(3))\n else:\n p[0] = ast.ClassConstants(p[1], lineno=p.lineno(2))", "metadata": "root.p_class_statement", "header": "['module', '___EOS___']", "index": 485 }, { "content": "def p_class_variable_declaration_initial(p):\n '''class_variable_declaration : class_variable_declaration COMMA VARIABLE EQUALS static_scalar\n | VARIABLE EQUALS static_scalar'''\n if len(p) == 6:\n p[0] = p[1] + [ast.ClassVariable(p[3], p[5], lineno=p.lineno(2))]\n else:\n p[0] = [ast.ClassVariable(p[1], p[3], lineno=p.lineno(1))]", "metadata": "root.p_class_variable_declaration_initial", "header": "['module', '___EOS___']", "index": 496 }, { "content": "def p_class_variable_declaration_no_initial(p):\n '''class_variable_declaration : class_variable_declaration COMMA VARIABLE\n | VARIABLE'''\n if len(p) == 4:\n p[0] = p[1] + [ast.ClassVariable(p[3], None, lineno=p.lineno(2))]\n else:\n p[0] = [ast.ClassVariable(p[1], None, lineno=p.lineno(1))]", "metadata": "root.p_class_variable_declaration_no_initial", "header": "['module', '___EOS___']", "index": 504 }, { "content": "def p_class_constant_declaration(p):\n '''class_constant_declaration : class_constant_declaration COMMA STRING EQUALS static_scalar\n | CONST STRING EQUALS static_scalar'''\n if len(p) == 6:\n p[0] = p[1] + [ast.ClassConstant(p[3], p[5], lineno=p.lineno(2))]\n else:\n p[0] = [ast.ClassConstant(p[2], p[4], lineno=p.lineno(1))]", "metadata": "root.p_class_constant_declaration", "header": "['module', '___EOS___']", "index": 512 }, { "content": "def p_interface_list(p):\n '''interface_list : interface_list COMMA fully_qualified_class_name\n | fully_qualified_class_name'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_interface_list", "header": "['module', '___EOS___']", "index": 520 }, { "content": "def p_interface_extends_list(p):\n '''interface_extends_list : EXTENDS interface_list\n | empty'''\n if len(p) == 3:\n p[0] = p[2]", "metadata": "root.p_interface_extends_list", "header": "['module', '___EOS___']", "index": 528 }, { "content": "def p_variable_modifiers_non_empty(p):\n 'variable_modifiers : non_empty_member_modifiers'\n p[0] = p[1]", "metadata": "root.p_variable_modifiers_non_empty", "header": "['module', '___EOS___']", "index": 534 }, { "content": "def p_variable_modifiers_var(p):\n 'variable_modifiers : VAR'\n p[0] = []", "metadata": "root.p_variable_modifiers_var", "header": "['module', '___EOS___']", "index": 538 }, { "content": "def p_method_modifiers_non_empty(p):\n 'method_modifiers : non_empty_member_modifiers'\n p[0] = p[1]", "metadata": "root.p_method_modifiers_non_empty", "header": "['module', '___EOS___']", "index": 542 }, { "content": "def p_method_modifiers_empty(p):\n 'method_modifiers : empty'\n p[0] = []", "metadata": "root.p_method_modifiers_empty", "header": "['module', '___EOS___']", "index": 546 }, { "content": "def p_method_body(p):\n '''method_body : LBRACE inner_statement_list RBRACE\n | SEMI'''\n if len(p) == 4:\n p[0] = p[2]\n else:\n p[0] = []", "metadata": "root.p_method_body", "header": "['module', '___EOS___']", "index": 550 }, { "content": "def p_non_empty_member_modifiers(p):\n '''non_empty_member_modifiers : non_empty_member_modifiers member_modifier\n | member_modifier'''\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_non_empty_member_modifiers", "header": "['module', '___EOS___']", "index": 558 }, { "content": "def p_member_modifier(p):\n '''member_modifier : PUBLIC\n | PROTECTED\n | PRIVATE\n | STATIC\n | ABSTRACT\n | FINAL'''\n p[0] = p[1].lower()", "metadata": "root.p_member_modifier", "header": "['module', '___EOS___']", "index": 566 }, { "content": "def p_is_reference(p):\n '''is_reference : AND\n | empty'''\n p[0] = p[1] is not None", "metadata": "root.p_is_reference", "header": "['module', '___EOS___']", "index": 575 }, { "content": "def p_parameter_list(p):\n '''parameter_list : parameter_list COMMA parameter\n | parameter'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_parameter_list", "header": "['module', '___EOS___']", "index": 580 }, { "content": "def p_parameter_list_empty(p):\n 'parameter_list : empty'\n p[0] = []", "metadata": "root.p_parameter_list_empty", "header": "['module', '___EOS___']", "index": 588 }, { "content": "def p_parameter(p):\n '''parameter : VARIABLE\n | class_name VARIABLE\n | AND VARIABLE\n | class_name AND VARIABLE\n | VARIABLE EQUALS static_scalar\n | class_name VARIABLE EQUALS static_scalar\n | AND VARIABLE EQUALS static_scalar\n | class_name AND VARIABLE EQUALS static_scalar'''\n if len(p) == 2: # VARIABLE\n p[0] = ast.FormalParameter(p[1], None, False, None, lineno=p.lineno(1))\n elif len(p) == 3 and p[1] == '&': # AND VARIABLE\n p[0] = ast.FormalParameter(p[2], None, True, None, lineno=p.lineno(1))\n elif len(p) == 3 and p[1] != '&': # STRING VARIABLE \n p[0] = ast.FormalParameter(p[2], None, False, p[1], lineno=p.lineno(1))\n elif len(p) == 4 and p[2] != '&': # VARIABLE EQUALS static_scalar \n p[0] = ast.FormalParameter(p[1], p[3], False, None, lineno=p.lineno(1))\n elif len(p) == 4 and p[2] == '&': # STRING AND VARIABLE\n p[0] = ast.FormalParameter(p[3], None, True, p[1], lineno=p.lineno(1))\n elif len(p) == 5 and p[1] == '&': # AND VARIABLE EQUALS static_scalar\n p[0] = ast.FormalParameter(p[2], p[4], True, None, lineno=p.lineno(1))\n elif len(p) == 5 and p[1] != '&': # class_name VARIABLE EQUALS static_scalar\n p[0] = ast.FormalParameter(p[2], p[4], False, p[1], lineno=p.lineno(1))\n else: # STRING AND VARIABLE EQUALS static_scalar\n p[0] = ast.FormalParameter(p[3], p[5], True, p[1], lineno=p.lineno(1))", "metadata": "root.p_parameter", "header": "['module', '___EOS___']", "index": 592 }, { "content": "def p_expr_variable(p):\n 'expr : variable'\n p[0] = p[1]", "metadata": "root.p_expr_variable", "header": "['module', '___EOS___']", "index": 618 }, { "content": "def p_expr_assign(p):\n '''expr : variable EQUALS expr\n | variable EQUALS AND expr'''\n if len(p) == 5:\n p[0] = ast.Assignment(p[1], p[4], True, lineno=p.lineno(2))\n else:\n p[0] = ast.Assignment(p[1], p[3], False, lineno=p.lineno(2))", "metadata": "root.p_expr_assign", "header": "['module', '___EOS___']", "index": 622 }, { "content": "def p_expr_new(p):\n 'expr : NEW class_name_reference ctor_arguments'\n p[0] = ast.New(p[2], p[3], lineno=p.lineno(1))", "metadata": "root.p_expr_new", "header": "['module', '___EOS___']", "index": 630 }, { "content": "def p_class_name_reference(p):\n '''class_name_reference : class_name\n | dynamic_class_name_reference'''\n p[0] = p[1]", "metadata": "root.p_class_name_reference", "header": "['module', '___EOS___']", "index": 634 }, { "content": "def p_class_name(p):\n '''class_name : namespace_name\n | NS_SEPARATOR namespace_name\n | NAMESPACE NS_SEPARATOR namespace_name'''\n if len(p) == 2:\n p[0] = p[1]\n elif len(p) == 3:\n p[0] = p[1] + p[2]\n else:\n p[0] = p[1] + p[2] + p[3]", "metadata": "root.p_class_name", "header": "['module', '___EOS___']", "index": 639 }, { "content": "def p_class_name_static(p):\n 'class_name : STATIC'\n p[0] = p[1].lower()", "metadata": "root.p_class_name_static", "header": "['module', '___EOS___']", "index": 650 }, { "content": "def p_dynamic_class_name_reference(p):\n '''dynamic_class_name_reference : base_variable OBJECT_OPERATOR object_property dynamic_class_name_variable_properties\n | base_variable'''\n if len(p) == 5:\n name, dims = p[3]\n p[0] = ast.ObjectProperty(p[1], name, lineno=p.lineno(2))\n for class_, dim, lineno in dims:\n p[0] = class_(p[0], dim, lineno=lineno)\n for name, dims in p[4]:\n p[0] = ast.ObjectProperty(p[0], name, lineno=p.lineno(2))\n for class_, dim, lineno in dims:\n p[0] = class_(p[0], dim, lineno=lineno)\n else:\n p[0] = p[1]", "metadata": "root.p_dynamic_class_name_reference", "header": "['module', '___EOS___']", "index": 654 }, { "content": "def p_dynamic_class_name_variable_properties(p):\n '''dynamic_class_name_variable_properties : dynamic_class_name_variable_properties dynamic_class_name_variable_property\n | empty'''\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = []", "metadata": "root.p_dynamic_class_name_variable_properties", "header": "['module', '___EOS___']", "index": 669 }, { "content": "def p_dynamic_class_name_variable_property(p):\n 'dynamic_class_name_variable_property : OBJECT_OPERATOR object_property'\n p[0] = p[2]", "metadata": "root.p_dynamic_class_name_variable_property", "header": "['module', '___EOS___']", "index": 677 }, { "content": "def p_ctor_arguments(p):\n '''ctor_arguments : LPAREN function_call_parameter_list RPAREN\n | empty'''\n if len(p) == 4:\n p[0] = p[2]\n else:\n p[0] = []", "metadata": "root.p_ctor_arguments", "header": "['module', '___EOS___']", "index": 681 }, { "content": "def p_expr_clone(p):\n 'expr : CLONE expr'\n p[0] = ast.Clone(p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_clone", "header": "['module', '___EOS___']", "index": 689 }, { "content": "def p_expr_list_assign(p):\n 'expr : LIST LPAREN assignment_list RPAREN EQUALS expr'\n p[0] = ast.ListAssignment(p[3], p[6], lineno=p.lineno(1))", "metadata": "root.p_expr_list_assign", "header": "['module', '___EOS___']", "index": 693 }, { "content": "def p_assignment_list(p):\n '''assignment_list : assignment_list COMMA assignment_list_element\n | assignment_list_element'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_assignment_list", "header": "['module', '___EOS___']", "index": 697 }, { "content": "def p_assignment_list_element(p):\n '''assignment_list_element : variable\n | empty\n | LIST LPAREN assignment_list RPAREN'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = p[3]", "metadata": "root.p_assignment_list_element", "header": "['module', '___EOS___']", "index": 705 }, { "content": "def p_variable(p):\n '''variable : base_variable_with_function_calls OBJECT_OPERATOR object_property method_or_not variable_properties\n | base_variable_with_function_calls'''\n if len(p) == 6:\n name, dims = p[3]\n params = p[4]\n if params is not None:\n p[0] = ast.MethodCall(p[1], name, params, lineno=p.lineno(2))\n else:\n p[0] = ast.ObjectProperty(p[1], name, lineno=p.lineno(2))\n for class_, dim, lineno in dims:\n p[0] = class_(p[0], dim, lineno=lineno)\n for (name, dims), params in p[5]:\n if params is not None:\n p[0] = ast.MethodCall(p[0], name, params, lineno=p.lineno(2))\n else:\n p[0] = ast.ObjectProperty(p[0], name, lineno=p.lineno(2))\n for class_, dim, lineno in dims:\n p[0] = class_(p[0], dim, lineno=lineno)\n else:\n p[0] = p[1]", "metadata": "root.p_variable", "header": "['module', '___EOS___']", "index": 714 }, { "content": "def p_base_variable_with_function_calls(p):\n '''base_variable_with_function_calls : base_variable\n | function_call'''\n p[0] = p[1]", "metadata": "root.p_base_variable_with_function_calls", "header": "['module', '___EOS___']", "index": 736 }, { "content": "def p_function_call(p):\n '''function_call : namespace_name LPAREN function_call_parameter_list RPAREN\n | NS_SEPARATOR namespace_name LPAREN function_call_parameter_list RPAREN\n | NAMESPACE NS_SEPARATOR namespace_name LPAREN function_call_parameter_list RPAREN'''\n if len(p) == 5:\n p[0] = ast.FunctionCall(p[1], p[3], lineno=p.lineno(2))\n elif len(p) == 6:\n p[0] = ast.FunctionCall(p[1] + p[2], p[4], lineno=p.lineno(1))\n else:\n p[0] = ast.FunctionCall(p[1] + p[2] + p[3], p[5], lineno=p.lineno(1))", "metadata": "root.p_function_call", "header": "['module', '___EOS___']", "index": 741 }, { "content": "def p_function_call_static(p):\n '''function_call : class_name DOUBLE_COLON STRING LPAREN function_call_parameter_list RPAREN\n | class_name DOUBLE_COLON variable_without_objects LPAREN function_call_parameter_list RPAREN\n | variable_class_name DOUBLE_COLON STRING LPAREN function_call_parameter_list RPAREN\n | variable_class_name DOUBLE_COLON variable_without_objects LPAREN function_call_parameter_list RPAREN'''\n p[0] = ast.StaticMethodCall(p[1], p[3], p[5], lineno=p.lineno(2))", "metadata": "root.p_function_call_static", "header": "['module', '___EOS___']", "index": 752 }, { "content": "def p_function_call_variable(p):\n 'function_call : variable_without_objects LPAREN function_call_parameter_list RPAREN'\n p[0] = ast.FunctionCall(p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_function_call_variable", "header": "['module', '___EOS___']", "index": 759 }, { "content": "def p_method_or_not(p):\n '''method_or_not : LPAREN function_call_parameter_list RPAREN\n | empty'''\n if len(p) == 4:\n p[0] = p[2]", "metadata": "root.p_method_or_not", "header": "['module', '___EOS___']", "index": 763 }, { "content": "def p_variable_properties(p):\n '''variable_properties : variable_properties variable_property\n | empty'''\n if len(p) == 3:\n p[0] = p[1] + [p[2]]\n else:\n p[0] = []", "metadata": "root.p_variable_properties", "header": "['module', '___EOS___']", "index": 769 }, { "content": "def p_variable_property(p):\n 'variable_property : OBJECT_OPERATOR object_property method_or_not'\n p[0] = (p[2], p[3])", "metadata": "root.p_variable_property", "header": "['module', '___EOS___']", "index": 777 }, { "content": "def p_base_variable(p):\n '''base_variable : simple_indirect_reference\n | static_member'''\n p[0] = p[1]", "metadata": "root.p_base_variable", "header": "['module', '___EOS___']", "index": 781 }, { "content": "def p_simple_indirect_reference(p):\n '''simple_indirect_reference : DOLLAR simple_indirect_reference\n | reference_variable'''\n if len(p) == 3:\n p[0] = ast.Variable(p[2], lineno=p.lineno(1))\n else:\n p[0] = p[1]", "metadata": "root.p_simple_indirect_reference", "header": "['module', '___EOS___']", "index": 786 }, { "content": "def p_static_member(p):\n '''static_member : class_name DOUBLE_COLON variable_without_objects\n | variable_class_name DOUBLE_COLON variable_without_objects'''\n p[0] = ast.StaticProperty(p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_static_member", "header": "['module', '___EOS___']", "index": 794 }, { "content": "def p_variable_class_name(p):\n 'variable_class_name : reference_variable'\n p[0] = p[1]", "metadata": "root.p_variable_class_name", "header": "['module', '___EOS___']", "index": 799 }, { "content": "def p_reference_variable_array_offset(p):\n 'reference_variable : reference_variable LBRACKET dim_offset RBRACKET'\n p[0] = ast.ArrayOffset(p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_reference_variable_array_offset", "header": "['module', '___EOS___']", "index": 803 }, { "content": "def p_reference_variable_string_offset(p):\n 'reference_variable : reference_variable LBRACE expr RBRACE'\n p[0] = ast.StringOffset(p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_reference_variable_string_offset", "header": "['module', '___EOS___']", "index": 807 }, { "content": "def p_reference_variable_compound_variable(p):\n 'reference_variable : compound_variable'\n p[0] = p[1]", "metadata": "root.p_reference_variable_compound_variable", "header": "['module', '___EOS___']", "index": 811 }, { "content": "def p_compound_variable(p):\n '''compound_variable : VARIABLE\n | DOLLAR LBRACE expr RBRACE'''\n if len(p) == 2:\n p[0] = ast.Variable(p[1], lineno=p.lineno(1))\n else:\n p[0] = ast.Variable(p[3], lineno=p.lineno(1))", "metadata": "root.p_compound_variable", "header": "['module', '___EOS___']", "index": 815 }, { "content": "def p_dim_offset(p):\n '''dim_offset : expr\n | empty'''\n p[0] = p[1]", "metadata": "root.p_dim_offset", "header": "['module', '___EOS___']", "index": 823 }, { "content": "def p_object_property(p):\n '''object_property : variable_name object_dim_list\n | variable_without_objects'''\n if len(p) == 3:\n p[0] = (p[1], p[2])\n else:\n p[0] = (p[1], [])", "metadata": "root.p_object_property", "header": "['module', '___EOS___']", "index": 828 }, { "content": "def p_object_dim_list_empty(p):\n 'object_dim_list : empty'\n p[0] = []", "metadata": "root.p_object_dim_list_empty", "header": "['module', '___EOS___']", "index": 836 }, { "content": "def p_object_dim_list_array_offset(p):\n 'object_dim_list : object_dim_list LBRACKET dim_offset RBRACKET'\n p[0] = p[1] + [(ast.ArrayOffset, p[3], p.lineno(2))]", "metadata": "root.p_object_dim_list_array_offset", "header": "['module', '___EOS___']", "index": 840 }, { "content": "def p_object_dim_list_string_offset(p):\n 'object_dim_list : object_dim_list LBRACE expr RBRACE'\n p[0] = p[1] + [(ast.StringOffset, p[3], p.lineno(2))]", "metadata": "root.p_object_dim_list_string_offset", "header": "['module', '___EOS___']", "index": 844 }, { "content": "def p_variable_name(p):\n '''variable_name : STRING\n | LBRACE expr RBRACE'''\n if len(p) == 2:\n p[0] = p[1]\n else:\n p[0] = p[2]", "metadata": "root.p_variable_name", "header": "['module', '___EOS___']", "index": 848 }, { "content": "def p_variable_without_objects(p):\n 'variable_without_objects : simple_indirect_reference'\n p[0] = p[1]", "metadata": "root.p_variable_without_objects", "header": "['module', '___EOS___']", "index": 856 }, { "content": "def p_expr_scalar(p):\n 'expr : scalar'\n p[0] = p[1]", "metadata": "root.p_expr_scalar", "header": "['module', '___EOS___']", "index": 860 }, { "content": "def p_expr_array(p):\n 'expr : ARRAY LPAREN array_pair_list RPAREN'\n p[0] = ast.Array(p[3], lineno=p.lineno(1))", "metadata": "root.p_expr_array", "header": "['module', '___EOS___']", "index": 864 }, { "content": "def p_array_pair_list(p):\n '''array_pair_list : empty\n | non_empty_array_pair_list possible_comma'''\n if len(p) == 2:\n p[0] = []\n else:\n p[0] = p[1]", "metadata": "root.p_array_pair_list", "header": "['module', '___EOS___']", "index": 868 }, { "content": "def p_non_empty_array_pair_list_item(p):\n '''non_empty_array_pair_list : non_empty_array_pair_list COMMA AND variable\n | non_empty_array_pair_list COMMA expr\n | AND variable\n | expr'''\n if len(p) == 5:\n p[0] = p[1] + [ast.ArrayElement(None, p[4], True, lineno=p.lineno(2))]\n elif len(p) == 4:\n p[0] = p[1] + [ast.ArrayElement(None, p[3], False, lineno=p.lineno(2))]\n elif len(p) == 3:\n p[0] = [ast.ArrayElement(None, p[2], True, lineno=p.lineno(1))]\n else:\n p[0] = [ast.ArrayElement(None, p[1], False, lineno=p.lineno(1))]", "metadata": "root.p_non_empty_array_pair_list_item", "header": "['module', '___EOS___']", "index": 876 }, { "content": "def p_non_empty_array_pair_list_pair(p):\n '''non_empty_array_pair_list : non_empty_array_pair_list COMMA expr DOUBLE_ARROW AND variable\n | non_empty_array_pair_list COMMA expr DOUBLE_ARROW expr\n | expr DOUBLE_ARROW AND variable\n | expr DOUBLE_ARROW expr'''\n if len(p) == 7:\n p[0] = p[1] + [ast.ArrayElement(p[3], p[6], True, lineno=p.lineno(2))]\n elif len(p) == 6:\n p[0] = p[1] + [ast.ArrayElement(p[3], p[5], False, lineno=p.lineno(2))]\n elif len(p) == 5:\n p[0] = [ast.ArrayElement(p[1], p[4], True, lineno=p.lineno(2))]\n else:\n p[0] = [ast.ArrayElement(p[1], p[3], False, lineno=p.lineno(2))]", "metadata": "root.p_non_empty_array_pair_list_pair", "header": "['module', '___EOS___']", "index": 890 }, { "content": "def p_possible_comma(p):\n '''possible_comma : empty\n | COMMA'''\n pass", "metadata": "root.p_possible_comma", "header": "['module', '___EOS___']", "index": 904 }, { "content": "def p_function_call_parameter_list(p):\n '''function_call_parameter_list : function_call_parameter_list COMMA function_call_parameter\n | function_call_parameter'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_function_call_parameter_list", "header": "['module', '___EOS___']", "index": 909 }, { "content": "def p_function_call_parameter_list_empty(p):\n 'function_call_parameter_list : empty'\n p[0] = []", "metadata": "root.p_function_call_parameter_list_empty", "header": "['module', '___EOS___']", "index": 917 }, { "content": "def p_function_call_parameter(p):\n '''function_call_parameter : expr\n | AND variable'''\n if len(p) == 2:\n p[0] = ast.Parameter(p[1], False, lineno=p.lineno(1))\n else:\n p[0] = ast.Parameter(p[2], True, lineno=p.lineno(1))", "metadata": "root.p_function_call_parameter", "header": "['module', '___EOS___']", "index": 921 }, { "content": "def p_expr_function(p):\n 'expr : FUNCTION is_reference LPAREN parameter_list RPAREN lexical_vars LBRACE inner_statement_list RBRACE'\n p[0] = ast.Closure(p[4], p[6], p[8], p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_function", "header": "['module', '___EOS___']", "index": 929 }, { "content": "def p_lexical_vars(p):\n '''lexical_vars : USE LPAREN lexical_var_list RPAREN\n | empty'''\n if len(p) == 5:\n p[0] = p[3]\n else:\n p[0] = []", "metadata": "root.p_lexical_vars", "header": "['module', '___EOS___']", "index": 933 }, { "content": "def p_lexical_var_list(p):\n '''lexical_var_list : lexical_var_list COMMA AND VARIABLE\n | lexical_var_list COMMA VARIABLE\n | AND VARIABLE\n | VARIABLE'''\n if len(p) == 5:\n p[0] = p[1] + [ast.LexicalVariable(p[4], True, lineno=p.lineno(2))]\n elif len(p) == 4:\n p[0] = p[1] + [ast.LexicalVariable(p[3], False, lineno=p.lineno(2))]\n elif len(p) == 3:\n p[0] = [ast.LexicalVariable(p[2], True, lineno=p.lineno(1))]\n else:\n p[0] = [ast.LexicalVariable(p[1], False, lineno=p.lineno(1))]", "metadata": "root.p_lexical_var_list", "header": "['module', '___EOS___']", "index": 941 }, { "content": "def p_expr_assign_op(p):\n '''expr : variable PLUS_EQUAL expr\n | variable MINUS_EQUAL expr\n | variable MUL_EQUAL expr\n | variable DIV_EQUAL expr\n | variable CONCAT_EQUAL expr\n | variable MOD_EQUAL expr\n | variable AND_EQUAL expr\n | variable OR_EQUAL expr\n | variable XOR_EQUAL expr\n | variable SL_EQUAL expr\n | variable SR_EQUAL expr'''\n p[0] = ast.AssignOp(p[2], p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_expr_assign_op", "header": "['module', '___EOS___']", "index": 955 }, { "content": "def p_expr_binary_op(p):\n '''expr : expr BOOLEAN_AND expr\n | expr BOOLEAN_OR expr\n | expr LOGICAL_AND expr\n | expr LOGICAL_OR expr\n | expr LOGICAL_XOR expr\n | expr AND expr\n | expr OR expr\n | expr XOR expr\n | expr CONCAT expr\n | expr PLUS expr\n | expr MINUS expr\n | expr MUL expr\n | expr DIV expr\n | expr SL expr\n | expr SR expr\n | expr MOD expr\n | expr IS_IDENTICAL expr\n | expr IS_NOT_IDENTICAL expr\n | expr IS_EQUAL expr\n | expr IS_NOT_EQUAL expr\n | expr IS_SMALLER expr\n | expr IS_SMALLER_OR_EQUAL expr\n | expr IS_GREATER expr\n | expr IS_GREATER_OR_EQUAL expr\n | expr INSTANCEOF expr'''\n p[0] = ast.BinaryOp(p[2].lower(), p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_expr_binary_op", "header": "['module', '___EOS___']", "index": 969 }, { "content": "def p_expr_unary_op(p):\n '''expr : PLUS expr\n | MINUS expr\n | NOT expr\n | BOOLEAN_NOT expr'''\n p[0] = ast.UnaryOp(p[1], p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_unary_op", "header": "['module', '___EOS___']", "index": 997 }, { "content": "def p_expr_ternary_op(p):\n 'expr : expr QUESTION expr COLON expr'\n p[0] = ast.TernaryOp(p[1], p[3], p[5], lineno=p.lineno(2))", "metadata": "root.p_expr_ternary_op", "header": "['module', '___EOS___']", "index": 1004 }, { "content": "def p_expr_pre_incdec(p):\n '''expr : INC variable\n | DEC variable'''\n p[0] = ast.PreIncDecOp(p[1], p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_pre_incdec", "header": "['module', '___EOS___']", "index": 1008 }, { "content": "def p_expr_post_incdec(p):\n '''expr : variable INC\n | variable DEC'''\n p[0] = ast.PostIncDecOp(p[2], p[1], lineno=p.lineno(2))", "metadata": "root.p_expr_post_incdec", "header": "['module', '___EOS___']", "index": 1013 }, { "content": "def p_expr_cast_int(p):\n 'expr : INT_CAST expr'\n p[0] = ast.Cast('int', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_int", "header": "['module', '___EOS___']", "index": 1018 }, { "content": "def p_expr_cast_double(p):\n 'expr : DOUBLE_CAST expr'\n p[0] = ast.Cast('double', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_double", "header": "['module', '___EOS___']", "index": 1022 }, { "content": "def p_expr_cast_string(p):\n 'expr : STRING_CAST expr'\n p[0] = ast.Cast('string', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_string", "header": "['module', '___EOS___']", "index": 1026 }, { "content": "def p_expr_cast_array(p):\n 'expr : ARRAY_CAST expr'\n p[0] = ast.Cast('array', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_array", "header": "['module', '___EOS___']", "index": 1030 }, { "content": "def p_expr_cast_object(p):\n 'expr : OBJECT_CAST expr'\n p[0] = ast.Cast('object', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_object", "header": "['module', '___EOS___']", "index": 1034 }, { "content": "def p_expr_cast_bool(p):\n 'expr : BOOL_CAST expr'\n p[0] = ast.Cast('bool', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_bool", "header": "['module', '___EOS___']", "index": 1038 }, { "content": "def p_expr_cast_unset(p):\n 'expr : UNSET_CAST expr'\n p[0] = ast.Cast('unset', p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_cast_unset", "header": "['module', '___EOS___']", "index": 1042 }, { "content": "def p_expr_isset(p):\n 'expr : ISSET LPAREN isset_variables RPAREN'\n p[0] = ast.IsSet(p[3], lineno=p.lineno(1))", "metadata": "root.p_expr_isset", "header": "['module', '___EOS___']", "index": 1046 }, { "content": "def p_isset_variables(p):\n '''isset_variables : isset_variables COMMA variable\n | variable'''\n if len(p) == 4:\n p[0] = p[1] + [p[3]]\n else:\n p[0] = [p[1]]", "metadata": "root.p_isset_variables", "header": "['module', '___EOS___']", "index": 1050 }, { "content": "def p_expr_empty(p):\n 'expr : EMPTY LPAREN expr RPAREN'\n p[0] = ast.Empty(p[3], lineno=p.lineno(1))", "metadata": "root.p_expr_empty", "header": "['module', '___EOS___']", "index": 1058 }, { "content": "def p_expr_eval(p):\n 'expr : EVAL LPAREN expr RPAREN'\n p[0] = ast.Eval(p[3], lineno=p.lineno(1))", "metadata": "root.p_expr_eval", "header": "['module', '___EOS___']", "index": 1062 }, { "content": "def p_expr_include(p):\n 'expr : INCLUDE expr'\n p[0] = ast.Include(p[2], False, lineno=p.lineno(1))", "metadata": "root.p_expr_include", "header": "['module', '___EOS___']", "index": 1066 }, { "content": "def p_expr_include_once(p):\n 'expr : INCLUDE_ONCE expr'\n p[0] = ast.Include(p[2], True, lineno=p.lineno(1))", "metadata": "root.p_expr_include_once", "header": "['module', '___EOS___']", "index": 1070 }, { "content": "def p_expr_require(p):\n 'expr : REQUIRE expr'\n p[0] = ast.Require(p[2], False, lineno=p.lineno(1))", "metadata": "root.p_expr_require", "header": "['module', '___EOS___']", "index": 1074 }, { "content": "def p_expr_require_once(p):\n 'expr : REQUIRE_ONCE expr'\n p[0] = ast.Require(p[2], True, lineno=p.lineno(1))", "metadata": "root.p_expr_require_once", "header": "['module', '___EOS___']", "index": 1078 }, { "content": "def p_expr_exit(p):\n '''expr : EXIT\n | EXIT LPAREN RPAREN\n | EXIT LPAREN expr RPAREN'''\n if len(p) == 5:\n p[0] = ast.Exit(p[3], lineno=p.lineno(1))\n else:\n p[0] = ast.Exit(None, lineno=p.lineno(1))", "metadata": "root.p_expr_exit", "header": "['module', '___EOS___']", "index": 1082 }, { "content": "def p_expr_print(p):\n 'expr : PRINT expr'\n p[0] = ast.Print(p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_print", "header": "['module', '___EOS___']", "index": 1091 }, { "content": "def p_expr_silence(p):\n 'expr : AT expr'\n p[0] = ast.Silence(p[2], lineno=p.lineno(1))", "metadata": "root.p_expr_silence", "header": "['module', '___EOS___']", "index": 1095 }, { "content": "def p_expr_group(p):\n 'expr : LPAREN expr RPAREN'\n p[0] = p[2]", "metadata": "root.p_expr_group", "header": "['module', '___EOS___']", "index": 1099 }, { "content": "def p_scalar(p):\n '''scalar : class_constant\n | common_scalar\n | QUOTE encaps_list QUOTE\n | START_HEREDOC encaps_list END_HEREDOC'''\n if len(p) == 4:\n p[0] = p[2]\n else:\n p[0] = p[1]", "metadata": "root.p_scalar", "header": "['module', '___EOS___']", "index": 1103 }, { "content": "def p_scalar_string_varname(p):\n 'scalar : STRING_VARNAME'\n p[0] = ast.Variable('$' + p[1], lineno=p.lineno(1))", "metadata": "root.p_scalar_string_varname", "header": "['module', '___EOS___']", "index": 1113 }, { "content": "def p_scalar_namespace_name(p):\n '''scalar : namespace_name\n | NS_SEPARATOR namespace_name\n | NAMESPACE NS_SEPARATOR namespace_name'''\n if len(p) == 2:\n p[0] = ast.Constant(p[1], lineno=p.lineno(1))\n elif len(p) == 3:\n p[0] = ast.Constant(p[1] + p[2], lineno=p.lineno(1))\n else:\n p[0] = ast.Constant(p[1] + p[2] + p[3], lineno=p.lineno(1))", "metadata": "root.p_scalar_namespace_name", "header": "['module', '___EOS___']", "index": 1117 }, { "content": "def p_class_constant(p):\n '''class_constant : class_name DOUBLE_COLON STRING\n | variable_class_name DOUBLE_COLON STRING'''\n p[0] = ast.StaticProperty(p[1], p[3], lineno=p.lineno(2))", "metadata": "root.p_class_constant", "header": "['module', '___EOS___']", "index": 1128 }, { "content": "def p_common_scalar_lnumber(p):\n 'common_scalar : LNUMBER'\n if p[1].startswith('0x'):\n p[0] = int(p[1], 16)\n elif p[1].startswith('0'):\n p[0] = int(p[1], 8)\n else:\n p[0] = int(p[1])", "metadata": "root.p_common_scalar_lnumber", "header": "['module', '___EOS___']", "index": 1133 }, { "content": "def p_common_scalar_dnumber(p):\n 'common_scalar : DNUMBER'\n p[0] = float(p[1])", "metadata": "root.p_common_scalar_dnumber", "header": "['module', '___EOS___']", "index": 1142 }, { "content": "def p_common_scalar_string(p):\n 'common_scalar : CONSTANT_ENCAPSED_STRING'\n p[0] = p[1][1:-1].replace(\"\\\\'\", \"'\").replace('\\\\\\\\', '\\\\')", "metadata": "root.p_common_scalar_string", "header": "['module', '___EOS___']", "index": 1146 }, { "content": "def p_common_scalar_magic_line(p):\n 'common_scalar : LINE'\n p[0] = ast.MagicConstant(p[1].upper(), p.lineno(1), lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_line", "header": "['module', '___EOS___']", "index": 1150 }, { "content": "def p_common_scalar_magic_file(p):\n 'common_scalar : FILE'\n value = getattr(p.lexer, 'filename', None)\n p[0] = ast.MagicConstant(p[1].upper(), value, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_file", "header": "['module', '___EOS___']", "index": 1154 }, { "content": "def p_common_scalar_magic_dir(p):\n 'common_scalar : DIR'\n value = getattr(p.lexer, 'filename', None)\n if value is not None:\n value = os.path.dirname(value)\n p[0] = ast.MagicConstant(p[1].upper(), value, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_dir", "header": "['module', '___EOS___']", "index": 1159 }, { "content": "def p_common_scalar_magic_class(p):\n 'common_scalar : CLASS_C'\n p[0] = ast.MagicConstant(p[1].upper(), None, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_class", "header": "['module', '___EOS___']", "index": 1166 }, { "content": "def p_common_scalar_magic_method(p):\n 'common_scalar : METHOD_C'\n p[0] = ast.MagicConstant(p[1].upper(), None, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_method", "header": "['module', '___EOS___']", "index": 1170 }, { "content": "def p_common_scalar_magic_func(p):\n 'common_scalar : FUNC_C'\n p[0] = ast.MagicConstant(p[1].upper(), None, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_func", "header": "['module', '___EOS___']", "index": 1174 }, { "content": "def p_common_scalar_magic_ns(p):\n 'common_scalar : NS_C'\n p[0] = ast.MagicConstant(p[1].upper(), None, lineno=p.lineno(1))", "metadata": "root.p_common_scalar_magic_ns", "header": "['module', '___EOS___']", "index": 1178 }, { "content": "def p_static_scalar(p):\n '''static_scalar : common_scalar\n | QUOTE QUOTE\n | QUOTE ENCAPSED_AND_WHITESPACE QUOTE'''\n if len(p) == 2:\n p[0] = p[1]\n elif len(p) == 3:\n p[0] = ''\n else:\n p[0] = p[2].decode('string_escape')", "metadata": "root.p_static_scalar", "header": "['module', '___EOS___']", "index": 1182 }, { "content": "def p_static_scalar_namespace_name(p):\n '''static_scalar : namespace_name\n | NS_SEPARATOR namespace_name\n | NAMESPACE NS_SEPARATOR namespace_name'''\n if len(p) == 2:\n p[0] = ast.Constant(p[1], lineno=p.lineno(1))\n elif len(p) == 3:\n p[0] = ast.Constant(p[1] + p[2], lineno=p.lineno(1))\n else:\n p[0] = ast.Constant(p[1] + p[2] + p[3], lineno=p.lineno(1))", "metadata": "root.p_static_scalar_namespace_name", "header": "['module', '___EOS___']", "index": 1193 }, { "content": "def p_static_scalar_unary_op(p):\n '''static_scalar : PLUS static_scalar\n | MINUS static_scalar'''\n p[0] = ast.UnaryOp(p[1], p[2], lineno=p.lineno(1))", "metadata": "root.p_static_scalar_unary_op", "header": "['module', '___EOS___']", "index": 1204 }, { "content": "def p_static_scalar_array(p):\n 'static_scalar : ARRAY LPAREN static_array_pair_list RPAREN'\n p[0] = ast.Array(p[3], lineno=p.lineno(1))", "metadata": "root.p_static_scalar_array", "header": "['module', '___EOS___']", "index": 1209 }, { "content": "def p_static_array_pair_list(p):\n '''static_array_pair_list : empty\n | static_non_empty_array_pair_list possible_comma'''\n if len(p) == 2:\n p[0] = []\n else:\n p[0] = p[1]", "metadata": "root.p_static_array_pair_list", "header": "['module', '___EOS___']", "index": 1213 }, { "content": "def p_static_non_empty_array_pair_list_item(p):\n '''static_non_empty_array_pair_list : static_non_empty_array_pair_list COMMA static_scalar\n | static_scalar'''\n if len(p) == 4:\n p[0] = p[1] + [ast.ArrayElement(None, p[3], False, lineno=p.lineno(2))]\n else:\n p[0] = [ast.ArrayElement(None, p[1], False, lineno=p.lineno(1))]", "metadata": "root.p_static_non_empty_array_pair_list_item", "header": "['module', '___EOS___']", "index": 1221 }, { "content": "def p_static_non_empty_array_pair_list_pair(p):\n '''static_non_empty_array_pair_list : static_non_empty_array_pair_list COMMA static_scalar DOUBLE_ARROW static_scalar\n | static_scalar DOUBLE_ARROW static_scalar'''\n if len(p) == 6:\n p[0] = p[1] + [ast.ArrayElement(p[3], p[5], False, lineno=p.lineno(2))]\n else:\n p[0] = [ast.ArrayElement(p[1], p[3], False, lineno=p.lineno(2))]", "metadata": "root.p_static_non_empty_array_pair_list_pair", "header": "['module', '___EOS___']", "index": 1229 }, { "content": "def p_namespace_name(p):\n '''namespace_name : namespace_name NS_SEPARATOR STRING\n | STRING'''\n if len(p) == 4:\n p[0] = p[1] + p[2] + p[3]\n else:\n p[0] = p[1]", "metadata": "root.p_namespace_name", "header": "['module', '___EOS___']", "index": 1237 }, { "content": "def p_encaps_list(p):\n '''encaps_list : encaps_list encaps_var\n | empty'''\n if len(p) == 3:\n if p[1] == '':\n p[0] = p[2]\n else:\n p[0] = ast.BinaryOp('.', p[1], p[2], lineno=p.lineno(2))\n else:\n p[0] = ''", "metadata": "root.p_encaps_list", "header": "['module', '___EOS___']", "index": 1245 }, { "content": "def p_encaps_list_string(p):\n 'encaps_list : encaps_list ENCAPSED_AND_WHITESPACE'\n if p[1] == '':\n p[0] = p[2].decode('string_escape')\n else:\n p[0] = ast.BinaryOp('.', p[1], p[2].decode('string_escape'),\n lineno=p.lineno(2))", "metadata": "root.p_encaps_list_string", "header": "['module', '___EOS___']", "index": 1256 }, { "content": "def p_encaps_var(p):\n 'encaps_var : VARIABLE'\n p[0] = ast.Variable(p[1], lineno=p.lineno(1))", "metadata": "root.p_encaps_var", "header": "['module', '___EOS___']", "index": 1264 }, { "content": "def p_encaps_var_array_offset(p):\n 'encaps_var : VARIABLE LBRACKET encaps_var_offset RBRACKET'\n p[0] = ast.ArrayOffset(ast.Variable(p[1], lineno=p.lineno(1)), p[3],\n lineno=p.lineno(2))", "metadata": "root.p_encaps_var_array_offset", "header": "['module', '___EOS___']", "index": 1268 }, { "content": "def p_encaps_var_object_property(p):\n 'encaps_var : VARIABLE OBJECT_OPERATOR STRING'\n p[0] = ast.ObjectProperty(ast.Variable(p[1], lineno=p.lineno(1)), p[3],\n lineno=p.lineno(2))", "metadata": "root.p_encaps_var_object_property", "header": "['module', '___EOS___']", "index": 1273 }, { "content": "def p_encaps_var_dollar_curly_expr(p):\n 'encaps_var : DOLLAR_OPEN_CURLY_BRACES expr RBRACE'\n p[0] = p[2]", "metadata": "root.p_encaps_var_dollar_curly_expr", "header": "['module', '___EOS___']", "index": 1278 }, { "content": "def p_encaps_var_dollar_curly_array_offset(p):\n 'encaps_var : DOLLAR_OPEN_CURLY_BRACES STRING_VARNAME LBRACKET expr RBRACKET RBRACE'\n p[0] = ast.ArrayOffset(ast.Variable('$' + p[2], lineno=p.lineno(2)), p[4],\n lineno=p.lineno(3))", "metadata": "root.p_encaps_var_dollar_curly_array_offset", "header": "['module', '___EOS___']", "index": 1282 }, { "content": "def p_encaps_var_curly_variable(p):\n 'encaps_var : CURLY_OPEN variable RBRACE'\n p[0] = p[2]", "metadata": "root.p_encaps_var_curly_variable", "header": "['module', '___EOS___']", "index": 1287 }, { "content": "def p_encaps_var_offset_string(p):\n 'encaps_var_offset : STRING'\n p[0] = p[1]", "metadata": "root.p_encaps_var_offset_string", "header": "['module', '___EOS___']", "index": 1291 }, { "content": "def p_encaps_var_offset_num_string(p):\n 'encaps_var_offset : NUM_STRING'\n p[0] = int(p[1])", "metadata": "root.p_encaps_var_offset_num_string", "header": "['module', '___EOS___']", "index": 1295 }, { "content": "def p_encaps_var_offset_variable(p):\n 'encaps_var_offset : VARIABLE'\n p[0] = ast.Variable(p[1], lineno=p.lineno(1))", "metadata": "root.p_encaps_var_offset_variable", "header": "['module', '___EOS___']", "index": 1299 }, { "content": "def p_empty(p):\n 'empty : '\n pass", "metadata": "root.p_empty", "header": "['module', '___EOS___']", "index": 1303 }, { "content": "def p_error(t):\n if t:\n raise SyntaxError('invalid syntax', (None, t.lineno, None, t.value))\n else:\n raise SyntaxError('unexpected EOF while parsing', (None, None, None, None))", "metadata": "root.p_error", "header": "['module', '___EOS___']", "index": 1308 } ]
[ { "span": "import sys", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 10 }, { "span": "import readline", "start_line": 1318, "start_column": 4, "end_line": 1318, "end_column": 19 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "--------------", "--------------", "--------------", "--------------", "--------------", "-------", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "php", "parse", ".", "py_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "A", " ", "parser", " ", "for", " ", "PH", "P", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--------------", "--------------", "--------------", "--------------", "--------------", "-------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "php", "lex_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "php", "ast_", "as_", "ast_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "ply_", "._", "yac", "c_", "as_", "yac", "c_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Get", " ", "the", " ", "token", " ", "map_", "\\u\\u\\uNL\\u\\u\\u_", "tokens_", "=_", "php", "lex_", "._", "tokens_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "preceden", "ce_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "INCLUDE", "'_", ",_", "'", "INCLUDE", "\\u", "ON", "CE", "'_", ",_", "'", "EVAL", "'_", ",_", "'", "REQUIRE", "'_", ",_", "'", "REQUIRE", "\\u", "ON", "CE", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "COMMA", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "LOGI", "CAL", "\\u", "OR", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "LOGI", "CAL", "\\u", "XO", "R", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "LOGI", "CAL", "\\u", "AND", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "right", "'_", ",_", "'", "PRINT", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "EQUAL", "S", "'_", ",_", "'", "PLUS", "\\u", "EQUAL", "'_", ",_", "'", "MINUS", "\\u", "EQUAL", "'_", ",_", "'", "MUL", "\\u", "EQUAL", "'_", ",_", "'", "DIV", "\\u", "EQUAL", "'_", ",_", "'", "CONC", "AT", "\\u", "EQUAL", "'_", ",_", "'", "MOD", "\\u", "EQUAL", "'_", ",_", "'", "AND", "\\u", "EQUAL", "'_", ",_", "'", "OR", "\\u", "EQUAL", "'_", ",_", "'", "XO", "R", "\\u", "EQUAL", "'_", ",_", "'", "SL", "\\u", "EQUAL", "'_", ",_", "'", "SR", "\\u", "EQUAL", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "QUESTION", "'_", ",_", "'", "COLON", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "BOOLEAN", "\\u", "OR", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "BOOLEAN", "\\u", "AND", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "OR", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "XO", "R", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "AND", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "nona", "sso", "c", "'_", ",_", "'", "IS", "\\u", "EQUAL", "'_", ",_", "'", "IS", "\\u", "NOT", "\\u", "EQUAL", "'_", ",_", "'", "IS", "\\u", "IDENT", "ICAL", "'_", ",_", "'", "IS", "\\u", "NOT", "\\u", "IDENT", "ICAL", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "nona", "sso", "c", "'_", ",_", "'", "IS", "\\u", "SMALL", "ER", "'_", ",_", "'", "IS", "\\u", "SMALL", "ER", "\\u", "OR", "\\u", "EQUAL", "'_", ",_", "'", "IS", "\\u", "GRE", "ATE", "R", "'_", ",_", "'", "IS", "\\u", "GRE", "ATE", "R", "\\u", "OR", "\\u", "EQUAL", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "SL", "'_", ",_", "'", "SR", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "PLUS", "'_", ",_", "'", "MINUS", "'_", ",_", "'", "CONC", "AT", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "MUL", "'_", ",_", "'", "DIV", "'_", ",_", "'", "MOD", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "right", "'_", ",_", "'", "BOOLEAN", "\\u", "NOT", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "nona", "sso", "c", "'_", ",_", "'", "INSTANCE", "OF", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "right", "'_", ",_", "'", "NOT", "'_", ",_", "'", "INC", "'_", ",_", "'", "DEC", "'_", ",_", "'", "INT", "\\u", "CAST", "'_", ",_", "'", "DOUBLE", "\\u", "CAST", "'_", ",_", "'", "STRING", "\\u", "CAST", "'_", ",_", "'", "ARR", "AY", "\\u", "CAST", "'_", ",_", "'", "OBJ", "ECT", "\\u", "CAST", "'_", ",_", "'", "BOO", "L", "\\u", "CAST", "'_", ",_", "'", "UNS", "ET", "\\u", "CAST", "'_", ",_", "'", "AT", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "right", "'_", ",_", "'", "LB", "RACK", "ET", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "nona", "sso", "c", "'_", ",_", "'", "NEW", "'_", ",_", "'", "CLO", "NE", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "('", "left", "',", " ", "'", "ELS", "EI", "F", "')", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "('", "left", "',", " ", "'", "ELS", "E", "')", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "left", "'_", ",_", "'", "ENDI", "F", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "right", "'_", ",_", "'", "STATI", "C", "'_", ",_", "'", "ABS", "TRA", "CT", "'_", ",_", "'", "FINAL", "'_", ",_", "'", "PRIVATE", "'_", ",_", "'", "PROT", "ECTED", "'_", ",_", "'", "PUBLIC", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u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\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\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u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\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\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "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\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Error", " ", "rule", " ", "for", " ", "synta", "x", " ", "errors_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Build", " ", "the", " ", "grammar_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "parser_", "=_", "yac", "c_", "._", "yac", "c_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "readline_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pprint_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "lexer_", "=_", "php", "lex_", "._", "lexer_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "s_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "prompt_", "=_", "'", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "prompt_", "=_", "lexer_", "._", "current", "\\u", "state_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "prompt_", "==_", "'", "INITIAL", "'_", ":_", "prompt_", "=_", "'", "html", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "prompt_", "+=_", "'>", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "s_", "+=_", "raw", "\\u", "input_", "(_", "prompt_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "EO", "FE", "rror_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "s_", ":_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "+=_", "'\\\\", "n", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "lexer_", "._", "lineno_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "parser_", "._", "parse_", "(_", "s_", ",_", "lexer_", "=_", "lexer_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Syntax", "Error_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "e_", "._", "lineno_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "e_", ",_", "'", "near", "'_", ",_", "repr_", "(_", "e_", "._", "text_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "result_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "item_", "in_", "result_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "hasattr_", "(_", "item_", ",_", "'", "gener", "ic", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "item_", "=_", "item_", "._", "generic_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "pprint_", "._", "pprint_", "(_", "item_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "s_", "=_", "''_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "p", "\\u", "start_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "start", " ", ":", " ", "top", "\\u", "statem", "ent", "\\u", "list", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "top", "\\u", "statem", "ent", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "top", "\\u", "statem", "ent", "\\u", "list", " ", ":", " ", "top", "\\u", "statem", "ent", "\\u", "list", " ", "top", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "top", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "top", "\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "function", "\\u", "declaration", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "class", "\\u", "declaration", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "HAL", "T", "\\u", "COMPILER", " ", "LPAR", "EN", " ", "RPA", "REN", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "???", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "top", "\\u", "statem", "ent", "\\u", "namespace_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "top", "\\u", "statem", "ent", " ", ":", " ", "NAMESPACE", " ", "namespace", "\\u", "name", " ", "SEMI", "\\", "10", ";", " ", " ", " ", "|", " ", "NAMESPACE", " ", "LB", "RACE", " ", "top", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "\\", "10", ";", " ", " ", " ", "|", " ", "NAMESPACE", " ", "namespace", "\\u", "name", " ", "LB", "RACE", " ", "top", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Namespace_", "(_", "p_", "[_", "2_", "]_", ",_", "[_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Namespace_", "(_", "None_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Namespace_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "top", "\\u", "statem", "ent", "\\u", "constant_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "top", "\\u", "statem", "ent", " ", ":", " ", "CONST", " ", "constant", "\\u", "declaration", "s", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Const", "ant", "Declarati", "ons_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "top", "\\u", "statem", "ent", "\\u", "use_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "top", "\\u", "statem", "ent", " ", ":", " ", "USE", " ", "use", "\\u", "declaration", "s", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Us", "e", "Declarati", "ons_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "use", "\\u", "declarations_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "use", "\\u", "declaration", "s", " ", ":", " ", "use", "\\u", "declaration", "s", " ", "COMMA", " ", "use", "\\u", "declaration", "\\", "10", ";", " ", " ", "|", " ", "use", "\\u", "declaration", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "use", "\\u", "declaration_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "use", "\\u", "declaration", " ", ":", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "namespace", "\\u", "name", " ", "AS", " ", "STRING", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", " ", "AS", " ", "STRING", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Us", "e", "Declaration_", "(_", "p_", "[_", "1_", "]_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Us", "e", "Declaration_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Us", "e", "Declaration_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Us", "e", "Declaration_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "constant", "\\u", "declarations_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "constant", "\\u", "declaration", "s", " ", ":", " ", "constant", "\\u", "declaration", "s", " ", "COMMA", " ", "constant", "\\u", "declaration", "\\", "10", ";", " ", " ", " ", "|", " ", "constant", "\\u", "declaration", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "constant", "\\u", "declaration_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "constant", "\\u", "declaration", " ", ":", " ", "STRING", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Const", "ant", "Declaration_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "inner", "\\u", "statem", "ent", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "inner", "\\u", "statem", "ent", "\\u", "list", " ", ":", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "inner", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "inner", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "inner", "\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "function", "\\u", "declaration", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "declaration", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "HAL", "T", "\\u", "COMPILER", " ", "LPAR", "EN", " ", "RPA", "REN", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "len_", "(_", "p_", ")_", "==_", "2_", ",_", "\"\\u\\u", "HAL", "T", "\\u", "COMPILER", "()", " ", "can", " ", "only", " ", "be", " ", "used", " ", "from", " ", "the", " ", "outer", "most", " ", "scope", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "block_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Block_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "if_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "statem", "ent", " ", ":", " ", "IF", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "statem", "ent", " ", "else", "if", "\\u", "list", " ", "else", "\\u", "single", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "IF", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "new", "\\u", "else", "if", "\\u", "list", " ", "new", "\\u", "else", "\\u", "single", " ", "ENDI", "F", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "8_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "If_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "p_", "[_", "7_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "If_", "(_", "p_", "[_", "3_", "]_", ",_", "ast_", "._", "Block_", "(_", "p_", "[_", "6_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "5_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "p_", "[_", "7_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "while_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "WH", "ILE", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "whi", "le", "\\u", "statem", "ent", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Whi", "le_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "do", "\\u", "while_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "DO", " ", "statem", "ent", " ", "WH", "ILE", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Do", "Whi", "le_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "for_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "FOR", " ", "LPAR", "EN", " ", "for", "\\u", "expr", " ", "SEMI", " ", "for", "\\u", "expr", " ", "SEMI", " ", "for", "\\u", "expr", " ", "RPA", "REN", " ", "for", "\\u", "statem", "ent", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "For_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "p_", "[_", "7_", "]_", ",_", "p_", "[_", "9_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "foreach", "_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "FORE", "ACH", " ", "LPAR", "EN", " ", "expr", " ", "AS", " ", "foreach", "\\u", "variab", "le", " ", "foreach", "\\u", "option", "al", "\\u", "arg", " ", "RPA", "REN", " ", "foreach", "\\u", "statem", "ent", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "p_", "[_", "6_", "]_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Fore", "ach", "_", "(_", "p_", "[_", "3_", "]_", ",_", "None_", ",_", "p_", "[_", "5_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Fore", "ach", "_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "switch_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "SWITCH", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "switch", "\\u", "case", "\\u", "list", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Switch_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "break_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "statem", "ent", " ", ":", " ", "BREAK", " ", "SEMI", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "BREAK", " ", "expr", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Break", "_", "(_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Break", "_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "continue_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "statem", "ent", " ", ":", " ", "CONTINUE", " ", "SEMI", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "CONTINUE", " ", "expr", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Continu", "e_", "(_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Continu", "e_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "return_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "statem", "ent", " ", ":", " ", "RETURN", " ", "SEMI", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "RETURN", " ", "expr", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Return_", "(_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Return_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "global_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "GLOB", "AL", " ", "global", "\\u", "var", "\\u", "list", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Global_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "static_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "STATI", "C", " ", "static", "\\u", "var", "\\u", "list", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "echo_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "ECHO", " ", "echo", "\\u", "expr", "\\u", "list", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Ech", "o_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "inline", "\\u", "html_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "IN", "LINE", "\\u", "HTM", "L", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "In", "line", "HTML_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "expr_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "expr", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "unset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "UNS", "ET", " ", "LPAR", "EN", " ", "unse", "t", "\\u", "variab", "les", " ", "RPA", "REN", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Unse", "t_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "try_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "TR", "Y", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", " ", "CAT", "CH", " ", "LPAR", "EN", " ", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", " ", "VARIABLE", " ", "RPA", "REN", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", " ", "addition", "al", "\\u", "catche", "s", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Tr", "y_", "(_", "p_", "[_", "3_", "]_", ",_", "[_", "ast_", "._", "Catch", "_", "(_", "p_", "[_", "7_", "]_", ",_", "ast_", "._", "Variable_", "(_", "p_", "[_", "8_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "8_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "p_", "[_", "11_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "5_", ")_", ")_", "]_", "+_", "p_", "[_", "13_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "addition", "al", "\\u", "catche", "s_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "addition", "al", "\\u", "catche", "s", " ", ":", " ", "addition", "al", "\\u", "catche", "s", " ", "CAT", "CH", " ", "LPAR", "EN", " ", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", " ", "VARIABLE", " ", "RPA", "REN", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "10_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Catch", "_", "(_", "p_", "[_", "4_", "]_", ",_", "ast_", "._", "Variable_", "(_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "5_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "p_", "[_", "8_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "throw_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "THRO", "W", " ", "expr", " ", "SEMI", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Throw", "_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "statem", "ent", "\\u", "declare_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "statem", "ent", " ", ":", " ", "DECL", "ARE", " ", "LPAR", "EN", " ", "declar", "e\\u", "list", " ", "RPA", "REN", " ", "declar", "e\\u", "statem", "ent", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Declar", "e_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "declar", "e\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "declar", "e\\u", "list", " ", ":", " ", "STRING", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", "|", " ", "declar", "e\\u", "list", " ", "COMMA", " ", "STRING", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Directive", "_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Directive", "_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "declar", "e\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "declar", "e\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "END", "DECL", "ARE", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Block_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "else", "if", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "else", "if", "\\u", "list", " ", ":", " ", "empty", "\\", "10", ";", " ", "|", " ", "else", "if", "\\u", "list", " ", "ELS", "EI", "F", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "statem", "ent", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Else", "If_", "(_", "p_", "[_", "4_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "else", "\\u", "single_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "else", "\\u", "single", " ", ":", " ", "empty", "\\", "10", ";", " ", "|", " ", "ELS", "E", " ", "statem", "ent", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Else", "_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "new", "\\u", "else", "if", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "new", "\\u", "else", "if", "\\u", "list", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "new", "\\u", "else", "if", "\\u", "list", " ", "ELS", "EI", "F", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Else", "If_", "(_", "p_", "[_", "4_", "]_", ",_", "ast_", "._", "Block_", "(_", "p_", "[_", "7_", "]_", ",_", "line", "o_", "=_", "p_", "._", "lineno_", "(_", "6_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "new", "\\u", "else", "\\u", "single_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "new", "\\u", "else", "\\u", "single", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "ELS", "E", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Else", "_", "(_", "ast_", "._", "Block_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "whi", "le", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "whi", "le", "\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "END", "WH", "ILE", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Block_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "for", "\\u", "expr_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "for", "\\u", "expr", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "non", "\\u", "empty", "\\u", "for", "\\u", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "non", "\\u", "empty", "\\u", "for", "\\u", "expr_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "non", "\\u", "empty", "\\u", "for", "\\u", "expr", " ", ":", " ", "non", "\\u", "empty", "\\u", "for", "\\u", "expr", " ", "COMMA", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "for", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "for", "\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "END", "FOR", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Block_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "foreach", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "foreach", "\\u", "variab", "le", " ", ":", " ", "VARIABLE", "\\", "10", ";", " ", " ", "|", " ", "AND", " ", "VARIABLE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Fore", "ach", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Fore", "ach", "Variable_", "(_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "foreach", "\\u", "option", "al", "\\u", "arg_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "foreach", "\\u", "option", "al", "\\u", "arg", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "DOUBLE", "\\u", "ARROW", " ", "foreach", "\\u", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "foreach", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "foreach", "\\u", "statem", "ent", " ", ":", " ", "statem", "ent", "\\", "10", ";", " ", " ", " ", "|", " ", "COLON", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "END", "FORE", "ACH", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Block_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "switch", "\\u", "case", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "switch", "\\u", "case", "\\u", "list", " ", ":", " ", "LB", "RACE", " ", "case", "\\u", "list", " ", "RB", "RACE", "\\", "10", ";", " ", " ", "|", " ", "LB", "RACE", " ", "SEMI", " ", "case", "\\u", "list", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "switch", "\\u", "case", "\\u", "list", "\\u", "colon", "_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "switch", "\\u", "case", "\\u", "list", " ", ":", " ", "COLON", " ", "case", "\\u", "list", " ", "ENDS", "WI", "TCH", " ", "SEMI", "\\", "10", ";", " ", " ", "|", " ", "COLON", " ", "SEMI", " ", "case", "\\u", "list", " ", "ENDS", "WI", "TCH", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "case", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "case", "\\u", "list", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "case", "\\u", "list", " ", "CASE", " ", "expr", " ", "case", "\\u", "separator", " ", "inner", "\\u", "statem", "ent", "\\u", "list", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "case", "\\u", "list", " ", "DEF", "AUL", "T", " ", "case", "\\u", "separator", " ", "inner", "\\u", "statem", "ent", "\\u", "list", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Case_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Default_", "(_", "p_", "[_", "4_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "case", "\\u", "separator_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "case", "\\u", "separator", " ", ":", " ", "COLON", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "global", "\\u", "var", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "global", "\\u", "var", "\\u", "list", " ", ":", " ", "global", "\\u", "var", "\\u", "list", " ", "COMMA", " ", "global", "\\u", "var", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "global", "\\u", "var", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "global", "\\u", "var_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "global", "\\u", "var", " ", ":", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "DO", "LLA", "R", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "DO", "LLA", "R", " ", "LB", "RACE", " ", "expr", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "var", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "var", "\\u", "list", " ", ":", " ", "static", "\\u", "var", "\\u", "list", " ", "COMMA", " ", "static", "\\u", "var", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "static", "\\u", "var", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "var_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "var", " ", ":", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "VARIABLE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "echo", "\\u", "expr", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "echo", "\\u", "expr", "\\u", "list", " ", ":", " ", "echo", "\\u", "expr", "\\u", "list", " ", "COMMA", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "unse", "t", "\\u", "variables_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "unse", "t", "\\u", "variab", "les", " ", ":", " ", "unse", "t", "\\u", "variab", "les", " ", "COMMA", " ", "unse", "t", "\\u", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "unse", "t", "\\u", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "unse", "t", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "unse", "t", "\\u", "variab", "le", " ", ":", " ", "variab", "le", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "declaration", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "function", "\\u", "declaration", "\\u", "statem", "ent", " ", ":", " ", "FUNC", "TIO", "N", " ", "is", "\\u", "reference", " ", "STRING", " ", "LPAR", "EN", " ", "parameter", "\\u", "list", " ", "RPA", "REN", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Function_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "declaration", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "declaration", "\\u", "statem", "ent", " ", ":", " ", "class", "\\u", "entry", "\\u", "type", " ", "STRING", " ", "extend", "s", "\\u", "from", " ", "implement", "s", "\\u", "list", " ", "LB", "RACE", " ", "class", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "INTERFACE", " ", "STRING", " ", "interface", "\\u", "extend", "s", "\\u", "list", " ", "LB", "RACE", " ", "class", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "8_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Class_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Interface_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "entry", "\\u", "type_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "entry", "\\u", "type", " ", ":", " ", "CLASS", "\\", "10", ";", " ", " ", "|", " ", "ABS", "TRA", "CT", " ", "CLASS", "\\", "10", ";", " ", " ", "|", " ", "FINAL", " ", "CLASS", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "._", "lower_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "extend", "s", "\\u", "from_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "extend", "s", "\\u", "from", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", "|", " ", "EXTEND", "S", " ", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", " ", ":", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "NAMESPACE", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "implement", "s", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "implement", "s", "\\u", "list", " ", ":", " ", "IMPL", "EME", "NTS", " ", "interface", "\\u", "list", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "statem", "ent", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "statem", "ent", "\\u", "list", " ", ":", " ", "class", "\\u", "statem", "ent", "\\u", "list", " ", "class", "\\u", "statem", "ent", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "statement_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "statem", "ent", " ", ":", " ", "method", "\\u", "modifiers", " ", "FUNC", "TIO", "N", " ", "is", "\\u", "reference", " ", "STRING", " ", "LPAR", "EN", " ", "parameter", "\\u", "list", " ", "RPA", "REN", " ", "method", "\\u", "body", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "variab", "le", "\\u", "modifiers", " ", "class", "\\u", "variab", "le", "\\u", "declaration", " ", "SEMI", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "constant", "\\u", "declaration", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "9_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Method_", "(_", "p_", "[_", "4_", "]_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Class", "Variables_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "3_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Class", "Constants_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "variab", "le", "\\u", "declaration", "\\u", "initial_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "variab", "le", "\\u", "declaration", " ", ":", " ", "class", "\\u", "variab", "le", "\\u", "declaration", " ", "COMMA", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Class", "Variable_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Class", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "variab", "le", "\\u", "declaration", "\\u", "no", "\\u", "initial_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "variab", "le", "\\u", "declaration", " ", ":", " ", "class", "\\u", "variab", "le", "\\u", "declaration", " ", "COMMA", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "VARIABLE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Class", "Variable_", "(_", "p_", "[_", "3_", "]_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Class", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "constant", "\\u", "declaration_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "constant", "\\u", "declaration", " ", ":", " ", "class", "\\u", "constant", "\\u", "declaration", " ", "COMMA", " ", "STRING", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "CONST", " ", "STRING", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Class", "Constant_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Class", "Constant_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "interface", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "interface", "\\u", "list", " ", ":", " ", "interface", "\\u", "list", " ", "COMMA", " ", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "full", "y", "\\u", "qualified", "\\u", "class", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "interface", "\\u", "extend", "s", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "interface", "\\u", "extend", "s", "\\u", "list", " ", ":", " ", "EXTEND", "S", " ", "interface", "\\u", "list", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "modifiers", "\\u", "non", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "variab", "le", "\\u", "modifiers", " ", ":", " ", "non", "\\u", "empty", "\\u", "member", "\\u", "modifiers", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "modifiers", "\\u", "var_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "variab", "le", "\\u", "modifiers", " ", ":", " ", "VAR", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "method", "\\u", "modifiers", "\\u", "non", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "method", "\\u", "modifiers", " ", ":", " ", "non", "\\u", "empty", "\\u", "member", "\\u", "modifiers", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "method", "\\u", "modifiers", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "method", "\\u", "modifiers", " ", ":", " ", "empty", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "method", "\\u", "body_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "method", "\\u", "body", " ", ":", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "\\", "10", ";", " ", "|", " ", "SEMI", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "non", "\\u", "empty", "\\u", "member", "\\u", "modifiers_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "non", "\\u", "empty", "\\u", "member", "\\u", "modifiers", " ", ":", " ", "non", "\\u", "empty", "\\u", "member", "\\u", "modifiers", " ", "member", "\\u", "modifier", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "member", "\\u", "modifier", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "member", "\\u", "modifier_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "member", "\\u", "modifier", " ", ":", " ", "PUBLIC", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "PROT", "ECTED", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "PRIVATE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "STATI", "C", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "ABS", "TRA", "CT", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "FINAL", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "._", "lower_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "is", "\\u", "reference_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "is", "\\u", "reference", " ", ":", " ", "AND", "\\", "10", ";", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "is_", "not_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "parameter", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "parameter", "\\u", "list", " ", ":", " ", "parameter", "\\u", "list", " ", "COMMA", " ", "parameter", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "parameter", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "parameter", "\\u", "list", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "parameter", "\\u", "list", " ", ":", " ", "empty", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "parameter_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "parameter", " ", ":", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "name", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "AND", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "name", " ", "AND", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "name", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "AND", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "class", "\\u", "name", " ", "AND", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "#", " ", "VARIABLE", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "1_", "]_", ",_", "None_", ",_", "False_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", "and_", "p_", "[_", "1_", "]_", "==_", "'&'_", ":_", "#", " ", "AND", " ", "VARIABLE", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "2_", "]_", ",_", "None_", ",_", "True_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", "and_", "p_", "[_", "1_", "]_", "!=_", "'&'_", ":_", "#", " ", "STRING", " ", "VARIABLE", " _", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "2_", "]_", ",_", "None_", ",_", "False_", ",_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", "and_", "p_", "[_", "2_", "]_", "!=_", "'&'_", ":_", "#", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scala", "r", " _", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", "and_", "p_", "[_", "2_", "]_", "==_", "'&'_", ":_", "#", " ", "STRING", " ", "AND", " ", "VARIABLE", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "3_", "]_", ",_", "None_", ",_", "True_", ",_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "5_", "and_", "p_", "[_", "1_", "]_", "==_", "'&'_", ":_", "#", " ", "AND", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scalar_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "True_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "5_", "and_", "p_", "[_", "1_", "]_", "!=_", "'&'_", ":_", "#", " ", "class", "\\u", "name", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scalar_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "False_", ",_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "#", " ", "STRING", " ", "AND", " ", "VARIABLE", " ", "EQUAL", "S", " ", "static", "\\u", "scalar_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Form", "al", "Parameter_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "True_", ",_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "variab", "le", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "assign_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "variab", "le", " ", "EQUAL", "S", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "EQUAL", "S", " ", "AND", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Assignment_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Assignment_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "new_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "NEW", " ", "class", "\\u", "name", "\\u", "reference", " ", "ctor", "\\u", "argu", "ment", "s", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "New_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "name", "\\u", "reference_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "name", "\\u", "reference", " ", ":", " ", "class", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "dynami", "c\\u", "class", "\\u", "name", "\\u", "reference", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "name", " ", ":", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "NAMESPACE", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "name", "\\u", "static_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "class", "\\u", "name", " ", ":", " ", "STATI", "C", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "._", "lower_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "dynami", "c\\u", "class", "\\u", "name", "\\u", "reference_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "dynami", "c\\u", "class", "\\u", "name", "\\u", "reference", " ", ":", " ", "base", "\\u", "variab", "le", " ", "OBJ", "ECT", "\\u", "OPERATOR", " ", "object\\u", "property", " ", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "proper", "ties", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "base", "\\u", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "name_", ",_", "dims_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Object", "Property_", "(_", "p_", "[_", "1_", "]_", ",_", "name_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "class\\u_", ",_", "dim_", ",_", "lineno_", "in_", "dims_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "class\\u_", "(_", "p_", "[_", "0_", "]_", ",_", "dim_", ",_", "lineno_", "=_", "lineno_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "name_", ",_", "dims_", "in_", "p_", "[_", "4_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Object", "Property_", "(_", "p_", "[_", "0_", "]_", ",_", "name_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "class\\u_", ",_", "dim_", ",_", "lineno_", "in_", "dims_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "class\\u_", "(_", "p_", "[_", "0_", "]_", ",_", "dim_", ",_", "lineno_", "=_", "lineno_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "properties_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "proper", "ties", " ", ":", " ", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "proper", "ties", " ", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "property", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "property_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "dynami", "c\\u", "class", "\\u", "name", "\\u", "variab", "le", "\\u", "property", " ", ":", " ", "OBJ", "ECT", "\\u", "OPERATOR", " ", "object\\u", "property", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "ctor", "\\u", "arguments_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "ctor", "\\u", "argu", "ment", "s", " ", ":", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "clone_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "CLO", "NE", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Clone", "_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "list", "\\u", "assign_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "LIST", " ", "LPAR", "EN", " ", "assign", "ment", "\\u", "list", " ", "RPA", "REN", " ", "EQUAL", "S", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "List", "Assignment_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "assign", "ment", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "assign", "ment", "\\u", "list", " ", ":", " ", "assign", "ment", "\\u", "list", " ", "COMMA", " ", "assign", "ment", "\\u", "list", "\\u", "element", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "assign", "ment", "\\u", "list", "\\u", "element", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "assign", "ment", "\\u", "list", "\\u", "element_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "assign", "ment", "\\u", "list", "\\u", "element", " ", ":", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "LIST", " ", "LPAR", "EN", " ", "assign", "ment", "\\u", "list", " ", "RPA", "REN", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "variab", "le", " ", ":", " ", "base", "\\u", "variab", "le", "\\u", "with", "\\u", "function", "\\u", "calls", " ", "OBJ", "ECT", "\\u", "OPERATOR", " ", "object\\u", "property", " ", "method", "\\u", "or", "\\u", "not", " ", "variab", "le", "\\u", "proper", "ties", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "base", "\\u", "variab", "le", "\\u", "with", "\\u", "function", "\\u", "calls", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "name_", ",_", "dims_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "params_", "=_", "p_", "[_", "4_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "params_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Meth", "od", "Call_", "(_", "p_", "[_", "1_", "]_", ",_", "name_", ",_", "params_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Object", "Property_", "(_", "p_", "[_", "1_", "]_", ",_", "name_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "class\\u_", ",_", "dim_", ",_", "lineno_", "in_", "dims_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "class\\u_", "(_", "p_", "[_", "0_", "]_", ",_", "dim_", ",_", "lineno_", "=_", "lineno_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "(_", "name_", ",_", "dims_", ")_", ",_", "params_", "in_", "p_", "[_", "5_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "params_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Meth", "od", "Call_", "(_", "p_", "[_", "0_", "]_", ",_", "name_", ",_", "params_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Object", "Property_", "(_", "p_", "[_", "0_", "]_", ",_", "name_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "class\\u_", ",_", "dim_", ",_", "lineno_", "in_", "dims_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "class\\u_", "(_", "p_", "[_", "0_", "]_", ",_", "dim_", ",_", "lineno_", "=_", "lineno_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "base", "\\u", "variab", "le", "\\u", "with", "\\u", "function", "\\u", "calls_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "base", "\\u", "variab", "le", "\\u", "with", "\\u", "function", "\\u", "calls", " ", ":", " ", "base", "\\u", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "function", "\\u", "call", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "function", "\\u", "call", " ", ":", " ", "namespace", "\\u", "name", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "NAMESPACE", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Function", "Call_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Function", "Call_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Function", "Call_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call", "\\u", "static_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "function", "\\u", "call", " ", ":", " ", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "STRING", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "variab", "le", "\\u", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "STRING", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "variab", "le", "\\u", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "Meth", "od", "Call_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "function", "\\u", "call", " ", ":", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Function", "Call_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "method", "\\u", "or", "\\u", "not_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "method", "\\u", "or", "\\u", "not", " ", ":", " ", "LPAR", "EN", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "properties_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "variab", "le", "\\u", "proper", "ties", " ", ":", " ", "variab", "le", "\\u", "proper", "ties", " ", "variab", "le", "\\u", "property", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "2_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "property_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "variab", "le", "\\u", "property", " ", ":", " ", "OBJ", "ECT", "\\u", "OPERATOR", " ", "object\\u", "property", " ", "method", "\\u", "or", "\\u", "not", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "3_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "base", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "base", "\\u", "variab", "le", " ", ":", " ", "simple", "\\u", "indirect", "\\u", "reference", "\\", "10", ";", " ", " ", " ", "|", " ", "static", "\\u", "member", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "simple", "\\u", "indirect", "\\u", "reference_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "simple", "\\u", "indirect", "\\u", "reference", " ", ":", " ", "DO", "LLA", "R", " ", "simple", "\\u", "indirect", "\\u", "reference", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "reference", "\\u", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "member_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "member", " ", ":", " ", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", "\\", "10", ";", " ", " ", " ", "|", " ", "variab", "le", "\\u", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "Property_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "class", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "variab", "le", "\\u", "class", "\\u", "name", " ", ":", " ", "reference", "\\u", "variab", "le", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "reference", "\\u", "variab", "le", "\\u", "array", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "reference", "\\u", "variab", "le", " ", ":", " ", "reference", "\\u", "variab", "le", " ", "LB", "RACK", "ET", " ", "dim", "\\u", "offset", " ", "RB", "RACK", "ET", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Array", "Offset_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "reference", "\\u", "variab", "le", "\\u", "string", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "reference", "\\u", "variab", "le", " ", ":", " ", "reference", "\\u", "variab", "le", " ", "LB", "RACE", " ", "expr", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "String", "Offset_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "reference", "\\u", "variab", "le", "\\u", "compo", "und", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "reference", "\\u", "variab", "le", " ", ":", " ", "compo", "und", "\\u", "variab", "le", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "compo", "und", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "compo", "und", "\\u", "variab", "le", " ", ":", " ", "VARIABLE", "\\", "10", ";", " ", " ", " ", "|", " ", "DO", "LLA", "R", " ", "LB", "RACE", " ", "expr", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "dim", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "dim", "\\u", "offset", " ", ":", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "object\\u", "property_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "object\\u", "property", " ", ":", " ", "variab", "le", "\\u", "name", " ", "object\\u", "dim", "\\u", "list", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "(_", "p_", "[_", "1_", "]_", ",_", "[_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "object\\u", "dim", "\\u", "list", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "object\\u", "dim", "\\u", "list", " ", ":", " ", "empty", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "object\\u", "dim", "\\u", "list", "\\u", "array", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "object\\u", "dim", "\\u", "list", " ", ":", " ", "object\\u", "dim", "\\u", "list", " ", "LB", "RACK", "ET", " ", "dim", "\\u", "offset", " ", "RB", "RACK", "ET", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "(_", "ast_", "._", "Array", "Offset_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "object\\u", "dim", "\\u", "list", "\\u", "string", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "object\\u", "dim", "\\u", "list", " ", ":", " ", "object\\u", "dim", "\\u", "list", " ", "LB", "RACE", " ", "expr", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "(_", "ast_", "._", "String", "Offset_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "variab", "le", "\\u", "name", " ", ":", " ", "STRING", "\\", "10", ";", " ", " ", " ", "|", " ", "LB", "RACE", " ", "expr", " ", "RB", "RACE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "variab", "le", "\\u", "with", "out", "\\u", "objects_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "variab", "le", "\\u", "with", "out", "\\u", "object", "s", " ", ":", " ", "simple", "\\u", "indirect", "\\u", "reference", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "scalar_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "scala", "r", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "array_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "ARR", "AY", " ", "LPAR", "EN", " ", "array", "\\u", "pair", "\\u", "list", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Array_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "array", "\\u", "pair", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "possib", "le", "\\u", "comma", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", "\\u", "item_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "AND", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "AND", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "4_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "1_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", "\\u", "pair_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "expr", " ", "DOUBLE", "\\u", "ARROW", " ", "AND", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "expr", " ", "DOUBLE", "\\u", "ARROW", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "expr", " ", "DOUBLE", "\\u", "ARROW", " ", "AND", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", " ", " ", "|", " ", "expr", " ", "DOUBLE", "\\u", "ARROW", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "7_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "4_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "possib", "le", "\\u", "comma_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "possib", "le", "\\u", "comma", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "COMMA", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call", "\\u", "parameter", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", ":", " ", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", "COMMA", " ", "function", "\\u", "call", "\\u", "parameter", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "function", "\\u", "call", "\\u", "parameter", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "function", "\\u", "call", "\\u", "parameter", "\\u", "list", " ", ":", " ", "empty", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "function", "\\u", "call", "\\u", "parameter_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "function", "\\u", "call", "\\u", "parameter", " ", ":", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "AND", " ", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Parameter_", "(_", "p_", "[_", "1_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Parameter_", "(_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "function_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "FUNC", "TIO", "N", " ", "is", "\\u", "reference", " ", "LPAR", "EN", " ", "parameter", "\\u", "list", " ", "RPA", "REN", " ", "lexica", "l\\u", "vars", " ", "LB", "RACE", " ", "inner", "\\u", "statem", "ent", "\\u", "list", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Clos", "ure_", "(_", "p_", "[_", "4_", "]_", ",_", "p_", "[_", "6_", "]_", ",_", "p_", "[_", "8_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "lexica", "l\\u", "vars_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "lexica", "l\\u", "vars", " ", ":", " ", "USE", " ", "LPAR", "EN", " ", "lexica", "l\\u", "var", "\\u", "list", " ", "RPA", "REN", "\\", "10", ";", " ", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "lexica", "l\\u", "var", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "lexica", "l\\u", "var", "\\u", "list", " ", ":", " ", "lexica", "l\\u", "var", "\\u", "list", " ", "COMMA", " ", "AND", " ", "VARIABLE", "\\", "10", ";", " ", " ", "|", " ", "lexica", "l\\u", "var", "\\u", "list", " ", "COMMA", " ", "VARIABLE", "\\", "10", ";", " ", " ", "|", " ", "AND", " ", "VARIABLE", "\\", "10", ";", " ", " ", "|", " ", "VARIABLE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Lexi", "cal", "Variable_", "(_", "p_", "[_", "4_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Lexi", "cal", "Variable_", "(_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Lexi", "cal", "Variable_", "(_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Lexi", "cal", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "assign", "\\u", "op_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "variab", "le", " ", "PLUS", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "MINUS", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "MUL", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "DIV", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "CONC", "AT", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "MOD", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "AND", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "OR", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "XO", "R", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "SL", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "SR", "\\u", "EQUAL", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Assign", "Op_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "binar", "y", "\\u", "op_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "expr", " ", "BOOLEAN", "\\u", "AND", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "BOOLEAN", "\\u", "OR", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "LOGI", "CAL", "\\u", "AND", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "LOGI", "CAL", "\\u", "OR", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "LOGI", "CAL", "\\u", "XO", "R", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "AND", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "OR", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "XO", "R", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "CONC", "AT", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "PLUS", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "MINUS", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "MUL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "DIV", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "SL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "SR", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "MOD", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "IDENT", "ICAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "NOT", "\\u", "IDENT", "ICAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "NOT", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "SMALL", "ER", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "SMALL", "ER", "\\u", "OR", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "GRE", "ATE", "R", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "IS", "\\u", "GRE", "ATE", "R", "\\u", "OR", "\\u", "EQUAL", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "expr", " ", "INSTANCE", "OF", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Bin", "ary", "Op_", "(_", "p_", "[_", "2_", "]_", "._", "lower_", "(_", ")_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "una", "ry", "\\u", "op_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "PLUS", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "MINUS", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "NOT", " ", "expr", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "BOOLEAN", "\\u", "NOT", " ", "expr", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Una", "ry", "Op_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "tern", "ary", "\\u", "op_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "expr", " ", "QUESTION", " ", "expr", " ", "COLON", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Ter", "nary", "Op_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "pre", "\\u", "inc", "dec_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "INC", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "DEC", " ", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Pre", "Inc", "De", "c", "Op_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "post", "\\u", "inc", "dec_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "variab", "le", " ", "INC", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", " ", "DEC", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Post", "Inc", "De", "c", "Op_", "(_", "p_", "[_", "2_", "]_", ",_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "int_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "INT", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "int", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "double_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "DOUBLE", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "double", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "string_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "STRING", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "string", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "array_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "ARR", "AY", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "array", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "object_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "OBJ", "ECT", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "object", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "bool_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "BOO", "L", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "bool", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "cast", "\\u", "unset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "UNS", "ET", "\\u", "CAST", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Cast", "_", "(_", "'", "unse", "t", "'_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "isse", "t_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "ISS", "ET", " ", "LPAR", "EN", " ", "isse", "t", "\\u", "variab", "les", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Is", "Set_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "isse", "t", "\\u", "variables_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "isse", "t", "\\u", "variab", "les", " ", ":", " ", "isse", "t", "\\u", "variab", "les", " ", "COMMA", " ", "variab", "le", "\\", "10", ";", " ", " ", " ", " ", " ", "|", " ", "variab", "le", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "p_", "[_", "3_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "p_", "[_", "1_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "EMP", "TY", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Empty_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "eval_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "EVAL", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Eval_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "include_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "INCLUDE", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Include", "_", "(_", "p_", "[_", "2_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "include", "\\u", "once_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "INCLUDE", "\\u", "ON", "CE", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Include", "_", "(_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "require_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "REQUIRE", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Requ", "ire_", "(_", "p_", "[_", "2_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "require", "\\u", "once_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "REQUIRE", "\\u", "ON", "CE", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Requ", "ire_", "(_", "p_", "[_", "2_", "]_", ",_", "True_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "exit_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "expr", " ", ":", " ", "EXIT", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "EXIT", " ", "LPAR", "EN", " ", "RPA", "REN", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "EXIT", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "5_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Exit_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Exit_", "(_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "print_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "PRINT", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Print_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "silence", "_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "AT", " ", "expr", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Sile", "nce_", "(_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "expr", "\\u", "group_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "expr", " ", ":", " ", "LPAR", "EN", " ", "expr", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "scalar_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "scala", "r", " ", ":", " ", "class", "\\u", "constant", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "common", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "QUOTE", " ", "enca", "ps", "\\u", "list", " ", "QUOTE", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "START", "\\u", "HER", "ED", "OC", " ", "enca", "ps", "\\u", "list", " ", "END", "\\u", "HER", "ED", "OC", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "scala", "r", "\\u", "string", "\\u", "varname_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "scala", "r", " ", ":", " ", "STRING", "\\u", "VAR", "NAME", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "'$'_", "+_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "scala", "r", "\\u", "namespace", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "scala", "r", " ", ":", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", " ", " ", " ", "|", " ", "NAMESPACE", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "class", "\\u", "constant_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "class", "\\u", "constant", " ", ":", " ", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "STRING", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "variab", "le", "\\u", "class", "\\u", "name", " ", "DOUBLE", "\\u", "COLON", " ", "STRING", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Static", "Property_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "ln", "umber_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "LN", "UM", "BER", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "p_", "[_", "1_", "]_", "._", "startswith_", "(_", "'", "0", "x", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "int_", "(_", "p_", "[_", "1_", "]_", ",_", "16_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "p_", "[_", "1_", "]_", "._", "startswith_", "(_", "'", "0", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "int_", "(_", "p_", "[_", "1_", "]_", ",_", "8_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "int_", "(_", "p_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "dn", "umber_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "DN", "UM", "BER", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "float_", "(_", "p_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "string_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "CONSTANT", "\\u", "ENC", "APS", "ED", "\\u", "STRING", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "[_", "1_", ":_", "-_", "1_", "]_", "._", "replace_", "(_", "\"\\\\\\\\", "'\"_", ",_", "\"'\"_", ")_", "._", "replace_", "(_", "'\\\\\\\\\\\\\\\\", "'_", ",_", "'\\\\\\\\'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "line_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "LINE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "p_", "._", "lineno_", "(_", "1_", ")_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "file_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "FILE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "value_", "=_", "getattr_", "(_", "p_", "._", "lexer_", ",_", "'", "filename", "'_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "value_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "dir_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "DIR", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "value_", "=_", "getattr_", "(_", "p_", "._", "lexer_", ",_", "'", "filename", "'_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "value_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "os_", "._", "path_", "._", "dirname_", "(_", "value_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "value_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "class_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "CLASS", "\\u", "C", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "method_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "METH", "OD", "\\u", "C", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "func_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "FUNC", "\\u", "C", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "common", "\\u", "scala", "r", "\\u", "magic", "\\u", "ns_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "common", "\\u", "scala", "r", " ", ":", " ", "NS", "\\u", "C", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Mag", "ic", "Constant_", "(_", "p_", "[_", "1_", "]_", "._", "upper_", "(_", ")_", ",_", "None_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "scalar_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "scala", "r", " ", ":", " ", "common", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", "|", " ", "QUOTE", " ", "QUOTE", "\\", "10", ";", " ", " ", " ", "|", " ", "QUOTE", " ", "ENC", "APS", "ED", "\\u", "AND", "\\u", "WHITESPACE", " ", "QUOTE", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "._", "decode_", "(_", "'", "string", "\\u", "escape", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "scala", "r", "\\u", "namespace", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "scala", "r", " ", ":", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", "|", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "\\", "10", ";", " ", " ", " ", "|", " ", "NAMESPACE", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "namespace", "\\u", "name", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Constant_", "(_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "scala", "r", "\\u", "una", "ry", "\\u", "op_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "scala", "r", " ", ":", " ", "PLUS", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", "|", " ", "MINUS", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Una", "ry", "Op_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "scala", "r", "\\u", "array_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "static", "\\u", "scala", "r", " ", ":", " ", "ARR", "AY", " ", "LPAR", "EN", " ", "static", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "RPA", "REN", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Array_", "(_", "p_", "[_", "3_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "array", "\\u", "pair", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "empty", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "possib", "le", "\\u", "comma", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", "\\u", "item_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "None_", ",_", "p_", "[_", "1_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", "\\u", "pair_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", ":", " ", "static", "\\u", "non", "\\u", "empty", "\\u", "array", "\\u", "pair", "\\u", "list", " ", "COMMA", " ", "static", "\\u", "scala", "r", " ", "DOUBLE", "\\u", "ARROW", " ", "static", "\\u", "scala", "r", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "static", "\\u", "scala", "r", " ", "DOUBLE", "\\u", "ARROW", " ", "static", "\\u", "scala", "r", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "6_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "3_", "]_", ",_", "p_", "[_", "5_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "[_", "ast_", "._", "Array", "Element_", "(_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "3_", "]_", ",_", "False_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "namespace", "\\u", "name_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "namespace", "\\u", "name", " ", ":", " ", "namespace", "\\u", "name", " ", "NS", "\\u", "SEPA", "RAT", "OR", " ", "STRING", "\\", "10", ";", " ", " ", " ", " ", "|", " ", "STRING", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "4_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "+_", "p_", "[_", "2_", "]_", "+_", "p_", "[_", "3_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", "enca", "ps", "\\u", "list", " ", ":", " ", "enca", "ps", "\\u", "list", " ", "enca", "ps", "\\u", "var", "\\", "10", ";", " ", "|", " ", "empty", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "p_", ")_", "==_", "3_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "p_", "[_", "1_", "]_", "==_", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Bin", "ary", "Op_", "(_", "'.'_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "list", "\\u", "string_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "list", " ", ":", " ", "enca", "ps", "\\u", "list", " ", "ENC", "APS", "ED", "\\u", "AND", "\\u", "WHITESPACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "p_", "[_", "1_", "]_", "==_", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "._", "decode_", "(_", "'", "string", "\\u", "escape", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Bin", "ary", "Op_", "(_", "'.'_", ",_", "p_", "[_", "1_", "]_", ",_", "p_", "[_", "2_", "]_", "._", "decode_", "(_", "'", "string", "\\u", "escape", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "VARIABLE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "array", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "VARIABLE", " ", "LB", "RACK", "ET", " ", "enca", "ps", "\\u", "var", "\\u", "offset", " ", "RB", "RACK", "ET", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Array", "Offset_", "(_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", ",_", "p_", "[_", "3_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "object\\u", "property_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "VARIABLE", " ", "OBJ", "ECT", "\\u", "OPERATOR", " ", "STRING", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Object", "Property_", "(_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", ",_", "p_", "[_", "3_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "dollar", "\\u", "curl", "y", "\\u", "expr_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "DO", "LLA", "R", "\\u", "OPEN", "\\u", "CUR", "LY", "\\u", "BRAC", "ES", " ", "expr", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "dollar", "\\u", "curl", "y", "\\u", "array", "\\u", "offset_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "DO", "LLA", "R", "\\u", "OPEN", "\\u", "CUR", "LY", "\\u", "BRAC", "ES", " ", "STRING", "\\u", "VAR", "NAME", " ", "LB", "RACK", "ET", " ", "expr", " ", "RB", "RACK", "ET", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Array", "Offset_", "(_", "ast_", "._", "Variable_", "(_", "'$'_", "+_", "p_", "[_", "2_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "2_", ")_", ")_", ",_", "p_", "[_", "4_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "3_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "curl", "y", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", " ", ":", " ", "CUR", "LY", "\\u", "OPEN", " ", "variab", "le", " ", "RB", "RACE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "offset", "\\u", "string_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", "\\u", "offset", " ", ":", " ", "STRING", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "p_", "[_", "1_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "offset", "\\u", "num", "\\u", "string_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", "\\u", "offset", " ", ":", " ", "NUM", "\\u", "STRING", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "int_", "(_", "p_", "[_", "1_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "enca", "ps", "\\u", "var", "\\u", "offset", "\\u", "variable_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "enca", "ps", "\\u", "var", "\\u", "offset", " ", ":", " ", "VARIABLE", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "[_", "0_", "]_", "=_", "ast_", "._", "Variable_", "(_", "p_", "[_", "1_", "]_", ",_", "lineno_", "=_", "p_", "._", "lineno_", "(_", "1_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "empty_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'", "empty", " ", ":", " ", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "p", "\\u", "error_", "(_", "t_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "t_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Syntax", "Error_", "(_", "'", "invalid", " ", "synta", "x", "'_", ",_", "(_", "None_", ",_", "t_", "._", "lineno_", ",_", "None_", ",_", "t_", "._", "value_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Syntax", "Error_", "(_", "'", "unexpected", " ", "EO", "F", " ", "whi", "le", " ", "pars", "ing", "'_", ",_", "(_", "None_", ",_", "None_", ",_", "None_", ",_", "None_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
ooici/pyon/pyon/ion/test/test_process.py
[ { "content": " def test_known_error(self):\n\n # IonExceptions and TypeErrors get forwarded back intact\n svc = self._make_service()\n p = IonProcessThread(name=sentinel.name, listeners=[], service=svc)\n p.start()\n p.get_ready_event().wait(timeout=5)\n self.addCleanup(p.stop)\n\n def proc_call():\n raise NotFound(\"didn't find it\")\n\n def client_call(p=None, ar=None):\n try:\n ca = p._routing_call(proc_call, None)\n ca.get(timeout=5)\n\n except IonException as e:\n ar.set(e)\n\n ar = AsyncResult()\n gl_call = spawn(client_call, p=p, ar=ar)\n\n e = ar.get(timeout=5)\n\n self.assertIsInstance(e, NotFound)", "metadata": "root.ProcessTest.test_known_error", "header": "['class', 'ProcessTest', '(', 'PyonTestCase', ')', ':', '___EOS___']", "index": 157 }, { "content": " def test_unknown_error(self):\n\n # Unhandled exceptions get handled and then converted to ContainerErrors\n svc = self._make_service()\n p = IonProcessThread(name=sentinel.name, listeners=[], service=svc)\n p.start()\n p.get_ready_event().wait(timeout=5)\n self.addCleanup(p.stop)\n\n def proc_call():\n raise self.ExpectedError(\"didn't find it\")\n\n def client_call(p=None, ar=None):\n try:\n ca = p._routing_call(proc_call, None)\n ca.get(timeout=5)\n\n except IonException as e:\n ar.set(e)\n\n ar = AsyncResult()\n gl_call = spawn(client_call, p=p, ar=ar)\n\n e = ar.get(timeout=5)\n\n self.assertIsInstance(e, ContainerError)\n self.assertEquals(len(p._errors), 1)", "metadata": "root.ProcessTest.test_unknown_error", "header": "['class', 'ProcessTest', '(', 'PyonTestCase', ')', ':', '___EOS___']", "index": 184 }, { "content": " def test__control_flow_expired_call(self):\n svc = self._make_service()\n p = IonProcessThread(name=sentinel.name, listeners=[], service=svc)\n p.start()\n p.get_ready_event().wait(timeout=5)\n self.addCleanup(p.stop)\n\n def make_call(call, ctx, val):\n ar = p._routing_call(call, ctx, val)\n return ar.get(timeout=10)\n\n ctx = { 'reply-by' : 0 } # no need for real time, as it compares by CURRENT >= this value\n futurear = AsyncResult()\n with patch('pyon.ion.process.greenlet') as gcm:\n waitar = AsyncResult()\n gcm.getcurrent().kill.side_effect = lambda *a, **k: waitar.set()\n\n ar = p._routing_call(futurear.set, ctx, sentinel.val)\n\n waitar.get(timeout=10)\n\n # futurear is not set\n self.assertFalse(futurear.ready())\n\n # neither is the ar we got back from routing_call\n self.assertFalse(ar.ready())\n\n # we should've been killed, though\n self.assertEquals(gcm.getcurrent().kill.call_count, 1)\n self.assertIsInstance(gcm.getcurrent().kill.call_args[1]['exception'], IonTimeout)\n\n # put a new call through (to show unblocked)\n futurear2 = AsyncResult()\n ar2 = p._routing_call(futurear2.set, MagicMock(), sentinel.val2)\n ar2.get(timeout=2)", "metadata": "root.ProcessTest.test__control_flow_expired_call", "header": "['class', 'ProcessTest', '(', 'PyonTestCase', ')', ':', '___EOS___']", "index": 316 }, { "content": " def test_heartbeat_listener_dead(self):\n mocklistener = Mock(spec=ProcessRPCServer)\n svc = self._make_service()\n p = IonProcessThread(name=sentinel.name, listeners=[mocklistener], service=svc)\n readyev = Event()\n readyev.set()\n mocklistener.get_ready_event.return_value = readyev\n\n def fake_listen(evout, evin):\n evout.set(True)\n evin.wait()\n\n listenoutev = AsyncResult()\n listeninev = Event()\n\n p.start()\n p.get_ready_event().wait(timeout=5)\n p.start_listeners()\n\n listenoutev.wait(timeout=5) # wait for listen loop to start\n\n self.addCleanup(listeninev.set) # makes listen loop fall out on shutdown\n self.addCleanup(p.stop)\n\n listeninev.set() # stop the listen loop\n p.thread_manager.children[1].join(timeout=5) # wait for listen loop to terminate\n\n hb = p.heartbeat()\n\n self.assertEquals((False, True, True), hb)\n self.assertEquals(0, p._heartbeat_count)\n self.assertIsNone(p._heartbeat_op)", "metadata": "root.ProcessTest.test_heartbeat_listener_dead", "header": "['class', 'ProcessTest', '(', 'PyonTestCase', ')', ':', '___EOS___']", "index": 398 }, { "content": " def test_heartbeat_current_op_over_limit(self):\n self.patch_cfg('pyon.ion.process.CFG', {'cc':{'timeout':{'heartbeat_proc_count_threshold':2}}})\n\n svc = self._make_service()\n p = IonProcessThread(name=sentinel.name, listeners=[], service=svc)\n p.start()\n p.get_ready_event().wait(timeout=5)\n p._ctrl_thread.ev_exit.set() # prevent heartbeat loop in proc's target\n\n def fake_op(evout, evin):\n evout.set(True)\n evin.wait()\n\n listenoutev = AsyncResult()\n listeninev = Event()\n\n self.addCleanup(listeninev.set) # allow graceful termination\n self.addCleanup(p.stop)\n\n ar = p._routing_call(fake_op, None, listenoutev, listeninev)\n\n listenoutev.wait(timeout=5) # wait for ctrl thread to run our op\n\n # make sure it's over the threshold\n for x in xrange(3):\n hb = p.heartbeat()\n\n self.assertEquals((True, True, False), hb)", "metadata": "root.ProcessTest.test_heartbeat_current_op_over_limit", "header": "['class', 'ProcessTest', '(', 'PyonTestCase', ')', ':', '___EOS___']", "index": 505 }, { "content": " @unittest.skipIf(os.getenv('CEI_LAUNCH_TEST', False), \"Test reaches into container, doesn't work with CEI\")\n @unittest.skip(\"heartbeat failing process is disabled\")\n def test_heartbeat_failure(self):\n self.patch_cfg('pyon.ion.process.CFG', {'cc':{'timeout':{'heartbeat_proc_count_threshold':2, 'heartbeat':1.0}}})\n\n svc = self.container.proc_manager.procs[self.pid]\n ip = svc._process\n stopar = AsyncResult()\n self.container.proc_manager.add_proc_state_changed_callback(lambda *args: stopar.set(args))\n\n noticear = AsyncResult() # notify us when the call has been made\n ar = ip._routing_call(svc.takes_too_long, None, noticear=noticear)\n\n noticear.get(timeout=10) # wait for the call to be made\n\n # heartbeat a few times so we trigger the failure soon\n for x in xrange(2):\n ip.heartbeat()\n\n # wait for ip thread to kick over\n ip._ctrl_thread.join(timeout=5)\n\n # now wait for notice proc got canned\n stopargs = stopar.get(timeout=5)\n\n self.assertEquals(stopargs, (svc, ProcessStateEnum.FAILED, self.container))\n\n # should've shut down, no longer in container's process list\n self.assertEquals(len(self.container.proc_manager.procs), 0)", "metadata": "root.TestProcessInt.test_heartbeat_failure", "header": "['class', 'TestProcessInt', '(', 'IonIntegrationTestCase', ')', ':', '___EOS___']", "index": 562 } ]
[ { "span": "gl_call ", "start_line": 178, "start_column": 8, "end_line": 178, "end_column": 15 }, { "span": "gl_call ", "start_line": 205, "start_column": 8, "end_line": 205, "end_column": 15 }, { "span": "make_call(", "start_line": 323, "start_column": 12, "end_line": 323, "end_column": 21 }, { "span": "fake_listen(", "start_line": 406, "start_column": 12, "end_line": 406, "end_column": 23 }, { "span": "ar ", "start_line": 524, "start_column": 8, "end_line": 524, "end_column": 10 }, { "span": "ar ", "start_line": 573, "start_column": 8, "end_line": 573, "end_column": 10 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Process", "Test_", "(_", "Py", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "know", "n", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Io", "n", "Except", "ion", "s", " ", "and", " ", "Type", "Error", "s", " ", "get", " ", "forwarded", " ", "back", " ", "inta", "ct_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "svc_", "=_", "self_", "._", "\\u", "make", "\\u", "service_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Io", "n", "Process", "Thread_", "(_", "name_", "=_", "sentinel_", "._", "name_", ",_", "listeners_", "=_", "[_", "]_", ",_", "service_", "=_", "svc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "get", "\\u", "read", "y", "\\u", "event_", "(_", ")_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "p_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "proc", "\\u", "call_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Not", "Found_", "(_", "\"", "did", "n", "'", "t", " ", "find", " ", "it", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "client", "\\u", "call_", "(_", "p_", "=_", "None_", ",_", "ar_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ca_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "proc", "\\u", "call_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ca_", "._", "get_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Io", "n", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ar_", "._", "set_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ar_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gl", "\\u", "call_", "=_", "spawn_", "(_", "client", "\\u", "call_", ",_", "p_", "=_", "p_", ",_", "ar_", "=_", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "e_", "=_", "ar_", "._", "get_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "e_", ",_", "Not", "Found_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Process", "Test_", "(_", "Py", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "unknown", "\\u", "error_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Unh", "andle", "d", " ", "exception", "s", " ", "get", " ", "handle", "d", " ", "and", " ", "then", " ", "convert", "ed", " ", "to", " ", "Containe", "r", "Errors_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "svc_", "=_", "self_", "._", "\\u", "make", "\\u", "service_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Io", "n", "Process", "Thread_", "(_", "name_", "=_", "sentinel_", "._", "name_", ",_", "listeners_", "=_", "[_", "]_", ",_", "service_", "=_", "svc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "get", "\\u", "read", "y", "\\u", "event_", "(_", ")_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "p_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "proc", "\\u", "call_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "self_", "._", "Expect", "ed", "Error_", "(_", "\"", "did", "n", "'", "t", " ", "find", " ", "it", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "client", "\\u", "call_", "(_", "p_", "=_", "None_", ",_", "ar_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ca_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "proc", "\\u", "call_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ca_", "._", "get_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Io", "n", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ar_", "._", "set_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ar_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gl", "\\u", "call_", "=_", "spawn_", "(_", "client", "\\u", "call_", ",_", "p_", "=_", "p_", ",_", "ar_", "=_", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "e_", "=_", "ar_", "._", "get_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "e_", ",_", "Containe", "r", "Error_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "p_", "._", "\\u", "errors_", ")_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Process", "Test_", "(_", "Py", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "\\u", "control", "\\u", "flow", "\\u", "expir", "ed", "\\u", "call_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "svc_", "=_", "self_", "._", "\\u", "make", "\\u", "service_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Io", "n", "Process", "Thread_", "(_", "name_", "=_", "sentinel_", "._", "name_", ",_", "listeners_", "=_", "[_", "]_", ",_", "service_", "=_", "svc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "get", "\\u", "read", "y", "\\u", "event_", "(_", ")_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "p_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "make", "\\u", "call_", "(_", "call_", ",_", "ctx_", ",_", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ar_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "call_", ",_", "ctx_", ",_", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "ar_", "._", "get_", "(_", "timeout_", "=_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ctx_", "=_", "{_", "'", "repl", "y", "-", "by", "'_", ":_", "0_", "}_", "#", " ", "no", " ", "need", " ", "for", " ", "real", " ", "time", ",", " ", "as", " ", "it", " ", "compare", "s", " ", "by", " ", "CURREN", "T", " ", ">=", " ", "this", " ", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "future", "ar_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "patch_", "(_", "'", "pyo", "n", ".", "ion", ".", "process", ".", "greenlet", "'_", ")_", "as_", "gcm", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "wait", "ar_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gcm", "_", "._", "getc", "urrent", "_", "(_", ")_", "._", "kill_", "._", "side", "\\u", "effect_", "=_", "lambda_", "*_", "a_", ",_", "**_", "k_", ":_", "wait", "ar_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ar_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "future", "ar_", "._", "set_", ",_", "ctx_", ",_", "sentinel_", "._", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "wait", "ar_", "._", "get_", "(_", "timeout_", "=_", "10_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "future", "ar", " ", "is", " ", "not", " ", "set_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "future", "ar_", "._", "ready_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "nei", "ther", " ", "is", " ", "the", " ", "ar", " ", "we", " ", "got", " ", "back", " ", "from", " ", "routin", "g", "\\u", "call_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "False_", "(_", "ar_", "._", "ready_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "we", " ", "shou", "ld", "'", "ve", " ", "bee", "n", " ", "kille", "d", ",", " ", "tho", "ugh", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "gcm", "_", "._", "getc", "urrent", "_", "(_", ")_", "._", "kill_", "._", "call", "\\u", "count_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Is", "Instance_", "(_", "gcm", "_", "._", "getc", "urrent", "_", "(_", ")_", "._", "kill_", "._", "call", "\\u", "args_", "[_", "1_", "]_", "[_", "'", "exception", "'_", "]_", ",_", "Io", "n", "Timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "put", " ", "a", " ", "new", " ", "call", " ", "through", " ", "(", "to", " ", "show", " ", "unbl", "ock", "ed", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "future", "ar", "2_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar", "2_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "future", "ar", "2_", "._", "set_", ",_", "Mag", "ic", "Mock_", "(_", ")_", ",_", "sentinel_", "._", "val2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar", "2_", "._", "get_", "(_", "timeout_", "=_", "2_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Process", "Test_", "(_", "Py", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "heart", "beat", "\\u", "listen", "er", "\\u", "dead_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "listener_", "=_", "Mock_", "(_", "spec_", "=_", "Process", "RP", "CS", "erver_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "svc_", "=_", "self_", "._", "\\u", "make", "\\u", "service_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Io", "n", "Process", "Thread_", "(_", "name_", "=_", "sentinel_", "._", "name_", ",_", "listeners_", "=_", "[_", "mock", "listener_", "]_", ",_", "service_", "=_", "svc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "read", "ye", "v_", "=_", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "read", "ye", "v_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mock", "listener_", "._", "get", "\\u", "read", "y", "\\u", "event_", "._", "return", "\\u", "value_", "=_", "read", "ye", "v_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "fake", "\\u", "listen_", "(_", "evo", "ut_", ",_", "evi", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "evo", "ut_", "._", "set_", "(_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "evi", "n_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "listen", "oute", "v_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "listen", "ine", "v_", "=_", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "p_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "get", "\\u", "read", "y", "\\u", "event_", "(_", ")_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "start", "\\u", "listeners_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "listen", "oute", "v_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "#", " ", "wait", " ", "for", " ", "listen", " ", "loop", " ", "to", " ", "start_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "listen", "ine", "v_", "._", "set_", ")_", "#", " ", "make", "s", " ", "listen", " ", "loop", " ", "fall", " ", "out", " ", "on", " ", "shutdown_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "p_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "listen", "ine", "v_", "._", "set_", "(_", ")_", "#", " ", "stop", " ", "the", " ", "listen", " ", "loop_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "thread", "\\u", "manager_", "._", "children_", "[_", "1_", "]_", "._", "join_", "(_", "timeout_", "=_", "5_", ")_", "#", " ", "wait", " ", "for", " ", "listen", " ", "loop", " ", "to", " ", "terminate_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "hb_", "=_", "p_", "._", "heartbeat_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "(_", "False_", ",_", "True_", ",_", "True_", ")_", ",_", "hb_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "0_", ",_", "p_", "._", "\\u", "heart", "beat", "\\u", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Is", "None_", "(_", "p_", "._", "\\u", "heart", "beat", "\\u", "op_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Process", "Test_", "(_", "Py", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "heart", "beat", "\\u", "current", "\\u", "op", "\\u", "over", "\\u", "limit_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "patch", "\\u", "cfg_", "(_", "'", "pyo", "n", ".", "ion", ".", "process", ".", "CF", "G", "'_", ",_", "{_", "'", "cc", "'_", ":_", "{_", "'", "timeo", "ut", "'_", ":_", "{_", "'", "heart", "beat", "\\u", "proc", "\\u", "count", "\\u", "threshol", "d", "'_", ":_", "2_", "}_", "}_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "svc_", "=_", "self_", "._", "\\u", "make", "\\u", "service_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "=_", "Io", "n", "Process", "Thread_", "(_", "name_", "=_", "sentinel_", "._", "name_", ",_", "listeners_", "=_", "[_", "]_", ",_", "service_", "=_", "svc_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "get", "\\u", "read", "y", "\\u", "event_", "(_", ")_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "p_", "._", "\\u", "ctrl", "\\u", "thread_", "._", "ev", "\\u", "exit_", "._", "set_", "(_", ")_", "#", " ", "prevent", " ", "heart", "beat", " ", "loop", " ", "in", " ", "proc", "'", "s", " ", "target_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "fake", "\\u", "op_", "(_", "evo", "ut_", ",_", "evi", "n_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "evo", "ut_", "._", "set_", "(_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "evi", "n_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "listen", "oute", "v_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "listen", "ine", "v_", "=_", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "listen", "ine", "v_", "._", "set_", ")_", "#", " ", "allow", " ", "graceful", " ", "termination", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "add", "Cleanup_", "(_", "p_", "._", "stop_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ar_", "=_", "p_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "fake", "\\u", "op_", ",_", "None_", ",_", "listen", "oute", "v_", ",_", "listen", "ine", "v_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "listen", "oute", "v_", "._", "wait_", "(_", "timeout_", "=_", "5_", ")_", "#", " ", "wait", " ", "for", " ", "ctrl", " ", "thread", " ", "to", " ", "run", " ", "our", " ", "op_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "make", " ", "sure", " ", "it", "'", "s", " ", "over", " ", "the", " ", "threshold_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "x_", "in_", "xrange_", "(_", "3_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "hb_", "=_", "p_", "._", "heartbeat_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "(_", "True_", ",_", "True_", ",_", "False_", ")_", ",_", "hb_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Process", "Int_", "(_", "Io", "n", "Integrati", "on", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "unittest_", "._", "skip", "If_", "(_", "os_", "._", "getenv_", "(_", "'", "CE", "I", "\\u", "LAUN", "CH", "\\u", "TEST", "'_", ",_", "False_", ")_", ",_", "\"", "Test", " ", "reache", "s", " ", "int", "o", " ", "container", ",", " ", "doe", "sn", "'", "t", " ", "work", " ", "with", " ", "CE", "I", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "unittest_", "._", "skip_", "(_", "\"", "heart", "beat", " ", "faili", "ng", " ", "process", " ", "is", " ", "disable", "d", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "heart", "beat", "\\u", "failure_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "patch", "\\u", "cfg_", "(_", "'", "pyo", "n", ".", "ion", ".", "process", ".", "CF", "G", "'_", ",_", "{_", "'", "cc", "'_", ":_", "{_", "'", "timeo", "ut", "'_", ":_", "{_", "'", "heart", "beat", "\\u", "proc", "\\u", "count", "\\u", "threshol", "d", "'_", ":_", "2_", ",_", "'", "heart", "beat", "'_", ":_", "1.0_", "}_", "}_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "svc_", "=_", "self_", "._", "container_", "._", "proc", "\\u", "manager_", "._", "procs_", "[_", "self_", "._", "pid_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ip_", "=_", "svc_", "._", "\\u", "process_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "stop", "ar_", "=_", "Async", "Result_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "container_", "._", "proc", "\\u", "manager_", "._", "add", "\\u", "proc", "\\u", "state", "\\u", "change", "d\\u", "callback_", "(_", "lambda_", "*_", "args_", ":_", "stop", "ar_", "._", "set_", "(_", "args_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "notice", "ar_", "=_", "Async", "Result_", "(_", ")_", "#", " ", "notif", "y", " ", "us", " ", "whe", "n", " ", "the", " ", "call", " ", "has", " ", "bee", "n", " ", "made", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ar_", "=_", "ip_", "._", "\\u", "routin", "g", "\\u", "call_", "(_", "svc_", "._", "take", "s", "\\u", "too", "\\u", "long_", ",_", "None_", ",_", "notice", "ar_", "=_", "notice", "ar_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "notice", "ar_", "._", "get_", "(_", "timeout_", "=_", "10_", ")_", "#", " ", "wait", " ", "for", " ", "the", " ", "call", " ", "to", " ", "be", " ", "made", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "heart", "beat", " ", "a", " ", "few", " ", "times", " ", "so", " ", "we", " ", "trigger", " ", "the", " ", "fail", "ure", " ", "soo", "n_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "x_", "in_", "xrange_", "(_", "2_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ip_", "._", "heartbeat_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "wait", " ", "for", " ", "ip", " ", "thread", " ", "to", " ", "kick", " ", "over_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "ip_", "._", "\\u", "ctrl", "\\u", "thread_", "._", "join_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "now", " ", "wait", " ", "for", " ", "notice", " ", "proc", " ", "got", " ", "cann", "ed_", "\\u\\u\\uNL\\u\\u\\u_", "stop", "args_", "=_", "stop", "ar_", "._", "get_", "(_", "timeout_", "=_", "5_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "stop", "args_", ",_", "(_", "svc_", ",_", "Process", "State", "Enum_", "._", "FAILED_", ",_", "self_", "._", "container_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "shou", "ld", "'", "ve", " ", "shut", " ", "down", ",", " ", "no", " ", "long", "er", " ", "in", " ", "container", "'", "s", " ", "process", " ", "list_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "len_", "(_", "self_", "._", "container_", "._", "proc", "\\u", "manager_", "._", "procs_", ")_", ",_", "0_", ")_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Implicit string concatenation in a list
openstack/tosca-parser/toscaparser/tests/test_toscadef.py
[ { "content": " def test_artifacts(self):\n self.assertEqual('tosca.artifacts.Root',\n artif_file_type.parent_type)\n self.assertEqual({}, artif_file_type.parent_artifacts)\n self.assertEqual(sorted(['tosca.artifacts.Root'],\n key=lambda x: str(x)),\n sorted([artif_file_type.get_artifact(name)\n for name in artif_file_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.artifacts.Implementation',\n artif_bash_type.parent_type)\n self.assertEqual({'tosca.artifacts.Implementation':\n {'derived_from': 'tosca.artifacts.Root',\n 'description':\n 'TOSCA base type for implementation artifacts'}},\n artif_bash_type.parent_artifacts)\n self.assertEqual(sorted([['sh'], 'tosca.artifacts.Implementation',\n 'Script artifact for the Unix Bash shell',\n 'application/x-sh'], key=lambda x: str(x)),\n sorted([artif_bash_type.get_artifact(name)\n for name in artif_bash_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.artifacts.Implementation',\n artif_python_type.parent_type)\n self.assertEqual({'tosca.artifacts.Implementation':\n {'derived_from': 'tosca.artifacts.Root',\n 'description':\n 'TOSCA base type for implementation artifacts'}},\n artif_python_type.parent_artifacts)\n self.assertEqual(sorted([['py'], 'tosca.artifacts.Implementation',\n 'Artifact for the interpreted Python'\n ' language', 'application/x-python'],\n key=lambda x: str(x)),\n sorted([artif_python_type.get_artifact(name)\n for name in artif_python_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.artifacts.Deployment.Image',\n artif_container_docker_type.parent_type)\n self.assertEqual({'tosca.artifacts.Deployment':\n {'derived_from': 'tosca.artifacts.Root',\n 'description':\n 'TOSCA base type for deployment artifacts'},\n 'tosca.artifacts.Deployment.Image':\n {'derived_from': 'tosca.artifacts.Deployment'}},\n artif_container_docker_type.parent_artifacts)\n self.assertEqual(sorted(['tosca.artifacts.Deployment.Image',\n 'Docker container image'],\n key=lambda x: str(x)),\n sorted([artif_container_docker_type.\n get_artifact(name) for name in\n artif_container_docker_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.artifacts.Deployment.Image',\n artif_vm_iso_type.parent_type)\n self.assertEqual({'tosca.artifacts.Deployment':\n {'derived_from': 'tosca.artifacts.Root',\n 'description':\n 'TOSCA base type for deployment artifacts'},\n 'tosca.artifacts.Deployment.Image':\n {'derived_from': 'tosca.artifacts.Deployment'}},\n artif_vm_iso_type.parent_artifacts)\n self.assertEqual(sorted(['tosca.artifacts.Deployment.Image',\n 'Virtual Machine (VM) image in '\n 'ISO disk format',\n 'application/octet-stream', ['iso']],\n key=lambda x: str(x)),\n sorted([artif_vm_iso_type.\n get_artifact(name) for name in\n artif_vm_iso_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.artifacts.Deployment.Image',\n artif_vm_qcow2_type.parent_type)\n self.assertEqual({'tosca.artifacts.Deployment':\n {'derived_from': 'tosca.artifacts.Root',\n 'description':\n 'TOSCA base type for deployment artifacts'},\n 'tosca.artifacts.Deployment.Image':\n {'derived_from': 'tosca.artifacts.Deployment'}},\n artif_vm_qcow2_type.parent_artifacts)\n self.assertEqual(sorted(['tosca.artifacts.Deployment.Image',\n 'Virtual Machine (VM) image in QCOW v2 '\n 'standard disk format',\n 'application/octet-stream', ['qcow2']],\n key=lambda x: str(x)),\n sorted([artif_vm_qcow2_type.\n get_artifact(name) for name in\n artif_vm_qcow2_type.defs],\n key=lambda x: str(x)))", "metadata": "root.ToscaDefTest.test_artifacts", "header": "['class', 'ToscaDefTest', '(', 'TestCase', ')', ':', '___EOS___']", "index": 189 }, { "content": " def test_policies(self):\n self.assertEqual('tosca.policies.Root',\n policy_placement_type.parent_type)\n self.assertEqual({}, policy_placement_type.parent_policies)\n self.assertEqual(sorted(['tosca.policies.Root',\n 'The TOSCA Policy Type definition that is '\n 'used to govern placement of TOSCA nodes or '\n 'groups of nodes.'],\n key=lambda x: str(x)),\n sorted([policy_placement_type.get_policy(name)\n for name in policy_placement_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.policies.Root',\n policy_scaling_type.parent_type)\n self.assertEqual({}, policy_scaling_type.parent_policies)\n self.assertEqual(sorted(['tosca.policies.Root',\n 'The TOSCA Policy Type definition that is '\n 'used to govern scaling of TOSCA nodes or '\n 'groups of nodes.'],\n key=lambda x: str(x)),\n sorted([policy_scaling_type.get_policy(name)\n for name in policy_scaling_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.policies.Root',\n policy_update_type.parent_type)\n self.assertEqual({}, policy_update_type.parent_policies)\n self.assertEqual(sorted(['tosca.policies.Root',\n 'The TOSCA Policy Type definition that is '\n 'used to govern update of TOSCA nodes or '\n 'groups of nodes.'],\n key=lambda x: str(x)),\n sorted([policy_update_type.get_policy(name)\n for name in policy_update_type.defs],\n key=lambda x: str(x)))\n\n self.assertEqual('tosca.policies.Root',\n policy_performance_type.parent_type)\n self.assertEqual({}, policy_performance_type.parent_policies)\n self.assertEqual(sorted(['tosca.policies.Root',\n 'The TOSCA Policy Type definition that is '\n 'used to declare performance requirements '\n 'for TOSCA nodes or groups of nodes.'],\n key=lambda x: str(x)),\n sorted([policy_performance_type.get_policy(name)\n for name in policy_performance_type.defs],\n key=lambda x: str(x)))", "metadata": "root.ToscaDefTest.test_policies", "header": "['class', 'ToscaDefTest', '(', 'TestCase', ')', ':', '___EOS___']", "index": 283 } ]
[ { "span": "'Artifact for the interpreted Python'\n ' language',", "start_line": 221, "start_column": 33, "end_line": 222, "end_column": 44 }, { "span": "'Virtual Machine (VM) image in '\n 'ISO disk format',", "start_line": 255, "start_column": 33, "end_line": 256, "end_column": 50 }, { "span": "'Virtual Machine (VM) image in QCOW v2 '\n 'standard disk format',", "start_line": 274, "start_column": 33, "end_line": 275, "end_column": 55 }, { "span": "'The TOSCA Policy Type definition that is '\n 'used to govern placement of TOSCA nodes or '\n 'groups of nodes.']", "start_line": 288, "start_column": 33, "end_line": 290, "end_column": 51 }, { "span": "'The TOSCA Policy Type definition that is '\n 'used to govern scaling of TOSCA nodes or '\n 'groups of nodes.']", "start_line": 300, "start_column": 33, "end_line": 302, "end_column": 51 }, { "span": "'The TOSCA Policy Type definition that is '\n 'used to govern update of TOSCA nodes or '\n 'groups of nodes.']", "start_line": 312, "start_column": 33, "end_line": 314, "end_column": 51 }, { "span": "'The TOSCA Policy Type definition that is '\n 'used to declare performance requirements '\n 'for TOSCA nodes or groups of nodes.']", "start_line": 324, "start_column": 33, "end_line": 326, "end_column": 70 } ]
[]
1
true
[ "[CLS]_", "Implicit", "_", "string_", "concate", "nation_", "in_", "a_", "list_", "[SEP]_", "class_", "Tos", "ca", "Def", "Test_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "artifacts_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "file", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "}_", ",_", "arti", "f", "\\u", "file", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "file", "\\u", "type_", "._", "get", "\\u", "artifact_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "arti", "f", "\\u", "file", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "bash", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "'", "TOS", "CA", " ", "base", " ", "type", " ", "for", " ", "implementation", " ", "artifact", "s", "'_", "}_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "bash", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "[_", "'", "sh", "'_", "]_", ",_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Script", " ", "artifact", " ", "for", " ", "the", " ", "Uni", "x", " ", "Bas", "h", " ", "shell", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "applica", "tion", "/", "x", "-", "sh", "'_", "]_", ",_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "bash", "\\u", "type_", "._", "get", "\\u", "artifact_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "arti", "f", "\\u", "bash", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "python", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "'", "TOS", "CA", " ", "base", " ", "type", " ", "for", " ", "implementation", " ", "artifact", "s", "'_", "}_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "python", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "[_", "'", "py", "'_", "]_", ",_", "'", "tosc", "a", ".", "artifact", "s", ".", "Implementation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Artifact", " ", "for", " ", "the", " ", "interprete", "d", " ", "Pyth", "on", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", " ", "language", "'_", ",_", "'", "applica", "tion", "/", "x", "-", "python", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "python", "\\u", "type_", "._", "get", "\\u", "artifact_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "arti", "f", "\\u", "python", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "container", "\\u", "docker", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "'", "TOS", "CA", " ", "base", " ", "type", " ", "for", " ", "deploy", "ment", " ", "artifact", "s", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", "}_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "container", "\\u", "docker", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Docke", "r", " ", "container", " ", "image", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "container", "\\u", "docker", "\\u", "type_", "._", "\\u\\u\\uNL\\u\\u\\u_", "get", "\\u", "artifact_", "(_", "name_", ")_", "for_", "name_", "in_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "container", "\\u", "docker", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "iso", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "'", "TOS", "CA", " ", "base", " ", "type", " ", "for", " ", "deploy", "ment", " ", "artifact", "s", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", "}_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "iso", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Virt", "ual", " ", "Machine", " ", "(", "VM", ")", " ", "image", " ", "in", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "ISO", " ", "disk", " ", "format", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "applica", "tion", "/", "oct", "et", "-", "stream", "'_", ",_", "[_", "'", "iso", "'_", "]_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "vm", "\\u", "iso", "\\u", "type_", "._", "\\u\\u\\uNL\\u\\u\\u_", "get", "\\u", "artifact_", "(_", "name_", ")_", "for_", "name_", "in_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "iso", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "qcow", "2", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "'", "TOS", "CA", " ", "base", " ", "type", " ", "for", " ", "deploy", "ment", " ", "artifact", "s", "'_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "derive", "d\\u", "from", "'_", ":_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", "'_", "}_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "qcow", "2", "\\u", "type_", "._", "parent", "\\u", "artifacts_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "artifact", "s", ".", "Deployment", ".", "Image", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Virt", "ual", " ", "Machine", " ", "(", "VM", ")", " ", "image", " ", "in", " ", "QC", "OW", " ", "v2", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "standard", " ", "disk", " ", "format", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "applica", "tion", "/", "oct", "et", "-", "stream", "'_", ",_", "[_", "'", "qcow", "2", "'_", "]_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "arti", "f", "\\u", "vm", "\\u", "qcow", "2", "\\u", "type_", "._", "\\u\\u\\uNL\\u\\u\\u_", "get", "\\u", "artifact_", "(_", "name_", ")_", "for_", "name_", "in_", "\\u\\u\\uNL\\u\\u\\u_", "arti", "f", "\\u", "vm", "\\u", "qcow", "2", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Tos", "ca", "Def", "Test_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "policies_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "policy", "\\u", "placem", "ent", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "}_", ",_", "policy", "\\u", "placem", "ent", "\\u", "type_", "._", "parent", "\\u", "policies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "The", " ", "TOS", "CA", " ", "Polic", "y", " ", "Type", " ", "definit", "ion", " ", "tha", "t", " ", "is", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "used", " ", "to", " ", "govern", " ", "placem", "ent", " ", "of", " ", "TOS", "CA", " ", "nodes", " ", "or", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "group", "s", " ", "of", " ", "nodes", ".'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "policy", "\\u", "placem", "ent", "\\u", "type_", "._", "get", "\\u", "policy_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "policy", "\\u", "placem", "ent", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "policy", "\\u", "scal", "ing", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "}_", ",_", "policy", "\\u", "scal", "ing", "\\u", "type_", "._", "parent", "\\u", "policies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "The", " ", "TOS", "CA", " ", "Polic", "y", " ", "Type", " ", "definit", "ion", " ", "tha", "t", " ", "is", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "used", " ", "to", " ", "govern", " ", "scal", "ing", " ", "of", " ", "TOS", "CA", " ", "nodes", " ", "or", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "group", "s", " ", "of", " ", "nodes", ".'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "policy", "\\u", "scal", "ing", "\\u", "type_", "._", "get", "\\u", "policy_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "policy", "\\u", "scal", "ing", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "policy", "\\u", "update", "\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "}_", ",_", "policy", "\\u", "update", "\\u", "type_", "._", "parent", "\\u", "policies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "The", " ", "TOS", "CA", " ", "Polic", "y", " ", "Type", " ", "definit", "ion", " ", "tha", "t", " ", "is", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "used", " ", "to", " ", "govern", " ", "update", " ", "of", " ", "TOS", "CA", " ", "nodes", " ", "or", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "group", "s", " ", "of", " ", "nodes", ".'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "policy", "\\u", "update", "\\u", "type_", "._", "get", "\\u", "policy_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "policy", "\\u", "update", "\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "policy", "\\u", "perform", "anc", "e\\u", "type_", "._", "parent", "\\u", "type_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "{_", "}_", ",_", "policy", "\\u", "perform", "anc", "e\\u", "type_", "._", "parent", "\\u", "policies_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equal_", "(_", "sorted_", "(_", "[_", "'", "tosc", "a", ".", "poli", "cies", ".", "Roo", "t", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "The", " ", "TOS", "CA", " ", "Polic", "y", " ", "Type", " ", "definit", "ion", " ", "tha", "t", " ", "is", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "used", " ", "to", " ", "declar", "e", " ", "perform", "anc", "e", " ", "require", "ment", "s", " ", "'_", "\\u\\u\\uNL\\u\\u\\u_", "'", "for", " ", "TOS", "CA", " ", "nodes", " ", "or", " ", "group", "s", " ", "of", " ", "nodes", ".'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "sorted_", "(_", "[_", "policy", "\\u", "perform", "anc", "e\\u", "type_", "._", "get", "\\u", "policy_", "(_", "name_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "name_", "in_", "policy", "\\u", "perform", "anc", "e\\u", "type_", "._", "defs_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", "=_", "lambda_", "x_", ":_", "str_", "(_", "x_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
zomux/deepy/deepy/networks/__init__.py
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom network import NeuralNetwork\nfrom classifier import NeuralClassifier\nfrom regressor import NeuralRegressor\nfrom auto_encoder import AutoEncoder\nfrom recursive_auto_encoder import RecursiveAutoEncoder\nfrom graph import ComputationalGraph\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from network import NeuralNetwork", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 33 }, { "span": "from classifier import NeuralClassifier", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 39 }, { "span": "from regressor import NeuralRegressor", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 37 }, { "span": "from auto_encoder import AutoEncoder", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 36 }, { "span": "from recursive_auto_encoder import RecursiveAutoEncoder", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 55 }, { "span": "from graph import ComputationalGraph", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 36 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "network_", "import_", "Neu", "ral", "Network_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "classifier_", "import_", "Neu", "ral", "Classifier_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "regressor", "_", "import_", "Neu", "ral", "Regressor_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "auto", "\\u", "encoder_", "import_", "Auto", "Encoder_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "recurs", "ive", "\\u", "auto", "\\u", "encoder_", "import_", "Recursive", "Auto", "Encoder_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "graph_", "import_", "Computation", "al", "Graph_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1 ]
Unused local variable
dpkp/kafka-python/test/test_client.py
[ { "content": " @patch.object(SimpleClient, '_get_conn')\n @patch.object(SimpleClient, 'load_metadata_for_topics')\n def test_send_broker_unaware_request_fail(self, load_metadata, conn):\n mocked_conns = {\n ('kafka01', 9092): MagicMock(),\n ('kafka02', 9092): MagicMock()\n }\n for val in mocked_conns.values():\n mock_conn(val, success=False)\n\n def mock_get_conn(host, port, afi):\n return mocked_conns[(host, port)]\n conn.side_effect = mock_get_conn\n\n client = SimpleClient(hosts=['kafka01:9092', 'kafka02:9092'])\n\n req = KafkaProtocol.encode_metadata_request()\n with self.assertRaises(KafkaUnavailableError):\n client._send_broker_unaware_request(payloads=['fake request'],\n encoder_fn=MagicMock(return_value='fake encoded message'),\n decoder_fn=lambda x: x)\n\n for key, conn in six.iteritems(mocked_conns):\n conn.send.assert_called_with('fake encoded message')", "metadata": "root.TestSimpleClient.test_send_broker_unaware_request_fail", "header": "['class', 'TestSimpleClient', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 62 } ]
[ { "span": "req ", "start_line": 78, "start_column": 8, "end_line": 78, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "Simple", "Client_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "patch_", "._", "object_", "(_", "Simple", "Client_", ",_", "'\\u", "get", "\\u", "conn", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "patch_", "._", "object_", "(_", "Simple", "Client_", ",_", "'", "load", "\\u", "metadata", "\\u", "for", "\\u", "topic", "s", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "send", "\\u", "broker", "\\u", "una", "ware", "\\u", "request", "\\u", "fail_", "(_", "self_", ",_", "load", "\\u", "metadata_", ",_", "conn_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mocked", "\\u", "conns_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "kaf", "ka", "01", "'_", ",_", "909", "2_", ")_", ":_", "Mag", "ic", "Mock_", "(_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'", "kaf", "ka", "02", "'_", ",_", "909", "2_", ")_", ":_", "Mag", "ic", "Mock_", "(_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "val_", "in_", "mocked", "\\u", "conns_", "._", "values_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "mock", "\\u", "conn_", "(_", "val_", ",_", "success_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "mock", "\\u", "get", "\\u", "conn_", "(_", "host_", ",_", "port_", ",_", "afi", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "mocked", "\\u", "conns_", "[_", "(_", "host_", ",_", "port_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "conn_", "._", "side", "\\u", "effect_", "=_", "mock", "\\u", "get", "\\u", "conn_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "client_", "=_", "Simple", "Client_", "(_", "hosts_", "=_", "[_", "'", "kaf", "ka", "01", ":", "909", "2", "'_", ",_", "'", "kaf", "ka", "02", ":", "909", "2", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "req_", "=_", "Ka", "fk", "a", "Protocol_", "._", "encode", "\\u", "metadata", "\\u", "request_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "assert", "Raises_", "(_", "Ka", "fk", "a", "Una", "vail", "able", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "client_", "._", "\\u", "send", "\\u", "broker", "\\u", "una", "ware", "\\u", "request_", "(_", "payloads_", "=_", "[_", "'", "fake", " ", "request", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "encode", "r", "\\u", "fn_", "=_", "Mag", "ic", "Mock_", "(_", "return", "\\u", "value_", "=_", "'", "fake", " ", "encode", "d", " ", "message", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "decode", "r", "\\u", "fn_", "=_", "lambda_", "x_", ":_", "x_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "key_", ",_", "conn_", "in_", "six_", "._", "iteritems_", "(_", "mocked", "\\u", "conns_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "conn_", "._", "send_", "._", "assert", "\\u", "call", "ed", "\\u", "with_", "(_", "'", "fake", " ", "encode", "d", " ", "message", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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port unittest\nimport pyhsm\n\nimport test_common\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class TestSoftHSM(test_common.YHSM_TestCase):\n\n\n\n\n\n\n", "metadata": "root.TestSoftHSM", "header": "['module', '___EOS___']", "index": 9 }, { "content": " def setUp(self):\n test_common.YHSM_TestCase.setUp(self)\n self.nonce = \"4d4d4d4d4d4d\".decode('hex')\n self.key = \"A\" * 16", "metadata": "root.TestSoftHSM.setUp", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 11 }, { "content": " def test_aes_CCM_encrypt_decrypt(self):\n \"\"\" Test decrypting encrypted data. \"\"\"\n key = chr(0x09) * 16\n key_handle = 1\n plaintext = \"foo\".ljust(16, chr(0x0))\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n pt = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, ct, decrypt = True)\n self.assertEquals(plaintext, pt)", "metadata": "root.TestSoftHSM.test_aes_CCM_encrypt_decrypt", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 16 }, { "content": " def test_aes_CCM_wrong_key(self):\n \"\"\" Test decrypting encrypted data with wrong key. \"\"\"\n key = chr(0x09) * 16\n key_handle = 1\n plaintext = \"foo\".ljust(16, chr(0x0))\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n key = chr(0x08) * 16\n self.assertRaises(pyhsm.exception.YHSM_Error, pyhsm.soft_hsm.aesCCM,\n key, key_handle, self.nonce, ct, decrypt = True)", "metadata": "root.TestSoftHSM.test_aes_CCM_wrong_key", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 25 }, { "content": " def test_aes_CCM_wrong_key_handle(self):\n \"\"\" Test decrypting encrypted data with wrong key_handle. \"\"\"\n key = chr(0x09) * 16\n key_handle = 1\n plaintext = \"foo\".ljust(16, chr(0x0))\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n key_handle = 2\n self.assertRaises(pyhsm.exception.YHSM_Error, pyhsm.soft_hsm.aesCCM,\n key, key_handle, self.nonce, ct, decrypt = True)", "metadata": "root.TestSoftHSM.test_aes_CCM_wrong_key_handle", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 35 }, { "content": " def test_soft_simple_aead_generation(self):\n \"\"\" Test soft_hsm simple AEAD generation. \"\"\"\n key_handle = 0x2000\n plaintext = 'foo'.ljust(16, chr(0x0))\n key = str(\"2000\" * 16).decode('hex')\n # generate soft AEAD\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n # generate hard AEAD\n aead = self.hsm.generate_aead_simple(self.nonce, key_handle, plaintext)\n\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n self.assertEquals(aead.data, ct)\n\n # decrypt the AEAD again\n pt = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, ct, decrypt = True)\n self.assertEquals(plaintext, pt)", "metadata": "root.TestSoftHSM.test_soft_simple_aead_generation", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 45 }, { "content": " def test_soft_generate_long_aead(self):\n \"\"\" Test soft_hsm generation of long AEAD. \"\"\"\n key_handle = 0x2000\n plaintext = 'A' * 64\n key = str(\"2000\" * 16).decode('hex')\n # generate soft AEAD\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n # generate hard AEAD\n aead = self.hsm.generate_aead_simple(self.nonce, key_handle, plaintext)\n\n self.assertEquals(aead.data, ct)\n\n # decrypt the AEAD again\n pt = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, ct, decrypt = True)\n self.assertEquals(plaintext, pt)", "metadata": "root.TestSoftHSM.test_soft_generate_long_aead", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 62 }, { "content": " def test_soft_generate_yubikey_secrets_aead(self):\n \"\"\" Test soft_hsm generation of YubiKey secrets AEAD. \"\"\"\n key_handle = 0x2000\n plaintext = 'A' * 22\n key = str(\"2000\" * 16).decode('hex')\n # generate soft AEAD\n ct = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, plaintext, decrypt = False)\n # generate hard AEAD\n aead = self.hsm.generate_aead_simple(self.nonce, key_handle, plaintext)\n\n self.assertEquals(aead.data, ct)\n\n # decrypt the AEAD again\n pt = pyhsm.soft_hsm.aesCCM(key, key_handle, self.nonce, ct, decrypt = True)\n self.assertEquals(plaintext, pt)", "metadata": "root.TestSoftHSM.test_soft_generate_yubikey_secrets_aead", "header": "['class', 'TestSoftHSM', '(', 'test_common', '.', 'YHSM_TestCase', ')', ':', '___EOS___']", "index": 78 } ]
[ { "span": "import sys", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 10 }, { "span": "import unittest", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2012", " ", "Yu", "bic", "o", " ", "AB_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "See", " ", "the", " ", "file", " ", "COPY", "ING", " ", "for", " ", "licence", " ", "statem", "ent", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pyh", "sm_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "test\\u", "common_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "set", "Up_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", "._", "set", "Up_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "nonce_", "=_", "\"", "4d", "4d", "4d", "4d", "4d", "4d", "\"_", "._", "decode_", "(_", "'", "hex", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "key_", "=_", "\"", "A", "\"_", "*_", "16_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "aes", "\\u", "CC", "M", "\\u", "encrypt", "\\u", "decrypt_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "decrypt", "ing", " ", "encrypt", "ed", " ", "data", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "chr_", "(_", "0x09", "_", ")_", "*_", "16_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "\"", "foo", "\"_", "._", "ljust_", "(_", "16_", ",_", "chr_", "(_", "0x0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pt_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "plaintext_", ",_", "pt_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "aes", "\\u", "CC", "M", "\\u", "wrong", "\\u", "key_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "decrypt", "ing", " ", "encrypt", "ed", " ", "data", " ", "with", " ", "wrong", " ", "key", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "chr_", "(_", "0x09", "_", ")_", "*_", "16_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "\"", "foo", "\"_", "._", "ljust_", "(_", "16_", ",_", "chr_", "(_", "0x0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "chr_", "(_", "0x08_", ")_", "*_", "16_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Raises_", "(_", "pyh", "sm_", "._", "exception_", "._", "YH", "SM", "\\u", "Error_", ",_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "aes", "\\u", "CC", "M", "\\u", "wrong", "\\u", "key", "\\u", "handle_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "decrypt", "ing", " ", "encrypt", "ed", " ", "data", " ", "with", " ", "wrong", " ", "key", "\\u", "handle", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "chr_", "(_", "0x09", "_", ")_", "*_", "16_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "\"", "foo", "\"_", "._", "ljust_", "(_", "16_", ",_", "chr_", "(_", "0x0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Raises_", "(_", "pyh", "sm_", "._", "exception_", "._", "YH", "SM", "\\u", "Error_", ",_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "soft", "\\u", "simple", "\\u", "aea", "d\\u", "generation_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "soft", "\\u", "hs", "m", " ", "simple", " ", "AEA", "D", " ", "generat", "ion", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "0x2000", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "'", "foo", "'_", "._", "ljust_", "(_", "16_", ",_", "chr_", "(_", "0x0_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "str_", "(_", "\"", "2000", "\"_", "*_", "16_", ")_", "._", "decode_", "(_", "'", "hex", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "soft", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "hard", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "aea", "d_", "=_", "self_", "._", "hs", "m_", "._", "generat", "e\\u", "aea", "d\\u", "simple_", "(_", "self_", "._", "nonce_", ",_", "key", "\\u", "handle_", ",_", "plaintext_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "aea", "d_", "._", "data_", ",_", "ct_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "decrypt", " ", "the", " ", "AEA", "D", " ", "again", "_", "\\u\\u\\uNL\\u\\u\\u_", "pt_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "plaintext_", ",_", "pt_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "soft", "\\u", "generat", "e\\u", "long", "\\u", "aea", "d_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "soft", "\\u", "hs", "m", " ", "generat", "ion", " ", "of", " ", "long", " ", "AEA", "D", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "0x2000", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "'", "A", "'_", "*_", "64_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "str_", "(_", "\"", "2000", "\"_", "*_", "16_", ")_", "._", "decode_", "(_", "'", "hex", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "soft", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "hard", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "aea", "d_", "=_", "self_", "._", "hs", "m_", "._", "generat", "e\\u", "aea", "d\\u", "simple_", "(_", "self_", "._", "nonce_", ",_", "key", "\\u", "handle_", ",_", "plaintext_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "aea", "d_", "._", "data_", ",_", "ct_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "decrypt", " ", "the", " ", "AEA", "D", " ", "again", "_", "\\u\\u\\uNL\\u\\u\\u_", "pt_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "plaintext_", ",_", "pt_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Test", "Sof", "t", "HS", "M_", "(_", "test\\u", "common_", "._", "YH", "SM", "\\u", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "soft", "\\u", "generat", "e\\u", "yu", "bike", "y", "\\u", "secret", "s", "\\u", "aea", "d_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "Test", " ", "soft", "\\u", "hs", "m", " ", "generat", "ion", " ", "of", " ", "Yu", "bi", "Key", " ", "secret", "s", " ", "AEA", "D", ".", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key", "\\u", "handle_", "=_", "0x2000", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "plaintext_", "=_", "'", "A", "'_", "*_", "22_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "key_", "=_", "str_", "(_", "\"", "2000", "\"_", "*_", "16_", ")_", "._", "decode_", "(_", "'", "hex", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "soft", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "ct_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "plaintext_", ",_", "decrypt_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "generat", "e", " ", "hard", " ", "AEA", "D_", "\\u\\u\\uNL\\u\\u\\u_", "aea", "d_", "=_", "self_", "._", "hs", "m_", "._", "generat", "e\\u", "aea", "d\\u", "simple_", "(_", "self_", "._", "nonce_", ",_", "key", "\\u", "handle_", ",_", "plaintext_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "aea", "d_", "._", "data_", ",_", "ct_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "decrypt", " ", "the", " ", "AEA", "D", " ", "again", "_", "\\u\\u\\uNL\\u\\u\\u_", "pt_", "=_", "pyh", "sm_", "._", "soft", "\\u", "hs", "m_", "._", "aes", "CC", "M_", "(_", "key_", ",_", "key", "\\u", "handle_", ",_", "self_", "._", "nonce_", ",_", "ct_", ",_", "decrypt_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert", "Equals_", "(_", "plaintext_", ",_", "pt_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unnecessary 'else' clause in loop
edelight/kitchen/kitchen/backends/plugins/monitoring-virt.py
[ { "content": "@is_view('virt')\ndef links(request, hosts):\n try:\n fqdn = request.GET['fqdn']\n except KeyError:\n return None\n current_node = None\n for host in hosts:\n if fqdn == host['fqdn']:\n current_node = host\n break\n for node in host.get('virtualization', {}).get('guests', []):\n if fqdn == node['fqdn']:\n current_node = node\n break\n if current_node:\n break\n if current_node:\n try:\n links = current_node['kitchen']['data']['links']\n except KeyError:\n return None\n for link in links:\n if link.get('title') == 'monitoring':\n return redirect(link['url'])\n else:\n return None", "metadata": "root.links", "header": "['module', '___EOS___']", "index": 32 } ]
[ { "span": "for link in links:", "start_line": 54, "start_column": 8, "end_line": 54, "end_column": 26 } ]
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "'", "else", "'_", "clause_", "in_", "loop_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "is", "\\u", "view_", "(_", "'", "virt", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "links_", "(_", "request_", ",_", "hosts_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "fqdn_", "=_", "request_", "._", "GET_", "[_", "'", "fq", "dn", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Key", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "current", "\\u", "node_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "host_", "in_", "hosts_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "fqdn_", "==_", "host_", "[_", "'", "fq", "dn", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "current", "\\u", "node_", "=_", "host_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "node_", "in_", "host_", "._", "get_", "(_", "'", "virtual", "izatio", "n", "'_", ",_", "{_", "}_", ")_", "._", "get_", "(_", "'", "guest", "s", "'_", ",_", "[_", "]_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "fqdn_", "==_", "node_", "[_", "'", "fq", "dn", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "current", "\\u", "node_", "=_", "node_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "current", "\\u", "node_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "current", "\\u", "node_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "links_", "=_", "current", "\\u", "node_", "[_", "'", "kit", "chen", "'_", "]_", "[_", "'", "data", "'_", "]_", "[_", "'", "link", "s", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Key", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "link_", "in_", "links_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "link_", "._", "get_", "(_", "'", "title", "'_", ")_", "==_", "'", "monitorin", "g", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "redirect_", "(_", "link_", "[_", "'", "url", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "None_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
edgewall/trac/trac/versioncontrol/tests/__init__.py
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2005-2013 Edgewall Software\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution. The terms\n# are also available at http://trac.edgewall.org/wiki/TracLicense.\n#\n# This software consists of voluntary contributions made by many\n# individuals. For the exact contribution history, see the revision\n# history and logs, available at http://trac.edgewall.org/log/.\n\nimport unittest\n\nfrom trac.versioncontrol.tests import admin, cache, diff, svn_authz, api\nfrom trac.versioncontrol.tests.functional import functionalSuite\n\n\nif __name__ == '__main__':\n unittest.main(defaultTest='suite')\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def suite():\n\n suite = unittest.TestSuite()\n suite.addTest(admin.suite())\n suite.addTest(cache.suite())\n suite.addTest(diff.suite())\n suite.addTest(svn_authz.suite())\n suite.addTest(api.suite())\n return suite", "metadata": "root.suite", "header": "['module', '___EOS___']", "index": 18 } ]
[ { "span": "from trac.versioncontrol.tests.functional import functionalSuite", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 64 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "C", ")", " ", "2005", "-", "2013", " ", "Ed", "ge", "wall", " ", "Sof", "twa", "re_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "All", " ", "rights", " ", "reserve", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "software", " ", "is", " ", "license", "d", " ", "as", " ", "descri", "bed", " ", "in", " ", "the", " ", "file", " ", "COPY", "ING", ",", " ", "which_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "you", " ", "shou", "ld", " ", "have", " ", "receive", "d", " ", "as", " ", "part", " ", "of", " ", "this", " ", "distribu", "tion", ".", " ", "The", " ", "terms_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "are", " ", "als", "o", " ", "avail", "able", " ", "at", " ", "http", "://", "trac", ".", "edge", "wall", ".", "org", "/", "wiki", "/", "Trac", "License", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "software", " ", "consi", "sts", " ", "of", " ", "volu", "nta", "ry", " ", "contributions", " ", "made", " ", "by", " ", "many_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "individual", "s", ".", " ", "For", " ", "the", " ", "exact", " ", "contribution", " ", "histo", "ry", ",", " ", "see", " ", "the", " ", "revision_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "histo", "ry", " ", "and", " ", "logs", ",", " ", "avail", "able", " ", "at", " ", "http", "://", "trac", ".", "edge", "wall", ".", "org", "/", "log", "/.", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "trac", "_", "._", "version", "control_", "._", "tests_", "import_", "admin_", ",_", "cache_", ",_", "diff_", ",_", "svn", "\\u", "authz_", ",_", "api_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "trac", "_", "._", "version", "control_", "._", "tests_", "._", "functional_", "import_", "functional", "Suite_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "unittest_", "._", "main_", "(_", "default", "Test_", "=_", "'", "suit", "e", "'_", ")_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "suite_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "suite_", "=_", "unittest_", "._", "Test", "Suite_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "suite_", "._", "add", "Test_", "(_", "admin_", "._", "suite_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "suite_", "._", "add", "Test_", "(_", "cache_", "._", "suite_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "suite_", "._", "add", "Test_", "(_", "diff_", "._", "suite_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "suite_", "._", "add", "Test_", "(_", "svn", "\\u", "authz_", "._", "suite_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "suite_", "._", "add", "Test_", "(_", "api_", "._", "suite_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "suite_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
ejeschke/ginga/ginga/misc/Task.py
[ { "content": "#\n# Task.py -- Basic command pattern and thread pool implementation.\n#\n# This is open-source software licensed under a BSD license.\n# Please see the file LICENSE.txt for details.\n#\nfrom __future__ import print_function\n\nimport sys, time, os\nimport ginga.util.six as six\nif six.PY2:\n import thread\n import Queue\nelse:\n import _thread as thread\n import queue as Queue\n # NOTE: See http://bugs.python.org/issue7946\n # we cannot effectively use threading for loading files/network/etc.\n # without setting the switchinterval down on python 3 due to the new\n # GIL implementation\n _swival = 0.000001\n sys.setswitchinterval(_swival)\n\nimport threading\nimport traceback\n\nfrom ginga.util.six.moves import map, zip\n\n\n\n\n\n\n# ------------ BASIC TASKS ------------\n\n\n\n# For testing...\n\n\n\n\n\n\n\n\n\n# ------------ COMPOUND TASKS ------------\n\n\n\n\n\n\n\n\n# ------------ PRIORITY QUEUES ------------\n\n\n\n# ------------ WORKER THREADS ------------\n\n\n\n# ------------ THREAD POOL ------------\n\n\n\n# ------------ SUPPORT FUNCTIONS ------------\n\n_lock_seqnum = threading.Lock()\n_count_seqnum = 0\n\n\n\n#END\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class TaskError(Exception):\n \"\"\"Exception generated for task errors\"\"\"\n pass", "metadata": "root.TaskError", "header": "['module', '___EOS___']", "index": 29 }, { "content": "class TaskTimeout(TaskError):\n \"\"\"Exception generated when timing out waiting on a task\"\"\"\n pass", "metadata": "root.TaskTimeout", "header": "['module', '___EOS___']", "index": 33 }, { "content": "class UserTaskException(Exception):\n pass", "metadata": "root.UserTaskException", "header": "['module', '___EOS___']", "index": 37 }, { "content": "class Task(object):\n \"\"\"This class implements a basic Task (command) abstraction. The\n methods define the interface for starting, cancelling, waiting on a\n task, etc.\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.Task", "header": "['module', '___EOS___']", "index": 43 }, { "content": " def __init__(self):\n \"\"\"\n The constructor sets bare essentials for a Task object. See the\n initialize() and start() methods.\n \"\"\"\n self.ev_done = threading.Event()\n self.callbacks = Queue.Queue()\n self.tag = None\n self.logger = None\n self.threadPool = None\n # Lock for task state critical sections\n self.tlock = threading.RLock()\n # Parent task can set this (or add to it) explicitly to determine\n # which values will be copied when it calls initialize() on a child\n # task.\n self.shares = ['logger', 'threadPool', 'shares']\n\n super(Task, self).__init__()", "metadata": "root.Task.__init__", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 49 }, { "content": " def initialize(self, taskParent, override=None):\n \"\"\"This method initializes a task for (re)use. taskParent is the\n object instance of the parent task, or a 'task environment' (something\n that runs tasks).\n If subclass overrides this method, it should call the superclass\n method at some point.\n\n - Copy shared data from taskParent, overriding items from _override_\n if they are present there ('contagion' of task values).\n - Generate a unique tag, to be used with the Gen2 Monitor.\n - Clear done event, initialize times and result.\n \"\"\"\n # For now, punt if we have no apparent parent\n if taskParent and hasattr(taskParent, 'shares'):\n # Copy some variables from our parent task, unless they are being\n # overridden explicitly. Using this general \"contagion\" mechanism,\n # a task can cause it's children to have values available to them\n # without passing them explicitly.\n for var in taskParent.shares:\n if override and var in override:\n self.__dict__[var] = override[var]\n else:\n #print \"COPYING VAR FROM PARENT: %s(%s)\" % (var, str(taskParent.__dict__[var]))\n self.__dict__[var] = taskParent.__dict__[var]\n\n else:\n #raise TaskError(\"Cannot initialize task without a taskParent!\")\n pass\n\n # Generate our own unique tag. 'tagger' should have been transmitted\n # from the parent task\n if not self.tag:\n try:\n self.tag = str(taskParent) + '.' + self.tagger.get_tag(self)\n except:\n # Failed--fall back to internal tagger\n self.tag = get_tag(taskParent)\n\n # Some per-task specific initialization\n self.ev_done.clear()\n self.starttime = time.time()\n self.endtime = 0\n self.totaltime = 0\n self.result = None\n\n return self.tag", "metadata": "root.Task.initialize", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 69 }, { "content": " def start(self):\n \"\"\"This method starts a task executing and returns immediately.\n Subclass should override this method, if it has an asynchronous\n way to start the task and return immediately.\n \"\"\"\n if self.threadPool:\n self.threadPool.addTask(self)\n\n # Lets other threads have a chance to run\n time.sleep(0)\n else:\n raise TaskError(\"start(): nothing to start for task %s\" % self)", "metadata": "root.Task.start", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 116 }, { "content": " def init_and_start(self, taskParent, override={}):\n \"\"\"Convenience method to initialize and start a task.\n \"\"\"\n tag = self.initialize(taskParent, override=override)\n self.start()\n\n return tag", "metadata": "root.Task.init_and_start", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 130 }, { "content": " def check_state(self):\n \"\"\"Abstract method that should check for pause, cancellation, or\n any other sort of preemption event.\n \"\"\"\n pass", "metadata": "root.Task.check_state", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 139 }, { "content": " def extend_shares(self, varlist):\n shares = set(self.shares)\n for var in varlist:\n if hasattr(self, var):\n shares.add(var)\n\n self.shares = shares", "metadata": "root.Task.extend_shares", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 146 }, { "content": " def stop(self):\n \"\"\"This method cancels an executing task (if possible).\n Subclass should override this method.\n Return True if task could be cancelled, False if not?\n \"\"\"\n raise TaskError(\"Task %s: subclass should override stop() method!\" % (\n self))", "metadata": "root.Task.stop", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 155 }, { "content": " def pause(self):\n \"\"\"This method pauses an executing task (if possible).\n Subclass should override this method.\n Return True if task could be paused, False if not?\n \"\"\"\n raise TaskError(\"Task %s: subclass should override pause() method!\" % (\n self))", "metadata": "root.Task.pause", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 163 }, { "content": " def resume(self):\n \"\"\"This method resumes an executing task (if possible).\n Subclass should override this method, should not call super.resume().\n Return True if task could be resumed, False if not?\n \"\"\"\n raise TaskError(\"Task %s: subclass should override resume() method!\" % (\n self))", "metadata": "root.Task.resume", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 171 }, { "content": " def wait(self, timeout=None):\n \"\"\"This method waits for an executing task to finish.\n Subclass can override this method if necessary.\n \"\"\"\n self.ev_done.wait(timeout=timeout)\n\n if not self.ev_done.isSet():\n raise TaskTimeout(\"Task %s timed out.\" % self)\n\n # --> self.result is set\n # If it is an exception, then raise it in this waiter\n if isinstance(self.result, Exception):\n raise self.result\n\n # Release waiters and perform callbacks\n # done() has already been called, because of self.ev_done check\n # \"asynchronous\" tasks should could call done() here\n #self.done(self.result)\n\n return self.result", "metadata": "root.Task.wait", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 179 }, { "content": " def step(self):\n \"\"\"If a task has a way of stepping through an operation. It can\n implement this method. Subclass should not call super.step().\n \"\"\"\n raise TaskError(\"Task %s: subclass should override step() method!\" % \\\n self)", "metadata": "root.Task.step", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 201 }, { "content": " def execute(self):\n \"\"\"This method does the work of a task (if executed by the\n thread pool) and returns when it is finished. *** Subclass should\n override this method! *** It should take no arguments, and can\n return anything.\n \"\"\"\n raise TaskError(\"Task %s: subclass should override execute() method!\" % \\\n self)", "metadata": "root.Task.execute", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 209 }, { "content": " def done(self, result, noraise=False):\n \"\"\"This method is called when a task has finished executing.\n Subclass can override this method if desired, but should call\n superclass method at the end.\n \"\"\"\n # [??] Should this be in a critical section?\n\n # Has done() already been called on this task?\n if self.ev_done.isSet():\n # ??\n if isinstance(self.result, Exception) and (not noraise):\n raise self.result\n return self.result\n\n # calculate running time and other finalization\n self.endtime = time.time()\n try:\n self.totaltime = self.endtime - self.starttime\n except AttributeError:\n # task was not initialized properly\n self.totaltime = 0.0\n self.result = result\n\n # Release thread waiters\n self.ev_done.set()\n\n # Perform callbacks for event-style waiters\n self.do_callbacks()\n\n # If the result is an exception, then our final act is to raise\n # it in the caller, unless the caller explicitly supressed that\n if isinstance(result, Exception) and (not noraise):\n raise result\n\n return result", "metadata": "root.Task.done", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 219 }, { "content": " def register_callback(self, fn, args=None):\n \"\"\"This method is called to register a callback function to be\n called when a task terminates.\n Subclass should probably not override this method.\n \"\"\"\n if args is None:\n args = []\n\n if callable(fn):\n self.callbacks.put((fn, args))\n else:\n raise TaskError(\"Function argument is not a callable: %s\" % \\\n str(fn))", "metadata": "root.Task.register_callback", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 256 }, { "content": " def do_callbacks(self):\n \"\"\"Makes callbacks on all registered functions waiting on this task.\n \"\"\"\n\n while not self.callbacks.empty():\n (fn, rest) = self.callbacks.get()\n\n args = [self.result]\n args.extend(rest)\n\n fn(*args)", "metadata": "root.Task.do_callbacks", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 271 }, { "content": " def get_tag(self):\n \"\"\"This is only valid AFTER initialize() has been called on the task.\n \"\"\"\n return self.tag", "metadata": "root.Task.get_tag", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 284 }, { "content": " def __str__(self):\n \"\"\"Returns a string representation of a task (e.g. for debugging).\n Subclass can override this method if desired.\n \"\"\"\n return str(self.tag)", "metadata": "root.Task.__str__", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 289 }, { "content": " def __lt__(self, other):\n return False", "metadata": "root.Task.__lt__", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 295 }, { "content": " def getExecutionTime(self):\n return self.totaltime", "metadata": "root.Task.getExecutionTime", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 298 }, { "content": " def runTask(self, task, timeout=None):\n \"\"\"Run a child task to completion. Returns the result of\n the child task.\n \"\"\"\n # Initialize the task.\n task.initialize(self)\n\n # Start the task.\n task.start()\n\n # Lets other threads run\n time.sleep(0)\n\n # Wait for it to finish.\n res = task.wait(timeout=timeout)\n\n # Now we're done\n return res", "metadata": "root.Task.runTask", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 302 }, { "content": " def run(self, task, timeout=None):\n \"\"\"Run a child task to completion. Returns the result of\n the child task. Simply calls runTask().\n \"\"\"\n return self.runTask(task, timeout=timeout)", "metadata": "root.Task.run", "header": "['class', 'Task', '(', 'object', ')', ':', '___EOS___']", "index": 322 }, { "content": "class printTask(Task):\n \"\"\"Simple task that prints msg.\"\"\"\n", "metadata": "root.printTask", "header": "['module', '___EOS___']", "index": 331 }, { "content": " def __init__(self, msg):\n self.msg = msg\n super(printTask, self).__init__()", "metadata": "root.printTask.__init__", "header": "['class', 'printTask', '(', 'Task', ')', ':', '___EOS___']", "index": 333 }, { "content": " def execute(self):\n print(self.msg)", "metadata": "root.printTask.execute", "header": "['class', 'printTask', '(', 'Task', ')', ':', '___EOS___']", "index": 337 }, { "content": "class sleepTask(Task):\n \"\"\"Simple task that sleeps for delay seconds.\"\"\"\n", "metadata": "root.sleepTask", "header": "['module', '___EOS___']", "index": 340 }, { "content": " def __init__(self, delay):\n self.delay = delay\n super(sleepTask, self).__init__()", "metadata": "root.sleepTask.__init__", "header": "['class', 'sleepTask', '(', 'Task', ')', ':', '___EOS___']", "index": 342 }, { "content": " def execute(self):\n self.ev_done.wait(timeout=self.delay)", "metadata": "root.sleepTask.execute", "header": "['class', 'sleepTask', '(', 'Task', ')', ':', '___EOS___']", "index": 346 }, { "content": "class FuncTask(Task):\n \"\"\"Simple task that calls func and returns func's return value.\"\"\"\n", "metadata": "root.FuncTask", "header": "['module', '___EOS___']", "index": 349 }, { "content": " def __init__(self, func, args, kwdargs, logger=None):\n self.func = func\n self.args = args\n self.kwdargs = kwdargs\n self.logger = logger\n super(FuncTask, self).__init__()", "metadata": "root.FuncTask.__init__", "header": "['class', 'FuncTask', '(', 'Task', ')', ':', '___EOS___']", "index": 351 }, { "content": " def execute(self):\n if self.logger:\n # Cap logging size around 500 characters\n s_args = str(self.args)\n if len(s_args) > 500:\n s_args = s_args[:500]\n s_kwdargs = str(self.kwdargs)\n if len(s_kwdargs) > 500:\n s_kwdargs = s_kwdargs[:500]\n self.logger.debug(\"Running %s(%s, %s)\" % (\n self.func.__name__, s_args, s_kwdargs))\n s_args = None\n s_kwdargs = None\n\n try:\n res = self.func(*self.args, **self.kwdargs)\n self.done(res)\n\n if self.logger:\n self.logger.debug(\"Function returned %s\" % (\n str(res)))\n\n except Exception as e:\n if self.logger:\n self.logger.error(\"Task '%s' terminated with exception: %s\" % \\\n (str(self), str(e)))\n try:\n (type, value, tb) = sys.exc_info()\n self.logger.error(\"Traceback:\\n%s\" % \\\n \"\".join(traceback.format_tb(tb)))\n\n tb = None\n except Exception:\n self.logger.error(\"Traceback information unavailable.\")\n self.done(e)", "metadata": "root.FuncTask.execute", "header": "['class', 'FuncTask', '(', 'Task', ')', ':', '___EOS___']", "index": 358 }, { "content": "class FuncTask2(FuncTask):\n \"\"\"Simple task that calls func and returns func's return value.\n This version lets you specify the positional and keyword arguments\n more naturally 'in place' in the constructor.\n \"\"\"\n", "metadata": "root.FuncTask2", "header": "['module', '___EOS___']", "index": 395 }, { "content": " def __init__(self, func, *args, **kwdargs):\n super(FuncTask2, self).__init__(func, args, kwdargs)", "metadata": "root.FuncTask2.__init__", "header": "['class', 'FuncTask2', '(', 'FuncTask', ')', ':', '___EOS___']", "index": 400 }, { "content": " def set_logger(self, logger):\n self.logger = logger", "metadata": "root.FuncTask2.set_logger", "header": "['class', 'FuncTask2', '(', 'FuncTask', ')', ':', '___EOS___']", "index": 403 }, { "content": "def make_tasker(func):\n \"\"\"make_tasker takes a callable (function, method, etc.) and returns\n a new factory function for generating tasks. Each factory function is\n designed to consume its arguments and return a task that, when executed,\n will call the function upon the arguments.\n\n TODO: deprecate this and just use FuncTask, which is easier to\n understand--must change a number of programs first.\n \"\"\"\n def anonFunc(*args, **kwdargs):\n class anonTask(Task):\n def execute(self):\n self.logger.debug(\"Executing fn %s\" % func)\n try:\n val = func(*args, **kwdargs)\n\n self.logger.debug(\"Done executing fn %s\" % func)\n return val\n\n except Exception as e:\n # Log error message and re-raise exception.\n self.logger.error(\"fn %s raised exception: %s\" % (\n func, str(e)))\n raise e\n\n return anonTask()\n return anonFunc", "metadata": "root.make_tasker", "header": "['module', '___EOS___']", "index": 407 }, { "content": "class SequentialTaskset(Task):\n \"\"\"Compound task that runs a series of tasks sequentially.\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.SequentialTaskset", "header": "['module', '___EOS___']", "index": 438 }, { "content": " def __init__(self, taskseq):\n\n super(SequentialTaskset, self).__init__()\n\n self.tasklist = list(taskseq)", "metadata": "root.SequentialTaskset.__init__", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 442 }, { "content": " def initialize(self, taskParent, **kwdargs):\n self.index = 0\n\n super(SequentialTaskset, self).initialize(taskParent, **kwdargs)", "metadata": "root.SequentialTaskset.initialize", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 449 }, { "content": " def step(self):\n \"\"\"Run the next child task and wait for completion (no timeout).\"\"\"\n if self.index >= len(self.tasklist):\n raise TaskError(\"step(): sequential compound task %s finished\" % self)\n\n self.check_state()\n\n # Select next task from the set and advance the index\n self.task = self.tasklist[self.index]\n self.index += 1\n\n return self.runTask(self.task)", "metadata": "root.SequentialTaskset.step", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 455 }, { "content": " def execute(self):\n \"\"\"Run all child tasks, in order, waiting for completion of each.\n Return the result of the final child task's execution.\n \"\"\"\n while self.index < len(self.tasklist):\n res = self.step()\n self.logger.debug('SeqSet task %i has completed with result %s' % \\\n (self.index,res))\n\n # Returns result of last task to quit\n return res", "metadata": "root.SequentialTaskset.execute", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 469 }, { "content": " def stop(self):\n \"\"\"Interrupt/cancel execution, but will allow current child task\n to complete.\"\"\"\n #self.ev_intr.set()\n\n try:\n self.task.stop()\n\n except TaskError as e:\n self.logger.error(\"Error cancelling child task: %s\" % (str(e)))", "metadata": "root.SequentialTaskset.stop", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 482 }, { "content": " def addTask(self, task):\n \"\"\"Append a task to the task sequence. If the SequentialTaskset has\n already completed execution, this will do nothing unless it is\n restarted (initialize(), start()).\n \"\"\"\n self.tasklist.append(task)", "metadata": "root.SequentialTaskset.addTask", "header": "['class', 'SequentialTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 494 }, { "content": "class oldConcurrentAndTaskset(Task):\n \"\"\"Compound task that runs a set of tasks concurrently, and does not\n return until they all terminate.\n \"\"\"\n\n\n\n\n\n\n\n\n", "metadata": "root.oldConcurrentAndTaskset", "header": "['module', '___EOS___']", "index": 502 }, { "content": " def __init__(self, taskseq):\n\n super(oldConcurrentAndTaskset, self).__init__()\n\n self.taskseq = taskseq\n self.ev_intr = threading.Event()\n # Used to synchronize compound task termination\n self.regcond = threading.Condition()", "metadata": "root.oldConcurrentAndTaskset.__init__", "header": "['class', 'oldConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 507 }, { "content": " def execute(self):\n \"\"\"Run all child tasks concurrently in separate threads.\n Return 0 after all child tasks have completed execution.\n \"\"\"\n self.count = 0\n self.taskset = []\n self.results = {}\n self.totaltime = time.time()\n\n # Register termination callbacks for all my child tasks.\n for task in self.taskseq:\n self.taskset.append(task)\n task.register_callback(self.child_done, args=[self.count, task])\n self.count += 1\n\n self.numtasks = self.count\n\n # Now start each child task.\n with self.regcond:\n for task in self.taskset:\n task.initialize(self)\n\n task.start()\n\n # Account for time needed to start subtasks\n self.totaltime = time.time() - self.totaltime\n\n # Now give up the critical section and wait for last child\n # task to terminate.\n while self.count > 0:\n self.regcond.wait()\n\n # Scan results for errors (exceptions) and raise the first one we find\n for key in self.results.keys():\n value = self.results[key]\n if isinstance(value, Exception):\n (count, task) = key\n self.logger.error(\"Child task %s terminated with exception: %s\" % (\n task.tag, str(value)))\n raise value\n\n return 0", "metadata": "root.oldConcurrentAndTaskset.execute", "header": "['class', 'oldConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 517 }, { "content": " def child_done(self, result, count, task):\n \"\"\"Acquire the condition variable for the compound task object.\n Decrement the thread count. If we are the last thread to\n finish, release compound task thread, which is blocked in execute().\n \"\"\"\n with self.regcond:\n self.logger.debug('Concurrent task %d/%d has completed' % (\n self.count, self.numtasks))\n self.count -= 1\n self.taskset.remove(task)\n self.totaltime += task.getExecutionTime()\n self.results[(count, task)] = result\n if self.count <= 0:\n self.regcond.notifyAll()", "metadata": "root.oldConcurrentAndTaskset.child_done", "header": "['class', 'oldConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 561 }, { "content": " def stop(self):\n \"\"\"Call stop() on all child tasks, and ignore TaskError exceptions.\n Behavior depends on what the child tasks' stop() method does.\"\"\"\n for task in self.taskset:\n try:\n task.stop()\n\n except TaskError as e:\n # Task does not have a way to stop it.\n # TODO: notify who?\n pass", "metadata": "root.oldConcurrentAndTaskset.stop", "header": "['class', 'oldConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 577 }, { "content": " def addTask(self, task):\n \"\"\"Add a task to the task set.\n \"\"\"\n with self.regcond:\n self.taskset.append(task)\n task.register_callback(self.child_done, args=[self.numtasks, task])\n self.numtasks += 1\n self.count += 1\n\n task.initialize(self)\n task.start()", "metadata": "root.oldConcurrentAndTaskset.addTask", "header": "['class', 'oldConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 590 }, { "content": "class newConcurrentAndTaskset(Task):\n \"\"\"Compound task that runs a set of tasks concurrently, and does not\n return until they all terminate.\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.newConcurrentAndTaskset", "header": "['module', '___EOS___']", "index": 602 }, { "content": " def __init__(self, taskseq):\n\n super(newConcurrentAndTaskset, self).__init__()\n\n self.taskseq = taskseq\n # tuning value for polling inefficiency\n self.idletime = 0.001\n\n # internal mutex\n self._lock_c = threading.RLock()", "metadata": "root.newConcurrentAndTaskset.__init__", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 607 }, { "content": " def execute(self):\n \"\"\"Run all child tasks concurrently in separate threads.\n Return last result after all child tasks have completed execution.\n \"\"\"\n\n with self._lock_c:\n self.count = 0\n self.numtasks = 0\n self.taskset = []\n self.results = {}\n self.totaltime = time.time()\n # Start all tasks\n for task in self.taskseq:\n self.taskset.append(task)\n self.numtasks += 1\n task.init_and_start(self)\n\n num_tasks = self.getNumTasks()\n # Wait on each task to clean up results\n while num_tasks > 0:\n\n self.check_state()\n\n for i in range(num_tasks):\n try:\n try:\n task = self.getTask(i)\n except IndexError:\n # A task got deleted from the set. Jump back out\n # to outer loop and repoll the number of tasks\n break\n\n #self.logger.debug(\"waiting on %s\" % task)\n res = task.wait(timeout=self.idletime)\n\n #self.logger.debug(\"finished: %s\" % task)\n self.child_done(res, task)\n\n except TaskTimeout:\n continue\n\n except Exception as e:\n #self.logger.warning(\"Subtask propagated exception: %s\" % str(e))\n self.child_done(e, task)\n continue\n\n # wait a bit and try again\n #self.ev_quit.wait(self.idletime)\n\n # re-get number of tasks, in case some were added or deleted\n num_tasks = self.getNumTasks()\n\n # Scan results for errors (exceptions) and raise the first one we find\n for key in self.results.keys():\n value = self.results[key]\n if isinstance(value, Exception):\n (count, task) = key\n self.logger.error(\"Child task %s terminated with exception: %s\" % (\n task.tag, str(value)))\n raise value\n\n # Return value of last child to complete\n return value", "metadata": "root.newConcurrentAndTaskset.execute", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 619 }, { "content": " def child_done(self, result, task):\n with self._lock_c:\n self.count += 1\n self.logger.debug('Concurrent task %d/%d has completed' % (\n self.count, self.numtasks))\n self.taskset.remove(task)\n self.totaltime += task.getExecutionTime()\n self.results[(self.count, task)] = result", "metadata": "root.newConcurrentAndTaskset.child_done", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 684 }, { "content": " def stop(self):\n \"\"\"Call stop() on all child tasks, and ignore TaskError exceptions.\n Behavior depends on what the child tasks' stop() method does.\"\"\"\n with self._lock_c:\n for task in self.taskset:\n try:\n task.stop()\n\n except TaskError as e:\n # Task does not have a way to stop it.\n # TODO: notify who?\n pass\n\n # stop ourself\n #self.ev_intr.set()", "metadata": "root.newConcurrentAndTaskset.stop", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 694 }, { "content": " def addTask(self, task):\n \"\"\"Add a task to the task set.\n \"\"\"\n # Try to start task first. If it fails then we don't need to\n # undo adding it to taskset\n task.initialize(self)\n task.start()\n\n with self._lock_c:\n self.numtasks += 1\n self.taskset.append(task)", "metadata": "root.newConcurrentAndTaskset.addTask", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 711 }, { "content": " def getTask(self, i):\n with self._lock_c:\n return self.taskset[i]", "metadata": "root.newConcurrentAndTaskset.getTask", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 723 }, { "content": " def getNumTasks(self):\n \"\"\"Get the set of active tasks.\n \"\"\"\n with self._lock_c:\n return len(self.taskset)", "metadata": "root.newConcurrentAndTaskset.getNumTasks", "header": "['class', 'newConcurrentAndTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 727 }, { "content": "class ConcurrentAndTaskset(newConcurrentAndTaskset):\n pass", "metadata": "root.ConcurrentAndTaskset", "header": "['module', '___EOS___']", "index": 734 }, { "content": "class QueueTaskset(Task):\n \"\"\"Compound task that runs a set of tasks that it reads from a queue\n concurrently. If _waitflag_ is True, then it will run each task to\n completion before starting the next task.\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.QueueTaskset", "header": "['module', '___EOS___']", "index": 737 }, { "content": " def __init__(self, queue, waitflag=True, timeout=0.1, ev_quit=None):\n\n super(QueueTaskset, self).__init__()\n\n self.queue = queue\n self.waitflag = waitflag\n self.lock = threading.RLock()\n self.timeout = timeout\n self.task = None\n self.ev_cancel = threading.Event()\n self.ev_pause = threading.Event()\n if ev_quit == None:\n ev_quit = threading.Event()\n self.ev_quit = ev_quit", "metadata": "root.QueueTaskset.__init__", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 743 }, { "content": " def flush(self):\n # Flush queue of pending tasks\n self.logger.debug(\"Flushing queue.\")\n while True:\n try:\n self.queue.get(block=False)\n except Queue.Empty:\n break", "metadata": "root.QueueTaskset.flush", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 759 }, { "content": " def stop(self):\n self.flush()\n #self.ev_intr.set()\n\n try:\n if self.task:\n self.task.stop()\n\n except TaskError as e:\n #self.logger.error(\"Error cancelling child task: %s\" % (str(e)))\n pass\n\n # put termination sentinel\n self.queue.put(None)", "metadata": "root.QueueTaskset.stop", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 769 }, { "content": " def stop_child(self):\n self.flush()\n\n try:\n if self.task:\n self.task.stop()\n\n except TaskError as e:\n #self.logger.error(\"Error cancelling child task: %s\" % (str(e)))\n pass", "metadata": "root.QueueTaskset.stop_child", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 785 }, { "content": " def execute(self):\n self.count = 0\n self.totaltime = 0\n self.logger.debug(\"Queue Taskset starting\")\n while not self.ev_quit.isSet():\n try:\n self.check_state()\n\n task = self.queue.get(block=True, timeout=self.timeout)\n if task == None:\n # termination sentinel\n break\n\n self.task = task\n\n task.register_callback(self.child_done, args=[task])\n\n with self.lock:\n self.count += 1\n\n self.ev_cancel.clear()\n try:\n task.initialize(self)\n\n self.logger.debug(\"Starting task '%s'\" % str(task))\n task.start()\n\n if self.waitflag:\n res = task.wait()\n\n self.logger.debug(\"Task %s terminated with result %s\" % (\n (str(task), str(res))))\n except Exception as e:\n self.logger.error(\"Task '%s' terminated with exception: %s\" % \\\n (str(task), str(e)))\n try:\n (type, value, tb) = sys.exc_info()\n self.logger.debug(\"Traceback:\\n%s\" % \\\n \"\".join(traceback.format_tb(tb)))\n\n # NOTE: to avoid creating a cycle that might cause\n # problems for GC--see Python library doc for sys\n # module\n tb = None\n\n except Exception as e:\n self.logger.debug(\"Traceback information unavailable.\")\n\n # If task raised exception then it didn't call done,\n task.done(e, noraise=True)\n\n except Queue.Empty:\n # No task available. Continue trying to get one.\n continue\n\n\n # TODO: should we wait for self.count > 0?\n self.logger.debug(\"Queue Taskset terminating\")\n\n return self.result", "metadata": "root.QueueTaskset.execute", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 797 }, { "content": " def child_done(self, result, task):\n with self.lock:\n self.count -= 1\n self.totaltime += task.getExecutionTime()\n self.result = result", "metadata": "root.QueueTaskset.child_done", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 859 }, { "content": " def cancel(self):\n self.flush()\n\n super(QueueTaskset, self).cancel()", "metadata": "root.QueueTaskset.cancel", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 866 }, { "content": " def addTask(self, task):\n self.queue.put(task)", "metadata": "root.QueueTaskset.addTask", "header": "['class', 'QueueTaskset', '(', 'Task', ')', ':', '___EOS___']", "index": 872 }, { "content": "class PriorityQueue(Queue.PriorityQueue):\n pass", "metadata": "root.PriorityQueue", "header": "['module', '___EOS___']", "index": 877 }, { "content": "class _WorkerReset(Exception):\n \"\"\"Local exception used to reset a worker thread.\"\"\"\n pass", "metadata": "root._WorkerReset", "header": "['module', '___EOS___']", "index": 883 }, { "content": "class WorkerThread(object):\n \"\"\"Container for a thread in which to call the execute() method of a task.\n A WorkerThread object waits on the task queue, executes a task when it\n appears, and repeats. A call to start() is necessary to start servicing\n the queue, and a call to stop() will terminate the service.\n \"\"\"\n\n\n\n\n\n\n\n\n\n # Basic task execution loop. Dequeue a task and run it, then look\n # for another one\n\n\n", "metadata": "root.WorkerThread", "header": "['module', '___EOS___']", "index": 887 }, { "content": " def __init__(self, queue, logger=None, ev_quit=None,\n timeout=0.2, tpool=None):\n\n self.queue = queue\n self.logger = logger\n self.timeout = timeout\n if ev_quit:\n self.ev_quit = ev_quit\n else:\n self.ev_quit = threading.Event()\n self.tpool = tpool\n self.lock = threading.RLock()\n self.status = 'stopped'\n self.time_start = 0.0", "metadata": "root.WorkerThread.__init__", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 894 }, { "content": " def setstatus(self, status):\n \"\"\"Sets our status field so that others can inquire what we are doing.\n Set of status:\n starting, idle\n \"\"\"\n with self.lock:\n self.status = status", "metadata": "root.WorkerThread.setstatus", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 910 }, { "content": " def getstatus(self):\n \"\"\"Returns our status--a string describing what we are doing.\n \"\"\"\n with self.lock:\n return (self.status, self.time_start)", "metadata": "root.WorkerThread.getstatus", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 919 }, { "content": " def execute(self, task):\n \"\"\"Execute a task.\n \"\"\"\n\n taskid = str(task)\n res = None\n try:\n # Try to run the task. If we catch an exception, then\n # it becomes the result.\n self.time_start = time.time()\n self.setstatus('executing %s' % taskid)\n\n self.logger.debug(\"now executing task '%s'\" % taskid)\n try:\n res = task.execute()\n\n except UserTaskException as e:\n res = e\n\n except Exception as e:\n self.logger.error(\"Task '%s' raised exception: %s\" % \\\n (str(task), str(e)))\n res = e\n try:\n (type, value, tb) = sys.exc_info()\n self.logger.debug(\"Traceback:\\n%s\" % \\\n \"\".join(traceback.format_tb(tb)))\n\n # NOTE: to avoid creating a cycle that might cause\n # problems for GC--see Python library doc for sys\n # module\n tb = None\n\n except Exception as e:\n self.logger.debug(\"Traceback information unavailable.\")\n\n finally:\n self.logger.debug(\"done executing task '%s'\" % str(task))\n\n self.setstatus('cleaning %s' % taskid)\n # Wake up waiters on other threads\n task.done(res, noraise=True)\n\n self.time_start = 0.0\n self.setstatus('idle')", "metadata": "root.WorkerThread.execute", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 926 }, { "content": " def taskloop(self):\n self.setstatus('starting')\n self.logger.debug('Starting worker thread loop.')\n\n # If we were handed a thread pool upon startup, then register\n # ourselves with it.\n if self.tpool:\n self.tpool.register_up()\n\n try:\n self.setstatus('idle')\n while not self.ev_quit.isSet():\n try:\n\n # Wait on our queue for a task; will timeout in\n # self.timeout secs\n (priority, task) = self.queue.get(block=True,\n timeout=self.timeout)\n if task == None:\n # termination sentinel\n self.queue.put((priority, task))\n break\n\n self.execute(task)\n\n except _WorkerReset:\n self.logger.info(\"Worker reset!\")\n\n except Queue.Empty as e:\n # Reach here when we time out waiting for a task\n pass\n\n finally:\n self.logger.debug('Stopping worker thread loop.')\n\n if self.tpool:\n self.tpool.register_dn()\n\n self.setstatus('stopped')", "metadata": "root.WorkerThread.taskloop", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 975 }, { "content": " def start(self):\n self.thread = threading.Thread(target=self.taskloop, args=[])\n self.thread.start()", "metadata": "root.WorkerThread.start", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 1016 }, { "content": " def stop(self):\n # Put termination sentinal on queue\n self.queue.put((priority, task))\n self.ev_quit.set()", "metadata": "root.WorkerThread.stop", "header": "['class', 'WorkerThread', '(', 'object', ')', ':', '___EOS___']", "index": 1020 }, { "content": "class ThreadPool(object):\n \"\"\"A simple thread pool for executing tasks asynchronously.\n\n self.status states:\n down no threads are ready for service\n up all threads are ready for service\n start threads are starting, but not all of them are up yet\n stop threads are stopping, but not all of them are down yet\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.ThreadPool", "header": "['module', '___EOS___']", "index": 1027 }, { "content": " def __init__(self, numthreads=1, logger=None, ev_quit=None,\n workerClass=WorkerThread):\n\n self.numthreads = numthreads\n self.logger = logger\n if ev_quit:\n self.ev_quit = ev_quit\n else:\n self.ev_quit = threading.Event()\n self.lock = threading.RLock()\n self.workerClass = workerClass\n\n self.queue = PriorityQueue()\n self.workers = []\n self.tids = []\n\n # Used to synchronize thread pool startup (see register() method)\n self.regcond = threading.Condition()\n self.runningcount = 0\n self.status = 'down'", "metadata": "root.ThreadPool.__init__", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1037 }, { "content": " def startall(self, wait=False, **kwdargs):\n \"\"\"Start all of the threads in the thread pool. If _wait_ is True\n then don't return until all threads are up and running. Any extra\n keyword arguments are passed to the worker thread constructor.\n \"\"\"\n self.logger.debug(\"startall called\")\n with self.regcond:\n while self.status != 'down':\n if self.status in ('start', 'up') or self.ev_quit.isSet():\n # For now, abandon additional request to start\n self.logger.error(\"ignoring duplicate request to start thread pool\")\n return\n\n self.logger.debug(\"waiting for threads: count=%d\" % \\\n self.runningcount)\n self.regcond.wait()\n\n #assert(self.status == 'down')\n if self.ev_quit.isSet():\n return\n\n self.runningcount = 0\n self.status = 'start'\n self.workers = []\n if wait:\n tpool = self\n else:\n tpool = None\n\n # Start all worker threads\n self.logger.debug(\"starting threads in thread pool\")\n for i in range(self.numthreads):\n t = self.workerClass(self.queue, logger=self.logger,\n ev_quit=self.ev_quit, tpool=tpool,\n **kwdargs)\n self.workers.append(t)\n t.start()\n\n if wait:\n # Threads are on the way up. Wait until last one starts.\n while self.status != 'up' and not self.ev_quit.isSet():\n self.logger.debug(\"waiting for threads: count=%d\" % \\\n self.runningcount)\n self.regcond.wait()\n\n self.logger.debug(\"startall done\")", "metadata": "root.ThreadPool.startall", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1059 }, { "content": " def addThreads(self, numthreads, **kwdargs):\n with self.regcond:\n # Start all worker threads\n self.logger.debug(\"adding %d threads to thread pool\" % (\n numthreads))\n for i in range(numthreads):\n t = self.workerClass(self.queue, logger=self.logger,\n ev_quit=self.ev_quit, tpool=self.tpool,\n **kwdargs)\n self.workers.append(t)\n t.start()\n\n self.numthreads += numthreads", "metadata": "root.ThreadPool.addThreads", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1107 }, { "content": " def stopall(self, wait=False):\n \"\"\"Stop all threads in the worker pool. If _wait_ is True\n then don't return until all threads are down.\n \"\"\"\n self.logger.debug(\"stopall called\")\n with self.regcond:\n while self.status != 'up':\n if self.status in ('stop', 'down') or self.ev_quit.isSet():\n # For now, silently abandon additional request to stop\n self.logger.warning(\"ignoring duplicate request to stop thread pool.\")\n return\n\n self.logger.debug(\"waiting for threads: count=%d\" % \\\n self.runningcount)\n self.regcond.wait()\n\n #assert(self.status == 'up')\n self.logger.debug(\"stopping threads in thread pool\")\n self.status = 'stop'\n # Signal to all threads to terminate.\n self.ev_quit.set()\n\n if wait:\n # Threads are on the way down. Wait until last one quits.\n while self.status != 'down':\n self.logger.debug(\"waiting for threads: count=%d\" % \\\n self.runningcount)\n self.regcond.wait()\n\n self.logger.debug(\"stopall done\")", "metadata": "root.ThreadPool.stopall", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1121 }, { "content": " def workerStatus(self):\n return list(map(lambda t: t.getstatus(), self.workers))", "metadata": "root.ThreadPool.workerStatus", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1153 }, { "content": " def addTask(self, task, priority=0):\n \"\"\"Add a task to the queue of tasks.\n\n The task will be executed in a worker thread as soon as one is available.\n Tasks are executed in first-come-first-served order.\n \"\"\"\n self.queue.put((priority, task))", "metadata": "root.ThreadPool.addTask", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1157 }, { "content": " def delTask(self, taskid):\n self.logger.error(\"delTask not yet implemented\")", "metadata": "root.ThreadPool.delTask", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1166 }, { "content": " def purgeTasks(self):\n self.logger.error(\"purgeTasks not yet implemented\")", "metadata": "root.ThreadPool.purgeTasks", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1170 }, { "content": " def register_up(self):\n \"\"\"Called by WorkerThread objects to register themselves.\n\n Acquire the condition variable for the WorkerThread objects.\n Increment the running-thread count. If we are the last thread to\n start, set status to 'up'. This allows startall() to complete\n if it was called with wait=True.\n \"\"\"\n with self.regcond:\n self.runningcount += 1\n tid = thread.get_ident()\n self.tids.append(tid)\n self.logger.debug(\"register_up: (%d) count is %d\" % \\\n (tid, self.runningcount))\n if self.runningcount == self.numthreads:\n self.status = 'up'\n self.regcond.notify()", "metadata": "root.ThreadPool.register_up", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1174 }, { "content": " def register_dn(self):\n \"\"\"Called by WorkerThread objects to register themselves.\n\n Acquire the condition variable for the WorkerThread objects.\n Decrement the running-thread count. If we are the last thread to\n start, release the ThreadPool thread, which is stuck in start()\n \"\"\"\n with self.regcond:\n self.runningcount -= 1\n tid = thread.get_ident()\n self.tids.remove(tid)\n self.logger.debug(\"register_dn: count_dn is %d\" % self.runningcount)\n self.logger.debug(\"register_dn: remaining: %s\" % str(self.tids))\n if self.runningcount == 0:\n self.status = 'down'\n self.regcond.notify()", "metadata": "root.ThreadPool.register_dn", "header": "['class', 'ThreadPool', '(', 'object', ')', ':', '___EOS___']", "index": 1193 }, { "content": "def get_tag(taskParent):\n global _count_seqnum\n with _lock_seqnum:\n generic_id = 'task%d' % (_count_seqnum)\n _count_seqnum += 1\n\n if taskParent:\n tag = str(taskParent) + '.' + generic_id\n else:\n tag = generic_id\n\n return tag", "metadata": "root.get_tag", "header": "['module', '___EOS___']", "index": 1216 } ]
[ { "span": "import sys, time, os", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 20 }, { "span": "from ginga.util.six.moves import map, zip", "start_line": 26, "start_column": 0, "end_line": 26, "end_column": 41 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Task", ".", "py", " ", "--", " ", "Basic", " ", "command", " ", "pattern", " ", "and", " ", "thread", " ", "pool", " ", "implementation", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "is", " ", "open", "-", "source", " ", "software", " ", "license", "d", " ", "under", " ", "a", " ", "BS", "D", " ", "license", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Ple", "ase", " ", "see", " ", "the", " ", "file", " ", "LICENSE", ".", "txt", " ", "for", " ", "deta", "il", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "sys_", ",_", "time_", ",_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "ging", "a_", "._", "util_", "._", "six_", "as_", "six_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "six_", "._", "PY", "2_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "thread_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "Queue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "\\u", "thread_", "as_", "thread_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "queue_", "as_", "Queue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "NOTE", ":", " ", "See", " ", "http", "://", "bug", "s", ".", "python", ".", "org", "/", "issue", "794", "6_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "we", " ", "cann", "ot", " ", "effective", "ly", " ", "use", " ", "thread", "ing", " ", "for", " ", "load", "ing", " ", "files", "/", "network", "/", "etc", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "with", "out", " ", "setti", "ng", " ", "the", " ", "switch", "interval", " ", "down", " ", "on", " ", "python", " ", "3", " ", "due", " ", "to", " ", "the", " ", "new_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "GI", "L", " ", "implementation_", "\\u\\u\\uNL\\u\\u\\u_", "\\u", "swi", "val_", "=_", "0.000001", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "sets", "witch", "interval_", "(_", "\\u", "swi", "val_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "threading_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "traceback_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "ging", "a_", "._", "util_", "._", "six_", "._", "moves_", "import_", "map_", ",_", "zip_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "BASIC", " ", "TASK", "S", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "For", " ", "testi", "ng", "..._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "COMPO", "UND", " ", "TASK", "S", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "PRIORITY", " ", "QUEUE", "S", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "WORKER", " ", "THREADS", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "THREAD", " ", "POOL", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "------------", " ", "SUPPORT", " ", "FUNCTIONS", " ", "------------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u", "lock", "\\u", "seqn", "um_", "=_", "threading_", "._", "Lock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "count", "\\u", "seqn", "um_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "END_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Task", "Error_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Except", "ion", " ", "generat", "ed", " ", "for", " ", "task", " ", "error", "s", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Task", "Timeout_", "(_", "Task", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Except", "ion", " ", "generat", "ed", " ", "whe", "n", " ", "tim", "ing", " ", "out", " ", "wait", "ing", " ", "on", " ", "a", " ", "task", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "User", "Task", "Exception_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "class", " ", "implement", "s", " ", "a", " ", "basic", " ", "Task", " ", "(", "command", ")", " ", "abstract", "ion", ".", " ", " ", "The", "\\", "10", ";", " ", " ", " ", " ", "method", "s", " ", "defin", "e", " ", "the", " ", "interface", " ", "for", " ", "startin", "g", ",", " ", "cancel", "ling", ",", " ", "wait", "ing", " ", "on", " ", "a", "\\", "10", ";", " ", " ", " ", " ", "task", ",", " ", "etc", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "construct", "or", " ", "sets", " ", "bare", " ", "essential", "s", " ", "for", " ", "a", " ", "Task", " ", "object", ".", " ", " ", "See", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "initialize", "()", " ", "and", " ", "start", "()", " ", "method", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "done_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "callbacks_", "=_", "Queue_", "._", "Queue_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tag_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "thread", "Pool_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Lock", " ", "for", " ", "task", " ", "state", " ", "critic", "al", " ", "sections_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "tlo", "ck_", "=_", "threading_", "._", "RL", "ock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Parent", " ", "task", " ", "can", " ", "set", " ", "this", " ", "(", "or", " ", "add", " ", "to", " ", "it", ")", " ", "explicit", "ly", " ", "to", " ", "dete", "rmin", "e_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "whi", "ch", " ", "values", " ", "will", " ", "be", " ", "copie", "d", " ", "whe", "n", " ", "it", " ", "calls", " ", "initialize", "()", " ", "on", " ", "a", " ", "child_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "task", "._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "shares_", "=_", "[_", "'", "logg", "er", "'_", ",_", "'", "thread", "Poo", "l", "'_", ",_", "'", "share", "s", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Task_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "initialize_", "(_", "self_", ",_", "task", "Parent_", ",_", "override_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "initialize", "s", " ", "a", " ", "task", " ", "for", " ", "(", "re", ")", "use", ".", " ", " ", "task", "Parent", " ", "is", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "object", " ", "instance", " ", "of", " ", "the", " ", "parent", " ", "task", ",", " ", "or", " ", "a", " ", "'", "task", " ", "environ", "ment", "'", " ", "(", "somet", "hing", "\\", "10", ";", " ", " ", " ", " ", "tha", "t", " ", "runs", " ", "task", "s", ").", "\\", "10", ";", " ", " ", " ", " ", "If", " ", "subclass", " ", "override", "s", " ", "this", " ", "method", ",", " ", "it", " ", "shou", "ld", " ", "call", " ", "the", " ", "superclass", "\\", "10", ";", " ", " ", " ", " ", "method", " ", "at", " ", "some", " ", "point", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "Copy", " ", "shared", " ", "data", " ", "from", " ", "task", "Parent", ",", " ", "overrid", "ing", " ", "items", " ", "from", " ", "\\u", "override", "\\u", "\\", "10", ";", " ", " ", "if", " ", "the", "y", " ", "are", " ", "presen", "t", " ", "there", " ", "('", "conta", "gion", "'", " ", "of", " ", "task", " ", "values", ").", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "Generate", " ", "a", " ", "unique", " ", "tag", ",", " ", "to", " ", "be", " ", "used", " ", "with", " ", "the", " ", "Gen", "2", " ", "Monitor", ".", "\\", "10", ";", " ", " ", " ", " ", "-", " ", "Clear", " ", "don", "e", " ", "event", ",", " ", "initialize", " ", "times", " ", "and", " ", "result", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "For", " ", "now", ",", " ", "punt", " ", "if", " ", "we", " ", "have", " ", "no", " ", "appare", "nt", " ", "parent_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "task", "Parent_", "and_", "hasattr_", "(_", "task", "Parent_", ",_", "'", "share", "s", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Copy", " ", "some", " ", "variab", "les", " ", "from", " ", "our", " ", "parent", " ", "task", ",", " ", "unl", "ess", " ", "the", "y", " ", "are", " ", "bei", "ng_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "overrid", "den", " ", "explicit", "ly", ".", " ", " ", "Us", "ing", " ", "this", " ", "genera", "l", " ", "\"", "conta", "gion", "\"", " ", "mechanism", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "a", " ", "task", " ", "can", " ", "caus", "e", " ", "it", "'", "s", " ", "child", "ren", " ", "to", " ", "have", " ", "values", " ", "avail", "able", " ", "to", " ", "them", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "with", "out", " ", "passi", "ng", " ", "them", " ", "explicit", "ly", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "var_", "in_", "task", "Parent_", "._", "shares_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "override_", "and_", "var_", "in_", "override_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "\\u\\u", "dict\\u\\u_", "[_", "var_", "]_", "=_", "override_", "[_", "var_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "print", " ", "\"", "COPY", "ING", " ", "VAR", " ", "FROM", " ", "PARENT", ":", " ", "%", "s", "(%", "s", ")\"", " ", "%", " ", "(", "var", ",", " ", "str", "(", "task", "Parent", ".\\u", "\\u", "dict", "\\u\\u", "[", "var", "]))", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "\\u\\u", "dict\\u\\u_", "[_", "var_", "]_", "=_", "task", "Parent_", "._", "\\u\\u", "dict\\u\\u_", "[_", "var_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "raise", " ", "Task", "Error", "(\"", "Cann", "ot", " ", "initialize", " ", "task", " ", "with", "out", " ", "a", " ", "task", "Parent", "!\"", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Generate", " ", "our", " ", "own", " ", "unique", " ", "tag", ".", " ", " ", "'", "tagger", "'", " ", "shou", "ld", " ", "have", " ", "bee", "n", " ", "transmitte", "d_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "from", " ", "the", " ", "parent", " ", "task_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "self_", "._", "tag_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "tag_", "=_", "str_", "(_", "task", "Parent_", ")_", "+_", "'.'_", "+_", "self_", "._", "tagger_", "._", "get", "\\u", "tag_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Fail", "ed", "--", "fall", " ", "back", " ", "to", " ", "internal", " ", "tagger_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "tag_", "=_", "get", "\\u", "tag_", "(_", "task", "Parent_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Some", " ", "per", "-", "task", " ", "specific", " ", "initialization", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "ev", "\\u", "done_", "._", "clear_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "starttime_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "endtime_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "result_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "self_", "._", "tag_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "start_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "starts", " ", "a", " ", "task", " ", "executi", "ng", " ", "and", " ", "return", "s", " ", "immediate", "ly", ".", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "override", " ", "this", " ", "method", ",", " ", "if", " ", "it", " ", "has", " ", "an", " ", "async", "hronous", "\\", "10", ";", " ", " ", " ", " ", "way", " ", "to", " ", "start", " ", "the", " ", "task", " ", "and", " ", "return", " ", "immediate", "ly", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "thread", "Pool_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "thread", "Pool_", "._", "add", "Task_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Let", "s", " ", "other", " ", "thread", "s", " ", "have", " ", "a", " ", "chan", "ce", " ", "to", " ", "run_", "\\u\\u\\uNL\\u\\u\\u_", "time_", "._", "sleep_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Task", "Error_", "(_", "\"", "start", "():", " ", "not", "hing", " ", "to", " ", "start", " ", "for", " ", "task", " ", "%", "s", "\"_", "%_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "init", "\\u", "and", "\\u", "start_", "(_", "self_", ",_", "task", "Parent_", ",_", "override_", "=_", "{_", "}_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Conve", "nie", "nce", " ", "method", " ", "to", " ", "initialize", " ", "and", " ", "start", " ", "a", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tag_", "=_", "self_", "._", "initialize_", "(_", "task", "Parent_", ",_", "override_", "=_", "override_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "tag_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "check", "\\u", "state_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Abstract", " ", "method", " ", "tha", "t", " ", "shou", "ld", " ", "check", " ", "for", " ", "paus", "e", ",", " ", "cancellat", "ion", ",", " ", "or", "\\", "10", ";", " ", " ", " ", " ", "any", " ", "other", " ", "sort", " ", "of", " ", "pree", "mption", " ", "event", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "extend", "\\u", "shares_", "(_", "self_", ",_", "varli", "st_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shares_", "=_", "set_", "(_", "self_", "._", "shares_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "var_", "in_", "varli", "st_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "hasattr_", "(_", "self_", ",_", "var_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "shares_", "._", "add_", "(_", "var_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "shares_", "=_", "shares_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "cancel", "s", " ", "an", " ", "executi", "ng", " ", "task", " ", "(", "if", " ", "possib", "le", ").", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "override", " ", "this", " ", "method", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "Tru", "e", " ", "if", " ", "task", " ", "coul", "d", " ", "be", " ", "cancel", "led", ",", " ", "Fal", "se", " ", "if", " ", "not", "?", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Task", "Error_", "(_", "\"", "Task", " ", "%", "s", ":", " ", "subclass", " ", "shou", "ld", " ", "override", " ", "stop", "()", " ", "method", "!\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pause_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "paus", "es", " ", "an", " ", "executi", "ng", " ", "task", " ", "(", "if", " ", "possib", "le", ").", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "override", " ", "this", " ", "method", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "Tru", "e", " ", "if", " ", "task", " ", "coul", "d", " ", "be", " ", "paus", "ed", ",", " ", "Fal", "se", " ", "if", " ", "not", "?", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Task", "Error_", "(_", "\"", "Task", " ", "%", "s", ":", " ", "subclass", " ", "shou", "ld", " ", "override", " ", "paus", "e", "()", " ", "method", "!\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "resume_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "resum", "es", " ", "an", " ", "executi", "ng", " ", "task", " ", "(", "if", " ", "possib", "le", ").", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "override", " ", "this", " ", "method", ",", " ", "shou", "ld", " ", "not", " ", "call", " ", "super", ".", "resum", "e", "()", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "Tru", "e", " ", "if", " ", "task", " ", "coul", "d", " ", "be", " ", "resum", "ed", ",", " ", "Fal", "se", " ", "if", " ", "not", "?", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Task", "Error_", "(_", "\"", "Task", " ", "%", "s", ":", " ", "subclass", " ", "shou", "ld", " ", "override", " ", "resum", "e", "()", " ", "method", "!\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "wait_", "(_", "self_", ",_", "timeout_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "waits", " ", "for", " ", "an", " ", "executi", "ng", " ", "task", " ", "to", " ", "finish", ".", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "can", " ", "override", " ", "this", " ", "method", " ", "if", " ", "necessar", "y", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "done_", "._", "wait_", "(_", "timeout_", "=_", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "self_", "._", "ev", "\\u", "done_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Task", "Timeout_", "(_", "\"", "Task", " ", "%", "s", " ", "timed", " ", "out", ".\"_", "%_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-->", " ", "self", ".", "result", " ", "is", " ", "set_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "it", " ", "is", " ", "an", " ", "exception", ",", " ", "then", " ", "raise", " ", "it", " ", "in", " ", "this", " ", "waiter_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "isinstance_", "(_", "self_", "._", "result_", ",_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "self_", "._", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Release", " ", "waiter", "s", " ", "and", " ", "perform", " ", "callbacks_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "don", "e", "()", " ", "has", " ", "alr", "ead", "y", " ", "bee", "n", " ", "call", "ed", ",", " ", "bec", "aus", "e", " ", "of", " ", "self", ".", "ev", "\\u", "don", "e", " ", "check_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\"", "async", "hronous", "\"", " ", "task", "s", " ", "shou", "ld", " ", "coul", "d", " ", "call", " ", "don", "e", "()", " ", "here_", "\\u\\u\\uNL\\u\\u\\u_", "#", "self", ".", "don", "e", "(", "self", ".", "result", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "step_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "If", " ", "a", " ", "task", " ", "has", " ", "a", " ", "way", " ", "of", " ", "step", "ping", " ", "through", " ", "an", " ", "operati", "on", ".", " ", " ", "It", " ", "can", "\\", "10", ";", " ", " ", " ", " ", "implement", " ", "this", " ", "method", ".", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "not", " ", "call", " ", "super", ".", "step", "()", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Task", "Error_", "(_", "\"", "Task", " ", "%", "s", ":", " ", "subclass", " ", "shou", "ld", " ", "override", " ", "step", "()", " ", "method", "!\"_", "%_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "doe", "s", " ", "the", " ", "work", " ", "of", " ", "a", " ", "task", " ", "(", "if", " ", "executed", " ", "by", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "thread", " ", "pool", ")", " ", "and", " ", "return", "s", " ", "whe", "n", " ", "it", " ", "is", " ", "finish", "ed", ".", " ", " ", "***", " ", "Subc", "lass", " ", "shou", "ld", "\\", "10", ";", " ", " ", " ", " ", "override", " ", "this", " ", "method", "!", " ", "***", " ", " ", "It", " ", "shou", "ld", " ", "take", " ", "no", " ", "argu", "ment", "s", ",", " ", "and", " ", "can", "\\", "10", ";", " ", " ", " ", " ", "return", " ", "anyt", "hing", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Task", "Error_", "(_", "\"", "Task", " ", "%", "s", ":", " ", "subclass", " ", "shou", "ld", " ", "override", " ", "execute", "()", " ", "method", "!\"_", "%_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "done_", "(_", "self_", ",_", "result_", ",_", "nor", "ais", "e_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "is", " ", "call", "ed", " ", "whe", "n", " ", "a", " ", "task", " ", "has", " ", "finish", "ed", " ", "executi", "ng", ".", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "can", " ", "override", " ", "this", " ", "method", " ", "if", " ", "desi", "red", ",", " ", "but", " ", "shou", "ld", " ", "call", "\\", "10", ";", " ", " ", " ", " ", "superclass", " ", "method", " ", "at", " ", "the", " ", "end", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "[", "??", "]", " ", "Sho", "ul", "d", " ", "this", " ", "be", " ", "in", " ", "a", " ", "critic", "al", " ", "section", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Has", " ", "don", "e", "()", " ", "alr", "ead", "y", " ", "bee", "n", " ", "call", "ed", " ", "on", " ", "this", " ", "task", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "ev", "\\u", "done_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "??", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "isinstance_", "(_", "self_", "._", "result_", ",_", "Exception_", ")_", "and_", "(_", "not_", "nor", "ais", "e_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "self_", "._", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "calcul", "ate", " ", "runn", "ing", " ", "time", " ", "and", " ", "other", " ", "finali", "zation_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "endtime_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "total", "time_", "=_", "self_", "._", "endtime_", "-_", "self_", "._", "starttime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Attribute", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "task", " ", "was", " ", "not", " ", "initialize", "d", " ", "proper", "ly_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "total", "time_", "=_", "0.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "result_", "=_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Release", " ", "thread", " ", "waiter", "s_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ev", "\\u", "done_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Perform", " ", "callback", "s", " ", "for", " ", "event", "-", "style", " ", "waiter", "s_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "do", "\\u", "callbacks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "the", " ", "result", " ", "is", " ", "an", " ", "exception", ",", " ", "then", " ", "our", " ", "final", " ", "act", " ", "is", " ", "to", " ", "raise_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "it", " ", "in", " ", "the", " ", "caller", ",", " ", "unl", "ess", " ", "the", " ", "caller", " ", "explicit", "ly", " ", "sup", "ress", "ed", " ", "that_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "isinstance_", "(_", "result_", ",_", "Exception_", ")_", "and_", "(_", "not_", "nor", "ais", "e_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "register", "\\u", "callback_", "(_", "self_", ",_", "fn_", ",_", "args_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "method", " ", "is", " ", "call", "ed", " ", "to", " ", "register", " ", "a", " ", "callback", " ", "function", " ", "to", " ", "be", "\\", "10", ";", " ", " ", " ", " ", "call", "ed", " ", "whe", "n", " ", "a", " ", "task", " ", "terminate", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "shou", "ld", " ", "probab", "ly", " ", "not", " ", "override", " ", "this", " ", "method", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "args_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "args_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "callable_", "(_", "fn_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "callbacks_", "._", "put_", "(_", "(_", "fn_", ",_", "args_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Task", "Error_", "(_", "\"", "Function", " ", "argu", "ment", " ", "is", " ", "not", " ", "a", " ", "calla", "ble", ":", " ", "%", "s", "\"_", "%_", "str_", "(_", "fn_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "do", "\\u", "callbacks_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Make", "s", " ", "callback", "s", " ", "on", " ", "all", " ", "register", "ed", " ", "function", "s", " ", "wait", "ing", " ", "on", " ", "this", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "while_", "not_", "self_", "._", "callbacks_", "._", "empty_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "fn_", ",_", "rest_", ")_", "=_", "self_", "._", "callbacks_", "._", "get_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "args_", "=_", "[_", "self_", "._", "result_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "args_", "._", "extend_", "(_", "rest_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "fn_", "(_", "*_", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "tag_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Thi", "s", " ", "is", " ", "only", " ", "valid", " ", "AFTER", " ", "initialize", "()", " ", "has", " ", "bee", "n", " ", "call", "ed", " ", "on", " ", "the", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "tag_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "str\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Return", "s", " ", "a", " ", "string", " ", "represent", "ation", " ", "of", " ", "a", " ", "task", " ", "(", "e", ".", "g", ".", " ", "for", " ", "debugg", "ing", ").", "\\", "10", ";", " ", " ", " ", " ", "Subc", "lass", " ", "can", " ", "override", " ", "this", " ", "method", " ", "if", " ", "desi", "red", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "str_", "(_", "self_", "._", "tag_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "lt\\u\\u_", "(_", "self_", ",_", "other_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Execut", "ion", "Time_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "total", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run", "Task_", "(_", "self_", ",_", "task_", ",_", "timeout_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "a", " ", "child", " ", "task", " ", "to", " ", "completion", ".", " ", " ", "Return", "s", " ", "the", " ", "result", " ", "of", "\\", "10", ";", " ", " ", " ", " ", "the", " ", "child", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Initializ", "e", " ", "the", " ", "task", "._", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "initialize_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "the", " ", "task", "._", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Let", "s", " ", "other", " ", "thread", "s", " ", "run_", "\\u\\u\\uNL\\u\\u\\u_", "time_", "._", "sleep_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Wait", " ", "for", " ", "it", " ", "to", " ", "finish", "._", "\\u\\u\\uNL\\u\\u\\u_", "res_", "=_", "task_", "._", "wait_", "(_", "timeout_", "=_", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "No", "w", " ", "we", "'", "re", " ", "done_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "res_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Task_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run_", "(_", "self_", ",_", "task_", ",_", "timeout_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "a", " ", "child", " ", "task", " ", "to", " ", "completion", ".", " ", " ", "Return", "s", " ", "the", " ", "result", " ", "of", "\\", "10", ";", " ", " ", " ", " ", "the", " ", "child", " ", "task", ".", " ", " ", "Simp", "ly", " ", "calls", " ", "run", "Task", "()", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "self_", "._", "run", "Task_", "(_", "task_", ",_", "timeout_", "=_", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "print", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Simple", " ", "task", " ", "tha", "t", " ", "print", "s", " ", "msg", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "print", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "msg_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "msg_", "=_", "msg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "print", "Task_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "print", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "self_", "._", "msg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "sleep", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Simple", " ", "task", " ", "tha", "t", " ", "sleep", "s", " ", "for", " ", "dela", "y", " ", "second", "s", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "sleep", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "delay_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "delay_", "=_", "delay_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "sleep", "Task_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "sleep", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ev", "\\u", "done_", "._", "wait_", "(_", "timeout_", "=_", "self_", "._", "delay_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Func", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Simple", " ", "task", " ", "tha", "t", " ", "calls", " ", "func", " ", "and", " ", "return", "s", " ", "func", "'", "s", " ", "return", " ", "value", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Func", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "func_", ",_", "args_", ",_", "kwd", "args_", ",_", "logger_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "func_", "=_", "func_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "args_", "=_", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "kwd", "args_", "=_", "kwd", "args_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "=_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "super_", "(_", "Func", "Task_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Func", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "logger_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Cap", " ", "logg", "ing", " ", "size", " ", "aro", "und", " ", "500", " ", "characters_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s", "\\u", "args_", "=_", "str_", "(_", "self_", "._", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "s", "\\u", "args_", ")_", ">_", "500_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s", "\\u", "args_", "=_", "s", "\\u", "args_", "[_", ":_", "500_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "s", "\\u", "kwd", "args_", "=_", "str_", "(_", "self_", "._", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "len_", "(_", "s", "\\u", "kwd", "args_", ")_", ">_", "500_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "s", "\\u", "kwd", "args_", "=_", "s", "\\u", "kwd", "args_", "[_", ":_", "500_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Run", "ning", " ", "%", "s", "(%", "s", ",", " ", "%", "s", ")\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "func_", "._", "\\u\\u", "name\\u\\u_", ",_", "s", "\\u", "args_", ",_", "s", "\\u", "kwd", "args_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s", "\\u", "args_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "s", "\\u", "kwd", "args_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "res_", "=_", "self_", "._", "func_", "(_", "*_", "self_", "._", "args_", ",_", "**_", "self_", "._", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "done_", "(_", "res_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "logger_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Function", " ", "return", "ed", " ", "%", "s", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "str_", "(_", "res_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "logger_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Task", " ", "'%", "s", "'", " ", "terminate", "d", " ", "with", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "str_", "(_", "self_", ")_", ",_", "str_", "(_", "e_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "(_", "type_", ",_", "value_", ",_", "tb_", ")_", "=_", "sys_", "._", "exc", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Trace", "back", ":\\\\", "n", "%", "s", "\"_", "%_", "\"\"_", "._", "join_", "(_", "traceback_", "._", "format\\u", "tb_", "(_", "tb_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tb_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Trace", "back", " ", "informati", "on", " ", "unava", "ilab", "le", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "done_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Func", "Task", "2_", "(_", "Func", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Simple", " ", "task", " ", "tha", "t", " ", "calls", " ", "func", " ", "and", " ", "return", "s", " ", "func", "'", "s", " ", "return", " ", "value", ".", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "version", " ", "lets", " ", "you", " ", "speci", "fy", " ", "the", " ", "positional", " ", "and", " ", "keyw", "ord", " ", "argu", "ment", "s", "\\", "10", ";", " ", " ", " ", " ", "more", " ", "natur", "ally", " ", "'", "in", " ", "place", "'", " ", "in", " ", "the", " ", "construct", "or", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Func", "Task", "2_", "(_", "Func", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "func_", ",_", "*_", "args_", ",_", "**_", "kwd", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Func", "Task", "2_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", "func_", ",_", "args_", ",_", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Func", "Task", "2_", "(_", "Func", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set\\u", "logger_", "(_", "self_", ",_", "logger_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "=_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "make", "\\u", "task", "er_", "(_", "func_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "make", "\\u", "task", "er", " ", "take", "s", " ", "a", " ", "calla", "ble", " ", "(", "function", ",", " ", "method", ",", " ", "etc", ".)", " ", "and", " ", "return", "s", "\\", "10", ";", " ", " ", " ", " ", "a", " ", "new", " ", "factor", "y", " ", "function", " ", "for", " ", "generat", "ing", " ", "task", "s", ".", " ", " ", "Ea", "ch", " ", "factor", "y", " ", "function", " ", "is", "\\", "10", ";", " ", " ", " ", " ", "design", "ed", " ", "to", " ", "consume", " ", "its", " ", "argu", "ment", "s", " ", "and", " ", "return", " ", "a", " ", "task", " ", "tha", "t", ",", " ", "whe", "n", " ", "executed", ",", "\\", "10", ";", " ", " ", " ", " ", "will", " ", "call", " ", "the", " ", "function", " ", "upo", "n", " ", "the", " ", "argu", "ment", "s", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "TOD", "O", ":", " ", "depre", "cate", " ", "this", " ", "and", " ", "just", " ", "use", " ", "Func", "Task", ",", " ", "whi", "ch", " ", "is", " ", "easi", "er", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "underst", "and", "--", "must", " ", "change", " ", "a", " ", "number", " ", "of", " ", "program", "s", " ", "first", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "anon", "Func_", "(_", "*_", "args_", ",_", "**_", "kwd", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "class_", "anon", "Task_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Execut", "ing", " ", "fn", " ", "%", "s", "\"_", "%_", "func_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "val_", "=_", "func_", "(_", "*_", "args_", ",_", "**_", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Don", "e", " ", "executi", "ng", " ", "fn", " ", "%", "s", "\"_", "%_", "func_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "val_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Log", " ", "error", " ", "message", " ", "and", " ", "re", "-", "raise", " ", "exception", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "fn", " ", "%", "s", " ", "raise", "d", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "func_", ",_", "str_", "(_", "e_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "e_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "anon", "Task_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "anon", "Func_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Compo", "und", " ", "task", " ", "tha", "t", " ", "runs", " ", "a", " ", "series", " ", "of", " ", "task", "s", " ", "sequential", "ly", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "task", "seq_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Sequ", "ential", "Task", "set_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "taskl", "ist_", "=_", "list_", "(_", "task", "seq_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "initialize_", "(_", "self_", ",_", "task", "Parent_", ",_", "**_", "kwd", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "index_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Sequ", "ential", "Task", "set_", ",_", "self_", ")_", "._", "initialize_", "(_", "task", "Parent_", ",_", "**_", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "step_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "the", " ", "next", " ", "child", " ", "task", " ", "and", " ", "wait", " ", "for", " ", "completion", " ", "(", "no", " ", "timeo", "ut", ").\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "index_", ">=_", "len_", "(_", "self_", "._", "taskl", "ist_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Task", "Error_", "(_", "\"", "step", "():", " ", "sequential", " ", "compo", "und", " ", "task", " ", "%", "s", " ", "finish", "ed", "\"_", "%_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "check", "\\u", "state_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Select", " ", "next", " ", "task", " ", "from", " ", "the", " ", "set", " ", "and", " ", "advance", " ", "the", " ", "index_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "task_", "=_", "self_", "._", "taskl", "ist_", "[_", "self_", "._", "index_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "index_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "self_", "._", "run", "Task_", "(_", "self_", "._", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "all", " ", "child", " ", "task", "s", ",", " ", "in", " ", "order", ",", " ", "wait", "ing", " ", "for", " ", "completion", " ", "of", " ", "each", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "the", " ", "result", " ", "of", " ", "the", " ", "final", " ", "child", " ", "task", "'", "s", " ", "executi", "on", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "self_", "._", "index_", "<_", "len_", "(_", "self_", "._", "taskl", "ist_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "res_", "=_", "self_", "._", "step_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "'", "Seq", "Set", " ", "task", " ", "%", "i", " ", "has", " ", "complete", "d", " ", "with", " ", "result", " ", "%", "s", "'_", "%_", "(_", "self_", "._", "index_", ",_", "res_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Return", "s", " ", "result", " ", "of", " ", "last", " ", "task", " ", "to", " ", "quit_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "res_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Interr", "upt", "/", "cancel", " ", "executi", "on", ",", " ", "but", " ", "will", " ", "allow", " ", "current", " ", "child", " ", "task", "\\", "10", ";", " ", " ", " ", " ", "to", " ", "complete", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "self", ".", "ev", "\\u", "intr", ".", "set", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Error_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Error", " ", "cancel", "ling", " ", "child", " ", "task", ":", " ", "%", "s", "\"_", "%_", "(_", "str_", "(_", "e_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Sequ", "ential", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Task_", "(_", "self_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Append", " ", "a", " ", "task", " ", "to", " ", "the", " ", "task", " ", "sequence", ".", " ", " ", "If", " ", "the", " ", "Sequ", "ential", "Task", "set", " ", "has", "\\", "10", ";", " ", " ", " ", " ", "alr", "ead", "y", " ", "complete", "d", " ", "executi", "on", ",", " ", "this", " ", "will", " ", "do", " ", "not", "hing", " ", "unl", "ess", " ", "it", " ", "is", "\\", "10", ";", " ", " ", " ", " ", "restart", "ed", " ", "(", "initialize", "()", ",", " ", "start", "())", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "taskl", "ist_", "._", "append_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Compo", "und", " ", "task", " ", "tha", "t", " ", "runs", " ", "a", " ", "set", " ", "of", " ", "task", "s", " ", "concurrent", "ly", ",", " ", "and", " ", "doe", "s", " ", "not", "\\", "10", ";", " ", " ", " ", " ", "return", " ", "unti", "l", " ", "the", "y", " ", "all", " ", "terminate", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "task", "seq_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "old", "Conc", "urrent", "And", "Task", "set_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "task", "seq_", "=_", "task", "seq_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "intr", "_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Us", "ed", " ", "to", " ", "synchronize", " ", "compo", "und", " ", "task", " ", "termination", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "reg", "cond_", "=_", "threading_", "._", "Condition_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "all", " ", "child", " ", "task", "s", " ", "concurrent", "ly", " ", "in", " ", "separate", " ", "thread", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "0", " ", "after", " ", "all", " ", "child", " ", "task", "s", " ", "have", " ", "complete", "d", " ", "executi", "on", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task", "set_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "results_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Register", " ", "termination", " ", "callback", "s", " ", "for", " ", "all", " ", "my", " ", "child", " ", "task", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "for_", "task_", "in_", "self_", "._", "task", "seq_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task", "set_", "._", "append_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "register", "\\u", "callback_", "(_", "self_", "._", "child", "\\u", "done_", ",_", "args_", "=_", "[_", "self_", "._", "count_", ",_", "task_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "numt", "asks", "_", "=_", "self_", "._", "count_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "No", "w", " ", "start", " ", "each", " ", "child", " ", "task", "._", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "task_", "in_", "self_", "._", "task", "set_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "task_", "._", "initialize_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Account", " ", "for", " ", "time", " ", "need", "ed", " ", "to", " ", "start", " ", "subtask", "s_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "total", "time_", "=_", "time_", "._", "time_", "(_", ")_", "-_", "self_", "._", "total", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "No", "w", " ", "give", " ", "up", " ", "the", " ", "critic", "al", " ", "section", " ", "and", " ", "wait", " ", "for", " ", "last", " ", "child_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "task", " ", "to", " ", "terminate", "._", "\\u\\u\\uNL\\u\\u\\u_", "while_", "self_", "._", "count_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "reg", "cond_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sca", "n", " ", "results", " ", "for", " ", "error", "s", " ", "(", "exception", "s", ")", " ", "and", " ", "raise", " ", "the", " ", "first", " ", "one", " ", "we", " ", "find_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "key_", "in_", "self_", "._", "results_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "results_", "[_", "key_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "isinstance_", "(_", "value_", ",_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "count_", ",_", "task_", ")_", "=_", "key_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Chil", "d", " ", "task", " ", "%", "s", " ", "terminate", "d", " ", "with", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "tag_", ",_", "str_", "(_", "value_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "child", "\\u", "done_", "(_", "self_", ",_", "result_", ",_", "count_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Acquire", " ", "the", " ", "condition", " ", "variab", "le", " ", "for", " ", "the", " ", "compo", "und", " ", "task", " ", "object", ".", "\\", "10", ";", " ", " ", " ", " ", "Decre", "ment", " ", "the", " ", "thread", " ", "count", ".", " ", " ", "If", " ", "we", " ", "are", " ", "the", " ", "last", " ", "thread", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "finish", ",", " ", "release", " ", "compo", "und", " ", "task", " ", "thread", ",", " ", "whi", "ch", " ", "is", " ", "block", "ed", " ", "in", " ", "execute", "()", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "'", "Conc", "urrent", " ", "task", " ", "%", "d", "/", "%", "d", " ", "has", " ", "complete", "d", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "count_", ",_", "self_", "._", "numt", "asks", "_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "count_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task", "set_", "._", "remove_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "+=_", "task_", "._", "get", "Execut", "ion", "Time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "results_", "[_", "(_", "count_", ",_", "task_", ")_", "]_", "=_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "count_", "<=_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "reg", "cond_", "._", "notif", "y", "All_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Call", " ", "stop", "()", " ", "on", " ", "all", " ", "child", " ", "task", "s", ",", " ", "and", " ", "ignore", " ", "Task", "Error", " ", "exception", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Behavio", "r", " ", "depend", "s", " ", "on", " ", "what", " ", "the", " ", "child", " ", "task", "s", "'", " ", "stop", "()", " ", "method", " ", "doe", "s", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "task_", "in_", "self_", "._", "task", "set_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "task_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Error_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Task", " ", "doe", "s", " ", "not", " ", "have", " ", "a", " ", "way", " ", "to", " ", "stop", " ", "it", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "notif", "y", " ", "who", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "old", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Task_", "(_", "self_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Add", " ", "a", " ", "task", " ", "to", " ", "the", " ", "task", " ", "set", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task", "set_", "._", "append_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "register", "\\u", "callback_", "(_", "self_", "._", "child", "\\u", "done_", ",_", "args_", "=_", "[_", "self_", "._", "numt", "asks", "_", ",_", "task_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "numt", "asks", "_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "task_", "._", "initialize_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Compo", "und", " ", "task", " ", "tha", "t", " ", "runs", " ", "a", " ", "set", " ", "of", " ", "task", "s", " ", "concurrent", "ly", ",", " ", "and", " ", "doe", "s", " ", "not", "\\", "10", ";", " ", " ", " ", " ", "return", " ", "unti", "l", " ", "the", "y", " ", "all", " ", "terminate", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "task", "seq_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "new", "Conc", "urrent", "And", "Task", "set_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "task", "seq_", "=_", "task", "seq_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "tuning", " ", "value", " ", "for", " ", "polling", " ", "ine", "ffic", "ien", "cy_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "idle", "time_", "=_", "0.001_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "internal", " ", "mutex_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "lock", "\\u", "c_", "=_", "threading_", "._", "RL", "ock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Run", " ", "all", " ", "child", " ", "task", "s", " ", "concurrent", "ly", " ", "in", " ", "separate", " ", "thread", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Return", " ", "last", " ", "result", " ", "after", " ", "all", " ", "child", " ", "task", "s", " ", "have", " ", "complete", "d", " ", "executi", "on", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "numt", "asks", "_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task", "set_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "results_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Start", " ", "all", " ", "tasks_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "task_", "in_", "self_", "._", "task", "seq_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task", "set_", "._", "append_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "numt", "asks", "_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "init", "\\u", "and", "\\u", "start_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "num", "\\u", "tasks_", "=_", "self_", "._", "get", "Num", "Tasks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Wait", " ", "on", " ", "each", " ", "task", " ", "to", " ", "clean", " ", "up", " ", "results_", "\\u\\u\\uNL\\u\\u\\u_", "while_", "num", "\\u", "tasks_", ">_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "check", "\\u", "state_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "num", "\\u", "tasks_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "task_", "=_", "self_", "._", "get", "Task_", "(_", "i_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Index", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "A", " ", "task", " ", "got", " ", "delete", "d", " ", "from", " ", "the", " ", "set", ".", " ", " ", "Jum", "p", " ", "back", " ", "out_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "to", " ", "outer", " ", "loop", " ", "and", " ", "repo", "ll", " ", "the", " ", "number", " ", "of", " ", "tasks_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "self", ".", "logg", "er", ".", "debug", "(\"", "wait", "ing", " ", "on", " ", "%", "s", "\"", " ", "%", " ", "task", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "res_", "=_", "task_", "._", "wait_", "(_", "timeout_", "=_", "self_", "._", "idle", "time_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "self", ".", "logg", "er", ".", "debug", "(\"", "finish", "ed", ":", " ", "%", "s", "\"", " ", "%", " ", "task", ")_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "child", "\\u", "done_", "(_", "res_", ",_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Timeout_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "self", ".", "logg", "er", ".", "warn", "ing", "(\"", "Subt", "ask", " ", "propagate", "d", " ", "exception", ":", " ", "%", "s", "\"", " ", "%", " ", "str", "(", "e", "))", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "child", "\\u", "done_", "(_", "e_", ",_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "wait", " ", "a", " ", "bit", " ", "and", " ", "try", " ", "again", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "self", ".", "ev", "\\u", "quit", ".", "wait", "(", "self", ".", "idle", "time", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "re", "-", "get", " ", "number", " ", "of", " ", "task", "s", ",", " ", "in", " ", "case", " ", "some", " ", "wer", "e", " ", "adde", "d", " ", "or", " ", "deleted_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "num", "\\u", "tasks_", "=_", "self_", "._", "get", "Num", "Tasks_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sca", "n", " ", "results", " ", "for", " ", "error", "s", " ", "(", "exception", "s", ")", " ", "and", " ", "raise", " ", "the", " ", "first", " ", "one", " ", "we", " ", "find_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "key_", "in_", "self_", "._", "results_", "._", "keys_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "value_", "=_", "self_", "._", "results_", "[_", "key_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "isinstance_", "(_", "value_", ",_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "count_", ",_", "task_", ")_", "=_", "key_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Chil", "d", " ", "task", " ", "%", "s", " ", "terminate", "d", " ", "with", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "tag_", ",_", "str_", "(_", "value_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Return", " ", "value", " ", "of", " ", "last", " ", "child", " ", "to", " ", "complete_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "child", "\\u", "done_", "(_", "self_", ",_", "result_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "'", "Conc", "urrent", " ", "task", " ", "%", "d", "/", "%", "d", " ", "has", " ", "complete", "d", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "count_", ",_", "self_", "._", "numt", "asks", "_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task", "set_", "._", "remove_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "+=_", "task_", "._", "get", "Execut", "ion", "Time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "results_", "[_", "(_", "self_", "._", "count_", ",_", "task_", ")_", "]_", "=_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Call", " ", "stop", "()", " ", "on", " ", "all", " ", "child", " ", "task", "s", ",", " ", "and", " ", "ignore", " ", "Task", "Error", " ", "exception", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Behavio", "r", " ", "depend", "s", " ", "on", " ", "what", " ", "the", " ", "child", " ", "task", "s", "'", " ", "stop", "()", " ", "method", " ", "doe", "s", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "task_", "in_", "self_", "._", "task", "set_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "task_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Error_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Task", " ", "doe", "s", " ", "not", " ", "have", " ", "a", " ", "way", " ", "to", " ", "stop", " ", "it", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "notif", "y", " ", "who", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "stop", " ", "ours", "elf_", "\\u\\u\\uNL\\u\\u\\u_", "#", "self", ".", "ev", "\\u", "intr", ".", "set", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Task_", "(_", "self_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Add", " ", "a", " ", "task", " ", "to", " ", "the", " ", "task", " ", "set", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Tr", "y", " ", "to", " ", "start", " ", "task", " ", "first", ".", " ", " ", "If", " ", "it", " ", "fail", "s", " ", "then", " ", "we", " ", "don", "'", "t", " ", "need", " ", "to_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "undo", " ", "addin", "g", " ", "it", " ", "to", " ", "task", "set_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "initialize_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "numt", "asks", "_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task", "set_", "._", "append_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Task_", "(_", "self_", ",_", "i_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "task", "set_", "[_", "i_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "new", "Conc", "urrent", "And", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Num", "Tasks_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Get", " ", "the", " ", "set", " ", "of", " ", "active", " ", "task", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "\\u", "lock", "\\u", "c_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "len_", "(_", "self_", "._", "task", "set_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Conc", "urrent", "And", "Task", "set_", "(_", "new", "Conc", "urrent", "And", "Task", "set_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Compo", "und", " ", "task", " ", "tha", "t", " ", "runs", " ", "a", " ", "set", " ", "of", " ", "task", "s", " ", "tha", "t", " ", "it", " ", "reads", " ", "from", " ", "a", " ", "queue", "\\", "10", ";", " ", " ", " ", " ", "concurrent", "ly", ".", " ", " ", "If", " ", "\\u", "wait", "flag", "\\u", " ", "is", " ", "Tru", "e", ",", " ", "then", " ", "it", " ", "will", " ", "run", " ", "each", " ", "task", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "completion", " ", "bef", "ore", " ", "startin", "g", " ", "the", " ", "next", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "queue_", ",_", "wait", "flag_", "=_", "True_", ",_", "timeout_", "=_", "0.1_", ",_", "ev", "\\u", "quit_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Queue", "Task", "set_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "queue_", "=_", "queue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "wait", "flag_", "=_", "wait", "flag_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "lock_", "=_", "threading_", "._", "RL", "ock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "timeout_", "=_", "timeout_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "task_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "cancel_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "pause_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ev", "\\u", "quit_", "==_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "ev", "\\u", "quit_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "ev", "\\u", "quit_", "=_", "ev", "\\u", "quit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "flush_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Flu", "sh", " ", "queue", " ", "of", " ", "pend", "ing", " ", "tasks_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Flu", "shing", " ", "queue", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "True_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "queue_", "._", "get_", "(_", "block_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Queue_", "._", "Empty_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "self", ".", "ev", "\\u", "intr", ".", "set", "()", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "task_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Error_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "self", ".", "logg", "er", ".", "error", "(\"", "Error", " ", "cancel", "ling", " ", "child", " ", "task", ":", " ", "%", "s", "\"", " ", "%", " ", "(", "str", "(", "e", ")))", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "put", " ", "termination", " ", "sentinel_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "queue_", "._", "put_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop", "\\u", "child_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "task_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "task_", "._", "stop_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Task", "Error_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "self", ".", "logg", "er", ".", "error", "(\"", "Error", " ", "cancel", "ling", " ", "child", " ", "task", ":", " ", "%", "s", "\"", " ", "%", " ", "(", "str", "(", "e", ")))", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Queue", " ", "Task", "set", " ", "startin", "g", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "not_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "check", "\\u", "state_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "=_", "self_", "._", "queue_", "._", "get_", "(_", "block_", "=_", "True_", ",_", "timeout_", "=_", "self_", "._", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "task_", "==_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "termination", " ", "sentinel_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "task_", "=_", "task_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "register", "\\u", "callback_", "(_", "self_", "._", "child", "\\u", "done_", ",_", "args_", "=_", "[_", "task_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "with_", "self_", "._", "lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "ev", "\\u", "cancel_", "._", "clear_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "task_", "._", "initialize_", "(_", "self_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Start", "ing", " ", "task", " ", "'%", "s", "'\"_", "%_", "str_", "(_", "task_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "task_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "wait", "flag_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "res_", "=_", "task_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Task", " ", "%", "s", " ", "terminate", "d", " ", "with", " ", "result", " ", "%", "s", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "str_", "(_", "task_", ")_", ",_", "str_", "(_", "res_", ")_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Task", " ", "'%", "s", "'", " ", "terminate", "d", " ", "with", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "str_", "(_", "task_", ")_", ",_", "str_", "(_", "e_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "(_", "type_", ",_", "value_", ",_", "tb_", ")_", "=_", "sys_", "._", "exc", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Trace", "back", ":\\\\", "n", "%", "s", "\"_", "%_", "\"\"_", "._", "join_", "(_", "traceback_", "._", "format\\u", "tb_", "(_", "tb_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "NOTE", ":", " ", "to", " ", "avoid", " ", "creati", "ng", " ", "a", " ", "cycle", " ", "tha", "t", " ", "mig", "ht", " ", "cause_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "problem", "s", " ", "for", " ", "GC", "--", "see", " ", "Pyth", "on", " ", "librar", "y", " ", "doc", " ", "for", " ", "sys_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "module_", "\\u\\u\\uNL\\u\\u\\u_", "tb_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Trace", "back", " ", "informati", "on", " ", "unava", "ilab", "le", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "task", " ", "raise", "d", " ", "exception", " ", "then", " ", "it", " ", "did", "n", "'", "t", " ", "call", " ", "don", "e", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "task_", "._", "done_", "(_", "e_", ",_", "nor", "ais", "e_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Queue_", "._", "Empty_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "No", " ", "task", " ", "avail", "able", ".", " ", " ", "Continu", "e", " ", "try", "ing", " ", "to", " ", "get", " ", "one", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "continue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "shou", "ld", " ", "we", " ", "wait", " ", "for", " ", "self", ".", "count", " ", ">", " ", "0", "?", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Queue", " ", "Task", "set", " ", "termina", "ting", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "self_", "._", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "child", "\\u", "done_", "(_", "self_", ",_", "result_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "count_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "total", "time_", "+=_", "task_", "._", "get", "Execut", "ion", "Time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "result_", "=_", "result_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cancel_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "super_", "(_", "Queue", "Task", "set_", ",_", "self_", ")_", "._", "cancel_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Queue", "Task", "set_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Task_", "(_", "self_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "queue_", "._", "put_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Prior", "it", "y", "Queue_", "(_", "Queue_", "._", "Prior", "it", "y", "Queue_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "\\u", "Worke", "r", "Reset_", "(_", "Exception_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Local", " ", "exception", " ", "used", " ", "to", " ", "reset", " ", "a", " ", "worker", " ", "thread", ".\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Containe", "r", " ", "for", " ", "a", " ", "thread", " ", "in", " ", "whi", "ch", " ", "to", " ", "call", " ", "the", " ", "execute", "()", " ", "method", " ", "of", " ", "a", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "A", " ", "Worke", "r", "Thread", " ", "object", " ", "waits", " ", "on", " ", "the", " ", "task", " ", "queue", ",", " ", "execute", "s", " ", "a", " ", "task", " ", "whe", "n", " ", "it", "\\", "10", ";", " ", " ", " ", " ", "appear", "s", ",", " ", "and", " ", "repeat", "s", ".", " ", " ", "A", " ", "call", " ", "to", " ", "start", "()", " ", "is", " ", "necessar", "y", " ", "to", " ", "start", " ", "servic", "ing", "\\", "10", ";", " ", " ", " ", " ", "the", " ", "queue", ",", " ", "and", " ", "a", " ", "call", " ", "to", " ", "stop", "()", " ", "will", " ", "terminate", " ", "the", " ", "service", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Basic", " ", "task", " ", "executi", "on", " ", "loop", ".", " ", " ", "Deq", "ueue", " ", "a", " ", "task", " ", "and", " ", "run", " ", "it", ",", " ", "then", " ", "look", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "for", " ", "anot", "her", " ", "one_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "queue_", ",_", "logger_", "=_", "None_", ",_", "ev", "\\u", "quit_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "timeout_", "=_", "0.2_", ",_", "tpo", "ol_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "queue_", "=_", "queue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "=_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "timeout_", "=_", "timeout_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ev", "\\u", "quit_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ev", "\\u", "quit_", "=_", "ev", "\\u", "quit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ev", "\\u", "quit_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "tpo", "ol_", "=_", "tpo", "ol_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "lock_", "=_", "threading_", "._", "RL", "ock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "status_", "=_", "'", "stopp", "ed", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "time", "\\u", "start_", "=_", "0.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "sets", "tatus_", "(_", "self_", ",_", "status_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Set", "s", " ", "our", " ", "status", " ", "field", " ", "so", " ", "tha", "t", " ", "other", "s", " ", "can", " ", "inqu", "ire", " ", "what", " ", "we", " ", "are", " ", "doi", "ng", ".", "\\", "10", ";", " ", " ", " ", " ", "Set", " ", "of", " ", "status", ":", "\\", "10", ";", " ", " ", "startin", "g", ",", " ", "idle", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "status_", "=_", "status_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "getstatus", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Return", "s", " ", "our", " ", "status", "--", "a", " ", "string", " ", "descri", "bing", " ", "what", " ", "we", " ", "are", " ", "doi", "ng", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "lock_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "(_", "self_", "._", "status_", ",_", "self_", "._", "time", "\\u", "start_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "execute_", "(_", "self_", ",_", "task_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Execut", "e", " ", "a", " ", "task", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "taskid", "_", "=_", "str_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Tr", "y", " ", "to", " ", "run", " ", "the", " ", "task", ".", " ", " ", "If", " ", "we", " ", "catch", " ", "an", " ", "exception", ",", " ", "then_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "it", " ", "bec", "ome", "s", " ", "the", " ", "result", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "time", "\\u", "start_", "=_", "time_", "._", "time_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "sets", "tatus_", "(_", "'", "executi", "ng", " ", "%", "s", "'_", "%_", "taskid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "now", " ", "executi", "ng", " ", "task", " ", "'%", "s", "'\"_", "%_", "taskid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "res_", "=_", "task_", "._", "execute_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "User", "Task", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "res_", "=_", "e_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "error_", "(_", "\"", "Task", " ", "'%", "s", "'", " ", "raise", "d", " ", "exception", ":", " ", "%", "s", "\"_", "%_", "(_", "str_", "(_", "task_", ")_", ",_", "str_", "(_", "e_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "res_", "=_", "e_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "(_", "type_", ",_", "value_", ",_", "tb_", ")_", "=_", "sys_", "._", "exc", "\\u", "info_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Trace", "back", ":\\\\", "n", "%", "s", "\"_", "%_", "\"\"_", "._", "join_", "(_", "traceback_", "._", "format\\u", "tb_", "(_", "tb_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "NOTE", ":", " ", "to", " ", "avoid", " ", "creati", "ng", " ", "a", " ", "cycle", " ", "tha", "t", " ", "mig", "ht", " ", "cause_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "problem", "s", " ", "for", " ", "GC", "--", "see", " ", "Pyth", "on", " ", "librar", "y", " ", "doc", " ", "for", " ", "sys_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "module_", "\\u\\u\\uNL\\u\\u\\u_", "tb_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "Trace", "back", " ", "informati", "on", " ", "unava", "ilab", "le", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "finally_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "don", "e", " ", "executi", "ng", " ", "task", " ", "'%", "s", "'\"_", "%_", "str_", "(_", "task_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "sets", "tatus_", "(_", "'", "clean", "ing", " ", "%", "s", "'_", "%_", "taskid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Wake", " ", "up", " ", "waiter", "s", " ", "on", " ", "other", " ", "threads_", "\\u\\u\\uNL\\u\\u\\u_", "task_", "._", "done_", "(_", "res_", ",_", "nor", "ais", "e_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "time", "\\u", "start_", "=_", "0.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "sets", "tatus_", "(_", "'", "idle", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "taskl", "oop", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "sets", "tatus_", "(_", "'", "startin", "g", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "'", "Start", "ing", " ", "worker", " ", "thread", " ", "loop", ".'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "we", " ", "wer", "e", " ", "hande", "d", " ", "a", " ", "thread", " ", "pool", " ", "upo", "n", " ", "start", "up", ",", " ", "then", " ", "register_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "ours", "elv", "es", " ", "with", " ", "it", "._", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "tpo", "ol_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "tpo", "ol_", "._", "register", "\\u", "up_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "sets", "tatus_", "(_", "'", "idle", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "while_", "not_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Wait", " ", "on", " ", "our", " ", "queue", " ", "for", " ", "a", " ", "task", ";", " ", "will", " ", "timeo", "ut", " ", "in_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "self", ".", "timeo", "ut", " ", "secs_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "(_", "priority_", ",_", "task_", ")_", "=_", "self_", "._", "queue_", "._", "get_", "(_", "block_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "timeout_", "=_", "self_", "._", "timeout_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "task_", "==_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "termination", " ", "sentinel_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "self_", "._", "queue_", "._", "put_", "(_", "(_", "priority_", ",_", "task_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "break_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "execute_", "(_", "task_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "\\u", "Worke", "r", "Reset_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "info_", "(_", "\"", "Worke", "r", " ", "reset", "!\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Queue_", "._", "Empty_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Reach", " ", "here", " ", "whe", "n", " ", "we", " ", "time", " ", "out", " ", "wait", "ing", " ", "for", " ", "a", " ", "task_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "finally_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "'", "Stopp", "ing", " ", "worker", " ", "thread", " ", "loop", ".'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "tpo", "ol_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "tpo", "ol_", "._", "register", "\\u", "dn_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "sets", "tatus_", "(_", "'", "stopp", "ed", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "start_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "thread_", "=_", "threading_", "._", "Thread_", "(_", "target_", "=_", "self_", "._", "taskl", "oop", "_", ",_", "args_", "=_", "[_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "thread_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Worke", "r", "Thread_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Put", " ", "termination", " ", "sent", "inal", " ", "on", " ", "queue_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "queue_", "._", "put_", "(_", "(_", "priority_", ",_", "task_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "ev", "\\u", "quit_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "A", " ", "simple", " ", "thread", " ", "pool", " ", "for", " ", "executi", "ng", " ", "task", "s", " ", "async", "hronous", "ly", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "self", ".", "status", " ", "state", "s", ":", "\\", "10", ";", " ", " ", " ", " ", "down", " ", " ", " ", " ", "no", " ", "thread", "s", " ", "are", " ", "read", "y", " ", "for", " ", "service", "\\", "10", ";", " ", " ", " ", " ", "up", " ", " ", "all", " ", "thread", "s", " ", "are", " ", "read", "y", " ", "for", " ", "service", "\\", "10", ";", " ", " ", " ", " ", "start", " ", " ", " ", "thread", "s", " ", "are", " ", "startin", "g", ",", " ", "but", " ", "not", " ", "all", " ", "of", " ", "them", " ", "are", " ", "up", " ", "ye", "t", "\\", "10", ";", " ", " ", " ", " ", "stop", " ", " ", " ", " ", "thread", "s", " ", "are", " ", "stopping", ",", " ", "but", " ", "not", " ", "all", " ", "of", " ", "them", " ", "are", " ", "down", " ", "ye", "t", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "numt", "hread", "s_", "=_", "1_", ",_", "logger_", "=_", "None_", ",_", "ev", "\\u", "quit_", "=_", "None_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "worker", "Class_", "=_", "Worke", "r", "Thread_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "numt", "hread", "s_", "=_", "numt", "hread", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "=_", "logger_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ev", "\\u", "quit_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ev", "\\u", "quit_", "=_", "ev", "\\u", "quit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "ev", "\\u", "quit_", "=_", "threading_", "._", "Event_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "lock_", "=_", "threading_", "._", "RL", "ock_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "worker", "Class_", "=_", "worker", "Class_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "queue_", "=_", "Prior", "it", "y", "Queue_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "workers_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tid", "s_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Us", "ed", " ", "to", " ", "synchronize", " ", "thread", " ", "pool", " ", "start", "up", " ", "(", "see", " ", "register", "()", " ", "method", ")_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "reg", "cond_", "=_", "threading_", "._", "Condition_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "runn", "ing", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "status_", "=_", "'", "down", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "start", "all_", "(_", "self_", ",_", "wait_", "=_", "False_", ",_", "**_", "kwd", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Start", " ", "all", " ", "of", " ", "the", " ", "thread", "s", " ", "in", " ", "the", " ", "thread", " ", "pool", ".", " ", " ", "If", " ", "\\u", "wait", "\\u", " ", "is", " ", "Tru", "e", "\\", "10", ";", " ", " ", " ", " ", "then", " ", "don", "'", "t", " ", "return", " ", "unti", "l", " ", "all", " ", "thread", "s", " ", "are", " ", "up", " ", "and", " ", "runn", "ing", ".", " ", " ", "Any", " ", "extra", "\\", "10", ";", " ", " ", " ", " ", "keyw", "ord", " ", "argu", "ment", "s", " ", "are", " ", "pass", "ed", " ", "to", " ", "the", " ", "worker", " ", "thread", " ", "construct", "or", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "start", "all", " ", "call", "ed", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "while_", "self_", "._", "status_", "!=_", "'", "down", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "status_", "in_", "(_", "'", "start", "'_", ",_", "'", "up", "'_", ")_", "or_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "For", " ", "now", ",", " ", "aband", "on", " ", "addition", "al", " ", "request", " ", "to", " ", "start_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "error_", "(_", "\"", "ign", "orin", "g", " ", "duplicat", "e", " ", "request", " ", "to", " ", "start", " ", "thread", " ", "pool", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "wait", "ing", " ", "for", " ", "thread", "s", ":", " ", "count", "=", "%", "d", "\"_", "%_", "self_", "._", "runn", "ing", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "assert", "(", "self", ".", "status", " ", "==", " ", "'", "down", "')", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "runn", "ing", "count_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "status_", "=_", "'", "start", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "workers_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "wait_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tpo", "ol_", "=_", "self_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tpo", "ol_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Start", " ", "all", " ", "worker", " ", "threads_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "startin", "g", " ", "thread", "s", " ", "in", " ", "thread", " ", "pool", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "self_", "._", "numt", "hread", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "t_", "=_", "self_", "._", "worker", "Class_", "(_", "self_", "._", "queue_", ",_", "logger_", "=_", "self_", "._", "logger_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ev", "\\u", "quit_", "=_", "self_", "._", "ev", "\\u", "quit_", ",_", "tpo", "ol_", "=_", "tpo", "ol_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "**_", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "workers_", "._", "append_", "(_", "t_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "wait_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Thread", "s", " ", "are", " ", "on", " ", "the", " ", "way", " ", "up", ".", " ", " ", "Wait", " ", "unti", "l", " ", "last", " ", "one", " ", "starts", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "while_", "self_", "._", "status_", "!=_", "'", "up", "'_", "and_", "not_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "wait", "ing", " ", "for", " ", "thread", "s", ":", " ", "count", "=", "%", "d", "\"_", "%_", "self_", "._", "runn", "ing", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "start", "all", " ", "don", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Threads_", "(_", "self_", ",_", "numt", "hread", "s_", ",_", "**_", "kwd", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Start", " ", "all", " ", "worker", " ", "threads_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "addin", "g", " ", "%", "d", " ", "thread", "s", " ", "to", " ", "thread", " ", "pool", "\"_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "numt", "hread", "s_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "i_", "in_", "range_", "(_", "numt", "hread", "s_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "t_", "=_", "self_", "._", "worker", "Class_", "(_", "self_", "._", "queue_", ",_", "logger_", "=_", "self_", "._", "logger_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "ev", "\\u", "quit_", "=_", "self_", "._", "ev", "\\u", "quit_", ",_", "tpo", "ol_", "=_", "self_", "._", "tpo", "ol_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "**_", "kwd", "args_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "workers_", "._", "append_", "(_", "t_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "t_", "._", "start_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "numt", "hread", "s_", "+=_", "numt", "hread", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "stop", "all_", "(_", "self_", ",_", "wait_", "=_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Sto", "p", " ", "all", " ", "thread", "s", " ", "in", " ", "the", " ", "worker", " ", "pool", ".", " ", " ", "If", " ", "\\u", "wait", "\\u", " ", "is", " ", "Tru", "e", "\\", "10", ";", " ", " ", " ", " ", "then", " ", "don", "'", "t", " ", "return", " ", "unti", "l", " ", "all", " ", "thread", "s", " ", "are", " ", "down", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "stop", "all", " ", "call", "ed", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "while_", "self_", "._", "status_", "!=_", "'", "up", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "self_", "._", "status_", "in_", "(_", "'", "stop", "'_", ",_", "'", "down", "'_", ")_", "or_", "self_", "._", "ev", "\\u", "quit_", "._", "is", "Set_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "For", " ", "now", ",", " ", "silently", " ", "aband", "on", " ", "addition", "al", " ", "request", " ", "to", " ", "stop_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "warning_", "(_", "\"", "ign", "orin", "g", " ", "duplicat", "e", " ", "request", " ", "to", " ", "stop", " ", "thread", " ", "pool", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "wait", "ing", " ", "for", " ", "thread", "s", ":", " ", "count", "=", "%", "d", "\"_", "%_", "self_", "._", "runn", "ing", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "assert", "(", "self", ".", "status", " ", "==", " ", "'", "up", "')", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "stopping", " ", "thread", "s", " ", "in", " ", "thread", " ", "pool", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "status_", "=_", "'", "stop", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Signal", " ", "to", " ", "all", " ", "thread", "s", " ", "to", " ", "terminate", "._", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "ev", "\\u", "quit_", "._", "set_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "wait_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Thread", "s", " ", "are", " ", "on", " ", "the", " ", "way", " ", "down", ".", " ", " ", "Wait", " ", "unti", "l", " ", "last", " ", "one", " ", "quit", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "while_", "self_", "._", "status_", "!=_", "'", "down", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "wait", "ing", " ", "for", " ", "thread", "s", ":", " ", "count", "=", "%", "d", "\"_", "%_", "self_", "._", "runn", "ing", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "stop", "all", " ", "don", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "worker", "Status_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "list_", "(_", "map_", "(_", "lambda_", "t_", ":_", "t_", "._", "getstatus", "_", "(_", ")_", ",_", "self_", "._", "workers_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "Task_", "(_", "self_", ",_", "task_", ",_", "priority_", "=_", "0_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Add", " ", "a", " ", "task", " ", "to", " ", "the", " ", "queue", " ", "of", " ", "task", "s", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "task", " ", "will", " ", "be", " ", "executed", " ", "in", " ", "a", " ", "worker", " ", "thread", " ", "as", " ", "soo", "n", " ", "as", " ", "one", " ", "is", " ", "avail", "able", ".", "\\", "10", ";", " ", " ", " ", " ", "Task", "s", " ", "are", " ", "executed", " ", "in", " ", "first", "-", "come", "-", "first", "-", "serve", "d", " ", "order", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "queue_", "._", "put_", "(_", "(_", "priority_", ",_", "task_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "del", "Task_", "(_", "self_", ",_", "taskid", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "error_", "(_", "\"", "del", "Task", " ", "not", " ", "ye", "t", " ", "implemented", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "pur", "ge", "Tasks_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "logger_", "._", "error_", "(_", "\"", "pur", "ge", "Task", "s", " ", "not", " ", "ye", "t", " ", "implemented", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "register", "\\u", "up_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Call", "ed", " ", "by", " ", "Worke", "r", "Thread", " ", "object", "s", " ", "to", " ", "register", " ", "them", "sel", "ves", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Acquire", " ", "the", " ", "condition", " ", "variab", "le", " ", "for", " ", "the", " ", "Worke", "r", "Thread", " ", "object", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Increment", " ", "the", " ", "runn", "ing", "-", "thread", " ", "count", ".", " ", " ", "If", " ", "we", " ", "are", " ", "the", " ", "last", " ", "thread", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "start", ",", " ", "set", " ", "status", " ", "to", " ", "'", "up", "'.", " ", " ", "Thi", "s", " ", "allow", "s", " ", "start", "all", "()", " ", "to", " ", "complete", "\\", "10", ";", " ", " ", " ", " ", "if", " ", "it", " ", "was", " ", "call", "ed", " ", "with", " ", "wait", "=", "Tru", "e", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "runn", "ing", "count_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tid_", "=_", "thread_", "._", "get", "\\u", "ident_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tid", "s_", "._", "append_", "(_", "tid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "register", "\\u", "up", ":", " ", "(%", "d", ")", " ", "count", " ", "is", " ", "%", "d", "\"_", "%_", "(_", "tid_", ",_", "self_", "._", "runn", "ing", "count_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "runn", "ing", "count_", "==_", "self_", "._", "numt", "hread", "s_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "status_", "=_", "'", "up", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "notify_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Thread", "Pool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "register", "\\u", "dn_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Call", "ed", " ", "by", " ", "Worke", "r", "Thread", " ", "object", "s", " ", "to", " ", "register", " ", "them", "sel", "ves", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "Acquire", " ", "the", " ", "condition", " ", "variab", "le", " ", "for", " ", "the", " ", "Worke", "r", "Thread", " ", "object", "s", ".", "\\", "10", ";", " ", " ", " ", " ", "Decre", "ment", " ", "the", " ", "runn", "ing", "-", "thread", " ", "count", ".", " ", " ", "If", " ", "we", " ", "are", " ", "the", " ", "last", " ", "thread", " ", "to", "\\", "10", ";", " ", " ", " ", " ", "start", ",", " ", "release", " ", "the", " ", "Thread", "Poo", "l", " ", "thread", ",", " ", "whi", "ch", " ", "is", " ", "stu", "ck", " ", "in", " ", "start", "()", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "self_", "._", "reg", "cond_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "runn", "ing", "count_", "-=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tid_", "=_", "thread_", "._", "get", "\\u", "ident_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "tid", "s_", "._", "remove_", "(_", "tid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "register", "\\u", "dn", ":", " ", "count", "\\u", "dn", " ", "is", " ", "%", "d", "\"_", "%_", "self_", "._", "runn", "ing", "count_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "logger_", "._", "debug_", "(_", "\"", "register", "\\u", "dn", ":", " ", "rema", "inin", "g", ":", " ", "%", "s", "\"_", "%_", "str_", "(_", "self_", "._", "tid", "s_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "self_", "._", "runn", "ing", "count_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "status_", "=_", "'", "down", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "reg", "cond_", "._", "notify_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "get", "\\u", "tag_", "(_", "task", "Parent_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "\\u", "count", "\\u", "seqn", "um_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "with_", "\\u", "lock", "\\u", "seqn", "um_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "gener", "ic", "\\u", "id_", "=_", "'", "task", "%", "d", "'_", "%_", "(_", "\\u", "count", "\\u", "seqn", "um_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u", "count", "\\u", "seqn", "um_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "task", "Parent_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tag_", "=_", "str_", "(_", "task", "Parent_", ")_", "+_", "'.'_", "+_", "gener", "ic", "\\u", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tag_", "=_", "gener", "ic", "\\u", "id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
associatedpress/geomancer/geomancer/views.py
[ { "content": "@views.route('/select-tables/', methods=['POST', 'GET'])\ndef select_tables():\n if not session.get('file'):\n return redirect(url_for('views.index'))\n context = {}\n if request.method == 'POST' and not request.form:\n valid = False\n context['errors'] = ['Select at least on table to join to your spreadsheet']\n return render_template('select_tables.html', **context)", "metadata": "root.select_tables", "header": "['module', '___EOS___']", "index": 169 } ]
[ { "span": "valid ", "start_line": 175, "start_column": 8, "end_line": 175, "end_column": 13 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "views_", "._", "route_", "(_", "'/", "select", "-", "tables", "/'_", ",_", "methods_", "=_", "[_", "'", "POST", "'_", ",_", "'", "GET", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "select", "\\u", "tables_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "not_", "session_", "._", "get_", "(_", "'", "file", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "redirect_", "(_", "url", "\\u", "for_", "(_", "'", "views", ".", "index", "'_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "context_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "request_", "._", "method_", "==_", "'", "POST", "'_", "and_", "not_", "request_", "._", "form_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "valid_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "context_", "[_", "'", "error", "s", "'_", "]_", "=_", "[_", "'", "Select", " ", "at", " ", "leas", "t", " ", "on", " ", "table", " ", "to", " ", "join", " ", "to", " ", "your", " ", "spreadsheet", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "render", "\\u", "template_", "(_", "'", "select", "\\u", "tables", ".", "html", "'_", ",_", "**_", "context_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
dpgaspar/Flask-AppBuilder/examples/quickhowto2/app/models.py
[ { "content": "from flask import Markup\nimport datetime\nimport math\nfrom sqlalchemy import Column, Integer, String, ForeignKey, Date, Float, Numeric\nfrom sqlalchemy.orm import relationship\nfrom flask_appbuilder.models.mixins import AuditMixin, BaseMixin, FileColumn, ImageColumn\nfrom flask_appbuilder import Model\nfrom flask_appbuilder.models.decorators import renders\n\nmindate = datetime.date(datetime.MINYEAR, 1, 1)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class ContactGroup(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(50), unique=True, nullable=False)\n\n\n\n", "metadata": "root.ContactGroup", "header": "['module', '___EOS___']", "index": 11 }, { "content": " def extra_col(self):\n return \"EXTRA {0}\".format(self.id)", "metadata": "root.ContactGroup.extra_col", "header": "['class', 'ContactGroup', '(', 'Model', ')', ':', '___EOS___']", "index": 15 }, { "content": " @renders('name')\n def extra_col2(self):\n return Markup(\"<h2>\" + self.name + \"</h2>\")", "metadata": "root.ContactGroup.extra_col2", "header": "['class', 'ContactGroup', '(', 'Model', ')', ':', '___EOS___']", "index": 18 }, { "content": " def __repr__(self):\n return self.name", "metadata": "root.ContactGroup.__repr__", "header": "['class', 'ContactGroup', '(', 'Model', ')', ':', '___EOS___']", "index": 23 }, { "content": "class ProductManufacturer(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(50), unique = True, nullable=False)\n", "metadata": "root.ProductManufacturer", "header": "['module', '___EOS___']", "index": 27 }, { "content": " def __repr__(self):\n return self.name", "metadata": "root.ProductManufacturer.__repr__", "header": "['class', 'ProductManufacturer', '(', 'Model', ')', ':', '___EOS___']", "index": 31 }, { "content": "class ProductModel(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(50), unique = True, nullable=False)\n product_manufacturer_id = Column(Integer, ForeignKey('product_manufacturer.id'), nullable=False)\n product_manufacturer = relationship(\"ProductManufacturer\")\n", "metadata": "root.ProductModel", "header": "['module', '___EOS___']", "index": 35 }, { "content": " def __repr__(self):\n return self.name", "metadata": "root.ProductModel.__repr__", "header": "['class', 'ProductModel', '(', 'Model', ')', ':', '___EOS___']", "index": 41 }, { "content": "class Product(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(50), unique = True, nullable=False)\n product_manufacturer_id = Column(Integer, ForeignKey('product_manufacturer.id'), nullable=False)\n product_manufacturer = relationship(\"ProductManufacturer\")\n product_model_id = Column(Integer, ForeignKey('product_model.id'), nullable=False)\n product_model = relationship(\"ProductModel\")\n", "metadata": "root.Product", "header": "['module', '___EOS___']", "index": 45 }, { "content": " def __repr__(self):\n return self.name", "metadata": "root.Product.__repr__", "header": "['class', 'Product', '(', 'Model', ')', ':', '___EOS___']", "index": 53 }, { "content": "class Gender(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(50), unique = True, nullable=False)\n", "metadata": "root.Gender", "header": "['module', '___EOS___']", "index": 57 }, { "content": " def __repr__(self):\n return self.name", "metadata": "root.Gender.__repr__", "header": "['class', 'Gender', '(', 'Model', ')', ':', '___EOS___']", "index": 61 }, { "content": "def test():\n return math.pi - 1.0", "metadata": "root.test", "header": "['module', '___EOS___']", "index": 65 }, { "content": "class FloatModel(Model):\n id = Column(Integer, primary_key=True)\n value = Column(Float, nullable = False, default=test)\n value_numeric = Column(Numeric, nullable = False, default=test)\n\n", "metadata": "root.FloatModel", "header": "['module', '___EOS___']", "index": 69 }, { "content": " def __repr__(self):\n return self.value", "metadata": "root.FloatModel.__repr__", "header": "['class', 'FloatModel', '(', 'Model', ')', ':', '___EOS___']", "index": 75 }, { "content": "class Contact(Model):\n id = Column(Integer, primary_key=True)\n name = Column(String(150), unique = True, nullable=False)\n address = Column(String(564))\n birthday = Column(Date, nullable=True)\n personal_phone = Column(String(20))\n personal_celphone = Column(String(20))\n contact_group_id = Column(Integer, ForeignKey('contact_group.id'), nullable=False)\n contact_group = relationship(\"ContactGroup\")\n gender_id = Column(Integer, ForeignKey('gender.id'), nullable=False)\n gender = relationship(\"Gender\")\n\n\n", "metadata": "root.Contact", "header": "['module', '___EOS___']", "index": 79 }, { "content": " def __repr__(self):\n return \"%s : %s\\n\" % (self.name, self.contact_group)", "metadata": "root.Contact.__repr__", "header": "['class', 'Contact', '(', 'Model', ')', ':', '___EOS___']", "index": 91 }, { "content": " def month_year(self):\n date = self.birthday or mindate\n return datetime.datetime(date.year, date.month, 1) or mindate", "metadata": "root.Contact.month_year", "header": "['class', 'Contact', '(', 'Model', ')', ':', '___EOS___']", "index": 94 }, { "content": " def year(self):\n date = self.birthday or mindate\n return datetime.datetime(date.year, 1, 1)", "metadata": "root.Contact.year", "header": "['class', 'Contact', '(', 'Model', ')', ':', '___EOS___']", "index": 98 } ]
[ { "span": "from flask_appbuilder.models.mixins import AuditMixin, BaseMixin, FileColumn, ImageColumn", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 89 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "flask_", "import_", "Markup_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "math_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "sqlalchemy_", "import_", "Column_", ",_", "Integer_", ",_", "String_", ",_", "Fore", "ign", "Key_", ",_", "Date_", ",_", "Float_", ",_", "Numeric_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "sqlalchemy_", "._", "orm_", "import_", "relationship_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fla", "sk", "\\u", "app", "builder_", "._", "models_", "._", "mixins_", "import_", "Audi", "t", "Mixin_", ",_", "Base", "Mixin_", ",_", "File", "Column_", ",_", "Image", "Column_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fla", "sk", "\\u", "app", "builder_", "import_", "Model_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fla", "sk", "\\u", "app", "builder_", "._", "models_", "._", "decorators_", "import_", "render", "s_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "mind", "ate_", "=_", "datetime_", "._", "date_", "(_", "datetime_", "._", "MIN", "YEAR_", ",_", "1_", ",_", "1_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Conta", "ct", "Group_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "50_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Conta", "ct", "Group_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "extra", "\\u", "col_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\"", "EXTRA", " ", "{", "0", "}\"_", "._", "format_", "(_", "self_", "._", "id_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Conta", "ct", "Group_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "render", "s_", "(_", "'", "name", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "extra", "\\u", "col2_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Markup_", "(_", "\"<", "h2", ">\"_", "+_", "self_", "._", "name_", "+_", "\"<", "/", "h2", ">\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Conta", "ct", "Group_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Product", "Manufacturer", "_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "50_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Product", "Manufacturer", "_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Product", "Model_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "50_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "manufactur", "er", "\\u", "id_", "=_", "Column_", "(_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "product", "\\u", "manufactur", "er", ".", "id", "'_", ")_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "manufacturer_", "=_", "relationship_", "(_", "\"", "Product", "Manufacturer", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Product", "Model_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Product_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "50_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "manufactur", "er", "\\u", "id_", "=_", "Column_", "(_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "product", "\\u", "manufactur", "er", ".", "id", "'_", ")_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "manufacturer_", "=_", "relationship_", "(_", "\"", "Product", "Manufacturer", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "model", "\\u", "id_", "=_", "Column_", "(_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "product", "\\u", "model", ".", "id", "'_", ")_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "product", "\\u", "model_", "=_", "relationship_", "(_", "\"", "Product", "Model", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Product_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Gen", "der_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "50_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Gen", "der_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "math_", "._", "pi_", "-_", "1.0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Float", "Model_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "value_", "=_", "Column_", "(_", "Float_", ",_", "nullable_", "=_", "False_", ",_", "default_", "=_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "value", "\\u", "numeric_", "=_", "Column_", "(_", "Numeric_", ",_", "nullable_", "=_", "False_", ",_", "default_", "=_", "test_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Float", "Model_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "value_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Contact_", "(_", "Model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "id_", "=_", "Column_", "(_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "name_", "=_", "Column_", "(_", "String_", "(_", "150_", ")_", ",_", "unique_", "=_", "True_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "address_", "=_", "Column_", "(_", "String_", "(_", "564", "_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "birthday", "_", "=_", "Column_", "(_", "Date_", ",_", "nullable_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "persona", "l\\u", "phone_", "=_", "Column_", "(_", "String_", "(_", "20_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "persona", "l\\u", "cel", "phone_", "=_", "Column_", "(_", "String_", "(_", "20_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "contact", "\\u", "group", "\\u", "id_", "=_", "Column_", "(_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "contact", "\\u", "group", ".", "id", "'_", ")_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "contact", "\\u", "group_", "=_", "relationship_", "(_", "\"", "Conta", "ct", "Group", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gender", "\\u", "id_", "=_", "Column_", "(_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "gender", ".", "id", "'_", ")_", ",_", "nullable_", "=_", "False_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "gender_", "=_", "relationship_", "(_", "\"", "Gen", "der", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Contact_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "repr\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "\"%", "s", " ", ":", " ", "%", "s", "\\\\", "n", "\"_", "%_", "(_", "self_", "._", "name_", ",_", "self_", "._", "contact", "\\u", "group_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Contact_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "month", "\\u", "year_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "date_", "=_", "self_", "._", "birthday", "_", "or_", "mind", "ate_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "datetime_", "._", "datetime_", "(_", "date_", "._", "year_", ",_", "date_", "._", "month_", ",_", "1_", ")_", "or_", "mind", "ate_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Contact_", "(_", "Model_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "year_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "date_", "=_", "self_", "._", "birthday", "_", "or_", "mind", "ate_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "datetime_", "._", "datetime_", "(_", "date_", "._", "year_", ",_", "1_", ",_", "1_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 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 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
openstack/gertty/gertty/requestsexceptions.py
[ { "content": "# Copyright 2015 Hewlett-Packard Development Company, L.P.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\ntry:\n from requests.packages.urllib3.exceptions import InsecurePlatformWarning\nexcept ImportError:\n try:\n from urllib3.exceptions import InsecurePlatformWarning\n except ImportError:\n InsecurePlatformWarning = None\n\ntry:\n from requests.packages.urllib3.exceptions import InsecureRequestWarning\nexcept ImportError:\n try:\n from urllib3.exceptions import InsecureRequestWarning\n except ImportError:\n InsecureRequestWarning = None\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from requests.packages.urllib3.exceptions import InsecurePlatformWarning", "start_line": 15, "start_column": 4, "end_line": 15, "end_column": 76 }, { "span": "from urllib3.exceptions import InsecurePlatformWarning", "start_line": 18, "start_column": 8, "end_line": 18, "end_column": 62 }, { "span": "from requests.packages.urllib3.exceptions import InsecureRequestWarning", "start_line": 23, "start_column": 4, "end_line": 23, "end_column": 75 }, { "span": "from urllib3.exceptions import InsecureRequestWarning", "start_line": 26, "start_column": 8, "end_line": 26, "end_column": 61 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "201", "5", " ", "He", "wle", "tt", "-", "Packa", "rd", " ", "Dev", "elo", "pme", "nt", " ", "Compa", "ny", ",", " ", "L", ".", "P", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "License", "d", " ", "under", " ", "the", " ", "Ap", "ache", " ", "License", ",", " ", "Version", " ", "2.0", " ", "(", "the", " ", "\"", "License", "\");", " ", "you", " ", "may", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "not", " ", "use", " ", "this", " ", "file", " ", "except", " ", "in", " ", "compli", "anc", "e", " ", "with", " ", "the", " ", "License", ".", " ", "You", " ", "may", " ", "obtain", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "a", " ", "copy", " ", "of", " ", "the", " ", "License", " ", "at_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "http", "://", "www", ".", "apa", "che", ".", "org", "/", "license", "s", "/", "LICENSE", "-", "2.0_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Un", "less", " ", "require", "d", " ", "by", " ", "applica", "ble", " ", "law", " ", "or", " ", "agree", "d", " ", "to", " ", "in", " ", "writ", "ing", ",", " ", "software", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "distributed", " ", "under", " ", "the", " ", "License", " ", "is", " ", "distributed", " ", "on", " ", "an", " ", "\"", "AS", " ", "IS", "\"", " ", "BAS", "IS", ",", " ", "WITH", "OUT_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "WAR", "RAN", "TIES", " ", "OR", " ", "CONDITION", "S", " ", "OF", " ", "ANY", " ", "KIND", ",", " ", "eit", "her", " ", "express", " ", "or", " ", "impli", "ed", ".", " ", "See", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "License", " ", "for", " ", "the", " ", "specific", " ", "language", " ", "govern", "ing", " ", "permissi", "ons", " ", "and", " ", "limit", "ations_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "under", " ", "the", " ", "License", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "requests_", "._", "packages_", "._", "urllib3_", "._", "exceptions_", "import_", "Inse", "cure", "Plat", "form", "Warning_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "urllib3_", "._", "exceptions_", "import_", "Inse", "cure", "Plat", "form", "Warning_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Inse", "cure", "Plat", "form", "Warning_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "requests_", "._", "packages_", "._", "urllib3_", "._", "exceptions_", "import_", "Inse", "cure", "Request", "Warning_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "urllib3_", "._", "exceptions_", "import_", "Inse", "cure", "Request", "Warning_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Import", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Inse", "cure", "Request", "Warning_", "=_", "None_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_" ]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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused local variable
sensepost/Snoopy/snoopy/server/transforms/fetchClientsFromDomain.py
[ { "content": "def main():\n\n print \"Content-type: xml\\n\\n\";\n MaltegoXML_in = sys.stdin.read()\n if MaltegoXML_in <> '':\n \t#logging.debug(MaltegoXML_in)\n m = MaltegoMsg(MaltegoXML_in)\n \n\tcursor=stawk_db.dbconnect()\n TRX = MaltegoTransform()\n\n\tdrone='%'\n\tnow=datetime.datetime.now()\n if 'start_time' in m.AdditionalFields and 'end_time' in m.AdditionalFields :\n start_time=m.AdditionalFields['start_time']\n end_time=m.AdditionalFields['end_time']\n else: \n start_time=now+datetime.timedelta(seconds=-lookback)\n end_time=now+datetime.timedelta(seconds=lookback)\n\n # Maltego requires format e.g 2012-10-23 22:37:12.0\n now=now.strftime(\"%Y-%m-%d %H:%M:%S.0\")\n start_time=start_time.strftime(\"%Y-%m-%d %H:%M:%S.0\")\n end_time=end_time.strftime(\"%Y-%m-%d %H:%M:%S.0\")\n\n\n if 'location' in m.AdditionalFields: \n\t\tlocation=m.AdditionalFields['location']\n\telse: \n location=\"%\"\t\n\n\tif 'properties.drone' in m.AdditionalFields:\n\t\tdrone=m.AdditionalFields['properties.drone']\n\n\tdomain='None'\n\tif 'domain' in m.AdditionalFields:\n\t\tdomain=m.AdditionalFields['domain']\n\n\n\tcursor.execute(\"SELECT DISTINCT client_ip,hostname,dhcp_leases.mac,vendor_short,ua FROM dhcp_leases,squid_logs,mac_vendor WHERE squid_logs.client_ip=dhcp_leases.ip AND dhcp_leases.mac_prefix=mac_vendor.mac AND domain = %s\",(domain))\n\tresults=cursor.fetchall()\n\n\tfor row in results:\n\n\t\ttry:\n\t\t\tclient_ip=row[0]\n\t\t\thostname=row[1].encode('utf8','xmlcharrefreplace')\n\t\t\tmac=row[2]\n\t\t\tvendor=row[3].encode('utf8','xmlcharrefreplace')\n\t\t\tuseragent=row[4].encode('utf8','xmlcharrefreplace')\n\t\texcept Exception,e:\n\t\t\tlogging.debug(e)\n\n \tNewEnt=TRX.addEntity(\"snoopy.Client\", \"%s (%s)\"%(vendor,hostname))\n\t\tNewEnt.addAdditionalFields(\"hostname\",\"hostname\",\"strict\",hostname)\n\t\tNewEnt.addAdditionalFields(\"mac\",\"mac\",\"strict\",mac)\n\t\tNewEnt.addAdditionalFields(\"vendor\",\"vendor\",\"strict\",vendor)\n#\t\tNewEnt.addAdditionalFields(\"useragent\",\"useragent\",\"strict\",useragent)\t#Some devices have multiple UAs\n\t\tNewEnt.addAdditionalFields(\"from_web\",\"from_web\",\"strict\",\"True\")\n NewEnt.addAdditionalFields(\"from_probes\",\"from_probes\",\"strict\",\"True\")\n\n\t\t#NewEnt.addAdditionalFields(\"drone\",\"drone\",\"strict\",drone)\n #NewEnt.addAdditionalFields(\"start_time\", \"start_time\", \"nostrict\",start)\n #NewEnt.addAdditionalFields(\"end_time\",\"end_time\", \"nostrict\",end)\n #NewEnt.addAdditionalFields(\"location\",\"location\",\"strict\",location)\n\t\t#NewEnt.addAdditionalFields(\"run_id\",\"run_id\",\"strict\",run_id)\n\n\n TRX.returnOutput()", "metadata": "root.main", "header": "['module', '___EOS___']", "index": 18 } ]
[ { "span": "start_time=", "start_line": 32, "start_column": 16, "end_line": 32, "end_column": 26 }, { "span": "end_time=", "start_line": 33, "start_column": 16, "end_line": 33, "end_column": 24 }, { "span": "now=", "start_line": 39, "start_column": 16, "end_line": 39, "end_column": 19 }, { "span": "start_time=", "start_line": 40, "start_column": 16, "end_line": 40, "end_column": 26 }, { "span": "end_time=", "start_line": 41, "start_column": 16, "end_line": 41, "end_column": 24 }, { "span": "location=", "start_line": 45, "start_column": 2, "end_line": 45, "end_column": 10 }, { "span": "location=", "start_line": 47, "start_column": 16, "end_line": 47, "end_column": 24 }, { "span": "drone=", "start_line": 50, "start_column": 2, "end_line": 50, "end_column": 7 }, { "span": "client_ip=", "start_line": 63, "start_column": 3, "end_line": 63, "end_column": 12 }, { "span": "useragent=", "start_line": 67, "start_column": 3, "end_line": 67, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "main_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "\"", "Conten", "t", "-", "type", ":", " ", "xml", "\\\\", "n", "\\\\", "n", "\"_", ";_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Mal", "teg", "o", "XML", "\\u", "in_", "=_", "sys_", "._", "stdin_", "._", "read_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "Mal", "teg", "o", "XML", "\\u", "in_", "<_", ">_", "''_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "logg", "ing", ".", "debug", "(", "Mal", "teg", "o", "XML", "\\u", "in", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "Mal", "teg", "o", "Msg_", "(_", "Mal", "teg", "o", "XML", "\\u", "in_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "cursor_", "=_", "sta", "wk", "\\u", "db_", "._", "dbconn", "ect_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "TR", "X_", "=_", "Mal", "teg", "o", "Transform_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "drone", "_", "=_", "'%'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "now_", "=_", "datetime_", "._", "datetime_", "._", "now_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "'", "start", "\\u", "time", "'_", "in_", "m_", "._", "Addition", "al", "Fields_", "and_", "'", "end", "\\u", "time", "'_", "in_", "m_", "._", "Addition", "al", "Fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "start", "\\u", "time_", "=_", "m_", "._", "Addition", "al", "Fields_", "[_", "'", "start", "\\u", "time", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "end", "\\u", "time_", "=_", "m_", "._", "Addition", "al", "Fields_", "[_", "'", "end", "\\u", "time", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "start", "\\u", "time_", "=_", "now_", "+_", "datetime_", "._", "timedelta_", "(_", "seconds_", "=_", "-_", "look", "back_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "end", "\\u", "time_", "=_", "now_", "+_", "datetime_", "._", "timedelta_", "(_", "seconds_", "=_", "look", "back_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Mal", "teg", "o", " ", "require", "s", " ", "format", " ", "e", ".", "g", " ", "2012", "-1", "0", "-", "23", " ", "2", "2", ":", "3", "7", ":", "12.0_", "\\u\\u\\uNL\\u\\u\\u_", "now_", "=_", "now_", "._", "strftime_", "(_", "\"%", "Y", "-%", "m", "-%", "d", " ", "%", "H", ":", "%", "M", ":", "%", "S", ".0", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "start", "\\u", "time_", "=_", "start", "\\u", "time_", "._", "strftime_", "(_", "\"%", "Y", "-%", "m", "-%", "d", " ", "%", "H", ":", "%", "M", ":", "%", "S", ".0", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "end", "\\u", "time_", "=_", "end", "\\u", "time_", "._", "strftime_", "(_", "\"%", "Y", "-%", "m", "-%", "d", " ", "%", "H", ":", "%", "M", ":", "%", "S", ".0", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "'", "location", "'_", "in_", "m_", "._", "Addition", "al", "Fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "location_", "=_", "m_", "._", "Addition", "al", "Fields_", "[_", "'", "location", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "location_", "=_", "\"%\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "'", "proper", "ties", ".", "drone", "'_", "in_", "m_", "._", "Addition", "al", "Fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "drone", "_", "=_", "m_", "._", "Addition", "al", "Fields_", "[_", "'", "proper", "ties", ".", "drone", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "domain_", "=_", "'", "Non", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "'", "domain", "'_", "in_", "m_", "._", "Addition", "al", "Fields_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "domain_", "=_", "m_", "._", "Addition", "al", "Fields_", "[_", "'", "domain", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "cursor_", "._", "execute_", "(_", "\"", "SELECT", " ", "DIST", "INC", "T", " ", "client", "\\u", "ip", ",", "host", "name", ",", "dhcp", "\\u", "lease", "s", ".", "mac", ",", "vendor", "\\u", "short", ",", "ua", " ", "FROM", " ", "dhcp", "\\u", "lease", "s", ",", "squi", "d\\u", "logs", ",", "mac", "\\u", "vendor", " ", "WHE", "RE", " ", "squi", "d\\u", "logs", ".", "client", "\\u", "ip", "=", "dhcp", "\\u", "lease", "s", ".", "ip", " ", "AND", " ", "dhcp", "\\u", "lease", "s", ".", "mac", "\\u", "prefix", "=", "mac", "\\u", "vendor", ".", "mac", " ", "AND", " ", "domain", " ", "=", " ", "%", "s", "\"_", ",_", "(_", "domain_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "results_", "=_", "cursor_", "._", "fetchall_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "row_", "in_", "results_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "client", "\\u", "ip_", "=_", "row_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "hostname_", "=_", "row_", "[_", "1_", "]_", "._", "encode_", "(_", "'", "utf", "8", "'_", ",_", "'", "xml", "char", "refre", "place", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "mac_", "=_", "row_", "[_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "vendor_", "=_", "row_", "[_", "3_", "]_", "._", "encode_", "(_", "'", "utf", "8", "'_", ",_", "'", "xml", "char", "refre", "place", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "usera", "gent", "_", "=_", "row_", "[_", "4_", "]_", "._", "encode_", "(_", "'", "utf", "8", "'_", ",_", "'", "xml", "char", "refre", "place", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", ",_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "\t\t_", "logging_", "._", "debug_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "New", "Ent", "_", "=_", "TR", "X_", "._", "add", "Entity_", "(_", "\"", "sno", "opy", ".", "Client", "\"_", ",_", "\"%", "s", " ", "(%", "s", ")\"_", "%_", "(_", "vendor_", ",_", "hostname_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "New", "Ent", "_", "._", "add", "Addition", "al", "Fields_", "(_", "\"", "host", "name", "\"_", ",_", "\"", "host", "name", "\"_", ",_", "\"", "strict", "\"_", ",_", "hostname_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "New", "Ent", "_", "._", "add", "Addition", "al", "Fields_", "(_", "\"", "mac", "\"_", ",_", "\"", "mac", "\"_", ",_", "\"", "strict", "\"_", ",_", "mac_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "New", "Ent", "_", "._", "add", "Addition", "al", "Fields_", "(_", "\"", "vendor", "\"_", ",_", "\"", "vendor", "\"_", ",_", "\"", "strict", "\"_", ",_", "vendor_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", "\t", "\t", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "usera", "gent", "\",\"", "usera", "gent", "\",\"", "strict", "\",", "usera", "gent", ")", "\t", "#", "Some", " ", "device", "s", " ", "have", " ", "multiple", " ", "UA", "s_", "\\u\\u\\uNL\\u\\u\\u_", "New", "Ent", "_", "._", "add", "Addition", "al", "Fields_", "(_", "\"", "from", "\\u", "web", "\"_", ",_", "\"", "from", "\\u", "web", "\"_", ",_", "\"", "strict", "\"_", ",_", "\"", "Tru", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "New", "Ent", "_", "._", "add", "Addition", "al", "Fields_", "(_", "\"", "from", "\\u", "probes", "\"_", ",_", "\"", "from", "\\u", "probes", "\"_", ",_", "\"", "strict", "\"_", ",_", "\"", "Tru", "e", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "drone", "\",\"", "drone", "\",\"", "strict", "\",", "drone", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "start", "\\u", "time", "\",", " ", "\"", "start", "\\u", "time", "\",", " ", "\"", "nost", "ric", "t", "\",", "start", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "end", "\\u", "time", "\",\"", "end", "\\u", "time", "\",", " ", "\"", "nost", "ric", "t", "\",", "end", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "location", "\",\"", "location", "\",\"", "strict", "\",", "location", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "New", "Ent", ".", "add", "Addition", "al", "Field", "s", "(\"", "run", "\\u", "id", "\",\"", "run", "\\u", "id", "\",\"", "strict", "\",", "run", "\\u", "id", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "TR", "X_", "._", "return", "Output_", "(_", ")_", "\\u\\u\\uNEWLINE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sunlightlabs/read_FEC/fecreader/summary_data/management/commands/remove_blacklisted.py
[ { "content": "# Remove problematic entities.\n\nfrom django.core.management.base import BaseCommand, CommandError\n\n\nfrom summary_data.models import Committee_Overlay, Candidate_Overlay, Committee_Time_Summary, Authorized_Candidate_Committees\nfrom fec_alerts.models import WebK, new_filing\n\nblacklisted_committees = ['C00507947', 'C00428599']\nblacklisted_candidates = ['P20003851', 'P80003205']\n\n ", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Command(BaseCommand):\n help = \"Set \"\n requires_model_validation = False\n ", "metadata": "root.Command", "header": "['module', '___EOS___']", "index": 11 }, { "content": " def handle(self, *args, **options):\n for fecid in blacklisted_committees:\n Committee_Overlay.objects.filter(fec_id=fecid).delete()\n Committee_Time_Summary.objects.filter(com_id=fecid).delete()\n Authorized_Candidate_Committees.objects.filter(committee_id=fecid).delete()\n WebK.objects.filter(com_id=fecid).delete()\n new_filing.objects.filter(fec_id=fecid).delete()\n \n for fecid in blacklisted_candidates:\n Candidate_Overlay.objects.filter(fec_id=fecid).delete()\n Authorized_Candidate_Committees.objects.filter(candidate_id=fecid).delete()", "metadata": "root.Command.handle", "header": "['class', 'Command', '(', 'BaseCommand', ')', ':', '___EOS___']", "index": 15 } ]
[ { "span": "from django.core.management.base import BaseCommand, CommandError", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 65 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Remove", " ", "problem", "atic", " ", "entit", "ies", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "django_", "._", "core_", "._", "management_", "._", "base_", "import_", "Base", "Command_", ",_", "Command", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "summar", "y", "\\u", "data_", "._", "models_", "import_", "Committe", "e\\u", "Overla", "y_", ",_", "Candidate", "\\u", "Overla", "y_", ",_", "Committe", "e\\u", "Time", "\\u", "Summary_", ",_", "Authorized", "\\u", "Candidate", "\\u", "Committe", "es_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "fec", "\\u", "alerts_", "._", "models_", "import_", "Web", "K_", ",_", "new", "\\u", "filing", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "blacklisted", "\\u", "committee", "s_", "=_", "[_", "'", "C0", "050", "794", "7", "'_", ",_", "'", "C0", "042", "859", "9", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "blacklisted", "\\u", "candidates_", "=_", "[_", "'", "P2", "0003", "851", "'_", ",_", "'", "P", "800", "032", "05", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Command_", "(_", "Base", "Command_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "help_", "=_", "\"", "Set", " ", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "require", "s", "\\u", "model", "\\u", "validation_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Command_", "(_", "Base", "Command_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "handle_", "(_", "self_", ",_", "*_", "args_", ",_", "**_", "options_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "fec", "id_", "in_", "blacklisted", "\\u", "committee", "s_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Committe", "e\\u", "Overla", "y_", "._", "objects_", "._", "filter_", "(_", "fec", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Committe", "e\\u", "Time", "\\u", "Summary_", "._", "objects_", "._", "filter_", "(_", "com", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Authorized", "\\u", "Candidate", "\\u", "Committe", "es_", "._", "objects_", "._", "filter_", "(_", "committee", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Web", "K_", "._", "objects_", "._", "filter_", "(_", "com", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "filing", "_", "._", "objects_", "._", "filter_", "(_", "fec", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "fec", "id_", "in_", "blacklisted", "\\u", "candidates_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Candidate", "\\u", "Overla", "y_", "._", "objects_", "._", "filter_", "(_", "fec", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Authorized", "\\u", "Candidate", "\\u", "Committe", "es_", "._", "objects_", "._", "filter_", "(_", "candidate", "\\u", "id_", "=_", "fec", "id_", ")_", "._", "delete_", "(_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2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 2, 2, 2, 2, 2 ]
Unused import
bezi/gitorial/gitorial/views.py
[ { "content": "from django.core import serializers\nfrom django.shortcuts import render, render_to_response, redirect\nfrom django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseForbidden,HttpResponseNotModified, HttpResponseNotFound, JsonResponse\nfrom django.template import RequestContext\nfrom gitorial.models import User, Tutorial, Step\nimport django.contrib.auth\nimport social.apps.django_app.views\nimport json\nimport requests\nfrom config import settings\nfrom datetime import datetime, timedelta\n\nfrom . import diff\n\n# Create your views here.\n\n\n\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def index(request):\n return render_to_response('index.html', {},\n context_instance=RequestContext(request))", "metadata": "root.index", "header": "['module', '___EOS___']", "index": 15 }, { "content": "def logout(request):\n django.contrib.auth.logout(request)\n return redirect('/')", "metadata": "root.logout", "header": "['module', '___EOS___']", "index": 19 }, { "content": "def callback(request):\n if(request.user is not None and\n request.user.is_authenticated()):\n return redirect('/#/' + request.user.username)\n else:\n return redirect('/')\n return", "metadata": "root.callback", "header": "['module', '___EOS___']", "index": 23 }, { "content": "def session(request):\n if request.method == 'GET':\n if(request.user is not None and\n request.user.is_authenticated()):\n username = request.user.username\n else:\n username = ''\n\n return HttpResponse(json.dumps({\n 'username': username\n }),\n content_type=\"application/json\")\n\n else:\n return HttpResponseNotAllowed(['GET'])", "metadata": "root.session", "header": "['module', '___EOS___']", "index": 31 }, { "content": "def user_view(request, username):\n if request.method == 'POST':\n user, is_new = User.objects.get_or_create(username=username)\n\n if is_new:\n api_r = requests.get('https://api.github.com/users/%s?client_id=%s&client_secret=%s' % (username, settings.SOCIAL_AUTH_GITHUB_KEY, settings.SOCIAL_AUTH_GITHUB_SECRET))\n\n # Log how many requests are remaining\n print(api_r.headers['X-RateLimit-Remaining'])\n\n response_json = api_r.json()\n\n try:\n user.name = response_json['name']\n except:\n pass\n user.avatar_url = response_json['avatar_url']\n user.last_modified = datetime.now()\n user.save()\n\n return HttpResponse(status=201)\n else:\n return HttpResponseForbidden()\n\n elif request.method =='GET':\n try:\n user = User.objects.get(username=username)\n result = user.getDict()\n\n if request.user.username == username:\n repo_r = requests.get('https://api.github.com/users/%s/repos?client_id=%s&client_secret=%s&sort=pushed' % (username, settings.SOCIAL_AUTH_GITHUB_KEY, settings.SOCIAL_AUTH_GITHUB_SECRET))\n repo_r_json = repo_r.json()\n\n result['repos'] = [{\n 'title': repo['name'],\n 'description': repo['description']\n } for repo in repo_r_json]\n\n result['tutorials'] = [{\n 'id': tutorial.id,\n 'title': tutorial.title,\n 'description': tutorial.description,\n 'repo_url': tutorial.repo_url\n } for tutorial in Tutorial.objects.filter(owner=user)]\n\n return HttpResponse(json.dumps(result),\n content_type=\"application/json\")\n except Exception as e:\n print(e)\n return HttpResponseNotFound()\n\n elif request.method == 'DELETE':\n try:\n User.objects.get(username=username).delete()\n return HttpResponse()\n except Exception as e:\n print(e)\n return HttpResponseNotFound()\n\n elif request.method == 'PATCH':\n try:\n user = User.objects.get(username=username)\n\n if (datetime.now() - user.last_modified) > timedelta(hours=1):\n api_r = requests.get('https://api.github.com/users/%s?client_id=%s&client_secret=%s' % (username, settings.SOCIAL_AUTH_GITHUB_KEY, settings.SOCIAL_AUTH_GITHUB_SECRET))\n\n # Log how many requests are remaining\n print(api_r.headers['X-RateLimit-Remaining'])\n\n response_json = api_r.json()\n\n try:\n user.name = response_json['name']\n except:\n pass\n user.avatar_url = response_json['avatar_url']\n user.last_modified = datetime.now()\n user.save()\n\n return HttpResponse()\n else:\n return HttpResponseNotModified()\n except Exception as e:\n print(e)\n return HttpResponseNotFound()\n\n else:\n return HttpResponseNotAllowed(['POST', 'GET', 'DELETE'])", "metadata": "root.user_view", "header": "['module', '___EOS___']", "index": 47 }, { "content": "def build_tutorials(user):\n user_tutorials = Tutorial.objects.filter(owner=user).values('title', 'description', 'repo_url').order_by('id').reverse()\n return [{'title': item['title'],\n 'description': item['description'],\n 'url': item['repo_url']}\n for item in user_tutorials]", "metadata": "root.build_tutorials", "header": "['module', '___EOS___']", "index": 136 }, { "content": "def build_steps(username, repo_name, tutorial, commits_data):\n index = 0\n for commit_data in commits_data:\n index += 1\n step, is_new = Step.objects.get_or_create(index=index, tutorial=tutorial)\n if is_new:\n step.title = commit_data['title']\n step.content_before = commit_data['message']\n step.content_after = ''\n\n step.diff_url = commit_data['diff_url']\n step.code_url = commit_data['code_url']\n\n api_r = requests.get(\n 'https://api.github.com/repos/%s/%s/commits/%s?client_id=%s&client_secret=%s' % (\n username,\n repo_name,\n commit_data['sha'],\n settings.SOCIAL_AUTH_GITHUB_KEY,\n settings.SOCIAL_AUTH_GITHUB_SECRET\n ), headers={'Accept': 'application/vnd.github.diff'})\n\n step.files = json.dumps(diff.parse(api_r.text))\n\n step.save()", "metadata": "root.build_steps", "header": "['module', '___EOS___']", "index": 143 }, { "content": "def tutorial_new(request, username, repo):\n if request.method == 'POST':\n user = User.objects.get(username=username)\n\n repo_r_json = requests.get(\n 'https://api.github.com/repos/%s/%s?client_id=%s&client_secret=%s' % (\n username,\n repo,\n settings.SOCIAL_AUTH_GITHUB_KEY,\n settings.SOCIAL_AUTH_GITHUB_SECRET)\n ).json()\n\n tut_entry, is_new = Tutorial.objects.get_or_create(id=repo_r_json['id'], owner = user)\n\n tut_entry.title = repo_r_json['name']\n tut_entry.description = repo_r_json['description']\n\n tut_entry.repo_name = repo_r_json['name']\n tut_entry.repo_url = repo_r_json['url']\n\n tut_entry.owner = user\n tut_entry.save()\n\n # Get all commits, most recent first\n commits_r_json = requests.get(\n repo_r_json['commits_url'].replace('{/sha}', '') +\n ('?client_id=%s&client_secret=%s' % (\n settings.SOCIAL_AUTH_GITHUB_KEY,\n settings.SOCIAL_AUTH_GITHUB_SECRET))\n ).json()\n\n commits_data = []\n for commit in commits_r_json:\n (title_raw, _, message_raw) = commit['commit']['message'].partition('\\n')\n\n commits_data.insert(0, {\n 'sha': commit['sha'],\n 'title': title_raw[:50],\n 'message': message_raw,\n 'diff_url': commit['html_url'],\n 'code_url': 'https://github.com/%s/%s/tree/%s' % (username, repo, commit['sha'])\n })\n\n build_steps(username, repo, tut_entry, commits_data)\n\n return JsonResponse({'tutorial_id': tut_entry.id}) \n else:\n return HttpResponseNotAllowed(['POST'])", "metadata": "root.tutorial_new", "header": "['module', '___EOS___']", "index": 169 }, { "content": "def tutorial(request, username, tutnum):\n if request.method == 'GET':\n # tut is an ID (number)\n tut_entry = Tutorial.objects.get(id=tutnum)\n\n response = {\n 'id': tutnum,\n 'title': tut_entry.title,\n 'description': tut_entry.description,\n 'repo_name': tut_entry.repo_name,\n 'repo_url': tut_entry.repo_url,\n 'steps': [{\n 'title': step.title,\n 'content_before': step.content_before,\n 'content_after': step.content_after,\n 'diff_url': step.diff_url,\n 'code_url': step.code_url,\n 'files': json.loads(step.files)\n } for step in Step.objects.filter(tutorial=tutnum).order_by('index')]\n }\n\n return JsonResponse(response)\n elif request.method == 'DELETE':\n # tut is an ID (number)\n Tutorial.objects.get(id=tutnum).delete()\n return HttpResponse()\n elif request.method == 'PATCH':\n patch = json.loads(request.body)\n try:\n tut_entry = Tutorial.objects.get(id=tutnum)\n\n tut_entry.title = patch['title']\n tut_entry.description = patch['description']\n tut_entry.save()\n\n index = 0\n for step_json in patch['steps']:\n index += 1\n step = Step.objects.get(tutorial=tut_entry, index=index)\n\n step.title = patch[index - 1]['title']\n step.content_before = patch[index - 1]['content_before']\n step.content_after = patch[index - 1]['content_after']\n step.save()\n except Tutorial.DoesNotExist:\n return HttpResponseNotFound()\n else:\n return HttpResponseNotAllowed(['POST','GET','DELETE','PATCH'])", "metadata": "root.tutorial", "header": "['module', '___EOS___']", "index": 218 } ]
[ { "span": "from django.core import serializers", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 35 }, { "span": "from django.shortcuts import render, render_to_response, redirect", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 65 }, { "span": "import social.apps.django_app.views", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 35 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "core_", "import_", "serializers_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "shortcuts_", "import_", "render_", ",_", "render", "\\u", "to", "\\u", "response_", ",_", "redirect_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "http_", "import_", "Http", "Response_", ",_", "Http", "Respons", "e", "Not", "Allowed_", ",_", "Http", "Respons", "e", "Forbidden_", ",_", "Http", "Respons", "e", "Not", "Modified_", ",_", "Http", "Respons", "e", "Not", "Found_", ",_", "Js", "on", "Response_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "template_", "import_", "Request", "Context_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "git", "oria", "l_", "._", "models_", "import_", "User_", ",_", "Tu", "tori", "al_", ",_", "Step_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "django_", "._", "contrib_", "._", "auth_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "social", "_", "._", "apps_", "._", "django", "\\u", "app_", "._", "views_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "requests_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "config_", "import_", "settings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", ",_", "timedelta_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "._", "import_", "diff_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Creat", "e", " ", "your", " ", "views", " ", "here", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "index_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "render", "\\u", "to", "\\u", "response_", "(_", "'", "index", ".", "html", "'_", ",_", "{_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "context", "\\u", "instance_", "=_", "Request", "Context_", "(_", "request_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "logout_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "django_", "._", "contrib_", "._", "auth_", "._", "logout_", "(_", "request_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "redirect_", "(_", "'/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "callback_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "(_", "request_", "._", "user_", "is_", "not_", "None_", "and_", "\\u\\u\\uNL\\u\\u\\u_", "request_", "._", "user_", "._", "is", "\\u", "authenticated_", "(_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "redirect_", "(_", "'/", "#", "/'_", "+_", "request_", "._", "user_", "._", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "redirect_", "(_", "'/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "session_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "request_", "._", "method_", "==_", "'", "GET", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "(_", "request_", "._", "user_", "is_", "not_", "None_", "and_", "\\u\\u\\uNL\\u\\u\\u_", "request_", "._", "user_", "._", "is", "\\u", "authenticated_", "(_", ")_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "username_", "=_", "request_", "._", "user_", "._", "username_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "username_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "Http", "Response_", "(_", "json_", "._", "dumps_", "(_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "user", "name", "'_", ":_", "username_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "content", "\\u", "type_", "=_", "\"", "applica", "tion", "/", "json", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Allowed_", "(_", "[_", "'", "GET", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "user", "\\u", "view_", "(_", "request_", ",_", "username_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "request_", "._", "method_", "==_", "'", "POST", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", ",_", "is", "\\u", "new_", "=_", "User_", "._", "objects_", "._", "get", "\\u", "or", "\\u", "create_", "(_", "username_", "=_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "is", "\\u", "new_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "\\u", "r_", "=_", "requests_", "._", "get_", "(_", "'", "https", "://", "api", ".", "git", "hub", ".", "com", "/", "users", "/", "%", "s", "?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "'_", "%_", "(_", "username_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Log", " ", "how", " ", "many", " ", "request", "s", " ", "are", " ", "remaining_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "(_", "api", "\\u", "r_", "._", "headers_", "[_", "'", "X", "-", "Rat", "e", "Limit", "-", "Rema", "inin", "g", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response", "\\u", "json_", "=_", "api", "\\u", "r_", "._", "json_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "._", "name_", "=_", "response", "\\u", "json_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user_", "._", "avat", "ar", "\\u", "url_", "=_", "response", "\\u", "json_", "[_", "'", "avat", "ar", "\\u", "url", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user_", "._", "last", "\\u", "modified_", "=_", "datetime_", "._", "now_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Http", "Response_", "(_", "status_", "=_", "201_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Forbidden_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "request_", "._", "method_", "==_", "'", "GET", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "User_", "._", "objects_", "._", "get_", "(_", "username_", "=_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "result_", "=_", "user_", "._", "get", "Dict_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "request_", "._", "user_", "._", "username_", "==_", "username_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "repo", "\\u", "r_", "=_", "requests_", "._", "get_", "(_", "'", "https", "://", "api", ".", "git", "hub", ".", "com", "/", "users", "/", "%", "s", "/", "repos", "?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "&", "sort", "=", "pushed", "'_", "%_", "(_", "username_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "repo", "\\u", "r", "\\u", "json_", "=_", "repo", "\\u", "r_", "._", "json_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "result_", "[_", "'", "repos", "'_", "]_", "=_", "[_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "repo_", "[_", "'", "name", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "repo_", "[_", "'", "description", "'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "for_", "repo_", "in_", "repo", "\\u", "r", "\\u", "json_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "result_", "[_", "'", "tutorial", "s", "'_", "]_", "=_", "[_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "tutorial", "_", "._", "id_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "tutorial", "_", "._", "title_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "tutorial", "_", "._", "description_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "repo", "\\u", "url", "'_", ":_", "tutorial", "_", "._", "repo", "\\u", "url_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "for_", "tutorial", "_", "in_", "Tu", "tori", "al_", "._", "objects_", "._", "filter_", "(_", "owner_", "=_", "user_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Http", "Response_", "(_", "json_", "._", "dumps_", "(_", "result_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "content", "\\u", "type_", "=_", "\"", "applica", "tion", "/", "json", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "Http", "Respons", "e", "Not", "Found_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "request_", "._", "method_", "==_", "'", "DELET", "E", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "User_", "._", "objects_", "._", "get_", "(_", "username_", "=_", "username_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "Http", "Response_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "Http", "Respons", "e", "Not", "Found_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "request_", "._", "method_", "==_", "'", "PATCH", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "User_", "._", "objects_", "._", "get_", "(_", "username_", "=_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "(_", "datetime_", "._", "now_", "(_", ")_", "-_", "user_", "._", "last", "\\u", "modified_", ")_", ">_", "timedelta_", "(_", "hours_", "=_", "1_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "api", "\\u", "r_", "=_", "requests_", "._", "get_", "(_", "'", "https", "://", "api", ".", "git", "hub", ".", "com", "/", "users", "/", "%", "s", "?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "'_", "%_", "(_", "username_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Log", " ", "how", " ", "many", " ", "request", "s", " ", "are", " ", "remaining_", "\\u\\u\\uNL\\u\\u\\u_", "print_", "(_", "api", "\\u", "r_", "._", "headers_", "[_", "'", "X", "-", "Rat", "e", "Limit", "-", "Rema", "inin", "g", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response", "\\u", "json_", "=_", "api", "\\u", "r_", "._", "json_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "user_", "._", "name_", "=_", "response", "\\u", "json_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "user_", "._", "avat", "ar", "\\u", "url_", "=_", "response", "\\u", "json_", "[_", "'", "avat", "ar", "\\u", "url", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user_", "._", "last", "\\u", "modified_", "=_", "datetime_", "._", "now_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "user_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Http", "Response_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Modified_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Exception_", "as_", "e_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "(_", "e_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "Http", "Respons", "e", "Not", "Found_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Allowed_", "(_", "[_", "'", "POST", "'_", ",_", "'", "GET", "'_", ",_", "'", "DELET", "E", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "build", "\\u", "tutorial", "s_", "(_", "user_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user", "\\u", "tutorial", "s_", "=_", "Tu", "tori", "al_", "._", "objects_", "._", "filter_", "(_", "owner_", "=_", "user_", ")_", "._", "values_", "(_", "'", "title", "'_", ",_", "'", "description", "'_", ",_", "'", "repo", "\\u", "url", "'_", ")_", "._", "order", "\\u", "by_", "(_", "'", "id", "'_", ")_", "._", "reverse_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "[_", "{_", "'", "title", "'_", ":_", "item_", "[_", "'", "title", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "item_", "[_", "'", "description", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "url", "'_", ":_", "item_", "[_", "'", "repo", "\\u", "url", "'_", "]_", "}_", "\\u\\u\\uNL\\u\\u\\u_", "for_", "item_", "in_", "user", "\\u", "tutorial", "s_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "build", "\\u", "steps_", "(_", "username_", ",_", "repo", "\\u", "name_", ",_", "tutorial", "_", ",_", "commit", "s", "\\u", "data_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "index_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "commit", "\\u", "data_", "in_", "commit", "s", "\\u", "data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "index_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", ",_", "is", "\\u", "new_", "=_", "Step_", "._", "objects_", "._", "get", "\\u", "or", "\\u", "create_", "(_", "index_", "=_", "index_", ",_", "tutorial", "_", "=_", "tutorial", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "is", "\\u", "new_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "step_", "._", "title_", "=_", "commit", "\\u", "data_", "[_", "'", "title", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "content", "\\u", "before_", "=_", "commit", "\\u", "data_", "[_", "'", "message", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "content", "\\u", "after_", "=_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "step_", "._", "diff", "\\u", "url_", "=_", "commit", "\\u", "data_", "[_", "'", "diff", "\\u", "url", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "code", "\\u", "url_", "=_", "commit", "\\u", "data_", "[_", "'", "code", "\\u", "url", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "api", "\\u", "r_", "=_", "requests_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "https", "://", "api", ".", "git", "hub", ".", "com", "/", "repos", "/", "%", "s", "/", "%", "s", "/", "commit", "s", "/", "%", "s", "?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "repo", "\\u", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "commit", "\\u", "data_", "[_", "'", "sha", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", "\\u\\u\\uNL\\u\\u\\u_", ")_", ",_", "headers_", "=_", "{_", "'", "Accept", "'_", ":_", "'", "applica", "tion", "/", "vn", "d", ".", "git", "hub", ".", "diff", "'_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "step_", "._", "files_", "=_", "json_", "._", "dumps_", "(_", "diff_", "._", "parse_", "(_", "api", "\\u", "r_", "._", "text_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "step_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tutorial", "\\u", "new_", "(_", "request_", ",_", "username_", ",_", "repo_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "request_", "._", "method_", "==_", "'", "POST", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "user_", "=_", "User_", "._", "objects_", "._", "get_", "(_", "username_", "=_", "username_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "repo", "\\u", "r", "\\u", "json_", "=_", "requests_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "https", "://", "api", ".", "git", "hub", ".", "com", "/", "repos", "/", "%", "s", "/", "%", "s", "?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "username_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "repo_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "._", "json_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tut", "\\u", "entry_", ",_", "is", "\\u", "new_", "=_", "Tu", "tori", "al_", "._", "objects_", "._", "get", "\\u", "or", "\\u", "create_", "(_", "id_", "=_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "id", "'_", "]_", ",_", "owner_", "=_", "user_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tut", "\\u", "entry_", "._", "title_", "=_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tut", "\\u", "entry_", "._", "description_", "=_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "description", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tut", "\\u", "entry_", "._", "repo", "\\u", "name_", "=_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "name", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tut", "\\u", "entry_", "._", "repo", "\\u", "url_", "=_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "url", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tut", "\\u", "entry_", "._", "owner_", "=_", "user_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tut", "\\u", "entry_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Get", " ", "all", " ", "commit", "s", ",", " ", "most", " ", "recent", " ", "first_", "\\u\\u\\uNL\\u\\u\\u_", "commit", "s", "\\u", "r", "\\u", "json_", "=_", "requests_", "._", "get_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "repo", "\\u", "r", "\\u", "json_", "[_", "'", "commit", "s", "\\u", "url", "'_", "]_", "._", "replace_", "(_", "'{", "/", "sha", "}'_", ",_", "''_", ")_", "+_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "'?", "client", "\\u", "id", "=", "%", "s", "&", "client", "\\u", "secret", "=", "%", "s", "'_", "%_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "KEY_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "settings_", "._", "SOCIAL", "\\u", "AUTH", "\\u", "GIT", "HUB", "\\u", "SECRET_", ")_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "._", "json_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "commit", "s", "\\u", "data_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "commit_", "in_", "commit", "s", "\\u", "r", "\\u", "json_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "title", "\\u", "raw_", ",_", "\\u_", ",_", "message", "\\u", "raw_", ")_", "=_", "commit_", "[_", "'", "commit", "'_", "]_", "[_", "'", "message", "'_", "]_", "._", "partition_", "(_", "'\\\\", "n", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "commit", "s", "\\u", "data_", "._", "insert_", "(_", "0_", ",_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "sha", "'_", ":_", "commit_", "[_", "'", "sha", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "title", "\\u", "raw_", "[_", ":_", "50_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "message", "'_", ":_", "message", "\\u", "raw_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "diff", "\\u", "url", "'_", ":_", "commit_", "[_", "'", "html", "\\u", "url", "'_", "]_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "code", "\\u", "url", "'_", ":_", "'", "https", "://", "git", "hub", ".", "com", "/", "%", "s", "/", "%", "s", "/", "tree", "/", "%", "s", "'_", "%_", "(_", "username_", ",_", "repo_", ",_", "commit_", "[_", "'", "sha", "'_", "]_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "build", "\\u", "steps_", "(_", "username_", ",_", "repo_", ",_", "tut", "\\u", "entry_", ",_", "commit", "s", "\\u", "data_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Js", "on", "Response_", "(_", "{_", "'", "tutorial", "\\u", "id", "'_", ":_", "tut", "\\u", "entry_", "._", "id_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Allowed_", "(_", "[_", "'", "POST", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "tutorial", "_", "(_", "request_", ",_", "username_", ",_", "tut", "num_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "request_", "._", "method_", "==_", "'", "GET", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "tut", " ", "is", " ", "an", " ", "ID", " ", "(", "number", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tut", "\\u", "entry_", "=_", "Tu", "tori", "al_", "._", "objects_", "._", "get_", "(_", "id_", "=_", "tut", "num_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "response_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ":_", "tut", "num_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "tut", "\\u", "entry_", "._", "title_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "description", "'_", ":_", "tut", "\\u", "entry_", "._", "description_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "repo", "\\u", "name", "'_", ":_", "tut", "\\u", "entry_", "._", "repo", "\\u", "name_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "repo", "\\u", "url", "'_", ":_", "tut", "\\u", "entry_", "._", "repo", "\\u", "url_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "step", "s", "'_", ":_", "[_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "'", "title", "'_", ":_", "step_", "._", "title_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "content", "\\u", "bef", "ore", "'_", ":_", "step_", "._", "content", "\\u", "before_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "content", "\\u", "after", "'_", ":_", "step_", "._", "content", "\\u", "after_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "diff", "\\u", "url", "'_", ":_", "step_", "._", "diff", "\\u", "url_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "code", "\\u", "url", "'_", ":_", "step_", "._", "code", "\\u", "url_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "files", "'_", ":_", "json_", "._", "loads_", "(_", "step_", "._", "files_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "for_", "step_", "in_", "Step_", "._", "objects_", "._", "filter_", "(_", "tutorial", "_", "=_", "tut", "num_", ")_", "._", "order", "\\u", "by_", "(_", "'", "index", "'_", ")_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "Js", "on", "Response_", "(_", "response_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "request_", "._", "method_", "==_", "'", "DELET", "E", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "tut", " ", "is", " ", "an", " ", "ID", " ", "(", "number", ")_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Tu", "tori", "al_", "._", "objects_", "._", "get_", "(_", "id_", "=_", "tut", "num_", ")_", "._", "delete_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "Http", "Response_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "request_", "._", "method_", "==_", "'", "PATCH", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "patch_", "=_", "json_", "._", "loads_", "(_", "request_", "._", "body_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "tut", "\\u", "entry_", "=_", "Tu", "tori", "al_", "._", "objects_", "._", "get_", "(_", "id_", "=_", "tut", "num_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "tut", "\\u", "entry_", "._", "title_", "=_", "patch_", "[_", "'", "title", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tut", "\\u", "entry_", "._", "description_", "=_", "patch_", "[_", "'", "description", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tut", "\\u", "entry_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "index_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "step", "\\u", "json_", "in_", "patch_", "[_", "'", "step", "s", "'_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "index_", "+=_", "1_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "=_", "Step_", "._", "objects_", "._", "get_", "(_", "tutorial", "_", "=_", "tut", "\\u", "entry_", ",_", "index_", "=_", "index_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "step_", "._", "title_", "=_", "patch_", "[_", "index_", "-_", "1_", "]_", "[_", "'", "title", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "content", "\\u", "before_", "=_", "patch_", "[_", "index_", "-_", "1_", "]_", "[_", "'", "content", "\\u", "bef", "ore", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "content", "\\u", "after_", "=_", "patch_", "[_", "index_", "-_", "1_", "]_", "[_", "'", "content", "\\u", "after", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "step_", "._", "save_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Tu", "tori", "al_", "._", "Do", "es", "Not", "Exist_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Found_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "Http", "Respons", "e", "Not", "Allowed_", "(_", "[_", "'", "POST", "'_", ",_", "'", "GET", "'_", ",_", "'", "DELET", "E", "'_", ",_", "'", "PATCH", "'_", "]_", ")_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Except block handles 'BaseException'
clips/pattern/pattern/server/cherrypy/cherrypy/lib/covercp.py
[ { "content": "def _show_branch(root, base, path, pct=0, showpct=False, exclude=\"\",\n coverage=the_coverage):\n\n # Show the directory name and any of our children\n dirs = [k for k, v in root.items() if v]\n dirs.sort()\n for name in dirs:\n newpath = os.path.join(path, name)\n\n if newpath.lower().startswith(base):\n relpath = newpath[len(base):]\n yield \"| \" * relpath.count(os.sep)\n yield \"<a class='directory' href='menu?base=%s&exclude=%s'>%s</a>\\n\" % \\\n (newpath, quote_plus(exclude), name)\n\n for chunk in _show_branch(root[name], base, newpath, pct, showpct, exclude, coverage=coverage):\n yield chunk\n\n # Now list the files\n if path.lower().startswith(base):\n relpath = path[len(base):]\n files = [k for k, v in root.items() if not v]\n files.sort()\n for name in files:\n newpath = os.path.join(path, name)\n\n pc_str = \"\"\n if showpct:\n try:\n _, statements, _, missing, _ = coverage.analysis2(newpath)\n except:\n # Yes, we really want to pass on all errors.\n pass\n else:\n pc = _percent(statements, missing)\n pc_str = (\"%3d%% \" % pc).replace(' ','&nbsp;')\n if pc < float(pct) or pc == -1:\n pc_str = \"<span class='fail'>%s</span>\" % pc_str\n else:\n pc_str = \"<span class='pass'>%s</span>\" % pc_str\n\n yield TEMPLATE_ITEM % (\"| \" * (relpath.count(os.sep) + 1),\n pc_str, newpath, name)", "metadata": "root._show_branch", "header": "['module', '___EOS___']", "index": 184 } ]
[ { "span": "except:", "start_line": 214, "start_column": 16, "end_line": 214, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "show", "\\u", "branch_", "(_", "root_", ",_", "base_", ",_", "path_", ",_", "pct_", "=_", "0_", ",_", "show", "pct_", "=_", "False_", ",_", "exclude_", "=_", "\"\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "coverage_", "=_", "the", "\\u", "coverage_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Show", " ", "the", " ", "director", "y", " ", "name", " ", "and", " ", "any", " ", "of", " ", "our", " ", "children_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "dirs_", "=_", "[_", "k_", "for_", "k_", ",_", "v_", "in_", "root_", "._", "items_", "(_", ")_", "if_", "v_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "dirs_", "._", "sort_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "name_", "in_", "dirs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "newpath_", "=_", "os_", "._", "path_", "._", "join_", "(_", "path_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "newpath_", "._", "lower_", "(_", ")_", "._", "startswith_", "(_", "base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "relpath_", "=_", "newpath_", "[_", "len_", "(_", "base_", ")_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "yield_", "\"|", " ", "\"_", "*_", "relpath_", "._", "count_", "(_", "os_", "._", "sep_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "yield_", "\"<", "a", " ", "class", "='", "director", "y", "'", " ", "href", "='", "menu", "?", "base", "=", "%", "s", "&", "exclu", "de", "=", "%", "s", "'>", "%", "s", "</", "a", ">\\\\", "n", "\"_", "%_", "(_", "newpath_", ",_", "quote", "\\u", "plus_", "(_", "exclude_", ")_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "for_", "chunk_", "in_", "\\u", "show", "\\u", "branch_", "(_", "root_", "[_", "name_", "]_", ",_", "base_", ",_", "newpath_", ",_", "pct_", ",_", "show", "pct_", ",_", "exclude_", ",_", "coverage_", "=_", "coverage_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "yield_", "chunk_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "No", "w", " ", "list", " ", "the", " ", "files_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "path_", "._", "lower_", "(_", ")_", "._", "startswith_", "(_", "base_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "relpath_", "=_", "path_", "[_", "len_", "(_", "base_", ")_", ":_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "files_", "=_", "[_", "k_", "for_", "k_", ",_", "v_", "in_", "root_", "._", "items_", "(_", ")_", "if_", "not_", "v_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "files_", "._", "sort_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "name_", "in_", "files_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "newpath_", "=_", "os_", "._", "path_", "._", "join_", "(_", "path_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pc", "\\u", "str_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "show", "pct_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "\\u_", ",_", "statements_", ",_", "\\u_", ",_", "missing_", ",_", "\\u_", "=_", "coverage_", "._", "analys", "is", "2_", "(_", "newpath_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Ye", "s", ",", " ", "we", " ", "reall", "y", " ", "want", " ", "to", " ", "pass", " ", "on", " ", "all", " ", "error", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "pc_", "=_", "\\u", "percent_", "(_", "statements_", ",_", "missing_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pc", "\\u", "str_", "=_", "(_", "\"%", "3d", "%%", " ", "\"_", "%_", "pc_", ")_", "._", "replace_", "(_", "'", " ", "'_", ",_", "'&", "nb", "sp", ";'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "pc_", "<_", "float_", "(_", "pct_", ")_", "or_", "pc_", "==_", "-_", "1_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "pc", "\\u", "str_", "=_", "\"<", "span", " ", "class", "='", "fail", "'>", "%", "s", "</", "span", ">\"_", "%_", "pc", "\\u", "str_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "pc", "\\u", "str_", "=_", "\"<", "span", " ", "class", "='", "pass", "'>", "%", "s", "</", "span", ">\"_", "%_", "pc", "\\u", "str_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "yield_", "TEMPL", "ATE", "\\u", "ITEM_", "%_", "(_", "\"|", " ", "\"_", "*_", "(_", "relpath_", "._", "count_", "(_", "os_", "._", "sep_", ")_", "+_", "1_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "pc", "\\u", "str_", ",_", "newpath_", ",_", "name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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[ { "content": "def CreateWindow(title, className, width, height, xpos=None, ypos=None, icon=None, windowProc=None):\n\n \"\"\"\n for key in g_windows:\n if g_windows[key] == className:\n raise Exception(\"There was already created a window with that className: %s.\"\n \"Each created window must have an unique className.\" % className)\n \"\"\"\n\n if not windowProc:\n windowProc = {win32con.WM_CLOSE: WM_CLOSE}\n\n bigIcon = \"\"\n smallIcon = \"\"\n\n if icon:\n icon = GetRealPath(icon)\n\n # Load small and big icon.\n # WNDCLASSEX (along with hIconSm) is not supported by pywin32,\n # we need to use WM_SETICON message after window creation.\n\n # http://stackoverflow.com/questions/2234988/how-to-set-hicon-on-a-window-ico-with-multiple-sizes\n # http://blog.barthe.ph/2009/07/17/wmseticon/\n\n bigX = win32api.GetSystemMetrics(win32con.SM_CXICON)\n bigY = win32api.GetSystemMetrics(win32con.SM_CYICON)\n bigIcon = win32gui.LoadImage(0, icon, win32con.IMAGE_ICON, bigX, bigY, win32con.LR_LOADFROMFILE)\n smallX = win32api.GetSystemMetrics(win32con.SM_CXSMICON)\n smallY = win32api.GetSystemMetrics(win32con.SM_CYSMICON)\n smallIcon = win32gui.LoadImage(0, icon, win32con.IMAGE_ICON, smallX, smallY, win32con.LR_LOADFROMFILE)\n\n wndclass = win32gui.WNDCLASS()\n wndclass.hInstance = win32api.GetModuleHandle(None)\n wndclass.lpszClassName = className\n wndclass.style = win32con.CS_VREDRAW | win32con.CS_HREDRAW\n # win32con.CS_GLOBALCLASS\n wndclass.hbrBackground = win32con.COLOR_WINDOW\n wndclass.hCursor = win32gui.LoadCursor(0, win32con.IDC_ARROW)\n wndclass.lpfnWndProc = windowProc\n\n #noinspection PyUnusedLocal\n global g_registeredClasses\n if not className in g_registeredClasses:\n g_registeredClasses[className] = True\n atomclass = win32gui.RegisterClass(wndclass)\n Debug(\"win32gui.RegisterClass(%s)\" % className)\n\n if xpos is None or ypos is None:\n # Center window on the screen.\n Debug(\"Centering window on the screen.\")\n screenx = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)\n screeny = win32api.GetSystemMetrics(win32con.SM_CYSCREEN)\n xpos = int(math.floor((screenx - width) / 2))\n ypos = int(math.floor((screeny - height) / 2))\n if xpos < 0: xpos = 0\n if ypos < 0: ypos = 0\n\n windowID = win32gui.CreateWindow(className, title,\n win32con.WS_OVERLAPPEDWINDOW | win32con.WS_CLIPCHILDREN | win32con.WS_VISIBLE,\n xpos, ypos, width, height, # xpos, ypos, width, height\n 0, 0, wndclass.hInstance, None)\n g_windows[windowID] = className\n\n if icon:\n if bigIcon:\n win32api.SendMessage(windowID, win32con.WM_SETICON, win32con.ICON_BIG, bigIcon)\n if smallIcon:\n win32api.SendMessage(windowID, win32con.WM_SETICON, win32con.ICON_SMALL, smallIcon)\n\n Debug(\"windowID = %s\" % windowID)\n return windowID", "metadata": "root.CreateWindow", "header": "['module', '___EOS___']", "index": 61 } ]
[ { "span": "atomclass ", "start_line": 106, "start_column": 8, "end_line": 106, "end_column": 17 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "Creat", "e", "Window_", "(_", "title_", ",_", "class", "Name_", ",_", "width_", ",_", "height_", ",_", "xpos_", "=_", "None_", ",_", "ypos_", "=_", "None_", ",_", "icon_", "=_", "None_", ",_", "window", "Proc_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "for", " ", "key", " ", "in", " ", "g", "\\u", "windows", ":", "\\", "10", ";", " ", " ", " ", " ", "if", " ", "g", "\\u", "windows", "[", "key", "]", " ", "==", " ", "class", "Name", ":", "\\", "10", ";", " ", " ", " ", " ", "raise", " ", "Except", "ion", "(\"", "There", " ", "was", " ", "alr", "ead", "y", " ", "created", " ", "a", " ", "window", " ", "with", " ", "tha", "t", " ", "class", "Name", ":", " ", "%", "s", ".\"", "\\", "10", ";", " ", " ", " ", " ", "\"", "Ea", "ch", " ", "created", " ", "window", " ", "must", " ", "have", " ", "an", " ", "unique", " ", "class", "Name", ".\"", " ", "%", " ", "class", "Name", ")", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "not_", "window", "Proc_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "window", "Proc_", "=_", "{_", "win32con_", "._", "WM", "\\u", "CLOSE_", ":_", "WM", "\\u", "CLOSE_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "big", "Icon_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "small", "Icon_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "icon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "icon_", "=_", "Get", "Real", "Path_", "(_", "icon_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Load", " ", "small", " ", "and", " ", "big", " ", "icon", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "WN", "DC", "LAS", "SE", "X", " ", "(", "along", " ", "with", " ", "h", "Ico", "n", "Sm", ")", " ", "is", " ", "not", " ", "support", "ed", " ", "by", " ", "pywi", "n", "32", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "we", " ", "need", " ", "to", " ", "use", " ", "WM", "\\u", "SET", "ICON", " ", "message", " ", "after", " ", "window", " ", "creati", "on", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "http", "://", "stack", "overflow", ".", "com", "/", "question", "s", "/", "223", "498", "8", "/", "how", "-", "to", "-", "set", "-", "hic", "on", "-", "on", "-", "a", "-", "window", "-", "ico", "-", "with", "-", "multiple", "-", "sizes_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "http", "://", "blog", ".", "bart", "he", ".", "ph", "/", "200", "9", "/", "0", "7", "/", "1", "7", "/", "wms", "etic", "on", "/_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "big", "X_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CX", "ICON_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "big", "Y_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CY", "ICON_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "big", "Icon_", "=_", "win32", "gui_", "._", "Load", "Image_", "(_", "0_", ",_", "icon_", ",_", "win32con_", "._", "IMA", "GE", "\\u", "ICON_", ",_", "big", "X_", ",_", "big", "Y_", ",_", "win32con_", "._", "LR", "\\u", "LOAD", "FROM", "FILE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "small", "X_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CX", "SMI", "CON", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "small", "Y_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CY", "SMI", "CON", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "small", "Icon_", "=_", "win32", "gui_", "._", "Load", "Image_", "(_", "0_", ",_", "icon_", ",_", "win32con_", "._", "IMA", "GE", "\\u", "ICON_", ",_", "small", "X_", ",_", "small", "Y_", ",_", "win32con_", "._", "LR", "\\u", "LOAD", "FROM", "FILE_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "wnd", "class_", "=_", "win32", "gui_", "._", "WN", "DC", "LAS", "S_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wnd", "class_", "._", "h", "Instance_", "=_", "win32", "api_", "._", "Get", "Modul", "e", "Handle_", "(_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wnd", "class_", "._", "lp", "sz", "Class", "Name_", "=_", "class", "Name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wnd", "class_", "._", "style_", "=_", "win32con_", "._", "CS", "\\u", "VR", "ED", "RAW_", "|_", "win32con_", "._", "CS", "\\u", "HRE", "DRAW", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "win32", "con", ".", "CS", "\\u", "GLOB", "ALC", "LAS", "S_", "\\u\\u\\uNL\\u\\u\\u_", "wnd", "class_", "._", "hb", "r", "Background_", "=_", "win32con_", "._", "COLOR", "\\u", "WINDOW_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wnd", "class_", "._", "h", "Cursor_", "=_", "win32", "gui_", "._", "Load", "Cursor_", "(_", "0_", ",_", "win32con_", "._", "ID", "C", "\\u", "ARROW", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "wnd", "class_", "._", "lp", "fn", "Wn", "d", "Proc_", "=_", "window", "Proc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", "noin", "spect", "ion", " ", "Py", "Un", "used", "Local_", "\\u\\u\\uNL\\u\\u\\u_", "global_", "g", "\\u", "register", "ed", "Classes_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "class", "Name_", "in_", "g", "\\u", "register", "ed", "Classes_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "g", "\\u", "register", "ed", "Classes_", "[_", "class", "Name_", "]_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "atom", "class_", "=_", "win32", "gui_", "._", "Register", "Class_", "(_", "wnd", "class_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "Debug_", "(_", "\"", "win32", "gui", ".", "Register", "Class", "(%", "s", ")\"_", "%_", "class", "Name_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "xpos_", "is_", "None_", "or_", "ypos_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Center", " ", "window", " ", "on", " ", "the", " ", "screen", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "Debug_", "(_", "\"", "Center", "ing", " ", "window", " ", "on", " ", "the", " ", "screen", ".\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "screen", "x_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CX", "SCREEN", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "screen", "y_", "=_", "win32", "api_", "._", "Get", "System", "Metrics_", "(_", "win32con_", "._", "SM", "\\u", "CY", "SCREEN", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "xpos_", "=_", "int_", "(_", "math_", "._", "floor_", "(_", "(_", "screen", "x_", "-_", "width_", ")_", "/_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "ypos_", "=_", "int_", "(_", "math_", "._", "floor_", "(_", "(_", "screen", "y_", "-_", "height_", ")_", "/_", "2_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "xpos_", "<_", "0_", ":_", "xpos_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "ypos_", "<_", "0_", ":_", "ypos_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "window", "ID_", "=_", "win32", "gui_", "._", "Creat", "e", "Window_", "(_", "class", "Name_", ",_", "title_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "win32con_", "._", "WS", "\\u", "OVERLA", "PPE", "DW", "IND", "OW", "_", "|_", "win32con_", "._", "WS", "\\u", "CLIP", "CHILD", "REN", "_", "|_", "win32con_", "._", "WS", "\\u", "VISI", "BLE_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "xpos_", ",_", "ypos_", ",_", "width_", ",_", "height_", ",_", "#", " ", "xpo", "s", ",", " ", "ypo", "s", ",", " ", "widt", "h", ",", " ", "height_", "\\u\\u\\uNL\\u\\u\\u_", "0_", ",_", "0_", ",_", "wnd", "class_", "._", "h", "Instance_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "g", "\\u", "windows_", "[_", "window", "ID_", "]_", "=_", "class", "Name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "icon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "big", "Icon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "win32", "api_", "._", "Sen", "d", "Message_", "(_", "window", "ID_", ",_", "win32con_", "._", "WM", "\\u", "SET", "ICON_", ",_", "win32con_", "._", "ICON", "\\u", "BIG", "_", ",_", "big", "Icon_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "small", "Icon_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "win32", "api_", "._", "Sen", "d", "Message_", "(_", "window", "ID_", ",_", "win32con_", "._", "WM", "\\u", "SET", "ICON_", ",_", "win32con_", "._", "ICON", "\\u", "SMALL", "_", ",_", "small", "Icon_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "Debug_", "(_", "\"", "window", "ID", " ", "=", " ", "%", "s", "\"_", "%_", "window", "ID_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "window", "ID_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
darcyliu/storyboard/boto/cloudformation/__init__.py
[ { "content": "# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/\n# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish, dis-\n# tribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to the fol-\n# lowing conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-\n# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n\n# this is here for backward compatibility\n# originally, the SNSConnection class was defined here\nfrom connection import CloudFormationConnection\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from connection import CloudFormationConnection", "start_line": 24, "start_column": 0, "end_line": 24, "end_column": 47 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2010", "-", "2011", " ", "Mit", "ch", " ", "Gar", "naa", "t", " ", "http", "://", "gar", "naa", "t", ".", "org", "/_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2010", "-", "2011", ",", " ", "Euc", "aly", "ptu", "s", " ", "System", "s", ",", " ", "Inc", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Permi", "ssion", " ", "is", " ", "here", "by", " ", "grant", "ed", ",", " ", "free", " ", "of", " ", "charge", ",", " ", "to", " ", "any", " ", "person", " ", "obtain", "ing", " ", "a_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "copy", " ", "of", " ", "this", " ", "software", " ", "and", " ", "associate", "d", " ", "documentation", " ", "files", " ", "(", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\"", "Sof", "twa", "re", "\")", ",", " ", "to", " ", "deal", " ", "in", " ", "the", " ", "Sof", "twa", "re", " ", "with", "out", " ", "restriction", ",", " ", "inclu", "ding_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "with", "out", " ", "limit", "ation", " ", "the", " ", "rights", " ", "to", " ", "use", ",", " ", "copy", ",", " ", "modif", "y", ",", " ", "merge", ",", " ", "publi", "sh", ",", " ", "dis", "-_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "tribut", "e", ",", " ", "subli", "cens", "e", ",", " ", "and", "/", "or", " ", "sell", " ", "copie", "s", " ", "of", " ", "the", " ", "Sof", "twa", "re", ",", " ", "and", " ", "to", " ", "permit", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "person", "s", " ", "to", " ", "who", "m", " ", "the", " ", "Sof", "twa", "re", " ", "is", " ", "fur", "nish", "ed", " ", "to", " ", "do", " ", "so", ",", " ", "subject", " ", "to", " ", "the", " ", "fol", "-_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "low", "ing", " ", "condition", "s", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "above", " ", "copyr", "ight", " ", "notice", " ", "and", " ", "this", " ", "permissi", "on", " ", "notice", " ", "sha", "ll", " ", "be", " ", "included_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "in", " ", "all", " ", "copie", "s", " ", "or", " ", "substa", "nti", "al", " ", "porti", "ons", " ", "of", " ", "the", " ", "Sof", "twa", "re", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "THE", " ", "SOFT", "WARE", " ", "IS", " ", "PROVI", "DED", " ", "\"", "AS", " ", "IS", "\",", " ", "WITH", "OUT", " ", "WAR", "RAN", "TY", " ", "OF", " ", "ANY", " ", "KIND", ",", " ", "EXPR", "ESS", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "OR", " ", "IMPL", "IED", ",", " ", "INC", "LU", "DING", " ", "BUT", " ", "NOT", " ", "LIMIT", "ED", " ", "TO", " ", "THE", " ", "WAR", "RAN", "TIES", " ", "OF", " ", "MER", "CHAN", "TAB", "IL", "-_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "IT", "Y", ",", " ", "FIT", "NESS", " ", "FOR", " ", "A", " ", "PARTI", "CUL", "AR", " ", "PUR", "POS", "E", " ", "AND", " ", "NON", "INF", "RING", "EME", "NT", ".", " ", "IN", " ", "NO", " ", "EVENT_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "SHA", "LL", " ", "THE", " ", "AUTHOR", " ", "BE", " ", "LI", "AB", "LE", " ", "FOR", " ", "ANY", " ", "CLA", "IM", ",", " ", "DA", "MAGE", "S", " ", "OR", " ", "OTHER", " ", "LI", "ABI", "LIT", "Y", ",", " _", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "WHE", "THER", " ", "IN", " ", "AN", " ", "ACTI", "ON", " ", "OF", " ", "CONTR", "ACT", ",", " ", "TOR", "T", " ", "OR", " ", "OTHER", "WI", "SE", ",", " ", "ARI", "SIN", "G", " ", "FROM", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "OUT", " ", "OF", " ", "OR", " ", "IN", " ", "CONNECTION", " ", "WITH", " ", "THE", " ", "SOFT", "WARE", " ", "OR", " ", "THE", " ", "USE", " ", "OR", " ", "OTHER", " ", "DEA", "LING", "S_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "IN", " ", "THE", " ", "SOFT", "WARE", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "this", " ", "is", " ", "here", " ", "for", " ", "back", "ward", " ", "compatibility", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "original", "ly", ",", " ", "the", " ", "SN", "SC", "onnect", "ion", " ", "class", " ", "was", " ", "defin", "ed", " ", "here_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "connection_", "import_", "Cloud", "Format", "ion", "Connection_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1 ]
Unused import
victor-o-silva/db_file_storage/docs/conf.py
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Django Database File Storage documentation build configuration file, created by\n# sphinx-quickstart on Wed Mar 30 16:38:37 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys\nimport os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.insert(0, os.path.abspath('.'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n 'sphinx.ext.autodoc',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Django Database File Storage'\ncopyright = u'2016, Victor Oliveira da Silva'\nauthor = u'Victor Oliveira da Silva'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = u'0.4.0'\n# The full version, including alpha/beta/rc tags.\nrelease = u'0.4.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n#keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\nimport sphinx_rtd_theme\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\nif on_rtd:\n # The theme to use for HTML and HTML Help pages. See the documentation for\n # a list of builtin themes.\n html_theme = 'default'\n\n # Theme options are theme-specific and customize the look and feel of a theme\n # further. For a list of options available for each theme, see the\n # documentation.\n # html_theme_options = {}\n\n # Add any paths that contain custom themes here, relative to this directory.\n # html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\nelse:\n html_theme = 'sphinx_rtd_theme'\n html_theme_options = {}\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n \n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#html_title = u'Django Database File Storage v0.4.0'\n\n# A shorter title for the navigation bar. Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it. The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'DjangoDatabaseFileStoragedoc'\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n\n# Latex figure (float) alignment\n#'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n# author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n (master_doc, 'DjangoDatabaseFileStorage.tex', u'Django Database File Storage Documentation',\n u'Victor Oliveira da Silva', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n (master_doc, 'djangodatabasefilestorage', u'Django Database File Storage Documentation',\n [author], 1)\n]\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n# dir menu entry, description, category)\ntexinfo_documents = [\n (master_doc, 'DjangoDatabaseFileStorage', u'Django Database File Storage Documentation',\n author, 'DjangoDatabaseFileStorage', 'One line description of project.',\n 'Miscellaneous'),\n]\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#texinfo_no_detailmenu = False\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import sys", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 10 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", " ", "documentation", " ", "build", " ", "configura", "tion", " ", "file", ",", " ", "created", " ", "by_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "sphinx", "-", "quicks", "tart", " ", "on", " ", "We", "d", " ", "Mar", " ", "30", " ", "16", ":", "3", "8", ":", "3", "7", " ", "2016", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "file", " ", "is", " ", "execfile", "()", "d", " ", "with", " ", "the", " ", "current", " ", "director", "y", " ", "set", " ", "to", " ", "its_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "contain", "ing", " ", "dir", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Not", "e", " ", "tha", "t", " ", "not", " ", "all", " ", "possib", "le", " ", "configura", "tion", " ", "values", " ", "are", " ", "presen", "t", " ", "in", " ", "this_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "autogen", "erate", "d", " ", "file", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "All", " ", "configura", "tion", " ", "values", " ", "have", " ", "a", " ", "default", ";", " ", "values", " ", "tha", "t", " ", "are", " ", "commente", "d", " ", "out_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "serve", " ", "to", " ", "show", " ", "the", " ", "default", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "extensi", "ons", " ", "(", "or", " ", "module", "s", " ", "to", " ", "document", " ", "with", " ", "autod", "oc", ")", " ", "are", " ", "in", " ", "anot", "her", " ", "director", "y", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "add", " ", "these", " ", "director", "ies", " ", "to", " ", "sys", ".", "path", " ", "here", ".", " ", "If", " ", "the", " ", "director", "y", " ", "is", " ", "relative", " ", "to", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "documentation", " ", "root", ",", " ", "use", " ", "os", ".", "path", ".", "abs", "path", " ", "to", " ", "make", " ", "it", " ", "abs", "olute", ",", " ", "like", " ", "shown", " ", "here", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "sys", ".", "path", ".", "insert", "(", "0", ",", " ", "os", ".", "path", ".", "abs", "path", "('.", "'))", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--", " ", "General", " ", "configura", "tion", " ", "--------------", "--------------", "--------------", "------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "your", " ", "documentation", " ", "need", "s", " ", "a", " ", "minima", "l", " ", "Sph", "inx", " ", "version", ",", " ", "state", " ", "it", " ", "here", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "need", "s", "\\u", "sphinx", " ", "=", " ", "'", "1.0", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "any", " ", "Sph", "inx", " ", "extensi", "on", " ", "module", " ", "names", " ", "here", ",", " ", "as", " ", "string", "s", ".", " ", "The", "y", " ", "can", " ", "be_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "extensi", "ons", " ", "comi", "ng", " ", "with", " ", "Sph", "inx", " ", "(", "named", " ", "'", "sphinx", ".", "ext", ".*", "')", " ", "or", " ", "your", " ", "custom_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "ones", "._", "\\u\\u\\uNL\\u\\u\\u_", "extensions_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "'", "sphinx", ".", "ext", ".", "autod", "oc", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "any", " ", "path", "s", " ", "tha", "t", " ", "contain", " ", "template", "s", " ", "here", ",", " ", "relative", " ", "to", " ", "this", " ", "director", "y", "._", "\\u\\u\\uNL\\u\\u\\u_", "template", "s", "\\u", "path_", "=_", "[_", "'\\u", "template", "s", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "suff", "ix", "(", "es", ")", " ", "of", " ", "source", " ", "filename", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "You", " ", "can", " ", "speci", "fy", " ", "multiple", " ", "suff", "ix", " ", "as", " ", "a", " ", "list", " ", "of", " ", "string", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "source", "\\u", "suff", "ix", " ", "=", " ", "['", ".", "rst", "',", " ", "'.", "md", "']", "_", "\\u\\u\\uNL\\u\\u\\u_", "source", "\\u", "suffix_", "=_", "'.", "rst", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "encoding", " ", "of", " ", "source", " ", "files", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "source", "\\u", "encoding", " ", "=", " ", "'", "utf", "-", "8", "-", "sig", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "master", " ", "toc", "tree", " ", "document", "._", "\\u\\u\\uNL\\u\\u\\u_", "master", "\\u", "doc_", "=_", "'", "index", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "General", " ", "informati", "on", " ", "abo", "ut", " ", "the", " ", "project", "._", "\\u\\u\\uNL\\u\\u\\u_", "project_", "=_", "u", "'", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "copyright_", "=_", "u", "'", "2016", ",", " ", "Victor", " ", "Oli", "vei", "ra", " ", "da", " ", "Sil", "va", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "author_", "=_", "u", "'", "Victor", " ", "Oli", "vei", "ra", " ", "da", " ", "Sil", "va", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "version", " ", "info", " ", "for", " ", "the", " ", "project", " ", "you", "'", "re", " ", "document", "ing", ",", " ", "acts", " ", "as", " ", "replace", "ment", " ", "for_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "|", "version", "|", " ", "and", " ", "|", "release", "|", ",", " ", "als", "o", " ", "used", " ", "in", " ", "vari", "ous", " ", "other", " ", "place", "s", " ", "through", "out", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "bui", "lt", " ", "document", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "short", " ", "X", ".", "Y", " ", "version", "._", "\\u\\u\\uNL\\u\\u\\u_", "version_", "=_", "u", "'", "0.", "4.0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "The", " ", "full", " ", "version", ",", " ", "inclu", "ding", " ", "alpha", "/", "beta", "/", "rc", " ", "tags", "._", "\\u\\u\\uNL\\u\\u\\u_", "release_", "=_", "u", "'", "0.", "4.0", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "language", " ", "for", " ", "content", " ", "autogen", "erate", "d", " ", "by", " ", "Sph", "inx", ".", " ", "Refer", " ", "to", " ", "documentation", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "for", " ", "a", " ", "list", " ", "of", " ", "support", "ed", " ", "language", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "is", " ", "als", "o", " ", "used", " ", "if", " ", "you", " ", "do", " ", "content", " ", "translatio", "n", " ", "via", " ", "gettext", " ", "catalogs", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Us", "ual", "ly", " ", "you", " ", "set", " ", "\"", "language", "\"", " ", "from", " ", "the", " ", "command", " ", "line", " ", "for", " ", "these", " ", "case", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "language_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "There", " ", "are", " ", "two", " ", "options", " ", "for", " ", "repla", "cing", " ", "|", "toda", "y", "|", ":", " ", "eit", "her", ",", " ", "you", " ", "set", " ", "toda", "y", " ", "to", " ", "some", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "non", "-", "fal", "se", " ", "value", ",", " ", "then", " ", "it", " ", "is", " ", "used", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", "toda", "y", " ", "=", " ", "''_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Else", ",", " ", "toda", "y", "\\u", "fmt", " ", "is", " ", "used", " ", "as", " ", "the", " ", "format", " ", "for", " ", "a", " ", "strf", "time", " ", "call", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "toda", "y", "\\u", "fmt", " ", "=", " ", "'%", "B", " ", "%", "d", ",", " ", "%", "Y", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "List", " ", "of", " ", "pattern", "s", ",", " ", "relative", " ", "to", " ", "source", " ", "director", "y", ",", " ", "tha", "t", " ", "match", " ", "files", " ", "and_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "director", "ies", " ", "to", " ", "ignore", " ", "whe", "n", " ", "look", "ing", " ", "for", " ", "source", " ", "files", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "pattern", "s", " ", "als", "o", " ", "effect", " ", "to", " ", "html", "\\u", "static", "\\u", "path", " ", "and", " ", "html", "\\u", "extra", "\\u", "path_", "\\u\\u\\uNL\\u\\u\\u_", "exclu", "de", "\\u", "patterns_", "=_", "[_", "'\\u", "build", "'_", ",_", "'", "Thumb", "s", ".", "db", "'_", ",_", "'.", "DS", "\\u", "Stor", "e", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "re", "ST", " ", "default", " ", "role", " ", "(", "used", " ", "for", " ", "this", " ", "markup", ":", " ", "`", "text", "`)", " ", "to", " ", "use", " ", "for", " ", "all_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "document", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "default", "\\u", "role", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "'(", ")'", " ", "will", " ", "be", " ", "append", "ed", " ", "to", " ", ":", "func", ":", " ", "etc", ".", " ", "cross", "-", "reference", " ", "text", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "add", "\\u", "function", "\\u", "parenthes", "es", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "the", " ", "current", " ", "module", " ", "name", " ", "will", " ", "be", " ", "prepend", "ed", " ", "to", " ", "all", " ", "description_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "unit", " ", "titles", " ", "(", "suc", "h", " ", "as", " ", "..", " ", "function", "::", ").", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "add", "\\u", "module", "\\u", "names", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "section", "author", " ", "and", " ", "module", "author", " ", "directive", "s", " ", "will", " ", "be", " ", "shown", " ", "in", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "output", ".", " ", "The", "y", " ", "are", " ", "ignore", "d", " ", "by", " ", "default", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "show", "\\u", "author", "s", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "of", " ", "the", " ", "Pyg", "ment", "s", " ", "(", "synta", "x", " ", "highlight", "ing", ")", " ", "style", " ", "to", " ", "use", "._", "\\u\\u\\uNL\\u\\u\\u_", "pyg", "ment", "s", "\\u", "style_", "=_", "'", "sphinx", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "A", " ", "list", " ", "of", " ", "ignore", "d", " ", "prefix", "es", " ", "for", " ", "module", " ", "index", " ", "sorting", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "modi", "nde", "x", "\\u", "common", "\\u", "prefix", " ", "=", " ", "[]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "keep", " ", "warn", "ings", " ", "as", " ", "\"", "system", " ", "message", "\"", " ", "paragraph", "s", " ", "in", " ", "the", " ", "bui", "lt", " ", "document", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "keep", "\\u", "warn", "ings", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "`", "todo", "`", " ", "and", " ", "`", "todo", "List", "`", " ", "produce", " ", "output", ",", " ", "else", " ", "the", "y", " ", "produce", " ", "not", "hing", "._", "\\u\\u\\uNL\\u\\u\\u_", "todo", "\\u", "include", "\\u", "todos_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--", " ", "Optio", "ns", " ", "for", " ", "HTM", "L", " ", "output", " ", "--------------", "--------------", "--------------", "----", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "sphinx", "\\u", "rtd", "\\u", "theme_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "on", "\\u", "rtd", "_", "=_", "os_", "._", "environ_", "._", "get_", "(_", "'", "READ", "THE", "DOCS", "'_", ",_", "None_", ")_", "==_", "'", "Tru", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "on", "\\u", "rtd", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "The", " ", "them", "e", " ", "to", " ", "use", " ", "for", " ", "HTM", "L", " ", "and", " ", "HTM", "L", " ", "Help", " ", "page", "s", ".", " ", " ", "See", " ", "the", " ", "documentation", " ", "for_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "a", " ", "list", " ", "of", " ", "bui", "lti", "n", " ", "themes", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "html", "\\u", "theme_", "=_", "'", "default", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Them", "e", " ", "options", " ", "are", " ", "them", "e-", "specific", " ", "and", " ", "customize", " ", "the", " ", "look", " ", "and", " ", "feel", " ", "of", " ", "a", " ", "theme_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "fur", "ther", ".", " ", " ", "For", " ", "a", " ", "list", " ", "of", " ", "options", " ", "avail", "able", " ", "for", " ", "each", " ", "them", "e", ",", " ", "see", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "documentation", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "html", "\\u", "them", "e\\u", "options", " ", "=", " ", "{}", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "any", " ", "path", "s", " ", "tha", "t", " ", "contain", " ", "custom", " ", "themes", " ", "here", ",", " ", "relative", " ", "to", " ", "this", " ", "director", "y", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "html", "\\u", "them", "e\\u", "path", " ", "=", " ", "[", "sphinx", "\\u", "rtd", "\\u", "them", "e", ".", "get", "\\u", "html", "\\u", "them", "e\\u", "path", "()]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "html", "\\u", "theme_", "=_", "'", "sphinx", "\\u", "rtd", "\\u", "them", "e", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "html", "\\u", "them", "e\\u", "options_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "html", "\\u", "them", "e\\u", "path_", "=_", "[_", "sphinx", "\\u", "rtd", "\\u", "theme_", "._", "get", "\\u", "html", "\\u", "them", "e\\u", "path_", "(_", ")_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "for", " ", "this", " ", "set", " ", "of", " ", "Sph", "inx", " ", "document", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\"<", "project", ">", " ", "v", "<", "release", ">", " ", "documentation", "\"", " ", "by", " ", "default", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "title", " ", "=", " ", "u", "'", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", " ", "v", "0.", "4.0", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "A", " ", "shorter", " ", "title", " ", "for", " ", "the", " ", "navigation", " ", "bar", ".", " ", " ", "Default", " ", "is", " ", "the", " ", "same", " ", "as", " ", "html", "\\u", "title", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "short", "\\u", "title", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "of", " ", "an", " ", "image", " ", "file", " ", "(", "relative", " ", "to", " ", "this", " ", "director", "y", ")", " ", "to", " ", "place", " ", "at", " ", "the", " ", "top_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "of", " ", "the", " ", "sidebar", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "logo", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "of", " ", "an", " ", "image", " ", "file", " ", "(", "relative", " ", "to", " ", "this", " ", "director", "y", ")", " ", "to", " ", "use", " ", "as", " ", "a", " ", "fav", "icon", " ", "of_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "the", " ", "docs", ".", " ", " ", "Thi", "s", " ", "file", " ", "shou", "ld", " ", "be", " ", "a", " ", "Window", "s", " ", "icon", " ", "file", " ", "(.", "ico", ")", " ", "bei", "ng", " ", "16", "x1", "6", " ", "or", " ", "32", "x3", "2_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "pixel", "s", " ", "large", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "fav", "icon", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "any", " ", "path", "s", " ", "tha", "t", " ", "contain", " ", "custom", " ", "static", " ", "files", " ", "(", "suc", "h", " ", "as", " ", "style", " ", "sheet", "s", ")", " ", "here", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "relative", " ", "to", " ", "this", " ", "director", "y", ".", " ", "The", "y", " ", "are", " ", "copie", "d", " ", "after", " ", "the", " ", "bui", "lti", "n", " ", "static", " ", "files", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "so", " ", "a", " ", "file", " ", "named", " ", "\"", "default", ".", "css", "\"", " ", "will", " ", "overwrit", "e", " ", "the", " ", "bui", "lti", "n", " ", "\"", "default", ".", "css", "\".", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "html", "\\u", "static", "\\u", "path_", "=_", "[_", "'\\u", "static", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Add", " ", "any", " ", "extra", " ", "path", "s", " ", "tha", "t", " ", "contain", " ", "custom", " ", "files", " ", "(", "suc", "h", " ", "as", " ", "robots", ".", "txt", " ", "or_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", ".", "hta", "ccess", ")", " ", "here", ",", " ", "relative", " ", "to", " ", "this", " ", "director", "y", ".", " ", "The", "se", " ", "files", " ", "are", " ", "copied_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "direct", "ly", " ", "to", " ", "the", " ", "root", " ", "of", " ", "the", " ", "documentation", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "extra", "\\u", "path", " ", "=", " ", "[]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "not", " ", "Non", "e", ",", " ", "a", " ", "'", "Las", "t", " ", "update", "d", " ", "on", ":'", " ", "timestamp", " ", "is", " ", "inserted", " ", "at", " ", "every", " ", "page_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "bottom", ",", " ", "usi", "ng", " ", "the", " ", "give", "n", " ", "strf", "time", " ", "format", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "empty", " ", "string", " ", "is", " ", "equivalent", " ", "to", " ", "'%", "b", " ", "%", "d", ",", " ", "%", "Y", "'.", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "last", "\\u", "update", "d\\u", "fmt", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "Sma", "rty", "Pant", "s", " ", "will", " ", "be", " ", "used", " ", "to", " ", "convert", " ", "quote", "s", " ", "and", " ", "dashes", " ", "to_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "typo", "graphical", "ly", " ", "correct", " ", "entit", "ies", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "use", "\\u", "smart", "ypa", "nts", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Custom", " ", "sidebar", " ", "template", "s", ",", " ", "maps", " ", "document", " ", "names", " ", "to", " ", "template", " ", "names", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "sidebar", "s", " ", "=", " ", "{}", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Addition", "al", " ", "template", "s", " ", "tha", "t", " ", "shou", "ld", " ", "be", " ", "render", "ed", " ", "to", " ", "page", "s", ",", " ", "maps", " ", "page", " ", "names", " ", "to_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "template", " ", "names", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "addition", "al", "\\u", "page", "s", " ", "=", " ", "{}", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "fal", "se", ",", " ", "no", " ", "module", " ", "index", " ", "is", " ", "generat", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "domain", "\\u", "indice", "s", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "fal", "se", ",", " ", "no", " ", "index", " ", "is", " ", "generat", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "use", "\\u", "index", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "the", " ", "index", " ", "is", " ", "split", " ", "int", "o", " ", "individual", " ", "page", "s", " ", "for", " ", "each", " ", "letter", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "split", "\\u", "index", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "link", "s", " ", "to", " ", "the", " ", "re", "ST", " ", "source", "s", " ", "are", " ", "adde", "d", " ", "to", " ", "the", " ", "page", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "show", "\\u", "source", "link", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "\"", "Creat", "ed", " ", "usi", "ng", " ", "Sph", "inx", "\"", " ", "is", " ", "shown", " ", "in", " ", "the", " ", "HTM", "L", " ", "footer", ".", " ", "Default", " ", "is", " ", "Tru", "e", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "show", "\\u", "sphinx", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "\"(", "C", ")", " ", "Copy", "right", " ", "...\"", " ", "is", " ", "shown", " ", "in", " ", "the", " ", "HTM", "L", " ", "footer", ".", " ", "Default", " ", "is", " ", "Tru", "e", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "show", "\\u", "copyr", "ight", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "an", " ", "Open", "Sear", "ch", " ", "description", " ", "file", " ", "will", " ", "be", " ", "output", ",", " ", "and", " ", "all", " ", "page", "s", " ", "will", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "contain", " ", "a", " ", "<", "link", ">", " ", "tag", " ", "refer", "ring", " ", "to", " ", "it", ".", " ", " ", "The", " ", "value", " ", "of", " ", "this", " ", "option", " ", "must", " ", "be", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "base", " ", "URL", " ", "from", " ", "whi", "ch", " ", "the", " ", "finish", "ed", " ", "HTM", "L", " ", "is", " ", "serve", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "use", "\\u", "opens", "ear", "ch", " ", "=", " ", "''_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Thi", "s", " ", "is", " ", "the", " ", "file", " ", "name", " ", "suff", "ix", " ", "for", " ", "HTM", "L", " ", "files", " ", "(", "e", ".", "g", ".", " ", "\".", "xh", "tml", "\")", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "file", "\\u", "suff", "ix", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Lang", "ua", "ge", " ", "to", " ", "be", " ", "used", " ", "for", " ", "generat", "ing", " ", "the", " ", "HTM", "L", " ", "full", "-", "text", " ", "search", " ", "index", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sph", "inx", " ", "support", "s", " ", "the", " ", "follow", "ing", " ", "language", "s", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "'", "da", "',", " ", "'", "de", "',", " ", "'", "en", "',", " ", "'", "es", "',", " ", "'", "fi", "',", " ", "'", "fr", "',", " ", "'", "hu", "',", " ", "'", "it", "',", " ", "'", "ja", "'_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", " ", "'", "nl", "',", " ", "'", "no", "',", " ", "'", "pt", "',", " ", "'", "ro", "',", " ", "'", "ru", "',", " ", "'", "sv", "',", " ", "'", "tr", "',", " ", "'", "zh", "'_", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "search", "\\u", "language", " ", "=", " ", "'", "en", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "A", " ", "dictionar", "y", " ", "with", " ", "options", " ", "for", " ", "the", " ", "search", " ", "language", " ", "support", ",", " ", "empty", " ", "by", " ", "default", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "'", "ja", "'", " ", "use", "s", " ", "this", " ", "config", " ", "value", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "'", "zh", "'", " ", "user", " ", "can", " ", "custom", " ", "change", " ", "`", "jie", "ba", "`", " ", "dictionar", "y", " ", "path", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "search", "\\u", "options", " ", "=", " ", "{", "'", "type", "':", " ", "'", "default", "'}", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "of", " ", "a", " ", "javascript", " ", "file", " ", "(", "relative", " ", "to", " ", "the", " ", "configura", "tion", " ", "director", "y", ")", " ", "that_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "implement", "s", " ", "a", " ", "search", " ", "results", " ", "scorer", ".", " ", "If", " ", "empty", ",", " ", "the", " ", "default", " ", "will", " ", "be", " ", "used", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "html", "\\u", "search", "\\u", "scorer", " ", "=", " ", "'", "scorer", ".", "js", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Output", " ", "file", " ", "base", " ", "name", " ", "for", " ", "HTM", "L", " ", "help", " ", "builde", "r", "._", "\\u\\u\\uNL\\u\\u\\u_", "html", "help", "\\u", "basename_", "=_", "'", "Dj", "ang", "o", "Databa", "se", "File", "Stor", "age", "doc", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--", " ", "Optio", "ns", " ", "for", " ", "La", "Te", "X", " ", "output", " ", "--------------", "--------------", "--------------", "---", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "late", "x", "\\u", "elements_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "pape", "r", " ", "size", " ", "('", "letter", "pape", "r", "'", " ", "or", " ", "'", "a4", "pape", "r", "')", "._", "\\u\\u\\uNL\\u\\u\\u_", "#'", "papers", "ize", "':", " ", "'", "letter", "pape", "r", "',", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "font", " ", "size", " ", "('", "10", "pt", "',", " ", "'", "11", "pt", "'", " ", "or", " ", "'", "1", "2p", "t", "')", "._", "\\u\\u\\uNL\\u\\u\\u_", "#'", "points", "ize", "':", " ", "'", "10", "pt", "',", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Addition", "al", " ", "stu", "ff", " ", "for", " ", "the", " ", "La", "Te", "X", " ", "preamble", "._", "\\u\\u\\uNL\\u\\u\\u_", "#'", "preamble", "':", " ", "''", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Latex", " ", "figure", " ", "(", "float", ")", " ", "alignment_", "\\u\\u\\uNL\\u\\u\\u_", "#'", "figure", "\\u", "align", "':", " ", "'", "ht", "bp", "',", "_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Group", "ing", " ", "the", " ", "document", " ", "tree", " ", "int", "o", " ", "La", "Te", "X", " ", "files", ".", " ", "List", " ", "of", " ", "tuples_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "(", "source", " ", "start", " ", "file", ",", " ", "target", " ", "name", ",", " ", "title", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "author", ",", " ", "document", "class", " ", "[", "how", "to", ",", " ", "manu", "al", ",", " ", "or", " ", "own", " ", "class", "])", "._", "\\u\\u\\uNL\\u\\u\\u_", "late", "x", "\\u", "documents_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "master", "\\u", "doc_", ",_", "'", "Dj", "ang", "o", "Databa", "se", "File", "Stor", "age", ".", "tex", "'_", ",_", "u", "'", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", " ", "Document", "ation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "u", "'", "Victor", " ", "Oli", "vei", "ra", " ", "da", " ", "Sil", "va", "'_", ",_", "'", "manu", "al", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "The", " ", "name", " ", "of", " ", "an", " ", "image", " ", "file", " ", "(", "relative", " ", "to", " ", "this", " ", "director", "y", ")", " ", "to", " ", "place", " ", "at", " ", "the", " ", "top", " ", "of_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "the", " ", "title", " ", "page", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "logo", " ", "=", " ", "None_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "For", " ", "\"", "manu", "al", "\"", " ", "document", "s", ",", " ", "if", " ", "this", " ", "is", " ", "true", ",", " ", "then", " ", "toplevel", " ", "heading", "s", " ", "are", " ", "part", "s", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "not", " ", "chapters", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "use", "\\u", "part", "s", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "show", " ", "page", " ", "reference", "s", " ", "after", " ", "internal", " ", "link", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "show", "\\u", "pager", "ef", "s", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "show", " ", "URL", " ", "addresse", "s", " ", "after", " ", "external", " ", "link", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "show", "\\u", "urls", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Document", "s", " ", "to", " ", "append", " ", "as", " ", "an", " ", "appendi", "x", " ", "to", " ", "all", " ", "manu", "als", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "appendi", "ces", " ", "=", " ", "[]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "fal", "se", ",", " ", "no", " ", "module", " ", "index", " ", "is", " ", "generat", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "late", "x", "\\u", "domain", "\\u", "indice", "s", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--", " ", "Optio", "ns", " ", "for", " ", "manu", "al", " ", "page", " ", "output", " ", "--------------", "--------------", "-----------", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "One", " ", "entry", " ", "per", " ", "manu", "al", " ", "page", ".", " ", "List", " ", "of", " ", "tuples_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "(", "source", " ", "start", " ", "file", ",", " ", "name", ",", " ", "description", ",", " ", "author", "s", ",", " ", "manu", "al", " ", "section", ").", "_", "\\u\\u\\uNL\\u\\u\\u_", "man", "\\u", "pages_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "master", "\\u", "doc_", ",_", "'", "django", "databa", "se", "filest", "ora", "ge", "'_", ",_", "u", "'", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", " ", "Document", "ation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "[_", "author_", "]_", ",_", "1_", ")_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "show", " ", "URL", " ", "addresse", "s", " ", "after", " ", "external", " ", "link", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "man", "\\u", "show", "\\u", "urls", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "--", " ", "Optio", "ns", " ", "for", " ", "Tex", "info", " ", "output", " ", "--------------", "--------------", "--------------", "-_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Group", "ing", " ", "the", " ", "document", " ", "tree", " ", "int", "o", " ", "Tex", "info", " ", "files", ".", " ", "List", " ", "of", " ", "tuples_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "(", "source", " ", "start", " ", "file", ",", " ", "target", " ", "name", ",", " ", "title", ",", " ", "author", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "dir", " ", "menu", " ", "entry", ",", " ", "description", ",", " ", "category", ")_", "\\u\\u\\uNL\\u\\u\\u_", "tex", "info", "\\u", "documents_", "=_", "[_", "\\u\\u\\uNL\\u\\u\\u_", "(_", "master", "\\u", "doc_", ",_", "'", "Dj", "ang", "o", "Databa", "se", "File", "Stor", "age", "'_", ",_", "u", "'", "Dj", "ang", "o", " ", "Databa", "se", " ", "File", " ", "Stor", "age", " ", "Document", "ation", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "author_", ",_", "'", "Dj", "ang", "o", "Databa", "se", "File", "Stor", "age", "'_", ",_", "'", "One", " ", "line", " ", "description", " ", "of", " ", "project", ".'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "Mis", "cell", "ane", "ous", "'_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Document", "s", " ", "to", " ", "append", " ", "as", " ", "an", " ", "appendi", "x", " ", "to", " ", "all", " ", "manu", "als", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "tex", "info", "\\u", "appendi", "ces", " ", "=", " ", "[]", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "fal", "se", ",", " ", "no", " ", "module", " ", "index", " ", "is", " ", "generat", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "tex", "info", "\\u", "domain", "\\u", "indice", "s", " ", "=", " ", "True_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Ho", "w", " ", "to", " ", "display", " ", "URL", " ", "addresse", "s", ":", " ", "'", "footnote", "',", " ", "'", "no", "',", " ", "or", " ", "'", "inline", "'.", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "tex", "info", "\\u", "show", "\\u", "urls", " ", "=", " ", "'", "footnote", "'_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "If", " ", "true", ",", " ", "do", " ", "not", " ", "generat", "e", " ", "a", " ", "@", "deta", "il", "menu", " ", "in", " ", "the", " ", "\"", "Top", "\"", " ", "node", "'", "s", " ", "menu", "._", "\\u\\u\\uNL\\u\\u\\u_", "#", "tex", "info", "\\u", "no", "\\u", "deta", "il", "menu", " ", "=", " ", "False_", "\\u\\u\\uNL\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Variable defined multiple times
zzzeek/sqlalchemy/test/dialect/postgresql/test_reflection.py
[ { "content": " @testing.fails_if(\"postgresql < 8.4\",\n \"Better int2vector functions not available\")\n @testing.provide_metadata\n def test_reflected_primary_key_order(self):\n meta1 = self.metadata\n subject = Table('subject', meta1,\n Column('p1', Integer, primary_key=True),\n Column('p2', Integer, primary_key=True),\n PrimaryKeyConstraint('p2', 'p1')\n )\n meta1.create_all()\n meta2 = MetaData(testing.db)\n subject = Table('subject', meta2, autoload=True)\n eq_(subject.primary_key.columns.keys(), ['p2', 'p1'])", "metadata": "root.ReflectionTest.test_reflected_primary_key_order", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 255 }, { "content": " @testing.provide_metadata\n def test_pg_weirdchar_reflection(self):\n meta1 = self.metadata\n subject = Table('subject', meta1, Column('id$', Integer,\n primary_key=True))\n referer = Table(\n 'referer', meta1,\n Column(\n 'id', Integer, primary_key=True),\n Column(\n 'ref', Integer, ForeignKey('subject.id$')))\n meta1.create_all()\n meta2 = MetaData(testing.db)\n subject = Table('subject', meta2, autoload=True)\n referer = Table('referer', meta2, autoload=True)\n self.assert_((subject.c['id$']\n == referer.c.ref).compare(\n subject.join(referer).onclause))", "metadata": "root.ReflectionTest.test_pg_weirdchar_reflection", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 270 }, { "content": " @testing.provide_metadata\n def test_cross_schema_reflection_one(self):\n\n meta1 = self.metadata\n\n users = Table('users', meta1,\n Column('user_id', Integer, primary_key=True),\n Column('user_name', String(30), nullable=False),\n schema='test_schema')\n addresses = Table(\n 'email_addresses', meta1,\n Column(\n 'address_id', Integer, primary_key=True),\n Column(\n 'remote_user_id', Integer, ForeignKey(\n users.c.user_id)),\n Column(\n 'email_address', String(20)), schema='test_schema')\n meta1.create_all()\n meta2 = MetaData(testing.db)\n addresses = Table('email_addresses', meta2, autoload=True,\n schema='test_schema')\n users = Table('users', meta2, mustexist=True,\n schema='test_schema')\n j = join(users, addresses)\n self.assert_((users.c.user_id\n == addresses.c.remote_user_id).compare(j.onclause))", "metadata": "root.ReflectionTest.test_cross_schema_reflection_one", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 347 }, { "content": " @testing.provide_metadata\n def test_cross_schema_reflection_two(self):\n meta1 = self.metadata\n subject = Table('subject', meta1,\n Column('id', Integer, primary_key=True))\n referer = Table('referer', meta1,\n Column('id', Integer, primary_key=True),\n Column('ref', Integer, ForeignKey('subject.id')),\n schema='test_schema')\n meta1.create_all()\n meta2 = MetaData(testing.db)\n subject = Table('subject', meta2, autoload=True)\n referer = Table('referer', meta2, schema='test_schema',\n autoload=True)\n self.assert_((subject.c.id\n == referer.c.ref).compare(\n subject.join(referer).onclause))", "metadata": "root.ReflectionTest.test_cross_schema_reflection_two", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 375 }, { "content": " @testing.provide_metadata\n def test_cross_schema_reflection_three(self):\n meta1 = self.metadata\n subject = Table('subject', meta1,\n Column('id', Integer, primary_key=True),\n schema='test_schema_2')\n referer = Table(\n 'referer',\n meta1,\n Column(\n 'id',\n Integer,\n primary_key=True),\n Column(\n 'ref',\n Integer,\n ForeignKey('test_schema_2.subject.id')),\n schema='test_schema')\n meta1.create_all()\n meta2 = MetaData(testing.db)\n subject = Table('subject', meta2, autoload=True,\n schema='test_schema_2')\n referer = Table('referer', meta2, autoload=True,\n schema='test_schema')\n self.assert_((subject.c.id\n == referer.c.ref).compare(\n subject.join(referer).onclause))", "metadata": "root.ReflectionTest.test_cross_schema_reflection_three", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 393 }, { "content": " @testing.provide_metadata\n def test_cross_schema_reflection_four(self):\n meta1 = self.metadata\n subject = Table('subject', meta1,\n Column('id', Integer, primary_key=True),\n schema='test_schema_2')\n referer = Table(\n 'referer',\n meta1,\n Column(\n 'id',\n Integer,\n primary_key=True),\n Column(\n 'ref',\n Integer,\n ForeignKey('test_schema_2.subject.id')),\n schema='test_schema')\n meta1.create_all()\n\n conn = testing.db.connect()\n conn.detach()\n conn.execute(\"SET search_path TO test_schema, test_schema_2\")\n meta2 = MetaData(bind=conn)\n subject = Table('subject', meta2, autoload=True,\n schema='test_schema_2',\n postgresql_ignore_search_path=True)\n referer = Table('referer', meta2, autoload=True,\n schema='test_schema',\n postgresql_ignore_search_path=True)\n self.assert_((subject.c.id\n == referer.c.ref).compare(\n subject.join(referer).onclause))\n conn.close()", "metadata": "root.ReflectionTest.test_cross_schema_reflection_four", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 421 }, { "content": " @testing.provide_metadata\n def test_cross_schema_reflection_five(self):\n meta1 = self.metadata\n\n # we assume 'public'\n default_schema = testing.db.dialect.default_schema_name\n subject = Table('subject', meta1,\n Column('id', Integer, primary_key=True))\n referer = Table('referer', meta1,\n Column('id', Integer, primary_key=True),\n Column('ref', Integer, ForeignKey('subject.id')))\n meta1.create_all()\n\n meta2 = MetaData(testing.db)\n subject = Table('subject', meta2, autoload=True,\n schema=default_schema,\n postgresql_ignore_search_path=True\n )\n referer = Table('referer', meta2, autoload=True,\n schema=default_schema,\n postgresql_ignore_search_path=True\n )\n assert subject.schema == default_schema\n self.assert_((subject.c.id\n == referer.c.ref).compare(\n subject.join(referer).onclause))", "metadata": "root.ReflectionTest.test_cross_schema_reflection_five", "header": "['class', 'ReflectionTest', '(', 'fixtures', '.', 'TestBase', ')', ':', '___EOS___']", "index": 456 } ]
[ { "span": "subject ", "start_line": 260, "start_column": 8, "end_line": 260, "end_column": 15 }, { "span": "subject ", "start_line": 273, "start_column": 8, "end_line": 273, "end_column": 15 }, { "span": "referer ", "start_line": 275, "start_column": 8, "end_line": 275, "end_column": 15 }, { "span": "addresses ", "start_line": 356, "start_column": 8, "end_line": 356, "end_column": 17 }, { "span": "subject ", "start_line": 378, "start_column": 8, "end_line": 378, "end_column": 15 }, { "span": "referer ", "start_line": 380, "start_column": 8, "end_line": 380, "end_column": 15 }, { "span": "subject ", "start_line": 396, "start_column": 8, "end_line": 396, "end_column": 15 }, { "span": "referer ", "start_line": 399, "start_column": 8, "end_line": 399, "end_column": 15 }, { "span": "subject ", "start_line": 424, "start_column": 8, "end_line": 424, "end_column": 15 }, { "span": "referer ", "start_line": 427, "start_column": 8, "end_line": 427, "end_column": 15 }, { "span": "subject ", "start_line": 462, "start_column": 8, "end_line": 462, "end_column": 15 }, { "span": "referer ", "start_line": 464, "start_column": 8, "end_line": 464, "end_column": 15 } ]
[ { "span": "subject ", "start_line": 267, "start_column": 8, "end_line": 267, "end_column": 15 }, { "span": "subject ", "start_line": 283, "start_column": 8, "end_line": 283, "end_column": 15 }, { "span": "referer ", "start_line": 284, "start_column": 8, "end_line": 284, "end_column": 15 }, { "span": "addresses ", "start_line": 367, "start_column": 8, "end_line": 367, "end_column": 17 }, { "span": "subject ", "start_line": 386, "start_column": 8, "end_line": 386, "end_column": 15 }, { "span": "referer ", "start_line": 387, "start_column": 8, "end_line": 387, "end_column": 15 }, { "span": "subject ", "start_line": 413, "start_column": 8, "end_line": 413, "end_column": 15 }, { "span": "referer ", "start_line": 415, "start_column": 8, "end_line": 415, "end_column": 15 }, { "span": "subject ", "start_line": 445, "start_column": 8, "end_line": 445, "end_column": 15 }, { "span": "referer ", "start_line": 448, "start_column": 8, "end_line": 448, "end_column": 15 }, { "span": "subject ", "start_line": 470, "start_column": 8, "end_line": 470, "end_column": 15 }, { "span": "referer ", "start_line": 474, "start_column": 8, "end_line": 474, "end_column": 15 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "testing_", "._", "fail", "s", "\\u", "if_", "(_", "\"", "postgres", "ql", " ", "<", " ", "8.4", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "Bet", "ter", " ", "int2", "vector", " ", "function", "s", " ", "not", " ", "avail", "able", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "reflect", "ed", "\\u", "primary", "\\u", "key", "\\u", "order_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "p1", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "p2", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Prim", "ary", "Key", "Constraint_", "(_", "'", "p2", "'_", ",_", "'", "p1", "'_", ")_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "eq\\u_", "(_", "subject_", "._", "primary", "\\u", "key_", "._", "columns_", "._", "keys_", "(_", ")_", ",_", "[_", "'", "p2", "'_", ",_", "'", "p1", "'_", "]_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "pg", "\\u", "weird", "char", "\\u", "reflection_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "Column_", "(_", "'", "id", "$'_", ",_", "Integer_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "primary", "\\u", "key_", "=_", "True_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "refere", "r", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "ref", "'_", ",_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "subject", ".", "id", "$'_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "subject_", "._", "c_", "[_", "'", "id", "$'_", "]_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "referer_", "._", "c_", "._", "ref_", ")_", "._", "compare_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "subject_", "._", "join_", "(_", "referer_", ")_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "cross", "\\u", "schema", "\\u", "reflection", "\\u", "one_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "users_", "=_", "Table_", "(_", "'", "users", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "user", "\\u", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "user", "\\u", "name", "'_", ",_", "String_", "(_", "30_", ")_", ",_", "nullable_", "=_", "False_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "addresses_", "=_", "Table_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "email", "\\u", "addresse", "s", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "address", "\\u", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "remote", "\\u", "user", "\\u", "id", "'_", ",_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "users_", "._", "c_", "._", "user", "\\u", "id_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "email", "\\u", "address", "'_", ",_", "String_", "(_", "20_", ")_", ")_", ",_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "addresses_", "=_", "Table_", "(_", "'", "email", "\\u", "addresse", "s", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "users_", "=_", "Table_", "(_", "'", "users", "'_", ",_", "meta", "2_", ",_", "must", "exist_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "j_", "=_", "join_", "(_", "users_", ",_", "addresses_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "users_", "._", "c_", "._", "user", "\\u", "id_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "addresses_", "._", "c_", "._", "remote", "\\u", "user", "\\u", "id_", ")_", "._", "compare_", "(_", "j_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "cross", "\\u", "schema", "\\u", "reflection", "\\u", "two_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "ref", "'_", ",_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "subject", ".", "id", "'_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "2_", ",_", "schema_", "=_", "'", "test\\u", "schema", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "autoload", "_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "subject_", "._", "c_", "._", "id_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "referer_", "._", "c_", "._", "ref_", ")_", "._", "compare_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "subject_", "._", "join_", "(_", "referer_", ")_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "cross", "\\u", "schema", "\\u", "reflection", "\\u", "three_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "\\u", "2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "refere", "r", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Integer_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "ref", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Integer_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Fore", "ign", "Key_", "(_", "'", "test\\u", "schema", "\\u", "2", ".", "subject", ".", "id", "'_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "\\u", "2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "subject_", "._", "c_", "._", "id_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "referer_", "._", "c_", "._", "ref_", ")_", "._", "compare_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "subject_", "._", "join_", "(_", "referer_", ")_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "cross", "\\u", "schema", "\\u", "reflection", "\\u", "four", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "\\u", "2", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "refere", "r", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "id", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Integer_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "'", "ref", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Integer_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Fore", "ign", "Key_", "(_", "'", "test\\u", "schema", "\\u", "2", ".", "subject", ".", "id", "'_", ")_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "conn_", "=_", "testing_", "._", "db_", "._", "connect_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "detach_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "execute_", "(_", "\"", "SET", " ", "search", "\\u", "path", " ", "TO", " ", "test\\u", "schema", ",", " ", "test\\u", "schema", "\\u", "2", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "bind_", "=_", "conn_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "\\u", "2", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "postgres", "ql", "\\u", "ignore", "\\u", "search", "\\u", "path_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "'", "test\\u", "schema", "'_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "postgres", "ql", "\\u", "ignore", "\\u", "search", "\\u", "path_", "=_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "subject_", "._", "c_", "._", "id_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "referer_", "._", "c_", "._", "ref_", ")_", "._", "compare_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "subject_", "._", "join_", "(_", "referer_", ")_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "conn_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "testing_", "._", "provide", "\\u", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "cross", "\\u", "schema", "\\u", "reflection", "\\u", "five", "_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "meta", "1_", "=_", "self_", "._", "metadata_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "we", " ", "assume", " ", "'", "public", "'_", "\\u\\u\\uNL\\u\\u\\u_", "default", "\\u", "schema_", "=_", "testing_", "._", "db_", "._", "dialect_", "._", "default", "\\u", "schema", "\\u", "name_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "1_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "id", "'_", ",_", "Integer_", ",_", "primary", "\\u", "key_", "=_", "True_", ")_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "Column_", "(_", "'", "ref", "'_", ",_", "Integer_", ",_", "Fore", "ign", "Key_", "(_", "'", "subject", ".", "id", "'_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "1_", "._", "create", "\\u", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "meta", "2_", "=_", "Meta", "Data_", "(_", "testing_", "._", "db_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "subject_", "=_", "Table_", "(_", "'", "subject", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "default", "\\u", "schema_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "postgres", "ql", "\\u", "ignore", "\\u", "search", "\\u", "path_", "=_", "True_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "referer_", "=_", "Table_", "(_", "'", "refere", "r", "'_", ",_", "meta", "2_", ",_", "autoload", "_", "=_", "True_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "schema_", "=_", "default", "\\u", "schema_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "postgres", "ql", "\\u", "ignore", "\\u", "search", "\\u", "path_", "=_", "True_", "\\u\\u\\uNL\\u\\u\\u_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "assert_", "subject_", "._", "schema_", "==_", "default", "\\u", "schema_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "assert\\u_", "(_", "(_", "subject_", "._", "c_", "._", "id_", "\\u\\u\\uNL\\u\\u\\u_", "==_", "referer_", "._", "c_", "._", "ref_", ")_", "._", "compare_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "subject_", "._", "join_", "(_", "referer_", ")_", "._", "onc", "lau", "se_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
Impactstory/total-impact-core/totalimpact/providers/pmc.py
[ { "content": "import hashlib, simplejson, os, collections\n\nfrom totalimpact import db\nfrom totalimpact.providers import provider\nfrom totalimpact.providers.provider import Provider, ProviderContentMalformedError\nfrom totalimpact.provider_batch_data import ProviderBatchData\n\nimport logging\nlogger = logging.getLogger('ti.providers.pmc')\n\nbatch_data = None\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Pmc(Provider): \n\n example_id = (\"pmid\", \"23066504\")\n provenance_url_template = None\n url = \"http://www.ncbi.nlm.nih.gov/pmc\"\n descr = \"a free archive of biomedical and life sciences journal literature at the NIH/NLM\"\n static_meta_dict = {\n \"pdf_downloads\": {\n \"display_name\": \"PDF downloads\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of times the PDF has been downloaded from PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n },\n \"abstract_views\": {\n \"display_name\": \"abstract views\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of times the abstract has been viewed on PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n }, \n \"fulltext_views\": {\n \"display_name\": \"fulltext views\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of times the full text has been viewed on PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n }, \n \"unique_ip_views\": {\n \"display_name\": \"unique IP views\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of unique IP addresses that have viewed this on PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n }, \n \"figure_views\": {\n \"display_name\": \"figure views\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of times the figures have been viewed on PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n }, \n \"suppdata_views\": {\n \"display_name\": \"suppdata views\",\n \"provider\": \"PMC\",\n \"provider_url\": \"http://www.ncbi.nlm.nih.gov/pmc\",\n \"description\": \"Number of times the supplementary data has been viewed on PMC\",\n \"icon\": \"http://www.ncbi.nlm.nih.gov/favicon.ico\"\n } \n }\n\n\n\n\n\n\n", "metadata": "root.Pmc", "header": "['module', '___EOS___']", "index": 12 }, { "content": " def __init__(self):\n super(Pmc, self).__init__()", "metadata": "root.Pmc.__init__", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 63 }, { "content": " def is_relevant_alias(self, alias):\n (namespace, nid) = alias\n return(\"pmid\" == namespace)", "metadata": "root.Pmc.is_relevant_alias", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 66 }, { "content": " def build_batch_data_dict(self):\n logger.info(u\"Building batch data for PMC\")\n batch_data = collections.defaultdict(list)\n\n matches = ProviderBatchData.query.filter_by(provider=\"pmc\").all()\n for provider_batch_data_obj in matches:\n for nid in provider_batch_data_obj.aliases[\"pmid\"]:\n pmid_alias = (\"pmid\", nid)\n batch_data[pmid_alias] += [{\"raw\": provider_batch_data_obj.raw, \n \"max_event_date\":provider_batch_data_obj.max_event_date}]\n\n logger.info(u\"Finished building batch data for PMC: {n} rows\".format(n=len(batch_data)))\n\n return batch_data", "metadata": "root.Pmc.build_batch_data_dict", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 70 }, { "content": " def has_applicable_batch_data(self, namespace, nid):\n has_applicable_batch_data = False\n\n matches = ProviderBatchData.query.filter_by(provider=\"pmc\").all()\n for provider_batch_data_obj in matches:\n if nid in provider_batch_data_obj.aliases[namespace]:\n has_applicable_batch_data = True\n\n return has_applicable_batch_data", "metadata": "root.Pmc.has_applicable_batch_data", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 85 }, { "content": " def _extract_metrics(self, page, status_code=200, id=None): \n if status_code != 200:\n if status_code == 404:\n return {}\n else:\n raise(self._get_error(status_code))\n\n if \"<pmc-web-stat>\" not in page:\n raise ProviderContentMalformedError\n\n (doc, lookup_function) = provider._get_doc_from_xml(page)\n if not doc:\n return {}\n try:\n articles = doc.getElementsByTagName(\"article\")\n for article in articles:\n print article\n metrics_dict = {} \n meta_data = article.getElementsByTagName(\"meta-data\")[0]\n pmid = meta_data.getAttribute(\"pubmed-id\")\n if id == pmid:\n metrics = article.getElementsByTagName(\"usage\")[0]\n \n pdf_downloads = int(metrics.getAttribute(\"pdf\"))\n if pdf_downloads:\n metrics_dict.update({'pmc:pdf_downloads': pdf_downloads})\n\n abstract_views = int(metrics.getAttribute(\"abstract\"))\n if abstract_views:\n metrics_dict.update({'pmc:abstract_views': abstract_views})\n\n fulltext_views = int(metrics.getAttribute(\"full-text\"))\n if fulltext_views:\n metrics_dict.update({'pmc:fulltext_views': fulltext_views})\n\n unique_ip_views = int(metrics.getAttribute(\"unique-ip\"))\n if unique_ip_views:\n metrics_dict.update({'pmc:unique_ip_views': unique_ip_views})\n\n figure_views = int(metrics.getAttribute(\"figure\"))\n if figure_views:\n metrics_dict.update({'pmc:figure_views': figure_views})\n\n suppdata_views = int(metrics.getAttribute(\"supp-data\"))\n if suppdata_views:\n metrics_dict.update({'pmc:suppdata_views': suppdata_views})\n\n return metrics_dict\n\n except (KeyError, IndexError, TypeError):\n pass\n\n return {}", "metadata": "root.Pmc._extract_metrics", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 95 }, { "content": " def _get_metrics_and_drilldown(self, pages, pmid):\n metrics_dict = {}\n for page in pages:\n one_month_metrics_dict = self._extract_metrics(page, id=pmid)\n print one_month_metrics_dict\n for metric in one_month_metrics_dict:\n try:\n metrics_dict[metric] += one_month_metrics_dict[metric]\n except KeyError:\n metrics_dict[metric] = one_month_metrics_dict[metric]\n metrics_and_drilldown = {}\n for metric_name in metrics_dict:\n drilldown_url = \"\"\n metrics_and_drilldown[metric_name] = (metrics_dict[metric_name], drilldown_url)\n return metrics_and_drilldown", "metadata": "root.Pmc._get_metrics_and_drilldown", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 149 }, { "content": " def metrics(self, \n aliases,\n provider_url_template=None, # ignore this because multiple url steps\n cache_enabled=True):\n\n # if haven't loaded batch_data, return no metrics\n global batch_data\n if not batch_data:\n batch_data = self.build_batch_data_dict()\n pass\n\n metrics_and_drilldown = {}\n\n # Only lookup metrics for items with appropriate ids\n from totalimpact import item\n aliases_dict = item.alias_dict_from_tuples(aliases)\n try:\n pmid = aliases_dict[\"pmid\"][0]\n except KeyError:\n return {}\n \n pmid_alias = (\"pmid\", pmid)\n page = \"\"\n\n if pmid_alias in batch_data:\n pages = [page[\"raw\"] for page in batch_data[pmid_alias]]\n if page:\n metrics_and_drilldown = self._get_metrics_and_drilldown(pages, pmid)\n\n return metrics_and_drilldown", "metadata": "root.Pmc.metrics", "header": "['class', 'Pmc', '(', 'Provider', ')', ':', '___EOS___']", "index": 165 } ]
[ { "span": "import hashlib, simplejson, os, collections", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 43 }, { "span": "from totalimpact import db", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 26 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "hashlib_", ",_", "simplejson_", ",_", "os_", ",_", "collections_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "total", "impact", "_", "import_", "db_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "total", "impact", "_", "._", "providers_", "import_", "provider_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "total", "impact", "_", "._", "providers_", "._", "provider_", "import_", "Provider_", ",_", "Provider", "Conten", "t", "Mal", "formed", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "total", "impact", "_", "._", "provide", "r", "\\u", "batch", "\\u", "data_", "import_", "Provider", "Bat", "ch", "Data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "logger_", "=_", "logging_", "._", "get", "Logger_", "(_", "'", "ti", ".", "provide", "rs", ".", "pmc", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "batch", "\\u", "data_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "example", "\\u", "id_", "=_", "(_", "\"", "pmid", "\"_", ",_", "\"", "230", "665", "04", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "provenance", "\\u", "url", "\\u", "template_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "url_", "=_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "descr_", "=_", "\"", "a", " ", "free", " ", "archive", " ", "of", " ", "biom", "edic", "al", " ", "and", " ", "life", " ", "scie", "nce", "s", " ", "journal", " ", "litera", "ture", " ", "at", " ", "the", " ", "NI", "H", "/", "NL", "M", "\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "static", "\\u", "meta", "\\u", "dict_", "=_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "pdf", "\\u", "download", "s", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "PD", "F", " ", "download", "s", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "times", " ", "the", " ", "PD", "F", " ", "has", " ", "bee", "n", " ", "download", "ed", " ", "from", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "abstract", "\\u", "views", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "abstract", " ", "views", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "times", " ", "the", " ", "abstract", " ", "has", " ", "bee", "n", " ", "viewed", " ", "on", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "fullt", "ext", "\\u", "views", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "fullt", "ext", " ", "views", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "times", " ", "the", " ", "full", " ", "text", " ", "has", " ", "bee", "n", " ", "viewed", " ", "on", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "unique", "\\u", "ip", "\\u", "views", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "unique", " ", "IP", " ", "views", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "unique", " ", "IP", " ", "addresse", "s", " ", "tha", "t", " ", "have", " ", "viewed", " ", "this", " ", "on", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "figure", "\\u", "views", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "figure", " ", "views", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "times", " ", "the", " ", "figure", "s", " ", "have", " ", "bee", "n", " ", "viewed", " ", "on", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "supp", "data\\u", "views", "\"_", ":_", "{_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "display", "\\u", "name", "\"_", ":_", "\"", "supp", "data", " ", "views", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\"_", ":_", "\"", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "provide", "r", "\\u", "url", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "pmc", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "description", "\"_", ":_", "\"", "Number", " ", "of", " ", "times", " ", "the", " ", "supplement", "ary", " ", "data", " ", "has", " ", "bee", "n", " ", "viewed", " ", "on", " ", "PM", "C", "\"_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "icon", "\"_", ":_", "\"", "http", "://", "www", ".", "ncbi", ".", "nlm", ".", "ni", "h", ".", "gov", "/", "fav", "icon", ".", "ico", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNL\\u\\u\\u_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "super_", "(_", "Pm", "c_", ",_", "self_", ")_", "._", "\\u\\u", "init\\u\\u_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "is", "\\u", "rele", "van", "t", "\\u", "alias_", "(_", "self_", ",_", "alias_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "(_", "namespace_", ",_", "nid_", ")_", "=_", "alias_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "(_", "\"", "pmid", "\"_", "==_", "namespace_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "build", "\\u", "batch", "\\u", "data\\u", "dict_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "logger_", "._", "info_", "(_", "u", "\"", "Building", " ", "batch", " ", "data", " ", "for", " ", "PM", "C", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "batch", "\\u", "data_", "=_", "collections_", "._", "defaultdict_", "(_", "list_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "matches_", "=_", "Provider", "Bat", "ch", "Data_", "._", "query_", "._", "filter", "\\u", "by_", "(_", "provider_", "=_", "\"", "pmc", "\"_", ")_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "in_", "matches_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "for_", "nid_", "in_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "._", "aliases_", "[_", "\"", "pmid", "\"_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pmid", "\\u", "alias_", "=_", "(_", "\"", "pmid", "\"_", ",_", "nid_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "batch", "\\u", "data_", "[_", "pmid", "\\u", "alias_", "]_", "+=_", "[_", "{_", "\"", "raw", "\"_", ":_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "._", "raw_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "\"", "max", "\\u", "event", "\\u", "date", "\"_", ":_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "._", "max", "\\u", "event", "\\u", "date_", "}_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "logger_", "._", "info_", "(_", "u", "\"", "Finish", "ed", " ", "buildi", "ng", " ", "batch", " ", "data", " ", "for", " ", "PM", "C", ":", " ", "{", "n", "}", " ", "rows", "\"_", "._", "format_", "(_", "n_", "=_", "len_", "(_", "batch", "\\u", "data_", ")_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "return_", "batch", "\\u", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "has", "\\u", "applica", "ble", "\\u", "batch", "\\u", "data_", "(_", "self_", ",_", "namespace_", ",_", "nid_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "has", "\\u", "applica", "ble", "\\u", "batch", "\\u", "data_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "matches_", "=_", "Provider", "Bat", "ch", "Data_", "._", "query_", "._", "filter", "\\u", "by_", "(_", "provider_", "=_", "\"", "pmc", "\"_", ")_", "._", "all_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "in_", "matches_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "nid_", "in_", "provide", "r", "\\u", "batch", "\\u", "data\\u", "obj_", "._", "aliases_", "[_", "namespace_", "]_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "has", "\\u", "applica", "ble", "\\u", "batch", "\\u", "data_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "has", "\\u", "applica", "ble", "\\u", "batch", "\\u", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "extract", "\\u", "metrics_", "(_", "self_", ",_", "page_", ",_", "status", "\\u", "code_", "=_", "200_", ",_", "id_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "status", "\\u", "code_", "!=_", "200_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "status", "\\u", "code_", "==_", "404_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "(_", "self_", "._", "\\u", "get", "\\u", "error_", "(_", "status", "\\u", "code_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "\"<", "pmc", "-", "web", "-", "stat", ">\"_", "not_", "in_", "page_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Provider", "Conten", "t", "Mal", "formed", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "(_", "doc_", ",_", "look", "up", "\\u", "function_", ")_", "=_", "provider_", "._", "\\u", "get", "\\u", "doc", "\\u", "from", "\\u", "xml_", "(_", "page_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "doc_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "articles_", "=_", "doc_", "._", "get", "Element", "s", "By", "Ta", "g", "Name_", "(_", "\"", "article", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "article_", "in_", "articles_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "print_", "article_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "metric", "s", "\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "meta", "\\u", "data_", "=_", "article_", "._", "get", "Element", "s", "By", "Ta", "g", "Name_", "(_", "\"", "meta", "-", "data", "\"_", ")_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pmid", "_", "=_", "meta", "\\u", "data_", "._", "get", "Attribute_", "(_", "\"", "pubm", "ed", "-", "id", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "id_", "==_", "pmid", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "metrics_", "=_", "article_", "._", "get", "Element", "s", "By", "Ta", "g", "Name_", "(_", "\"", "usage", "\"_", ")_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "pdf", "\\u", "downloads_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "pdf", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "pdf", "\\u", "downloads_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "pdf", "\\u", "download", "s", "'_", ":_", "pdf", "\\u", "downloads_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "abstract", "\\u", "views_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "abstract", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "abstract", "\\u", "views_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "abstract", "\\u", "views", "'_", ":_", "abstract", "\\u", "views_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "fullt", "ext", "\\u", "views_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "full", "-", "text", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "fullt", "ext", "\\u", "views_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "fullt", "ext", "\\u", "views", "'_", ":_", "fullt", "ext", "\\u", "views_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "unique", "\\u", "ip", "\\u", "views_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "unique", "-", "ip", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "unique", "\\u", "ip", "\\u", "views_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "unique", "\\u", "ip", "\\u", "views", "'_", ":_", "unique", "\\u", "ip", "\\u", "views_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "figure", "\\u", "views_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "figure", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "figure", "\\u", "views_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "figure", "\\u", "views", "'_", ":_", "figure", "\\u", "views_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "supp", "data\\u", "views_", "=_", "int_", "(_", "metrics_", "._", "get", "Attribute_", "(_", "\"", "supp", "-", "data", "\"_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "supp", "data\\u", "views_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "metric", "s", "\\u", "dict_", "._", "update_", "(_", "{_", "'", "pmc", ":", "supp", "data\\u", "views", "'_", ":_", "supp", "data\\u", "views_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "metric", "s", "\\u", "dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "(_", "Key", "Error_", ",_", "Index", "Error_", ",_", "Type", "Error_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "get", "\\u", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "(_", "self_", ",_", "pages_", ",_", "pmid", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "metric", "s", "\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "page_", "in_", "pages_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "one", "\\u", "month", "\\u", "metric", "s", "\\u", "dict_", "=_", "self_", "._", "\\u", "extract", "\\u", "metrics_", "(_", "page_", ",_", "id_", "=_", "pmid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", "one", "\\u", "month", "\\u", "metric", "s", "\\u", "dict_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "metric_", "in_", "one", "\\u", "month", "\\u", "metric", "s", "\\u", "dict_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "metric", "s", "\\u", "dict_", "[_", "metric_", "]_", "+=_", "one", "\\u", "month", "\\u", "metric", "s", "\\u", "dict_", "[_", "metric_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Key", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "metric", "s", "\\u", "dict_", "[_", "metric_", "]_", "=_", "one", "\\u", "month", "\\u", "metric", "s", "\\u", "dict_", "[_", "metric_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "metric", "\\u", "name_", "in_", "metric", "s", "\\u", "dict_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "drill", "down", "\\u", "url_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "[_", "metric", "\\u", "name_", "]_", "=_", "(_", "metric", "s", "\\u", "dict_", "[_", "metric", "\\u", "name_", "]_", ",_", "drill", "down", "\\u", "url_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Pm", "c_", "(_", "Provider_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "metrics_", "(_", "self_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "aliases_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "provide", "r", "\\u", "url", "\\u", "template_", "=_", "None_", ",_", "#", " ", "ignore", " ", "this", " ", "bec", "aus", "e", " ", "multiple", " ", "url", " ", "steps_", "\\u\\u\\uNL\\u\\u\\u_", "cache", "\\u", "enabled_", "=_", "True_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "if", " ", "have", "n", "'", "t", " ", "load", "ed", " ", "batch", "\\u", "data", ",", " ", "return", " ", "no", " ", "metrics_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "global_", "batch", "\\u", "data_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "batch", "\\u", "data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "batch", "\\u", "data_", "=_", "self_", "._", "build", "\\u", "batch", "\\u", "data\\u", "dict_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "pass_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "On", "ly", " ", "look", "up", " ", "metric", "s", " ", "for", " ", "items", " ", "with", " ", "appropr", "iate", " ", "ids_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "total", "impact", "_", "import_", "item_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "alias", "es", "\\u", "dict_", "=_", "item_", "._", "alias", "\\u", "dict", "\\u", "from", "\\u", "tuples_", "(_", "aliases_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pmid", "_", "=_", "alias", "es", "\\u", "dict_", "[_", "\"", "pmid", "\"_", "]_", "[_", "0_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "except_", "Key", "Error_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "pmid", "\\u", "alias_", "=_", "(_", "\"", "pmid", "\"_", ",_", "pmid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "page_", "=_", "\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "pmid", "\\u", "alias_", "in_", "batch", "\\u", "data_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "pages_", "=_", "[_", "page_", "[_", "\"", "raw", "\"_", "]_", "for_", "page_", "in_", "batch", "\\u", "data_", "[_", "pmid", "\\u", "alias_", "]_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "page_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "=_", "self_", "._", "\\u", "get", "\\u", "metric", "s", "\\u", "and", "\\u", "drill", "down_", "(_", "pages_", ",_", "pmid", "_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "metric", "s", "\\u", "and", "\\u", "drill", "down_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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ility method for writing output to stderr. '''\n print >> sys.stderr, \"XXX %s:\" % self.node.name, msg\n sys.stderr.flush()", "metadata": "root.Cmd.warn", "header": "['class', 'Cmd', '(', 'object', ')', ':', '___EOS___']", "index": 120 }, { "content": " def cleanup(self):\n ''' Close the Popen channels.'''\n self.stdin.close()\n self.out.close()\n self.err.close()\n tmp = self.id.wait()\n if tmp:\n self.warn(\"nonzero exit status:\", tmp)", "metadata": "root.Cmd.cleanup", "header": "['class', 'Cmd', '(', 'object', ')', ':', '___EOS___']", "index": 144 } ]
[ { "span": "self.warn(\"nonzero exit status:\", tmp)", "start_line": 151, "start_column": 12, "end_line": 151, "end_column": 50 } ]
[ { "span": "def warn(self, msg):", "start_line": 120, "start_column": 4, "end_line": 120, "end_column": 24 } ]
1
false
[ "[CLS]_", "Wro", "ng_", "number_", "of_", "arguments_", "in_", "a_", "call_", "[SEP]_", "class_", "Cmd_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "warn_", "(_", "self_", ",_", "msg_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", " ", "Utili", "ty", " ", "method", " ", "for", " ", "writ", "ing", " ", "output", " ", "to", " ", "std", "err", ".", " ", "'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "print_", ">>_", "sys_", "._", "stderr_", ",_", "\"", "XX", "X", " ", "%", "s", ":\"_", "%_", "self_", "._", "node_", "._", "name_", ",_", "msg_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "sys_", "._", "stderr_", "._", "flush_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Cmd_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "cleanup_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "'''", " ", "Clos", "e", " ", "the", " ", "Pop", "en", " ", "channel", "s", ".'''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "stdin_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "out_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "err_", "._", "close_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "tmp_", "=_", "self_", "._", "id_", "._", "wait_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "tmp_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "warn_", "(_", "\"", "nonzero", " ", "exit", " ", "status", ":\"_", ",_", "tmp_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 ]
Unreachable code
bayespy/bayespy/bayespy/inference/vmp/nodes/point_estimate.py
[ { "content": " def _compute_message_to_parent(self, index, m_child, u_X):\n r\"\"\"\n \"\"\"\n # Convert child message array to a gradient function\n raise NotImplementedError()\n if index == 0:\n m = m_child[:2]\n return m\n else:\n raise ValueError(\"Invalid parent index\")", "metadata": "root.DeltaToAny._compute_message_to_parent", "header": "['class', 'DeltaToAny', '(', 'Deterministic', ')', ':', '___EOS___']", "index": 57 }, { "content": " def _compute_weights_to_parent(self, index, weights):\n r\"\"\"\n \"\"\"\n raise NotImplementedError()\n if index == 0:\n raise NotImplementedError()\n else:\n raise ValueError(\"Invalid parent index\")", "metadata": "root.DeltaToAny._compute_weights_to_parent", "header": "['class', 'DeltaToAny', '(', 'Deterministic', ')', ':', '___EOS___']", "index": 69 }, { "content": " def _plates_to_parent(self, index):\n r\"\"\"\n \"\"\"\n \n raise NotImplementedError()\n if index == 0:\n self.get_shape(0)\n raise NotImplementedError()\n else:\n raise ValueError(\"Invalid parent index\")", "metadata": "root.DeltaToAny._plates_to_parent", "header": "['class', 'DeltaToAny', '(', 'Deterministic', ')', ':', '___EOS___']", "index": 79 }, { "content": " def _plates_from_parent(self, index):\n r\"\"\"\n \"\"\"\n raise NotImplementedError()\n if index == 0:\n return self.__cached_plates\n raise NotImplementedError()\n else:\n raise ValueError(\"Invalid parent index\")", "metadata": "root.DeltaToAny._plates_from_parent", "header": "['class', 'DeltaToAny', '(', 'Deterministic', ')', ':', '___EOS___']", "index": 91 } ]
[ { "span": "if index == 0:", "start_line": 62, "start_column": 8, "end_line": 62, "end_column": 22 }, { "span": "if index == 0:", "start_line": 73, "start_column": 8, "end_line": 73, "end_column": 22 }, { "span": "if index == 0:", "start_line": 84, "start_column": 8, "end_line": 84, "end_column": 22 }, { "span": "if index == 0:", "start_line": 95, "start_column": 8, "end_line": 95, "end_column": 22 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "Del", "ta", "To", "Any_", "(_", "Determini", "stic", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "compute", "\\u", "message", "\\u", "to", "\\u", "parent_", "(_", "self_", ",_", "index_", ",_", "m", "\\u", "child_", ",_", "u\\u", "X_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "r", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Convert", " ", "child", " ", "message", " ", "array", " ", "to", " ", "a", " ", "gradi", "ent", " ", "function_", "\\u\\u\\uNL\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "index_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "m_", "=_", "m", "\\u", "child_", "[_", ":_", "2_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "m_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "\"", "Inva", "lid", " ", "parent", " ", "index", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Del", "ta", "To", "Any_", "(_", "Determini", "stic", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "compute", "\\u", "weight", "s", "\\u", "to", "\\u", "parent_", "(_", "self_", ",_", "index_", ",_", "weights_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "r", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "index_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "\"", "Inva", "lid", " ", "parent", " ", "index", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Del", "ta", "To", "Any_", "(_", "Determini", "stic", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "plates", "\\u", "to", "\\u", "parent_", "(_", "self_", ",_", "index_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "r", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "index_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "get", "\\u", "shape_", "(_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "\"", "Inva", "lid", " ", "parent", " ", "index", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "class_", "Del", "ta", "To", "Any_", "(_", "Determini", "stic", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "plates", "\\u", "from", "\\u", "parent_", "(_", "self_", ",_", "index_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "r", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "index_", "==_", "0_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "self_", "._", "\\u\\u", "cache", "d\\u", "plates", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "Not", "Impl", "ement", "ed", "Error_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "raise_", "Value", "Error_", "(_", "\"", "Inva", "lid", " ", "parent", " ", "index", "\"_", ")_", "\\u\\u\\uN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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
VisTrails/VisTrails/vistrails/db/versions/v0_9_4/translate/v0_9_3.py
[ { "content": "###############################################################################\n##\n## Copyright (C) 2014-2016, New York University.\n## Copyright (C) 2011-2014, NYU-Poly.\n## Copyright (C) 2006-2011, University of Utah.\n## All rights reserved.\n## Contact: [email protected]\n##\n## This file is part of VisTrails.\n##\n## \"Redistribution and use in source and binary forms, with or without\n## modification, are permitted provided that the following conditions are met:\n##\n## - Redistributions of source code must retain the above copyright notice,\n## this list of conditions and the following disclaimer.\n## - Redistributions in binary form must reproduce the above copyright\n## notice, this list of conditions and the following disclaimer in the\n## documentation and/or other materials provided with the distribution.\n## - Neither the name of the New York University nor the names of its\n## contributors may be used to endorse or promote products derived from\n## this software without specific prior written permission.\n##\n## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n## THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n## OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n##\n###############################################################################\nfrom __future__ import division\n\nimport copy\nfrom vistrails.db.versions.v0_9_4.domain import DBVistrail, DBAction, DBTag, DBModule, \\\n DBConnection, DBPortSpec, DBFunction, DBParameter, DBLocation, DBAdd, \\\n DBChange, DBDelete, DBAnnotation, DBPort, DBGroup, \\\n DBWorkflow, DBLog, DBAbstraction\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def update_workflow(old_obj, translate_dict):\n return DBWorkflow.update_version(old_obj.db_workflow, \n translate_dict, DBWorkflow())", "metadata": "root.update_workflow", "header": "['module', '___EOS___']", "index": 43 }, { "content": "def update_modules(old_obj, trans_dict):\n new_modules = []\n for obj in old_obj.db_modules:\n if obj.vtType == 'module':\n new_modules.append(DBModule.update_version(obj, trans_dict))\n elif obj.vtType == 'abstractionRef':\n new_modules.append(DBAbstraction.update_version(obj,\n trans_dict))\n elif obj.vtType == 'group':\n new_modules.append(DBGroup.update_version(obj, trans_dict))\n return new_modules", "metadata": "root.update_modules", "header": "['module', '___EOS___']", "index": 47 }, { "content": "def translateVistrail(_vistrail):\n def update_operations(old_obj, trans_dict):\n def update_abstractionRef(old_obj, trans_dict):\n def get_internal_version(old_obj, trans_dict):\n return str(old_obj.db_version)\n def get_version(old_obj, trans_dict):\n return ''\n new_dict = {'DBAbstraction':\n {'internal_version': get_internal_version,\n 'version': get_version}}\n new_dict.update(trans_dict)\n return DBAbstraction.update_version(old_obj.db_data, new_dict)\n new_ops = []\n for obj in old_obj.db_operations:\n if obj.vtType == 'add':\n if obj.db_what == 'abstractionRef':\n trans_dict['DBAdd'] = {'data': update_abstractionRef}\n new_op = DBAdd.update_version(obj, trans_dict)\n new_op.db_what = 'abstraction'\n new_ops.append(new_op)\n del trans_dict['DBAdd']\n else:\n new_op = DBAdd.update_version(obj, trans_dict)\n if obj.db_parentObjType == 'abstractionRef':\n new_op.db_parentObjType = 'abstraction'\n new_ops.append(new_op)\n elif obj.vtType == 'delete':\n new_ops.append(DBDelete.update_version(obj, trans_dict))\n elif obj.vtType == 'change':\n if obj.db_what == 'abstractionRef':\n trans_dict['DBChange'] = {'data': update_abstractionRef}\n new_op = DBChange.update_version(obj, trans_dict)\n new_op.db_what = 'abstraction'\n new_ops.append(new_op)\n del trans_dict['DBChange']\n else:\n new_op = DBChange.update_version(obj, trans_dict)\n if obj.db_parentObjType == 'abstractionRef':\n new_op.db_parentObjType = 'abstraction'\n new_ops.append(new_op)\n return new_ops\n\n translate_dict = {'DBGroup': {'workflow': update_workflow},\n 'DBAction': {'operations': update_operations},\n 'DBWorkflow': {'modules': update_modules}}\n vistrail = DBVistrail.update_version(_vistrail, translate_dict)\n vistrail.db_version = '0.9.4'\n return vistrail", "metadata": "root.translateVistrail", "header": "['module', '___EOS___']", "index": 59 }, { "content": "def translateWorkflow(_workflow):\n translate_dict = {'DBGroup': {'workflow': update_workflow},\n 'DBWorkflow': {'modules': update_modules}}\n workflow = DBWorkflow.update_version(_workflow, translate_dict)\n workflow.db_version = '0.9.4'\n return workflow", "metadata": "root.translateWorkflow", "header": "['module', '___EOS___']", "index": 108 }, { "content": "def translateLog(_log):\n translate_dict = {}\n log = DBLog.update_version(_log, translate_dict)\n log.db_version = '0.9.4'\n return log", "metadata": "root.translateLog", "header": "['module', '___EOS___']", "index": 115 } ]
[ { "span": "import copy", "start_line": 37, "start_column": 0, "end_line": 37, "end_column": 11 }, { "span": "from vistrails.db.versions.v0_9_4.domain import DBVistrail, DBAction, DBTag, DBModule, \\\n DBConnection, DBPortSpec, DBFunction, DBParameter, DBLocation, DBAdd, \\\n DBChange, DBDelete, DBAnnotation, DBPort, DBGroup, \\\n DBWorkflow, DBLog, DBAbstraction", "start_line": 38, "start_column": 0, "end_line": 41, "end_column": 36 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "###########", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Copy", "right", " ", "(", "C", ")", " ", "2014", "-", "2016", ",", " ", "New", " ", "Yo", "rk", " ", "Univers", "it", "y", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Copy", "right", " ", "(", "C", ")", " ", "2011", "-", "2014", ",", " ", "NY", "U", "-", "Poly", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Copy", "right", " ", "(", "C", ")", " ", "2006", "-", "2011", ",", " ", "Univers", "it", "y", " ", "of", " ", "Ut", "ah", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "All", " ", "rights", " ", "reserve", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Conta", "ct", ":", " ", "contact", "@", "vist", "rail", "s", ".", "org_", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Thi", "s", " ", "file", " ", "is", " ", "part", " ", "of", " ", "Vis", "Trail", "s", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "\"", "Redistributi", "on", " ", "and", " ", "use", " ", "in", " ", "source", " ", "and", " ", "binar", "y", " ", "forms", ",", " ", "with", " ", "or", " ", "with", "out_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "modification", ",", " ", "are", " ", "permit", "ted", " ", "provided", " ", "tha", "t", " ", "the", " ", "follow", "ing", " ", "condition", "s", " ", "are", " ", "met", ":_", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", "-", " ", "Redistributi", "ons", " ", "of", " ", "source", " ", "code", " ", "must", " ", "retain", " ", "the", " ", "above", " ", "copyr", "ight", " ", "notice", ",_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", " ", " ", "this", " ", "list", " ", "of", " ", "condition", "s", " ", "and", " ", "the", " ", "follow", "ing", " ", "discl", "aime", "r", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", "-", " ", "Redistributi", "ons", " ", "in", " ", "binar", "y", " ", "form", " ", "must", " ", "reproduce", " ", "the", " ", "above", " ", "copyright_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", " ", " ", "notice", ",", " ", "this", " ", "list", " ", "of", " ", "condition", "s", " ", "and", " ", "the", " ", "follow", "ing", " ", "discl", "aime", "r", " ", "in", " ", "the_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", " ", " ", "documentation", " ", "and", "/", "or", " ", "other", " ", "material", "s", " ", "provided", " ", "with", " ", "the", " ", "distribu", "tion", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", "-", " ", "Nei", "ther", " ", "the", " ", "name", " ", "of", " ", "the", " ", "New", " ", "Yo", "rk", " ", "Univers", "it", "y", " ", "nor", " ", "the", " ", "names", " ", "of", " ", "its_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", " ", " ", "contributor", "s", " ", "may", " ", "be", " ", "used", " ", "to", " ", "endo", "rse", " ", "or", " ", "promote", " ", "products", " ", "derive", "d", " ", "from_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", " ", " ", " ", "this", " ", "software", " ", "with", "out", " ", "specific", " ", "prior", " ", "writt", "en", " ", "permissi", "on", "._", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "THIS", " ", "SOFT", "WARE", " ", "IS", " ", "PROVI", "DED", " ", "BY", " ", "THE", " ", "COPY", "RIG", "HT", " ", "HOLD", "ERS", " ", "AND", " ", "CONTRIB", "UTO", "RS", " ", "\"", "AS", " ", "IS", "\"_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "AND", " ", "ANY", " ", "EXPR", "ESS", " ", "OR", " ", "IMPL", "IED", " ", "WAR", "RAN", "TIES", ",", " ", "INC", "LU", "DING", ",", " ", "BUT", " ", "NOT", " ", "LIMIT", "ED", " ", "TO", ",_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "THE", " ", "IMPL", "IED", " ", "WAR", "RAN", "TIES", " ", "OF", " ", "MER", "CHAN", "TAB", "ILI", "TY", " ", "AND", " ", "FIT", "NESS", " ", "FOR", " ", "A", " ", "PARTI", "CUL", "AR_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "PUR", "POS", "E", " ", "ARE", " ", "DISC", "LAI", "MED", ".", " ", "IN", " ", "NO", " ", "EVENT", " ", "SHA", "LL", " ", "THE", " ", "COPY", "RIG", "HT", " ", "HOLD", "ER", " ", "OR_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "CONTRIB", "UTO", "RS", " ", "BE", " ", "LI", "AB", "LE", " ", "FOR", " ", "ANY", " ", "DIRECT", ",", " ", "INDI", "RECT", ",", " ", "INC", "IDENT", "AL", ",", " ", "SPECIAL", ",_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "EXE", "MPL", "ARY", ",", " ", "OR", " ", "CONS", "EQU", "ENTI", "AL", " ", "DA", "MAGE", "S", " ", "(", "INC", "LU", "DING", ",", " ", "BUT", " ", "NOT", " ", "LIMIT", "ED", " ", "TO", ",_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "PROC", "URE", "MENT", " ", "OF", " ", "SUBST", "ITU", "TE", " ", "GOOD", "S", " ", "OR", " ", "SERVICES", ";", " ", "LOSS", " ", "OF", " ", "USE", ",", " ", "DATA", ",", " ", "OR", " ", "PROF", "IT", "S", ";_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "OR", " ", "BUS", "INE", "SS", " ", "INTER", "RU", "PTION", ")", " ", "HO", "WE", "VER", " ", "CAU", "SED", " ", "AND", " ", "ON", " ", "ANY", " ", "THE", "ORY", " ", "OF", " ", "LI", "ABI", "LIT", "Y", ",_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "WHE", "THER", " ", "IN", " ", "CONTR", "ACT", ",", " ", "STRI", "CT", " ", "LI", "ABI", "LIT", "Y", ",", " ", "OR", " ", "TOR", "T", " ", "(", "INC", "LU", "DING", " ", "NEG", "LIG", "ENCE", " ", "OR_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "OTHER", "WI", "SE", ")", " ", "ARI", "SIN", "G", " ", "IN", " ", "ANY", " ", "WAY", " ", "OUT", " ", "OF", " ", "THE", " ", "USE", " ", "OF", " ", "THIS", " ", "SOFT", "WARE", ",", " ", "EVE", "N", " ", "IF_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "ADV", "ISE", "D", " ", "OF", " ", "THE", " ", "POS", "SIB", "ILI", "TY", " ", "OF", " ", "SUC", "H", " ", "DA", "MAGE", ".\"_", "\\u\\u\\uNL\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "###########", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "division_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "copy_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "vist", "rail", "s_", "._", "db_", "._", "versions_", "._", "v", "0", "\\u", "9", "\\u", "4_", "._", "domain_", "import_", "DB", "Vis", "trail_", ",_", "DBA", "ction_", ",_", "DB", "Tag_", ",_", "DB", "Module_", ",_", "DB", "Connection_", ",_", "DB", "Port", "Spec_", ",_", "DB", "Function_", ",_", "DB", "Parameter_", ",_", "DB", "Location_", ",_", "DBA", "dd_", ",_", "DB", "Change_", ",_", "DB", "Delete_", ",_", "DBA", "nno", "tation", "_", ",_", "DB", "Port_", ",_", "DBG", "roup_", ",_", "DB", "Workflow_", ",_", "DB", "Log_", ",_", "DBA", "bst", "ract", "ion_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "update", "\\u", "workflow_", "(_", "old", "\\u", "obj_", ",_", "translat", "e\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "DB", "Workflow_", "._", "update", "\\u", "version_", "(_", "old", "\\u", "obj_", "._", "db", "\\u", "workflow_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "translat", "e\\u", "dict_", ",_", "DB", "Workflow_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "update", "\\u", "modules_", "(_", "old", "\\u", "obj_", ",_", "trans", "\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "new", "\\u", "modules_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "obj_", "in_", "old", "\\u", "obj_", "._", "db", "\\u", "modules_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "obj_", "._", "vt", "Type_", "==_", "'", "module", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "new", "\\u", "modules_", "._", "append_", "(_", "DB", "Module_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "obj_", "._", "vt", "Type_", "==_", "'", "abstract", "ion", "Ref", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "new", "\\u", "modules_", "._", "append_", "(_", "DBA", "bst", "ract", "ion_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "trans", "\\u", "dict_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "obj_", "._", "vt", "Type_", "==_", "'", "group", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "new", "\\u", "modules_", "._", "append_", "(_", "DBG", "roup_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "new", "\\u", "modules_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "translat", "e", "Vis", "trail_", "(_", "\\u", "vist", "rail", "_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "update", "\\u", "operations_", "(_", "old", "\\u", "obj_", ",_", "trans", "\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "update", "\\u", "abstract", "ion", "Ref_", "(_", "old", "\\u", "obj_", ",_", "trans", "\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "get", "\\u", "internal", "\\u", "version_", "(_", "old", "\\u", "obj_", ",_", "trans", "\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "str_", "(_", "old", "\\u", "obj_", "._", "db", "\\u", "version_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "version_", "(_", "old", "\\u", "obj_", ",_", "trans", "\\u", "dict_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "return_", "''_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "new", "\\u", "dict_", "=_", "{_", "'", "DBA", "bst", "ract", "ion", "'_", ":_", "\\u\\u\\uNL\\u\\u\\u_", "{_", "'", "internal", "\\u", "version", "'_", ":_", "get", "\\u", "internal", "\\u", "version_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "version", "'_", ":_", "get", "\\u", "version_", "}_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "dict_", "._", "update_", "(_", "trans", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "DBA", "bst", "ract", "ion_", "._", "update", "\\u", "version_", "(_", "old", "\\u", "obj_", "._", "db", "\\u", "data_", ",_", "new", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "new", "\\u", "ops_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "for_", "obj_", "in_", "old", "\\u", "obj_", "._", "db", "\\u", "operations_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "obj_", "._", "vt", "Type_", "==_", "'", "add", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "obj_", "._", "db", "\\u", "what_", "==_", "'", "abstract", "ion", "Ref", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "trans", "\\u", "dict_", "[_", "'", "DBA", "dd", "'_", "]_", "=_", "{_", "'", "data", "'_", ":_", "update", "\\u", "abstract", "ion", "Ref_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "op_", "=_", "DBA", "dd_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "op_", "._", "db", "\\u", "what_", "=_", "'", "abstract", "ion", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "ops_", "._", "append_", "(_", "new", "\\u", "op_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "del_", "trans", "\\u", "dict_", "[_", "'", "DBA", "dd", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "new", "\\u", "op_", "=_", "DBA", "dd_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "obj_", "._", "db", "\\u", "parent", "Obj", "Type_", "==_", "'", "abstract", "ion", "Ref", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "new", "\\u", "op_", "._", "db", "\\u", "parent", "Obj", "Type_", "=_", "'", "abstract", "ion", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "new", "\\u", "ops_", "._", "append_", "(_", "new", "\\u", "op_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "obj_", "._", "vt", "Type_", "==_", "'", "delete", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "new", "\\u", "ops_", "._", "append_", "(_", "DB", "Delete_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "elif_", "obj_", "._", "vt", "Type_", "==_", "'", "change", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "if_", "obj_", "._", "db", "\\u", "what_", "==_", "'", "abstract", "ion", "Ref", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "trans", "\\u", "dict_", "[_", "'", "DB", "Change", "'_", "]_", "=_", "{_", "'", "data", "'_", ":_", "update", "\\u", "abstract", "ion", "Ref_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "op_", "=_", "DB", "Change_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "op_", "._", "db", "\\u", "what_", "=_", "'", "abstract", "ion", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "new", "\\u", "ops_", "._", "append_", "(_", "new", "\\u", "op_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "del_", "trans", "\\u", "dict_", "[_", "'", "DB", "Change", "'_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", "_", "new", "\\u", "op_", "=_", "DB", "Change_", "._", "update", "\\u", "version_", "(_", "obj_", ",_", "trans", "\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "obj_", "._", "db", "\\u", "parent", "Obj", "Type_", "==_", "'", "abstract", "ion", "Ref", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ", " _", "new", "\\u", "op_", "._", "db", "\\u", "parent", "Obj", "Type_", "=_", "'", "abstract", "ion", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "new", "\\u", "ops_", "._", "append_", "(_", "new", "\\u", "op_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "new", "\\u", "ops_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "translat", "e\\u", "dict_", "=_", "{_", "'", "DBG", "roup", "'_", ":_", "{_", "'", "workf", "low", "'_", ":_", "update", "\\u", "workflow_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "DBA", "ction", "'_", ":_", "{_", "'", "operati", "ons", "'_", ":_", "update", "\\u", "operations_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "DB", "Work", "flow", "'_", ":_", "{_", "'", "module", "s", "'_", ":_", "update", "\\u", "modules_", "}_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "vist", "rail", "_", "=_", "DB", "Vis", "trail_", "._", "update", "\\u", "version_", "(_", "\\u", "vist", "rail", "_", ",_", "translat", "e\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "vist", "rail", "_", "._", "db", "\\u", "version_", "=_", "'", "0.", "9.4", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "vist", "rail", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "translat", "e", "Workflow_", "(_", "\\u", "workflow_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "translat", "e\\u", "dict_", "=_", "{_", "'", "DBG", "roup", "'_", ":_", "{_", "'", "workf", "low", "'_", ":_", "update", "\\u", "workflow_", "}_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "'", "DB", "Work", "flow", "'_", ":_", "{_", "'", "module", "s", "'_", ":_", "update", "\\u", "modules_", "}_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "workflow_", "=_", "DB", "Workflow_", "._", "update", "\\u", "version_", "(_", "\\u", "workflow_", ",_", "translat", "e\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "workflow_", "._", "db", "\\u", "version_", "=_", "'", "0.", "9.4", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "workflow_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "translat", "e", "Log_", "(_", "\\u", "log_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "translat", "e\\u", "dict_", "=_", "{_", "}_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "log_", "=_", "DB", "Log_", "._", "update", "\\u", "version_", "(_", "\\u", "log_", ",_", "translat", "e\\u", "dict_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "log_", "._", "db", "\\u", "version_", "=_", "'", "0.", "9.4", "'_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "log_" ]
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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{ "content": " def init(self, *args, **kwargs):\n \"\"\"\n Initializes the Director creating the main window.\n\n There are a few cocos exclusive parameters, the rest are the\n standard pyglet parameters for pyglet.window.Window.__init__\n This docstring only partially list the pyglet parameters; a full\n list is available at pyglet Window API Reference at\n http://pyglet.org/doc/api/pyglet.window.Window-class.html\n\n :Parameters:\n `autoscale` : bool\n True: on window resizes, cocos will scale the view so that your\n app don't need to handle resizes.\n False: your app must include logic to deal with different window\n sizes along the session.\n Defaults to False\n `do_not_scale` : bool\n Deprecated. The logical negation of autoscale\n `audio_backend` : string\n one in ['pyglet','sdl']. Defaults to 'pyglet' for legacy support.\n `audio` : dict or None\n None or a dict providing parameters for the sdl audio backend.\n None: in this case a \"null\" audio system will be used, where all the\n sdl sound operations will be no-ops. This may be useful if you do not\n want to depend on SDL_mixer\n A dictionary with string keys; these are the arguments for setting up\n the audio output (sample rate and bit-width, channels, buffer size).\n The key names/values should match the positional arguments of\n http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.init\n The default value is {}, which means sound enabled with default\n settings\n\n\n `fullscreen` : bool\n Window is created in fullscreen. Default is False\n `resizable` : bool\n Window is resizable. Default is False\n `vsync` : bool\n Sync with the vertical retrace. Default is True\n `width` : int\n Window width size. Default is 640\n `height` : int\n Window height size. Default is 480\n `caption` : string\n Window title.\n `visible` : bool\n Window is visible or not. Default is True.\n\n :rtype: pyglet.window.Window\n :returns: The main window, an instance of pyglet.window.Window class.\n \"\"\"\n #: callable that would provide the object to calculate and eventually draw fps stats\n self.fps_display_provider = cocos.fps.get_default_fpsdisplay\n\n #: whether or not the FPS are displayed\n self.show_FPS = False\n\n #: stack of scenes\n self.scene_stack = []\n\n #: scene that is being run\n self.scene = None\n\n #: this is the next scene that will be shown\n self.next_scene = None\n\n # python interpreter\n self.python_interpreter = None\n\n #: whether or not to show the python interpreter\n self.show_interpreter = False\n\n #: flag requesting app termination\n self.terminate_app = False\n\n # pop out the Cocos-specific flags\n\n # 'autoscale' / 'do_not_scale' - Scheduled for cleanup at v0.7\n if 'do_not_scale' in kwargs:\n warnings.warn(\"'do_not_scale' kw-param in director.init is deprecated, use 'autoscale'\")\n if 'autoscale' in kwargs:\n warnings.warn(\"Conflict between deprecated 'do_not_scale' and 'autoscale', \" +\n \"'autoscale' wins\")\n self.autoscale = kwargs.pop('autoscale')\n else:\n self.autoscale = not kwargs.pop('do_not_scale')\n else:\n self.autoscale = kwargs.pop('autoscale', True)\n\n def _get_do_not_scale_window():\n warnings.warn('Access to deprecated director.do_not_scale_window')\n return not self.autoscale\n\n def _set_do_not_scale_window(v):\n warnings.warn('Access to deprecated director.do_not_scale_window')\n self.autoscale = not v\n do_not_scale_window = property(_get_do_not_scale_window, _set_do_not_scale_window)\n\n audio_backend = kwargs.pop('audio_backend', 'pyglet')\n audio_settings = kwargs.pop('audio', {})\n\n # handle pyglet 1.1.x vs 1.2dev differences in fullscreen\n self._window_virtual_width = kwargs.get('width', None)\n self._window_virtual_height = kwargs.get('height', None)\n if pyglet.version.startswith('1.1') and kwargs.get('fullscreen', False):\n # pyglet 1.1.x dont allow fullscreen with explicit width or height\n kwargs.pop('width', 0)\n kwargs.pop('height', 0)\n\n #: pyglet's window object\n self.window = window.Window(*args, **kwargs)\n\n # complete the viewport geometry info, both virtual and real,\n # also set the appropriate on_resize handler\n if self._window_virtual_width is None:\n self._window_virtual_width = self.window.width\n if self._window_virtual_height is None:\n self._window_virtual_height = self.window.height\n\n self._window_virtual_aspect = (\n self._window_virtual_width / float(self._window_virtual_height))\n\n self._offset_x = 0\n self._offset_y = 0\n\n if self.autoscale:\n resize_handler = self.scaled_resize_window\n self.set_projection = self.set_projection3D\n else:\n resize_handler = self.unscaled_resize_window\n self.set_projection = self.set_projection2D\n # the offsets and size for the viewport will be proper after this\n self._resize_no_events = True\n resize_handler(self.window.width, self.window.height)\n self._resize_no_events = False\n\n self.window.push_handlers(on_resize=resize_handler)\n\n self.window.push_handlers(self.on_draw)\n\n # opengl settings\n self.set_alpha_blending()\n\n # default handler\n self.window.push_handlers(DefaultHandler())\n\n # Environment variable COCOS2d_NOSOUND=1 overrides audio settings\n if getenv('COCOS2D_NOSOUND', None) == '1' or audio_backend == 'pyglet':\n audio_settings = None\n # if audio is not working, better to not work at all. Except if\n # explicitly instructed to continue\n if not cocos.audio._working and audio_settings is not None:\n from cocos.audio.exceptions import NoAudioError\n msg = \"cocos.audio isn't able to work without needed dependencies. \" \\\n \"Try installing pygame for fixing it, or forcing no audio \" \\\n \"mode by calling director.init with audio=None, or setting the \" \\\n \"COCOS2D_NOSOUND=1 variable in your env.\"\n raise NoAudioError(msg)\n\n # Audio setup:\n # TODO: reshape audio to not screw unittests\n import os\n if not os.environ.get('cocos_utest', False):\n cocos.audio.initialize(audio_settings)\n\n return self.window", "metadata": "root.Director.init", "header": "['class', 'Director', '(', 'event', '.', 'EventDispatcher', ')', ':', '___EOS___']", "index": 216 } ]
[ { "span": "do_not_scale_window ", "start_line": 313, "start_column": 8, "end_line": 313, "end_column": 27 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Director", "_", "(_", "event_", "._", "Event", "Dispatcher_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "init_", "(_", "self_", ",_", "*_", "args_", ",_", "**_", "kwargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "\\", "10", ";", " ", " ", " ", " ", "Initializ", "es", " ", "the", " ", "Director", " ", "creati", "ng", " ", "the", " ", "main", " ", "window", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "There", " ", "are", " ", "a", " ", "few", " ", "coco", "s", " ", "exclu", "sive", " ", "parameter", "s", ",", " ", "the", " ", "rest", " ", "are", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "standard", " ", "pyg", "let", " ", "parameter", "s", " ", "for", " ", "pyg", "let", ".", "window", ".", "Window", ".\\u", "\\u", "init", "\\u\\u", "\\", "10", ";", " ", " ", " ", " ", "Thi", "s", " ", "docstr", "ing", " ", "only", " ", "partial", "ly", " ", "list", " ", "the", " ", "pyg", "let", " ", "parameter", "s", ";", " ", "a", " ", "full", "\\", "10", ";", " ", " ", " ", " ", "list", " ", "is", " ", "avail", "able", " ", "at", " ", "pyg", "let", " ", "Window", " ", "API", " ", "Reference", " ", "at", "\\", "10", ";", " ", " ", " ", " ", "http", "://", "pyg", "let", ".", "org", "/", "doc", "/", "api", "/", "pyg", "let", ".", "window", ".", "Window", "-", "class", ".", "html", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", ":", "Parameter", "s", ":", "\\", "10", ";", " ", " ", " ", " ", "`", "autoscale", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Tru", "e", ":", " ", "on", " ", "window", " ", "resiz", "es", ",", " ", "coco", "s", " ", "will", " ", "scale", " ", "the", " ", "view", " ", "so", " ", "tha", "t", " ", "your", "\\", "10", ";", " ", " ", " ", " ", "app", " ", "don", "'", "t", " ", "need", " ", "to", " ", "handle", " ", "resiz", "es", ".", "\\", "10", ";", " ", " ", " ", " ", "Fal", "se", ":", " ", "your", " ", "app", " ", "must", " ", "include", " ", "logic", " ", "to", " ", "deal", " ", "with", " ", "different", " ", "window", "\\", "10", ";", " ", " ", " ", " ", "size", "s", " ", "along", " ", "the", " ", "session", ".", "\\", "10", ";", " ", " ", " ", " ", "Default", "s", " ", "to", " ", "Fal", "se", "\\", "10", ";", " ", " ", " ", " ", "`", "do", "\\u", "not", "\\u", "scale", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Dep", "reca", "ted", ".", " ", "The", " ", "logical", " ", "negati", "on", " ", "of", " ", "autoscale", "\\", "10", ";", " ", " ", " ", " ", "`", "audio", "\\u", "back", "end", "`", " ", ":", " ", "string", "\\", "10", ";", " ", " ", " ", " ", "one", " ", "in", " ", "['", "pyg", "let", "','", "sdl", "']", ".", " ", "Default", "s", " ", "to", " ", "'", "pyg", "let", "'", " ", "for", " ", "lega", "cy", " ", "support", ".", "\\", "10", ";", " ", " ", " ", " ", "`", "audio", "`", " ", ":", " ", "dict", " ", "or", " ", "Non", "e", "\\", "10", ";", " ", " ", " ", " ", "Non", "e", " ", "or", " ", "a", " ", "dict", " ", "provi", "ding", " ", "parameter", "s", " ", "for", " ", "the", " ", "sdl", " ", "audio", " ", "back", "end", ".", "\\", "10", ";", " ", " ", " ", " ", "Non", "e", ":", " ", "in", " ", "this", " ", "case", " ", "a", " ", "\"", "null", "\"", " ", "audio", " ", "system", " ", "will", " ", "be", " ", "used", ",", " ", "where", " ", "all", " ", "the", "\\", "10", ";", " ", " ", " ", " ", "sdl", " ", "sound", " ", "operati", "ons", " ", "will", " ", "be", " ", "no", "-", "ops", ".", " ", "Thi", "s", " ", "may", " ", "be", " ", "usef", "ul", " ", "if", " ", "you", " ", "do", " ", "not", "\\", "10", ";", " ", " ", " ", " ", "want", " ", "to", " ", "depend", " ", "on", " ", "SDL", "\\u", "mixer", "\\", "10", ";", " ", " ", " ", " ", "A", " ", "dictionar", "y", " ", "with", " ", "string", " ", "keys", ";", " ", "these", " ", "are", " ", "the", " ", "argu", "ment", "s", " ", "for", " ", "setti", "ng", " ", "up", "\\", "10", ";", " ", " ", " ", " ", "the", " ", "audio", " ", "output", " ", "(", "sample", " ", "rate", " ", "and", " ", "bit", "-", "widt", "h", ",", " ", "channel", "s", ",", " ", "buffer", " ", "size", ").", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "key", " ", "names", "/", "values", " ", "shou", "ld", " ", "match", " ", "the", " ", "positional", " ", "argu", "ment", "s", " ", "of", "\\", "10", ";", " ", " ", " ", " ", "http", "://", "www", ".", "pyga", "me", ".", "org", "/", "docs", "/", "ref", "/", "mixer", ".", "html", "#", "pyga", "me", ".", "mixer", ".", "init", "\\", "10", ";", " ", " ", " ", " ", "The", " ", "default", " ", "value", " ", "is", " ", "{}", ",", " ", "whi", "ch", " ", "means", " ", "sound", " ", "enable", "d", " ", "with", " ", "default", "\\", "10", ";", " ", " ", " ", " ", "settings", "\\", "10", ";", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", "`", "fullscreen", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "is", " ", "created", " ", "in", " ", "fullscreen", ".", " ", "Default", " ", "is", " ", "Fal", "se", "\\", "10", ";", " ", " ", " ", " ", "`", "resizable", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "is", " ", "resizable", ".", " ", "Default", " ", "is", " ", "Fal", "se", "\\", "10", ";", " ", " ", " ", " ", "`", "vs", "ync", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Sync", " ", "with", " ", "the", " ", "vertical", " ", "retra", "ce", ".", " ", "Default", " ", "is", " ", "Tru", "e", "\\", "10", ";", " ", " ", " ", " ", "`", "widt", "h", "`", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "widt", "h", " ", "size", ".", " ", "Default", " ", "is", " ", "640", "\\", "10", ";", " ", " ", " ", " ", "`", "height", "`", " ", ":", " ", "int", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "height", " ", "size", ".", " ", "Default", " ", "is", " ", "480", "\\", "10", ";", " ", " ", " ", " ", "`", "caption", "`", " ", ":", " ", "string", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "title", ".", "\\", "10", ";", " ", " ", " ", " ", "`", "visi", "ble", "`", " ", ":", " ", "bool", "\\", "10", ";", " ", " ", " ", " ", "Window", " ", "is", " ", "visi", "ble", " ", "or", " ", "not", ".", " ", "Default", " ", "is", " ", "Tru", "e", ".", "\\", "10", ";", "\\", "10", ";", " ", " ", " ", " ", ":", "rty", "pe", ":", " ", "pyg", "let", ".", "window", ".", "Window", "\\", "10", ";", " ", " ", " ", " ", ":", "return", "s", ":", " ", "The", " ", "main", " ", "window", ",", " ", "an", " ", "instance", " ", "of", " ", "pyg", "let", ".", "window", ".", "Window", " ", "class", ".", "\\", "10", ";", " ", " ", " ", " ", "\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", ":", " ", "calla", "ble", " ", "tha", "t", " ", "wou", "ld", " ", "provide", " ", "the", " ", "object", " ", "to", " ", "calcul", "ate", " ", "and", " ", "eventual", "ly", " ", "draw", " ", "fp", "s", " ", "stats_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "fp", "s", "\\u", "display", "\\u", "provider_", "=_", "coco", "s_", "._", "fps_", "._", "get", "\\u", "default", "\\u", "fp", "sdi", "spla", "y_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "whe", "ther", " ", "or", " ", "not", " ", "the", " ", "FPS", " ", "are", " ", "displayed_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "show", "\\u", "FPS", "_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "stack", " ", "of", " ", "scenes", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "scen", "e\\u", "stack_", "=_", "[_", "]_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "scen", "e", " ", "tha", "t", " ", "is", " ", "bei", "ng", " ", "run_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "scene_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "this", " ", "is", " ", "the", " ", "next", " ", "scen", "e", " ", "tha", "t", " ", "will", " ", "be", " ", "shown", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "next", "\\u", "scene_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "python", " ", "interpreter_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "python", "\\u", "interpreter_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "whe", "ther", " ", "or", " ", "not", " ", "to", " ", "show", " ", "the", " ", "python", " ", "interpreter_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "show", "\\u", "interpreter_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "flag", " ", "request", "ing", " ", "app", " ", "termination", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "terminate", "\\u", "app_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "pop", " ", "out", " ", "the", " ", "Coc", "os", "-", "specific", " ", "flags_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "'", "autoscale", "'", " ", "/", " ", "'", "do", "\\u", "not", "\\u", "scale", "'", " ", "-", " ", "Schedule", "d", " ", "for", " ", "clean", "up", " ", "at", " ", "v", "0.7_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "'", "do", "\\u", "not", "\\u", "scale", "'_", "in_", "kwargs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "warnings_", "._", "warn_", "(_", "\"'", "do", "\\u", "not", "\\u", "scale", "'", " ", "kw", "-", "param", " ", "in", " ", "director", ".", "init", " ", "is", " ", "depre", "cated", ",", " ", "use", " ", "'", "autoscale", "'\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "'", "autoscale", "'_", "in_", "kwargs_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "warnings_", "._", "warn_", "(_", "\"", "Confl", "ict", " ", "bet", "ween", " ", "depre", "cated", " ", "'", "do", "\\u", "not", "\\u", "scale", "'", " ", "and", " ", "'", "autoscale", "',", " ", "\"_", "+_", "\\u\\u\\uNL\\u\\u\\u_", "\"'", "autoscale", "'", " ", "wins", "\"_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "autoscale", "_", "=_", "kwargs_", "._", "pop_", "(_", "'", "autoscale", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "autoscale", "_", "=_", "not_", "kwargs_", "._", "pop_", "(_", "'", "do", "\\u", "not", "\\u", "scale", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "autoscale", "_", "=_", "kwargs_", "._", "pop_", "(_", "'", "autoscale", "'_", ",_", "True_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "get", "\\u", "do", "\\u", "not", "\\u", "scale", "\\u", "window_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "warnings_", "._", "warn_", "(_", "'", "Access", " ", "to", " ", "depre", "cated", " ", "director", ".", "do", "\\u", "not", "\\u", "scale", "\\u", "window", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "return_", "not_", "self_", "._", "autoscale", "_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "set\\u", "do", "\\u", "not", "\\u", "scale", "\\u", "window_", "(_", "v_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "warnings_", "._", "warn_", "(_", "'", "Access", " ", "to", " ", "depre", "cated", " ", "director", ".", "do", "\\u", "not", "\\u", "scale", "\\u", "window", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "autoscale", "_", "=_", "not_", "v_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "do", "\\u", "not", "\\u", "scale", "\\u", "window_", "=_", "property_", "(_", "\\u", "get", "\\u", "do", "\\u", "not", "\\u", "scale", "\\u", "window_", ",_", "\\u", "set\\u", "do", "\\u", "not", "\\u", "scale", "\\u", "window_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "audio", "\\u", "backend_", "=_", "kwargs_", "._", "pop_", "(_", "'", "audio", "\\u", "back", "end", "'_", ",_", "'", "pyg", "let", "'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "audio", "\\u", "settings_", "=_", "kwargs_", "._", "pop_", "(_", "'", "audio", "'_", ",_", "{_", "}_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "handle", " ", "pyg", "let", " ", "1.1", ".", "x", " ", "vs", " ", "1.2", "dev", " ", "difference", "s", " ", "in", " ", "fullscreen", "_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "width_", "=_", "kwargs_", "._", "get_", "(_", "'", "widt", "h", "'_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "height_", "=_", "kwargs_", "._", "get_", "(_", "'", "height", "'_", ",_", "None_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "pyglet_", "._", "version_", "._", "startswith_", "(_", "'", "1.1", "'_", ")_", "and_", "kwargs_", "._", "get_", "(_", "'", "fullscreen", "'_", ",_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "pyg", "let", " ", "1.1", ".", "x", " ", "don", "t", " ", "allow", " ", "fullscreen", " ", "with", " ", "explicit", " ", "widt", "h", " ", "or", " ", "height_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "kwargs_", "._", "pop_", "(_", "'", "widt", "h", "'_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "kwargs_", "._", "pop_", "(_", "'", "height", "'_", ",_", "0_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", ":", " ", "pyg", "let", "'", "s", " ", "window", " ", "object_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "window_", "=_", "window_", "._", "Window_", "(_", "*_", "args_", ",_", "**_", "kwargs_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "complete", " ", "the", " ", "viewport", " ", "geom", "etry", " ", "info", ",", " ", "bot", "h", " ", "virtual", " ", "and", " ", "real", ",_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "als", "o", " ", "set", " ", "the", " ", "appropr", "iate", " ", "on", "\\u", "resiz", "e", " ", "handler_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "width_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "width_", "=_", "self_", "._", "window_", "._", "width_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "height_", "is_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "height_", "=_", "self_", "._", "window_", "._", "height_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "aspect_", "=_", "(_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "width_", "/_", "float_", "(_", "self_", "._", "\\u", "window", "\\u", "virtual", "\\u", "height_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "\\u", "offset", "\\u", "x_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "offset", "\\u", "y_", "=_", "0_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "self_", "._", "autoscale", "_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "resiz", "e\\u", "handler_", "=_", "self_", "._", "scale", "d\\u", "resiz", "e\\u", "window_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "set\\u", "projection_", "=_", "self_", "._", "set\\u", "projecti", "on", "3", "D_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "else_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "resiz", "e\\u", "handler_", "=_", "self_", "._", "unsc", "ale", "d\\u", "resiz", "e\\u", "window_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "set\\u", "projection_", "=_", "self_", "._", "set\\u", "projecti", "on2", "D_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "the", " ", "offset", "s", " ", "and", " ", "size", " ", "for", " ", "the", " ", "viewport", " ", "will", " ", "be", " ", "proper", " ", "after", " ", "this_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "self_", "._", "\\u", "resiz", "e\\u", "no", "\\u", "events_", "=_", "True_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "resiz", "e\\u", "handler_", "(_", "self_", "._", "window_", "._", "width_", ",_", "self_", "._", "window_", "._", "height_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "self_", "._", "\\u", "resiz", "e\\u", "no", "\\u", "events_", "=_", "False_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "window_", "._", "push", "\\u", "handlers_", "(_", "on", "\\u", "resize_", "=_", "resiz", "e\\u", "handler_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "window_", "._", "push", "\\u", "handlers_", "(_", "self_", "._", "on", "\\u", "draw_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "opengl", " ", "settings_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "set\\u", "alpha", "\\u", "blend", "ing_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "default", " ", "handler_", "\\u\\u\\uNL\\u\\u\\u_", "self_", "._", "window_", "._", "push", "\\u", "handlers_", "(_", "Default", "Handler_", "(_", ")_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Environ", "ment", " ", "variab", "le", " ", "CO", "COS", "2d", "\\u", "NOS", "OUN", "D", "=", "1", " ", "override", "s", " ", "audio", " ", "settings_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "getenv_", "(_", "'", "CO", "COS", "2", "D", "\\u", "NOS", "OUN", "D", "'_", ",_", "None_", ")_", "==_", "'", "1", "'_", "or_", "audio", "\\u", "backend_", "==_", "'", "pyg", "let", "'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "audio", "\\u", "settings_", "=_", "None_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "if", " ", "audio", " ", "is", " ", "not", " ", "working", ",", " ", "bett", "er", " ", "to", " ", "not", " ", "work", " ", "at", " ", "all", ".", " ", "Except", " ", "if_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "explicit", "ly", " ", "instruct", "ed", " ", "to", " ", "continue_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "if_", "not_", "coco", "s_", "._", "audio_", "._", "\\u", "working", "_", "and_", "audio", "\\u", "settings_", "is_", "not_", "None_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "coco", "s_", "._", "audio_", "._", "exceptions_", "import_", "No", "Audi", "o", "Error_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "msg_", "=_", "\"", "coco", "s", ".", "audio", " ", "isn", "'", "t", " ", "able", " ", "to", " ", "work", " ", "with", "out", " ", "need", "ed", " ", "dependen", "cies", ".", " ", "\"_", "\"", "Tr", "y", " ", "install", "ing", " ", "pyga", "me", " ", "for", " ", "fix", "ing", " ", "it", ",", " ", "or", " ", "forcing", " ", "no", " ", "audio", " ", "\"_", "\"", "mode", " ", "by", " ", "calling", " ", "director", ".", "init", " ", "with", " ", "audio", "=", "Non", "e", ",", " ", "or", " ", "setti", "ng", " ", "the", " ", "\"_", "\"", "CO", "COS", "2", "D", "\\u", "NOS", "OUN", "D", "=", "1", " ", "variab", "le", " ", "in", " ", "your", " ", "env", ".\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "raise_", "No", "Audi", "o", "Error_", "(_", "msg_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Audi", "o", " ", "setup", ":_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "TOD", "O", ":", " ", "reshape", " ", "audio", " ", "to", " ", "not", " ", "scre", "w", " ", "unittest", "s_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "if_", "not_", "os_", "._", "environ_", "._", "get_", "(_", "'", "coco", "s", "\\u", "ute", "st", "'_", ",_", "False_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "coco", "s_", "._", "audio_", "._", "initialize_", "(_", "audio", "\\u", "settings_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "return_", "self_", "._", "window_", "\\u\\u\\uNEWLINE\\u\\u\\u_" ]
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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