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 -*-
'''
@author: Pierre Thibault (pierre.thibault1 -at- gmail.com)
@license: MIT
@since: 2011-06-17
Usage: dict_diff [OPTION]... dict1 dict2
Show the differences for two dictionaries.
-h, --help Display this help message.
dict1 and dict2 are two web2py dictionar... | ajibawa-2023/Python-Code-Large/train/row_632 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_632:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0847, 0.1129, 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_632:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_632:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_632:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_632:Try_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
USAGE = """
from web2py main folder
python scripts/make_min_web2py.py /path/to/minweb2py
it will mkdir minweb2py and build a minimal web2py installation
- no admin, no examples, one line welcome
- no scripts
- drops same rarely used contrib modules
- more modules could be dropped but minimal difference
"""
# files to... | ajibawa-2023/Python-Code-Large/train/row_633 | 38 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_633:Assign_L1_C0", "label": "USAGE =", "type": "assigned_variable", "loc": [1, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0567, 0.1031, 0, 0.66, 0.0, 952, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "USAGE", "arg_names": [], "import_names": [], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_633:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_633:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_633:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_633:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_633:... |
import sys
import glob
import os
import shutil
name = sys.argv[1]
app = sys.argv[2]
dest = sys.argv[3]
a = glob.glob(
'applications/%(app)s/*/plugin_%(name)s.*' % dict(app=app, name=name))
b = glob.glob(
'applications/%(app)s/*/plugin_%(name)s/*' % dict(app=app, name=name))
for f in a:
print 'cp %s ...' % ... | ajibawa-2023/Python-Code-Large/train/row_634 | 25 | 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_634:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 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_634:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_634:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_634:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_634:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_634:For_L... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
sessions2trash.py
Run this script in a web2py environment shell e.g. python web2py.py -S app
If models are loaded (-M option) auth.settings.expiration is assumed
for sessions without an expiration. If models are not loaded, sessions older
than 60 minutes are removed. U... | ajibawa-2023/Python-Code-Large/train/row_636 | 131 | 229 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_636:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0568, 0.0917, 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_636:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_636:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_636:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_636:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
import os
import sys
import glob
sys.path.append(os.path.join(os.path.split(__file__)[0],'..'))
from gluon.html import CODE
def main(path):
models = glob.glob(os.path.join(path,'models','*.py'))
controllers = glob.glob(os.path.join(path,'controllers','*.py'))
views = glob.glob(os.path.join(path,'views','*.... | ajibawa-2023/Python-Code-Large/train/row_637 | 39 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_637:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0244, 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_637:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_637:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_637:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_637:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python
import sys, os, time, subprocess
class Base:
def run_command(self, *args):
"""
Returns the output of a command as a tuple (output, error).
"""
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return p.communicate()
class Serv... | ajibawa-2023/Python-Code-Large/train/row_638 | 115 | 200 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_638:Import_L3_C0", "label": "sys import sys, os, time\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.015, 0.005, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_638:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_638:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_638:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_638:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# TODO: Comment this code
import sys
import shutil
import os
from gluon.languages import findT
sys.path.insert(0, '.')
def sync_language(d, data):
''' this function makes sure a translated string will be prefered over an untranslated
string when syncing languag... | ajibawa-2023/Python-Code-Large/train/row_640 | 46 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_640:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0779, 0.013, 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_640:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_640:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_640:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_640:For_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
import sys
import re
def cleancss(text):
text = re.compile('\s+').sub(' ', text)
text = re.compile('\s*(?P<a>,|:)\s*').sub('\g<a> ', text)
text = re.compile('\s*;\s*').sub(';\n ', text)
text = re.compile('\s*\{\s*').sub(' {\n ', text)
text = re.compile('\s*\}\s*').sub('\n}\n\n', text)
re... | ajibawa-2023/Python-Code-Large/train/row_642 | 54 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_642:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 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_642:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_642:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_642:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_642:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
filename = sys.argv[1]
datafile = open(filename, 'r')
try:
data = '\n' + datafile.read()
finally:
datafile.close()
SPACE = '\n ' if '-n' in sys.argv[1:] else ' '
data = re.compile('(?<!\:)//(?P<a>.*)').sub('/* \g<a> */', data)
data = re.c... | ajibawa-2023/Python-Code-Large/train/row_643 | 23 | 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_643:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0312, 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_643:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_643:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_643:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_643:Expr_L13_C4"}] |
'''
Create the web2py code needed to access your mysql legacy db.
To make this work all the legacy tables you want to access need to have an "id" field.
This plugin needs:
mysql
mysqldump
installed and globally available.
Under Windows you will probably need to add the mysql executable directory to the PATH variable... | ajibawa-2023/Python-Code-Large/train/row_644 | 36 | 113 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_644:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.1018, 0.1947, 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_644:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_644:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_644:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_644:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
'''
autoroutes writes routes for you based on a simpler routing
configuration file called routes.conf. Example:
----- BEGIN routes.conf-------
127.0.0.1 /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/default
----- END ----------
It maps a domain (the ... | ajibawa-2023/Python-Code-Large/train/row_645 | 44 | 150 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_645:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1133, 0.2067, 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_645:If_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_645:Try_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_645:Try_L41_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_645:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_645:Try_L... |
#
# This files allows to delegate authentication for every URL within a domain
# to a web2py app within the same domain
# If you are logged in the app, you have access to the URL
# even if the URL is not a web2py URL
#
# in /etc/apache2/sites-available/default
#
# <VirtualHost *:80>
# WSGIDaemonProcess web2py user=ww... | ajibawa-2023/Python-Code-Large/train/row_646 | 26 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_646:Assign_L37_C0", "label": "URL_CHECK_ACCESS =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.5781, 0.0156, 0, 0.66, 0.0, 502, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "URL_CHECK_ACCESS", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_646:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_646:Import_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_646:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_646:Import_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
'''
Create the web2py model code needed to access your sqlite legacy db.
Usage:
python extract_sqlite_models.py
Access your tables with:
legacy_db(legacy_db.mytable.id>0).select()
extract_sqlite_models.py -- Copyright (C) Michele Comitini
This code is distributed with web2py.
The regexp co... | ajibawa-2023/Python-Code-Large/train/row_647 | 47 | 113 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_647:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0973, 0.1504, 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_647:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_647:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_647:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_647:For_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
import re
def cleanjs(text):
text = re.sub('\s*}\s*', '\n}\n', text)
text = re.sub('\s*{\s*', ' {\n', text)
text = re.sub('\s*;\s*', ';\n', text)
text = re.sub('\s*,\s*', ', ', text)
text = re.sub('\s*(?P<a>[\+\-\*/\=]+)\s*', ' \g<a> ', text)
lines = text.split('\n')
text = ''
indent =... | ajibawa-2023/Python-Code-Large/train/row_648 | 14 | 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_648:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 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_648:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_648:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_648:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_648:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
Install cx_Freeze: http://cx-freeze.sourceforge.net/
Copy script to the web2py directory
c:\Python27\python standalone_exe_cxfreeze.py build_exe
"""
from cx_Freeze import setup, Executable
from gluon.import_all import base_modules, contributed_module... | ajibawa-2023/Python-Code-Large/train/row_649 | 19 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_649:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1016, 0.0938, 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_649:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_649:Assign_L29_C4"}] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cStringIO
import re
import sys
import tarfile
import urllib
import xml.parsers.expat as expat
"""
Update script for contenttype.py module.
Usage: python contentupdate.py /path/to/contenttype.py
If no path is specified, script will look for contenttype.py in curre... | ajibawa-2023/Python-Code-Large/train/row_650 | 27 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_650:Import_L1_C0", "label": "cStringIO import cStringIO", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 764, 0, 1, 0, 0, 764, 0, 0], "semantic": {"name": "cStringIO", "arg_names": [], "import_names": ["cStrin... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_650:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_650:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_650:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_650:If_L11_C8"}, {"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
from gluon.tools import Mail
path = os.path.join(request.folder, 'errors')
hashes = {}
mail = Mail()
### CONFIGURE HERE
SLEEP_MINU... | ajibawa-2023/Python-Code-Large/train/row_651 | 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_651:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0204, 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_651:While_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_651:For_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_651:For_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_651:If_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_651:If_L29... |
import sys
import glob
def read_fileb(filename, mode='rb'):
f = open(filename, mode)
try:
return f.read()
finally:
f.close()
def write_fileb(filename, value, mode='wb'):
f = open(filename, mode)
try:
f.write(value)
finally:
f.close()
for filename in glob.glob... | ajibawa-2023/Python-Code-Large/train/row_652 | 19 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_652:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 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_652:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_652:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_652:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_652:Try_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
import os
import sys
paths = [sys.argv[1]]
paths1 = []
paths2 = []
while paths:
path = paths.pop()
for filename in os.listdir(path):
fullname = os.path.join(path, filename)
if os.path.isdir(fullname):
paths.append(fullname)
else:
extension = filename.split('.')[-1... | ajibawa-2023/Python-Code-Large/train/row_653 | 20 | 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_653:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_653:While_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_653:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_653:While_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_653:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_653:For_... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
crontab -e
* 3 * * * root path/to/this/file
"""
USER = 'www-data'
TMPFILENAME = 'web2py_src_update.zip'
import sys
import os
import urllib
import zipfile
if len(sys.argv) > 1 and sys.argv[1] == 'nightly':
version = 'http://web2py.com/examples/static/nightly/web2... | ajibawa-2023/Python-Code-Large/train/row_655 | 21 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_655:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.1212, 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_655:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_655:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_655:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_655:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_655:Try... |
import os
import glob
import zipfile
import urllib
import tempfile
import shutil
def copytree(src, dst):
names = os.listdir(src)
ignored_names = set()
errors = []
if not os.path.exists(dst):
os.makedirs(dst)
for name in names:
srcname = os.path.join(src, name)
dstname = os.p... | ajibawa-2023/Python-Code-Large/train/row_656 | 83 | 116 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_656:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0086, 0.0086, 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_656:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_656:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_656:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_656:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
# -*- coding: utf-8 -*-
# routers are dictionaries of URL routing parameters.
#
# For each request, the effective router is:
# the built-in default base router (shown below),
# updated by the BASE router in routes.py routers,
# updated by the app-specific router in routes.py routers (if any),
# updated b... | ajibawa-2023/Python-Code-Large/train/row_657 | 7 | 211 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_657:Assign_L101_C0", "label": "routers = dict()", "type": "assigned_variable", "loc": [101, 107], "level": 0, "parent": null, "vector": [14, 0, 0.4929, 0.0332, 0, 0.66, 0.0, 839, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "routers", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_657:FunctionDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_657:Expr_L149_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_657:If_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_657:Import_L210_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
path = os.getcwd()
try:
if sys.argv[1] and os.path.exists(sys.argv[1]):
path = sys.argv[1]
except:
pass
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]
# import gluon.import_all ##### This should be uncommented f... | ajibawa-2023/Python-Code-Large/train/row_658 | 13 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_658:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0417, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_658:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_658:If_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_658:If_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_658:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_658:FunctionD... |
#!/usr/bin/env python
import gluon
from gluon.fileutils import untar
import os
import sys
def main():
path = gluon.__path__
out_path = os.getcwd()
try:
if sys.argv[1] and os.path.exists(sys.argv[1]):# To untar the web2py env to the selected path
out_path = sys.argv[1]
else:
... | ajibawa-2023/Python-Code-Large/train/row_659 | 19 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_659:Import_L2_C0", "label": "gluon import gluon", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.037, 0, 0.66, 0.0, 826, 0, 1, 0, 0, 826, 0, 0], "semantic": {"name": "gluon", "arg_names": [], "import_names": ["gluon"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_659:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_659:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_659:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_659:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
EXPIRATION_MINUTES=60
DIGITS=('0','1','2','3','4','5','6','7','8','9')
import os, time, stat, cPickle, logging
path = os.path.join(request.folder,'sessions')
if not os.path.exists(path):
os.mkdir(path)
now = time.time()
for filename in os.listdir(path):
fullpath=os.path.join(path,filename)
if os.path.isfile... | ajibawa-2023/Python-Code-Large/train/row_660 | 19 | 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_660:Assign_L1_C0", "label": "EXPIRATION_MINUTES =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 270, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "EXPIRATION_MINUTES", "arg_names": [], "import_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_660:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_660:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_660:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_660:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_660:For_L8_C... |
# coding: utf8
{
'!langcode!': 'zh-cn',
'!langname!': '中文',
'"browse"': '游览',
'"save"': '"保存"',
'"submit"': '"提交"',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新"是可配置项 如 "field1=\'newvalue\'",你无法在JOIN 中更新或删除',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %... | ajibawa-2023/Python-Code-Large/train/row_661 | 1 | 299 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_661:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 299], "level": 0, "parent": null, "vector": [8, 0, 0.5033, 0.9967, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'it',
'!langname!': 'Italiano',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%s %%{... | ajibawa-2023/Python-Code-Large/train/row_662 | 1 | 336 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_662:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 336], "level": 0, "parent": null, "vector": [8, 0, 0.503, 0.997, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [] |
# coding: utf8
{
'!langcode!': 'sr-cr',
'!langname!': 'Српски (Ћирилица)',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'(requires internet access)': '(захтијева приступ интернету)',
'(something like "it-it")': '(нешто као "it-it")',
'@markmin\x01(file **gluon/contrib/plural_rules/%s.py** is not fo... | ajibawa-2023/Python-Code-Large/train/row_663 | 1 | 212 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_663:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 212], "level": 0, "parent": null, "vector": [8, 0, 0.5047, 0.9953, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'es',
'!langname!': 'Español',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%s %%{row} de... | ajibawa-2023/Python-Code-Large/train/row_664 | 1 | 360 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_664:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 360], "level": 0, "parent": null, "vector": [8, 0, 0.5028, 0.9972, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'файл': ['файла','файлов'],
}
| ajibawa-2023/Python-Code-Large/train/row_665 | 1 | 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_665:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.7, 0.8, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'file': ['files'],
}
| ajibawa-2023/Python-Code-Large/train/row_666 | 1 | 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_666:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.7, 0.8, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""... | [] |
# coding: utf8
{
'!langcode!': 'ja-jp',
'!langname!': '日本語',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s %%{row} deleted': '%s rows deleted',
'%s %%{row} updated': '%s rows updated',
'(requires internet access)': '(インターネットアクセスが必要)',
'(something like "it-it")': '(例: "it-it")',
'@markmin\x01Sear... | ajibawa-2023/Python-Code-Large/train/row_667 | 1 | 189 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_667:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 189], "level": 0, "parent": null, "vector": [8, 0, 0.5053, 0.9947, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'cs-cz',
'!langname!': 'čeština',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': 'Kolonka "Upravit" je nepovinný výraz, například "pole1=\'nováhodnota\'". Výsledky databázového JOINu nemůžete mazat ani upravovat.',
... | ajibawa-2023/Python-Code-Large/train/row_668 | 1 | 480 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_668:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 480], "level": 0, "parent": null, "vector": [8, 0, 0.5021, 0.9979, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'sr-lt',
'!langname!': 'Srpski (Latinica)',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'(requires internet access)': '(zahtijeva pristup internetu)',
'(something like "it-it")': '(nešto kao "it-it")',
'@markmin\x01(file **gluon/contrib/plural_rules/%s.py** is not fo... | ajibawa-2023/Python-Code-Large/train/row_669 | 1 | 212 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_669:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 212], "level": 0, "parent": null, "vector": [8, 0, 0.5047, 0.9953, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'af',
'!langname!': 'Afrikaanse',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s %%{row} deleted': '%s rows deleted',
'%s %%{row} updated': '%s rows updated',
'(requires internet access)': '(vereis internet toegang)',
'(something like "it-it")': '(iets soos "it-it")... | ajibawa-2023/Python-Code-Large/train/row_670 | 1 | 89 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_670:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 89], "level": 0, "parent": null, "vector": [8, 0, 0.5112, 0.9888, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
# coding: utf8
{
'!langcode!': 'uk',
'!langname!': 'Українська',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Оновити" це додатковий вираз, такий, як "field1=\'нове_значення\'". Ви не можете змінювати або вилучати дані об\'єднаних таблиць',
'"User... | ajibawa-2023/Python-Code-Large/train/row_671 | 1 | 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_671:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 489], "level": 0, "parent": null, "vector": [8, 0, 0.502, 0.998, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [] |
# coding: utf8
{
'!langcode!': 'pl',
'!langname!': 'Polska',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
'%Y-%m-%d': '%Y-%m... | ajibawa-2023/Python-Code-Large/train/row_672 | 1 | 277 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_672:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 277], "level": 0, "parent": null, "vector": [8, 0, 0.5036, 0.9964, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'ru',
'!langname!': 'Русский',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden',
'%s %%{row} d... | ajibawa-2023/Python-Code-Large/train/row_673 | 1 | 372 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_673:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 372], "level": 0, "parent": null, "vector": [8, 0, 0.5027, 0.9973, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
# Translation by: Klaus Kappel <kkappel@yahoo.de>
{
'!langcode!': 'de',
'!langname!': 'Deutsch',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse k?nnen nicht... | ajibawa-2023/Python-Code-Large/train/row_674 | 1 | 382 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_674:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 382], "level": 0, "parent": null, "vector": [8, 0, 0.5039, 0.9948, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'bg',
'!langname!': 'Български',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
... | ajibawa-2023/Python-Code-Large/train/row_675 | 1 | 286 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_675:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 286], "level": 0, "parent": null, "vector": [8, 0, 0.5035, 0.9965, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'pt',
'!langname!': 'Português',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN',
'%Y-%m-%d': '%d... | ajibawa-2023/Python-Code-Large/train/row_676 | 1 | 319 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_676:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 319], "level": 0, "parent": null, "vector": [8, 0, 0.5031, 0.9969, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'sl',
'!langname!': 'Slovenski',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Popravi" je izbirni izraz kot npr.: "stolpec1 = \'novavrednost\'". Rezultatov JOIN operacije ne morete popravljati ali brisati',
'%Y-%m-%d... | ajibawa-2023/Python-Code-Large/train/row_677 | 1 | 368 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_677:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 368], "level": 0, "parent": null, "vector": [8, 0, 0.5027, 0.9973, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'файл': ['файли','файлів'],
}
| ajibawa-2023/Python-Code-Large/train/row_678 | 1 | 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_678:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.7, 0.8, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""... | [] |
# coding: utf8
{
'!langcode!': 'he-il',
'!langname!': 'עברית',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"עדכן" הוא ביטוי אופציונאלי, כגון "field1=newvalue". אינך יוכל להשתמש בjoin, בעת שימוש ב"עדכן" או "מחק".',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d... | ajibawa-2023/Python-Code-Large/train/row_679 | 1 | 271 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_679:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 271], "level": 0, "parent": null, "vector": [8, 0, 0.5037, 0.9963, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'fr',
'!langname!': 'Français',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats d\'une j... | ajibawa-2023/Python-Code-Large/train/row_680 | 1 | 279 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_680:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 279], "level": 0, "parent": null, "vector": [8, 0, 0.5036, 0.9964, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'nl',
'!langname!': 'Nederlands',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is een optionele expressie zoals "veld1=\'nieuwewaarde\'". Je kan de resultaten van een JOIN niet updaten of verwijderen.',
'"Use... | ajibawa-2023/Python-Code-Large/train/row_681 | 1 | 481 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_681:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 481], "level": 0, "parent": null, "vector": [8, 0, 0.5021, 0.9979, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'zh-tw',
'!langname!': '台灣中文',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s %... | ajibawa-2023/Python-Code-Large/train/row_682 | 1 | 302 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_682:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 302], "level": 0, "parent": null, "vector": [8, 0, 0.5033, 0.9967, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'en-us',
'!langname!': 'English (US)',
'%Y-%m-%d': '%m-%d-%Y',
'%Y-%m-%d %H:%M:%S': '%m-%d-%Y %H:%M:%S',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(something like "it-it")',
'About': 'About',
'Additional code for your application': 'Additiona... | ajibawa-2023/Python-Code-Large/train/row_683 | 1 | 184 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_683:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 184], "level": 0, "parent": null, "vector": [8, 0, 0.5054, 0.9946, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!=': '!=',
'!langcode!': 'ro',
'!langname!': 'Română',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" (actualizează) este o expresie opțională precum "câmp1=\'valoare_nouă\'". Nu puteți actualiza sau șterge rezultatele unui... | ajibawa-2023/Python-Code-Large/train/row_684 | 1 | 459 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_684:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 459], "level": 0, "parent": null, "vector": [8, 0, 0.5022, 0.9978, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# ###########################################################
# ## generate menu
# ###########################################################
_a = request.application
_c = request.controller
_f = request.function
response.title = '%s %s' % (_f, '/'.join(request.args))
response.subtitle = 'admin'
response.menu = [(T('... | ajibawa-2023/Python-Code-Large/train/row_685 | 19 | 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_685:Assign_L5_C0", "label": "_a =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1351, 0.027, 0, 0.66, 0.0, 635, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_a", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_685:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_685:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_685:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_685:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_685:If_L1... |
response.files.append(
URL('static', 'plugin_multiselect/jquery.multi-select.js'))
response.files.append(URL('static', 'plugin_multiselect/multi-select.css'))
response.files.append(URL('static', 'plugin_multiselect/start.js'))
| ajibawa-2023/Python-Code-Large/train/row_686 | 3 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_686:Expr_L1_C0", "label": "append()", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.5, 0, 0.66, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "a... | [] |
EXPIRATION = 60 * 60 # logout after 60 minutes of inactivity
CHECK_VERSION = True
WEB2PY_URL = 'http://web2py.com'
WEB2PY_VERSION_URL = WEB2PY_URL + '/examples/default/version'
###########################################################################
# Preferences for EditArea
# the user-interface feature that allo... | ajibawa-2023/Python-Code-Large/train/row_687 | 25 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_687:Assign_L1_C0", "label": "EXPIRATION =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 631, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "EXPIRATION", "arg_names": [], "import_names": [], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_687:If_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_687:Expr_L80_C4"}] |
import base64
import os
import time
from gluon import portalocker
from gluon.admin import apath
from gluon.fileutils import read_file
# ###########################################################
# ## make sure administrator is on localhost or https
# ###########################################################
http_ho... | ajibawa-2023/Python-Code-Large/train/row_688 | 114 | 177 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_688:Import_L1_C0", "label": "base64 import base64", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0056, 0.0056, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_688:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_688:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_688:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_688:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_688:If_L1... |
# Template helpers
import os
def A_button(*a, **b):
b['_data-role'] = 'button'
b['_data-inline'] = 'true'
return A(*a, **b)
def button(href, label):
if is_mobile:
ret = A_button(SPAN(label), _href=href)
else:
ret = A(SPAN(label), _class='button btn', _href=href)
return ret
d... | ajibawa-2023/Python-Code-Large/train/row_689 | 25 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_689:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.075, 0.025, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_689:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_689:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_689:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_689:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
if MULTI_USER_MODE:
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
from gluon.tools import *
auth = Auth(
globals(), db) # authentication/authoriz... | ajibawa-2023/Python-Code-Large/train/row_690 | 28 | 42 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_690:If_L4_C0", "label": "if", "type": "if", "loc": [4, 27], "level": 0, "parent": null, "vector": [4, 0, 0.369, 0.5714, 0, 0.66, 0.0, 0, 2, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_690:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_690:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_690:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_690:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_690:If_... |
import time
import os
import sys
import re
import urllib
import cgi
import difflib
import shutil
import stat
import socket
from textwrap import dedent
try:
from mercurial import ui, hg, cmdutil
try:
from mercurial.scmutil import addremove
except:
from mercurial.cmdutil import addremove
... | ajibawa-2023/Python-Code-Large/train/row_691 | 25 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_691:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 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_691:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_691:ImportFrom_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_691:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_691:Try_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_691:... |
from gluon.fileutils import read_file, write_file
if DEMO_MODE or MULTI_USER_MODE:
session.flash = T('disabled in demo mode')
redirect(URL('default', 'site'))
if not have_mercurial:
session.flash = T("Sorry, could not find mercurial installed")
redirect(URL('default', 'design', args=request.args(0)))
... | ajibawa-2023/Python-Code-Large/train/row_692 | 54 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_692:ImportFrom_L1_C0", "label": "from gluon.fileutils import read_file, write_file", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 0, 0.66, 0.0, 948, 0, 2, 0, 0, 948, 0, 0], "semantic": {"name": "gluon.fileutils", "arg_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_692:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_692:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_692:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_692:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_692:If_L6_C0"... |
import os
try:
from distutils import dir_util
except ImportError:
session.flash = T('requires distutils, but not installed')
redirect(URL('default', 'site'))
try:
from git import *
except ImportError:
session.flash = T('requires python-git, but not installed')
redirect(URL('default', 'site'))
... | ajibawa-2023/Python-Code-Large/train/row_694 | 40 | 65 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_694:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0154, 0.0154, 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_694:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_694:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_694:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_694:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_694:T... |
from gluon.admin import *
from gluon.fileutils import abspath, read_file, write_file
from gluon.tools import Service
from glob import glob
import shutil
import platform
import time
import base64
import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
service = Service(g... | ajibawa-2023/Python-Code-Large/train/row_695 | 83 | 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_695:ImportFrom_L1_C0", "label": "from gluon.admin import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 0, 0.66, 0.0, 158, 0, 1, 0, 0, 158, 0, 0], "semantic": {"name": "gluon.admin", "arg_names": [], "import_names": ["*... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_695:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_695:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_695:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_695:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
import sys
import cStringIO
import gluon.contrib.shell
import code
import thread
from gluon.shell import env
if DEMO_MODE or MULTI_USER_MODE:
session.flash = T('disabled in demo mode')
redirect(URL('default', 'site'))
FE = 10 ** 9
def index():
app = request.args(0) or 'admin'
reset()
return dict... | ajibawa-2023/Python-Code-Large/train/row_697 | 38 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_697:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 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_697:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_697:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_697:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_697:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_697:Function... |
### this works on linux only
import re
try:
import fcntl
import subprocess
import signal
import os
import shutil
from gluon.fileutils import read_file, write_file
except:
session.flash = 'sorry, only on Unix systems'
redirect(URL(request.application, 'default', 'site'))
if MULTI_USER_M... | ajibawa-2023/Python-Code-Large/train/row_698 | 63 | 100 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_698:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.03, 0.01, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_698:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_698:Import_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_698:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_698:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_698:Try_L... |
import os
from gluon.settings import global_settings, read_file
#
def index():
app = request.args(0)
return dict(app=app)
def profiler():
"""
to use the profiler start web2py with -F profiler.log
"""
KEY = 'web2py_profiler_size'
filename = global_settings.cmd_options.profiler_filename
... | ajibawa-2023/Python-Code-Large/train/row_699 | 21 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_699:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 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_699:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_699:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_699:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_699:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
response.files = response.files[:3]
response.menu = []
def index():
return locals()
def about():
return locals()
| ajibawa-2023/Python-Code-Large/train/row_701 | 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_701:Assign_L1_C0", "label": "response.files =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1, 0.1, 0, 0.66, 0.0, 886, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "response.files", "arg_names": [], "import_names": [], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_701:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_701:Return_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_701:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_701:Return_L10_C4"}] |
# -*- coding: utf-8 -*-
response.menu = [
(T('Home'), False, URL('default', 'index')),
(T('About'), False, URL('default', 'what')),
(T('Download'), False, URL('default', 'download')),
(T('Docs & Resources'), False, URL('default', 'documentation')),
(T('Support'), False, URL('default', 'support')),
... | ajibawa-2023/Python-Code-Large/train/row_703 | 8 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_703:Assign_L3_C0", "label": "response.menu =", "type": "assigned_variable", "loc": [3, 9], "level": 0, "parent": null, "vector": [14, 0, 0.1333, 0.1556, 0, 0.66, 0.0, 367, 0, 0, 0, 0, 0, 5, 12], "semantic": {"name": "response.menu", "arg_names": [], "import_names": [], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_703:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_703:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_703:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_703:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
session.connect(request,response,cookie_key='yoursecret')
| ajibawa-2023/Python-Code-Large/train/row_704 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_704:Expr_L1_C0", "label": "connect()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 242, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "... | [] |
def group_feed_reader(group, mode='div', counter='5'):
"""parse group feeds"""
url = "http://groups.google.com/group/%s/feed/rss_v2_0_topics.xml?num=%s" %\
(group, counter)
from gluon.contrib import feedparser
g = feedparser.parse(url)
if mode == 'div':
html = XML(TAG.BLOCKQUOTE(... | ajibawa-2023/Python-Code-Large/train/row_705 | 18 | 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_705:FunctionDef_L1_C0", "label": "group_feed_reader", "type": "function", "loc": [1, 24], "level": 0, "parent": null, "vector": [2, 0, 0.2841, 0.5455, 0, 0.66, 0.0, 505, 0, 3, 1, 0, 0, 0, 12], "semantic": {"name": "group_feed_reader", "arg_names": ["group", "mode", "cou... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_705:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_705:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_705:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_705:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
def hello1():
""" simple page without template """
return 'Hello World'
def hello2():
""" simple page without template but with internationalization """
return T('Hello World')
def hello3():
""" page rendered by template simple_examples/index3.html or generic.html"""
return dict(message=... | ajibawa-2023/Python-Code-Large/train/row_707 | 59 | 132 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_707:FunctionDef_L2_C0", "label": "hello1", "type": "function", "loc": [2, 5], "level": 0, "parent": null, "vector": [2, 0, 0.0265, 0.0303, 0, 0.66, 0.0, 328, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "hello1", "arg_names": [], "import_names": [], "rhs_call_name": "", "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_707:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_707:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_707:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_707:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
def index():
return dict()
def data():
if not session.m or len(session.m) == 10:
session.m = []
if request.vars.q:
session.m.append(request.vars.q)
session.m.sort()
return TABLE(*[TR(v) for v in session.m]).xml()
def flash():
response.flash = 'this text should appear!'
re... | ajibawa-2023/Python-Code-Large/train/row_708 | 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_708:FunctionDef_L1_C0", "label": "index", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.075, 0.1, 0, 0.66, 0.0, 780, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_708:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_708:Return_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_708:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_708:If_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
def variables():
return dict(a=10, b=20)
def test_for():
return dict()
def test_if():
return dict()
def test_try():
return dict()
def test_def():
return dict()
def escape():
return dict(message='<h1>text is scaped</h1>')
def xml():
return dict(message=XML('<h1>text is not escaped... | ajibawa-2023/Python-Code-Large/train/row_709 | 16 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_709:FunctionDef_L1_C0", "label": "variables", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.05, 0.0667, 0, 0.66, 0.0, 530, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "variables", "arg_names": [], "import_names": [], "rhs_call_name": "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_709:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_709:Return_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_709:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_709:Return_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
def form():
""" a simple entry form with various types of objects """
form = FORM(TABLE(
TR('Your name:', INPUT(_type='text', _name='name',
requires=IS_NOT_EMPTY())),
TR('Your email:', INPUT(_type='text', _name='email',
requires=IS_EMAIL())),
TR('Admin', INPUT(_typ... | ajibawa-2023/Python-Code-Large/train/row_710 | 9 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_710:FunctionDef_L1_C0", "label": "form", "type": "function", "loc": [1, 22], "level": 0, "parent": null, "vector": [2, 0, 0.5227, 1.0, 0, 0.66, 0.0, 761, 0, 0, 1, 0, 0, 0, 19], "semantic": {"name": "form", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_710:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_710:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_710:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_710:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
def counter():
""" every time you reload, it increases the session.counter """
if not session.counter:
session.counter = 0
session.counter += 1
return dict(counter=session.counter)
| ajibawa-2023/Python-Code-Large/train/row_712 | 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_712:FunctionDef_L1_C0", "label": "counter", "type": "function", "loc": [1, 7], "level": 0, "parent": null, "vector": [2, 0, 0.5714, 1.0, 0, 0.66, 0.0, 7, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "counter", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_712:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_712:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_712:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_712:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
# -*- coding: utf-8 -*-
from gluon.fileutils import read_file
response.title = T('web2py Web Framework')
response.keywords = T('web2py, Python, Web Framework')
response.description = T('web2py Web Framework')
session.forget()
cache_expire = not request.is_local and 300 or 0
@cache('index', time_expire=cache_expire... | ajibawa-2023/Python-Code-Large/train/row_713 | 48 | 95 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_713:ImportFrom_L3_C0", "label": "from gluon.fileutils import read_file", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0316, 0.0105, 0, 0.66, 0.0, 948, 0, 1, 0, 0, 948, 0, 0], "semantic": {"name": "gluon.fileutils", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_713:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_713:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_713:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_713:Import_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
def civilized():
response.menu = [['civilized', True, URL('civilized'
)], ['slick', False, URL('slick')],
['basic', False, URL('basic')]]
response.flash = 'you clicked on civilized'
return dict(message='you clicked on civilized')
def slick(... | ajibawa-2023/Python-Code-Large/train/row_714 | 12 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_714:FunctionDef_L1_C0", "label": "civilized", "type": "function", "loc": [1, 6], "level": 0, "parent": null, "vector": [2, 0, 0.1591, 0.2727, 0, 0.66, 0.0, 926, 0, 0, 1, 0, 0, 0, 4], "semantic": {"name": "civilized", "arg_names": [], "import_names": [], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_714:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_714:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_714:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_714:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
session.forget()
def get(args):
if args[0].startswith('__'):
return None
try:
obj = globals(),get(args[0])
for k in range(1,len(args)):
obj = getattr(obj,args[k])
return obj
except:
return None
def vars():
"""the running controlle... | ajibawa-2023/Python-Code-Large/train/row_715 | 37 | 52 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_715:Expr_L1_C0", "label": "forget()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 757, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "forget", "arg_names": [], "import_names": [], "rhs_call_name": "forget"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_715:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_715:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_715:If_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_715:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_715:Fu... |
import time
def cache_in_ram():
"""cache the output of the lambda function in ram"""
t = cache.ram('time', lambda: time.ctime(), time_expire=5)
return dict(time=t, link=A('click to reload', _href=URL(r=request)))
def cache_on_disk():
"""cache the output of the lambda function on disk"""
t = ca... | ajibawa-2023/Python-Code-Large/train/row_716 | 26 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_716:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 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_716:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_716:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_716:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_716:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
from gluon.contrib.spreadsheet import Sheet
def callback():
return cache.ram('sheet1', lambda: None, None).process(request)
def index():
sheet = cache.ram('sheet1', lambda: Sheet(10, 10, URL('callback')), 0)
#sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True)
return dict(sheet=sheet)
| ajibawa-2023/Python-Code-Large/train/row_717 | 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_717:ImportFrom_L1_C0", "label": "from gluon.contrib.spreadsheet import Sheet", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 696, 0, 1, 0, 0, 696, 0, 0], "semantic": {"name": "gluon.contrib.spreadsheet", "arg_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_717:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_717:Return_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_717:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_717:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# coding: utf8
{
'!langcode!': 'zh-tw',
'!langname!': '中文',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%s %%{row} deleted': '已刪除 %s 筆',
'%s %%{row} updated': '已更新 %s 筆',
'%s s... | ajibawa-2023/Python-Code-Large/train/row_718 | 1 | 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_718:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 231], "level": 0, "parent": null, "vector": [8, 0, 0.5043, 0.9957, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!=': '!=',
'!langcode!': 'it',
'!langname!': 'Italiano',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOI... | ajibawa-2023/Python-Code-Large/train/row_719 | 1 | 245 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_719:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 245], "level": 0, "parent": null, "vector": [8, 0, 0.5041, 0.9959, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'es',
'!langname!': 'Español',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%s %%{row} de... | ajibawa-2023/Python-Code-Large/train/row_720 | 1 | 318 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_720:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 318], "level": 0, "parent": null, "vector": [8, 0, 0.5031, 0.9969, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'выбрана': ['выбраны','выбрано'],
'запись': ['записи','записей'],
'изменена': ['изменены','изменено'],
'строка': ['строки','строк'],
'удалена': ['удалены','удалено'],
'день': ['дня', 'дней'],
'месяц': ['месяца','мес... | ajibawa-2023/Python-Code-Large/train/row_721 | 1 | 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_721:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 16], "level": 0, "parent": null, "vector": [8, 0, 0.5625, 0.9375, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'account': ['accounts'],
'book': ['books'],
'is': ['are'],
'man': ['men'],
'miss': ['misses'],
'person': ['people'],
'quark': ['quarks'],
'shop': ['shops'],
'this': ['these'],
'was': ['were'],
'woman': ['women'],
}
| ajibawa-2023/Python-Code-Large/train/row_722 | 1 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_722:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.5667, 0.9333, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
# coding: utf8
{
'!langcode!': 'cs-cz',
'!langname!': 'čeština',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': 'Kolonka "Upravit" je nepovinný výraz, například "pole1=\'nováhodnota\'". Výsledky databázového JOINu nemůžete mazat ani upravovat.',
... | ajibawa-2023/Python-Code-Large/train/row_723 | 1 | 480 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_723:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 480], "level": 0, "parent": null, "vector": [8, 0, 0.5021, 0.9979, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'my',
'!langname!': 'Malay',
'%d days ago': '%d hari yang lalu',
'%d hours ago': '%d jam yang lalu',
'%d minutes ago': '%d minit yang lalu',
'%d months ago': '%d bulan yang lalu',
'%d seconds ago': '%d saat yang lalu',
'%d seconds from now': '%d saat dari sekarang',
'%d weeks ago': '%d mi... | ajibawa-2023/Python-Code-Large/train/row_724 | 1 | 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_724:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 217], "level": 0, "parent": null, "vector": [8, 0, 0.5046, 0.9954, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'sk',
'!langname!': 'Slovenský',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newvalue\'". Nemôžete upravovať alebo zmazať výsledky JOINu',
'%s %%{row} deleted': '%s zmazaných... | ajibawa-2023/Python-Code-Large/train/row_725 | 1 | 171 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_725:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 171], "level": 0, "parent": null, "vector": [8, 0, 0.5058, 0.9942, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'uk',
'!langname!': 'Українська',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Оновити" це додатковий вираз, такий, як "field1=\'нове_значення\'". Ви не можете змінювати або вилучати дані об\'єднаних таблиць.',
'%d d... | ajibawa-2023/Python-Code-Large/train/row_726 | 1 | 221 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_726:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 221], "level": 0, "parent": null, "vector": [8, 0, 0.5045, 0.9955, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'pl',
'!langname!': 'Polska',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
'%s %%{row} delete... | ajibawa-2023/Python-Code-Large/train/row_727 | 1 | 171 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_727:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 171], "level": 0, "parent": null, "vector": [8, 0, 0.5058, 0.9942, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'vteřina': ['vteřiny', 'vteřin'],
'vteřinou': ['vteřinami', 'vteřinami'],
'minuta': ['minuty', 'minut'],
'minutou': ['minutami', 'minutami'],
'hodina': ['hodiny','hodin'],
'hodinou': ['hodinami','hodinami'],... | ajibawa-2023/Python-Code-Large/train/row_728 | 1 | 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_728:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 20], "level": 0, "parent": null, "vector": [8, 0, 0.55, 0.95, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":... | [] |
# coding: utf8
{
'!langcode!': 'ru',
'!langname!': 'Русский',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Изменить" - необязательное выражение вида "field1=\'новое значение\'". Результаты операции JOIN нельзя изменить или удалить.',
'%d days ago'... | ajibawa-2023/Python-Code-Large/train/row_729 | 1 | 195 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_729:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 195], "level": 0, "parent": null, "vector": [8, 0, 0.5051, 0.9949, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'pt',
'!langname!': 'Português',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%s %%{row} delete... | ajibawa-2023/Python-Code-Large/train/row_730 | 1 | 184 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_730:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 184], "level": 0, "parent": null, "vector": [8, 0, 0.5054, 0.9946, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'hi-in',
'!langname!': 'हिन्दी',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%s %%{row} deleted': '%... | ajibawa-2023/Python-Code-Large/train/row_731 | 1 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_731:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 149], "level": 0, "parent": null, "vector": [8, 0, 0.5067, 0.9933, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'hu',
'!langname!': 'Magyar',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%s %%{row} deleted': '%s s... | ajibawa-2023/Python-Code-Large/train/row_732 | 1 | 162 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_732:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 162], "level": 0, "parent": null, "vector": [8, 0, 0.5062, 0.9938, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/env python
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'байт': ['байти','байтів'],
'годину': ['години','годин'],
'елемент': ['елементи','елементів'],
'запис': ['записи','записів'],
'поцілювання': ['поцілювання','поцілювань'],
'рядок': ['рядки','рядків'],
'секунду': ['се... | ajibawa-2023/Python-Code-Large/train/row_733 | 1 | 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_733:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 17], "level": 0, "parent": null, "vector": [8, 0, 0.5588, 0.9412, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
# coding: utf8
{
'!langcode!': 'pt-br',
'!langname!': 'Português (do Brasil)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN',
... | ajibawa-2023/Python-Code-Large/train/row_734 | 1 | 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_734:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 170], "level": 0, "parent": null, "vector": [8, 0, 0.5059, 0.9941, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'fr',
'!langname!': 'Français',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOI... | ajibawa-2023/Python-Code-Large/train/row_735 | 1 | 190 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_735:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 190], "level": 0, "parent": null, "vector": [8, 0, 0.5053, 0.9947, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'fr-ca',
'!langname!': 'Français (Canadien)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résul... | ajibawa-2023/Python-Code-Large/train/row_736 | 1 | 195 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_736:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 195], "level": 0, "parent": null, "vector": [8, 0, 0.5051, 0.9949, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'nl',
'!langname!': 'Nederlands',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%(nrows)s records foun... | ajibawa-2023/Python-Code-Large/train/row_737 | 1 | 376 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_737:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 376], "level": 0, "parent": null, "vector": [8, 0, 0.5027, 0.9973, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'en-us',
'!langname!': 'English (US)',
'%s %%(shop)': '%s %%(shop)',
'%s %%(shop[0])': '%s %%(shop[0])',
'%s %%{quark[0]}': '%s %%{quark[0]}',
'%s %%{shop[0]}': '%s %%{shop[0]}',
'%s %%{shop}': '%s %%{shop}',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'@markmin\x01*... | ajibawa-2023/Python-Code-Large/train/row_738 | 1 | 122 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_738:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 122], "level": 0, "parent": null, "vector": [8, 0, 0.5082, 0.9918, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!=': '!=',
'!langcode!': 'ro',
'!langname!': 'Română',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" (actualizează) este o expresie opțională precum "câmp1=\'valoare_nouă\'". Nu puteți actualiza sau șterge rezultatele unui... | ajibawa-2023/Python-Code-Large/train/row_739 | 1 | 373 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_739:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 373], "level": 0, "parent": null, "vector": [8, 0, 0.5027, 0.9973, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# coding: utf8
{
'!langcode!': 'id',
'!langname!': 'Indonesian',
'%d days ago': '%d hari yang lalu',
'%d hours ago': '%d jam yang lalu',
'%d minutes ago': '%d menit yang lalu',
'%d months ago': '%d bulan yang lalu',
'%d seconds ago': '%d detik yang lalu',
'%d seconds from now': '%d detik dari sekarang',
'%d weeks ago':... | ajibawa-2023/Python-Code-Large/train/row_740 | 1 | 272 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_740:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 272], "level": 0, "parent": null, "vector": [8, 0, 0.5037, 0.9963, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## Customize your APP title, subtitle and menus here
#########################################################################
response.logo... | ajibawa-2023/Python-Code-Large/train/row_741 | 17 | 140 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_741:Assign_L8_C0", "label": "response.logo = A()", "type": "assigned_variable", "loc": [8, 9], "level": 0, "parent": null, "vector": [14, 0, 0.0607, 0.0143, 0, 0.66, 0.0, 964, 3, 4, 0, 0, 429, 10, 4], "semantic": {"name": "response.logo", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_741:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_741:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_741:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_741:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.