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 |
|---|---|---|---|---|---|---|---|
"""
forlater
This file loads the finished app from forlater.config.middleware.
"""
from forlater.config.middleware import make_app
| ajibawa-2023/Python-Code-Large/train/row_5393 | 2 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5393:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.4375, 0.75, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [] |
from forlater.lib.base import *
from time import *
from sqlalchemy import *
from paste.request import get_cookie_dict
import os
import shutil
import sys
import urllib
import httplib
class AController(BaseController):
def index(self):
return Response('4l8r')
def send_sms_message(self):
if... | ajibawa-2023/Python-Code-Large/train/row_5394 | 84 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5394:ImportFrom_L1_C0", "label": "from forlater.lib.base import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0091, 0.0091, 0, 0.66, 0.0, 130, 0, 1, 0, 0, 130, 0, 0], "semantic": {"name": "forlater.lib.base", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5394:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5394:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5394:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5394:Return_L15_C8"}, {"f": "ajibawa-2023/Python-Code... |
from forlater.lib.base import *
class TemplateController(BaseController):
def view(self, url):
"""
This is the last place which is tried during a request to try to find a
file to serve. It could be used for example to display a template::
def view(self, url):
... | ajibawa-2023/Python-Code-Large/train/row_5395 | 5 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5395:ImportFrom_L1_C0", "label": "from forlater.lib.base import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 130, 0, 1, 0, 0, 130, 0, 0], "semantic": {"name": "forlater.lib.base", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5395:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5395:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5395:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5395:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large... |
from paste import fileapp
from forlater.lib.base import *
from sqlalchemy import *
from forlater.lib.entry import *
from time import *
import os
import shutil
class PController(BaseController):
def index(self, id):
user = session.get('user', None)
col = model.entries_table.c
if (id == Non... | ajibawa-2023/Python-Code-Large/train/row_5396 | 167 | 213 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5396:ImportFrom_L1_C0", "label": "from paste import fileapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 525, 0, 1, 0, 0, 525, 0, 0], "semantic": {"name": "paste", "arg_names": [], "import_names": ["fileap... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5396:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5396:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5396:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5396:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code... |
from forlater.lib.base import *
from sqlalchemy import *
from paste import fileapp
import os
import shutil
class RController(BaseController):
def index(self):
user = session.get('user', None)
c.studies = None
c.recent_entries = None
c.users = None
try:
... | ajibawa-2023/Python-Code-Large/train/row_5397 | 272 | 491 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5397:ImportFrom_L1_C0", "label": "from forlater.lib.base import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.002, 0.002, 0, 0.66, 0.0, 130, 0, 1, 0, 0, 130, 0, 0], "semantic": {"name": "forlater.lib.base", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5397:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5397:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5397:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5397:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-La... |
from forlater.lib.base import *
from sqlalchemy import *
class LoginController(BaseController):
def index(self):
c.msg = get_message()
c.error = get_error()
c.attempted_username = ''
if request.params.has_key('username') and request.params.has_key('password'):
c.attempte... | ajibawa-2023/Python-Code-Large/train/row_5398 | 108 | 137 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5398:ImportFrom_L1_C0", "label": "from forlater.lib.base import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 0, 0.66, 0.0, 130, 0, 1, 0, 0, 130, 0, 0], "semantic": {"name": "forlater.lib.base", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5398:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5398:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5398:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5398:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import os.path
from paste import fileapp
from pylons.middleware import media_path, error_document_template
from pylons.util import get_prefix
from forlater.lib.base import *
forlater_error_template = """\
<html>
<head>
<title>4l8r - Server Error %(code)s</title>
<style>
h1 {
font-family: calibri,verdana,sans-serif;
... | ajibawa-2023/Python-Code-Large/train/row_5399 | 20 | 91 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5399:Import_L1_C0", "label": "os.path import os.path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.011, 0.011, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5399:ClassDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5399:Expr_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5399:ClassDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5399:FunctionDef_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
"""
Setup your Routes options here
"""
import os
from routes import Mapper
def make_map(global_conf={}, app_conf={}):
root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
map = Mapper(directory=os.path.join(root_path, 'controllers'))
# This route handles displaying the error page a... | ajibawa-2023/Python-Code-Large/train/row_5400 | 24 | 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_5400:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0476, 0.0714, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5400:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5400:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5400:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5400:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#
| ajibawa-2023/Python-Code-Large/train/row_5401 | 0 | 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"] | [] | [] |
from paste import httpexceptions
from paste.cascade import Cascade
from paste.urlparser import StaticURLParser
from paste.registry import RegistryManager
from paste.deploy.config import ConfigMiddleware, CONFIG
from paste.deploy.converters import asbool
from pylons.error import error_template
from pylons.middleware im... | ajibawa-2023/Python-Code-Large/train/row_5402 | 32 | 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_5402:ImportFrom_L1_C0", "label": "from paste import httpexceptions", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 525, 0, 1, 0, 0, 525, 0, 0], "semantic": {"name": "paste", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5402:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5402:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5402:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5402:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import os
import pylons.config
import webhelpers
from forlater.config.routing import make_map
def load_environment(global_conf={}, app_conf={}):
map = make_map(global_conf, app_conf)
# Setup our paths
root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
paths = {'root_path': root_p... | ajibawa-2023/Python-Code-Large/train/row_5403 | 12 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5403:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 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_5403:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5403:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5403:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5403:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
"""
Helper functions
All names available in this module will be available under the Pylons h object.
"""
from webhelpers import *
from pylons.helpers import log
from pylons.i18n import get_lang, set_lang
| ajibawa-2023/Python-Code-Large/train/row_5404 | 4 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5404:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.625, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [] |
from pylons import Response, c, g, cache, request, session
from pylons.controllers import WSGIController
from pylons.decorators import jsonify, validate
from pylons.templating import render, render_response
from pylons.helpers import abort, redirect_to, etag_cache
from pylons.i18n import N_, _, ungettext
import forlate... | ajibawa-2023/Python-Code-Large/train/row_5405 | 72 | 102 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5405:ImportFrom_L1_C0", "label": "from pylons import Response, c, g\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0098, 0.0098, 0, 0.66, 0.0, 113, 0, 6, 0, 0, 113, 0, 0], "semantic": {"name": "pylons", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5405:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5405:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5405:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5405:Return_L25_C8"}, {"f": "ajibawa-2023/Python-Code... |
header_txt = """\
<html>
<head>
<title>4l8r%(title)s</title>
<script src="/js/prototype.js" type="text/javascript"></script>
<script src="/js/scriptaculous.js" type="text/javascript"></script>
<style>
a:link {color: #990000}
a:visited {color: #990000}
a:hover {color: #CC6666}
a:active {color: #CC6666}
h1 {
font-famil... | ajibawa-2023/Python-Code-Large/train/row_5406 | 19 | 125 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5406:Assign_L1_C0", "label": "header_txt =", "type": "assigned_variable", "loc": [1, 83], "level": 0, "parent": null, "vector": [14, 0, 0.336, 0.664, 0, 0.66, 0.0, 873, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "header_txt", "arg_names": [], "import_names": [], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5406:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5406:Assign_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5406:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5406:If_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
from xml.dom.minidom import *
class Entry:
def __init__(self, id=0, questions=[]):
self.id = id
self.questions = questions[:]
def _to_xml(self, d):
e = d.createElement('entry')
e.setAttribute('id', str(self.id))
for q in self.questions:
e.appendChild(q._to_xm... | ajibawa-2023/Python-Code-Large/train/row_5407 | 118 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5407:ImportFrom_L1_C0", "label": "from xml.dom.minidom import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0068, 0.0068, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "xml.dom.minidom", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5407:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5407:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5407:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5407:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import re
class Globals(object):
def __init__(self, global_conf, app_conf, **extra):
"""
Globals acts as a container for objects available throughout
the life of the application.
One instance of Globals is created by Pylons during
application initialization and is availabl... | ajibawa-2023/Python-Code-Large/train/row_5408 | 15 | 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_5408:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 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_5408:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5408:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5408:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5408:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large... |
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='Forlater',
version="0.8.5",
#description="",
#author="",
#author_email="",
#url="",
install_requires=["Pylons>=0.9.5"],
packages=find_packages(),
package_data={
'for... | ajibawa-2023/Python-Code-Large/train/row_5411 | 4 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5411:ImportFrom_L1_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_nam... | [] |
#!/usr/bin/python
# Load the WSGI application from the config file
from paste.deploy import loadapp
wsgi_app = loadapp('config:/usr/lib/cgi-bin/4l8r/production.ini')
# Deploy it using FastCGI
if __name__ == '__main__':
from flup.server.fcgi import WSGIServer
WSGIServer(wsgi_app).run()
| ajibawa-2023/Python-Code-Large/train/row_5412 | 5 | 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_5412:ImportFrom_L4_C0", "label": "from paste.deploy import loadapp", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.1, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "paste.deploy", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5412:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5412:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5412:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5412:Expr_L10_C4"}] |
#!/usr/bin/python
# Load the WSGI application from the config file
from paste.deploy import loadapp
wsgi_app = loadapp('config:/usr/lib/cgi-bin/4l8r/production.ini')
# Deploy it using FastCGI
if __name__ == '__main__':
from flup.server.fcgi import WSGIServer
WSGIServer(wsgi_app).run()
| ajibawa-2023/Python-Code-Large/train/row_5414 | 5 | 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_5414:ImportFrom_L4_C0", "label": "from paste.deploy import loadapp", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.1, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "paste.deploy", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5414:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5414:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5414:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5414:Expr_L10_C4"}] |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: plot.py
# $Date: Thu Mar 13 20:23:07 2014 +0800
# $Author: jiakai <jia.kai66@gmail.com>
import pyximport
pyximport.install()
import datafilter
from sample_and_record import get_db_conn
import matplotlib.pyplot as plt
from matplotlib import dates
import sys
imp... | ajibawa-2023/Python-Code-Large/train/row_5416 | 68 | 103 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5416:Import_L7_C0", "label": "pyximport import pyximport", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.068, 0.0097, 0, 0.66, 0.0, 732, 0, 1, 0, 0, 732, 0, 0], "semantic": {"name": "pyximport", "arg_names": [], "import_names": ["pyximp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5416:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5416:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5416:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5416:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: daemon.py
# $Date: Mon Mar 03 09:35:26 2014 +0800
# $Author: jiakai <jia.kai66@gmail.com>
from sample_and_record import insert_db_entry
import time
MIN_UPTIME = 120
SAMPLE_DELTA = 300
def get_uptime():
with open('/proc/uptime') as fin:
return map(f... | ajibawa-2023/Python-Code-Large/train/row_5417 | 12 | 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_5417:ImportFrom_L7_C0", "label": "from sample_and_record import insert_db_entry", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2917, 0.0417, 0, 0.66, 0.0, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "sample_and_record", "arg_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5417:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5417:Return_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5417:If_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5417:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: dataproc.py
# $Date: Tue Mar 11 00:25:03 2014 +0800
# $Author: jiakai <jia.kai66@gmail.com>
import math
class LinearFunction(object):
k = None
b = None
def __init__(self, x0, y0, x1, y1):
self.k = (y1 - y0) / (x1 - x0)
self.b = y0 - ... | ajibawa-2023/Python-Code-Large/train/row_5418 | 37 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5418:Import_L7_C0", "label": "math import math", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1029, 0.0147, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5418:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5418:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5418:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5418:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: sample_and_record.py
# $Date: Wed Mar 12 23:03:06 2014 +0800
# $Author: jiakai <jia.kai66@gmail.com>
from gevent import monkey
monkey.patch_all()
import gevent
import re
import json
import urllib2
import subprocess
import os
import os.path
import sqlite3
import ... | ajibawa-2023/Python-Code-Large/train/row_5419 | 86 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5419:ImportFrom_L7_C0", "label": "from gevent import monkey", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0519, 0.0074, 0, 0.66, 0.0, 703, 0, 1, 0, 0, 703, 0, 0], "semantic": {"name": "gevent", "arg_names": [], "import_names": ["monke... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5419:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5419:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5419:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5419:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: update_db.py
# $Date: Tue Mar 11 00:07:07 2014 +0800
# $Author: jiakai <jia.kai66@gmail.com>
import sys
sys.path.append('..')
from sample_and_record import get_db_conn, init_db
from dataproc import aqi2concentration, lowratio2concentration
def update_db():
... | ajibawa-2023/Python-Code-Large/train/row_5420 | 15 | 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_5420:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2121, 0.0303, 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_5420:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5420:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5420:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5420:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: utf-8 -*-
from __future__ import with_statement # This isn't required in Python 2.6
__metaclass__ = type
from contextlib import closing, contextmanager
import os, sys, traceback
import os.path
from mod_python import apache, util
from util import parse_qs
today = date.today
ver = sys.version_inf... | ajibawa-2023/Python-Code-Large/train/row_5422 | 128 | 289 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5422:ImportFrom_L2_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0035, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5422:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5422:Import_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5422:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5422:ImportFrom_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from sys import stdin
x, = map(float, stdin.readline().strip().split())
print abs(x)
| ajibawa-2023/Python-Code-Large/train/row_5424 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5424:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
a, b = map(int, stdin.readline().strip().split())
print b, a
| ajibawa-2023/Python-Code-Large/train/row_5425 | 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_5425:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
print n*(n+1)/2
| ajibawa-2023/Python-Code-Large/train/row_5426 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5426:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
a, b, c = map(int, stdin.readline().strip().split())
print "%.3lf" % ((a+b+c)/3.0)
| ajibawa-2023/Python-Code-Large/train/row_5427 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5427:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
n = stdin.readline().strip().split()[0]
print '%c%c%c' % (n[2], n[1], n[0])
| ajibawa-2023/Python-Code-Large/train/row_5428 | 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_5428:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
money = n * 95
if money >= 300: money *= 0.85
print "%.2lf" % money
| ajibawa-2023/Python-Code-Large/train/row_5429 | 5 | 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_5429:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from math import *
x1, y1, x2, y2 = map(float, stdin.readline().strip().split())
print "%.3lf" % hypot((x1-x2), (y1-y2))
| ajibawa-2023/Python-Code-Large/train/row_5430 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5430:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
f, = map(float, stdin.readline().strip().split())
print "%.3lf" % (5*(f-32)/9)
| ajibawa-2023/Python-Code-Large/train/row_5431 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5431:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
n, m = map(int, stdin.readline().strip().split())
a = (4*n-m)/2
b = n-a
if m % 2 == 1 or a < 0 or b < 0: print "No answer"
else: print a, b
| ajibawa-2023/Python-Code-Large/train/row_5432 | 4 | 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_5432:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
a, b, c = map(int, stdin.readline().strip().split())
if a*a + b*b == c*c or a*a + c*c == b*b or b*b + c*c == a*a: print "yes"
elif a + b <= c or a + c <= b or b + c <= a: print "not a triangle"
else: print "no"
| ajibawa-2023/Python-Code-Large/train/row_5433 | 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_5433:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
print ["yes", "no"][n % 2]
| ajibawa-2023/Python-Code-Large/train/row_5434 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5434:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
from math import *
n, = map(int, stdin.readline().strip().split())
rad = radians(n)
print "%.3lf %.3lf" % (sin(rad), cos(rad))
| ajibawa-2023/Python-Code-Large/train/row_5435 | 5 | 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_5435:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
a = map(int, stdin.readline().strip().split())
a.sort()
print a[0], a[1], a[2]
| ajibawa-2023/Python-Code-Large/train/row_5436 | 4 | 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_5436:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from math import *
r, h = map(float, stdin.readline().strip().split())
print "Area = %.3lf" % (pi*r*r*2 + 2*pi*r*h)
| ajibawa-2023/Python-Code-Large/train/row_5437 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5437:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
from calendar import isleap
year, = map(int, stdin.readline().strip().split())
if isleap(year): print "yes"
else: print "no"
| ajibawa-2023/Python-Code-Large/train/row_5438 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5438:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
s = i = 0
while True:
term = 1.0 / (i*2+1)
s += term * ((-1)**i)
if term < 1e-6: break
i += 1
print "%.6lf" % s
| ajibawa-2023/Python-Code-Large/train/row_5439 | 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_5439:Assign_L1_C0", "label": "s =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 553, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5439:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5439:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5439:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5439:If_L5_C2"}] |
from sys import stdin
n, m = map(int, stdin.readline().strip().split())
print "%.5lf" % sum([1.0/i/i for i in range(n,m+1)])
| ajibawa-2023/Python-Code-Large/train/row_5440 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5440:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
from decimal import *
a, b, c = map(int, stdin.readline().strip().split())
getcontext().prec = c
print Decimal(a) / Decimal(b)
| ajibawa-2023/Python-Code-Large/train/row_5441 | 5 | 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_5441:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from itertools import product
from math import *
def issqrt(n):
s = int(floor(sqrt(n)))
return s*s == n
aabb = [a*1100+b*11 for a,b in product(range(1,10),range(10))]
print ' '.join(map(str, filter(issqrt, aabb)))
| ajibawa-2023/Python-Code-Large/train/row_5442 | 7 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5442:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5442:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5442:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5442:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5442:Return_L6_C2"}] |
from sys import stdin
from math import *
n = int(stdin.readline().strip())
print sum(map(factorial, range(1,n+1))) % (10**6)
| ajibawa-2023/Python-Code-Large/train/row_5443 | 4 | 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_5443:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
def cycle(n):
if n == 1: return 0
elif n % 2 == 1: return cycle(n*3+1) + 1
else: return cycle(n/2) + 1
n = int(stdin.readline().strip())
print cycle(n)
| ajibawa-2023/Python-Code-Large/train/row_5444 | 9 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5444:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5444:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5444:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5444:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5444:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
for abc in range(123, 329):
big = str(abc) + str(abc*2) + str(abc*3)
if(''.join(sorted(big)) == '123456789'): print abc, abc*2, abc*3
| ajibawa-2023/Python-Code-Large/train/row_5445 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5445:For_L1_C0", "label": "for abc", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.75, 1.0, 0, 0.66, 0.0, 38, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "abc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5445:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5445:Assign_L2_C2"}] |
from sys import stdin
print len(stdin.readline().strip())
| ajibawa-2023/Python-Code-Large/train/row_5446 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5446:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
def solve(a, b, c):
for i in range(10, 101):
if i % 3 == a and i % 5 == b and i % 7 == c:
print i
return
print 'No answer'
a, b, c = map(int, stdin.readline().strip().split())
solve(a, b, c)
| ajibawa-2023/Python-Code-Large/train/row_5447 | 9 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5447:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5447:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5447:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5447:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5447:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5447... |
from sys import stdin
data = map(int, stdin.readline().strip().split())
n, m = data[0], data[-1]
data = data[1:-1]
print len(filter(lambda x: x < m, data))
| ajibawa-2023/Python-Code-Large/train/row_5448 | 5 | 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_5448:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
a = map(int, stdin.readline().strip().split())
print "%d %d %.3lf" % (min(a), max(a), float(sum(a)) / len(a))
| ajibawa-2023/Python-Code-Large/train/row_5449 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5449:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
n = int(stdin.readline().strip())
print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
| ajibawa-2023/Python-Code-Large/train/row_5450 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5450:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from itertools import product
sol = [a*100+b*10+c for a,b,c in product(range(1,10), range(10), range(10)) if a**3+b**3+c**3 == a*100+b*10+c]
print '\n'.join(map(str, sol))
| ajibawa-2023/Python-Code-Large/train/row_5451 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5451:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ... | [] |
from sys import stdin
n = int(stdin.readline().strip())
count = n*2-1
for i in range(n):
print ' '*i + '#'*count
count -= 2
| ajibawa-2023/Python-Code-Large/train/row_5452 | 5 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5452:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5452:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5452:Expr_L5_C2"}] |
#! /usr/bin/env python
# coding=utf-8
#############################################################################
# #
# File: common.py #
# ... | ajibawa-2023/Python-Code-Large/train/row_5453 | 24 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5453:Import_L28_C0", "label": "os import os, sys", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.4444, 0.0159, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5453:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5453:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5453:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5453:Return_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import sys, os
# do the UNIX double-fork magic, see Stevens' "Advanced
# Programming in the UNIX Environment" for details (ISBN 0201563177)
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError, e:
print >>sys.stderr, "fo... | ajibawa-2023/Python-Code-Large/train/row_5455 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5455:Import_L1_C0", "label": "sys import sys, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"], "rhs_c... | [] |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | ajibawa-2023/Python-Code-Large/train/row_5457 | 75 | 127 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5457:Import_L21_C0", "label": "wsgiref.handlers import wsgiref.handlers", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1654, 0.0079, 0, 0.66, 0.0, 709, 0, 1, 0, 0, 709, 0, 0], "semantic": {"name": "wsgiref.handlers", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5457:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5457:Assign_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5457:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5457:Assign_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | ajibawa-2023/Python-Code-Large/train/row_5458 | 75 | 127 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5458:Import_L21_C0", "label": "wsgiref.handlers import wsgiref.handlers", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1654, 0.0079, 0, 0.66, 0.0, 709, 0, 1, 0, 0, 709, 0, 0], "semantic": {"name": "wsgiref.handlers", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5458:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5458:Assign_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5458:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5458:Assign_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import xmlrpclib
from SimpleXMLRPCServer import SimpleXMLRPCServer
def debug(message):
print "[Debug] " + message
return "OK"
def info(message):
print "[Infor] " + message
server = SimpleXMLRPCServer(("localhost",8888))
print "Listening on port 8888"
server.register_function(debug,"debug")
server.serve_for... | ajibawa-2023/Python-Code-Large/train/row_5460 | 11 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5460:Import_L1_C0", "label": "xmlrpclib import xmlrpclib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 251, 0, 1, 0, 0, 251, 0, 0], "semantic": {"name": "xmlrpclib", "arg_names": [], "import_names": ["xmlrp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5460:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5460:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5460:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5460:Return_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import os
import sys
sys.path.append('/var/www/python/application')
os.environ['PYTHON_EGG_CACHE'] = '/var/www/python/application/.python-egg'
def application(environ, start_response):
status = '200 OK'
output = 'path /var/www/python/application'
response_headers = [('Content-type', 'text/plain'),
... | ajibawa-2023/Python-Code-Large/train/row_5461 | 10 | 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_5461:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 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_5461:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5461:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5461:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5461:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
s = i = 0
while True:
term = 1.0 / (i*2+1)
s += term * ((-1)**i)
if term < 1e-6: break
i += 1
print "%.6lf" % s
| ajibawa-2023/Python-Code-Large/train/row_5462 | 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_5462:Assign_L1_C0", "label": "s =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 553, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5462:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5462:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5462:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5462:If_L5_C2"}] |
from sys import stdin
a = map(int, stdin.readline().strip().split())
print "%d %d %.3lf" % (min(a), max(a), float(sum(a)) / len(a))
| ajibawa-2023/Python-Code-Large/train/row_5463 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5463:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
from math import *
n = int(stdin.readline().strip())
print sum(map(factorial, range(1,n+1))) % (10**6)
| ajibawa-2023/Python-Code-Large/train/row_5464 | 4 | 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_5464:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
def solve(a, b, c):
for i in range(10, 101):
if i % 3 == a and i % 5 == b and i % 7 == c:
print i
return
print 'No answer'
a, b, c = map(int, stdin.readline().strip().split())
solve(a, b, c)
| ajibawa-2023/Python-Code-Large/train/row_5465 | 9 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5465:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5465:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5465:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5465:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5465:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5465... |
from itertools import product
sol = [a*100+b*10+c for a,b,c in product(range(1,10), range(10), range(10)) if a**3+b**3+c**3 == a*100+b*10+c]
print '\n'.join(map(str, sol))
| ajibawa-2023/Python-Code-Large/train/row_5466 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5466:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ... | [] |
from sys import stdin
n = int(stdin.readline().strip())
count = n*2-1
for i in range(n):
print ' '*i + '#'*count
count -= 2
| ajibawa-2023/Python-Code-Large/train/row_5467 | 5 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5467:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5467:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5467:Expr_L5_C2"}] |
from sys import stdin
n, m = map(int, stdin.readline().strip().split())
print "%.5lf" % sum([1.0/i/i for i in range(n,m+1)])
| ajibawa-2023/Python-Code-Large/train/row_5468 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5468:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
print len(stdin.readline().strip())
| ajibawa-2023/Python-Code-Large/train/row_5469 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5469:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from decimal import *
a, b, c = map(int, stdin.readline().strip().split())
getcontext().prec = c
print Decimal(a) / Decimal(b)
| ajibawa-2023/Python-Code-Large/train/row_5470 | 5 | 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_5470:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from itertools import product
from math import *
def issqrt(n):
s = int(floor(sqrt(n)))
return s*s == n
aabb = [a*1100+b*11 for a,b in product(range(1,10),range(10))]
print ' '.join(map(str, filter(issqrt, aabb)))
| ajibawa-2023/Python-Code-Large/train/row_5471 | 7 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5471:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5471:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5471:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5471:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5471:Return_L6_C2"}] |
from sys import stdin
data = map(int, stdin.readline().strip().split())
n, m = data[0], data[-1]
data = data[1:-1]
print len(filter(lambda x: x < m, data))
| ajibawa-2023/Python-Code-Large/train/row_5472 | 5 | 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_5472:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
for abc in range(123, 329):
big = str(abc) + str(abc*2) + str(abc*3)
if(''.join(sorted(big)) == '123456789'): print abc, abc*2, abc*3
| ajibawa-2023/Python-Code-Large/train/row_5473 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5473:For_L1_C0", "label": "for abc", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.75, 1.0, 0, 0.66, 0.0, 38, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "abc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5473:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5473:Assign_L2_C2"}] |
from sys import stdin
n = int(stdin.readline().strip())
print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
| ajibawa-2023/Python-Code-Large/train/row_5474 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5474:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
def cycle(n):
if n == 1: return 0
elif n % 2 == 1: return cycle(n*3+1) + 1
else: return cycle(n/2) + 1
n = int(stdin.readline().strip())
print cycle(n)
| ajibawa-2023/Python-Code-Large/train/row_5475 | 9 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5475:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5475:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5475:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5475:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5475:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
money = n * 95
if money >= 300: money *= 0.85
print "%.2lf" % money
| ajibawa-2023/Python-Code-Large/train/row_5476 | 5 | 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_5476:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from math import *
x1, y1, x2, y2 = map(float, stdin.readline().strip().split())
print "%.3lf" % hypot((x1-x2), (y1-y2))
| ajibawa-2023/Python-Code-Large/train/row_5477 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5477:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
print ["yes", "no"][n % 2]
| ajibawa-2023/Python-Code-Large/train/row_5478 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5478:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
n, m = map(int, stdin.readline().strip().split())
a = (4*n-m)/2
b = n-a
if m % 2 == 1 or a < 0 or b < 0: print "No answer"
else: print a, b
| ajibawa-2023/Python-Code-Large/train/row_5479 | 4 | 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_5479:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from math import *
n, = map(int, stdin.readline().strip().split())
rad = radians(n)
print "%.3lf %.3lf" % (sin(rad), cos(rad))
| ajibawa-2023/Python-Code-Large/train/row_5480 | 5 | 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_5480:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
from calendar import isleap
year, = map(int, stdin.readline().strip().split())
if isleap(year): print "yes"
else: print "no"
| ajibawa-2023/Python-Code-Large/train/row_5481 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5481:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
a, b = map(int, stdin.readline().strip().split())
print b, a
| ajibawa-2023/Python-Code-Large/train/row_5482 | 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_5482:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
f, = map(float, stdin.readline().strip().split())
print "%.3lf" % (5*(f-32)/9)
| ajibawa-2023/Python-Code-Large/train/row_5483 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5483:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
a, b, c = map(int, stdin.readline().strip().split())
if a*a + b*b == c*c or a*a + c*c == b*b or b*b + c*c == a*a: print "yes"
elif a + b <= c or a + c <= b or b + c <= a: print "not a triangle"
else: print "no"
| ajibawa-2023/Python-Code-Large/train/row_5484 | 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_5484:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
a = map(int, stdin.readline().strip().split())
a.sort()
print a[0], a[1], a[2]
| ajibawa-2023/Python-Code-Large/train/row_5485 | 4 | 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_5485:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call... | [] |
from sys import stdin
n, = map(int, stdin.readline().strip().split())
print n*(n+1)/2
| ajibawa-2023/Python-Code-Large/train/row_5486 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5486:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
x, = map(float, stdin.readline().strip().split())
print abs(x)
| ajibawa-2023/Python-Code-Large/train/row_5487 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5487:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
a, b, c = map(int, stdin.readline().strip().split())
print "%.3lf" % ((a+b+c)/3.0)
| ajibawa-2023/Python-Code-Large/train/row_5488 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5488:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh... | [] |
from sys import stdin
from math import *
r, h = map(float, stdin.readline().strip().split())
print "Area = %.3lf" % (pi*r*r*2 + 2*pi*r*h)
| ajibawa-2023/Python-Code-Large/train/row_5489 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5489:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
from sys import stdin
n = stdin.readline().strip().split()[0]
print '%c%c%c' % (n[2], n[1], n[0])
| ajibawa-2023/Python-Code-Large/train/row_5490 | 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_5490:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca... | [] |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.ext import db
from google.appengine.api import users
class Categories(db.Expando):
""" categories of different places data model """
name = db.... | ajibawa-2023/Python-Code-Large/train/row_5491 | 29 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5491:ImportFrom_L5_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0213, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5491:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5491:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5491:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5491:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
| ajibawa-2023/Python-Code-Large/train/row_5492 | 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_5492:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "ann... | [] |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.ext import webapp
import os
# test print envs
class PrintEnvironment(webapp.RequestHandler):
def get(self):
for name in os.environ.keys():
self.respons... | ajibawa-2023/Python-Code-Large/train/row_5493 | 6 | 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_5493:ImportFrom_L6_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.0667, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5493:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5493:FunctionDef_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5493:FunctionDef_L12_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5493:For_L13_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
import cgi
import datetime
import logging
from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengi... | ajibawa-2023/Python-Code-Large/train/row_5494 | 42 | 71 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5494:Import_L5_C0", "label": "cgi import cgi", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0704, 0.0141, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5494:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5494:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5494:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5494:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.ext import webapp
from google.appengine.ext import db
import os
class Point(db.Expando):
""" save a point with a comment """
lat = db.StringProperty(req... | ajibawa-2023/Python-Code-Large/train/row_5495 | 16 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5495:ImportFrom_L6_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2143, 0.0357, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5495:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5495:Expr_L11_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5495:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5495:Assign_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.ext import db
from google.appengine.api import users
class Categories(db.Expando):
""" categories of different places data model """
name = db.... | ajibawa-2023/Python-Code-Large/train/row_5496 | 29 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5496:ImportFrom_L5_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0213, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5496:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5496:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5496:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5496:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.api import urlfetch
from google.appengine.ext import webapp
# test fetch url
class Fetch(webapp.RequestHandler):
def get(self):
self.response.out.write("""
... | ajibawa-2023/Python-Code-Large/train/row_5497 | 12 | 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_5497:ImportFrom_L5_C0", "label": "from google.appengine.api import urlfetch", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0333, 0, 0.66, 0.0, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5497:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5497:FunctionDef_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5497:FunctionDef_L10_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5497:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
import os
import wsgiref.handlers
#import cgi
import datetime
import logging
from google.appengine.api import mail
from google.appengine.api import memcache
from google.appeng... | ajibawa-2023/Python-Code-Large/train/row_5498 | 26 | 53 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5498:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0943, 0.0189, 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_5498:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5498:Expr_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5498:If_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5498:Expr_L52_C2"}] |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.ext import webapp
import os
# test print envs
class PrintEnvironment(webapp.RequestHandler):
def get(self):
for name in os.environ.keys():
self.respons... | ajibawa-2023/Python-Code-Large/train/row_5499 | 6 | 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_5499:ImportFrom_L6_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.0667, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5499:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5499:FunctionDef_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5499:FunctionDef_L12_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5499:For_L13_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
# test json rpc call
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from django.utils import simplejson
class RPCHandler(webapp.Re... | ajibawa-2023/Python-Code-Large/train/row_5500 | 52 | 94 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5500:ImportFrom_L7_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0745, 0.0106, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5500:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5500:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5500:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5500:FunctionDef_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
# vim: set filetype=python expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
# -*- coding: utf-8 -*-
#
from google.appengine.api import urlfetch
from google.appengine.ext import webapp
# test fetch url
class Fetch(webapp.RequestHandler):
def get(self):
self.response.out.write("""
... | ajibawa-2023/Python-Code-Large/train/row_5501 | 12 | 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_5501:ImportFrom_L5_C0", "label": "from google.appengine.api import urlfetch", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0333, 0, 0.66, 0.0, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5501:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5501:FunctionDef_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5501:FunctionDef_L10_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5501:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.