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
# -*- coding: utf-8 -*- import pygame import globals class HealthWindow(pygame.sprite.Sprite): def __init__(self, rect, panel): pygame.sprite.Sprite.__init__(self) self.panel = panel self.type = 'healthwindow' self.player = panel.player self.image = pygame.image.load('misc/he...
ajibawa-2023/Python-Code-Large/train/row_89767
23
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89767:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.08, 0.04, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89767:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89767:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89767:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89767:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
__author__="chubakur" __date__ ="$20.02.2011 13:00:13$" from setuptools import setup,find_packages setup ( name = 'Orions', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for upload to ...
ajibawa-2023/Python-Code-Large/train/row_89768
4
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_89768:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 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 -*- import pygame import globals import threading class GameInformationPanel(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.type = "gameinformationpanel" self.image = pygame.image.load('misc/game_information.gif').convert_alpha() ...
ajibawa-2023/Python-Code-Large/train/row_89769
34
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_89769:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0571, 0.0286, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89769:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89769:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89769:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89769:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- import pygame import globals class Cardbox(pygame.sprite.Sprite): def __init__(self, rect, player, position): pygame.sprite.Sprite.__init__(self) self.type = 'cardbox' self.position = position self.player = player #первый или второй self.image = pygame...
ajibawa-2023/Python-Code-Large/train/row_89770
24
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89770:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0385, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89770:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89770:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89770:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89770:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
__author__="chubakur" __date__ ="$07.03.2011 15:40:28$" from setuptools import setup,find_packages setup ( name = 'WizardsMagic', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for uploa...
ajibawa-2023/Python-Code-Large/train/row_89771
4
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_89771:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 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 -*- #import pygame #SERVER! import cards import random import globals #import pygame class Player(): #Прототип игрока def __init__(self): self.health = 50 self.name = "player" self.action_points = True #Ходил игрок, или нет #def damage(self, damage, enemy): # s...
ajibawa-2023/Python-Code-Large/train/row_89772
69
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89772:Import_L4_C0", "label": "cards import cards", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.028, 0.007, 0, 0.66, 0.0, 271, 0, 1, 0, 0, 271, 0, 0], "semantic": {"name": "cards", "arg_names": [], "import_names": ["cards"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89772:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89772:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89772:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89772:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
__author__="chubakur" __date__ ="$20.02.2011 13:00:13$" from setuptools import setup,find_packages setup ( name = 'Orions', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for upload to ...
ajibawa-2023/Python-Code-Large/train/row_89773
4
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_89773:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_ca...
[]
import cards # -*- coding: utf-8 -*- import json #import pygame.sprite #Wizards Magic Server #Copyright (C) 2011 сhubakur #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; either version 2 #of the L...
ajibawa-2023/Python-Code-Large/train/row_89774
104
170
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89774:Import_L1_C0", "label": "cards import cards", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0059, 0.0059, 0, 0.66, 0.0, 271, 0, 1, 0, 0, 271, 0, 0], "semantic": {"name": "cards", "arg_names": [], "import_names": ["cards"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89774:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89774:FunctionDef_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89774:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89774:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- #SERVER! #import pygame #pygame.font.init() #panels = pygame.sprite.Group() #Нижний уровень #interface = pygame.sprite.Group() #Уровень кнопок #cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #ccards_1 = pygame.sprite.Group() # Карты, которые вывел первый игрок #ccards_2 = pygame....
ajibawa-2023/Python-Code-Large/train/row_89775
9
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89775:Assign_L11_C0", "label": "cards_of_element_shower_element =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.44, 0.04, 0, 0.66, 0.0, 887, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "cards_of_element_shower_element", "...
[]
# -*- coding: utf-8 -*- #from WizardsMagic import cardbox0 # To change this template, choose Tools | Templates # and open the template in the editor. __author__ = "chubakur" __date__ = "$13.02.2011 18:46:32$" water_cards = ["Nixie", "Hydra", "Waterfall", "Leviathan", "IceGuard", "Poseidon", "IceWizard", "Poison", "SeaJ...
ajibawa-2023/Python-Code-Large/train/row_89776
14
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_89776:Assign_L5_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2778, 0.0556, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_...
[]
# -*- coding: utf-8 -*- import pygame import globals class Actionpanel(pygame.sprite.Sprite): def __init__(self, rect, player): pygame.sprite.Sprite.__init__(self) self.type = 'actionpanel' self.player = player self.image = pygame.image.load('misc/actionpanel_bg.gif').convert_alpha()...
ajibawa-2023/Python-Code-Large/train/row_89777
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_89777:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0588, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89777:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89777:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89777:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89777:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- import pygame import globals class CardInfo(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.type = 'cardinfo' #self.image = pygame.Surface((450, 300)) #self.image = self.image.convert() #self.image.fill((0, 0, 0)) ...
ajibawa-2023/Python-Code-Large/train/row_89778
29
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_89778:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0263, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89778:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89778:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89778:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89778:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- import pygame.sprite #Wizards Magic #Copyright (C) 2011 сhubakur #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; either version 2 #of the License, or (at your option) any l...
ajibawa-2023/Python-Code-Large/train/row_89779
89
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89779:Import_L2_C0", "label": "pygame.sprite import pygame.sprite", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0155, 0.0078, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "pygame.sprite", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89779:While_L112_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89779:For_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89779:For_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89779:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
# -*- coding: utf-8 -*- import globals import pygame import player import cards import sys from pygame.locals import * def play_bookopen_sound(): #pygame.mixer.music.load('misc/sounds/book_open.wav') #pygame.mixer.music.play() return def play_bookclose_sound(): #pygame.mixer.music.load('misc/sounds/book...
ajibawa-2023/Python-Code-Large/train/row_89780
159
179
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89780:Import_L2_C0", "label": "globals import globals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0112, 0.0056, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "globals", "arg_names": [], "import_names": ["globals"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89780:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89780:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89780:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89780:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- import pygame import globals class ElementButton(pygame.sprite.Sprite): def __init__(self): #Это прототип! pass def draw(self): self.image = self.surface_backup.copy() #exec("text = globals.font.render(str(globals.player" + str(self.player.id) + "." + self...
ajibawa-2023/Python-Code-Large/train/row_89781
83
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89781:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.023, 0.0115, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89781:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89781:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89781:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89781:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Co...
# To change this template, choose Tools | Templates # and open the template in the editor. import socket import globals try: import json print 'JSON' except ImportError: import simplejson as json print 'SIMPLEJSON' #host = "drakmail.ru" #port = 7712 sock = socket def connect(): global sock host ...
ajibawa-2023/Python-Code-Large/train/row_89782
27
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89782:Import_L3_C0", "label": "socket import socket", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.075, 0.025, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89782:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89782:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89782:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89782:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_897...
__author__="chubakur" __date__ ="$08.04.2011 19:30:49$" from setuptools import setup,find_packages setup ( name = 'WizardsMagic', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for uploa...
ajibawa-2023/Python-Code-Large/train/row_89783
4
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_89783:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_ca...
[]
#!/usr/bin/env python # vim: set fileencoding=utf-8 : import pygame import sys import os import globals from pygame.locals import * import options current_folder = os.path.dirname(os.path.abspath(__file__)) class MenuButton(pygame.sprite.Sprite): ''' menu item ''' def __init__(self, pos=0, text="", cmd...
ajibawa-2023/Python-Code-Large/train/row_89784
107
132
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89784:Import_L3_C0", "label": "pygame import pygame", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0076, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89784:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89784:Expr_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89784:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89784:FunctionDef_L14_C1"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- #import pygame import cards import os import random import globals import sockets import pygame current_folder = os.path.dirname(os.path.abspath(__file__)) class Player(): #Прототип игрока def __init__(self): self.health = 50 self.name = "player" self.action_points =...
ajibawa-2023/Python-Code-Large/train/row_89785
112
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89785:Import_L3_C0", "label": "cards import cards", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0219, 0.0073, 0, 0.66, 0.0, 271, 0, 1, 0, 0, 271, 0, 0], "semantic": {"name": "cards", "arg_names": [], "import_names": ["cards"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89785:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89785:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89785:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89785:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- import pygame import os import globals import player current_folder = os.path.dirname(os.path.abspath(__file__)) class CompleteTheCourseButton(pygame.sprite.Sprite): def __init__(self, rect): pygame.sprite.Sprite.__init__(self) #self.panel = panel self.type = 'button...
ajibawa-2023/Python-Code-Large/train/row_89786
33
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89786:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0278, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89786:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89786:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89786:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89786:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...
# To change this template, choose Tools | Templates # and open the template in the editor. import globals import pygame class NicknameWindow(pygame.sprite.Sprite): def __init__(self,rect,player): pygame.sprite.Sprite.__init__(self) self.type = 'nicknamewindow' #self.rect = rect self....
ajibawa-2023/Python-Code-Large/train/row_89787
15
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89787:Import_L3_C0", "label": "globals import globals", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.05, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "globals", "arg_names": [], "import_names": ["globals"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89787:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89787:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89787:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89787:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- import pygame import globals class HealthWindow(pygame.sprite.Sprite): def __init__(self, rect): pygame.sprite.Sprite.__init__(self) self.type = 'healthwindow' globals.interface.add(self) self.font = pygame.font.Font(None, 22) text = self.font.render('...
ajibawa-2023/Python-Code-Large/train/row_89788
36
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89788:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0465, 0.0233, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89788:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89788:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89788:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89788:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
__author__="chubakur" __date__ ="$20.02.2011 13:00:13$" from setuptools import setup,find_packages setup ( name = 'Orions', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for upload to ...
ajibawa-2023/Python-Code-Large/train/row_89789
4
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_89789:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 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 -*- import pygame import globals import threading import os current_folder = os.path.dirname(os.path.abspath(__file__)) class GameInformationPanel(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.type = "gameinformationpanel" self.image...
ajibawa-2023/Python-Code-Large/train/row_89790
37
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_89790:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0513, 0.0256, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89790:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89790:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89790:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89790:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...
import unittest import doctest class OptionalExtensionTestSuite(unittest.TestSuite): def run(self, result): import simplejson run = unittest.TestSuite.run run(self, result) simplejson._toggle_speedups(False) run(self, result) simplejson._toggle_speedups(True) ...
ajibawa-2023/Python-Code-Large/train/row_89791
34
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89791:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89791:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89791:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89791:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89791:Import_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: from simplejson import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: return None, None c_encode_basestring_ascii, c_make_encoder = _im...
ajibawa-2023/Python-Code-Large/train/row_89792
261
499
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89792:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.003, 0.004, 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_89792:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89792:Try_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89792:Try_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89792:ImportFrom_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
ajibawa-2023/Python-Code-Large/train/row_89794
77
438
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89794:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1142, 0.226, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89794:FunctionDef_L113_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89794:Import_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89794:FunctionDef_L113_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89794:Try_L115_C4"}, {"f": "ajibawa-2023/Python-C...
"""JSON token scanner """ import re def _import_c_make_scanner(): try: from simplejson._speedups import make_scanner return make_scanner except ImportError: return None c_make_scanner = _import_c_make_scanner() __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))...
ajibawa-2023/Python-Code-Large/train/row_89796
57
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_89796:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0195, 0.026, 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_89796:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89796:Try_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89796:Try_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89796:ImportFrom_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
ajibawa-2023/Python-Code-Large/train/row_89797
85
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_89797:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0252, 0.042, 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_89797:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89797:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89797:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89797:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
# -*- coding: utf-8 -*- import pygame import globals import os current_folder = os.path.dirname(os.path.abspath(__file__)) class Cardbox(pygame.sprite.Sprite): def __init__(self, rect, player, position): pygame.sprite.Sprite.__init__(self) self.type = 'cardbox' self.position = position ...
ajibawa-2023/Python-Code-Large/train/row_89798
39
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89798:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0444, 0.0222, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89798:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89798:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89798:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89798:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import pygame import sys import globals from pygame.locals import * import ConfigParser import os.path from widgets import TxtInput, CheckBox import menu def launcher(): #Something ,what we need to change after reset configuration globals.bg_sound.stop() if globals.music == "Y": globals....
ajibawa-2023/Python-Code-Large/train/row_89799
85
103
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89799:Import_L1_C0", "label": "pygame import pygame", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0097, 0.0097, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89799:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89799:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89799:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89799:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python # vim: set fileencoding=utf-8 : import pygame import globals from pygame.locals import * from pygame import Surface, draw class TxtInput(pygame.sprite.Sprite): ''' class handling input box: pos: # of line from the top of form label: box label text: text inside box length: box...
ajibawa-2023/Python-Code-Large/train/row_89800
190
246
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89800:Import_L3_C0", "label": "pygame import pygame", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0041, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89800:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89800:Expr_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89800:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89800:FunctionDef_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- # Documentation for this class available at the end of this code. # __author__ = "mtsimoni" # __date__ = "$25.05.2011 23:17:00$" import pygame import globals class Animation(): def __init__(self, image, origin = [0,0]): self.image = image #The image to move self.origin = or...
ajibawa-2023/Python-Code-Large/train/row_89801
64
113
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89801:Import_L6_C0", "label": "pygame import pygame", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0531, 0.0088, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89801:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89801:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89801:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89801:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
# -*- coding: utf-8 -*- import pygame import globals import os current_folder = os.path.dirname(os.path.abspath(__file__)) class CardInfo(pygame.sprite.Sprite): """ class to display information about a card """ def __init__(self): pygame.sprite.Sprite.__init__(self) self.type = 'cardinfo' ...
ajibawa-2023/Python-Code-Large/train/row_89802
36
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_89802:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0217, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89802:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89802:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89802:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89802:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# -*- coding: utf-8 -*- import pygame.sprite #Wizards Magic #Copyright (C) 2011 сhubakur #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; either version 2 #of the License, or (at your option) any l...
ajibawa-2023/Python-Code-Large/train/row_89803
223
308
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89803:Import_L2_C0", "label": "pygame.sprite import pygame.sprite", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0032, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "pygame.sprite", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89803:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89803:While_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89803:While_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89803:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
import pygame.sprite # To change this template, choose Tools | Templates # and open the template in the editor. __author__="chubakur" __date__ ="$17.03.2011 16:55:19$" import pygame import globals class MessageWindow(pygame.sprite.Sprite): def __init__(self,message): pygame.sprite.Sprite.__init__(self) ...
ajibawa-2023/Python-Code-Large/train/row_89804
18
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_89804:Import_L1_C0", "label": "pygame.sprite import pygame.sprite", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "pygame.sprite", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89804:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89804:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89804:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89804:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- import globals import pygame import cards import sys import os import sockets import menu from pygame.locals import * current_folder = os.path.dirname(os.path.abspath(__file__)) class Point(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.i...
ajibawa-2023/Python-Code-Large/train/row_89805
186
206
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89805:Import_L2_C0", "label": "globals import globals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0097, 0.0049, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "globals", "arg_names": [], "import_names": ["globals"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89805:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89805:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89805:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89805:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Co...
# -*- coding: utf-8 -*- import pygame import globals import os pygame.font.init() current_folder = os.path.dirname(os.path.abspath(__file__)) class ElementShower(pygame.sprite.Sprite): def __init__(self): self.type = 'outer' self.font = pygame.font.Font(current_folder+"/misc/Domestic_Manners.ttf", ...
ajibawa-2023/Python-Code-Large/train/row_89806
162
173
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89806:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0116, 0.0058, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89806:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89806:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89806:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89806:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- import globals import os import pygame current_folder = os.path.dirname(os.path.abspath(__file__)) #globals.cards_of_element_shower_element содержит стихию class LeftArrow(pygame.sprite.Sprite): def __init__(self, rect): pygame.sprite.Sprite.__init__(self) self.type = 'butto...
ajibawa-2023/Python-Code-Large/train/row_89807
98
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89807:Import_L2_C0", "label": "globals import globals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0088, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "globals", "arg_names": [], "import_names": ["globals"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89807:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89807:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89807:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89807:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- import pygame import os current_folder = os.path.dirname(os.path.abspath(__file__)) pygame.font.init() panels = pygame.sprite.Group() #Нижний уровень #Lower Level interface = pygame.sprite.Group() #Уровень кнопок #Button Level cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #The l...
ajibawa-2023/Python-Code-Large/train/row_89808
81
103
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89808:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0194, 0.0097, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89808:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89808:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89808:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89808:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Co...
# -*- coding: utf-8 -*- import pygame.sprite import animations import os current_folder = os.path.dirname(os.path.abspath(__file__)) #from WizardsMagic import cardbox0 # To change this template, choose Tools | Templates # and open the template in the editor. __author__ = "chubakur" __date__ = "$13.02.2011 18:46:32$" w...
ajibawa-2023/Python-Code-Large/train/row_89809
1,761
1,961
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89809:Import_L2_C0", "label": "pygame.sprite import pygame.sprite", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.001, 0.0005, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "pygame.sprite", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89809:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89809:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89809:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89809:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- import globals import pygame class CardsOfElementShower(pygame.sprite.Sprite): #Не прототип! def __init__(self, rect, player): pygame.sprite.Sprite.__init__(self) self.player = player self.type = 'cardsofelementshower' self.image = pygame.image.load('misc/...
ajibawa-2023/Python-Code-Large/train/row_89810
53
59
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89810:Import_L2_C0", "label": "globals import globals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0339, 0.0169, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "globals", "arg_names": [], "import_names": ["globals"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89810:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89810:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89810:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89810:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- import pygame pygame.font.init() panels = pygame.sprite.Group() #Нижний уровень #Lower Level interface = pygame.sprite.Group() #Уровень кнопок #Button Level cards_in_deck = pygame.sprite.Group() #Уровень дополнительный #The level of additional ccards_1 = pygame.sprite.Group() # Карты, которые ...
ajibawa-2023/Python-Code-Large/train/row_89811
20
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89811:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0385, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[]
# -*- coding: utf-8 -*- import pygame.sprite #from WizardsMagic import cardbox0 # To change this template, choose Tools | Templates # and open the template in the editor. __author__ = "chubakur" __date__ = "$13.02.2011 18:46:32$" water_cards = ["Nixie", "Hydra", "Waterfall", "Leviathan", "IceGuard", "Poseidon", "IceWiz...
ajibawa-2023/Python-Code-Large/train/row_89812
1,644
1,835
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89812:Import_L2_C0", "label": "pygame.sprite import pygame.sprite", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0011, 0.0005, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "pygame.sprite", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89812:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89812:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89812:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89812:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Co...
# -*- coding: utf-8 -*- import pygame import globals class Infopanel(pygame.sprite.Sprite): def __init__(self, rect, player): pygame.sprite.Sprite.__init__(self) self.type = 'infopanel' self.player = player #self.image = pygame.Surface((screen.get_size()[0],screen.get_size()[1]/25)) ...
ajibawa-2023/Python-Code-Large/train/row_89813
14
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_89813:Import_L2_C0", "label": "pygame import pygame", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.0556, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89813:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89813:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89813:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89813:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from imp import load_module, find_module pychess = load_module("pychess", *find_module("pychess",["lib"])) from distutils.core import setup from glob import glob from os import listdir from os.path import isdir, isfile import os import sys # To run "setup.py register" ch...
ajibawa-2023/Python-Code-Large/train/row_89814
27
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89814:ImportFrom_L4_C0", "label": "from imp import load_module, find_module", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0301, 0.0075, 0, 0.66, 0.0, 201, 0, 2, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89814:If_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89814:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89814:If_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89814:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8...
#!/usr/bin/env python # -*- coding: utf-8 -*- from getpass import getpass from smtplib import SMTP, SMTPConnectError, SMTPAuthenticationError, SMTPRecipientsRefused from email.mime.text import MIMEText mail = 'pychess@gmail.com' passw = getpass('password: ') smtp = 'smtp.gmail.com' to = 'python-announce-lis...
ajibawa-2023/Python-Code-Large/train/row_89817
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89817:ImportFrom_L1_C0", "label": "from getpass import getpass", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 784, 0, 1, 0, 0, 784, 0, 0], "semantic": {"name": "getpass", "arg_names": [], "import_names": ["getpa...
[]
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- import sys, inspect, os from os import listdir, chdir, getcwd from os.path import isdir, join, split docdir = getcwd() print repr ("cd %s" % sys.argv[1]) chdir(sys.argv[1]) todir = "./" def search (path, extension): for file in listdir(path): file = join (pa...
ajibawa-2023/Python-Code-Large/train/row_89818
35
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_89818:Import_L4_C0", "label": "sys import sys, inspect, os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0227, 0, 0.66, 0.0, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "in...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89818:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89818:For_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89818:For_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89818:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import with_statement import collections ############################# # Configuration starts here # ############################# FILENAME = 'TRANSLATORS' POOLSIZE = 7 ########################### # Configuration ends here # ########################### ...
ajibawa-2023/Python-Code-Large/train/row_89819
13
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89819:ImportFrom_L1_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89819:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89819:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89819:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89819:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- # # require: # gtk-dev-2.10.11-win32-1 # py2exe-0.6.6.win32-py2.5 # pygtk-2.10.6-1.win32-py2.5 # pygobject-2.12.3-1.win32-py2.5 # pycairo-1.2.6-1.win32-py2.5 # # run: # python setup_win32.py py2exe # from distutils.core import setup import py2exe import glob import sys opts =...
ajibawa-2023/Python-Code-Large/train/row_89820
7
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89820:ImportFrom_L14_C0", "label": "from distutils.core import setup", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.2188, 0.0156, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "imp...
[]
import unittest import datetime from pychess.Utils.const import WHITE from pychess.ic.FICSConnection import Connection from pychess.ic.VerboseTelnet import PredictionsTelnet from pychess.ic.managers.AdjournManager import AdjournManager from pychess.ic.managers.GameListManager import GameListManager from pychess.ic.man...
ajibawa-2023/Python-Code-Large/train/row_89821
105
211
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89821:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89821:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89821:ClassDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89821:ClassDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89821:ClassDef_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
import unittest from pychess.Utils.Board import Board from pychess.Utils.lutils.LBoard import LBoard import sys class FenTestCase(unittest.TestCase): def setUp(self): self.positions = [] for line in open('gamefiles/perftsuite.epd'): semi = line.find(" ;") self.positio...
ajibawa-2023/Python-Code-Large/train/row_89824
22
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_89824:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89824:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89824:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89824:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89824:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
import unittest from pychess.Utils.const import * from pychess.Utils.lutils.leval import LBoard from pychess.Utils.lutils.lmove import newMove, FLAG from pychess.Utils.lutils.lmovegen import genCastles # TODO: add more test data data = ( ("r3k2r/8/8/8/8/8/8/R3K2R w AH - 0 1", [(E1, G1, KING_CASTLE), (E1, C1, QUEEN_C...
ajibawa-2023/Python-Code-Large/train/row_89825
20
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_89825:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89825:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89825:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89825:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89825:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Co...
import unittest import __builtin__ __builtin__.__dict__['_'] = lambda s: s modules_to_test = ( "bitboard", "draw", "eval", "fen", "frc_castling", "frc_movegen", "move", "movegen", "pgn", "zobrist", 'ficsmanagers', 'analysis', ) def suite(): tests = unittest.Te...
ajibawa-2023/Python-Code-Large/train/row_89826
11
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89826:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89826:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89826:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89826:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89826:For_L23_C4"}, {"f": "ajibawa-2023/Python-Code-...
import sys import unittest from pychess.Utils.Board import Board from pychess.Utils.Move import parseSAN class MoveTestCase(unittest.TestCase): def setUp(self): self.board = Board() def test_paresSAN(self): """Testing parseSAN with unambiguous notations variants""" s...
ajibawa-2023/Python-Code-Large/train/row_89827
25
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89827:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0244, 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_89827:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89827:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89827:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89827:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
import unittest from pychess.Utils.const import WHITE, ANALYZING, INVERSE_ANALYZING from pychess.Utils.lutils.ldata import MATE_VALUE from pychess.Utils.Move import listToMoves from pychess.Utils.Cord import Cord from pychess.Utils.Board import Board from pychess.Players.CECPEngine import CECPEngine from Queue import...
ajibawa-2023/Python-Code-Large/train/row_89828
66
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_89828:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0102, 0.0102, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89828:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89828:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89828:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89828:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Cod...
import unittest from pychess.Utils.const import * from pychess.Utils.Board import Board from pychess.Utils.lutils.leval import LBoard from pychess.Utils.lutils.lmove import parseAN FEN = "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" class ZobristTestCase(unittest.TestCase): def make_mov...
ajibawa-2023/Python-Code-Large/train/row_89829
72
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89829:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0104, 0.0104, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89829:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89829:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89829:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89829:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co...
import sys import unittest from pychess.Utils.Board import Board from pychess.Utils.lutils.LBoard import LBoard from pychess.Savers import pgn from pychess.Utils.const import FEN_START KEEPENDS = True GAMES = """ [Event "Bourdonnais"] [Site "La Palamede 1837"] [Date "1797.??.??"] [Round "?"] [White "De la Bourd...
ajibawa-2023/Python-Code-Large/train/row_89830
23
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_89830:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 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_89830:ClassDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89830:FunctionDef_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89830:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89830:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-...
import unittest from pychess.Utils.const import * from pychess.Utils.lutils.LBoard import LBoard from pychess.Utils.lutils.leval import evaluateComplete from pychess.Utils.lutils import leval class EvalTestCase(unittest.TestCase): def setUp (self): self.board = LBoard(NORMALCHESS) self.boar...
ajibawa-2023/Python-Code-Large/train/row_89831
36
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89831:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89831:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89831:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89831:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89831:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C...
from __future__ import with_statement import unittest from pychess.Savers import pgn from pychess.Utils.lutils import ldraw class DrawTestCase(unittest.TestCase): def setUp(self): with open('gamefiles/3fold.pgn') as f1: self.PgnFile1 = pgn.load(f1) with open('gamefiles/bilba...
ajibawa-2023/Python-Code-Large/train/row_89832
35
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89832:ImportFrom_L1_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89832:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89832:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89832:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89832:Assign_L12_C12"}, {"f": "ajibawa-2023/Python-...
import unittest import random import operator from pychess.Utils.lutils.bitboard import * class BitboardTestCase(unittest.TestCase): def setUp (self): self.positionSets = [] # Random positions. Ten of each length. Will also include range(64) and # range(0) for i in xrange(10)...
ajibawa-2023/Python-Code-Large/train/row_89833
44
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89833:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89833:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89833:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89833:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89833:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
from math import e from random import randint from sys import maxint import gtk, gobject from gobject import SIGNAL_RUN_FIRST, TYPE_NONE from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix from pychess.Utils.const import WHITE, DRAW, RUNNING, WHITEWON, BLACKWON from pychess...
ajibawa-2023/Python-Code-Large/train/row_89834
177
257
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89834:ImportFrom_L2_C0", "label": "from math import e", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0078, 0.0039, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["e"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89834:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89834:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89834:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89834:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: UTF-8 -*- import gtk import pango import time from pychess.System import uistuff from pychess.System import glock from pychess.System.Log import log from pychess.System.prefix import addDataPrefix from pychess.Utils.const import LOCAL, WHITE, BLACK from pychess.widgets.ChatView import ChatView __title...
ajibawa-2023/Python-Code-Large/train/row_89835
39
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_89835:Import_L3_C0", "label": "gtk import gtk", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0566, 0.0189, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89835:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89835:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89835:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89835:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-...
from __future__ import with_statement import gtk, gobject from gtk import gdk from pychess.System import conf from pychess.System.glock import glock_connect from pychess.System.prefix import addDataPrefix from pychess.Utils.Move import toSAN, toFAN from gtk.gdk import keyval_from_name leftkeys = map(keyval_from_name...
ajibawa-2023/Python-Code-Large/train/row_89836
124
181
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89836:ImportFrom_L1_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0055, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89836:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89836:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89836:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89836:Assign_L21_C24"}, {"f": "ajibawa-2023/Python...
import gtk, gobject, cairo from pychess.System import conf from pychess.Utils.book import getOpenings from pychess.Utils.Move import parseSAN, toSAN, toFAN from pychess.System.prefix import addDataPrefix __title__ = _("Opening Book") __icon__ = addDataPrefix("glade/panel_book.svg") __desc__ = _("The opening book wi...
ajibawa-2023/Python-Code-Large/train/row_89837
143
206
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89837:Import_L1_C0", "label": "gtk import gtk, gobject, cairo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 166, 0, 3, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89837:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89837:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89837:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89837:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: UTF-8 -*- from __future__ import with_statement import gtk, pango from pychess.System import uistuff from pychess.System.prefix import addDataPrefix from pychess.System.glock import * from pychess.Utils.const import * from pychess.Utils.lutils.lsort import staticExchangeEvaluate from pychess.Utils.lutil...
ajibawa-2023/Python-Code-Large/train/row_89838
136
253
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89838:ImportFrom_L3_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0119, 0.004, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89838:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89838:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89838:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89838:Assign_L24_C24"}, {"f": "ajibawa-2023/Python...
#!/usr/bin/env python2 # # PyChess startup script # import os, sys if sys.version_info < (2, 5, 0): print 'ERROR: PyChess requires Python >= 2.5' sys.exit(1) import pygtk pygtk.require("2.0") try: import rsvg except ImportError: print 'ERROR: Could not load the rsvg module.' print 'You need to in...
ajibawa-2023/Python-Code-Large/train/row_89839
28
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89839:Import_L6_C0", "label": "os import os, sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0222, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89839:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89839:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89839:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89839:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89839:T...
from gobject import GObject, SIGNAL_RUN_FIRST, TYPE_NONE class PlayerIsDead (Exception): """ Used instead of returning a move, when an engine crashes, or a nonlocal player disconnects """ pass class TurnInterrupt (Exception): """ Used instead of returning a move, when a players turn is interupted....
ajibawa-2023/Python-Code-Large/train/row_89843
52
142
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89843:ImportFrom_L1_C0", "label": "from gobject import GObject, SIGNAL_RUN_FIRST, TYPE_NONE", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.007, 0, 0.66, 0.0, 90, 0, 3, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89843:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89843:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89843:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89843:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
from gobject import GObject, SIGNAL_RUN_FIRST from threading import Condition, Lock, RLock from pychess.System.Log import log from pychess.Players.Engine import Engine from pychess.Utils.const import * class ProtocolEngine (Engine): __gsignals__ = { "readyForOptions": (SIGNAL_RUN_FIRST, None, ()), ...
ajibawa-2023/Python-Code-Large/train/row_89844
19
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_89844:ImportFrom_L1_C0", "label": "from gobject import GObject, SIGNAL_RUN_FIRST", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 90, 0, 2, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "im...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89844:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89844:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89844:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89844:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
from Queue import Queue import gtk, gobject from pychess.Utils.const import * from pychess.Utils.Offer import Offer from pychess.System.Log import log from pychess.System import glock, conf from pychess.widgets.gamewidget import cur_gmwidg from Player import Player, PlayerIsDead, TurnInterrupt OFFER_MESSAGES = { ...
ajibawa-2023/Python-Code-Large/train/row_89846
139
280
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89846:ImportFrom_L1_C0", "label": "from Queue import Queue", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 952, 0, 1, 0, 0, 952, 0, 0], "semantic": {"name": "Queue", "arg_names": [], "import_names": ["Queue"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89846:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89846:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89846:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89846:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from pychess.System.Log import log from pychess.Utils.GameModel import GameModel from pychess.Utils.Offer import Offer from pychess.Utils.const import * from pychess.Players.Human import Human class ICGameModel (GameModel): def __init__ (self, connection, gameno, timemodel, variant, rated=False): Game...
ajibawa-2023/Python-Code-Large/train/row_89850
101
175
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89850:ImportFrom_L1_C0", "label": "from pychess.System.Log import log", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "pychess.System.Log", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89850:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89850:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89850:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89850:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...
from threading import RLock from gobject import * from time import time from pychess.Utils.const import * from pychess.Utils.Rating import Rating from pychess.System.Log import log import re types = "(?:blitz|standard|lightning|wild|bughouse|crazyhouse|suicide|losers|atomic)" rated = "(rated|unrated)" colors = "(?:\[...
ajibawa-2023/Python-Code-Large/train/row_89852
215
344
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89852:ImportFrom_L2_C0", "label": "from threading import RLock", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0058, 0.0029, 0, 0.66, 0.0, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["R...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89852:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89852:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89852:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89852:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-...
import re from gobject import * types = "(Blitz|Lightning|Standard)" days = "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)" months = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" AMOUNT_OF_NEWSITEMS = 5 FICS_SENDS = 10 class NewsManager (GObject): __gsignals__ = { 'readingNews' : (SIGNAL_RUN_FIRST, TYPE_NONE...
ajibawa-2023/Python-Code-Large/train/row_89853
34
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89853:Import_L2_C0", "label": "re import re", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.0185, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89853:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89853:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89853:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89853:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Cod...
import re from gobject import GObject, SIGNAL_RUN_FIRST from pychess.Utils.const import * from pychess.Utils.Offer import Offer from pychess.System.Log import log from pychess.ic.managers.GameListManager import convertName from GameListManager import variantToSeek, unsupportedWilds names = "\w+(?:\([A-Z\*]+\))*" r...
ajibawa-2023/Python-Code-Large/train/row_89855
129
231
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89855:Import_L2_C0", "label": "re import re", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0087, 0.0043, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89855:For_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89855:Assign_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89855:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89855:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from gobject import * sanmove = "([a-hxOoKQRBN0-8+#=-]{2,7})" class ErrorManager (GObject): __gsignals__ = { 'onCommandNotFound' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)), 'onAmbiguousMove' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)), 'onIllegalMove' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,))...
ajibawa-2023/Python-Code-Large/train/row_89857
18
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89857:ImportFrom_L2_C0", "label": "from gobject import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0333, 0, 0.66, 0.0, 90, 0, 1, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "import_names": ["*"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89857:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89857:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89857:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89857:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from gobject import * import threading import re from math import ceil import time from pychess.System.Log import log titles = "(?:\([A-Z*]+\))*" names = "([A-Za-z]+)"+titles titlesC = re.compile(titles) namesC = re.compile(names) CHANNEL_SHOUT = "shout" CHANNEL_CSHOUT = "cshout" class ChatManager (GObject): ...
ajibawa-2023/Python-Code-Large/train/row_89859
188
307
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89859:ImportFrom_L2_C0", "label": "from gobject import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0033, 0, 0.66, 0.0, 90, 0, 1, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "import_names": ["*"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89859:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89859:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89859:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89859:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Cod...
from gobject import * class AutoLogOutManager (GObject): __gsignals__ = { 'logOut': (SIGNAL_RUN_FIRST, None, ()) } def __init__ (self, connection): GObject.__init__(self) self.connection = connection self.connection.expect_line (self.onLogOut, "\*\*\*...
ajibawa-2023/Python-Code-Large/train/row_89860
11
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_89860:ImportFrom_L1_C0", "label": "from gobject import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 90, 0, 1, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "import_names": ["*"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89860:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89860:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89860:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89860:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La...
import socket from socket import SHUT_RDWR import webbrowser import re import gtk, gobject, sys from pychess.System.repeat import repeat_sleep from pychess.System.ThreadPool import pool from pychess.System import gstreamer, uistuff, glock from pychess.System.prefix import addDataPrefix from pychess.System import uist...
ajibawa-2023/Python-Code-Large/train/row_89862
157
203
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89862:Import_L1_C0", "label": "socket import socket", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89862:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89862:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89862:If_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89862:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
import socket import re, sre_constants from copy import copy from pychess.System.Log import log class Prediction: def __init__ (self, callback, *regexps): self.callback = callback self.regexps = [] self.hash = hash(callback) for regexp in regexps: self.hash ^= ...
ajibawa-2023/Python-Code-Large/train/row_89863
137
181
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89863:Import_L1_C0", "label": "socket import socket", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0055, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89863:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89863:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89863:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89863:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
import re from pychess.Utils.const import * import time import math from pychess.System import conf elemExpr = re.compile(r"([a-zA-Z])\s*([0-9\.,\s]*)\s+") spaceExpr = re.compile(r"[\s,]+") l = [] def parse(n, psize): yield "def f(c):" s = psize/size for cmd, points in n: pstr = ",".join(str(p*s)...
ajibawa-2023/Python-Code-Large/train/row_89865
73
122
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89865:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0082, 0.0082, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89865:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89865:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89865:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89865:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: UTF-8 -*- import os.path import time import codecs import gtk, pango, gobject from pychess.System import glock, uistuff from pychess.System.Log import log from pychess.System.Log import LOG_DEBUG, LOG_LOG, LOG_WARNING, LOG_ERROR from pychess.System.prefix import addDataPrefix def rawreplace(error): ...
ajibawa-2023/Python-Code-Large/train/row_89867
171
256
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89867:Import_L3_C0", "label": "os.path import os.path", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0117, 0.0039, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89867:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89867:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89867:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89867:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-...
import gtk.glade, os from pychess.System import conf from pychess.System import uistuff from pychess.System.prefix import addDataPrefix from random import randrange uistuff.cacheGladefile("tipoftheday.glade") class TipOfTheDay: @classmethod def _init (cls): cls.widgets = uistuff.GladeWidgets("tip...
ajibawa-2023/Python-Code-Large/train/row_89868
32
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_89868:Import_L1_C0", "label": "gtk.glade import gtk.glade, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0154, 0.0154, 0, 0.66, 0.0, 910, 0, 2, 0, 0, 910, 0, 0], "semantic": {"name": "gtk.glade", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89868:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89868:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89868:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89868:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-C...
import sys import time import math import gtk import gobject import cairo if sys.platform == 'win32': from pychess.System.WinRsvg import rsvg else: import rsvg from pychess.System.uistuff import addDataPrefix from pychess.System.repeat import repeat_sleep from pychess.System import glock MAX_FPS = 20 RAD_PS...
ajibawa-2023/Python-Code-Large/train/row_89869
56
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89869:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0141, 0.0141, 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_89869:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89869:ImportFrom_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89869:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89869:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" This module intends to work as glue between the gamemodel and the gamewidget taking care of stuff that is neither very offscreen nor very onscreen like bringing up dialogs and """ import math import gtk from pychess.Utils.Offer import Offer #from pychess.Utils.GameModel import GameModel #from pychess.Uti...
ajibawa-2023/Python-Code-Large/train/row_89870
186
292
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89870:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0068, 0.0103, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89870:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89870:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89870:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89870:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: UTF-8 -*- import gtk, gtk.gdk from gobject import * import threading from pychess.System.prefix import addDataPrefix from pychess.System.Log import log from pychess.Utils.Cord import Cord from pychess.Utils.Move import Move from pychess.Utils.const import * from pychess.Utils.logic import validate from ...
ajibawa-2023/Python-Code-Large/train/row_89871
413
555
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89871:Import_L3_C0", "label": "gtk import gtk, gtk.gdk", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0018, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "gtk.gd...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89871:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89871:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89871:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89871:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Cod...
from os import path import gtk import cairo from pychess.System.prefix import addDataPrefix, addUserCachePrefix CLEARPATH = addDataPrefix("glade/clear.png") surface = None def giveBackground (widget): widget.connect("expose_event", expose) widget.connect("style-set", newtheme) def expose (widget, event): ...
ajibawa-2023/Python-Code-Large/train/row_89872
47
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_89872:ImportFrom_L1_C0", "label": "from os import path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["path"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89872:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89872:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89872:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89872:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: UTF-8 -*- from math import ceil, pi, cos, sin from gtk import gdk import gtk, time, pango import cairo from pychess.System import glock from pychess.System.repeat import repeat_sleep from pychess.Utils.const import WHITE, BLACK class ChessClock (gtk.DrawingArea): def __init__(self): g...
ajibawa-2023/Python-Code-Large/train/row_89873
143
184
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89873:ImportFrom_L3_C0", "label": "from math import ceil, pi, cos\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0163, 0.0054, 0, 0.66, 0.0, 526, 0, 4, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89873:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89873:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89873:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89873:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Co...
from time import strftime, gmtime, localtime import random import gtk from gtk.gdk import keyval_from_name import pango import gobject from pychess.System import uistuff from BorderBox import BorderBox class ChatView (gtk.VPaned): __gsignals__ = { 'messageAdded' : (gobject.SIGNAL_RUN_FIRST, None, (str,st...
ajibawa-2023/Python-Code-Large/train/row_89874
97
135
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89874:ImportFrom_L1_C0", "label": "from time import strftime, gmtime, localtime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0074, 0, 0.66, 0.0, 654, 0, 3, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89874:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89874:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89874:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89874:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Cod...
import gtk class ImageMenu(gtk.EventBox): def __init__ (self, image, child): gtk.EventBox.__init__(self) self.add(image) self.subwindow = gtk.Window() self.subwindow.set_decorated(False) self.subwindow.set_resizable(False) self.subwindow.set_type_hint(gtk.gd...
ajibawa-2023/Python-Code-Large/train/row_89875
90
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89875:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0088, 0.0088, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89875:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89875:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89875:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89875:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import gtk, gtk.gdk from gobject import * from math import floor from BoardView import BoardView from pychess.Utils.const import * from pychess.Utils.Cord import Cord ALL = 0 class SetupBoard (gtk.EventBox): __gsignals__ = { 'cord_clicked' : (SIGNAL_RUN_FIRST, TYPE_NONE, (TYPE_PYOBJECT,)), } ...
ajibawa-2023/Python-Code-Large/train/row_89876
65
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89876:Import_L2_C0", "label": "gtk import gtk, gtk.gdk", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.023, 0.0115, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "gtk.gdk...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89876:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89876:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89876:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89876:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: UTF-8 -*- import sys from math import floor, ceil, pi from time import time, sleep from threading import Lock, RLock import gtk, gtk.gdk, cairo from gobject import * import pango from pychess.System import glock, conf, gstreamer from pychess.System.glock import glock_connect, glock_connect_after from p...
ajibawa-2023/Python-Code-Large/train/row_89877
829
1,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_89877:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0025, 0.0008, 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_89877:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89877:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89877:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89877:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Co...
import cairo import gtk from gtk import gdk from gobject import SIGNAL_RUN_FIRST, TYPE_NONE from pychess.System.prefix import addDataPrefix from pychess.System import glock from BorderBox import BorderBox class ChainVBox (gtk.VBox): """ Inspired by the GIMP chainbutton widget """ __gsignals__ = { 'cli...
ajibawa-2023/Python-Code-Large/train/row_89878
121
185
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89878:Import_L1_C0", "label": "cairo import cairo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 0, 0.66, 0.0, 747, 0, 1, 0, 0, 747, 0, 0], "semantic": {"name": "cairo", "arg_names": [], "import_names": ["cairo"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89878:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89878:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89878:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89878:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import math ceil = lambda f: int(math.ceil(f)) from gobject import * import gtk import cairo import pango line = 10 curve = 60 dotSmall = 14 dotLarge = 24 lineprc = 1/7. hpadding = 5 vpadding = 3 class SpotGraph (gtk.EventBox): __gsignals__ = { 'spotClicked' : (SIGNAL_RUN_FIRST, TYPE_NONE, (str,)) ...
ajibawa-2023/Python-Code-Large/train/row_89879
311
469
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89879:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89879:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89879:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89879:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89879:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Cod...
import os.path import gettext import locale from time import sleep from cStringIO import StringIO from operator import attrgetter from itertools import groupby import gtk from cairo import ImageSurface try: from gtksourceview import SourceBuffer from gtksourceview import SourceView from gtksourceview impo...
ajibawa-2023/Python-Code-Large/train/row_89881
362
557
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89881:Import_L1_C0", "label": "os.path import os.path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0018, 0.0018, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89881:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89881:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89881:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89881:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import time import gtk import gobject import pango from pychess.Utils.IconLoader import load_icon from pychess.System import uistuff from pychess.System.glock import glock_connect from pychess.widgets.ChatView import ChatView from pychess.widgets.pydock.PyDockTop import PyDockTop from pychess.widgets.pydock import NO...
ajibawa-2023/Python-Code-Large/train/row_89882
457
628
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89882:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0016, 0.0016, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89882:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89882:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89882:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89882:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Cod...
import os from xml.dom import minidom import gtk import gobject from pychess.System.prefix import addDataPrefix from PyDockLeaf import PyDockLeaf from PyDockComposite import PyDockComposite from ArrowButton import ArrowButton from HighlightArea import HighlightArea from __init__ import TopDock, DockLeaf, DockCompone...
ajibawa-2023/Python-Code-Large/train/row_89883
137
191
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89883:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 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_89883:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89883:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89883:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89883:Expr_L18_C8"}, {"f": "ajibawa-2023/Python-Co...
import gtk, cairo import gobject from OverlayWindow import OverlayWindow from __init__ import NORTH, EAST, SOUTH, WEST class ArrowButton (OverlayWindow): """ Leafs will connect to the drag-drop signal """ __gsignals__ = { 'dropped' : (gobject.SIGNAL_RUN_FIRST, None, (object,)), 'hovered'...
ajibawa-2023/Python-Code-Large/train/row_89884
80
108
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89884:Import_L1_C0", "label": "gtk import gtk, cairo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "cairo"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89884:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89884:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89884:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89884:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import os import re import sys import gtk import cairo if sys.platform == 'win32': from pychess.System.WinRsvg import rsvg else: import rsvg class OverlayWindow (gtk.Window): """ This class knows about being an overlaywindow and some svg stuff """ cache = {} # Class global self.cache for svgPat...
ajibawa-2023/Python-Code-Large/train/row_89885
82
127
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89885:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0079, 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_89885:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89885:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89885:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89885:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
import gtk, cairo from math import ceil as fceil ceil = lambda f: int(fceil(f)) from __init__ import NORTH, EAST, SOUTH, WEST, CENTER from OverlayWindow import OverlayWindow class HighlightArea (OverlayWindow): """ An entirely blue widget """ def __init__ (self, parent): OverlayWindow.__init__(s...
ajibawa-2023/Python-Code-Large/train/row_89886
46
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89886:Import_L1_C0", "label": "gtk import gtk, cairo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "cairo"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89886:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89886:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89886:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89886:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-La...
import sys import gtk from __init__ import DockComposite from __init__ import NORTH, EAST, SOUTH, WEST, CENTER class PyDockComposite (gtk.Alignment, DockComposite): def __init__ (self, position): gtk.Alignment.__init__(self, xscale=1, yscale=1) if position == NORTH or position == SOUTH: ...
ajibawa-2023/Python-Code-Large/train/row_89888
69
83
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_89888:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 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_89888:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89888:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89888:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89888:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...