code stringlengths 1 1.49M | file_id stringlengths 42 46 | node_count int64 0 7.38k | total_lines int64 1 20.9k | vector_dim int64 15 15 | vector_labels stringclasses 1
value | nodes stringlengths 2 3.75M | connections stringlengths 2 964k |
|---|---|---|---|---|---|---|---|
#!/usr/bin/env python
try:
from ez_setup import use_setuptools
use_setuptools()
except ImportError:
pass
from setuptools import setup, find_packages
import os
import pywebdav
CHANGES = open(os.path.join(os.path.dirname(__file__), 'doc/Changes'),
'r').read()
DOC = """
WebDAV library for python.
Con... | ajibawa-2023/Python-Code-Large/train/row_76760 | 9 | 107 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76760:Try_L3_C0", "label": "try", "type": "try", "loc": [3, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0467, 0.0467, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76760:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76760:ImportFrom_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76760:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76760:Expr_L5_C4"}] |
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(name="pymdptoolbox",
version="0",
author="Steven A. W. Cordwell",
author_email="steven.cordwell@uqconnect.edu.au",
url="http://code.google.com/p/pymdptoolbox/",
description="Markov Decision Process (MDP) Toolbox",
long_d... | ajibawa-2023/Python-Code-Large/train/row_76762 | 2 | 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_76762:ImportFrom_L2_C0", "label": "from distutils.core import setup", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_... | [] |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 14 07:18:32 2013
@author: steve
"""
import os
import sqlite3
from numpy import arange
from numpy.random import permutation, random, randint
from scipy.sparse import dok_matrix
from mdp import ValueIteration
from mdpsql import ValueIteration as ValueIterationSQL
def se... | ajibawa-2023/Python-Code-Large/train/row_76763 | 45 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76763:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 0.0735, 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_76763:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76763:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76763:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76763:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
import cPickle as pickle
import numpy as np
from scipy.sparse import dok_matrix
from mdptoolbox import mdp
ACTIONS = 9
STATES = 3**ACTIONS
PLAYER = 1
OPPONENT = 2
WINS = ([1, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 1, 1],
[1, 0, 0, ... | ajibawa-2023/Python-Code-Large/train/row_76764 | 105 | 190 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76764:Import_L3_C0", "label": "cPickle import pickle", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0158, 0.0053, 0, 0.66, 0.0, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "cPickle", "arg_names": [], "import_names": ["pickle"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76764:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76764:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76764:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76764:Return_L37_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
"""Optimal fire management of a spatially structured threatened species
====================================================================
This PyMDPtoolbox example is based on a paper [Possingham1997]_ preseneted by
Hugh Possingham and Geoff Tuck at the 1997 MODSIM conference. The paper is
... | ajibawa-2023/Python-Code-Large/train/row_76765 | 107 | 388 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76765:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0219, 0.0361, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76765:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76765:Expr_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76765:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76765:Return_L81_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
import os
import sqlite3
from time import time
from numpy import arange
from numpy.random import permutation, random, randint
def exampleForest(S=3, r1=4, r2=2, p=0.1):
db = "MDP-forest-%s.db" % S
if os.path.exists(db):
os.remove(db)
conn = sqlite3.connect(db)
with co... | ajibawa-2023/Python-Code-Large/train/row_76766 | 192 | 331 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76766:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0091, 0.003, 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_76766:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76766:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76766:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76766:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# -*- coding: utf-8 -*-
"""Markov Decision Process (MDP) Toolbox: ``example`` module
=========================================================
The ``example`` module provides functions to generate valid MDP transition and
reward matrices.
Available functions
-------------------
forest
A simple forest management e... | ajibawa-2023/Python-Code-Large/train/row_76767 | 80 | 342 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76767:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0249, 0.0409, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76767:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76767:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76767:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76767:If_L163_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
# -*- coding: utf-8 -*-
"""Markov Decision Process (MDP) Toolbox: ``utils`` module
=======================================================
The ``utils`` module provides functions to check that an MDP is validly
described. There are also functions for working with MDPs while they are being
solved.
Available functions
... | ajibawa-2023/Python-Code-Large/train/row_76768 | 63 | 341 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76768:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0293, 0.0499, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76768:FunctionDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76768:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76768:FunctionDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76768:Try_L122_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# -*- coding: utf-8 -*-
"""Markov Decision Process (MDP) Toolbox
=====================================
The MDP toolbox provides classes and functions for the resolution of
descrete-time Markov Decision Processes.
Available modules
-----------------
example
Examples of transition and reward matrices that form vali... | ajibawa-2023/Python-Code-Large/train/row_76769 | 7 | 87 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76769:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 50], "level": 0, "parent": null, "vector": [8, 0, 0.2989, 0.5632, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76769:If_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76769:Import_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76769:If_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76769:Expr_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7... |
# -*- coding: utf-8 -*-
"""Markov Decision Process (MDP) Toolbox: ``mdp`` module
=====================================================
The ``mdp`` module provides classes for the resolution of descrete-time Markov
Decision Processes.
Available classes
-----------------
MDP
Base Markov decision process class
Finit... | ajibawa-2023/Python-Code-Large/train/row_76770 | 413 | 1,570 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76770:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 29], "level": 0, "parent": null, "vector": [8, 0, 0.0099, 0.0178, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76770:Try_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76770:ImportFrom_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76770:Try_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76770:ImportFrom_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 24 14:44:07 2013
@author: steve
"""
import numpy as np
import scipy as sp
import mdptoolbox.example
STATES = 10
ACTIONS = 3
SMALLNUM = 10e-12
# np.arrays
P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]])
R_small = np.array([[5, 10], [-1, 2]])
P_sparse... | ajibawa-2023/Python-Code-Large/train/row_76771 | 18 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76771:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1143, 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... | [] |
# -*- coding: utf-8 -*-
#def test_JacksCarRental():
# S = 21 ** 2
# A = 11
# P = np.zeros((A, S, S))
# R = np.zeros((A, S, S))
# for a in range(A):
# for s in range(21):
# for s1 in range(21):
# c1s = int(s / 21)
# c2s = s - c1s * 21
# c1s1 ... | ajibawa-2023/Python-Code-Large/train/row_76772 | 0 | 129 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
# -*- coding: utf-8 -*-
"""The Python Markov Decision Process (MDP) Toolbox Test Suite
===========================================================
These unit tests are written for the nosetests framwork. You will need to have
nosetests installed, and then run from the command line.
$ cd /path/to/pymdptoolbox
... | ajibawa-2023/Python-Code-Large/train/row_76773 | 1 | 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_76773:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 11], "level": 0, "parent": null, "vector": [8, 0, 0.5909, 0.9091, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [] |
from google.appengine.ext import db
class Level(db.Model):
"""Holds meta-data for a level in the game."""
owner = db.UserProperty()
level = db.StringProperty(required=True)
next_level = db.StringProperty(default='')
base_rows = db.IntegerProperty(required=True)
static_blocks = db.TextProperty(required=Tru... | ajibawa-2023/Python-Code-Large/train/row_76774 | 22 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76774:ImportFrom_L1_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76774:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76774:Expr_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76774:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76774:Assign_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
SELLER_ID = "BOGUS_ID"
SELLER_SECRET = "BOGUS_KEY"
| ajibawa-2023/Python-Code-Large/train/row_76775 | 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_76775:Assign_L1_C0", "label": "SELLER_ID =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 232, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SELLER_ID", "arg_names": [], "import_names": [], "rhs_call_nam... | [] |
# Copyright 2011 Google Inc. All Rights Reserved.
# pylint: disable-msg=C6409,C6203
"""Separate models module for IAP Hello World."""
__author__ = 'dhermes@google.com (Danny Hermes)'
# standard library imports
import os
import pickle
import time
# third-party imports
from google.appengine.api import users
from goo... | ajibawa-2023/Python-Code-Large/train/row_76776 | 292 | 557 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76776:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 5], "level": 0, "parent": null, "vector": [8, 0, 0.009, 0.0018, 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_76776:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76776:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76776:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76776:Return_L32_C2"}, {"f": "ajibawa-2023/Python-Code... |
OPEN_ID_PROVIDERS = (
('Google', 'www.google.com/accounts/o8/id'),
('Yahoo', 'yahoo.com'),
('MySpace', 'myspace.com'),
('AOL', 'aol.com'),
('MyOpenID', 'myopenid.com'),
)
POSTBACK_URL = 'http://iap-hello-world.appspot.com/postback-verify'
| ajibawa-2023/Python-Code-Large/train/row_76777 | 2 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76777:Assign_L1_C0", "label": "OPEN_ID_PROVIDERS =", "type": "assigned_variable", "loc": [1, 7], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.875, 0, 0.66, 0.0, 645, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "OPEN_ID_PROVIDERS", "arg_names": [], "import_names":... | [] |
""" JSON Web Token implementation
Minimum implementation based on this spec:
http://self-issued.info/docs/draft-jones-json-web-token-01.html
"""
import base64
import hashlib
import hmac
try:
import json
except ImportError:
import simplejson as json
__all__ = ['encode', 'decode', 'DecodeError']
class Dec... | ajibawa-2023/Python-Code-Large/train/row_76778 | 42 | 72 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76778:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0694, 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_76778:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76778:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76778:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76778:Import_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from main import DBPIckle
from models import Level
level_one = Level(level='1', next_level='2', base_rows=4,
static_blocks=DBPIckle({7: [4, 5], 13: [4], 17: [4, 5]}),
move_blocks=DBPIckle({2: [4], 10: [4]}),
door=DBPIckle({'row': 4, 'column': 23}),
... | ajibawa-2023/Python-Code-Large/train/row_76779 | 12 | 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_76779:ImportFrom_L1_C0", "label": "from main import DBPIckle", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 624, 0, 1, 0, 0, 624, 0, 0], "semantic": {"name": "main", "arg_names": [], "import_names": ["DBPIck... | [] |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76780 | 133 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76780:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76780:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76780:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76780:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76780:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76781 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76781:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76781:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76781:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76781:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76781:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_76783 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76783:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76783:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76783:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76783:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76783:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_76785 | 86 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76785:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76785:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76785:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76785:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76785:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_76787 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76787:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76787:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76787:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76787:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76787:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76788 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76788:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76788:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76788:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76788:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76788:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76790 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76790:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76790:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76790:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76790:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76790:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76791 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76791:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76791:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76791:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76791:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76791:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76792 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76792:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76792:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76792:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76792:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76792:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76793 | 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_76793:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76794 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76794:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76794:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76794:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76794:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76794:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_76796 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76796:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76796:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76796:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76796:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76796:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76797 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76797:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76797:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76797:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76797:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76797:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76798 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76798:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76798:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76798:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76798:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76798:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76799 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76799:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76799:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76799:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76799:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76799:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76801 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76801:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76801:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76801:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76801:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76801:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76803 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76803:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76803:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76803:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76803:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76803:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76804 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76804:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76804:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76804:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76804:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76804:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76805 | 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_76805:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76806 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76806:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76806:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76806:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76806:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76806:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76807 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76807:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76807:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76807:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76807:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76807:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_76808 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76808:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76808:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76808:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76808:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76808:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_76810 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76810:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76810:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76810:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76810:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76810:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_76811 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76811:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76811:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76811:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76811:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76811:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_76812 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76812:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76812:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76812:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76812:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76812:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76813 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76813:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76813:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76813:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76813:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76813:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76814 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76814:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76814:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76814:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76814:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76814:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_76816 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76816:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76816:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76816:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76816:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76816:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_76817 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76817:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76817:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76817:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76817:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76817:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | ajibawa-2023/Python-Code-Large/train/row_76818 | 22 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76818:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.3542, 0.0208, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76818:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76818:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76818:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76818:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | ajibawa-2023/Python-Code-Large/train/row_76819 | 11 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76819:Import_L17_C0", "label": "base64 import base64", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0294, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76819:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76819:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76819:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76819:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | ajibawa-2023/Python-Code-Large/train/row_76820 | 52 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76820:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1753, 0.0103, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76820:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76820:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76820:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76820:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | ajibawa-2023/Python-Code-Large/train/row_76821 | 26 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76821:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.2881, 0.0169, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76821:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76821:Assign_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76821:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76821:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Co... |
# Initialize App Engine and import the default settings (DB backend, etc.).
# If you want to use a different backend you have to remove all occurences
# of "djangoappengine" from this file.
from djangoappengine.settings_base import *
import os
# Activate django-dbindexer for the default database
DATABASES['native'] =... | ajibawa-2023/Python-Code-Large/train/row_76822 | 13 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76822:ImportFrom_L4_C0", "label": "from djangoappengine.settings_base import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.08, 0.02, 0, 0.66, 0.0, 423, 0, 1, 0, 0, 423, 0, 0], "semantic": {"name": "djangoappengine.settings_base", "a... | [] |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76823 | 5 | 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_76823:ImportFrom_L16_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.3902, 0.0244, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "ar... | [] |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76824 | 16 | 43 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76824:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.4419, 0.1163, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76824:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76824:Expr_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76824:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76824:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76825 | 280 | 520 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76825:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0375, 0.0115, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76825:ClassDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76825:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76825:ClassDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76825:Expr_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from dbindexer import autodiscover
autodiscover()
| ajibawa-2023/Python-Code-Large/train/row_76826 | 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_76826:ImportFrom_L1_C0", "label": "from dbindexer import autodiscover", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "dbindexer", "arg_names": [], "import_names": ... | [] |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | ajibawa-2023/Python-Code-Large/train/row_76827 | 8 | 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_76827:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76827:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76827:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76827:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76827:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_76828 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76828:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76828:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76828:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76828:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76828:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
# Initialize App Engine and import the default settings (DB backend, etc.).
# If you want to use a different backend you have to remove all occurences
# of "djangoappengine" from this file.
from djangoappengine.settings_base import *
import os
# Activate django-dbindexer for the default database
DATABASES['native'] =... | ajibawa-2023/Python-Code-Large/train/row_76829 | 13 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76829:ImportFrom_L4_C0", "label": "from djangoappengine.settings_base import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.08, 0.02, 0, 0.66, 0.0, 423, 0, 1, 0, 0, 423, 0, 0], "semantic": {"name": "djangoappengine.settings_base", "a... | [] |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76830 | 5 | 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_76830:ImportFrom_L16_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.3902, 0.0244, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "ar... | [] |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76831 | 16 | 43 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76831:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.4419, 0.1163, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76831:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76831:Expr_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76831:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76831:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | ajibawa-2023/Python-Code-Large/train/row_76832 | 280 | 520 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76832:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0375, 0.0115, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76832:ClassDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76832:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76832:ClassDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76832:Expr_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from dbindexer import autodiscover
autodiscover()
| ajibawa-2023/Python-Code-Large/train/row_76833 | 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_76833:ImportFrom_L1_C0", "label": "from dbindexer import autodiscover", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 215, 0, 1, 0, 0, 215, 0, 0], "semantic": {"name": "dbindexer", "arg_names": [], "import_names": ... | [] |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | ajibawa-2023/Python-Code-Large/train/row_76834 | 8 | 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_76834:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76834:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76834:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76834:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76834:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7... |
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.ext.webapp.util import login_required
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from goog... | ajibawa-2023/Python-Code-Large/train/row_76835 | 42 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76835:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 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_76835:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76835:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76835:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76835:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
SECRET_CODE = 'whateveryourcodeis'
| ajibawa-2023/Python-Code-Large/train/row_76836 | 1 | 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_76836:Assign_L2_C0", "label": "SECRET_CODE =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.5, 0, 0.66, 0.0, 52, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SECRET_CODE", "arg_names": [], "import_names": [], "rhs_call_... | [] |
dataTypes = ["CPUndefinedDataType", "CPIntegerDataType", "CPUnsignedIntegerDataType", "CPFloatingPointDataType", "CPComplexFloatingPointDataType", "CPDecimalDataType"]
types = { "CPUndefinedDataType" : [],
"CPIntegerDataType" : ["int8_t", "int16_t", "int32_t", "int64_t"],
"CPUnsignedIntegerDataType" : ... | ajibawa-2023/Python-Code-Large/train/row_76837 | 90 | 148 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76837:Assign_L1_C0", "label": "dataTypes =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0068, 0.0068, 0, 0.66, 0.0, 302, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "dataTypes", "arg_names": [], "import_names": [], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76837:For_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76837:Expr_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76837:For_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76837:If_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_768... |
#!/usr/bin/env python
from os import mkdir, makedirs, environ, chdir, getcwd, system, listdir
from os.path import join
from shutil import copy, copytree, move, rmtree
# Usage
def Usage():
return 'Usage: createversion.py <version>'
# Run Xcode
def RunXcode(project, target):
system('/usr/bin/xcodebuild -projec... | ajibawa-2023/Python-Code-Large/train/row_76838 | 52 | 84 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76838:ImportFrom_L3_C0", "label": "from os import mkdir, makedirs, environ\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0119, 0, 0.66, 0.0, 688, 0, 7, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76838:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76838:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76838:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76838:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Zdenko Podobný
# Author: Zdenko Podobný
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LIC... | ajibawa-2023/Python-Code-Large/train/row_76840 | 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_76840:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a... | [] |
#!/usr/bin/python2
#
# Copyright 2008 Eckhart Arnold (eckhart_arnold@hotmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | ajibawa-2023/Python-Code-Large/train/row_76843 | 726 | 994 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76843:Expr_L19_C0", "label": "expression", "type": "expression", "loc": [19, 20], "level": 0, "parent": null, "vector": [8, 0, 0.0196, 0.002, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76843:Try_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76843:Import_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76843:Try_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76843:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/python
#
# Copyright 2008 Eckhart Arnold (eckhart_arnold@hotmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ajibawa-2023/Python-Code-Large/train/row_76844 | 100 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76844:Expr_L19_C0", "label": "expression", "type": "expression", "loc": [19, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1518, 0.0833, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76844:Try_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76844:Import_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76844:Try_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76844:Import_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\unpackTK.py'), os.path.join(HOMEPATH,'support\\useTK.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), '../scripts/GWTPhotoAlbumCreator.py', os.path.join(HOMEPATH,'support\\removeTK.py')],
... | ajibawa-2023/Python-Code-Large/train/row_76845 | 3 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76845:Assign_L2_C0", "label": "a = Analysis()", "type": "assigned_variable", "loc": [2, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1562, 0.125, 0, 0.66, 0.0, 475, 3, 2, 0, 0, 191, 10, 6], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_... | [] |
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),
os.path.join(HOMEPATH,'support/unpackTK.py'),
os.path.join(HOMEPATH,'support/useTK.py'),
os.path.join(HOMEPATH,'support/useUnicode.py'),
'../scripts/GWTPhotoAlbumCreator.py', ... | ajibawa-2023/Python-Code-Large/train/row_76846 | 3 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76846:Assign_L2_C0", "label": "a = Analysis()", "type": "assigned_variable", "loc": [2, 8], "level": 0, "parent": null, "vector": [14, 0, 0.2381, 0.3333, 0, 0.66, 0.0, 475, 3, 2, 0, 0, 191, 10, 6], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call... | [] |
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),
os.path.join(HOMEPATH,'support/unpackTK.py'),
os.path.join(HOMEPATH,'support/useTK.py'),
os.path.join(HOMEPATH,'support/useUnicode.py'), '../scripts/GWTPhotoAlbumCreator.py',
os.path... | ajibawa-2023/Python-Code-Large/train/row_76847 | 3 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76847:Assign_L2_C0", "label": "a = Analysis()", "type": "assigned_variable", "loc": [2, 7], "level": 0, "parent": null, "vector": [14, 0, 0.2143, 0.2857, 0, 0.66, 0.0, 475, 3, 2, 0, 0, 191, 10, 6], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python
"""qzexpand.py
Script from GWTPhotoAlbum (http://code.google.com/p/gwtphotoalbum/)
Expands a .qz archive to the current directory.
.qz is a simple archive format for album creator.
Usage:
python qzexpand.py [qzarchive] [destDir]
"""
import sys, os
from PyQt4.Qt import QByteArray, qUncompress
... | ajibawa-2023/Python-Code-Large/train/row_76848 | 34 | 60 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76848:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 12], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1667, 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_76848:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76848:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76848:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76848:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""Implementation of JSONEncoder
"""
import re
import math
try:
from _json import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
__all__ = ['JSONEncoder']
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')... | ajibawa-2023/Python-Code-Large/train/row_76849 | 203 | 383 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76849:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0039, 0.0052, 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_76849:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76849:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76849:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76849:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
"""Implementation of JSONDecoder
"""
import re
import sys
import os
from json.scanner import Scanner, pattern
try:
from _json import scanstring as c_scanstring
except ImportError:
c_scanstring = None
__all__ = ['JSONDecoder']
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
if os.name == 'nt' and sys.version_... | ajibawa-2023/Python-Code-Large/train/row_76850 | 177 | 347 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76850:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0043, 0.0058, 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_76850:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76850:ImportFrom_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76850:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76850:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
# Notice the files in this directory are taken from the python 2.6
# distribution which is under the PSF license;
# please see http://docs.python.org/license.html
#
# I copied the the json subdirectory from the python 2.6 distribution
# and slightly adjusted the files so that they are compatible with
# python 2.4 an... | ajibawa-2023/Python-Code-Large/train/row_76851 | 42 | 326 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76851:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 106], "level": 0, "parent": null, "vector": [8, 0, 0.1764, 0.3006, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76851:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76851:Expr_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76851:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76851:If_L174_C4"}, {"f": "ajibawa-2023/Python-Code... |
"""Iterator based sre token scanner
"""
import re
import sre_parse
import sre_compile
import sre_constants
from re import VERBOSE, MULTILINE, DOTALL
from sre_constants import BRANCH, SUBPATTERN
__all__ = ['Scanner', 'pattern']
FLAGS = (VERBOSE | MULTILINE | DOTALL)
class Scanner(object):
def __init__(self, le... | ajibawa-2023/Python-Code-Large/train/row_76853 | 49 | 69 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76853:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.029, 0.0435, 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_76853:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76853:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76853:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76853:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
#
# Copyright 2008 Eckhart Arnold (eckhart_arnold@hotmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ajibawa-2023/Python-Code-Large/train/row_76854 | 46 | 91 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76854:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2363, 0.044, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76854:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76854:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76854:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76854:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright 2008 Eckhart Arnold (eckhart_arnold@hotmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | ajibawa-2023/Python-Code-Large/train/row_76855 | 22 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76855:Expr_L19_C0", "label": "expression", "type": "expression", "loc": [19, 26], "level": 0, "parent": null, "vector": [8, 0, 0.3814, 0.1356, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76855:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76855:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76855:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76855:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | ajibawa-2023/Python-Code-Large/train/row_76856 | 90 | 248 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76856:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.0081, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76856:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76856:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76856:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76856:If_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- mode: python -*-
# This is a spec file for building a standalone executable with pyinstaller
# under linux
#
# see http://pyinstaller.python-hosting.com for more information on pyinstaller
#
# With the present version of pyinstaller (svn co 2009-03-19) this works only with python 2.4 !
a = Analysis([o... | ajibawa-2023/Python-Code-Large/train/row_76857 | 4 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76857:Assign_L10_C0", "label": "a = Analysis()", "type": "assigned_variable", "loc": [10, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4565, 0.087, 0, 0.66, 0.0, 475, 3, 2, 0, 0, 191, 10, 6], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_ca... | [] |
#
# merge files - merge two folders with no duplicate files
#
g_sWelcome = """
merge_files - merge files from two directories into one.
The files from the "from" directory will be moved to the "to" directory, while
duplicated files will be removed. If two files are in the same name but are
different in signature (revi... | ajibawa-2023/Python-Code-Large/train/row_76858 | 24 | 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_76858:Assign_L4_C0", "label": "g_sWelcome =", "type": "assigned_variable", "loc": [4, 12], "level": 0, "parent": null, "vector": [14, 0, 0.1538, 0.1731, 0, 0.66, 0.0, 297, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "g_sWelcome", "arg_names": [], "import_names": [], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76858:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76858:Assign_L21_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76858:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76858:Assign_L22_C1"}, {"f": "ajibawa-2023/Python-Co... |
# -*- mode: python -*-
# This is a spec file for building a standalone executable with pyinstaller
# under linux
#
# see http://pyinstaller.python-hosting.com for more information on pyinstaller
#
# With the present version of pyinstaller (svn co 2009-03-19) this works only with python 2.4 !
a = Analysis([os.path.jo... | ajibawa-2023/Python-Code-Large/train/row_76859 | 4 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76859:Assign_L10_C0", "label": "a = Analysis()", "type": "assigned_variable", "loc": [10, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4565, 0.087, 0, 0.66, 0.0, 475, 3, 2, 0, 0, 191, 10, 6], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_ca... | [] |
#! /usr/bin/python2
#
# Copyright 2008 Eckhart Arnold (eckhart_arnold@hotmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | ajibawa-2023/Python-Code-Large/train/row_76860 | 55 | 100 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76860:Expr_L19_C0", "label": "expression", "type": "expression", "loc": [19, 23], "level": 0, "parent": null, "vector": [8, 0, 0.21, 0.05, 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_76860:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76860:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76860:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76860:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Co... |
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.ext.webapp.util import login_required
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from goog... | ajibawa-2023/Python-Code-Large/train/row_76861 | 42 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76861:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 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_76861:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76861:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76861:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76861:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
SECRET_CODE = 'whateveryourcodeis'
| ajibawa-2023/Python-Code-Large/train/row_76862 | 1 | 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_76862:Assign_L2_C0", "label": "SECRET_CODE =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.5, 0, 0.66, 0.0, 52, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SECRET_CODE", "arg_names": [], "import_names": [], "rhs_call_... | [] |
#!/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_76863 | 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_76863: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_76863:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76863:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76863:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76863:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/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_76864 | 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_76864: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_76864:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76864:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76864:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76864:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/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_76865 | 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_76865: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": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76865:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76865:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76865:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76865:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Co... |
#!/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_76866 | 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_76866: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": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76866:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76866:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76866:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76866:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/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_76867 | 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_76867: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_76867:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76867:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76867:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76867:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_76868 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76868:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76868:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76868:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76868:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76868:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
"""
Translation rules for Valencia Community road network.
This is so simple that it'll be used as an example of how to build translation methods.
The important thing is that a file like this must define a "translateAttributes" function that, taking a directory of attributes (key:value), will return a directory of ta... | ajibawa-2023/Python-Code-Large/train/row_76869 | 29 | 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_76869:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0789, 0.1447, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76869:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76869:If_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76869:If_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_76869:Return_L16_C15"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
Translation rules for the Ithaca Haiti damage assesment report data.
"""
def translateAttributes(attrs):
if not attrs: return
tags = {}
tags.update({'FIXME':'Check for duplicated data'})
tags.update({'source':'Ithaca'})
tags.update({'source:imagery': attrs['SOURCE'] })
# Only thing to translate ... | ajibawa-2023/Python-Code-Large/train/row_76870 | 21 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76870:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.0727, 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_76870:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76870:If_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76870:If_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_76870:Return_L9_C15"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#
# SimpleXMLWriter
# $Id: SimpleXMLWriter.py 2312 2005-03-02 18:13:39Z fredrik $
#
# a simple XML writer
#
# history:
# 2001-12-28 fl created
# 2002-11-25 fl fixed attribute encoding
# 2002-12-02 fl minor fixes for 1.5.2
# 2004-06-17 fl added pythondoc markup
# 2004-07-23 fl added flush method (from Jay Grav... | ajibawa-2023/Python-Code-Large/train/row_76872 | 101 | 279 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76872:Import_L90_C0", "label": "re import re, sys, string", "type": "import", "loc": [90, 90], "level": 0, "parent": null, "vector": [1, 0, 0.3226, 0.0036, 0, 0.66, 0.0, 540, 0, 3, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re", "sys... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76872:Try_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76872:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76872:Try_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76872:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/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_76873 | 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_76873: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_76873:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76873:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76873:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76873:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/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_76874 | 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_76874: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": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76874:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76874:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76874:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76874:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.