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 |
|---|---|---|---|---|---|---|---|
from yt.mods import *
import pylab as pl
for dump in range(7):
pf = EnzoStaticOutput('DD%04i/noh2Damr_%04i' % (dump,dump))
dd = pf.h.all_data()
t = pf['InitialTime']
x = dd['x']
y = dd['y']
r = na.sqrt((x**2 + y**2))
postshock_r = na.linspace(t*1./3., na.sqrt(2))
postshock_den = (1 + t... | ajibawa-2023/Python-Code-Large/train/row_80164 | 25 | 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_80164:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80164:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80164:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80164:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80164:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
import sys
from matplotlib import use
from yt.mods import *
if len(sys.argv) > 1:
num = int(sys.argv[1])
else:
num = 20
amrfile = "DD%4.4d/output_%4.4d" % (num, num)
pf = load(amrfile)
pc = PlotCollection(pf, center=[0.5]*3)
# Make plots of density and gas energy
pc.add_slice('Density', 2)
pc.add_slice('Gas_... | ajibawa-2023/Python-Code-Large/train/row_80165 | 16 | 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_80165:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80165:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80165:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80165:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80165:Assign_L8_C4"}] |
from matplotlib import use; use('Agg')
from yt.mods import *
import pylab as plt
### define problem name
problem_name = 'SedovBlast-MHD-2D-Gardiner'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0009'
### construct in... | ajibawa-2023/Python-Code-Large/train/row_80166 | 23 | 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_80166:ImportFrom_L1_C0", "label": "from matplotlib import use", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 75, 0, 1, 0, 0, 75, 0, 0], "semantic": {"name": "matplotlib", "arg_names": [], "import_names": ["u... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80166:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80166:Return_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80166:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80166:Return_L33_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-7-ShockTube'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
filename = './' + output_dir_base + dump... | ajibawa-2023/Python-Code-Large/train/row_80167 | 74 | 160 | 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_80167:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80167:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80167:Return_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80167:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80167:Return_L40_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'SodShockTube'
#problem_name = 'SodShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
filename =... | ajibawa-2023/Python-Code-Large/train/row_80168 | 74 | 161 | 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_80168:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80168:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80168:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80168:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80168:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from matplotlib import use; use('Agg')
from yt.mods import *
import pylab as plt
### define problem name
problem_name = 'FreeExpansion'
#problem_name = 'Toro-2-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'output_'
### define output to be plotted
dum... | ajibawa-2023/Python-Code-Large/train/row_80169 | 31 | 66 | 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_80169:ImportFrom_L1_C0", "label": "from matplotlib import use", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0152, 0.0152, 0, 0.66, 0.0, 75, 0, 1, 0, 0, 75, 0, 0], "semantic": {"name": "matplotlib", "arg_names": [], "import_names": ["u... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80169:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80169:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80169:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80169:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-4-ShockTube'
#problem_name = 'Toro-4-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
fi... | ajibawa-2023/Python-Code-Large/train/row_80170 | 74 | 160 | 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_80170:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80170:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80170:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80170:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80170:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-5-ShockTube'
#problem_name = 'Toro-5-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
fi... | ajibawa-2023/Python-Code-Large/train/row_80171 | 74 | 160 | 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_80171:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80171:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80171:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80171:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80171:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-3-ShockTube'
#problem_name = 'Toro-3-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
fi... | ajibawa-2023/Python-Code-Large/train/row_80172 | 74 | 160 | 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_80172:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80172:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80172:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80172:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80172:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-6-ShockTube'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
filename = './' + output_dir_base + dump... | ajibawa-2023/Python-Code-Large/train/row_80173 | 74 | 160 | 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_80173:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80173:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80173:Return_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80173:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80173:Return_L40_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-1-ShockTube'
#problem_name = 'Toro-1-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
fi... | ajibawa-2023/Python-Code-Large/train/row_80174 | 74 | 161 | 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_80174:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80174:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80174:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80174:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80174:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
from yt.mods import *
import pylab
### define problem name
problem_name = 'Toro-2-ShockTube'
#problem_name = 'Toro-2-ShockTubeAMR'
### define simulation output directory and filename base
output_dir_base = 'DD'
datafile_base = 'data'
### define output to be plotted
dumpid = '0001'
### construct input filename
fi... | ajibawa-2023/Python-Code-Large/train/row_80175 | 74 | 161 | 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_80175:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80175:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80175:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80175:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80175:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Co... |
import numpy as na
import matplotlib.pyplot as plt
import os
# Assume enzo has been run with "enzo.exe TestOrbit > TestOrbit.out"
FileIn = open("TestOrbit.out", "r")
xpos = []
ypos = []
for line in FileIn:
if 'id=1' in line:
lst = line.split()
xpos.append(lst[1])
ypos.append(lst[2])
FileIn.close(... | ajibawa-2023/Python-Code-Large/train/row_80176 | 17 | 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_80176:Import_L1_C0", "label": "numpy import na", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["na"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80176:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80176:If_L11_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80176:If_L11_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_80176:Assign_L12_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80... |
import numpy as na
import matplotlib.pyplot as plt
Data = na.loadtxt("TestGravityCheckResults.out")
# Read in data from text file produced by code
radius = Data[:,0]
ForceTangentialComputed = Data[:,1]
ForceRadialComputed = Data[:,2]
ForceRadialTrue = Data[:,3]
Error = (ForceRadialComputed-ForceRadialTrue)/ForceRad... | ajibawa-2023/Python-Code-Large/train/row_80177 | 19 | 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_80177:Import_L1_C0", "label": "numpy import na", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["na"], "rhs_call_nam... | [] |
from yt.mods import *
from yt.extensions.enzo_test import YTStaticOutputTest
class TestBinaryCollapseProjection(YTStaticOutputTest):
name = "binary_collapse_projection"
def run(self):
# self.pf already exists
proj = self.pf.h.proj(0, 'Density', center=[0.5, 0.5, 0.5])
frb = FixedResolu... | ajibawa-2023/Python-Code-Large/train/row_80178 | 22 | 36 | 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_80178:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80178:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80178:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80178:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80178:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
from yt.mods import *
for i in xrange(8):
pf = load("DD%04d/data%04d" % (i,i))
pc = PlotCollection(pf, center=[0.5]*3)
for dim in xrange(3):
pc.add_projection("Density", dim)
pc.set_width(.3, '1')
pc.save("%04d_" % i)
| ajibawa-2023/Python-Code-Large/train/row_80179 | 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_80179:ImportFrom_L1_C0", "label": "from yt.mods import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 843, 0, 1, 0, 0, 843, 0, 0], "semantic": {"name": "yt.mods", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80179:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80179:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80179:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80179:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
"""
inits_sort.py -- A script to move particles to the correct grid for nested cosmology
initial conditions.
Purpose: When making nested initial conditions with 'inits.exe', depending on
the cosmology, some of the particles created for nested subgrids are given
positions outside that nested grid. Before running 'ring.... | ajibawa-2023/Python-Code-Large/train/row_80180 | 94 | 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_80180:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 25], "level": 0, "parent": null, "vector": [8, 0, 0.0684, 0.1316, 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_80180:For_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80180:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80180:For_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80180:Expr_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
import tables
| ajibawa-2023/Python-Code-Large/train/row_80181 | 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_80181:Import_L1_C0", "label": "tables import tables", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 0, 1, 0, 0, 475, 0, 0], "semantic": {"name": "tables", "arg_names": [], "import_names": ["tables"], "rhs_call... | [] |
# SCRIPT TO MAKE INITIAL CONDITION FILES FOR COSMOLOGICAL SIMULATIONS
#
# Uses mpgrafic and degraf (if necessary)
#
# Written by John H. Wise (June 2008)
#-----------------------------------------------------------------------
import os, os.path, sys
from math import *
#-------------------- PARAMETERS ---------------... | ajibawa-2023/Python-Code-Large/train/row_80182 | 97 | 197 | 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_80182:Import_L8_C0", "label": "os import os, os.path, sys", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0406, 0.0051, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.pa... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80182:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80182:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80182:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80182:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code... |
import os
filename = "Make.config.objects"
exts = ["C", "c", "src", "src90"]
# Read object names from Makefile
lines = open(filename).readlines()
files = []
for l in lines:
if l.find(".o") > 0 and not(l.startswith("#")) and l.find("auto_show") < 0:
source = l.strip().split(".")[0]
files.append(sou... | ajibawa-2023/Python-Code-Large/train/row_80183 | 21 | 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_80183:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 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_80183:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80183:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80183:If_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80183:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_801... |
import os, sys
MAX_WIDTH = 35
TMPFILE = "all_tests"
OUTPUT = "TestProblems.rst"
gcode_base = "http://code.google.com/p/enzo/source/browse/run"
outf = open(OUTPUT, "w")
# Get all parameter files
os.chdir("../../../../run")
os.system("find . -name \"*.enzo\" > %s" % TMPFILE)
lines = open(TMPFILE).readlines()
data = {... | ajibawa-2023/Python-Code-Large/train/row_80184 | 78 | 107 | 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_80184:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80184:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80184:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80184:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80184:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.util.compat import Directive
########################################################################
# Taken from http://countergram.com/youtube-in-rst (MIT License)
#####################################################################... | ajibawa-2023/Python-Code-Large/train/row_80185 | 29 | 53 | 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_80185:ImportFrom_L1_C0", "label": "from docutils import nodes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0189, 0.0189, 0, 0.66, 0.0, 976, 0, 1, 0, 0, 976, 0, 0], "semantic": {"name": "docutils", "arg_names": [], "import_names": ["n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80185:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80185:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80185:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80185:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_80186 | 218 | 605 | 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_80186:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80186:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80186:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80186:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80186:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_80187 | 133 | 305 | 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_80187:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80187:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80187:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80187:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80187:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_80189 | 8 | 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_80189:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80189:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80189:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80189:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80189:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | ajibawa-2023/Python-Code-Large/train/row_80190 | 9 | 40 | 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_80190:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80190:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80190:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80190:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80190:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | ajibawa-2023/Python-Code-Large/train/row_80191 | 10 | 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_80191:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 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_80191:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80191:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80191:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80191:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_80193 | 155 | 378 | 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_80193:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 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_80193:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80193:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80193:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80193:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# 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_80194 | 396 | 1,139 | 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_80194:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80194:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80194:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80194:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80194:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# 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_80195 | 46 | 106 | 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_80195:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80195:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80195:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80195:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80195:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_80196 | 63 | 124 | 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_80196:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80196:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80196:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80196:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80196:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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 ... | ajibawa-2023/Python-Code-Large/train/row_80198 | 86 | 244 | 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_80198:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80198:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80198:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80198:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80198:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2011 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_80199 | 33 | 105 | 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_80199:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80199:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80199:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80199:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80199:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80201 | 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_80201: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_80202 | 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_80202: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": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80202:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80202:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80202:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80202:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_80203 | 115 | 168 | 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_80203:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80203:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80203:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80203:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80203:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_80204 | 57 | 172 | 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_80204:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 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_80204:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80204:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80204:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80204:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# 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_80206 | 201 | 483 | 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_80206:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80206:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80206:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80206:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80206:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# 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 l... | ajibawa-2023/Python-Code-Large/train/row_80207 | 154 | 385 | 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_80207:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80207:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80207:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80207:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80207:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_80209 | 28 | 63 | 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_80209:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80209:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80209:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80209:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80209:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_80210 | 29 | 56 | 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_80210:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80210:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80210:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80210:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80210:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# 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_80211 | 55 | 135 | 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_80211:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 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_80211:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80211:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80211:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80211:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# 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 l... | ajibawa-2023/Python-Code-Large/train/row_80213 | 56 | 123 | 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_80213:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80213:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80213:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80213:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80213:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80214 | 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_80214: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_80215 | 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_80215: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": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80215:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80215:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80215:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80215:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_80216 | 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_80216: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": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80216:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80216:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80216:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80216:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# 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_80217 | 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_80217: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_80217:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80217:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80217:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80217:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/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_80218 | 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_80218: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": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80218:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80218:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80218:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80218:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""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_80219 | 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_80219: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": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80219:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80219:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80219:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80219:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
"""
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_80220 | 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_80220: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": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80220:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80220:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80220:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80220:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
def welcome(name):
return "Hello '" + name + "' from IronPython" | ajibawa-2023/Python-Code-Large/train/row_80223 | 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_80223:FunctionDef_L1_C0", "label": "welcome", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 695, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "welcome", "arg_names": ["name"], "import_names": [], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80223:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80223:Return_L2_C1"}] |
from datetime import datetime
from celery.utils.timeutils import maybe_iso8601
from celery.events.snapshot import Polaroid
from celeryconfig import CELERY_RESULT_DBURI
import sys, os
sys.path.append(os.environ['WEB2PY_PATH'])
from gluon import DAL
folder, uri = os.path.split(CELERY_RESULT_DBURI.split(':///')[1])
print... | ajibawa-2023/Python-Code-Large/train/row_80227 | 44 | 61 | 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_80227:ImportFrom_L1_C0", "label": "from datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80227:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80227:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80227:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80227:If_L20_C8"}, {"f": "ajibawa-2023/Python-Code... |
from datetime import timedelta
from celery.task import Task, PeriodicTask
import time
__all__ = ['DemoTaskFast','DemoTaskSlow','DemoTaskError','DemoTaskPeriodic']
class DemoTaskFast(Task):
def run(self, *args, **vars):
t = 1
print 'DemoTaskFast sleeping %i seconds' % t
time.sleep(t)
... | ajibawa-2023/Python-Code-Large/train/row_80228 | 26 | 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_80228:ImportFrom_L1_C0", "label": "from datetime import timedelta", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80228:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80228:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80228:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80228:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
import os
# List of modules to import when celery starts.
CELERY_IMPORTS = []
## Result store settings.
## This is important, allows web2py to access the celery db directly
CELERY_RESULT_BACKEND = "database"
## This allows web2py to find the celery db
WEB2PY_APP_FOLDER = os.path.join(os.path.dirname(__file__),'..','.... | ajibawa-2023/Python-Code-Large/train/row_80229 | 11 | 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_80229:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s r... | ajibawa-2023/Python-Code-Large/train/row_80230 | 1 | 82 | 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_80230:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 82], "level": 0, "parent": null, "vector": [8, 0, 0.5122, 0.9878, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m... | ajibawa-2023/Python-Code-Large/train/row_80231 | 1 | 81 | 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_80231:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 81], "level": 0, "parent": null, "vector": [8, 0, 0.5123, 0.9877, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%... | ajibawa-2023/Python-Code-Large/train/row_80232 | 1 | 259 | 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_80232:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 259], "level": 0, "parent": null, "vector": [8, 0, 0.5039, 0.9961, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%... | ajibawa-2023/Python-Code-Large/train/row_80233 | 1 | 104 | 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_80233:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 104], "level": 0, "parent": null, "vector": [8, 0, 0.5096, 0.9904, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Изменить" - необязательное выражение вида "field1=\'новое значение\'". Результаты операции JOIN нельзя изменить или удалить.',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:... | ajibawa-2023/Python-Code-Large/train/row_80234 | 1 | 96 | 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_80234:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 96], "level": 0, "parent": null, "vector": [8, 0, 0.5104, 0.9896, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m... | ajibawa-2023/Python-Code-Large/train/row_80235 | 1 | 104 | 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_80235:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 104], "level": 0, "parent": null, "vector": [8, 0, 0.5096, 0.9904, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%... | ajibawa-2023/Python-Code-Large/train/row_80236 | 1 | 104 | 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_80236:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 104], "level": 0, "parent": null, "vector": [8, 0, 0.5096, 0.9904, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S... | ajibawa-2023/Python-Code-Large/train/row_80237 | 1 | 155 | 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_80237:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 155], "level": 0, "parent": null, "vector": [8, 0, 0.5065, 0.9935, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',... | ajibawa-2023/Python-Code-Large/train/row_80238 | 1 | 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_80238:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 116], "level": 0, "parent": null, "vector": [8, 0, 0.5086, 0.9914, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s... | ajibawa-2023/Python-Code-Large/train/row_80239 | 1 | 93 | 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_80239:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 93], "level": 0, "parent": null, "vector": [8, 0, 0.5108, 0.9892, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%... | ajibawa-2023/Python-Code-Large/train/row_80240 | 1 | 142 | 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_80240:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 142], "level": 0, "parent": null, "vector": [8, 0, 0.507, 0.993, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S... | ajibawa-2023/Python-Code-Large/train/row_80241 | 1 | 167 | 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_80241:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 167], "level": 0, "parent": null, "vector": [8, 0, 0.506, 0.994, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': ... | ajibawa-2023/Python-Code-Large/train/row_80242 | 1 | 165 | 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_80242:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 165], "level": 0, "parent": null, "vector": [8, 0, 0.5061, 0.9939, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',... | ajibawa-2023/Python-Code-Large/train/row_80243 | 1 | 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_80243:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 116], "level": 0, "parent": null, "vector": [8, 0, 0.5086, 0.9914, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
'%s... | ajibawa-2023/Python-Code-Large/train/row_80244 | 1 | 93 | 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_80244:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 93], "level": 0, "parent": null, "vector": [8, 0, 0.5108, 0.9892, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newvalue\'". Nemôžete upravovať alebo zmazať výsledky JOINu',
'%Y-%m-%d': '%d.%m.%Y',
'%Y-%m-%d %H:%M:%S': '%d.%m.%Y %H:%M:%S',
'%s rows deleted... | ajibawa-2023/Python-Code-Large/train/row_80245 | 1 | 111 | 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_80245:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 111], "level": 0, "parent": null, "vector": [8, 0, 0.509, 0.991, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## Customize your APP title, subtitle and menus here
#########################################################################
response.title... | ajibawa-2023/Python-Code-Large/train/row_80246 | 8 | 126 | 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_80246:Assign_L7_C0", "label": "response.title =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.0556, 0.0079, 0, 0.66, 0.0, 547, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "response.title", "arg_names": [], "import_names": [... | [] |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
######################################################################... | ajibawa-2023/Python-Code-Large/train/row_80247 | 23 | 81 | 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_80247:If_L8_C0", "label": "if", "type": "if", "loc": [8, 17], "level": 0, "parent": null, "vector": [4, 0, 0.1543, 0.1235, 0, 0.66, 0.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snipp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80247:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80247:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80247:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80247:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8024... |
def _():
from gluon.storage import Storage
from celery import states
db = DAL('sqlite://plugin_celery.db')
HEARTBEAT_EXPIRE = 150 # 2 minutes, 30 seconds
TASK_STATE_CHOICES = zip(states.ALL_STATES, states.ALL_STATES)
PERIOD_CHOICES = (("days", T("Days")),
("hour... | ajibawa-2023/Python-Code-Large/train/row_80248 | 21 | 107 | 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_80248:FunctionDef_L1_C0", "label": "_", "type": "function", "loc": [1, 105], "level": 0, "parent": null, "vector": [2, 0, 0.4953, 0.9813, 0, 0.66, 0.0, 660, 0, 0, 1, 0, 0, 0, 68], "semantic": {"name": "_", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80248:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80248:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80248:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80248:ImportFrom_L4_C4"}, {"f": "ajibawa-2023/Pytho... |
from gluon.serializers import json
from plugin_celery import actions
class TYPE(object):
def __init__(self,myclass=list,parse=True):
self.myclass = myclass
self.parse=parse
def __call__(self,value):
from gluon.contrib.simplejson import loads
try:
obj = loads(value)
... | ajibawa-2023/Python-Code-Large/train/row_80250 | 122 | 174 | 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_80250:ImportFrom_L1_C0", "label": "from gluon.serializers import json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 9, 0, 1, 0, 0, 9, 0, 0], "semantic": {"name": "gluon.serializers", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80250:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80250:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80250:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80250:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorizatio... | ajibawa-2023/Python-Code-Large/train/row_80251 | 15 | 69 | 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_80251:FunctionDef_L12_C0", "label": "index", "type": "function", "loc": [12, 17], "level": 0, "parent": null, "vector": [2, 0, 0.2101, 0.087, 0, 0.66, 0.0, 780, 0, 0, 1, 0, 0, 0, 2], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80251:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80251:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80251:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80251:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import imageshack
import sys
if __name__ == "__main__":
if len(sys.argv)!=3:
print "Usage upload.py <devkey> <filename/url>"
sys.exit(1)
u = imageshack.Uploader(sys.argv[1])
try:
if sys.argv[2].startswith("http://"):
print u.uploadURL(sys.argv[2]... | ajibawa-2023/Python-Code-Large/train/row_80252 | 2 | 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_80252:Import_L1_C0", "label": "imageshack import imageshack", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 115, 0, 1, 0, 0, 115, 0, 0], "semantic": {"name": "imageshack", "arg_names": [], "import_names": ["i... | [] |
#!/usr/bin/env python
import yfrog
import sys
if __name__ == "__main__":
if len(sys.argv)<4:
print "Usage upload.py <username> <password> <filename/url> [<text>] [<source>]"
sys.exit(1)
u = yfrog.Uploader()
if len(sys.argv)>=5:
msg = sys.argv[4]
else:
msg = None
if... | ajibawa-2023/Python-Code-Large/train/row_80253 | 2 | 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_80253:Import_L1_C0", "label": "yfrog import yfrog", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "yfrog", "arg_names": [], "import_names": ["yfrog"], "rhs_ca... | [] |
#!/usr/bin/env python
'''
Client API library to upload images and videos to yfrog.com
Using Yfrog public API, as described here:
http://yfrog.com/api.php
'''
import urllib2_file
import urllib2
import socket
from mimetypes import guess_type
from xml.dom.minidom import parseString
from os.path import exists
API_UR... | ajibawa-2023/Python-Code-Large/train/row_80255 | 100 | 216 | 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_80255:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0301, 0.037, 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_80255:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80255:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80255:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80255:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
''' yfrog api '''
from upload import *
| ajibawa-2023/Python-Code-Large/train/row_80256 | 2 | 6 | 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_80256:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.1667, 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
'''
Client API library to upload images and videos to imageshack.us
Using "Unified upload API" as described here:
http://reg.imageshack.us/content.php?page=developerpublic
'''
import urllib2_file
import urllib2
import socket
import httplib
from mimetypes import guess_type
from xml.dom.minido... | ajibawa-2023/Python-Code-Large/train/row_80258 | 123 | 252 | 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_80258:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0258, 0.0317, 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_80258:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80258:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80258:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80258:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
'''
Client API library for chuncked video uploading to imageshack.us
Using "Streaming upload API" as described here:
http://code.google.com/p/imageshackapi/wiki/StreamingAPI
'''
import os
import urllib
import httplib
import urllib2
from urlparse import urlparse
from os.path import exists
fro... | ajibawa-2023/Python-Code-Large/train/row_80259 | 107 | 176 | 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_80259:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0369, 0.0455, 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_80259:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80259:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80259:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80259:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
''' imageshack api '''
from upload import *
from chuncked_upload import Uploader as ChunkedUploader | ajibawa-2023/Python-Code-Large/train/row_80260 | 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_80260:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [] |
# Burp Extension - JSON decoder
# Copyright : Michal Melewski <michal.melewski@gmail.com>
# Small content-type fix: Nicolas Gregoire
# Force JSON fix: Marcin 'Icewall' Noga
import json
from burp import IBurpExtender
from burp import IMessageEditorTabFactory
from burp import IMessageEditorTab
from burp import IParame... | ajibawa-2023/Python-Code-Large/train/row_80262 | 87 | 144 | 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_80262:Import_L7_C0", "label": "json import json", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0486, 0.0069, 0, 0.66, 0.0, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80262:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80262:FunctionDef_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80262:FunctionDef_L29_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80262:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_80263 | 218 | 605 | 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_80263:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80263:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80263:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80263:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80263:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_80264 | 133 | 305 | 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_80264:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80264:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80264:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80264:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80264:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_80266 | 8 | 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_80266:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80266:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80266:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80266:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80266:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | ajibawa-2023/Python-Code-Large/train/row_80267 | 9 | 40 | 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_80267:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80267:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80267:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80267:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80267:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | ajibawa-2023/Python-Code-Large/train/row_80268 | 10 | 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_80268:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 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_80268:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80268:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80268:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80268:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_80270 | 155 | 378 | 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_80270:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 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_80270:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80270:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80270:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80270:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# 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_80271 | 396 | 1,139 | 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_80271:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80271:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80271:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80271:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80271:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# 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_80272 | 46 | 106 | 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_80272:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80272:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80272:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80272:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80272:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_80273 | 63 | 124 | 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_80273:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80273:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80273:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80273:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80273:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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 ... | ajibawa-2023/Python-Code-Large/train/row_80275 | 86 | 244 | 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_80275:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80275:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80275:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80275:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80275:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2011 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_80276 | 33 | 105 | 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_80276:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80276:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80276:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80276:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80276:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80278 | 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_80278: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_80279 | 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_80279: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": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80279:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80279:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80279:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80279:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_80280 | 115 | 168 | 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_80280:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80280:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80280:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80280:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80280:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_80281 | 57 | 172 | 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_80281:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 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_80281:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80281:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80281:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80281:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# 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_80283 | 201 | 483 | 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_80283:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80283:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80283:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80283:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80283:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# 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 l... | ajibawa-2023/Python-Code-Large/train/row_80284 | 154 | 385 | 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_80284:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80284:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80284:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80284:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80284:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.