code stringlengths 1 1.49M | file_id stringlengths 42 46 | node_count int64 0 7.38k | total_lines int64 1 20.9k | vector_dim int64 15 15 | vector_labels stringclasses 1
value | nodes stringlengths 2 3.75M | connections stringlengths 2 964k |
|---|---|---|---|---|---|---|---|
#!/usr/bin/python -w
import subprocess
import math
# This code does not need to be very fast; it will have maybe 2-3 ops per frame.
class Matrix4(object):
def __init__(self, coefficients):
"""Initialize the matrix from the given coefficients"""
assert len(coefficients) == 4
for c in coeffic... | ajibawa-2023/Python-Code-Large/train/row_5070 | 80 | 139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5070:Import_L2_C0", "label": "subprocess import subprocess", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0144, 0.0072, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["su... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5070:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5070:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5070:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5070:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python -w
import subprocess
import math
# This code does not need to be very fast; it will have maybe 2-3 ops per frame.
class Matrix4(object):
def __init__(self, coefficients):
"""Initialize the matrix from the given coefficients"""
assert len(coefficients) == 4
for c in coeffic... | ajibawa-2023/Python-Code-Large/train/row_5071 | 80 | 139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5071:Import_L2_C0", "label": "subprocess import subprocess", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0144, 0.0072, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["su... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5071:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5071:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5071:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5071:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''###########################################################################################################################
### File: Player.py
### Name: Patrick Delaney, Tom WIlliams, John Mannix
### Class: CSE 487
### Instructor: Dr.Zmuda
### Assignment: Assignment 3
### Files included: Utilities.py, brickou... | ajibawa-2023/Python-Code-Large/train/row_5072 | 44 | 76 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5072:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0724, 0.1316, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5072:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5072:Expr_L45_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5072:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5072:FunctionDef_L51_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
from pandac.PandaModules import *
class Picker:
def __init__(self, parent=None, fromMask=BitMask32(0), collideWithGeom=False, intoMask=BitMask32(0)):
if (parent==None):
parent = camera
self.cRay = CollisionRay()
self.cNode = CollisionNode('PickRay')
self.cNode.ad... | ajibawa-2023/Python-Code-Large/train/row_5073 | 33 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5073:ImportFrom_L1_C0", "label": "from pandac.PandaModules import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 6, 0, 1, 0, 0, 6, 0, 0], "semantic": {"name": "pandac.PandaModules", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5073:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5073:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5073:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5073:If_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
'''###########################################################################################################################
### File: Objects.py
### Name: Patrick Delaney, Tom Williams, John Mannix
### Class: CSE 487
### Instructor: Dr.Zmuda
### Assignment: Assignment 3
### Files included: Utilities.py, bricko... | ajibawa-2023/Python-Code-Large/train/row_5076 | 32 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5076:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0786, 0.1429, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5076:ClassDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5076:Expr_L43_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5076:ClassDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5076:FunctionDef_L50_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''###########################################################################################################################
### File: Utilities.py
### Name: Patrick Delaney
### Class: CSE 487
### Instructor: Dr.Zmuda
### Assignment: Assignment 3
### Files included: Utilities.py, brickout.py
### Description: T... | ajibawa-2023/Python-Code-Large/train/row_5077 | 52 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5077:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0943, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5077:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5077:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5077:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5077:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| ajibawa-2023/Python-Code-Large/train/row_5078 | 10 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5078:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na... | [] |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | ajibawa-2023/Python-Code-Large/train/row_5079 | 63 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5079:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5079:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5079:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5079:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5079:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | ajibawa-2023/Python-Code-Large/train/row_5080 | 20 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5080:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_5080:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5080:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5080:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5080:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_50... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | ajibawa-2023/Python-Code-Large/train/row_5081 | 50 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5081:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5081:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5081:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5081:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5081:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | ajibawa-2023/Python-Code-Large/train/row_5082 | 42 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5082:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5082:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5082:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5082:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5082:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | ajibawa-2023/Python-Code-Large/train/row_5083 | 44 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5083:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5083:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5083:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5083:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5083:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | ajibawa-2023/Python-Code-Large/train/row_5084 | 38 | 74 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5084:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5084:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5084:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5084:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5084:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
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_5085 | 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_5085: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_5086 | 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_5086: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 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_5087 | 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_5087: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_5088 | 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_5088: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_5089 | 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_5089: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, 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_5090 | 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_5090: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())
money = n * 95
if money >= 300: money *= 0.85
print "%.2lf" % money
| ajibawa-2023/Python-Code-Large/train/row_5091 | 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_5091: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 ["yes", "no"][n % 2]
| ajibawa-2023/Python-Code-Large/train/row_5092 | 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_5092: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 *
x1, y1, x2, y2 = map(float, stdin.readline().strip().split())
print "%.3lf" % hypot((x1-x2), (y1-y2))
| ajibawa-2023/Python-Code-Large/train/row_5093 | 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_5093: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_5094 | 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_5094: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
x, = map(float, stdin.readline().strip().split())
print abs(x)
| ajibawa-2023/Python-Code-Large/train/row_5095 | 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_5095: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 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_5096 | 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_5096: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
f, = map(float, stdin.readline().strip().split())
print "%.3lf" % (5*(f-32)/9)
| ajibawa-2023/Python-Code-Large/train/row_5097 | 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_5097: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_5098 | 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_5098: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_5099 | 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_5099: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... | [] |
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_5100 | 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_5100: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_5100:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5100:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5100:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5100:If_L5_C2"}] |
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_5101 | 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_5101: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 = int(stdin.readline().strip())
print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
| ajibawa-2023/Python-Code-Large/train/row_5102 | 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_5102: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_5103 | 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_5103: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 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_5104 | 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_5104: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_5104:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5104:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5104:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5104:Return_L6_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_5105 | 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_5105: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_5106 | 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_5106: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_5106:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5106:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5106:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5106:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
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_5107 | 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_5107: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_5107:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5107:Expr_L5_C2"}] |
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_5108 | 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_5108: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_5108:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5108:Assign_L2_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_5109 | 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_5109: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
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_5110 | 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_5110: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_5111 | 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_5111: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_5111:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5111:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5111:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5111:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5111... |
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_5112 | 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_5112: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
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_5113 | 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_5113: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())
print "%.3lf" % ((a+b+c)/3.0)
| ajibawa-2023/Python-Code-Large/train/row_5114 | 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_5114: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_5115 | 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_5115: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 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_5116 | 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_5116: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_5117 | 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_5117: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_5118 | 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_5118: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, 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_5119 | 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_5119: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())
money = n * 95
if money >= 300: money *= 0.85
print "%.2lf" % money
| ajibawa-2023/Python-Code-Large/train/row_5120 | 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_5120: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 ["yes", "no"][n % 2]
| ajibawa-2023/Python-Code-Large/train/row_5121 | 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_5121: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 *
x1, y1, x2, y2 = map(float, stdin.readline().strip().split())
print "%.3lf" % hypot((x1-x2), (y1-y2))
| ajibawa-2023/Python-Code-Large/train/row_5122 | 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_5122: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_5123 | 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_5123: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
x, = map(float, stdin.readline().strip().split())
print abs(x)
| ajibawa-2023/Python-Code-Large/train/row_5124 | 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_5124: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 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_5125 | 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_5125: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
f, = map(float, stdin.readline().strip().split())
print "%.3lf" % (5*(f-32)/9)
| ajibawa-2023/Python-Code-Large/train/row_5126 | 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_5126: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_5127 | 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_5127: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_5128 | 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_5128: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... | [] |
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_5129 | 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_5129: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_5129:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5129:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5129:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5129:If_L5_C2"}] |
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_5130 | 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_5130: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 = int(stdin.readline().strip())
print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
| ajibawa-2023/Python-Code-Large/train/row_5131 | 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_5131: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_5132 | 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_5132: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 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_5133 | 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_5133: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_5133:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5133:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5133:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5133:Return_L6_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_5134 | 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_5134: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_5135 | 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_5135: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_5135:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5135:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5135:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5135:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
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_5136 | 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_5136: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_5136:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5136:Expr_L5_C2"}] |
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_5137 | 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_5137: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_5137:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5137:Assign_L2_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_5138 | 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_5138: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
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_5139 | 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_5139: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_5140 | 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_5140: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_5140:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5140:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5140:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5140:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5140... |
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_5141 | 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_5141: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
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_5142 | 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_5142: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... | [] |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
# @author Sam Pullara, samp@yahoo-inc.com
import logging
import wsgiref.handlers
import os
from google.appengine.ext.webapp import templat... | ajibawa-2023/Python-Code-Large/train/row_5143 | 91 | 118 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5143:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0424, 0.0085, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5143:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5143:FunctionDef_L25_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5143:FunctionDef_L25_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5143:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
""" A simple text library for normalizing, cleaning, and overlapping strings """
__author__ = "Vik Singh (viksi@yahoo-inc.com)"
STOPWORD... | ajibawa-2023/Python-Code-Large/train/row_5144 | 23 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5144:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1316, 0.0263, 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_5144:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5144:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5144:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5144:If_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__all__ = ["console", "text", "typechecks"]
| ajibawa-2023/Python-Code-Large/train/row_5145 | 1 | 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_5145:Assign_L4_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__author__ = "Vik Singh (viksi@yahoo-inc.com)"
from yos.crawl import object_dict
from types import DictType, ListType, TupleType
OBJ_DIC... | ajibawa-2023/Python-Code-Large/train/row_5146 | 10 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5146:Assign_L5_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.2632, 0.0526, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5146:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5146:Return_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5146:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5146:Return_L16_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__author__ = "Vik Singh (viksi@yahoo-inc.com)"
def strfix(msg):
"""
Copies this recipe: http://aspn.activestate.com/ASPN/Cookbook/Pyt... | ajibawa-2023/Python-Code-Large/train/row_5147 | 23 | 37 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5147:Assign_L5_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1351, 0.027, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5147:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5147:Expr_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5147:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5147:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__all__ = ["ysearch"]
| ajibawa-2023/Python-Code-Large/train/row_5149 | 1 | 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_5149:Assign_L4_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
#! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
""" Dictionary to XML - Library to convert a python dictionary to XML output
Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com>
Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz
Revision 1.0 2007/12/15 11:57:20 Maurizio
- ... | ajibawa-2023/Python-Code-Large/train/row_5150 | 38 | 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_5150:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0798, 0.0851, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5150:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5150:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5150:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5150:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/local/bin/python25
# Thunder Chen<nkchenz@gmail.com> 2007.9.1
#
#
import xml.etree.ElementTree as ET
from object_dict import object_dict
def __parse_node(node):
tmp = object_dict()
# save attrs and text, hope there will not be a child with same name
if node.text:
tmp['value'] = node.text
... | ajibawa-2023/Python-Code-Large/train/row_5151 | 37 | 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_5151:Import_L6_C0", "label": "xml.etree.ElementTree import ET", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0159, 0, 0.66, 0.0, 902, 0, 1, 0, 0, 902, 0, 0], "semantic": {"name": "xml.etree.ElementTree", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5151:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5151:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5151:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5151:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
""" Functions for downloading REST API's and converting their responses into dictionaries """
__author__ = "Vik Singh (viksi@yahoo-inc.co... | ajibawa-2023/Python-Code-Large/train/row_5152 | 20 | 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_5152:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1515, 0.0303, 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_5152:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5152:Assign_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5152:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5152:If_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__all__ = ["dict2xml", "object_dict", "rest", "xml2dict"]
| ajibawa-2023/Python-Code-Large/train/row_5153 | 1 | 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_5153:Assign_L4_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
# object_dict
# Thunder Chen<nkchenz@gmail.com> 2007
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
class object_dict(dict):
"""object view of dict, you can
>>> a = object_dict()
>>> a.fish = 'fish'
>>> a['fish']
'fish'
>>> a['water'] = 'water'
>>> a.water
'wa... | ajibawa-2023/Python-Code-Large/train/row_5154 | 18 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5154:ClassDef_L5_C0", "label": "object_dict", "type": "class", "loc": [5, 33], "level": 0, "parent": null, "vector": [3, 0, 0.4634, 0.7073, 0, 0.66, 0.0, 814, 0, 3, 0, 0, 827, 0, 5], "semantic": {"name": "object_dict", "arg_names": [], "import_names": [], "rhs_call_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5154:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5154:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5154:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5154:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
""" Dictionary to XML - Library to convert a python dictionary to XML output
Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com>
Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz
Revision 1.0 2007/12/15 11:57:20 Maurizio
- ... | ajibawa-2023/Python-Code-Large/train/row_5155 | 38 | 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_5155:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0798, 0.0851, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5155:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5155:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5155:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5155:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__all__ = ["boss", "crawl", "yql"]
| ajibawa-2023/Python-Code-Large/train/row_5156 | 1 | 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_5156:Assign_L4_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
""" Some handy user defined functions to plug in db.select """
__author__ = "Vik Singh (viksi@yahoo-inc.com)"
from util.typechecks impor... | ajibawa-2023/Python-Code-Large/train/row_5158 | 11 | 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_5158:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2083, 0.0417, 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_5158:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5158:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5158:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5158:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
__all__ = ["asizeof", "db", "udfs"]
| ajibawa-2023/Python-Code-Large/train/row_5159 | 1 | 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_5159:Assign_L4_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
# Copyright (c) 2008 Yahoo! Inc. All rights reserved.
# Licensed under the Yahoo! Search BOSS Terms of Use
# (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html)
"""
Calculate the size of an object in python
This code used to be very complicated, and then realized in certain cases it failed
Given th... | ajibawa-2023/Python-Code-Large/train/row_5160 | 4 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5160:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 12], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.4706, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5160:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5160:Return_L17_C2"}] |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | ajibawa-2023/Python-Code-Large/train/row_5161 | 63 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5161:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5161:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5161:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5161:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5161:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | ajibawa-2023/Python-Code-Large/train/row_5162 | 20 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5162:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_5162:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5162:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5162:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5162:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_51... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | ajibawa-2023/Python-Code-Large/train/row_5163 | 50 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5163:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5163:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5163:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5163:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5163:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | ajibawa-2023/Python-Code-Large/train/row_5164 | 42 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5164:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5164:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5164:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5164:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5164:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | ajibawa-2023/Python-Code-Large/train/row_5165 | 44 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5165:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5165:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5165:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5165:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5165:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | ajibawa-2023/Python-Code-Large/train/row_5166 | 63 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5166:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5166:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5166:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5166:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5166:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | ajibawa-2023/Python-Code-Large/train/row_5167 | 42 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5167:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5167:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5167:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5167:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5167:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | ajibawa-2023/Python-Code-Large/train/row_5168 | 50 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5168:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5168:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5168:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5168:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5168:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | ajibawa-2023/Python-Code-Large/train/row_5169 | 20 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5169:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_5169:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5169:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5169:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5169:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_51... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | ajibawa-2023/Python-Code-Large/train/row_5170 | 44 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5170:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5170:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5170:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5170:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5170:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import sys, hashlib
def write_file(fn, buf):
fp = open(fn, "wb")
fp.write(buf)
fp.close()
def usage():
print ("Usage: " + sys.argv[0] + " infile outfile label")
def main():
if( len(sys.argv) != 4):
usage()
sys.exit()
fp = open( sys.argv[1] , "rb")
hash_str = has... | ajibawa-2023/Python-Code-Large/train/row_5171 | 23 | 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_5171:Import_L3_C0", "label": "sys import sys, hashlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0238, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "hashlib... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5171:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5171:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5171:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5171:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python
import sys, re, os
def write_file(fn, buf):
fp = open(fn, "wb")
fp.write(buf)
fp.close()
def usage():
print ("Usage: " + os.path.split(__file__)[1] + " version outfile")
def crete_version_str(ver):
base = list("0.00")
version = str(ver)
ret = []
base[0] = version[0]
base... | ajibawa-2023/Python-Code-Large/train/row_5172 | 38 | 52 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5172:Import_L3_C0", "label": "sys import sys, re, os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 0, 0.66, 0.0, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "re", "os... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5172:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5172:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5172:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5172:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python
""" PRO build script"""
import os, shutil, sys
NIGHTLY=0
VERSION="B9"
PRO_BUILD = [
{ "fn": "620PRO-%s.rar", "config": "CONFIG_620=1" },
{ "fn": "635PRO-%s.rar", "config": "CONFIG_635=1" },
{ "fn": "639PRO-%s.rar", "config": "CONFIG_639=1" },
{ "fn": "660PRO-%s.rar", "config": "CONFIG_... | ajibawa-2023/Python-Code-Large/train/row_5173 | 52 | 101 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5173:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0297, 0.0099, 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_5173:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5173:If_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5173:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5173:Expr_L41_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.