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 |
|---|---|---|---|---|---|---|---|
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | ajibawa-2023/Python-Code-Large/train/row_87165 | 230 | 434 | 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_87165:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0046, 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_87165:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87165:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87165:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87165:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | ajibawa-2023/Python-Code-Large/train/row_87166 | 41 | 316 | 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_87166:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1582, 0.3133, 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_87166:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87166:Expr_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87166:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87166:If_L164_C4"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/env python
# encoding: utf-8
# waf 1.6.10
VERSION='0.3.3'
import sys
APPNAME='p2t'
top = '.'
out = 'build'
CPP_SOURCES = ['poly2tri/common/shapes.cc',
'poly2tri/sweep/cdt.cc',
'poly2tri/sweep/advancing_front.cc',
'poly2tri/sweep/sweep_context.cc',
... | ajibawa-2023/Python-Code-Large/train/row_87169 | 25 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87169:Assign_L5_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.0222, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87169:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87169:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87169:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87169:If_L25_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_871... |
#!/usr/bin/env python
import codecs
import re
import jinja2
import markdown
def process_slides():
with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile:
md = codecs.open('slides.md', encoding='utf8').read()
md_slides = md.split('\n---\n')
print 'Compiled %s slides.' % len(m... | ajibawa-2023/Python-Code-Large/train/row_87170 | 41 | 57 | 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_87170:Import_L3_C0", "label": "codecs import codecs", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0175, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87170:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87170:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87170:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87170:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (c) 2009 John Schember
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distri... | ajibawa-2023/Python-Code-Large/train/row_87172 | 63 | 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_87172:ImportFrom_L22_C0", "label": "from PyQt4.Qt import QFrame, QWidget, QTextEdit\u2026", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.1746, 0.0079, 0, 0.66, 0.0, 570, 0, 5, 0, 0, 570, 0, 0], "semantic": {"name": "PyQt4.Qt", "arg_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87172:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87172:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87172:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87172:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Co... |
from robot import Robot
class TheRobot(Robot):
def respond(self):
self.ping()
self.ping_react()
def ping_react(self):
kind, angle, dist = self.sensors['PING']
if kind == 'w':
# Pinged a wall
if dist < 2:
self.force(-30)
... | ajibawa-2023/Python-Code-Large/train/row_87173 | 19 | 30 | 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_87173:ImportFrom_L1_C0", "label": "from robot import Robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87173:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87173:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87173:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87173:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from robot import Robot
class TheRobot(Robot):
def initialize(self):
self._spinning = False
def respond(self):
if self._spinning:
self.spin()
self.ping()
self.ping_react()
def spin(self, n=None):
# Spin for n ticks, then stop
if n is not None:
... | ajibawa-2023/Python-Code-Large/train/row_87174 | 33 | 51 | 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_87174:ImportFrom_L1_C0", "label": "from robot import Robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87174:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87174:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87174:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87174:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
import random
from robot import Robot
class TheRobot(Robot):
def initialize(self):
self._state = 'FORWARD'
self._fwdfor_ticks = None
self._rightfor_ticks = None
self._unstick_freq = 12
self._unstickfor_ticks = None
def respond(self):
self.controller()
def ... | ajibawa-2023/Python-Code-Large/train/row_87175 | 71 | 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_87175:Import_L1_C0", "label": "random import random", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0094, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87175:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87175:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87175:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87175:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
from robot import Robot
class TheRobot(Robot):
def initialize(self):
self.health = 100
self._turnto = 5
self._moveto_choices = [70, 70, -70, -70]
def respond(self):
tick = self.sensors['TICK']
if tick == 100:
self.start_logging()
elif tick == 200:
... | ajibawa-2023/Python-Code-Large/train/row_87176 | 44 | 72 | 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_87176:ImportFrom_L1_C0", "label": "from robot import Robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0139, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87176:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87176:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87176:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87176:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
from robot import Robot
class TheRobot(Robot):
def initialize(self):
# Try to get in to a corner
self.forseconds(5, self.force, 50)
self.forseconds(0.9, self.force, -10)
self.forseconds(0.7, self.torque, 100)
self.forseconds(6, self.force, 50)
# Then look around and... | ajibawa-2023/Python-Code-Large/train/row_87177 | 38 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87177:ImportFrom_L1_C0", "label": "from robot import Robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0149, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87177:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87177:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87177:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87177:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
# This example was used in verifying the problem outlined
# in issue #5 in the bug tracker.
from robot import Robot
class TheRobot(Robot):
def respond(self):
self.turret(0)
self.pingcheck()
def pingcheck(self):
g = self.sensors['GYRO']
if -2 <= g <= 2:
self.ping()
... | ajibawa-2023/Python-Code-Large/train/row_87178 | 15 | 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_87178:ImportFrom_L4_C0", "label": "from robot import Robot", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1905, 0.0476, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87178:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87178:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87178:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87178:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from robot import Robot
class TheRobot(Robot):
def initialize(self):
self.health = 100
self._movefor = 0
self._moveforce = 0
self._turnto = 0
def respond(self):
self.turnto()
self.scan_and_fire()
# Move away if damaged
health = self.sensors['HEA... | ajibawa-2023/Python-Code-Large/train/row_87179 | 33 | 52 | 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_87179:ImportFrom_L1_C0", "label": "from robot import Robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["Robot"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87179:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87179:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87179:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87179:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
import random
from math import pi
from robot import Robot
class TheRobot(Robot):
def initialize(self):
self.ctrlr = self.controller()
def respond(self):
try:
self.ctrlr.next()
except StopIteration:
self.finished()
def controller(self):
'Set up a ge... | ajibawa-2023/Python-Code-Large/train/row_87180 | 75 | 87 | 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_87180:Import_L1_C0", "label": "random import random", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87180:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87180:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87180:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87180:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
class Fake(object):
def __init__(self, a=None, b=None):
pass
def setpos(self, pos):
pass
def set_rotation(self, ang):
pass
def kill(self):
pass
def step(self, n=None):
pass
class Robot(Fake):
def set_turr_rot(self, ang):
pass
class Turret(Fa... | ajibawa-2023/Python-Code-Large/train/row_87182 | 30 | 62 | 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_87182:ClassDef_L1_C0", "label": "Fake", "type": "class", "loc": [1, 15], "level": 0, "parent": null, "vector": [3, 0, 0.129, 0.2419, 0, 0.66, 0.0, 120, 0, 5, 0, 0, 186, 0, 0], "semantic": {"name": "Fake", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87182:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87182:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87182:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87182:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | ajibawa-2023/Python-Code-Large/train/row_87183 | 116 | 157 | 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_87183:Import_L21_C0", "label": "os import os", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1338, 0.0064, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87183:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87183:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87183:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87183:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pybotwar ... | ajibawa-2023/Python-Code-Large/train/row_87185 | 121 | 207 | 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_87185:Import_L19_C0", "label": "time import time", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0918, 0.0048, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_cal... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87185:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87185:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87185:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87185:Import_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
import sqlite3
import os
import hashlib
import conf
import util
dbversion = 3
dbversion_reset = dbversion
def fullpath():
rdirs = util.get_robot_dirs()
if conf.dbfile.startswith('~'):
fname = os.path.expanduser(conf.dbfile)
elif not rdirs:
fname = conf.dbfile
else:
fdir = rd... | ajibawa-2023/Python-Code-Large/train/row_87186 | 157 | 359 | 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_87186:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87186:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87186:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87186:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87186:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pybotwar ... | ajibawa-2023/Python-Code-Large/train/row_87187 | 200 | 307 | 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_87187:Import_L19_C0", "label": "subprocess import subprocess", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0619, 0.0033, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87187:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87187:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87187:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87187:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
"""
highlightedtextedit.py
A PyQt custom widget example for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General ... | ajibawa-2023/Python-Code-Large/train/row_87188 | 104 | 201 | 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_87188:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0672, 0.1095, 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_87188:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87188:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87188:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87188:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
def select_view_module(name):
global selectedview
if name == 'pygame':
import pgview
selectedview = pgview
elif name == 'pyqt':
import qt4view
selectedview = qt4view
elif name == 'none':
import noview
selectedview = noview
def get_view_module():
glo... | ajibawa-2023/Python-Code-Large/train/row_87189 | 12 | 17 | 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_87189:FunctionDef_L1_C0", "label": "select_view_module", "type": "function", "loc": [1, 13], "level": 0, "parent": null, "vector": [2, 0, 0.4118, 0.7647, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "select_view_module", "arg_names": ["name"], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87189:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87189:If_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87189:If_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87189:Import_L4_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
import os
def makeconf():
'create an empty conf file'
conf_file = 'conf.py'
if os.path.exists(conf_file):
print 'conf.py already exists'
raise SystemExit
contents = '''\
# Change configuration settings here.
# See defaults.py for the default settings
from defaults import *
'''
... | ajibawa-2023/Python-Code-Large/train/row_87190 | 32 | 55 | 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_87190:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 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_87190:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87190:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87190:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87190:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Robot subprocess
subproc_python = '/usr/bin/python'
subproc_main = 'control.py'
init_timeout = 1.0
tick_timeout = 0.015
# Robot selection
robot_dirs = ['robots', 'robots/examples'] # In this order, in case of dup name
r1 = 'robot01'
r2 = 'robot02'
r3 = 'robot03'
r4 = 'robot04'
r5 = 'robot05'
r6 = 'robot06'
r7 = 'r... | ajibawa-2023/Python-Code-Large/train/row_87192 | 43 | 80 | 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_87192:Assign_L2_C0", "label": "subproc_python =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.025, 0.0125, 0, 0.66, 0.0, 207, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "subproc_python", "arg_names": [], "import_names": []... | [] |
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pybotwar ... | ajibawa-2023/Python-Code-Large/train/row_87193 | 109 | 228 | 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_87193:Import_L19_C0", "label": "os import os", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0044, 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_87193:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87193:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87193:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87193:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pybotwar ... | ajibawa-2023/Python-Code-Large/train/row_87195 | 506 | 715 | 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_87195:Import_L19_C0", "label": "os import os", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0266, 0.0014, 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_87195:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87195:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87195:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87195:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2009 Lee Harr
#
# This file is part of pybotwar.
#
# Pybotwar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pybotwar ... | ajibawa-2023/Python-Code-Large/train/row_87196 | 128 | 186 | 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_87196:Import_L19_C0", "label": "pygame import pygame", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1022, 0.0054, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87196:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87196:Try_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87196:Try_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87196:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env ptyhon
import sys
if '__main__' == __name__:
full = open('alexa.out', 'r')
lost = open('titlegot', 'r')
arr = [[],[]]
while True:
str = full.readline()
if not str:
break
str = str.strip('\n')
arr[0].append(str)
while True:
str = lo... | ajibawa-2023/Python-Code-Large/train/row_87197 | 34 | 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_87197:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 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_87197:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87197:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87197:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87197:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_871... |
#!/usr/bin/python
import re, sys, glob, os, os.path, errno, shutil, ftplib
CHECKSUM_RE = re.compile(r'checksum\s*=\s*([\w]+)')
PROP_RE = re.compile(r'(.*)=(.*)')
BASEDIR='memory_layouts'
def getProps(file):
creds = {}
path = os.path.expanduser(file)
f = open(path, 'r')
lines = f.readlines()
f... | ajibawa-2023/Python-Code-Large/train/row_87199 | 53 | 77 | 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_87199:Import_L2_C0", "label": "re import re, sys, glob\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.026, 0.013, 0, 0.66, 0.0, 540, 0, 8, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re", "sys"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87199:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87199:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87199:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87199:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
import re, sys, glob, os, os.path, errno, shutil, ftplib
PROP_RE = re.compile(r'(.*)=(.*)')
BASEDIR='apt'
def getProps(file):
creds = {}
path = os.path.expanduser(file)
f = open(path, 'r')
lines = f.readlines()
f.close()
for l in lines:
m = PROP_RE.match(l)
if m is not None:
cred... | ajibawa-2023/Python-Code-Large/train/row_87200 | 40 | 59 | 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_87200:Import_L2_C0", "label": "re import re, sys, glob\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0339, 0.0169, 0, 0.66, 0.0, 540, 0, 8, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re", "sy... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87200:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87200:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87200:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87200:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
import re, sys, shutil, os, os.path, subprocess, hashlib
from datetime import datetime
VERSIONS = { 'oneiric': '11.10', 'lucid': '10.04' }
DATE_FORMAT = '%a, %d %b %Y %H:%M:%S UTC'
def collectFiles(directory):
files = set()
for path, dirs, filenames in os.walk(directory):
for f in filenames:
... | ajibawa-2023/Python-Code-Large/train/row_87201 | 82 | 98 | 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_87201:Import_L2_C0", "label": "re import re, sys, shutil\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0102, 0, 0.66, 0.0, 540, 0, 7, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re", "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87201:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87201:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87201:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87201:For_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import logging
import urllib
from xml.etree import ElementTree as ET
from pprint import pformat
xml_to_dict_map = {
'CountryCode': 'country',
'RegionName': 'region_name',
'RegionCode': 'region_code',
'City': 'city'
}
def ip_info(ip):
"""
<?xml version="1.0" encoding="UTF-8"?>
<Respo... | ajibawa-2023/Python-Code-Large/train/row_87202 | 23 | 55 | 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_87202:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87202:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87202:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87202:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87202:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code... |
import datetime
from google.appengine.ext import db
class MetricEntry(db.Model):
ip = db.StringProperty()
city = db.StringProperty()
region_code = db.StringProperty()
region_name = db.StringProperty()
country = db.StringProperty()
dt_version_major = db.IntegerProperty()
dt_version... | ajibawa-2023/Python-Code-Large/train/row_87203 | 13 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87203:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87203:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87203:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87203:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87203:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext.webapp.util import run_wsgi_app
from versionhandler import VersionHandler
from metrichandler import MetricHandler
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers... | ajibawa-2023/Python-Code-Large/train/row_87204 | 15 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87204:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87204:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87204:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87204:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87204:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
import logging
import pprint
import re
from google.appengine.ext import webapp
from metricentry import MetricEntry
from utils import ip_info
CURRENT_VERSION = "0.6.12"
RX_VERSION_CHUNKER = re.compile(r"\s*DwarfTherapist\s+(\d+)\.(\d+)\.(\d+)\s*")
class VersionHandler(webapp.RequestHandler):
def get(self,... | ajibawa-2023/Python-Code-Large/train/row_87205 | 27 | 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_87205:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87205:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87205:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87205:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87205:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-... |
from google.appengine.ext import webapp
import pprint
import logging
class MetricHandler(webapp.RequestHandler):
def get(self, *args):
self.response.headers['Content-Type'] = 'text/html'
info = ip_info("96.253.131.222")
self.response.out.write("Metrics must be posted! %s<br/>%s" % (... | ajibawa-2023/Python-Code-Large/train/row_87206 | 12 | 17 | 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_87206:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87206:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87206:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87206:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87206:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_87207 | 51 | 98 | 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_87207:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87207:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87207:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87207:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87207:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from distutils.cmd import Command
import doctest
from glob import glob
import ... | ajibawa-2023/Python-Code-Large/train/row_87208 | 67 | 157 | 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_87208:ImportFrom_L10_C0", "label": "from distutils.cmd import Command", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0637, 0.0064, 0, 0.66, 0.0, 662, 0, 1, 0, 0, 662, 0, 0], "semantic": {"name": "distutils.cmd", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87208:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87208:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87208:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87208:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Mapping from raw JSON data structures to Python objects and vice versa.
>>> from couchdb import ... | ajibawa-2023/Python-Code-Large/train/row_87209 | 327 | 734 | 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_87209:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 59], "level": 0, "parent": null, "vector": [8, 0, 0.0463, 0.0695, 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_87209:ClassDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87209:Expr_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87209:ClassDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87209:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Python client API for CouchDB.
>>> server = Server()
>>> db = server.create('python-tests')
>>> ... | ajibawa-2023/Python-Code-Large/train/row_87210 | 481 | 1,239 | 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_87210:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0133, 0.0129, 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_87210:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87210:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87210:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87210:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Thin abstraction layer over the different available modules for decoding
and encoding JSON data.
This... | ajibawa-2023/Python-Code-Large/train/row_87211 | 55 | 146 | 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_87211:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1404, 0.1644, 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_87211:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87211:Expr_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87211:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87211:If_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Alexander Shorin
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
import unittest
from StringIO import StringIO
from couchdb import Unauthorized
from couchdb.tools imp... | ajibawa-2023/Python-Code-Large/train/row_87213 | 18 | 47 | 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_87213:Import_L11_C0", "label": "unittest import unittest", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.234, 0.0213, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittes... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87213:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87213:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87213:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87213:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from datetime import datetime
import doctest
import os
import os.path
import shutil
from StringIO im... | ajibawa-2023/Python-Code-Large/train/row_87215 | 533 | 809 | 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_87215:ImportFrom_L9_C0", "label": "from datetime import datetime", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0111, 0.0012, 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_87215:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87215:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87215:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87215:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import doctest
import socket
import time
import unittest
from StringIO import StringIO
from couchdb impo... | ajibawa-2023/Python-Code-Large/train/row_87216 | 59 | 91 | 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_87216:Import_L9_C0", "label": "doctest import doctest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0989, 0.011, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87216:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87216:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87216:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87216:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import unittest
from couchdb.http import ResourceConflict, ResourceNotFound
f... | ajibawa-2023/Python-Code-Large/train/row_87217 | 151 | 249 | 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_87217:Import_L10_C0", "label": "unittest import unittest", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0402, 0.004, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittes... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87217:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87217:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87217:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87217:For_L19_C8"}, {"f": "ajibawa-2023/Python-Cod... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | ajibawa-2023/Python-Code-Large/train/row_87218 | 27 | 46 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87218:Import_L9_C0", "label": "random import random", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1957, 0.0217, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87218:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87218:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87218:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87218:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import doctest
import unittest
from couchdb import design
from couchdb.tests import testutil
class Des... | ajibawa-2023/Python-Code-Large/train/row_87219 | 37 | 60 | 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_87219:Import_L9_C0", "label": "doctest import doctest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.0167, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87219:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87219:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87219:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87219:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import doctest
from StringIO import StringIO
import unittest
from couchdb import multipart
class ... | ajibawa-2023/Python-Code-Large/train/row_87220 | 82 | 222 | 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_87220:Import_L9_C0", "label": "doctest import doctest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0405, 0.0045, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87220:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87220:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87220:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87220:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import doctest
from StringIO import StringIO
import unittest
from couchdb import view
class ViewS... | ajibawa-2023/Python-Code-Large/train/row_87221 | 64 | 114 | 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_87221:Import_L9_C0", "label": "doctest import doctest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0789, 0.0088, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87221:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87221:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87221:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87221:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import unittest
from couchdb.tests import client, couch_tests, design, http, multipart, \
... | ajibawa-2023/Python-Code-Large/train/row_87222 | 16 | 30 | 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_87222:Import_L9_C0", "label": "unittest import unittest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.3, 0.0333, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87222:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87222:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87222:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87222:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
import unittest
import couchdb
class PackageTestCase(unittest.TestCase):
def test_exports(self):
expected = set([
# couchdb.client
'Server', 'Database', 'Document',
# couchdb.http
'HTTPError', 'PreconditionFailed', 'ResourceNotFound'... | ajibawa-2023/Python-Code-Large/train/row_87223 | 13 | 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_87223:Import_L3_C0", "label": "unittest import unittest", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87223:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87223:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87223:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87223:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Maximillian Dornseif <md@hudora.de>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""
This script replicates databases from one CouchDB server to an other.
This is mainly f... | ajibawa-2023/Python-Code-Large/train/row_87224 | 67 | 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_87224:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 18], "level": 0, "parent": null, "vector": [8, 0, 0.1089, 0.0806, 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_87224:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87224:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87224:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87224:If_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Utility for dumping a snapshot of a CouchDB database to a multipart MIME
fi... | ajibawa-2023/Python-Code-Large/train/row_87225 | 43 | 85 | 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_87225:Expr_L10_C0", "label": "expression", "type": "expression", "loc": [10, 12], "level": 0, "parent": null, "vector": [8, 0, 0.1294, 0.0353, 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_87225:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87225:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87225:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87225:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
| ajibawa-2023/Python-Code-Large/train/row_87227 | 0 | 7 | 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"] | [] | [] |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Utility code for managing design documents."""
from copy import deepcopy
from inspect import get... | ajibawa-2023/Python-Code-Large/train/row_87228 | 82 | 214 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87228:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0421, 0.0047, 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_87228:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87228:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87228:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87228:FunctionDef_L73_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Support for streamed reading and writing of multipart MIME content."""
from base64 import b64enc... | ajibawa-2023/Python-Code-Large/train/row_87229 | 127 | 256 | 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_87229:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0352, 0.0039, 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_87229:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87229:ImportFrom_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87229:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87229:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from couchdb.client import Database, Document, Server
from couchdb.http import HTTPError, PreconditionFai... | ajibawa-2023/Python-Code-Large/train/row_87231 | 5 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87231:ImportFrom_L9_C0", "label": "from couchdb.client import Database, Document, Server", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.5625, 0.0625, 0, 0.66, 0.0, 464, 0, 3, 0, 0, 464, 0, 0], "semantic": {"name": "couchdb.client", "ar... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87231:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87231:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87231:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87231:Assign_L16_C4"}] |
# -*- coding: utf-8 -*-
import Globals
# 히스토리 리스트에 넣을때:
# cmd = {커맨드타입:redo/undo 함수에 인자로 건네어질 data}
# self.AddCmd(cmd)
#
# ex)
# cmd = {CMD_INSERT:{"pos" : pos, "word" : word}}
# self.AddCmd(cmd)
#
# 커맨드는 CMD_INSERT, CMD_DELETE, CMD_REPLACE 만 있으면 되지 않을까
# 생각해보면 CMD_REPLACE로 다 되지 않을까?
# CMD_INSE... | ajibawa-2023/Python-Code-Large/train/row_87233 | 68 | 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_87233:Import_L2_C0", "label": "Globals import Globals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0148, 0.0074, 0, 0.66, 0.0, 512, 0, 1, 0, 0, 512, 0, 0], "semantic": {"name": "Globals", "arg_names": [], "import_names": ["Globals"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87233:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87233:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87233:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87233:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: utf-8 -*-
import os
import wx
import Globals
import History
appName = "메모장"
class NotepadFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(600, 400))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_NOHIDES... | ajibawa-2023/Python-Code-Large/train/row_87234 | 284 | 470 | 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_87234:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0021, 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_87234:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87234:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87234:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87234:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Cod... |
'''
Created on 2011. 8. 28.
@author: bleuiz
'''
import os
#path = os.path.join("e:\\", "2.txt")
num = 100
path = "%d.txt" % num
f = open(path, 'w')
for i in range(1,num):
f.write("line : %d created.\n" % i)
f.close() | ajibawa-2023/Python-Code-Large/train/row_87235 | 8 | 14 | 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_87235:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.3571, 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_87235:For_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87235:Expr_L13_C4"}] |
# -*- coding: utf-8 -*-
mainFrame = None
textControl = None | ajibawa-2023/Python-Code-Large/train/row_87236 | 2 | 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_87236:Assign_L3_C0", "label": "mainFrame =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 562, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "mainFrame", "arg_names": [], "import_names": [], "rhs_call_n... | [] |
from googlevoice import Voice, util
from os import path, remove
from unittest import TestCase, main
class VoiceTest(TestCase):
voice = Voice()
voice.login()
outgoing = util.input('Outgoing number (blank to ignore call tests): ')
forwarding = None
if outgoing:
forwarding = util.input('Forwar... | ajibawa-2023/Python-Code-Large/train/row_87237 | 45 | 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_87237:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 348, 0, 2, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87237:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87237:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87237:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87237:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
DEFAULT_CONFIG = """
[auth]
# Google Account email address (one associated w/ your Voice account)
email=
# Raw password used or login
password=
[gvoice]
# Number to place calls from (eg, your google voice number)
forwardingNumber=
# Default phoneType for your forwardingNumber as defined below
# 1 - Home
# 2 - Mobi... | ajibawa-2023/Python-Code-Large/train/row_87238 | 31 | 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_87238:Assign_L1_C0", "label": "DEFAULT_CONFIG =", "type": "assigned_variable", "loc": [1, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1887, 0.3585, 0, 0.66, 0.0, 769, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DEFAULT_CONFIG", "arg_names": [], "import_names": ... | [] |
import re
from sys import stdout
from xml.parsers.expat import ParserCreate
from time import gmtime
from datetime import datetime
from pprint import pprint
try:
from urllib.request import build_opener, install_opener, HTTPCookieProcessor, Request, urlopen
from urllib.parse import urlencode, quote
except ImportE... | ajibawa-2023/Python-Code-Large/train/row_87239 | 144 | 313 | 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_87239:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 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_87239:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87239:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87239:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87239:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
from ConfigParser import ConfigParser, NoOptionError
import os
from . import settings
class Config(ConfigParser):
"""
``ConfigParser`` subclass that looks into your home folder for a file named
``.gvoice`` and parses configuration data from it.
"""
def __init__(self):
self.fname = os.path.... | ajibawa-2023/Python-Code-Large/train/row_87240 | 37 | 55 | 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_87240:ImportFrom_L1_C0", "label": "from ConfigParser import ConfigParser, NoOptionError", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 272, 0, 2, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87240:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87240:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87240:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87240:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from .conf import config
from .util import *
from . import settings
import os
if settings.DEBUG:
import logging
logging.basicConfig()
log = logging.getLogger('PyGoogleVoice')
log.setLevel(logging.DEBUG)
else:
log = None
class Voice(object):
"""
Main voice instance for interacting with the ... | ajibawa-2023/Python-Code-Large/train/row_87241 | 140 | 251 | 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_87241:ImportFrom_L1_C0", "label": "from conf import config", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.004, 0.004, 0, 0.66, 0.0, 433, 0, 1, 0, 0, 433, 0, 0], "semantic": {"name": "conf", "arg_names": [], "import_names": ["config"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87241:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87241:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87241:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87241:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87241... |
"""
This project aims to bring the power of the Google Voice API to the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | ajibawa-2023/Python-Code-Large/train/row_87242 | 9 | 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_87242:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2778, 0.5, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [] |
from distutils.core import setup
README = """Python Google Voice
====================
Joe McCall & Justin Quick
Exposing the Google Voice "API" to the Python language
-------------------------------------------------------
Google Voice for Python Allows you to place calls, send sms, download voicemail, and check t... | ajibawa-2023/Python-Code-Large/train/row_87243 | 3 | 29 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87243:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import... | [] |
from googlevoice import Voice
from googlevoice.util import input
voice = Voice()
voice.login()
outgoingNumber = input('Number to call: ')
forwardingNumber = input('Number to call from [optional]: ') or None
voice.call(outgoingNumber, forwardingNumber)
if input('Calling now... cancel?[y/N] ').lower() == 'y':
voi... | ajibawa-2023/Python-Code-Large/train/row_87244 | 9 | 13 | 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_87244:ImportFrom_L1_C0", "label": "from googlevoice import Voice", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87244:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87244:Expr_L13_C4"}] |
from googlevoice import Voice,util,settings
voice = Voice()
voice.login()
for feed in settings.FEEDS:
util.print_(feed.title())
for message in getattr(voice, feed)().messages:
util.print_('\t', message) | ajibawa-2023/Python-Code-Large/train/row_87245 | 7 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87245:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util, settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 348, 0, 3, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87245:For_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87245:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87245:For_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87245:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87245:... |
from googlevoice import Voice,util
voice = Voice()
voice.login()
for message in voice.voicemail().messages:
util.print_(message) | ajibawa-2023/Python-Code-Large/train/row_87246 | 5 | 7 | 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_87246:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 348, 0, 2, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87246:For_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87246:Expr_L7_C4"}] |
from googlevoice import Voice
from googlevoice.util import input
voice = Voice()
voice.login()
phoneNumber = input('Number to send message to: ')
text = input('Message text: ')
voice.send_sms(phoneNumber, text) | ajibawa-2023/Python-Code-Large/train/row_87247 | 7 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87247:ImportFrom_L1_C0", "label": "from googlevoice import Voice", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names": ["V... | [] |
from googlevoice import Voice,util
voice = Voice()
voice.login()
util.pprint(voice.settings) | ajibawa-2023/Python-Code-Large/train/row_87248 | 4 | 7 | 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_87248:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 348, 0, 2, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import... | [] |
from googlevoice import Voice
download_dir = '.'
voice = Voice()
voice.login()
for message in voice.voicemail().messages:
message.download(download_dir) | ajibawa-2023/Python-Code-Large/train/row_87249 | 6 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87249:ImportFrom_L1_C0", "label": "from googlevoice import Voice", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87249:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87249:Expr_L9_C4"}] |
from googlevoice import Voice
voice = Voice()
voice.login()
for message in voice.sms().messages:
if message.isRead:
message.delete() | ajibawa-2023/Python-Code-Large/train/row_87250 | 6 | 8 | 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_87250:ImportFrom_L1_C0", "label": "from googlevoice import Voice", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87250:For_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87250:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87250:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87250:Expr_L8_C8"}] |
from googlevoice import Voice,util
voice = Voice()
voice.login()
folder = voice.search(util.input('Search query: '))
util.print_('Found %s messages: ', len(folder))
util.pprint(folder.messages) | ajibawa-2023/Python-Code-Large/train/row_87251 | 6 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_87251:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 348, 0, 2, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names... | [] |
#
#SMS test via Google Voice
#
#John Nagle
# nagle@animats.com
#
from googlevoice import Voice
import sys
import BeautifulSoup
def extractsms(htmlsms) :
"""
extractsms -- extract SMS messages from BeautifulSoup tree of Google Voice SMS HTML.
Output is a list of dictionaries, one per me... | ajibawa-2023/Python-Code-Large/train/row_87252 | 23 | 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_87252:ImportFrom_L7_C0", "label": "from googlevoice import Voice", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.175, 0.025, 0, 0.66, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87252:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87252:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87252:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87252:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code... |
from googlevoice import Voice,util
voice = Voice()
voice.login()
util.pprint(voice.phones) | ajibawa-2023/Python-Code-Large/train/row_87253 | 4 | 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_87253:ImportFrom_L1_C0", "label": "from googlevoice import Voice, util", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 348, 0, 2, 0, 0, 348, 0, 0], "semantic": {"name": "googlevoice", "arg_names": [], "import... | [] |
#!/usr/bin/env python
import glob
import imp
import logging
import os
import sys
import unittest
from trace import fullmodname
logging.basicConfig(level=logging.CRITICAL)
APP_ENGINE_PATH='../google_appengine'
# Conditional import of cleanup function
try:
from tests.utils import cleanup
except:
def cleanup():
... | ajibawa-2023/Python-Code-Large/train/row_87258 | 23 | 37 | 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_87258:Import_L2_C0", "label": "glob import glob", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_87258:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87258:ImportFrom_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87258:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87258:FunctionDef_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
#
# Copyright 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 o... | ajibawa-2023/Python-Code-Large/train/row_87259 | 116 | 348 | 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_87259:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 22], "level": 0, "parent": null, "vector": [8, 0, 0.056, 0.0172, 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_87259:FunctionDef_L134_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87259:Expr_L135_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87259:FunctionDef_L134_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87259:Return_L148_C2"}, {"f": "ajibawa-2023/Python-... |
# 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_87260 | 18 | 71 | 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_87260:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.2394, 0.0704, 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_87260:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87260:Import_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87260:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87260:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_87261 | 83 | 229 | 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_87261:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 30], "level": 0, "parent": null, "vector": [8, 0, 0.1048, 0.0568, 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_87261:For_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87261:If_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87261:If_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_87261:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87... |
# 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_87263 | 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_87263: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_87263:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87263:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87263:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87263: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_87264 | 405 | 1,178 | 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_87264:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.014, 0.0034, 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_87264:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87264:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87264:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87264: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_87265 | 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_87265: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_87265:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87265:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87265:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87265: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_87266 | 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_87266: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_87266:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87266:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87266:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87266: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_87268 | 87 | 246 | 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_87268:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0732, 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_87268:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87268:Expr_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87268:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87268:FunctionDef_L41_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_87269 | 44 | 150 | 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_87269:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1133, 0.0333, 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_87269:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87269:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87269:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87269:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_87271 | 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_87271: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_87272 | 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_87272: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_87272:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87272:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87272:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87272:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_87274 | 36 | 74 | 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_87274:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 28], "level": 0, "parent": null, "vector": [8, 0, 0.3108, 0.1486, 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_87274:If_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87274:Expr_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87274:For_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87274:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# 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_87275 | 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_87275: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_87275:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87275:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87275:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87275:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/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_87277 | 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_87277: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_87277:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87277:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87277:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87277:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/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_87279 | 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_87279: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_87279:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87279:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87279:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87279:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_87280 | 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_87280: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_87281 | 118 | 307 | 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_87281:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1189, 0.1433, 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_87281:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87281:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87281:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87281:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# 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_87282 | 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_87282: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_87282:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87282:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87282:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_87282:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
# 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_87284 | 18 | 65 | 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_87284:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.2615, 0.0769, 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_87284:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87284:Import_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87284:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87284:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 b... | ajibawa-2023/Python-Code-Large/train/row_87290 | 41 | 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_87290:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2151, 0.0753, 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_87290:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87290:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87290:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87290:Assign_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 b... | ajibawa-2023/Python-Code-Large/train/row_87292 | 20 | 55 | 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_87292:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 20], "level": 0, "parent": null, "vector": [8, 0, 0.3364, 0.0727, 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_87292:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87292:Expr_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87292:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87292:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 b... | ajibawa-2023/Python-Code-Large/train/row_87293 | 35 | 79 | 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_87293:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 22], "level": 0, "parent": null, "vector": [8, 0, 0.2468, 0.0759, 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_87293:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87293:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87293:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87293:Assign_L43_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 b... | ajibawa-2023/Python-Code-Large/train/row_87294 | 25 | 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_87294:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 22], "level": 0, "parent": null, "vector": [8, 0, 0.2826, 0.087, 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_87294:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87294:Expr_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87294:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87294:Assign_L41_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.