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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from utemper_public import *
class cScreenImeges:
imagenes=[]
def getImagen(self, ruta):
for imagen in self.imagenes:
if (ruta == imagen[0]):
return imagen[1]
# no esta guardad... | ajibawa-2023/Python-Code-Large/train/row_80898 | 17 | 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_80898:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 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_80898:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80898:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80898:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80898:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
from __future__ import print_function
from wifi import Cell, Scheme
import os, os.path
import re
import subprocess, commands
from utemper_public import *
def save_resultados (wifi, conectado, internet, ip ):
file = open(FILE_WIFI, "w")
file.write(str(wifi)+"\n")
file.write(str(co... | ajibawa-2023/Python-Code-Large/train/row_80899 | 193 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80899:ImportFrom_L2_C0", "label": "from __future__ import print_function", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 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_80899:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80899:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80899:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80899:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import os, os.path
from utemper_public import *
class cUtemperLdr:
lastTimeReadLdr = 0
FILE_LDR = "/tmp/ldr.var"
def __init__(self):
gv.luz_OK = 0
gv.luzValor =0
log(0, "Init LDR OK")
def suceso (self):
if (time.time()-... | ajibawa-2023/Python-Code-Large/train/row_80900 | 25 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80900:Import_L4_C0", "label": "os import os, os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1212, 0.0303, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.path"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80900:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80900:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80900:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80900:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
import os
import socket
if os.name != "nt":
import fcntl
import struct
def get_interface_ip(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(s.fileno(), 0x8915, struct.pack('256s', ifname[:15]))[20:24])
def get_lan_ip():
ip = socket... | ajibawa-2023/Python-Code-Large/train/row_80901 | 16 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80901:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80901:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80901:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80901:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80901:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_809... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_2:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUtemperSceenImagen=None
screen = None
def __init__(self, s... | ajibawa-2023/Python-Code-Large/train/row_80902 | 47 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80902:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0147, 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_80902:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80902:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80902:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80902:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python3
#Copyright (c) 2010 Dimitris Leventeas <mydimle@gmail.com>
#Permission is hereby granted, free of charge, to any person
#obtaining a copy of this software and associated documentation
#files (the "Software"), to deal in the Software without
#restriction, including without limitation the rights ... | ajibawa-2023/Python-Code-Large/train/row_80904 | 40 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80904:ImportFrom_L26_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3059, 0.0118, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80904:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80904:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80904:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80904:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import sys
import time, datetime, os
import RPi.GPIO as GPIO
from utemper_public import *
class cCheck_temperatura:
lastTimeCheckCalefa=0
RELE_FILE="/tmp/rele.var"
FOLER_PROGRA = "config/"
tiempo_rele = 0
dia_horarios = -1
horarios=[]
Pin_RELE=0
def __init__(self)... | ajibawa-2023/Python-Code-Large/train/row_80905 | 99 | 131 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80905:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0229, 0.0076, 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_80905:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80905:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80905:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80905:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time, datetime
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_0:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
Sombra_Color = (120,120,120)
Letra_top = None
... | ajibawa-2023/Python-Code-Large/train/row_80906 | 117 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80906:Import_L4_C0", "label": "time import time, datetime", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0253, 0.0063, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "d... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80906:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80906:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80906:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80906:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, time
import xml.etree.ElementTree as ET
import socket
import os, os.path, subprocess
from uuid import getnode as get_mac
from utemper_public import *
class cCheck_estados:
flie_config_wifi = "/tmp/wifi.var"
file_watchdog = "/tmp/file_watchd... | ajibawa-2023/Python-Code-Large/train/row_80907 | 94 | 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_80907:Import_L3_C0", "label": "urllib import urllib, urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0246, 0.0082, 0, 0.66, 0.0, 614, 0, 3, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80907:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80907:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80907:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80907:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import os, os.path
import shutil
import subprocess
from utemper_public import *
class cUtemperCheckIp:
lastTimeScan = 0
status =0
modeSaveConfig = 0
vSubprocess = None
FILE_CONF_LIST = "config/list_Mac.txt"
FILE_TMP_LIST = "/tmp/ip_scan_list.txt"... | ajibawa-2023/Python-Code-Large/train/row_80908 | 72 | 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_80908:Import_L4_C0", "label": "os import os, os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0388, 0.0097, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.path"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80908:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80908:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80908:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80908:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_4:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUtemperSceenImagen=None
screen = None
def __init__(self, s... | ajibawa-2023/Python-Code-Large/train/row_80909 | 37 | 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_80909:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.0185, 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_80909:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80909:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80909:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80909:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
### BEGIN LICENSE
#Copyright (c) 2009 Eugene Kaznacheev <qetzal@gmail.com>
#Copyright (c) 2013 Joshua Tasker <jtasker@gmail.com>
#Permission is hereby granted, free of charge, to any person
#obtaining a copy of this software and associated documentation
#files (the "Software")... | ajibawa-2023/Python-Code-Large/train/row_80910 | 524 | 1,053 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80910:Expr_L29_C0", "label": "expression", "type": "expression", "loc": [29, 29], "level": 0, "parent": null, "vector": [8, 0, 0.0275, 0.0009, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80910:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80910:ImportFrom_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80910:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80910:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_4:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUtemperSceenImagen=None
screen = None
def __init__(self, s... | ajibawa-2023/Python-Code-Large/train/row_80911 | 37 | 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_80911:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.0185, 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_80911:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80911:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80911:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80911:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import sys
import time, os
import shutil
import os.path
# -----------
# Constantes
# -----------
LOGS_DEBUG_LEVEL= -1
LOGS_FILE= "/var/utemp/logs.log"
# gris \033[91m
LOGS_COLORES= ['\033[94m','\033[0m', '\033[92m', '\033[93m','\033[91m','\033[93m']
LOGS_ENDC ='\033[0m'
def log(nivel, text):
... | ajibawa-2023/Python-Code-Large/train/row_80912 | 126 | 192 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80912:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0052, 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_80912:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80912:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80912:If_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80912:Return_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
import os
import socket
if os.name != "nt":
import fcntl
import struct
def get_interface_ip(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(s.fileno(), 0x8915, struct.pack('256s', ifname[:15]))[20:24])
def get_lan_ip():
ip = socket... | ajibawa-2023/Python-Code-Large/train/row_80913 | 16 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80913:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80913:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80913:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80913:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80913:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_809... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import os, os.path
import shutil
import subprocess
from utemper_public import *
class cUtemperCheckIp:
lastTimeScan = 0
status =0
modeSaveConfig = 0
vSubprocess = None
FILE_CONF_LIST = "config/list_Mac.txt"
FILE_TMP_LIST = "/tmp/ip_scan_list.txt"... | ajibawa-2023/Python-Code-Large/train/row_80914 | 72 | 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_80914:Import_L4_C0", "label": "os import os, os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0388, 0.0097, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.path"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80914:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80914:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80914:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80914:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, time
import xml.etree.ElementTree as ET
import socket
import os, os.path, subprocess
from uuid import getnode as get_mac
from utemper_public import *
class cCheck_estados:
flie_config_wifi = "/tmp/wifi.var"
file_watchdog = "/tmp/file_watchd... | ajibawa-2023/Python-Code-Large/train/row_80915 | 94 | 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_80915:Import_L3_C0", "label": "urllib import urllib, urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0246, 0.0082, 0, 0.66, 0.0, 614, 0, 3, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80915:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80915:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80915:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80915:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import os, os.path
from utemper_public import *
class cUtemperLdr:
lastTimeReadLdr = 0
FILE_LDR = "/tmp/ldr.var"
def __init__(self):
gv.luz_OK = 0
gv.luzValor =0
log(0, "Init LDR OK")
def suceso (self):
if (time.time()-... | ajibawa-2023/Python-Code-Large/train/row_80916 | 25 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80916:Import_L4_C0", "label": "os import os, os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1212, 0.0303, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.path"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80916:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80916:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80916:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80916:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
import urllib2, time
import glob, os
import xml.etree.ElementTree as ET
from utemper_public import *
class eltiempo:
# tiempo
WOEID=0
CONF_FILE= "config/utemper.conf"
WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0'
lastTimeTiempo = 0
#temp:
temp = False
lastTimeTemp = 0
sens... | ajibawa-2023/Python-Code-Large/train/row_80917 | 101 | 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_80917:Import_L3_C0", "label": "urllib2 import urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0076, 0, 0.66, 0.0, 345, 0, 2, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urll... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80917:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80917:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80917:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80917:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import time, os
import utemper_tiempo
from utemper_public import *
import utemper_screen
import utemper_check_estados
import utemper_InterfaceServer
import utemper_check_temperatura
import utemper_report
import utemper_Scan_Ips
import utemper_ldr
#import utemper_wifi
... | ajibawa-2023/Python-Code-Large/train/row_80918 | 45 | 66 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80918:Import_L5_C0", "label": "time import time, os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0758, 0.0152, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80918:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80918:Assign_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80918:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80918:Assign_L25_C1"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
import socket
import datetime
import utemper_ipAddress
import psutil
class cScreen_5:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUt... | ajibawa-2023/Python-Code-Large/train/row_80919 | 64 | 92 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80919:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0109, 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_80919:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80919:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80919:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80919:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_1:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
Letra_temp2 = None
cUtemperSceenImagen=None
screen = None
... | ajibawa-2023/Python-Code-Large/train/row_80920 | 48 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80920:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0571, 0.0143, 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_80920:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80920:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80920:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80920:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import urllib, urllib2, time
import xml.etree.ElementTree as ET
import socket
import os, os.path
import subprocess
from uuid import getnode as get_mac
from utemper_public import *
class cInterfaceServer:
folder_send_files = "config/send/"
maxTimeSendStatus = 5
maxTimeSendFromServer... | ajibawa-2023/Python-Code-Large/train/row_80921 | 118 | 161 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80921:Import_L3_C0", "label": "urllib import urllib, urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0186, 0.0062, 0, 0.66, 0.0, 614, 0, 3, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80921:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80921:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80921:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80921:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from time import sleep
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(15, GPIO.IN)
while True:
if ( GPIO.input(15) == 0 ):
sleep(2);
if ( GPIO.input(15) == 0 ):
os.system(' echo "boton pulsado apagamos todo el sistema" | wall')
sleep(0.2)
os.system('shutdown -h now')
... | ajibawa-2023/Python-Code-Large/train/row_80922 | 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_80922:ImportFrom_L1_C0", "label": "from time import sleep", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["sleep"], "rhs... | [] |
#!/usr/bin/python
from __future__ import print_function
from wifi import Cell, Scheme
import os, os.path
import re
import subprocess, commands
from utemper_public import *
def save_resultados (wifi, conectado, internet, ip ):
file = open(FILE_WIFI, "w")
file.write(str(wifi)+"\n")
file.write(str(co... | ajibawa-2023/Python-Code-Large/train/row_80923 | 193 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80923:ImportFrom_L2_C0", "label": "from __future__ import print_function", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 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_80923:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80923:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80923:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80923:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
"""
This module provides a temperature sensor of type w1 therm.
"""
__version__ = "0.02.01"
__author__ = "Timo Furrer"
__email__ = "tuxtimo@gmail.com"
from os import path, listdir, system
from glob import glob
from time import sleep
class W1ThermSensorError(Exception):
"""Exception ... | ajibawa-2023/Python-Code-Large/train/row_80924 | 108 | 160 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80924:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.025, 0.0187, 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_80924:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80924:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80924:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80924:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xively
import datetime
import time
from utemper_public import *
class calssReport:
old_time = 0
time_lastUpdate = 0
oldValores=[-1,-1,-1,-1]
inicio = 0
# Variables personales
FEED_ID="1844265561"
API_KEY="3QTvK8CwHnYoJmHsp2OiVdrwE1NE... | ajibawa-2023/Python-Code-Large/train/row_80925 | 53 | 75 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80925:Import_L4_C0", "label": "xively import xively", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0533, 0.0133, 0, 0.66, 0.0, 442, 0, 1, 0, 0, 442, 0, 0], "semantic": {"name": "xively", "arg_names": [], "import_names": ["xively"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80925:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80925:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80925:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80925:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
import sys
import time, datetime, os
import RPi.GPIO as GPIO
from utemper_public import *
class cCheck_temperatura:
lastTimeCheckCalefa=0
RELE_FILE="/tmp/rele.var"
FOLER_PROGRA = "config/"
tiempo_rele = 0
dia_horarios = -1
horarios=[]
Pin_RELE=0
def __init__(self)... | ajibawa-2023/Python-Code-Large/train/row_80926 | 99 | 131 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80926:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0229, 0.0076, 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_80926:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80926:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80926:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80926:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from utemper_public import *
class cScreenImeges:
imagenes=[]
def getImagen(self, ruta):
for imagen in self.imagenes:
if (ruta == imagen[0]):
return imagen[1]
# no esta guardad... | ajibawa-2023/Python-Code-Large/train/row_80927 | 17 | 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_80927:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 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_80927:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80927:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80927:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80927:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import os
import glob
import time
#Init del programa.
os.system('echo $(date +"%F_%T")";0;READ_TEMP;Init read_temp.py">>/var/utemp/logs.log')
os.system('modprobe w1-gpio')
os.system('modprobe w1-therm')
os.system('echo $(date +"%F_%T")";0;READ_TEMP;modulos w1-gpio y w1-therm OK">>/var/utemp/logs.log')
base_dir =... | ajibawa-2023/Python-Code-Large/train/row_80928 | 18 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80928:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 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_80928:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80928:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80928:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80928:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
#Google.
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import atom
import getopt
import sys, os
import string
import time, datetime
from time import sleep
#Rele.
import ... | ajibawa-2023/Python-Code-Large/train/row_80929 | 104 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80929:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0348, 0.0253, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80929:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80929:ImportFrom_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80929:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80929:ImportFrom_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
import subprocess
import re
import time
import datetime
import pygal
import gspread
import os, sys
# ===========================================================================
# Read Temp
# ===========================================================================
class ClassTemp:
def __i... | ajibawa-2023/Python-Code-Large/train/row_80930 | 48 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80930:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0441, 0.0147, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80930:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80930:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80930:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80930:Assign_L17_C6"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
import subprocess
import re
import time
import datetime
import pygal
import gspread
import os, sys
# ===========================================================================
# Read Temp
# ===========================================================================
class ClassTemp:
def __i... | ajibawa-2023/Python-Code-Large/train/row_80931 | 48 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80931:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0441, 0.0147, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80931:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80931:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80931:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80931:Assign_L17_C6"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
import getopt
import sys, os
import string
import time, datetime
from time import sleep
import temperature
import report
import TiemposCalendar
#Rele and led.
import RPi.GPIO as GPIO
class ClassRele:
RELE = 7
def __init__(self):
self.statusRele=GPIO.HIGH
self.lastTime=0
... | ajibawa-2023/Python-Code-Large/train/row_80932 | 70 | 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_80932:Import_L2_C0", "label": "getopt import getopt", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0194, 0.0097, 0, 0.66, 0.0, 588, 0, 1, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80932:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80932:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80932:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80932:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python
#Google.
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import atom
import getopt
import sys, os
import string, re
import time, datetime
class classHorrarios:
def _... | ajibawa-2023/Python-Code-Large/train/row_80933 | 45 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80933:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0821, 0.0597, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80933:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80933:ImportFrom_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80933:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80933:ImportFrom_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
import getopt
import sys, os
import string
import time, datetime
from time import sleep
import temperature
import report
import TiemposCalendar
#Rele and led.
import RPi.GPIO as GPIO
class ClassRele:
RELE = 7
def __init__(self):
self.statusRele=GPIO.HIGH
self.lastTime=0
... | ajibawa-2023/Python-Code-Large/train/row_80935 | 70 | 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_80935:Import_L2_C0", "label": "getopt import getopt", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0194, 0.0097, 0, 0.66, 0.0, 588, 0, 1, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80935:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80935:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80935:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80935:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python
#Google.
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import atom
import getopt
import sys, os
import string, re
import time, datetime
class classHorrarios:
def _... | ajibawa-2023/Python-Code-Large/train/row_80936 | 45 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80936:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0821, 0.0597, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80936:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80936:ImportFrom_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80936:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80936:ImportFrom_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
#Google.
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import atom
import getopt
import sys, os
import string
import time, datetime
from time import sleep
#Rele.
import ... | ajibawa-2023/Python-Code-Large/train/row_80937 | 104 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80937:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0348, 0.0253, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80937:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80937:ImportFrom_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80937:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80937:ImportFrom_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
from __future__ import generators
import sys, re
import wikipedia, pagegenerators, catlib, config
import urllib, time, random, string
site=wikipedia.getSite()
while 1:
salida=u"{| style='background-color: #white; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 100%; border: 0px solid #DCDCDC; text-a... | ajibawa-2023/Python-Code-Large/train/row_80938 | 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_80938:Import_L1_C0", "label": "sys import sys, re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "re"], "rhs_call... | [] |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | ajibawa-2023/Python-Code-Large/train/row_80939 | 38 | 74 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80939:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80939:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80939:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80939:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80939:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import os
import tempfile
import sys
import subprocess
if len(sys.argv) != 4:
print "Usage: manhandle.py [libwhatever.a] [prefix] [objcopy binary path]"
sys.exit()
print "Mangling Symbols in " + sys.argv[1]
print "Prefixing with " + sys.argv[2]
print "Using objcopy " + sys.argv[3]
proc = subprocess.Po... | ajibawa-2023/Python-Code-Large/train/row_80940 | 27 | 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_80940:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 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_80940:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80940:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80940:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80940:Expr_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80940:F... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| ajibawa-2023/Python-Code-Large/train/row_80941 | 10 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80941:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [] |
import os, sys
from setuptools import find_packages, setup
from albus import __version__
if sys.version_info < (2,6):
raise NotImplementedError("albus requires Python 2.6 or later")
setup(
name = "albus",
version = __version__,
description = "Albus RPC Library",
long_description = file(
os... | ajibawa-2023/Python-Code-Large/train/row_80942 | 5 | 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_80942:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
class ServiceNotLocatedException(Exception):
def __init__(self, method):
self.method = method
def __str__(self):
return repr(self.method)
class ServiceLocator(object):
"""An abstract interface to locate service URI from method.
This class isn't needed in fact... | ajibawa-2023/Python-Code-Large/train/row_80943 | 27 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80943:ClassDef_L3_C0", "label": "ServiceNotLocatedException", "type": "class", "loc": [3, 8], "level": 0, "parent": null, "vector": [3, 0, 0.117, 0.1277, 0, 0.66, 0.0, 240, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "ServiceNotLocatedException", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80943:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80943:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80943:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80943:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
from mustaine.client import HessianProxy
from mustaine.protocol import Object
class AlbusError(Exception):
def __init__(self, code, message, stack):
self.code = code
self.message = message
self.stack = stack
def __str__(self):
msg = u'< code:%s, messag... | ajibawa-2023/Python-Code-Large/train/row_80944 | 27 | 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_80944:ImportFrom_L3_C0", "label": "from mustaine.client import HessianProxy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "mustaine.client", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80944:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80944:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80944:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80944:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
version_info = (0, 1, 6)
__version__ = ".".join(map(str, version_info))
| ajibawa-2023/Python-Code-Large/train/row_80945 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80945:Assign_L1_C0", "label": "version_info =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 342, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "version_info", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
from albus.client import AlbusClient
from albus.client import AlbusError
from albus.client import albus_method
from albus.locator import WildcardLocator
from albus.locator import RegexLocator
class DemoBusClient(AlbusClient):
@albus_method('SPL_001')
def echo(self, text):
pass
... | ajibawa-2023/Python-Code-Large/train/row_80946 | 15 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80946:ImportFrom_L3_C0", "label": "from albus.client import AlbusClient", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 566, 0, 1, 0, 0, 566, 0, 0], "semantic": {"name": "albus.client", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80946:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80946:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80946:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80946:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-... |
import os, sys
from setuptools import find_packages, setup
from albus import __version__
if sys.version_info < (2,6):
raise NotImplementedError("albus requires Python 2.6 or later")
setup(
name = "albus",
version = __version__,
description = "Albus RPC Library",
long_description = file(
os... | ajibawa-2023/Python-Code-Large/train/row_80947 | 5 | 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_80947:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
class ServiceNotLocatedException(Exception):
def __init__(self, method):
self.method = method
def __str__(self):
return repr(self.method)
class ServiceLocator(object):
"""An abstract interface to locate service URI from method.
This class isn't needed in fact... | ajibawa-2023/Python-Code-Large/train/row_80948 | 27 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80948:ClassDef_L3_C0", "label": "ServiceNotLocatedException", "type": "class", "loc": [3, 8], "level": 0, "parent": null, "vector": [3, 0, 0.117, 0.1277, 0, 0.66, 0.0, 240, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "ServiceNotLocatedException", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80948:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80948:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80948:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80948:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
from mustaine.client import HessianProxy
from mustaine.protocol import Object
class AlbusError(Exception):
def __init__(self, code, message, stack):
self.code = code
self.message = message
self.stack = stack
def __str__(self):
msg = u'< code:%s, messag... | ajibawa-2023/Python-Code-Large/train/row_80949 | 27 | 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_80949:ImportFrom_L3_C0", "label": "from mustaine.client import HessianProxy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "mustaine.client", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80949:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80949:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80949:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80949:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
version_info = (0, 1, 6)
__version__ = ".".join(map(str, version_info))
| ajibawa-2023/Python-Code-Large/train/row_80950 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80950:Assign_L1_C0", "label": "version_info =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 342, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "version_info", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
from albus.client import AlbusClient
from albus.client import AlbusError
from albus.client import albus_method
from albus.locator import WildcardLocator
from albus.locator import RegexLocator
class DemoBusClient(AlbusClient):
@albus_method('SPL_001')
def echo(self, text):
pass
... | ajibawa-2023/Python-Code-Large/train/row_80951 | 15 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80951:ImportFrom_L3_C0", "label": "from albus.client import AlbusClient", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 566, 0, 1, 0, 0, 566, 0, 0], "semantic": {"name": "albus.client", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80951:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80951:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80951:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80951:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-... |
import os, sys
from setuptools import find_packages, setup
from albus import __version__
if sys.version_info < (2,6):
raise NotImplementedError("albus requires Python 2.6 or later")
setup(
name = "albus",
version = __version__,
description = "Albus RPC Library",
long_description = file(
os... | ajibawa-2023/Python-Code-Large/train/row_80952 | 5 | 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_80952:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
class ServiceNotLocatedException(Exception):
def __init__(self, method):
self.method = method
def __str__(self):
return repr(self.method)
class ServiceLocator(object):
"""An abstract interface to locate service URI from method.
This class isn't needed in fact... | ajibawa-2023/Python-Code-Large/train/row_80953 | 27 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80953:ClassDef_L3_C0", "label": "ServiceNotLocatedException", "type": "class", "loc": [3, 8], "level": 0, "parent": null, "vector": [3, 0, 0.117, 0.1277, 0, 0.66, 0.0, 240, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "ServiceNotLocatedException", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80953:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80953:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80953:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80953:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
from mustaine.client import HessianProxy
from mustaine.protocol import Object
class AlbusError(Exception):
def __init__(self, code, message, stack):
self.code = code
self.message = message
self.stack = stack
def __str__(self):
msg = u'< code:%s, messag... | ajibawa-2023/Python-Code-Large/train/row_80954 | 27 | 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_80954:ImportFrom_L3_C0", "label": "from mustaine.client import HessianProxy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "mustaine.client", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80954:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80954:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80954:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80954:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
version_info = (0, 1, 6)
__version__ = ".".join(map(str, version_info))
| ajibawa-2023/Python-Code-Large/train/row_80955 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80955:Assign_L1_C0", "label": "version_info =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 342, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "version_info", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
from albus.client import AlbusClient
from albus.client import AlbusError
from albus.client import albus_method
from albus.locator import WildcardLocator
from albus.locator import RegexLocator
class DemoBusClient(AlbusClient):
@albus_method('SPL_001')
def echo(self, text):
pass
... | ajibawa-2023/Python-Code-Large/train/row_80956 | 15 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80956:ImportFrom_L3_C0", "label": "from albus.client import AlbusClient", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 566, 0, 1, 0, 0, 566, 0, 0], "semantic": {"name": "albus.client", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80956:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80956:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80956:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80956:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-... |
import os, sys
from setuptools import find_packages, setup
from albus import __version__
if sys.version_info < (2,6):
raise NotImplementedError("albus requires Python 2.6 or later")
setup(
name = "albus",
version = __version__,
description = "Albus RPC Library",
long_description = file(
os... | ajibawa-2023/Python-Code-Large/train/row_80957 | 5 | 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_80957:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
class ServiceNotLocatedException(Exception):
def __init__(self, method):
self.method = method
def __str__(self):
return repr(self.method)
class ServiceLocator(object):
"""An abstract interface to locate service URI from method.
This class isn't needed in fact... | ajibawa-2023/Python-Code-Large/train/row_80958 | 27 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80958:ClassDef_L3_C0", "label": "ServiceNotLocatedException", "type": "class", "loc": [3, 8], "level": 0, "parent": null, "vector": [3, 0, 0.117, 0.1277, 0, 0.66, 0.0, 240, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "ServiceNotLocatedException", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80958:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80958:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80958:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80958:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
from mustaine.client import HessianProxy
from mustaine.protocol import Object
class AlbusError(Exception):
def __init__(self, code, message, stack):
self.code = code
self.message = message
self.stack = stack
def __str__(self):
msg = u'< code:%s, messag... | ajibawa-2023/Python-Code-Large/train/row_80959 | 27 | 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_80959:ImportFrom_L3_C0", "label": "from mustaine.client import HessianProxy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "mustaine.client", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80959:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80959:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80959:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80959:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
version_info = (0, 1, 6)
__version__ = ".".join(map(str, version_info))
| ajibawa-2023/Python-Code-Large/train/row_80960 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80960:Assign_L1_C0", "label": "version_info =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 342, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "version_info", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
from albus.client import AlbusClient
from albus.client import AlbusError
from albus.client import albus_method
from albus.locator import WildcardLocator
from albus.locator import RegexLocator
class DemoBusClient(AlbusClient):
@albus_method('SPL_001')
def echo(self, text):
pass
... | ajibawa-2023/Python-Code-Large/train/row_80961 | 15 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80961:ImportFrom_L3_C0", "label": "from albus.client import AlbusClient", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 566, 0, 1, 0, 0, 566, 0, 0], "semantic": {"name": "albus.client", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80961:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80961:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80961:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80961:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-... |
import os, sys
from setuptools import find_packages, setup
from albus import __version__
if sys.version_info < (2,6):
raise NotImplementedError("albus requires Python 2.6 or later")
setup(
name = "albus",
version = __version__,
description = "Albus RPC Library",
long_description = file(
os... | ajibawa-2023/Python-Code-Large/train/row_80962 | 5 | 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_80962:Import_L1_C0", "label": "os import os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
class ServiceNotLocatedException(Exception):
def __init__(self, method):
self.method = method
def __str__(self):
return repr(self.method)
class ServiceLocator(object):
"""An abstract interface to locate service URI from method.
This class isn't needed in fact... | ajibawa-2023/Python-Code-Large/train/row_80963 | 27 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80963:ClassDef_L3_C0", "label": "ServiceNotLocatedException", "type": "class", "loc": [3, 8], "level": 0, "parent": null, "vector": [3, 0, 0.117, 0.1277, 0, 0.66, 0.0, 240, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "ServiceNotLocatedException", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80963:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80963:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80963:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80963:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
from mustaine.client import HessianProxy
from mustaine.protocol import Object
class AlbusError(Exception):
def __init__(self, code, message, stack):
self.code = code
self.message = message
self.stack = stack
def __str__(self):
msg = u'< code:%s, messag... | ajibawa-2023/Python-Code-Large/train/row_80964 | 27 | 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_80964:ImportFrom_L3_C0", "label": "from mustaine.client import HessianProxy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "mustaine.client", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80964:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80964:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80964:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80964:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code... |
version_info = (0, 1, 6)
__version__ = ".".join(map(str, version_info))
| ajibawa-2023/Python-Code-Large/train/row_80965 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80965:Assign_L1_C0", "label": "version_info =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 342, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "version_info", "arg_names": [], "import_names": [], "rhs_ca... | [] |
# -*- coding: utf-8 -*-
from albus.client import AlbusClient
from albus.client import AlbusError
from albus.client import albus_method
from albus.locator import WildcardLocator
from albus.locator import RegexLocator
class DemoBusClient(AlbusClient):
@albus_method('SPL_001')
def echo(self, text):
pass
... | ajibawa-2023/Python-Code-Large/train/row_80966 | 15 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80966:ImportFrom_L3_C0", "label": "from albus.client import AlbusClient", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 566, 0, 1, 0, 0, 566, 0, 0], "semantic": {"name": "albus.client", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80966:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80966:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80966:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80966:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_80967 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80967:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80967:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80967:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80967:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80967:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
import re
class RenrenUrlAssemblerBase:
""" Assemble some interesting URL of Renren.
Base class of RenRen Url Assembler.In this class, a legal renren url will be parsed and some necessary parameters will be extracted for further use.
You may not want to instantiate this class directly, derive ... | ajibawa-2023/Python-Code-Large/train/row_80968 | 83 | 126 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80968:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0079, 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_80968:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80968:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80968:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80968:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
import re
class RenrenUrlAssemblerBase:
""" Assemble some interesting URL of Renren.
Base class of RenRen Url Assembler.In this class, a legal renren url will be parsed and some necessary parameters will be extracted for further use.
You may not want to instantiate this class directly, derive ... | ajibawa-2023/Python-Code-Large/train/row_80969 | 83 | 126 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80969:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0079, 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_80969:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80969:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80969:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80969:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_80970 | 133 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80970:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80970:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80970:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80970:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80970:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_80971 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80971:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80971:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80971:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80971:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80971:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_80973 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80973:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80973:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80973:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80973:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80973:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_80975 | 86 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80975:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80975:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80975:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80975:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80975:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_80977 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80977:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80977:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80977:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80977:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80977:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80978 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80978:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80978:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80978:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80978:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80978:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80980 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80980:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80980:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80980:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80980:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80980:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80981 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80981:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80981:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80981:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80981:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80981:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80982 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80982:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80982:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80982:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80982:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80982:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80983 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80983:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80984 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80984:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80984:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80984:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80984:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80984:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_80986 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80986:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80986:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80986:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80986:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80986:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80987 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80987:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80987:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80987:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80987:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80987:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80988 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80988:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80988:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80988:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80988:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80988:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80989 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80989:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80989:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80989:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80989:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80989:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80991 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80991:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80991:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80991:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80991:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80991:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80993 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80993:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80993:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80993:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80993:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80993:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80994 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80994:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80994:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80994:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80994:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80994:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80995 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80995:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_80996 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80996:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80996:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80996:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80996:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80996:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_80997 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80997:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80997:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80997:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80997:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80997:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_80998 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80998:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80998:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80998:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80998:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80998:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_81000 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81000:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81000:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81000:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81000:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81000:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_81001 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81001:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81001:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81001:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81001:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81001:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_81002 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81002:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81002:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81002:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81002:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81002:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_81003 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81003:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81003:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81003:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81003:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81003:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_81004 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81004:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81004:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81004:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81004:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81004:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_81006 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81006:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81006:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81006:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81006:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81006:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
'''
Created on July 1, 2011
@author: ppa
'''
from setuptools import setup
from setupCommand import TestCommand, CleanCommand
version = '1.0.1'
setup(name='ultrafinance',
version=version,
description="python project for finance: realtime data collection, analyze, algorithmic trading",
l... | ajibawa-2023/Python-Code-Large/train/row_81007 | 5 | 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_81007:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0698, 0.1163, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
'''
Created on Dec 18, 2010
@author: ppa
'''
from ultrafinance.processChain.baseModule import BaseModule
from matplotlib import pyplot
from datetime import datetime
import pylab
import logging
LOG = logging.getLogger(__name__)
class PlotStockOutputer(BaseModule):
''' Default feeder '''
def __i... | ajibawa-2023/Python-Code-Large/train/row_81008 | 21 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81008:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0938, 0.1562, 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_81008:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81008:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81008:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81008:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.