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 -*- """`cssmin` - A Python port of the YUI CSS compressor.""" """ Home page: https://github.com/zacharyvoase/cssmin License: BSD: https://github.com/zacharyvoase/cssmin/blob/master/LICENSE Original author: Zachary Voase Modified for inclusion into web2py by: Ross Peoples <ros...
ajibawa-2023/Python-Code-Large/train/row_502
129
231
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_502:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0173, 0.0043, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_502:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_502:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_502:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_502:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ High-level CSS and JS minification class for web2py. Called by response.include_files() Created by: Ross Peoples <ross.peoples@gmail.com> Modified by: Massimo Di Pierro <massimo.dipierro@gmail.com> """ import cssmin import jsmin import os import hashlib import re de...
ajibawa-2023/Python-Code-Large/train/row_503
86
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_503:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.042, 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_503:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_503:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_503:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_503:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# coding: utf-8 import re def minify(response): def _replace(match): match = match.group() # save whole <pre>, <textarea> tags, and opening <!-- (so it doesn't break <script>) # otherwise, replace all whitespace with a single space character return match if match.startswith(('<pre...
ajibawa-2023/Python-Code-Large/train/row_504
7
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_504:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0667, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_504:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_504:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_504:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_504:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # -*- coding: ascii -*- # # Copyright 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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/...
ajibawa-2023/Python-Code-Large/train/row_505
127
391
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_505:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 56], "level": 0, "parent": null, "vector": [8, 0, 0.0946, 0.0997, 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_505:FunctionDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_505:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_505:FunctionDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_505:If_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
"""Simple AES cipher implementation in pure Python following PEP-272 API Homepage: https://bitbucket.org/intgr/pyaes/ The goal of this module is to be as fast as reasonable in Python while still being Pythonic and readable/understandable. It is licensed under the permissive MIT license. Hopefully the code is readabl...
ajibawa-2023/Python-Code-Large/train/row_506
190
502
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_506:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0269, 0.0518, 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_506:FunctionDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_506:If_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_506:If_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_506:Return_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_50...
SMSCODES = { 'Aliant': '@chat.wirefree.ca', 'Alltel': '@message.alltel.com', 'Ameritech': '@paging.acswireless.com', 'AT&T': '@txt.att.net', 'AU by KDDI': '@ezweb.ne.jp', 'BeeLine GSM': '@sms.beemail.ru', 'Bell Mobility Canada': '@txt.bellmobility.ca', 'Bellsouth': '@bellsouth.cl', '...
ajibawa-2023/Python-Code-Large/train/row_507
12
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_507:Assign_L1_C0", "label": "SMSCODES =", "type": "assigned_variable", "loc": [1, 100], "level": 0, "parent": null, "vector": [14, 0, 0.4391, 0.8696, 0, 0.66, 0.0, 606, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "SMSCODES", "arg_names": [], "import_names": [], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_507:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_507:Expr_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_507:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_507:Import_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Developed by 616d41631bff906704951934ffe4015e Released under web2py license because includes gluon/cache.py source code """ import redis from redis.exceptions import ConnectionError from gluon import current from gluon.cache import CacheAbstract import cPickle as pickle import time import re import logging import ...
ajibawa-2023/Python-Code-Large/train/row_508
104
170
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_508:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0147, 0.0235, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_508:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_508:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_508:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_508:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Creates a taskbar icon for web2py # # Author: Mark Larsen, mostly stolen from Mark Hammond's # # C:\Python25\Lib\site-packages\win32\Demos\win32gui_taskbar.py # # 11/7/08 # dual licensed under the web2py license (LGPL) and the Python license. import os import sys imp...
ajibawa-2023/Python-Code-Large/train/row_510
112
243
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_510:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.0041, 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_510:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_510:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_510:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_510:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" PyRSS2Gen - A Python library for generating RSS 2.0 feeds. (This is the BSD license, based on the template at http://www.opensource.org/licenses/bsd-license.php ) Copyright (c) 2003, Dalke Scientific Software, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modific...
ajibawa-2023/Python-Code-Large/train/row_512
277
522
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_512:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 39], "level": 0, "parent": null, "vector": [8, 0, 0.0383, 0.0747, 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_512:If_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_512:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_512:If_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_512:ImportFrom_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_512...
#!/usr/bin/env python # -*- coding: latin-1 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your option) any later # version. # # This program is distributed ...
ajibawa-2023/Python-Code-Large/train/row_514
281
510
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_514:Expr_L13_C0", "label": "expression", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0255, 0.002, 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_514:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_514:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_514:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_514:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python # -*- coding: utf-8 -*- "PySimpleSOAP" import client import server import simplexml import transport
ajibawa-2023/Python-Code-Large/train/row_516
5
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_516:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.4286, 0.1429, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
#!/usr/bin/env python # created my Massimo Di Pierro # license MIT/BSD/GPL import re import cgi import sys import doctest from optparse import OptionParser __all__ = ['render','markmin2latex'] META = 'META' regex_newlines = re.compile('(\n\r)|(\r\n)') regex_dd=re.compile('\$\$(?P<latex>.*?)\$\$') regex_code = re.comp...
ajibawa-2023/Python-Code-Large/train/row_519
184
293
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_519:Import_L4_C0", "label": "re import re", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0137, 0.0034, 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_519:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_519:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_519:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_519:For_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# this file exists for backward compatibility __all__ = ['DAL', 'Field', 'drivers', 'gae'] from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType, gae
ajibawa-2023/Python-Code-Large/train/row_521
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_521:Assign_L3_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.6, 0.2, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
from gluon import XML def button(merchant_id="123456789012345", products=[dict(name="shoes", quantity=1, price=23.5, currency='USD', description="running shoes black")]): t = '<input name="item_%(key)...
ajibawa-2023/Python-Code-Large/train/row_522
8
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_522:ImportFrom_L1_C0", "label": "from gluon import XML", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 826, 0, 1, 0, 0, 826, 0, 0], "semantic": {"name": "gluon", "arg_names": [], "import_names": ["XML"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_522:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_522:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_522:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_522:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# -*- coding: utf-8 -*- import struct import re try: import cStringIO as StringIO except ImportError: import StringIO from err import Warning, Error, InterfaceError, DataError, \ DatabaseError, OperationalError, IntegrityError, InternalError, \ NotSupportedError, ProgrammingError ins...
ajibawa-2023/Python-Code-Large/train/row_523
257
410
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_523:Import_L2_C0", "label": "struct import struct", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0024, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_523:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_523:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_523:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_523:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_523:Class...
import re import datetime import time import sys from constants import FIELD_TYPE, FLAG from charset import charset_by_id PYTHON3 = sys.version_info[0] > 2 try: set except NameError: try: from sets import BaseSet as set except ImportError: from sets import Set as set ESCAPE_REGEX = re.co...
ajibawa-2023/Python-Code-Large/train/row_524
160
356
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_524:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 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_524:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_524:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_524:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_524:Try_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_524:Try_L1...
from time import localtime from datetime import date, datetime, time, timedelta Date = date Time = time TimeDelta = timedelta Timestamp = datetime def DateFromTicks(ticks): return date(*localtime(ticks)[:3]) def TimeFromTicks(ticks): return time(*localtime(ticks)[3:6]) def TimestampFromTicks(ticks): ret...
ajibawa-2023/Python-Code-Large/train/row_525
12
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_525:ImportFrom_L1_C0", "label": "from time import localtime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["localti...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_525:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_525:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_525:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_525:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import struct def byte2int(b): if isinstance(b, int): return b else: return struct.unpack("!B", b)[0] def int2byte(i): return struct.pack("!B", i) def join_bytes(bs): if len(bs) == 0: return "" else: rv = bs[0] for b in bs[1:]: rv += b r...
ajibawa-2023/Python-Code-Large/train/row_527
13
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_527:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_527:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_527:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_527:If_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_527:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_527:If...
MBLENGTH = { 8:1, 33:3, 88:2, 91:2 } class Charset: def __init__(self, id, name, collation, is_default): self.id, self.name, self.collation = id, name, collation self.is_default = is_default == 'Yes' class Charsets: def __init__(self): self._by_i...
ajibawa-2023/Python-Code-Large/train/row_528
149
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_528:Assign_L1_C0", "label": "MBLENGTH =", "type": "assigned_variable", "loc": [1, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0201, 0.0345, 0, 0.66, 0.0, 757, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "MBLENGTH", "arg_names": [], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_528:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_528:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_528:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_528:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/...
import pymysql import unittest class PyMySQLTestCase(unittest.TestCase): # Edit this to suit your test environment. databases = [ {"host":"localhost","user":"root", "passwd":"","db":"test_pymysql", "use_unicode": True}, {"host":"localhost","user":"root","passwd":"","db":"test_pymysql2"...
ajibawa-2023/Python-Code-Large/train/row_529
11
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_529:Import_L1_C0", "label": "pymysql import pymysql", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 244, 0, 1, 0, 0, 244, 0, 0], "semantic": {"name": "pymysql", "arg_names": [], "import_names": ["pymysql"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_529:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_529:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_529:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_529:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from pymysql.tests.test_issues import * from pymysql.tests.test_example import * from pymysql.tests.test_basic import * from pymysql.tests.test_DictCursor import * import sys if sys.version_info[0] == 2: # MySQLdb tests were designed for Python 3 from pymysql.tests.thirdparty import * if __name__ == "__main__...
ajibawa-2023/Python-Code-Large/train/row_530
10
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_530:ImportFrom_L1_C0", "label": "from pymysql.tests.test_issues import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 897, 0, 1, 0, 0, 897, 0, 0], "semantic": {"name": "pymysql.tests.test_issues", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_530:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_530:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_530:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_530:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_530:I...
''' PyMySQL: A pure-Python drop-in replacement for MySQLdb. Copyright (c) 2010 PyMySQL contributors 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 limitati...
ajibawa-2023/Python-Code-Large/train/row_531
54
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_531:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0954, 0.1832, 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_531:Try_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_531:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_531:Try_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_531:ImportFrom_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_531...
COM_SLEEP = 0x00 COM_QUIT = 0x01 COM_INIT_DB = 0x02 COM_QUERY = 0x03 COM_FIELD_LIST = 0x04 COM_CREATE_DB = 0x05 COM_DROP_DB = 0x06 COM_REFRESH = 0x07 COM_SHUTDOWN = 0x08 COM_STATISTICS = 0x09 COM_PROCESS_INFO = 0x0a COM_CONNECT = 0x0b COM_PROCESS_KILL = 0x0c COM_DEBUG = 0x0d COM_PING = 0x0e COM_TIME = 0x0f COM_DELAYED...
ajibawa-2023/Python-Code-Large/train/row_533
22
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_533:Assign_L2_C0", "label": "COM_SLEEP =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.087, 0.0435, 0, 0.66, 0.0, 19, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "COM_SLEEP", "arg_names": [], "import_names": [], "rhs_call_n...
[]
DECIMAL = 0 TINY = 1 SHORT = 2 LONG = 3 FLOAT = 4 DOUBLE = 5 NULL = 6 TIMESTAMP = 7 LONGLONG = 8 INT24 = 9 DATE = 10 TIME = 11 DATETIME = 12 YEAR = 13 NEWDATE = 14 VARCHAR = 15 BIT = 16 NEWDECIMAL = 246 ENUM = 247 SET = 248 TINY_BLOB = 249 MEDIUM_BLOB = 250 LONG_BLOB = 251 BLOB = 252 VAR_STRING = 253 STRING = 254 GEO...
ajibawa-2023/Python-Code-Large/train/row_534
29
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_534:Assign_L3_C0", "label": "DECIMAL =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0938, 0.0312, 0, 0.66, 0.0, 22, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "DECIMAL", "arg_names": [], "import_names": [], "rhs_call_name...
[]
NOT_NULL = 1 PRI_KEY = 2 UNIQUE_KEY = 4 MULTIPLE_KEY = 8 BLOB = 16 UNSIGNED = 32 ZEROFILL = 64 BINARY = 128 ENUM = 256 AUTO_INCREMENT = 512 TIMESTAMP = 1024 SET = 2048 PART_KEY = 16384 GROUP = 32767 UNIQUE = 65536
ajibawa-2023/Python-Code-Large/train/row_535
15
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_535:Assign_L1_C0", "label": "NOT_NULL =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "NOT_NULL", "arg_names": [], "import_names": [], "rhs_call_na...
[]
ERROR_FIRST = 1000 HASHCHK = 1000 NISAMCHK = 1001 NO = 1002 YES = 1003 CANT_CREATE_FILE = 1004 CANT_CREATE_TABLE = 1005 CANT_CREATE_DB = 1006 DB_CREATE_EXISTS = 1007 DB_DROP_EXISTS = 1008 DB_DROP_DELETE = 1009 DB_DROP_RMDIR = 1010 CANT_DELETE_FILE = 1011 CANT_FIND_SYSTEM_REC = 1012 CANT_GET_STAT = 1013 CANT_GET_WD = 1...
ajibawa-2023/Python-Code-Large/train/row_536
471
472
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_536:Assign_L2_C0", "label": "ERROR_FIRST =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0042, 0.0021, 0, 0.66, 0.0, 135, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "ERROR_FIRST", "arg_names": [], "import_names": [], "rhs_...
[]
SERVER_STATUS_IN_TRANS = 1 SERVER_STATUS_AUTOCOMMIT = 2 SERVER_MORE_RESULTS_EXISTS = 8 SERVER_QUERY_NO_GOOD_INDEX_USED = 16 SERVER_QUERY_NO_INDEX_USED = 32 SERVER_STATUS_CURSOR_EXISTS = 64 SERVER_STATUS_LAST_ROW_SENT = 128 SERVER_STATUS_DB_DROPPED = 256 SERVER_STATUS_NO_BACKSLASH_ESCAPES = 512 SERVER_STATUS_METADATA_C...
ajibawa-2023/Python-Code-Large/train/row_537
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_537:Assign_L2_C0", "label": "SERVER_STATUS_IN_TRANS =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0833, 0, 0.66, 0.0, 869, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "SERVER_STATUS_IN_TRANS", "arg_names": [], "im...
[]
LONG_PASSWORD = 1 FOUND_ROWS = 1 << 1 LONG_FLAG = 1 << 2 CONNECT_WITH_DB = 1 << 3 NO_SCHEMA = 1 << 4 COMPRESS = 1 << 5 ODBC = 1 << 6 LOCAL_FILES = 1 << 7 IGNORE_SPACE = 1 << 8 PROTOCOL_41 = 1 << 9 INTERACTIVE = 1 << 10 SSL = 1 << 11 IGNORE_SIGPIPE = 1 << 12 TRANSACTIONS = 1 << 13 SECURE_CONNECTION = 1 << 15 MULTI_STA...
ajibawa-2023/Python-Code-Large/train/row_538
18
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_538:Assign_L2_C0", "label": "LONG_PASSWORD =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1, 0.05, 0, 0.66, 0.0, 65, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "LONG_PASSWORD", "arg_names": [], "import_names": [], "rhs_ca...
[]
from gluon.contrib.memcache.memcache import Client from gluon.cache import CacheAbstract import time """ examle of usage: cache.memcache = MemcacheClient(request,[127.0.0.1:11211],debug=true) """ import cPickle as pickle import thread from gluon import current DEFAULT_TIME_EXPIRE = 300 # seconds (must be the same a...
ajibawa-2023/Python-Code-Large/train/row_540
74
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_540:ImportFrom_L1_C0", "label": "from gluon.contrib.memcache.memcache import Client", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.009, 0, 0.66, 0.0, 698, 0, 1, 0, 0, 698, 0, 0], "semantic": {"name": "gluon.contrib.memcache.memc...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_540:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_540:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_540:If_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_540:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_54...
# (c) 2007 Chris AtLee <chris@atlee.ca> # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ PAM module for python Provides an authenticate function that will allow the caller to authenticate a user against the Pluggable Authentication Modules (PAM) on the system. Implemented usi...
ajibawa-2023/Python-Code-Large/train/row_541
65
128
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_541:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0586, 0.0625, 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_541:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_541:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_541:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_541:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# # Copyright 2007 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 writin...
ajibawa-2023/Python-Code-Large/train/row_542
110
268
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_542:Expr_L28_C0", "label": "expression", "type": "expression", "loc": [28, 30], "level": 0, "parent": null, "vector": [8, 0, 0.1082, 0.0112, 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_542:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_542:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_542:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_542:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" Developed by niphlod@gmail.com """ import redis from redis.exceptions import ConnectionError from gluon import current from gluon.storage import Storage import cPickle as pickle import time import re import logging import thread logger = logging.getLogger("web2py.session.redis") locker = thread.allocate_lock() ...
ajibawa-2023/Python-Code-Large/train/row_543
126
208
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_543:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0096, 0.0144, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_543:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_543:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_543:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_543:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
ajibawa-2023/Python-Code-Large/train/row_544
339
795
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_544:Assign_L30_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.0377, 0.0013, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_544:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_544:Assign_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_544:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_544:Assign_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
ajibawa-2023/Python-Code-Large/train/row_545
689
1,411
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_545:Assign_L30_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.0213, 0.0007, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_545:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_545:Import_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_545:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_545:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_545:C...
class MulticastDelegate(object): def __init__(self): self.delegates = [] def __iadd__(self, delegate): self.add(delegate) return self def add(self, delegate): self.delegates.append(delegate) def __isub__(self, delegate): self.delegates.remove(dele...
ajibawa-2023/Python-Code-Large/train/row_546
14
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_546:ClassDef_L2_C0", "label": "MulticastDelegate", "type": "class", "loc": [2, 19], "level": 0, "parent": null, "vector": [3, 0, 0.525, 0.9, 0, 0.66, 0.0, 718, 0, 5, 0, 0, 186, 0, 4], "semantic": {"name": "MulticastDelegate", "arg_names": [], "import_names": [], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_546:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_546:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_546:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_546:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
ajibawa-2023/Python-Code-Large/train/row_547
373
708
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_547:Assign_L30_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.0424, 0.0014, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_547:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_547:ImportFrom_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_547:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_547:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
ajibawa-2023/Python-Code-Large/train/row_548
5
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_548:Assign_L30_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.8108, 0.027, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_...
[]
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2007-2009, Mathieu Fenniak # 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 co...
ajibawa-2023/Python-Code-Large/train/row_550
26
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_550:Assign_L30_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.2609, 0.0087, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_550:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_550:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_550:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_550:Expr_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
from types import StringType, ListType, TupleType from copy import deepcopy from Elements import * DEFAULT_TAB_WIDTH = 720 ParagraphAlignmentMap = { ParagraphPropertySet.LEFT : 'ql', ParagraphPropertySet.RIGHT : 'qr', ParagraphPropertySet.CENTER : 'qc...
ajibawa-2023/Python-Code-Large/train/row_552
343
639
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_552:ImportFrom_L1_C0", "label": "from types import StringType, ListType, TupleType", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0016, 0.0016, 0, 0.66, 0.0, 209, 0, 3, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_552:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_552:FunctionDef_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_552:FunctionDef_L66_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_552:Expr_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
from types import IntType, FloatType, LongType, StringTypes from copy import deepcopy from binascii import hexlify from Constants import * from Styles import * class UnhandledParamError( Exception ) : def __init__( self, param ) : Exception.__init__( self, "Don't...
ajibawa-2023/Python-Code-Large/train/row_553
511
756
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_553:ImportFrom_L1_C0", "label": "from types import IntType, FloatType, LongType\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0013, 0.0013, 0, 0.66, 0.0, 209, 0, 4, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": []...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_553:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_553:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_553:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_553:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" A Styles is a collection of PropertySets that can be applied to a particular RTF element. At present there are only two, Text and Paragraph but ListStyles will be added soon too. """ from PropertySets import * class TextStyle : def __init__( self, text_props, name=None, shading_props=None ) : self....
ajibawa-2023/Python-Code-Large/train/row_554
55
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_554:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0426, 0.0745, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_554:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_554:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_554:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_554:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
""" PropertySets group common attributes together, each property set is used to control a specific part of the rendering. PropertySets can be used in different elements of the document. For example the FramePropertySet is used in paragraphs, tables, cells, etc. The TextPropertySet can be used for text or in a Paragr...
ajibawa-2023/Python-Code-Large/train/row_555
346
489
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_555:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0112, 0.0204, 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_555:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_555:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_555:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_555:Return_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from PropertySets import * from Elements import * from Styles import * from Renderer import * def dumps(doc): import cStringIO s=cStringIO.StringIO() r=Renderer() r.Write(doc,s) return s.getvalue()
ajibawa-2023/Python-Code-Large/train/row_556
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_556:ImportFrom_L1_C0", "label": "from PropertySets import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 611, 0, 1, 0, 0, 611, 0, 0], "semantic": {"name": "PropertySets", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_556:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_556:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_556:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_556:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
class ViewKind : """An integer (0-5) that represents the view mode of the document.""" NONE = 0 PageLayout = 1 Outline = 2 MasterDocument = 3 Normal = 4 OnlineLayout = 5 DEFAULT = PageLayout def _IsValid( cls, value ) : return value in [ 0, 1...
ajibawa-2023/Python-Code-Large/train/row_557
88
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_557:ClassDef_L1_C0", "label": "ViewKind", "type": "class", "loc": [1, 15], "level": 0, "parent": null, "vector": [3, 0, 0.0506, 0.0949, 0, 0.66, 0.0, 480, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ViewKind", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_557:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_557:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_557:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_557:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
#!/usr/bin/env python # -*- coding: latin-1 -*- # Fonts: fpdf_charwidths = {} fpdf_charwidths['courier']={} for i in xrange(0,256): fpdf_charwidths['courier'][chr(i)]=600 fpdf_charwidths['courierB']=fpdf_charwidths['courier'] fpdf_charwidths['courierI']=fpdf_charwidths['courier'] fpdf_c...
ajibawa-2023/Python-Code-Large/train/row_559
17
156
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_559:Assign_L6_C0", "label": "fpdf_charwidths =", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0385, 0.0064, 0, 0.66, 0.0, 225, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "fpdf_charwidths", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_559:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_559:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_559:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_559:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_559:F...
#****************************************************************************** # TTFontFile class # # This class is based on The ReportLab Open Source PDF library ...
ajibawa-2023/Python-Code-Large/train/row_560
718
1,083
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_560:ImportFrom_L19_C0", "label": "from struct import pack, unpack, unpack_from", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0009, 0, 0.66, 0.0, 399, 0, 3, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "i...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_560:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_560:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_560:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_560:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: iso-8859-1 -*- "PDF Template Helper for FPDF.py" __author__ = "Mariano Reingart <reingart@gmail.com>" __copyright__ = "Copyright (C) 2010 Mariano Reingart" __license__ = "LGPL 3.0" import sys,os,csv from fpdf import FPDF def rgb(col): return (col // 65536), (col // 256 % 256), (col% 256) class Te...
ajibawa-2023/Python-Code-Large/train/row_561
212
301
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_561:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.01, 0.0033, 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_561:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_561:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_561:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_561:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # -*- coding: latin-1 -*- # fpdf php helpers: def substr(s, start, length=-1): if length < 0: length=len(s)-start return s[start:start+length] def sprintf(fmt, *args): return fmt % args def print_r(array): if not isinstance(array, dict): a...
ajibawa-2023/Python-Code-Large/train/row_562
31
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_562:FunctionDef_L6_C0", "label": "substr", "type": "function", "loc": [6, 9], "level": 0, "parent": null, "vector": [2, 0, 0.1531, 0.0816, 0, 0.66, 0.0, 219, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "substr", "arg_names": ["s", "start", "length"], "import_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_562:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_562:If_L7_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_562:If_L7_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_562:Assign_L8_C15"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_562:F...
#!/usr/bin/env python # -*- coding: utf-8 -*- "FPDF for python" __license__ = "LGPL 3.0" __version__ = "1.7" from fpdf import * try: from html import HTMLMixin except ImportError: import warnings warnings.warn("web2py gluon package not installed, required for html2pdf") from template import Template
ajibawa-2023/Python-Code-Large/train/row_564
9
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_564:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.0625, 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_564:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_564:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_564:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_564:Import_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
""" Developed by Massimo Di Pierro Released under the web2py license (LGPL) What does it do? if html is a variable containing HTML text and urls in the text, when you call html = expend_html(html) it automatically converts the url to links but when possible it embeds the object being linked. In particular it ca...
ajibawa-2023/Python-Code-Large/train/row_566
73
217
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_566:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 43], "level": 0, "parent": null, "vector": [8, 0, 0.1014, 0.1982, 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_566:Try_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_566:ImportFrom_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_566:Try_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_566:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Developed by Robin Bhattacharyya (memecache for GAE) Released under the web2py license (LGPL) from gluon.contrib.gae_memcache import MemcacheClient cache.ram=cache.disk=MemcacheClient(request) """ import time from google.appengine.api.memcache import Client class M...
ajibawa-2023/Python-Code-Large/train/row_567
40
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_567:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1029, 0.1029, 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_567:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_567:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_567:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_567:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
ajibawa-2023/Python-Code-Large/train/row_569
85
120
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_569:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.025, 0.0417, 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_569:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_569:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_569:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_569:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_56...
"""JSON token scanner """ import re def _import_c_make_scanner(): try: raise ImportError # because assumes simplejson in path from simplejson._speedups import make_scanner return make_scanner except ImportError: return None c_make_scanner = _import_c_make_scanner() __all__ = ['m...
ajibawa-2023/Python-Code-Large/train/row_570
57
79
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_570:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.019, 0.0253, 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_570:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_570:Try_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_570:Try_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_570:ImportFrom_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: raise ImportError # because assumes simplejson in path from simplejson import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: re...
ajibawa-2023/Python-Code-Large/train/row_571
261
501
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_571:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.003, 0.004, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_571:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_571:Try_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_571:Try_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_571:ImportFrom_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
ajibawa-2023/Python-Code-Large/train/row_572
77
440
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_572:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1136, 0.225, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_572:FunctionDef_L113_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_572:Import_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_572:FunctionDef_L113_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_572:Try_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import urllib import simplejson class Stripe: """ Usage: key='<api key>' d = Stripe(key).charge( amount=100, currency='usd', card_number='4242424242424242', card_exp_month='5', card_exp_year='2012', card_cvc_chec...
ajibawa-2023/Python-Code-Large/train/row_574
25
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_574:Import_L1_C0", "label": "urllib import urllib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0152, 0.0152, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_574:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_574:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_574:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_574:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
from markdown2 import * from gluon.html import XML def WIKI(text, encoding="utf8", safe_mode='escape', html4tags=False, **attributes): if not text: test = '' if attributes.has_key('extras'): extras = attributes['extras'] del attributes['extras'] else: extras=None text = ...
ajibawa-2023/Python-Code-Large/train/row_577
10
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_577:ImportFrom_L1_C0", "label": "from markdown2 import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 623, 0, 1, 0, 0, 623, 0, 0], "semantic": {"name": "markdown2", "arg_names": [], "import_names": ["*"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_577:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_577:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_577:If_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_577:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_577:Fu...
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for zh (Chinese) nplurals=1 # Chinese language has ONE form! # Always returns 0: get_plural_id = lambda n: 0 # Construct and return plural form of *word* using # *plural_id* (which ALWAYS>0). This function will be executed # for words (or phrases) not foun...
ajibawa-2023/Python-Code-Large/train/row_579
2
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_579:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.3571, 0.0714, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for it (Italian) nplurals=2 # Italian language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n...
ajibawa-2023/Python-Code-Large/train/row_580
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_580:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for es (Spanish) nplurals=2 # Spanish language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n...
ajibawa-2023/Python-Code-Large/train/row_581
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_581:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for ja (Japanese) nplurals=1 # Japanese language has ONE form! # Always returns 0: get_plural_id = lambda n: 0 # Construct and return plural form of *word* using # *plural_id* (which ALWAYS>0). This function will be executed # for words (or phrases) not fo...
ajibawa-2023/Python-Code-Large/train/row_582
2
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_582:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.3571, 0.0714, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for cs (Czech) nplurals=3 # Czech language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: (...
ajibawa-2023/Python-Code-Large/train/row_583
2
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_583:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2632, 0.0526, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for id (Malay) nplurals=2 # Malay language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: in...
ajibawa-2023/Python-Code-Large/train/row_584
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_584:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for af (Afrikaans (South Africa)) nplurals=2 # Afrikaans language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_p...
ajibawa-2023/Python-Code-Large/train/row_585
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_585:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for sk (Slovak (Slovakia)) nplurals=3 # Slovak language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = ...
ajibawa-2023/Python-Code-Large/train/row_586
2
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_586:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.05, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for uk (Ukrainian) nplurals=3 # Ukrainian language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambd...
ajibawa-2023/Python-Code-Large/train/row_587
2
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_587:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2381, 0.0476, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for pl (Polish) nplurals=3 # Polish language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: (...
ajibawa-2023/Python-Code-Large/train/row_588
2
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_588:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2632, 0.0526, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for ru (Russian) nplurals=3 # Russian language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n:...
ajibawa-2023/Python-Code-Large/train/row_589
2
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_589:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.05, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for de (Deutsch) nplurals=2 # German language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n:...
ajibawa-2023/Python-Code-Large/train/row_590
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_590:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for bg (Bulgarian) nplurals=2 # Bulgarian language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lamb...
ajibawa-2023/Python-Code-Large/train/row_591
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_591:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for pt (Portuguese) nplurals=2 # Portuguese has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: i...
ajibawa-2023/Python-Code-Large/train/row_592
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_592:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for en (English) nplurals=2 # English language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n...
ajibawa-2023/Python-Code-Large/train/row_593
3
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_593:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.05, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for sl (Slovenian) nplurals=4 # Slovenian language has 4 forms: # 1 singular and 3 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambd...
ajibawa-2023/Python-Code-Large/train/row_594
2
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_594:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.05, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for he (Hindi) nplurals=2 # Hindi has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: int(n != 1)...
ajibawa-2023/Python-Code-Large/train/row_595
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_595:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for hu (Hungarian) nplurals=2 # Hungarian language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lamb...
ajibawa-2023/Python-Code-Large/train/row_596
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_596:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for he (Hebrew) nplurals=2 # Hebrew language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: ...
ajibawa-2023/Python-Code-Large/train/row_597
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_597:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for fr (French)) nplurals=2 # French language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n:...
ajibawa-2023/Python-Code-Large/train/row_598
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_598:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for ro (Romanian) nplurals=2 # Romanian has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambda n: int(n...
ajibawa-2023/Python-Code-Large/train/row_599
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_599:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for tr (Turkish) nplurals=1 # Turkish language has ONE form! # Always returns 0: get_plural_id = lambda n: 0 # Construct and return plural form of *word* using # *plural_id* (which ALWAYS>0). This function will be executed # for words (or phrases) not foun...
ajibawa-2023/Python-Code-Large/train/row_600
2
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_600:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.3571, 0.0714, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for lt (Lithuanian) nplurals=3 # Lithuanian language has 3 forms: # 1 singular and 2 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lam...
ajibawa-2023/Python-Code-Large/train/row_601
2
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_601:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2632, 0.0526, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for id (Indonesian) nplurals=2 # Indonesian language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = la...
ajibawa-2023/Python-Code-Large/train/row_602
2
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_602:Assign_L5_C0", "label": "nplurals =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 795, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "nplurals", "arg_names": [], "import_names": [], "rhs_call_n...
[]
""" Usage: in web2py models/db.py from gluon.contrib.heroku import get_db db = get_db() """ import os from gluon import * from gluon.dal import ADAPTERS, UseDatabaseStoredFile,PostgreSQLAdapter class HerokuPostgresAdapter(UseDatabaseStoredFile,PostgreSQLAdapter): drivers = ('psycopg2',) uploads_in_blob = Tru...
ajibawa-2023/Python-Code-Large/train/row_603
18
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_603:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1379, 0.2414, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_603:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_603:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_603:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_603:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
# -*- coding: utf-8 -*- """ pbkdf2 ~~~~~~ This module implements pbkdf2 for Python. It also has some basic tests that ensure that it works. The implementation is straightforward and uses stdlib only stuff and can be easily be copy/pasted into your favourite application. Use this as repla...
ajibawa-2023/Python-Code-Large/train/row_604
53
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_604:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 42], "level": 0, "parent": null, "vector": [8, 0, 0.1705, 0.3178, 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_604:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_604:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_604:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_604:Return_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This module provides a simple API for Paymentech(c) payments # The original code was taken from this web2py issue post # http://code.google.com/p/web2py/issues/detail?id=1170 by Adnan Smajlovic # # Copyright (C) <2012> Alan Etkin <spametki@gmail.com> # License: BS...
ajibawa-2023/Python-Code-Large/train/row_605
60
342
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_605:Import_L12_C0", "label": "sys import sys, httplib, urllib\u2026", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0351, 0.0029, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_605:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_605:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_605:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_605:Assign_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
# -*- coding: utf-8 -*- ####################################################################### # # Put this file in yourapp/modules/images.py # # Given the model # # db.define_table("table_name", Field("picture", "upload"), Field("thumbnail", "upload")) # # # to resize the picture on upload # # from images import RES...
ajibawa-2023/Python-Code-Large/train/row_606
31
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_606:ImportFrom_L23_C0", "label": "from gluon import current", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.377, 0.0164, 0, 0.66, 0.0, 826, 0, 1, 0, 0, 826, 0, 0], "semantic": {"name": "gluon", "arg_names": [], "import_names": ["curre...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_606:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_606:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_606:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_606:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
# pyuca - Unicode Collation Algorithm # Version: 2012-06-21 # # James Tauber # http://jtauber.com/ # Copyright (c) 2006-2012 James Tauber and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
ajibawa-2023/Python-Code-Large/train/row_608
68
144
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_608:Expr_L28_C0", "label": "expression", "type": "expression", "loc": [28, 47], "level": 0, "parent": null, "vector": [8, 0, 0.2604, 0.1389, 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_608:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_608:FunctionDef_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_608:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_608:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os import pyuca unicode_collator = None def set_unicode_collator(file): global unicode_collator unicode_collator = pyuca.Collator(file) set_unicode_collator(os.path.join(os.path.dirname(__file__), 'allkeys.txt'))
ajibawa-2023/Python-Code-Large/train/row_609
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_609:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_609:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_609:Assign_L8_C4"}]
#!/usr/bin/python # # Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. # # 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/LICE...
ajibawa-2023/Python-Code-Large/train/row_610
772
2,011
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_610:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0102, 0.003, 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_610:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_610:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_610:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_610:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/env python # -*- coding: utf-8 -*- "FPDF for python (a.k.a. pyfpdf)" # Read more about this http://code.google.com/p/pyfpdf # Please note that new package name is fpdf (to avoid some naming conflicts) # import fpdf into pyfpdf for backward compatibility (prior web2py 2.0): from fpdf import * # import warni...
ajibawa-2023/Python-Code-Large/train/row_611
2
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_611:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3636, 0.0909, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
import re import cPickle import random import datetime IUP = {'shoebill':{'a':1,'187':1},'trout-like':{'parr':1},'fig.':{'19':1},'mcintosh.':{'the':1,'illustration':1},'chiasmodon':{'niger':2},'yellow':{'and':4,'giant':1,'green':2,'red':1,'spots':1},'four':{'brightly':1,'hundred':1,'haunts':1,'feet':1,'solutions':2,'h...
ajibawa-2023/Python-Code-Large/train/row_613
174
270
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_613:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 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_613:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_613:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_613:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_613:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Plural subsystem is created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop@gma...
ajibawa-2023/Python-Code-Large/train/row_614
527
950
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_614:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0079, 0.0084, 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_614:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_614:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_614:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_614:Import_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_614:F...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import sys import cPickle import traceback import types import os import logging from storage import S...
ajibawa-2023/Python-Code-Large/train/row_615
185
323
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_615:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0155, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_615:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_615:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_615:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_615:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Web2Py framework modules ======================== """ __all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT'...
ajibawa-2023/Python-Code-Large/train/row_616
25
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_616:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.1591, 0.2045, 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_616:If_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_616:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_616:If_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_616:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import datetime import decimal from storage import Storage from html import TAG, XmlComponent from html import xmlescape from languages import lazyT im...
ajibawa-2023/Python-Code-Large/train/row_619
96
182
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_619:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0165, 0.0275, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_619:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_619:Import_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_619:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_619:Try_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_619:Try_...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import re import cgi __all__ = ['highlight'] class Highlighter(object): """ Do syntax highl...
ajibawa-2023/Python-Code-Large/train/row_622
139
344
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_622:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0174, 0.0145, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_622:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_622:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_622:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_622:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) This file is not strictly required by web2py. It is used for three purposes: 1) check that all required modules are installed prop...
ajibawa-2023/Python-Code-Large/train/row_626
21
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_626:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 14], "level": 0, "parent": null, "vector": [8, 0, 0.078, 0.1101, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_626:For_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_626:For_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_626:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_626:Expr_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_626:If_L91...
import time import sys import urllib2 import urllib2 n = int(sys.argv[1]) url = sys.argv[2] headers = {"Accept-Language": "en"} req = urllib2.Request(url, None, headers) t0 = time.time() for k in xrange(n): data = urllib2.urlopen(req).read() print (time.time() - t0) / n if n == 1: print data
ajibawa-2023/Python-Code-Large/train/row_628
14
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_628:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_628:For_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_628:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_628:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_628:Expr_L16_C4"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from time import mktime from time import sleep from time import time DB_URI = 'sqlite://sessions.sqlite' EXPIRATION_MINUTES = 60 SLEEP_MINUTES = 5 while 1: # Infinite loop now = time() # get current Unix timestamp for row in db()....
ajibawa-2023/Python-Code-Large/train/row_629
15
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_629:ImportFrom_L4_C0", "label": "from datetime import datetime", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.16, 0.04, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["date...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_629:While_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_629:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_629:While_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_629:For_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_629:...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## launch with python web2py.py -S myapp -R scripts/zip_static_files.py import os import gzip def zip_static(filelist=[]): tsave = 0 for fi in filelist: extension = os.path.splitext(fi) extension = len(extension) > 1 and extension[1] or None ...
ajibawa-2023/Python-Code-Large/train/row_630
33
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_630:Import_L7_C0", "label": "os import os", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1489, 0.0213, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_630:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_630:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_630:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_630:For_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import time import stat import datetime from gluon.utils import md5_hash from gluon.restricted import RestrictedError, TicketStorage from gluon import DAL SLEEP_MINUTES = 5 errors_path = os.path.join(request.folder, 'errors') try: db_string = op...
ajibawa-2023/Python-Code-Large/train/row_631
32
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_631:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0784, 0.0196, 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_631:Try_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_631:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_631:Try_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_631:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_631:W...