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 |
|---|---|---|---|---|---|---|---|
import os
from Tkinter import *
from Tkconstants import W, E
import Tkinter as tk
from tkMessageBox import askyesnocancel
from multiprocessing import freeze_support
from globalconst import *
from aboutbox import AboutBox
from setupboard import SetupBoard
from gamemanager import GameManager
from centeredwindow... | ajibawa-2023/Python-Code-Large/train/row_373 | 134 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_373:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0053, 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_373:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_373:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_373:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_373:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from globalconst import BLACK, WHITE, MAN, KING
from goalevaluator import GoalEvaluator
from onekingattack import Goal_OneKingAttack
class OneKingAttackOneKingEvaluator(GoalEvaluator):
def __init__(self, bias):
GoalEvaluator.__init__(self, bias)
def calculateDesirability(self, board):
... | ajibawa-2023/Python-Code-Large/train/row_374 | 49 | 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_374:ImportFrom_L1_C0", "label": "from globalconst import BLACK, WHITE, MAN\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 871, 0, 4, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_374:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_374:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_374:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_374:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
from Tkinter import *
class CenteredWindow:
def __init__(self, root):
self.root = root
self.root.after_idle(self.center_on_screen)
self.root.update()
def center_on_screen(self):
self.root.update_idletasks()
sw = self.root.winfo_screenwidth()
sh = self... | ajibawa-2023/Python-Code-Large/train/row_375 | 14 | 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_375:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_375:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_375:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_375:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_375:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import sys
from goal import Goal
from composite import CompositeGoal
class Goal_OneKingFlee(CompositeGoal):
def __init__(self, owner):
CompositeGoal.__init__(self, owner)
def activate(self):
self.status = self.ACTIVE
self.removeAllSubgoals()
# because goals are *push... | ajibawa-2023/Python-Code-Large/train/row_376 | 72 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_376:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0095, 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_376:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_376:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_376:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_376:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
class Move(object):
def __init__(self, squares, annotation=''):
self.affected_squares = squares
self.annotation = annotation
def __repr__(self):
return str(self.affected_squares)
| ajibawa-2023/Python-Code-Large/train/row_380 | 6 | 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_380:ClassDef_L1_C0", "label": "Move", "type": "class", "loc": [1, 7], "level": 0, "parent": null, "vector": [3, 0, 0.5714, 1.0, 0, 0.66, 0.0, 512, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_380:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_380:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_380:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_380:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from Tkinter import *
from tkSimpleDialog import Dialog
from globalconst import *
class AboutBox(Dialog):
def body(self, master):
self.canvas = Canvas(self, width=300, height=275)
self.canvas.pack(side=TOP, fill=BOTH, expand=0)
self.canvas.create_text(152,47,text='Raven', fill='blac... | ajibawa-2023/Python-Code-Large/train/row_382 | 28 | 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_382:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_382:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_382:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_382:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_382:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from Tkinter import Widget
from controller import Controller
from globalconst import *
class PlayerController(Controller):
def __init__(self, **props):
self._model = props['model']
self._view = props['view']
self._before_turn_event = None
self._end_turn_event = props['end_t... | ajibawa-2023/Python-Code-Large/train/row_384 | 81 | 109 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_384:ImportFrom_L1_C0", "label": "from Tkinter import Widget", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["Widg... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_384:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_384:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_384:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_384:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from abc import ABCMeta, abstractmethod
class GoalEvaluator(object):
__metaclass__ = ABCMeta
def __init__(self, bias):
self.bias = bias
@abstractmethod
def calculateDesirability(self, board):
pass
@abstractmethod
def setGoal(self, board):
pass
... | ajibawa-2023/Python-Code-Large/train/row_385 | 7 | 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_385:ImportFrom_L1_C0", "label": "from abc import ABCMeta, abstractmethod", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 38, 0, 2, 0, 0, 38, 0, 0], "semantic": {"name": "abc", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_385:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_385:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_385:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_385:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
from Tkinter import *
from time import time, localtime, strftime
class ToolTip( Toplevel ):
"""
Provides a ToolTip widget for Tkinter.
To apply a ToolTip to any Tkinter widget, simply pass the widget to the
ToolTip constructor
"""
def __init__( self, wdgt, msg=None, msgFunc=None, delay=1, foll... | ajibawa-2023/Python-Code-Large/train/row_386 | 79 | 152 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_386:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0066, 0.0066, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_386:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_386:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_386:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_386:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
class Command(object):
def __init__(self, **props):
self.add = props.get('add') or []
self.remove = props.get('remove') or []
| ajibawa-2023/Python-Code-Large/train/row_387 | 4 | 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_387:ClassDef_L1_C0", "label": "Command", "type": "class", "loc": [1, 4], "level": 0, "parent": null, "vector": [3, 0, 0.625, 1.0, 0, 0.66, 0.0, 73, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "Command", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_387:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_387:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_387:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_387:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from globalconst import BLACK, WHITE, KING
import checkers
class Operator(object):
pass
class OneKingAttackOneKing(Operator):
def precondition(self, board):
plr_color = board.to_move
opp_color = board.enemy
return (board.count(plr_color) == 1 and board.count(opp_color) == 1 a... | ajibawa-2023/Python-Code-Large/train/row_388 | 58 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_388:ImportFrom_L1_C0", "label": "from globalconst import BLACK, WHITE, KING", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0111, 0.0111, 0, 0.66, 0.0, 871, 0, 3, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "i... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_388:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_388:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_388:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_388:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
class Controller(object):
def stop_process(self):
pass
| ajibawa-2023/Python-Code-Large/train/row_389 | 2 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_389:ClassDef_L2_C0", "label": "Controller", "type": "class", "loc": [2, 4], "level": 0, "parent": null, "vector": [3, 0, 0.6, 0.6, 0, 0.66, 0.0, 93, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "Controller", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_389:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_389:FunctionDef_L3_C4"}] |
from abc import ABCMeta, abstractmethod
class Goal:
__metaclass__ = ABCMeta
INACTIVE = 0
ACTIVE = 1
COMPLETED = 2
FAILED = 3
def __init__(self, owner):
self.owner = owner
self.status = self.INACTIVE
@abstractmethod
def activate(self):
pass
... | ajibawa-2023/Python-Code-Large/train/row_390 | 22 | 39 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_390:ImportFrom_L1_C0", "label": "from abc import ABCMeta, abstractmethod", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 38, 0, 2, 0, 0, 38, 0, 0], "semantic": {"name": "abc", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_390:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_390:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_390:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_390:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
from Tkinter import *
from ttk import Checkbutton
from tkSimpleDialog import Dialog
from globalconst import *
class SetupBoard(Dialog):
def __init__(self, parent, title, gameManager):
self._master = parent
self._manager = gameManager
self._load_entry_box_vars()
self.result... | ajibawa-2023/Python-Code-Large/train/row_391 | 168 | 216 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_391:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_391:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_391:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_391:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_391:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from Tkinter import *
class HyperlinkManager(object):
def __init__(self, textWidget, linkFunc):
self.txt = textWidget
self.linkfunc = linkFunc
self.txt.tag_config('hyper', foreground='blue', underline=1)
self.txt.tag_bind('hyper', '<Enter>', self._enter)
self.txt.tag... | ajibawa-2023/Python-Code-Large/train/row_392 | 25 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_392:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_392:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_392:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_392:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_392:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
class DocNode(object):
"""
A node in the document.
"""
def __init__(self, kind='', parent=None, content=None):
self.children = []
self.parent = parent
self.kind = kind
self.content = content
if self.parent is not None:
self.parent.children.append(self... | ajibawa-2023/Python-Code-Large/train/row_393 | 9 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_393:ClassDef_L1_C0", "label": "DocNode", "type": "class", "loc": [1, 12], "level": 0, "parent": null, "vector": [3, 0, 0.5417, 1.0, 0, 0.66, 0.0, 61, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_393:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_393:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_393:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_393:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_394 | 28 | 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_394:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_394:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_394:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_394:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_394:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_395 | 48 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_395:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_395:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_395:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_395:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_395:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_397 | 28 | 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_397:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_397:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_397:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_397:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_397:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_398 | 41 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_398:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_398:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_398:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_398:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_398:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_399 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_399:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_399:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_399:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_399:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_399:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_401 | 43 | 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_401:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 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_401:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_401:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_401:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_401:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_404 | 48 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_404:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_404:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_404:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_404:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_404:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_407 | 41 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_407:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_407:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_407:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_407:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_407:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_409 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_409:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_409:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_409:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_409:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_409:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_410 | 43 | 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_410:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 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_410:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_410:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_410:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_410:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_412 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_412:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": ... | [] |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_413 | 3 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_413:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "a... | [] |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_414 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_414:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": ... | [] |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_415 | 3 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_415:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "a... | [] |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | ajibawa-2023/Python-Code-Large/train/row_416 | 80 | 160 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_416:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0719, 0.1375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_416:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_416:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_416:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_416:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/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_417 | 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_417: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_417:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_417:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_417:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_417:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'build_angle.gypi',
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shif... | ajibawa-2023/Python-Code-Large/train/row_418 | 1 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_418:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 9], "level": 0, "parent": null, "vector": [8, 0, 0.4667, 0.3333, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [] |
# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'angle_code': 1,
},
'target_defaults': {
'defines': [
'ANGLE_DISABLE_TRACE',
'ANGLE_COMPILE_OPTIMIZATION_... | ajibawa-2023/Python-Code-Large/train/row_419 | 1 | 420 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_419:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 411], "level": 0, "parent": null, "vector": [8, 0, 0.4952, 0.969, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This script generates a function that converts 16-bit precision floating
# point numbers to 32-bit.
# It is based on ftp://ftp.fox-toolkit.org/p... | ajibawa-2023/Python-Code-Large/train/row_420 | 26 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_420:FunctionDef_L1_C0", "label": "convertMantissa", "type": "function", "loc": [1, 14], "level": 0, "parent": null, "vector": [2, 0, 0.2143, 0.4, 0, 0.66, 0.0, 107, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "convertMantissa", "arg_names": ["i"], "import_names": [], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_420:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_420:If_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_420:If_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_420:Return_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_420:If... |
deps = {
"trunk/third_party/gyp":
"http://gyp.googlecode.com/svn/trunk@1564",
"trunk/third_party/googletest":
"http://googletest.googlecode.com/svn/trunk@573", #release 1.6.0
"trunk/third_party/googlemock":
"http://googlemock.googlecode.com/svn/trunk@387", #release 1.6.0
}
hooks = [
{
#... | ajibawa-2023/Python-Code-Large/train/row_421 | 2 | 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_421:Assign_L1_C0", "label": "deps =", "type": "assigned_variable", "loc": [1, 10], "level": 0, "parent": null, "vector": [14, 0, 0.3056, 0.5556, 0, 0.66, 0.0, 565, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "deps", "arg_names": [], "import_names": [], "rhs_call_name": "... | [] |
# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'essl_to_glsl',
'type': 'executable',
'dependencies': [
'../src/build_angle.gyp:tran... | ajibawa-2023/Python-Code-Large/train/row_422 | 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_422:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 172], "level": 0, "parent": null, "vector": [8, 0, 0.4972, 0.9438, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'gtest',
'type': 'static_library',
'include_dirs': [
'../third_party/googletest',
... | ajibawa-2023/Python-Code-Large/train/row_423 | 1 | 93 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_423:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 87], "level": 0, "parent": null, "vector": [8, 0, 0.4946, 0.8925, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | ajibawa-2023/Python-Code-Large/train/row_424 | 38 | 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_424:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 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_424:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_424:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_424:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_424:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
from os import mkdir, makedirs, environ, chdir, getcwd, system, listdir
from os.path import join
from shutil import copy, copytree, move, rmtree
# Usage
def Usage():
return 'Usage: createversion.py <version>'
# Run Xcode
def RunXcode(project, target):
system('/usr/bin/xcodebuild -projec... | ajibawa-2023/Python-Code-Large/train/row_425 | 52 | 84 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_425:ImportFrom_L3_C0", "label": "from os import mkdir, makedirs, environ\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0119, 0, 0.66, 0.0, 688, 0, 7, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_425:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_425:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_425:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_425:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
dataTypes = ["CPUndefinedDataType", "CPIntegerDataType", "CPUnsignedIntegerDataType", "CPFloatingPointDataType", "CPComplexFloatingPointDataType", "CPDecimalDataType"]
types = { "CPUndefinedDataType" : [],
"CPIntegerDataType" : ["int8_t", "int16_t", "int32_t", "int64_t"],
"CPUnsignedIntegerDataType" : ... | ajibawa-2023/Python-Code-Large/train/row_426 | 90 | 148 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_426:Assign_L1_C0", "label": "dataTypes =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0068, 0.0068, 0, 0.66, 0.0, 302, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "dataTypes", "arg_names": [], "import_names": [], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_426:For_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_426:Expr_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_426:For_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_426:If_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_426:If_L60_... |
#!/usr/bin/env python
"create rootfs"
import sys
import os
import getopt
support_fs_tbl = ["yaffs", "cramfs", "ramfs"]
#line swith char
linesep = os.linesep
#option table
#if option has param,must follow char':' or '=' when long opt
opt_short_tbl = 'hf:v'
opt_long_tbl = ["help", "fstype="]
#usage string for tips... | ajibawa-2023/Python-Code-Large/train/row_427 | 56 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_427:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0286, 0.0095, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_427:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_427:If_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_427:If_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_427:Return_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_42... |
#!/usr/bin/env python
"create rootfs"
import sys
import os
import getopt
import time
#line swith char
linesep = os.linesep
#rootfs class, base is object
class CRootFs(object):
"""
rootfs base class
"""
def __init__(self, name, fstype):
global linesep
#time stamp
self.stamp =... | ajibawa-2023/Python-Code-Large/train/row_428 | 82 | 163 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_428:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0184, 0.0061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_428:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_428:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_428:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_428:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
i = 1 + 2 * 4
print i,
print 'test raw input'
i = raw_input('pls input:\n')
print int(i)
print 'test while'
count = 0
while count <= 10:
print count
count += 1
print 'test for'
for i in range(11):
print i
print 'test if elif else'
i = int(raw_input('input num\n')... | ajibawa-2023/Python-Code-Large/train/row_429 | 55 | 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_429:Assign_L2_C0", "label": "i =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.027, 0.0135, 0, 0.66, 0.0, 826, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_429:While_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_429:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_429:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_429:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_429:If_... |
#!/usr/bin/env python
"""
Network Monitoring System Server Mock
"""
import json, socket
hash_number = 1;
def register(params):
answer = { 'command':'register' }
global hash_number
services=''
client_hash = params['hash']
client_port = params['port']
client_service_list = params['service_list']
if client_has... | ajibawa-2023/Python-Code-Large/train/row_430 | 41 | 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_430:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0692, 0.0615, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_430:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_430:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_430:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_430:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
"""
Network Monitoring System Server Mock
"""
import json, socket
hash_number = 1;
def register(params):
answer = { 'command':'register' }
global hash_number
services=''
client_hash = params['hash']
client_port = params['port']
client_service_list = params['service_list']
if client_has... | ajibawa-2023/Python-Code-Large/train/row_431 | 41 | 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_431:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0692, 0.0615, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_431:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_431:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_431:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_431:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
"""
NetSpy Client
by Marcin Ciechowicz for ZPR
v0.01
"""
import socket
import json
from subprocess import call
import logging
import argparse
import os.path
appName = 'NetSpyClient'
scriptDir = 'scripts'
logger = logging.getLogger(appName)
def initLogger():
formatter = logging.Formatter('%... | ajibawa-2023/Python-Code-Large/train/row_432 | 182 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_432:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0205, 0.0205, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_432:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_432:Assign_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_432:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_432:Assign_L23_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
"""
NetSpy Client
by Marcin Ciechowicz for ZPR
v0.01
"""
import socket
import json
from subprocess import call
import logging
import argparse
import os.path
appName = 'NetSpyClient'
scriptDir = 'scripts'
logger = logging.getLogger(appName)
def initLogger():
formatter = logging.Formatter('%... | ajibawa-2023/Python-Code-Large/train/row_433 | 182 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_433:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0205, 0.0205, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_433:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_433:Assign_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_433:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_433:Assign_L23_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#-------- DEFAULT ---------------------------
flags = ['-O2','-Wall','-pedantic']
lib_boost = ['boost_system', 'boost_thread','boost_random','boost_program_options']
lib_cppcms = ['cppcms','cppdb']
libs = lib_boost + lib_cppcms
env = Environment(CPPFLAGS=flags, LIBS=libs)
netspy = 'netspy-server'
dbtest = 'dbtest'... | ajibawa-2023/Python-Code-Large/train/row_434 | 13 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_434:Assign_L3_C0", "label": "flags =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.06, 0.02, 0, 0.66, 0.0, 375, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "flags", "arg_names": [], "import_names": [], "rhs_call_name": "", ... | [] |
#!/usr/bin/env python
import gluon
from gluon.fileutils import untar
import os
import sys
def main():
path = gluon.__path__
out_path = os.getcwd()
try:
if sys.argv[1] and os.path.exists(sys.argv[1]):# To untar the web2py env to the selected path
out_path = sys.argv[1]
else:
... | ajibawa-2023/Python-Code-Large/train/row_435 | 19 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_435:Import_L2_C0", "label": "gluon import gluon", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.037, 0, 0.66, 0.0, 826, 0, 1, 0, 0, 826, 0, 0], "semantic": {"name": "gluon", "arg_names": [], "import_names": ["gluon"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_435:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_435:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_435:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_435:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This is a WSGI handler for Apache
Requires apache+mod_wsgi.
In httpd.conf put something like:
LoadMo... | ajibawa-2023/Python-Code-Large/train/row_436 | 16 | 44 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_436:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 18], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.3409, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_436:If_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_436:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_436:If_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_436:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_436:If_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This is a handler for lighttpd+fastcgi
This file has to be in the PYTHONPATH
Put something like this in the... | ajibawa-2023/Python-Code-Large/train/row_437 | 17 | 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_437:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2925, 0.4528, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_437:If_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_437:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_437:If_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_437:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_437:If_... |
def webapp_add_wsgi_middleware(app):
from google.appengine.ext.appstats import recording
app = recording.appstats_wsgi_middleware(app)
return app
| ajibawa-2023/Python-Code-Large/train/row_438 | 4 | 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_438:FunctionDef_L1_C0", "label": "webapp_add_wsgi_middleware", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.625, 1.0, 0, 0.66, 0.0, 156, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "webapp_add_wsgi_middleware", "arg_names": ["app"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_438:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_438:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_438:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_438:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
scgihandler.py - handler for SCGI protocol
Modified by Michele Comitini <michele.comitini@glisco.it>
from fcgihandler.py to support SCGI
fcgihandler has the following copyright:
" This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipi... | ajibawa-2023/Python-Code-Large/train/row_439 | 19 | 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_439:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 40], "level": 0, "parent": null, "vector": [8, 0, 0.2973, 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"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_439:If_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_439:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_439:If_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_439:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_439:If_... |
# -*- coding: utf-8 -*-
# when web2py is run as a windows service (web2py.py -W)
# it does not load the command line options but it
# expects to find configuration settings in a file called
#
# web2py/options.py
#
# this file is an example for options.py
import socket
import os
ip = '0.0.0.0'
port = 80
interfaces ... | ajibawa-2023/Python-Code-Large/train/row_440 | 20 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_440:Import_L11_C0", "label": "socket import socket", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.0303, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "r... | [] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This file is based, although a rewrite, on MIT-licensed code from the Bottle web framework.
"""
import os
... | ajibawa-2023/Python-Code-Large/train/row_441 | 195 | 347 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_441:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0202, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_441:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_441:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_441:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_441:ImportFrom_L25_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
Install py2exe: http://sourceforge.net/projects/py2exe/files/
Copy script to the web2py directory
c:\bin\python26\python build_windows_exe.py py2exe
Adapted from http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/static/scripts/tools/... | ajibawa-2023/Python-Code-Large/train/row_442 | 86 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_442:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0401, 0.0428, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_442:If_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_442:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_442:If_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_442:Try_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_442:Try_L5... |
#!/usr/bin/env python
import os
import sys
"""
Author: Christopher Steel on behalf of Voice of Access
Copyright: Copyrighted (c) by Massimo Di Pierro (2007-2013)
web2py_clone becomes part of the web2py distribution available
on Pypi via 'pip install web2py'
web2py_clone is one of multiple commands that become availa... | ajibawa-2023/Python-Code-Large/train/row_443 | 28 | 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_443:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0364, 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_443:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_443:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_443:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_443:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
path = os.getcwd()
try:
if sys.argv[1] and os.path.exists(sys.argv[1]):
path = sys.argv[1]
except:
pass
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]
# import gluon.import_all ##### This should be uncommented f... | ajibawa-2023/Python-Code-Large/train/row_444 | 13 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_444:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0417, 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_444:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_444:If_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_444:If_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_444:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_444:FunctionD... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# portalocker.py
# Cross-platform (posix/nt) API for flock-style file locking.
# Requires python 1.5.2 or better.
"""
Cross-platform (posix/nt) API for flock-style file locking.
Synopsis:
import portalocker
file = open(\"somefile\", \"r+\")
port... | ajibawa-2023/Python-Code-Large/train/row_446 | 91 | 171 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_446:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 42], "level": 0, "parent": null, "vector": [8, 0, 0.1433, 0.2105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_446:Try_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_446:Import_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_446:Try_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_446:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_446:T... |
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import os
import sys
import socket
import platform
from storage import Storage
global_settings = Storage()
settings = global_settings # legacy compa... | ajibawa-2023/Python-Code-Large/train/row_447 | 18 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_447:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0789, 0.1316, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_447:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_447:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_447:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_447:Assign_L20_C4"}] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import re
__all__ = ['HTTP', 'redirect']
defined_status = {
200: 'OK',
201: 'CREATED',
20... | ajibawa-2023/Python-Code-Large/train/row_448 | 72 | 164 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_448:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0366, 0.0305, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_448:Try_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_448:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_448:Try_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_448:Assign_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_448:Cla... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>,
limodou <limodou@gmail.com> and srackham <srackham@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import logging
import os
import pdb
impo... | ajibawa-2023/Python-Code-Large/train/row_449 | 117 | 196 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_449:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_449:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_449:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_449:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_449:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This file specifically includes utilities for security.
"""
import threading
import struct
import hashlib
... | ajibawa-2023/Python-Code-Large/train/row_450 | 191 | 325 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_450:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0215, 0.0215, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_450:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_450:Import_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_450:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_450:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_450:Try... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Provides:
- List; like list but returns None instead of IndexOutOfBounds
- Storage; like dictionary allowi... | ajibawa-2023/Python-Code-Large/train/row_451 | 115 | 284 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_451:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0299, 0.0352, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_451:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_451:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_451:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_451:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import re
# pattern to find defined tables
regex_tables = re.compile(
"""^[\w]+\.define_table\(\s... | ajibawa-2023/Python-Code-Large/train/row_452 | 6 | 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_452:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.1786, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop©gmail.com>
for Web2py project
Utilities and cla... | ajibawa-2023/Python-Code-Large/train/row_453 | 179 | 728 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_453:Import_L1_C0", "label": "__builtin__ import __builtin__", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0014, 0.0014, 0, 0.66, 0.0, 364, 0, 1, 0, 0, 364, 0, 0], "semantic": {"name": "__builtin__", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_453:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_453:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_453:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_453:Try_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
# this file exists for backward compatibility
__all__ = ['DAL', 'Field', 'DRIVERS']
from dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, DRIVERS, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType
| ajibawa-2023/Python-Code-Large/train/row_458 | 2 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_458:Assign_L3_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.6, 0.2, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ""... | [] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
::
# from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942
# Title: Cross-site scripting (XSS) defense
# Submitter: Josh Goldfoot (other recipes)
# Last Updated: 2006/08/05
# Version no: 1.0
"""
from htmllib import HTMLParser
from ... | ajibawa-2023/Python-Code-Large/train/row_459 | 90 | 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_459:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0373, 0.0439, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_459:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_459:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_459:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_459:Return_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework (Copyrighted, 2007-2011).
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Author: Thadeus Burgess
Contributors:
- Thank you to Massimo Di Pierro for creating the original gluon/template.py
- Thank you to Jonathan... | ajibawa-2023/Python-Code-Large/train/row_462 | 349 | 917 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_462:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0104, 0.0131, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_462:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_462:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_462:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_462:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4... |
import codecs
import encodings
"""Caller will hand this library a buffer and ask it to either convert
it or auto-detect the type.
Based on http://code.activestate.com/recipes/52257/
Licensed under the PSF License
"""
# None represents a potentially variable byte. "##" in the XML spec...
autodetect_dict = { # bytep... | ajibawa-2023/Python-Code-Large/train/row_463 | 32 | 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_463:Import_L1_C0", "label": "codecs import codecs", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_463:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_463:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_463:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_463:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import logging
import os
try:
import Tkinter
except:
Tkinter = None
class MessageBoxHandler(logging.Handler):
def __init__(self):
logging.Handler.__init__(self)
def emit(self, record):
if Tkinter:
msg = self.format(record)
root = Tkinter.Tk()
root.... | ajibawa-2023/Python-Code-Large/train/row_464 | 27 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_464:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 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_464:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_464:Import_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_464:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_464:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_464:Class... |
# encoding utf-8
__author__ = "Thadeus Burgess <thadeusb@thadeusb.com>"
# we classify as "non-reserved" those key words that are explicitly known
# to the parser but are allowed as column or table names. Some key words
# that are otherwise non-reserved cannot be used as function or data type n
# ames and ... | ajibawa-2023/Python-Code-Large/train/row_465 | 15 | 1,718 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_465:Assign_L3_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0017, 0.0006, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
# This file is part of the Rocket Web Server
# Copyright (c) 2011 Timothy Farrell
# Modified by Massimo Di Pierro
# Import System Modules
import sys
import errno
import socket
import logging
import platform
# Define Constants
VERSION = '1.2.6'
SERVER_NAME = socket.gethostname()
SERVER_SOFTWAR... | ajibawa-2023/Python-Code-Large/train/row_467 | 1,004 | 1,871 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_467:Import_L8_C0", "label": "sys import sys", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0005, 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_467:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_467:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_467:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_467:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Functions required to execute app components
============================================
FOR INTERNAL USE... | ajibawa-2023/Python-Code-Large/train/row_469 | 24 | 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_469:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 13], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.1887, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_469:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_469:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_469:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_469:Try_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
CONTENT_TYPE dictionary created against freedesktop.org' shared mime info
database version 1.1.
Deviations... | ajibawa-2023/Python-Code-Large/train/row_470 | 13 | 853 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_470:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0147, 0.0211, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_470:FunctionDef_L840_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_470:Expr_L841_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_470:FunctionDef_L840_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_470:Assign_L845_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from test_http import *
from test_cache import *
from test_dal import *
from test_html import *
from test_is_url import *
from test_languages import *
from test_router import *
from test_routes import *
from test_storage import *
from test_template import *
from test_utils import *
from test_contribs import *
from test... | ajibawa-2023/Python-Code-Large/train/row_472 | 16 | 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_472:ImportFrom_L1_C0", "label": "from test_http import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 891, 0, 1, 0, 0, 891, 0, 0], "semantic": {"name": "test_http", "arg_names": [], "import_names": ["*"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_472:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_472:ImportFrom_L17_C4"}] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
def handler(request, response, methods):
re... | ajibawa-2023/Python-Code-Large/train/row_473 | 11 | 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_473:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.2381, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_473:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_473:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_473:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_473:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu> and
Limodou <limodou@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
This makes uses of the pywin32 package
(http://sourceforge.net/projects/pywin... | ajibawa-2023/Python-Code-Large/train/row_474 | 130 | 213 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_474:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0399, 0.0563, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_474:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_474:Import_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_474:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_474:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_474:T... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import cgi
import os
import re
import copy
import types
import urllib
import base64
import sanitizer
im... | ajibawa-2023/Python-Code-Large/train/row_475 | 1,301 | 2,708 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_475:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0022, 0.0018, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_475:FunctionDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_475:Expr_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_475:FunctionDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_475:If_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will... | ajibawa-2023/Python-Code-Large/train/row_477 | 83 | 152 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_477:Expr_L12_C0", "label": "expression", "type": "expression", "loc": [12, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0789, 0.0066, 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_477:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_477:Import_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_477:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_477:Try_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_477:Try_... |
#!/usr/bin/env python
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Attention: Requires Chrome or Safari. For IE of Firefox you need https://github.com/gimite/web-socket-js
1) install tornado (requir... | ajibawa-2023/Python-Code-Large/train/row_478 | 91 | 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_478:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 71], "level": 0, "parent": null, "vector": [8, 0, 0.1763, 0.3382, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_478:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_478:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_478:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_478:Assign_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# coding: utf8
"""
RPX Authentication for web2py
Developed by Nathan Freeze (Copyright © 2009)
Email <nathan@freezable.com>
Modified by Massimo Di Pierro
This file contains code to allow using RPXNow.com (now Jainrain.com)
services with web2py
"""
import os
import re
import ur... | ajibawa-2023/Python-Code-Large/train/row_481 | 59 | 134 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_481:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0597, 0.0672, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_481:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_481:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_481:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_481:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2
Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""
from google.appengine.api import users
class GaeGoo... | ajibawa-2023/Python-Code-Large/train/row_482 | 12 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_482:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1842, 0.1842, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_482:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_482:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_482:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_482:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2
Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""
from gluon.http import HTTP
try:
import linkedin
... | ajibawa-2023/Python-Code-Large/train/row_483 | 20 | 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_483:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1373, 0.1373, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_483:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_483:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_483:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_483:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_48... |
#!/usr/bin/env python
# coding: utf8
"""
Dropbox Authentication for web2py
Developed by Massimo Di Pierro (2012)
Same License as Web2py License
"""
# mind here session is dropbox session, not current.session
import os
import re
import urllib
from dropbox import client, rest, session
from gluon import *
from gluon.to... | ajibawa-2023/Python-Code-Large/train/row_484 | 74 | 131 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_484:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0458, 0.0382, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_484:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_484:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_484:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_484:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# coding: utf8
"""
Oneall Authentication for web2py
Developed by Nathan Freeze (Copyright © 2013)
Email <nathan@freezable.com>
This file contains code to allow using onall.com
authentication services with web2py
"""
import os
import base64
from gluon import *
from gluon.storage i... | ajibawa-2023/Python-Code-Large/train/row_485 | 68 | 107 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_485:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0701, 0.0748, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_485:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_485:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_485:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_485:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
BrowserID Authentication for web2py
developed by Madhukar R Pai (Copyright 2012)
Email <madspai@gmail.com>
License : LGPL
thanks and credits to the web2py community
This custom authenticator allows web2py to authenticate using browserid (https... | ajibawa-2023/Python-Code-Large/train/row_486 | 41 | 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_486:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1374, 0.1978, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_486:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_486:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_486:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_486:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# coding: utf8
"""
ExtendedLoginForm is used to extend normal login form in web2py with one more login method.
So user can choose the built-in login or extended login methods.
"""
from gluon import current, DIV
class ExtendedLoginForm(object):
"""
Put extended_login_form under web2py/g... | ajibawa-2023/Python-Code-Large/train/row_489 | 35 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_489:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0524, 0.0381, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_489:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_489:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_489:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_489:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
import urllib
import urllib2
import base64
def basic_auth(server="http://127.0.0.1"):
"""
to use basic login with a different server
from gluon.contrib.login_methods.basic_auth import basic_auth
auth.settings.login_methods.append(basic_auth('http://server'))
"""
def basic_login_aux(username,
... | ajibawa-2023/Python-Code-Large/train/row_490 | 14 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_490:Import_L1_C0", "label": "urllib import urllib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_490:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_490:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_490:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_490:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
import time
from hashlib import md5
from gluon.dal import DAL
def motp_auth(db=DAL('sqlite://storage.sqlite'),
time_offset=60):
"""
motp allows you to login with a one time password(OTP) generated on a motp client,
motp clients are available for practically all platfo... | ajibawa-2023/Python-Code-Large/train/row_491 | 29 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_491:Import_L3_C0", "label": "time import time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.009, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_491:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_491:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_491:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_491:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Written by Michele Comitini <mcm@glisco.it>
License: GPL v3
Adds support for x509 authentication.
"""
from gluon.globals import current
from gluon.storage import Storage
from gluon.http import HTTP, redirect
#requires M2Crypto
from M2Crypto import X509
class X509... | ajibawa-2023/Python-Code-Large/train/row_492 | 31 | 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_492:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_492:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_492:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_492:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_492:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from gluon.contrib.pam import authenticate
def pam_auth():
"""
to use pam_login:
from gluon.contrib.login_methods.pam_auth import pam_auth
auth.settings.login_methods.append(pam_auth())
or
auth.settings.actions_disabled=[
'register','change_password','request_reset_password']
auth... | ajibawa-2023/Python-Code-Large/train/row_493 | 6 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_493:ImportFrom_L1_C0", "label": "from gluon.contrib.pam import authenticate", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "gluon.contrib.pam", "arg_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_493:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_493:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_493:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_493:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# coding: utf8
"""
LoginRadius Authentication for web2py
Developed by Nathan Freeze (Copyright © 2013)
Email <nathan@freezable.com>
This file contains code to allow using loginradius.com
authentication services with web2py
"""
import os
from gluon import *
from gluon.storage impo... | ajibawa-2023/Python-Code-Large/train/row_494 | 55 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_494:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0773, 0.0825, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_494:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_494:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_494:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_494:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
import smtplib
import logging
def email_auth(server="smtp.gmail.com:587",
domain="@gmail.com",
tls_mode=None):
"""
to use email_login:
from gluon.contrib.login_methods.email_auth import email_auth
auth.settings.login_methods.append(email_auth("smtp.gmail.com:587",
... | ajibawa-2023/Python-Code-Large/train/row_495 | 29 | 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_495:Import_L1_C0", "label": "smtplib import smtplib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "smtplib", "arg_names": [], "import_names": ["smtplib"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_495:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_495:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_495:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_495:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2
Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
"""
from gluon import current, redirect
class CasAuth(object... | ajibawa-2023/Python-Code-Large/train/row_496 | 76 | 144 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_496:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0486, 0.0486, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_496:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_496:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_496:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_496:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Loginza.ru authentication for web2py
Developed by Vladimir Dronnikov (Copyright © 2011)
Email <dronnikov@gmail.com>
"""
import urllib
from gluon.html import *
from gluon.tools import fetch
from gluon.storage import Storage
import gluon.contrib.simplejson as j... | ajibawa-2023/Python-Code-Large/train/row_497 | 45 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_497:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0522, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_497:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_497:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_497:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_497:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Written by Michele Comitini <mcm@glisco.it>
License: GPL v3
Adds support for OAuth1.0a authentication to web2py.
Dependencies:
- python-oauth2 (http://github.com/simplegeo/python-oauth2)
"""
import oauth2 as oauth
import cgi
from urllib import urlencode
from gl... | ajibawa-2023/Python-Code-Large/train/row_499 | 70 | 183 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_499:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0464, 0.0546, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_499:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_499:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_499:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_499:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu> and
Robin B <robi123@gmail.com>.
License: GPL v2
"""
__all__ = ['MEMDB', 'Field']
import re
import sys
import os
import types
import datetime
... | ajibawa-2023/Python-Code-Large/train/row_500 | 400 | 906 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_500:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0072, 0.0066, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_500:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_500:If_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_500:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_500:Return_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# Only Python 2.6 and up, because of NamedTuple.
import time
from collections import namedtuple
Score = namedtuple('Score', ['tag', 'stamp'])
class TimeCollector(object):
def __init__(self):
'''The first time stamp is created here'''
self.scores = [Score(tag='start', stamp=time.clock())]
def ... | ajibawa-2023/Python-Code-Large/train/row_501 | 64 | 102 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_501:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0098, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_501:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_501:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_501:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_501:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.