code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
__version__ = "1.0c2"
ajibawa-2023/Python-Code-Large/train/row_5282
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5282:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_...
[]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_5283
114
303
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5283:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5283:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5283:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5283:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5283:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_5284
7
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5284:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5284:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5284:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5284:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5284:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5284...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
ajibawa-2023/Python-Code-Large/train/row_5285
112
147
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5285:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5285:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5285:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5285:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5285:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_52...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
ajibawa-2023/Python-Code-Large/train/row_5286
51
187
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5286:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5286:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5286:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5286:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5286:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
ajibawa-2023/Python-Code-Large/train/row_5287
213
438
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5287:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5287:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5287:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5287:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5287:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Code-La...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
ajibawa-2023/Python-Code-Large/train/row_5288
43
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5288:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5288:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5288:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5288:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5288:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python # # hanzim2dict # # Original version written by Michael Robinson (robinson@netrinsics.com) # Version 0.0.2 # Copyright 2004 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
ajibawa-2023/Python-Code-Large/train/row_5291
63
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5291:ImportFrom_L25_C0", "label": "from string import split", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.2273, 0.0091, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["spl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5291:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5291:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5291:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5291:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, os, string, re, glob import libxml2dom fencoding = 'utf-8' whattoextract = u'康熙字典' #def TextInNode(node): # result = u'' # for child in node.childNodes: # if child.nodeType == child.TEXT_NODE: # result += child.nodeValue # else: # result += TextInNode(child) ...
ajibawa-2023/Python-Code-Large/train/row_5292
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5292:Import_L1_C0", "label": "sys import sys, os, string\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 509, 0, 5, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os",...
[]
import sys, string for line in sys.stdin.readlines(): words = string.split(line[:-1], '\t') muci = words[1] sheng = words[2] deng = words[3] hu = words[4] yunbu = words[5] diao = words[6] fanqie= words[7] she = words[8] chars = words[9] romazi= words[10] beizhu= words[12] pinyin= word...
ajibawa-2023/Python-Code-Large/train/row_5293
19
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5293:Import_L1_C0", "label": "sys import sys, string", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "string"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5293:For_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5293:Assign_L3_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5293:For_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5293:Assign_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5293:...
# This tool convert KangXiZiDian djvu files to tiff files. # Download djvu files: http://bbs.dartmouth.edu/~fangq/KangXi/KangXi.tar # Character page info: http://wenq.org/unihan/Unihan.txt as kIRGKangXi field. # Character seek position in Unihan.txt http://wenq.org/unihan/unihandata.txt # DjVuLibre package provides the...
ajibawa-2023/Python-Code-Large/train/row_5294
8
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5294:Import_L8_C0", "label": "os import os", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0625, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5294:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5294:Expr_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5294:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5294:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5294:...
#!/usr/bin/env python # -*- coding: utf-8 -*- from gimpfu import * import os def prepare_image(image, visibleLayers, size, numColors = None): """prepare custom image image - image object to change size - size of the image in pixels visibleLayers - a list of layers that must be visible """ for layer in imag...
ajibawa-2023/Python-Code-Large/train/row_5295
115
194
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5295:ImportFrom_L3_C0", "label": "from gimpfu import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0155, 0.0052, 0, 0.66, 0.0, 433, 0, 1, 0, 0, 433, 0, 0], "semantic": {"name": "gimpfu", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5295:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5295:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5295:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5295:For_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python # WinVNKey Hannom Database to Stardict dictionary source Conversion Tool # coded by wesnoth@ustc on 070804 # http://winvnkey.sourceforge.net import sys, os, string, types, pprint infileencoding = 'utf-16-le' outfileencoding = 'utf-8' def showhelp(): print "Usage: %s filename" % sys.argv[0] def isha...
ajibawa-2023/Python-Code-Large/train/row_5296
22
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5296:Import_L1_C0", "label": "sys import sys, os, string\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 509, 0, 5, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5296:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5296:Expr_L3_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5296:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5296:If_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/env python # # uyghur2dict # By Abdisalam (anatilim@gmail.com), inspired by Michael Robinson's hanzim2dict converter. # # Original version, hanzim2dict, written by Michael Robinson (robinson@netrinsics.com) # Version 0.0.2 # Copyright 2004 # # This program is free software; you can redistribute i...
ajibawa-2023/Python-Code-Large/train/row_5297
46
86
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5297:ImportFrom_L25_C0", "label": "from string import split", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.2907, 0.0116, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["spl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5297:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5297:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5297:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5297:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code...
import sys, string base = {} for line in sys.stdin.readlines(): words = string.split(line[:-1], '\t') if len(words) != 2: print "Error!" exit if base.has_key(words[0]): base[words[0]] += [words[1]] else: base[words[0]] = [words[1]] keys = base.keys() keys.sort() for key in keys: print key,'\t...
ajibawa-2023/Python-Code-Large/train/row_5300
16
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5300:Import_L1_C0", "label": "sys import sys, string", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "string"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5300:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5300:Assign_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5300:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5300:If_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5300:If_L...
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program...
ajibawa-2023/Python-Code-Large/train/row_5301
128
185
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5301:Import_L19_C0", "label": "board import board, pygame, sys\u2026", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1027, 0.0054, 0, 0.66, 0.0, 594, 0, 4, 0, 0, 594, 0, 0], "semantic": {"name": "board", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5301:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5301:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5301:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5301:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python class IllegalMove(Exception): pass size = 3 dim = 4 # try to keep it as flexible as possible! colours = {0: ' ', 1: 'X', -1: 'O'} board_size = size ** dim diag = [range(size), range(size-1,-1,-1)] strt = [[k,k,k] for k in range(size)] psbl = diag + strt # possibilities def convert(coord): ...
ajibawa-2023/Python-Code-Large/train/row_5302
64
116
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5302:ClassDef_L3_C0", "label": "IllegalMove", "type": "class", "loc": [3, 4], "level": 0, "parent": null, "vector": [3, 0, 0.0302, 0.0172, 0, 0.66, 0.0, 546, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "IllegalMove", "arg_names": [], "import_names": [], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5302:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5302:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5302:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5302:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import board from random import choice def rate_position_1(pos): """ Rate position based on score plus open rows """ open_for_X, open_for_O = pos.count_patterns() rating = 0 for k in range(board.size): rating += open_for_X[k] * 0.5 ** k rating -= open_for_O[k]...
ajibawa-2023/Python-Code-Large/train/row_5303
56
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5303:Import_L3_C0", "label": "board import board", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0337, 0.0112, 0, 0.66, 0.0, 594, 0, 1, 0, 0, 594, 0, 0], "semantic": {"name": "board", "arg_names": [], "import_names": ["board"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5303:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5303:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5303:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5303:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program...
ajibawa-2023/Python-Code-Large/train/row_5304
10
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5304:Import_L1_C0", "label": "board import board", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 594, 0, 1, 0, 0, 594, 0, 0], "semantic": {"name": "board", "arg_names": [], "import_names": ["board"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5304:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5304:While_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5304:While_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5304:Try_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
from PIL import Image tileArray = [ [ [0, 0] ] ] #print tileArray[1][1][0] width = 128 height = 128 tileSize = 32 outputFileName = "map.png" tiles = Image.open('beachTiles.png') tilePix = tiles.load() tileMap = Image.new("RGBA", (width * tileSize, height * tileSize), "pink") mapPix = tileMap.load() #sandTile =...
ajibawa-2023/Python-Code-Large/train/row_5305
19
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5305:ImportFrom_L1_C0", "label": "from PIL import Image", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 556, 0, 1, 0, 0, 556, 0, 0], "semantic": {"name": "PIL", "arg_names": [], "import_names": ["Image"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5305:For_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5305:For_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5305:For_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5305:For_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5305:Fo...
""" The MIT License Copyright (c) 2010 AppHacker apphacker@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
ajibawa-2023/Python-Code-Large/train/row_5308
163
349
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5308:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 76], "level": 0, "parent": null, "vector": [8, 0, 0.1103, 0.2178, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5308:ClassDef_L90_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5308:FunctionDef_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5308:FunctionDef_L92_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5308:Expr_L94_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python # -*- coding: utf-8 -*- import math, sys, os.path, glob, string, re, os, subprocess is_windows = sys.platform == 'win32' is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AM...
ajibawa-2023/Python-Code-Large/train/row_5309
224
401
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5309:Import_L4_C0", "label": "math import math, sys, os.path\u2026", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.01, 0.0025, 0, 0.66, 0.0, 526, 0, 8, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["ma...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5309:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5309:If_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5309:If_L12_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5309:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5309:If...
#!/usr/bin/python # -*- coding: utf-8 -*- import math, sys, os.path, glob, string, re, os, subprocess is_windows = sys.platform == 'win32' is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AM...
ajibawa-2023/Python-Code-Large/train/row_5310
224
401
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5310:Import_L4_C0", "label": "math import math, sys, os.path\u2026", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.01, 0.0025, 0, 0.66, 0.0, 526, 0, 8, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["ma...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5310:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5310:If_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5310:If_L12_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5310:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5310:If...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/x64") zenilib.destroy("bin/x64") zenilib.destroy("lib_win/x64") zenilib.destroy("*_x64.exe") zenilib.destroy("...
ajibawa-2023/Python-Code-Large/train/row_5311
14
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5311:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0476, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5311:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5311:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5311:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5311:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import glob, os, shutil, sys auto_accept = False dir = os.path.dirname( os.path.realpath( __file__ ) ) + "/.." def isspace(c): return c == ' ' or c == '\t' or c == '\r' or c == '\n' def yes_no_prompt(prompt): if auto_accept: return True print prompt + " [y/N] " , line = sys.stdin.re...
ajibawa-2023/Python-Code-Large/train/row_5312
34
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5312:Import_L3_C0", "label": "glob import glob, os, shutil\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 958, 0, 4, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["gl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5312:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5312:Return_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5312:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5312:If_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64 def main(): zenilib_clean_extra.main() zenilib_strip_x64.main() os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("Frameworks") if __name__ == '__main__': main(*sys.argv[1:])
ajibawa-2023/Python-Code-Large/train/row_5313
9
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5313:Import_L3_C0", "label": "os import os, sys, zenilib\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0667, 0, 0.66, 0.0, 688, 0, 5, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5313:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5313:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5313:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5313:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean def main(): zenilib_clean.main() os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/*.suo") zenilib.destroy("Visual Studio 2008/*.user", ["Application.vcproj.user", "Application_SoarSML.vcproj.user", "Launcher...
ajibawa-2023/Python-Code-Large/train/row_5314
19
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5314:Import_L3_C0", "label": "os import os, sys, zenilib\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5314:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5314:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5314:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5314:Expr_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/SoarLibrary") zenilib.destroy("Visual Studio 2008/Win32") zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/SoarLibrary") zenilib.de...
ajibawa-2023/Python-Code-Large/train/row_5315
49
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5315:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0448, 0.0149, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5315:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5315:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5315:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5315:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import glob, os, shutil, sys auto_accept = False dir = os.path.dirname( os.path.realpath( __file__ ) ) + "/.." def isspace(c): return c == ' ' or c == '\t' or c == '\r' or c == '\n' def yes_no_prompt(prompt): if auto_accept: return True print prompt + " [y/N] " , line = sys.stdin.re...
ajibawa-2023/Python-Code-Large/train/row_5316
34
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5316:Import_L3_C0", "label": "glob import glob, os, shutil\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 958, 0, 4, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["gl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5316:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5316:Return_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5316:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5316:If_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean def main(): zenilib_clean.main() os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/*.suo") zenilib.destroy("Visual Studio 2008/*.user", ["Application.vcproj.user", "Application_SoarSML.vcproj.user", "Launcher...
ajibawa-2023/Python-Code-Large/train/row_5317
19
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5317:Import_L3_C0", "label": "os import os, sys, zenilib\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5317:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5317:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5317:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5317:Expr_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("bin/x64/cgc.exe") zenilib.destroy("bin/cgc.exe") zenilib.destroy("bin/cgfxcat.exe") zenilib.destroy("bin/cginfo.exe") zenilib.destroy("config/zenilib.xml.bak") zenilib.de...
ajibawa-2023/Python-Code-Large/train/row_5318
23
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5318:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0303, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5318:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5318:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5318:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5318:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/SoarLibrary") zenilib.destroy("Visual Studio 2008/Win32") zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/SoarLibrary") zenilib.de...
ajibawa-2023/Python-Code-Large/train/row_5319
49
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5319:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0448, 0.0149, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5319:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5319:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5319:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5319:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/x64") zenilib.destroy("bin/x64") zenilib.destroy("lib_win/x64") zenilib.destroy("*_x64.exe") zenilib.destroy("...
ajibawa-2023/Python-Code-Large/train/row_5320
14
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5320:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0476, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5320:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5320:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5320:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5320:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64 def main(): zenilib_clean_extra.main() zenilib_strip_x64.main() os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("Frameworks") if __name__ == '__main__': main(*sys.argv[1:])
ajibawa-2023/Python-Code-Large/train/row_5321
9
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5321:Import_L3_C0", "label": "os import os, sys, zenilib\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0667, 0, 0.66, 0.0, 688, 0, 5, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5321:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5321:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5321:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5321:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("bin/x64/cgc.exe") zenilib.destroy("bin/cgc.exe") zenilib.destroy("bin/cgfxcat.exe") zenilib.destroy("bin/cginfo.exe") zenilib.destroy("config/zenilib.xml.bak") zenilib.de...
ajibawa-2023/Python-Code-Large/train/row_5322
23
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5322:Import_L3_C0", "label": "os import os, sys, zenilib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0303, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5322:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5322:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5322:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5322:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
ajibawa-2023/Python-Code-Large/train/row_5323
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5323:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5323:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5323:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5323:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5323:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5323:...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): ...
ajibawa-2023/Python-Code-Large/train/row_5325
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5325:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5325:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5325:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5325:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5325:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
ajibawa-2023/Python-Code-Large/train/row_5326
12
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5326:Import_L2_C0", "label": "datetime import datetime", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0488, 0.0244, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5326:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5326:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5326:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5326:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
ajibawa-2023/Python-Code-Large/train/row_5327
12
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5327:Import_L2_C0", "label": "datetime import datetime", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0465, 0.0233, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5327:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5327:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5327:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5327:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
ajibawa-2023/Python-Code-Large/train/row_5328
12
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5328:Import_L2_C0", "label": "datetime import datetime", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0488, 0.0244, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5328:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5328:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5328:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5328:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
# encoding=utf-8 from django.conf.urls.defaults import * from django.conf import settings from house import views urlpatterns=patterns('', url(r'^house/detail/(?P<id>\d+)/$', views.detail,{'template_name':'detail.html'}), url(r'^house/', views.index,{'template_name':'house.html'}), url(r'^contact...
ajibawa-2023/Python-Code-Large/train/row_5329
4
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5329:ImportFrom_L2_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_na...
[]
# encoding=utf-8 from django.contrib import admin from zhaofang.house.models import * admin.site.register(House) admin.site.register(Photo) class HouseAdmin(admin.ModelAdmin): formfield_overrides = { #fields=('name') #models.TextField: {'detail': RichTextEditor}, }
ajibawa-2023/Python-Code-Large/train/row_5330
6
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5330:ImportFrom_L2_C0", "label": "from django.contrib import admin", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0833, 0, 0.66, 0.0, 302, 0, 1, 0, 0, 302, 0, 0], "semantic": {"name": "django.contrib", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5330:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5330:Assign_L9_C4"}]
# encoding=utf-8 from house.models import * from django.shortcuts import render_to_response from django.template import RequestContext def index(request,template_name): house_list=House.objects.all().reverse()[:8] return render_to_response(template_name,locals(),context_instance=RequestContext(request...
ajibawa-2023/Python-Code-Large/train/row_5331
16
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5331:ImportFrom_L2_C0", "label": "from house.models import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0455, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "house.models", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5331:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5331:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5331:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5331:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
ajibawa-2023/Python-Code-Large/train/row_5332
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5332:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5332:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5332:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5332:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5332:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5332:...
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^zhaofang/', include('zhaofang.foo.urls')),...
ajibawa-2023/Python-Code-Large/train/row_5333
7
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5333:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5333:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5333:Assign_L29_C4"}]
# Django settings for zhaofang project. # -*- coding: utf-8 -*- import os gettext = lambda s: s PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { ...
ajibawa-2023/Python-Code-Large/train/row_5334
29
156
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5334:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0064, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsgwsl.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_5335
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5335:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5335:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5335:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5335:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5335:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5335:...
from django.db import models # Create your models here.
ajibawa-2023/Python-Code-Large/train/row_5336
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5336:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["m...
[]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
ajibawa-2023/Python-Code-Large/train/row_5337
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5337:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5337:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5337:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5337:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5337:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Create your views here. from django.shortcuts import render_to_response from django.shortcuts import redirect from django.core.context_processors import csrf def badpasswords(request): content = {} content.update(csrf(request)) if request.method == 'POST': if str(request.POST['pass']...
ajibawa-2023/Python-Code-Large/train/row_5338
126
190
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5338:ImportFrom_L2_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0053, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5338:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5338:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5338:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5338:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.db import models # Create your models here.
ajibawa-2023/Python-Code-Large/train/row_5339
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5339:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["m...
[]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_5340
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5340:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5340:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5340:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5340:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5340:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Create your views here. from django.shortcuts import render_to_response from django.shortcuts import redirect from django.core.context_processors import csrf import time import random import urllib def unprotected(request): content = {} return render_to_response("Lab7/unprotected.html", content) def unprote...
ajibawa-2023/Python-Code-Large/train/row_5341
38
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5341:ImportFrom_L2_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.0185, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5341:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5341:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5341:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5341:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.db import models # Create your models here.
ajibawa-2023/Python-Code-Large/train/row_5342
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5342:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["m...
[]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
ajibawa-2023/Python-Code-Large/train/row_5343
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5343:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5343:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5343:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5343:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5343:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
from django.template import RequestContext from django.shortcuts import render_to_response from django.core.context_processors import csrf from django.http import HttpResponse def index(request): c = {} c.update(csrf(request)) if request.method == 'POST': data = { 'price' : ...
ajibawa-2023/Python-Code-Large/train/row_5344
27
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5344:ImportFrom_L1_C0", "label": "from django.template import RequestContext", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 213, 0, 1, 0, 0, 213, 0, 0], "semantic": {"name": "django.template", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5344:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5344:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5344:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5344:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'nsgwsl.views.index'), # url(r'^nsgwsl/', include('nsgwsl.foo.urls')), url(r'^La...
ajibawa-2023/Python-Code-Large/train/row_5345
2
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5345:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 528, 0, 3, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg...
[]
# Django settings for ITP425 project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'N...
ajibawa-2023/Python-Code-Large/train/row_5346
25
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5346:Assign_L3_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0195, 0.0065, 0, 0.66, 0.0, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name":...
[]
from django.shortcuts import render_to_response def index(request): return render_to_response('index.html')
ajibawa-2023/Python-Code-Large/train/row_5347
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5347:ImportFrom_L1_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5347:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5347:Return_L4_C4"}]
""" WSGI config for ITP425 project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
ajibawa-2023/Python-Code-Large/train/row_5348
5
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5348:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.5357, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
from django.db import models # Create your models here. from django.db.models import Model class Session(models.Model): sessionindex = models.IntegerField(default=1234567) def __unicode__(self): return str(self.sessionindex)
ajibawa-2023/Python-Code-Large/train/row_5349
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5349:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["models"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5349:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5349:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5349:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5349:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
ajibawa-2023/Python-Code-Large/train/row_5350
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5350:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5350:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5350:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5350:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5350:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Create your views here. from django.shortcuts import render_to_response from django.shortcuts import redirect import time import random import urllib def weaktoken1(request): content = {} if request.method == "POST": if str(request.POST['user']) == 'Lassie' and str(request.POST['pass']) =...
ajibawa-2023/Python-Code-Large/train/row_5351
47
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5351:ImportFrom_L2_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0267, 0.0133, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5351:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5351:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5351:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5351:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
ajibawa-2023/Python-Code-Large/train/row_5352
90
248
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5352:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.0081, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5352:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5352:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5352:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5352:If_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
ajibawa-2023/Python-Code-Large/train/row_5353
90
248
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5353:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.0081, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5353:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5353:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5353:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5353:If_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the terms of the Apache Software License 2.0: # http://www.apache.org/licenses/LICENSE-2.0 # # Questions, comments, feature requests and patches are most welcome. # Please direct all of these to the Google Code users group: # http://groups.google.co...
ajibawa-2023/Python-Code-Large/train/row_5354
45
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5354:Expr_L10_C0", "label": "expression", "type": "expression", "loc": [10, 30], "level": 0, "parent": null, "vector": [8, 0, 0.1709, 0.1795, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5354:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5354:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5354:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5354:Assign_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import os from google.appengine.ext.webapp import template import cgi from google.appengine.ext.webapp.util import login_required from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from goog...
ajibawa-2023/Python-Code-Large/train/row_5355
42
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5355:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5355:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5355:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5355:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5355:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
SECRET_CODE = 'whateveryourcodeis'
ajibawa-2023/Python-Code-Large/train/row_5356
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5356:Assign_L2_C0", "label": "SECRET_CODE =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.5, 0, 0.66, 0.0, 52, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SECRET_CODE", "arg_names": [], "import_names": [], "rhs_call_n...
[]
import sys, os, optparse, subprocess # Avoid .pyc files sys.dont_write_bytecode = True # Auxilary def toPosix(path): if os.sep != "/" and os.sep in path: return path.replace(os.sep, "/") return path # Parse command line parser = optparse.OptionParser(usage='usage: %prog [options] settings...
ajibawa-2023/Python-Code-Large/train/row_5357
53
84
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5357:Import_L1_C0", "label": "sys import sys, os, optparse\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0119, 0.0119, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5357:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5357:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5357:If_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5357:Return_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_53...
#!/usr/bin/env pypy import os, sys, logging, re import argparse import fnmatch configurations = {'lite', 'pro'} package_dirs = { 'lite': ('src/cx/hell/android/pdfview',), 'pro': ('src/cx/hell/android/pdfviewpro',) } file_replaces = { 'lite': ( 'cx.hell.android.pdfview.', '"cx.hell.an...
ajibawa-2023/Python-Code-Large/train/row_5358
133
214
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5358:Import_L3_C0", "label": "os import os, sys, logging\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.014, 0.0047, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "s...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5358:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5358:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5358:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5358:If_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
ajibawa-2023/Python-Code-Large/train/row_5359
11
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5359:Import_L32_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.7442, 0.0233, 0, 0.66, 0.0, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5359:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5359:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5359:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5359:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_5360
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5360:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
# -*- coding: utf-8 -*- #! /usr/bin/python ####################################################################################### # # # File: main.py # # Par...
ajibawa-2023/Python-Code-Large/train/row_5362
110
206
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5362:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 38], "level": 0, "parent": null, "vector": [8, 0, 0.1699, 0.034, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5362:Try_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5362:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5362:Try_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5362:Assign_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
import random NS_NTP = ["132.163.4.101", "132.163.4.102", "132.163.4.103", "128.138.140.44", "69.25.96.13", "64.236.96.53"] #print len(UA_MSIE10) #print len(UA_MSIE9) #print len(UA_MSIE8) #print len(UA_MSIE7) #print len(UA_MSIE6) def get_random_ntp_server(): random.seed() i = random.randra...
ajibawa-2023/Python-Code-Large/train/row_5363
8
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5363:Import_L2_C0", "label": "random import random", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0417, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5363:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5363:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5363:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5363:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_5364
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5364:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() time_server = (get_random_ntp_server(), 123) TIME1970 = 2208988800L # Thanks to F.Lundh def get_ntp_time(): client = socket( AF_INET, SOC...
ajibawa-2023/Python-Code-Large/train/row_5365
18
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5365:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0357, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5365:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5365:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5365:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5365:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- ####################################################################################### # # # File: Core.py # # Part of stage1st_cheater ...
ajibawa-2023/Python-Code-Large/train/row_5366
146
273
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5366:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.1209, 0.0183, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5366:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5366:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5366:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5366:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainDialog.ui' # # Created: Sun May 29 21:22:32 2011 # by: PyQt4 UI code generator 4.8.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
ajibawa-2023/Python-Code-Large/train/row_5367
82
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5367:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0855, 0.0085, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5367:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5367:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5367:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5367:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
####################################################################################### # # File: user_agent_lib # Part of 51cto-cheater # Home: http://51cto-cheater.googlecode.com # # Th...
ajibawa-2023/Python-Code-Large/train/row_5368
16
4,010
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5368:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0082, 0.0012, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5368:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5368:Expr_L3999_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5368:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5368:Assign_L4000_C4"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() time_server = (get_random_ntp_server(), 123) TIME1970 = 2208988800L # Thanks to F.Lundh def get_ntp_time(): client = socket( AF_INET, SOC...
ajibawa-2023/Python-Code-Large/train/row_5369
18
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5369:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0357, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5369:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5369:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5369:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5369:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_5371
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5371:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5371:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5371:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5371:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5371:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5371:...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_5373
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5373:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5373:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5373:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5373:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5373:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Create your views here. from django.http import HttpResponse from models import Minidb from django.shortcuts import render_to_response def getimg(request, img, ext): imglink = Minidb.objects.get(link=img).image # html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink # return H...
ajibawa-2023/Python-Code-Large/train/row_5374
9
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5374:ImportFrom_L2_C0", "label": "from django.http import HttpResponse", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.0, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5374:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5374:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5374:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5374:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python source=open('images.txt', 'r') dest=open('sql.txt', 'w') for i in source.readlines(): link = i[:-5] ext = "('%s', '%s'),\n" % (link, i[:-1]) dest.write(ext) source.close() dest.close()
ajibawa-2023/Python-Code-Large/train/row_5375
8
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5375:Assign_L2_C0", "label": "source = open()", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.1111, 0, 0.66, 0.0, 703, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5375:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5375:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5375:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5375:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5375:...
#!/usr/bin/env python source=open('images.txt', 'r') dest=open('sql.txt', 'w') for i in source.readlines(): link = i[:-5] ext = "('%s', '%s'),\n" % (link, i[:-1]) dest.write(ext) source.close() dest.close()
ajibawa-2023/Python-Code-Large/train/row_5376
8
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5376:Assign_L2_C0", "label": "source = open()", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.1111, 0, 0.66, 0.0, 703, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5376:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5376:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5376:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5376:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5376:...
# Django settings for fotohost project. DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS FORCE_SCRIPT_NAME = '' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'....
ajibawa-2023/Python-Code-Large/train/row_5377
26
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5377:Assign_L3_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0195, 0.0065, 0, 0.66, 0.0, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name":...
[]
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from forpic.views import getimg, getimg2 # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'fotohost.views.home', name='home'), # url(r'^fotohos...
ajibawa-2023/Python-Code-Large/train/row_5378
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5378:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 528, 0, 3, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_nam...
[]
""" WSGI config for fotohost project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
ajibawa-2023/Python-Code-Large/train/row_5379
5
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5379:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.5357, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_5380
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5380:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5380:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5380:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5380:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5380:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5380:...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_5381
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5381:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5381:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5381:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5381:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5381:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5381:...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_5383
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5383:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5383:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5383:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5383:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5383:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Create your views here. from django.http import HttpResponse from models import Minidb from django.shortcuts import render_to_response def getimg(request, img, ext): imglink = Minidb.objects.get(link=img).image # html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink # return H...
ajibawa-2023/Python-Code-Large/train/row_5384
9
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5384:ImportFrom_L2_C0", "label": "from django.http import HttpResponse", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.0, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5384:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5384:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5384:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5384:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
''' Created on 13.09.2012 @author: Admin '''
ajibawa-2023/Python-Code-Large/train/row_5385
1
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5385:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.6, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[]
# Django settings for fotohost project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS FORCE_SCRIPT_NAME = '' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. ...
ajibawa-2023/Python-Code-Large/train/row_5386
26
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5386:Assign_L3_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0195, 0.0065, 0, 0.66, 0.0, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name":...
[]
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from forpic.views import getimg, getimg2 # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'fotohost.views.home', name='home'), # url(r'^fotohos...
ajibawa-2023/Python-Code-Large/train/row_5387
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5387:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 528, 0, 3, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_nam...
[]
""" WSGI config for fotohost project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
ajibawa-2023/Python-Code-Large/train/row_5388
5
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5388:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.5357, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_5389
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5389:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5389:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5389:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5389:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5389:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5389:...
import os import sys from unittest import TestCase here_dir = os.path.dirname(os.path.abspath(__file__)) conf_dir = os.path.dirname(os.path.dirname(here_dir)) sys.path.insert(0, conf_dir) import pkg_resources pkg_resources.working_set.add_entry(conf_dir) pkg_resources.require('Paste') pkg_resources.require('PasteS...
ajibawa-2023/Python-Code-Large/train/row_5390
24
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5390:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0294, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5390:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5390:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5390:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5390:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code...
from sqlalchemy import * meta = BoundMetaData('mysql://forlater:4l8r@localhost/forlater') users_table = Table('users', meta, autoload=True) researchers_table = Table('researchers', meta, autoload=True) studies_table = Table('studies', meta, autoload=True) entries_table = Table('entries', meta, autoload=True) snippets...
ajibawa-2023/Python-Code-Large/train/row_5391
7
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5391:ImportFrom_L1_C0", "label": "from sqlalchemy import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 835, 0, 1, 0, 0, 835, 0, 0], "semantic": {"name": "sqlalchemy", "arg_names": [], "import_names": ["*"...
[]
import paste.deploy def setup_config(command, filename, section, vars): """ Place any commands to setup forlater here. """ conf = paste.deploy.appconfig('config:' + filename) conf.update(dict(app_conf=conf.local_conf, global_conf=conf.global_conf)) paste.deploy.CONFIG.push_process_config(conf) ...
ajibawa-2023/Python-Code-Large/train/row_5392
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5392:Import_L1_C0", "label": "paste.deploy import paste.deploy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "paste.deploy", "arg_names": [], "import_names": ["pa...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5392:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5392:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5392:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5392:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...