seq_id string | text string | repo_name string | sub_path string | file_name string | file_ext string | file_size_in_byte int64 | program_lang string | lang string | doc_type string | stars int64 | dataset string | pt string | api list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
409697999 | import csv
# Define and Instantiate Solver
class Solver(object):
def solve(self, x, y):
solution = x + y
return solution
solver = Solver()
def read_data():
data_file = '/data/data.csv'
def to_ints_tuple(row):
return tuple(map(int, row))
return map(to_ints_tuple, csv.reader(open(data_file, 'rb'), ... | null | test/fixtures/standalone_project/main.py | main.py | py | 1,044 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "csv.reader",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 45,
"usage_type": "call"
}
] |
541701337 | # coding: utf-8
#
### CREATED BY KARMAZ
#
#
### TO DO:
# 1. add payload identification
# 2. Add payload mutations
### FUNCTIONS:
# 1. TEST URLS FOR OUT-OF-BAND EXPLOITATION.
# 2. TEST RCE
# 3. TEST SQLI
# 4. TEST XSS
# 5. TEST SSRF
###
# USAGE EXAMPLE:
# ./crimson_oobtester.py \
# -i "127.0.0.1" \
# -d "... | null | scripts/crimson_oobtester.py | crimson_oobtester.py | py | 7,224 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.environ.get",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "ssl._create_default_https_context",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": ... |
479761753 | import torch
from distdl.nn.halo_exchange import HaloExchange
from distdl.nn.mixins.halo_mixin import HaloMixin
from distdl.nn.mixins.pooling_mixin import PoolingMixin
from distdl.nn.module import Module
from distdl.nn.padnd import PadNd
from distdl.utilities.slicing import assemble_slices
class DistributedPoolBase(... | null | src/distdl/nn/pooling.py | pooling.py | py | 4,643 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "distdl.nn.module.Module",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "distdl.nn.mixins.halo_mixin.HaloMixin",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "distdl.nn.mixins.pooling_mixin.PoolingMixin",
"line_number": 11,
"usage_typ... |
295101122 | from flask import Flask, json,request
#from utilities import Rest
import asyncio
import logging
import threading
import time
from multiprocessing import Process
import multiprocessing
manager = multiprocessing.Manager()
end_to_end_delay_for_all_agents = manager.dict()
api = Flask(__name__)
__agent_listen_port =5000... | null | modules/traffic_generator/traffic_generator_manager_TGM.py | traffic_generator_manager_TGM.py | py | 3,717 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "multiprocessing.Manager",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line... |
327118549 | """Contains HelpCommand class."""
import discord
from discord.ext import commands
from offthedialbot import utils
class HelpCommand(commands.DefaultHelpCommand):
"""Set up help command for the bot."""
async def send_bot_help(self, mapping):
"""Send bot command page."""
list_commands = [
... | null | offthedialbot/help.py | help.py | py | 4,049 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "discord.ext.commands.DefaultHelpCommand",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "offthedialbot.utils.Alert.create_embed",
"line_number": 90,
"usage_type":... |
527545629 | from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.views.generic import ListView, DetailView
from taggit.models import Tag
from . import models
class Promo(ListView):
model = models.Category
def category(request, path, instance):
return render(
request,
'act... | null | activities/views.py | views.py | py | 939 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.views.generic.DetailView",
"line_number": 23,
"usage_type": "name"
},
{
... |
617112442 | from collections import OrderedDict, MutableSet
# From https://code.activestate.com/recipes/576694/
class OrderedSet(MutableSet):
def __init__(self, iterable=None):
self.end = end = []
end += [None, end, end] # sentinel node for doubly linked list
self.map = {} #... | null | pymola/backends/casadi/alias_relation.py | alias_relation.py | py | 3,654 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.MutableSet",
"line_number": 4,
"usage_type": "name"
}
] |
531621529 | from IGCexpansion.CodonGeneconv import ReCodonGeneconv
import argparse
def main(args):
paralog = [args.paralog1, args.paralog2]
Force = None
alignment_file = '../MafftAlignment/' + '_'.join(paralog) + '/' + '_'.join(paralog) + '_input.fasta'
newicktree = './YeastTree.newick'
if args.force:
... | null | IGCexpansion/Run.py | Run.py | py | 1,532 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "IGCexpansion.CodonGeneconv.ReCodonGeneconv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
}
] |
633853215 | #! /usr/local/bin/python3
from typing import Optional, List
from functools import reduce
import os
import sys
sys.path.append(os.getcwd())
from Codebase.Tree.tree_node import TreeNode
# 树的遍历,非递归实现
## 先序遍历【栈实现】
def iterativePreOrder(root: Optional[TreeNode]) -> List[int]:
ans = []
stack = [root]
while len... | null | Codebase/Tree/Traversal/iterative_traversal.py | iterative_traversal.py | py | 2,433 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_numb... |
447716124 | from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def homepage():
movies = ['1', '2', '3', '4', '5', '6', '7', '8']
return render_template('homepage.html', movies=movies)
if __name__ == "__main__":
app.run() | null | main.py | main.py | py | 272 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 8,
"usage_type": "call"
}
] |
612728733 | import pymongo
client = pymongo.MongoClient('mongodb://localhost:27017/')
db = client["occupations_database"]
collection1 = db["jobDescription"]
collection2 = db["relatedTitle"]
collection3 = db["task"]
collection4 = db["technology"]
collection5 = db["tools"]
collection6 = db["Knowledge"]
collection7 = db[... | null | Application/careerapp/nosql/occupation.py | occupation.py | py | 2,088 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 4,
"usage_type": "call"
}
] |
319047892 | """
후보 추천하기 문제 리팩토링
- 정렬하는 함수 다시 이용해 보고 ( 디폴트 = 오름차 = 앞 - 뒤 (자연스러운 위치 )
-
fb) map이랑 , filter같은 경우 list형이 아니다, list로 받거나 바꾸거나.
"""
import sys
import functools
def input(): return sys.stdin.readline().rstrip()
def cmp(x, y):
if x[1] == y[1]:
return y[2]-x[2]
else:
return y[1] - x[1]
# 입력 사진... | null | BOJ_Silver/1713.py | 1713.py | py | 1,414 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.stdin.readline",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "functools.cmp_to_key",
"line_number": 42,
"usage_type": "call"
}
] |
277663639 | ''' train '''
import argparse
import csv
from random import shuffle
from os import listdir
import cv2
import numpy as np
import matplotlib.pyplot as plt
from cnn import get_model
from keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard
from keras.utils import plot_model
IMAGE_SHAPE = (160, 320, 3)
C... | null | model.py | model.py | py | 4,735 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.listdir",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number"... |
383460504 | '''
OCR API for Tesseract
'''
import os
import sys
import numpy as np
from PIL import Image
from tesserocr import PyTessBaseAPI, RIL, PSM, image_to_text
from collections import namedtuple
try:
import cv2
except ImportError:
print('Please install OpenCV first. `pip install opencv-python` or '
'`yes | c... | null | liteocr/ocr.py | ocr.py | py | 14,300 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.stderr",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PIL.Image.Image",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"line_n... |
369834535 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Alert',
fields=[
('id', models.AutoField(primar... | null | alerts/migrations/0001_initial.py | 0001_initial.py | py | 1,218 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 13,
"usage_type": "call"
},
... |
93269146 | from flask import render_template, redirect, url_for, flash
from werkzeug.urls import url_parse
from flask_login import login_user, logout_user, current_user, login_required
from flask_babel import *
from app import db
from app.auth import bp
from app.auth.forms import LoginForm, RegistrationForm
from app.models import... | null | app/auth/routes.py | routes.py | py | 2,202 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask_login.current_user.is_authenticated",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "flask_login.current_user",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.redirect",
"line_number": 15,
"usage_type": "call"
},
{... |
401204640 | from flask import Flask
#from flask_sqlalchemy import SQLAlchemy
if __name__.find('.') > 0:
flask_name = __name__.split('.')[0]
else:
flask_name = __name__
app = Flask(flask_name)
#db = SQLAlchemy()
#db.init_app(app)
from app import views | null | app/__init__.py | __init__.py | py | 250 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
}
] |
622243729 | import logging
from collections import defaultdict
from datetime import timedelta
from random import randint
import voluptuous as vol
from homeassistant.util import dt as dt_utils
from .misc import *
DOMAIN = "nordpool"
_LOGGER = logging.getLogger(__name__)
_CURRENCY_LIST = ["DKK", "EUR", "NOK", "SEK"]
CONFIG_SCH... | null | custom_components/nordpool/__init__.py | __init__.py | py | 6,109 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "voluptuous.Schema",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "voluptuous.Schema",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "voluptuous.ALLO... |
455466837 | import pandas as pd
import json
from pandas.io.json import json_normalize
import plotly.express as px
def chat_clean(file_path):
'''Enter the file_path for .json Telegram Chat export'''
with open(file_path, encoding="utf8") as f:
d = json.load(f)
norm_msg = json_normalize(d['messages'])
msg_df... | null | TeleVisuals/TeleVisuals.py | TeleVisuals.py | py | 2,176 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.io.json.json_normalize",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.Series... |
202518709 | from flask import Flask, render_template, request, url_for, redirect
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
import sqlite3
app = Flask(__name__) #Define the flask app thing
bootstrap = Bootstrap(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sq... | null | 7_Flask/Site-2 (flask bootstrap)/app.py | app.py | py | 3,700 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_bootstrap.Bootstrap",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datet... |
454247131 | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
import json
impor... | null | web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_mviews_refresh.py | test_mviews_refresh.py | py | 6,065 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pgadmin.utils.route.BaseTestGenerator",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "regression.parent_node_dict",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "regression.parent_node_dict",
"line_number": 53,
"usage_type": "name"
... |
540581306 | from django.conf.urls import patterns, url
from core import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^list$', views.listusers, name='listusers'),
url(r'^UserRegForm$', views.UserRegForm, name='UserRegForm'),
url(r'^UserRegHandler$', views.UserRegHandler, name='User... | null | core/urls.py | urls.py | py | 743 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "core.views.index",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cor... |
541882117 | import os
import boto3
import werkzeug
import uuid
import json
import redis
from flask_restful import reqparse, Resource, fields, marshal_with
from flask_jwt_extended import jwt_required, get_jwt_identity
from mini_gplus.daos.user import find_user
from mini_gplus.daos.circle import find_circle
from mini_gplus.daos.post... | null | mini_gplus/resources/posts.py | posts.py | py | 10,403 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "redis.Redis.from_url",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "redis.Redis",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "flask_restful.f... |
271394784 | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 10 00:14:26 2017
@author: Madhu
"""
# Import libraries necessary for this project
import sklearn
import pandas as pd
import numpy as np
import seaborn as sns; sns.set()
from matplotlib import pyplot as plt
from pandas import compat
compat.PY3 = True
print ("-------------... | null | News-Muse/src/scripts/main.py | main.py | py | 5,482 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "seaborn.set",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.compat.PY3",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pandas.compat",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "sklearn.__version__"... |
71241073 | import cv2
image = cv2.imread("./Pictures/Pokemon.jpg")
median = cv2.medianBlur(image, 15)
gaussian = cv2.GaussianBlur(image, (5, 5), 3.5)
cv2.imshow("Original", image)
#cv2.imshow("Median", median)
cv2.imshow("Gaussian", gaussian)
cv2.waitKey(0)
cv2.destroyAllWindows()
| null | code/pythonOpenCV/blur.py | blur.py | py | 273 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cv2.imread",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.medianBlur",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number... |
300413599 | # -*- coding:utf-8 -*-
'''
The basic leaf handler.
'''
import random
import tornado.escape
import tornado.web
import tornado.ioloop
from torcms.core.tools import logger
from torcms.model.category_model import MCategory
from torcms.model.label_model import MPost2Label
from torcms.model.post2catalog_model import MPos... | null | torcms/handlers/leaf_handler.py | leaf_handler.py | py | 4,621 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "post_handler.PostHandler",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "torcms.model.post_model.MPost.update_order",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "torcms.model.post_model.MPost",
"line_number": 65,
"usage_type": "nam... |
148449814 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
cfs_to_taf = 2.29568411*10**-5 * 86400 / 1000
def storage_to_elevation(S): # from regression
return -0.000078*S**2 + 0.213526*S + 328.922121
# some parameters assumed specific to folsom
def simulate_folsom(Q):
K = 975 # TAF capacity
D = 3.... | null | L6-hydropower.py | L6-hydropower.py | py | 2,062 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.zeros",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
123904716 | # Copyright 2019 Palo Alto Networks
#
# 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 wri... | null | lib/script_logger.py | script_logger.py | py | 2,704 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.Logger",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
... |
600933412 | # Copyright (c) 2017-present, Facebook, 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... | null | lib/build/lib.linux-x86_64-3.6/datasets/hospital_dataset.orig.py | hospital_dataset.orig.py | py | 19,843 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "utils.env.set_up_matplotlib",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "utils.env",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "dataset_catal... |
431057081 | import json, nltk, os, re, math, string
from nltk import PorterStemmer
from pathlib import Path
from flask import Flask, render_template, request
invertedIndexPath = Path('invertedIndex.json')
pageRankPath = Path('pagerankScores.json')
# Stopwords parsing
stopwordPath = Path('stopwords.txt')
stopword_list = set()
de... | null | application.py | application.py | py | 4,683 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 17... |
549658524 | from typing import List
class Solution:
def specialArray(self, nums: List[int]) -> int:
nums.sort(reverse=True) # Time: O(nlogn)
for i in range(len(nums)): # Time: O(n)
if nums[i] <= i:
break
else:
i += 1
return -1 if i < len(nums) and nums... | null | src/Special Array With X Elements Greater Than or Equal X.py | Special Array With X Elements Greater Than or Equal X.py | py | 392 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
}
] |
106577992 | """Checks related to ansible specific best practices."""
import os
import re
from collections import defaultdict
from ansiblelater.command.candidates import Error
from ansiblelater.command.candidates import Result
from ansiblelater.command.candidates import Template
from ansiblelater.utils import count_spaces
from an... | null | ansiblelater/rules/ansiblefiles.py | ansiblefiles.py | py | 11,414 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "ansiblelater.utils.rulehelper.get_normalized_yaml",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "ansiblelater.utils.count_spaces",
"line_number": 33,
"usage_type": "call"
... |
285344701 | import random
import os
import json
from terminaltables import AsciiTable
class Jogo:
numero = 0
pesadelo = False
acertou = False
tentativas = 0
dificuldade = 0
jogador = ""
ranking_file = 'ranking.json'
def executar(self):
self.exibir_boas_vindas()
self.exibir_selecao... | null | classes/jogo.py | jogo.py | py | 5,918 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "terminaltables.AsciiTable",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "random.randint",
"l... |
436802162 | from pymongo import MongoClient
from pymongo import errors
import glob
import sys
import math
#import cPickle
ref_genome = "GRCm38.p5" #Name of reference genome
program = "Platypus" #Name of program that output VCF file
#startup MongoDB: Assumes the server is already running
#try port 27020
client = MongoClient('l... | null | py_mongo_VCF.py | py_mongo_VCF.py | py | 2,870 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line... |
138324063 | from django.db import models
from django.contrib.auth.models import User
from django.core.validators import MaxValueValidator, MinValueValidator
STATE_CHOICES = (
('New South Wales','New South Wales'),
('Queensland','Queensland'),
('South Australia','South Australia'),
('Tasmania','Tasmania'),
('Vic... | null | app/models.py | models.py | py | 2,825 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.db.models.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 13,
"usage_type": "call"
},
{
"api_name... |
314107182 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Unet(nn.Module):
def __init__(self, pad,initf,otherf,sd, outc, rd, blocknum,device):
self.sd = sd
self.pad=pad
self.initf=initf
self.otherf=otherf
super(Unet, self).__init__()
if(pad>0):
... | null | modelStructure/uwavenet.py | uwavenet.py | py | 2,849 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv1d",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
51004936 | # Functions used to extract for each domain some information
# The collected data is used by the crawler to login
import traceback
import sys
from bs4 import BeautifulSoup
from urllib.parse import urljoin, urlparse
from tinydb import TinyDB, Query
from utility.utility import read_json, get_tld
from utility.google impo... | null | google/login_information_google.py | login_information_google.py | py | 6,950 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "tinydb.TinyDB",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "utility.google.is_google_login",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE"... |
600343643 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
r'''
Inject functions into the upstream ``file`` execution module.
'''
# Import python libs
from __future__ import absolute_import
import difflib
import filecmp
import glob
import logging
import os
import re
import shutil
# Import salt libs
import salt.utils.files
import ... | null | _modules/file_inject.py | file_inject.py | py | 17,265 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
208020953 | import datetime
class Credit:
def __init__(self, valeur):
print("valeur de ".format(valeur))
self.valeur = valeur
def traite(self, entrée):
if float(entrée) > 0 and float(entrée) < 10000 and datetime.datetime.today().weekday() != 6:
print("valeur de ".format(entrée))
... | null | dirty_app/DomainService/Credit.py | Credit.py | py | 461 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "datetime.datetime.today",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "attribute"
}
] |
449081325 | # -*- coding: utf-8 -*-
import scrapy
from scrapy import Request
class QbSpider(scrapy.Spider):
name = 'qb'
allowed_domains = ['www.qiushibaike.com']
start_urls = ['https://www.qiushibaike.com/history/']
def parse(self, response):
author_urls = response.xpath("//div[@class='author clearfix']/... | null | 爬取多页糗事百科.py | 爬取多页糗事百科.py | py | 1,434 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "scrapy.Spider",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "scrapy.Request",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 23,
"usage_type": "call"
}
] |
553849209 | from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from router import get_api_urls
urlpatterns = patterns(
'',
url(
r'^admin/',
include(admin.site.urls)
),
url(
r'^api... | null | showcase_backend/urls.py | urls.py | py | 698 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 13,
"usage_type": "call"
},
{
"api_name":... |
365614401 | tasksloop.py
#coding:UTF-8
import discord
from discord.ext import tasks
TOKEN = "NjQ0NTQ2ODE3MDE4NTYwNTQ0.Xc1vHA.9OV7gI6bcSsBSdSXbWiXE4xB2C8" #トークン
CHANNEL_ID = 483886909873979392#チャンネルID
# 接続に必要なオブジェクトを生成
client = discord.Client()
# 60秒に一回ループ
@tasks.loop(seconds=60)
async def loop():
channel = client.get_channel... | null | tasksloop.py | tasksloop.py | py | 540 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "discord.Client",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "discord.ext.tasks.loop",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord.ext.tasks",
"line_number": 12,
"usage_type": "name"
}
] |
621936352 | from collections import defaultdict
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer # pos='v'
class BaseModel(object):
def __init__(self):
self._lemmatizer = WordNetLemmatizer()
def _tokenize_doc(self, paragraphs, tokenized_categories... | null | logic/base_model.py | base_model.py | py | 2,291 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.word_tokenize",
"line_number": 31,
"usage_type": "call"
},
{
"ap... |
646054095 | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited.
#
# 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 ap... | null | reverb/reverb_types.py | reverb_types.py | py | 1,840 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "reverb.pybind.FifoSelector",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "reverb.pybind",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "reverb.pybind.HeapSelector",
"line_number": 28,
"usage_type": "attribute"
},
{
"api... |
650995151 | import os
import sys
import jobset
import signal
import subprocess
from time import sleep
from config import port, cpu_count
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
JEDI_PATH = os.path.dirname(CURRENT_DIR)
sys.path.insert(0, JEDI_PATH)
class TouchQPSWorker(object):
def __init__(self):
... | null | benchmark/touch_qps_worker.py | touch_qps_worker.py | py | 1,975 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"... |
246108742 | import sys
import urllib
import http.client
IP = sys.argv[1]
port = sys.argv[2]
y = sys.argv[3]
x = sys.argv[4]
#Post example on https://docs.python.org/2.4/lib/httplib-examples.html
connection = http.client.HTTPConnection(IP, port)
parameters = urllib.parse.urlencode({'x':x, 'y':y})
headers = {"Content-type": "appli... | null | client.py | client.py | py | 1,060 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": ... |
627005805 | import torch
import torch.nn.functional as F
import torch.nn as nn
import numpy as np
import sys
import struct
import os
from src.MalConv import MalConv1, MalConv2, MalConv3
from src.util import *
from src.Target import Target
from torch.utils.data import DataLoader
from attack.FGM import FGMAttack
device = torch.devi... | null | test_FGMInsert.py | test_FGMInsert.py | py | 2,483 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "src.MalConv.MalC... |
435102276 | import os, re
from flask import Flask, request, redirect, url_for, render_template
from werkzeug import secure_filename
from openpyxl import Workbook
from openpyxl import load_workbook
from openpyxl.cell import get_column_letter
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = "E:/=programming=/PyRepo/Converter/fla... | null | hello.py | hello.py | py | 4,943 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.request.... |
266931957 | import numpy as np
import cv2
from mss import mss
from PIL import Image
#Define im as frame
while True:
with mss() as sct:
monitor_var = sct.monitors[1]
monitor = np.array(sct.grab(monitor_var))
gray = cv2.cvtColor(cv2.UMat(monitor), cv2.COLOR_RGB2GRAY)
areaArray = []
count = 1
cont... | null | tests/floor_v2.py | floor_v2.py | py | 954 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "mss.mss",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.UMat",
"line_number": 10,
... |
616726418 | from django.shortcuts import render
from models import Dogs
def index(request):
# Dogs.objects.create(breed="bulldog",age=2,created_at="NOW()")
print ("*"*100)
dogs = Dogs.objects.all()
context = {
"dogs": dogs
}
print ("*"*100)
return render(request, 'practicerun/index.html', context)
| null | Python_Fundamentals/django/practice/apps/practicerun/views.py | views.py | py | 320 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "models.Dogs.objects.all",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Dogs.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Dogs",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.shor... |
183141919 | import boto3
from boto3.dynamodb.conditions import Key
tablename = "northwind"
dynamodb = boto3.resource('dynamodb', region_name="us-east-2", endpoint_url='http://localhost:8000')
table = dynamodb.Table(tablename)
# Find all the orders containting product 70
response = table.query(IndexName='gsi_1', KeyConditionExpre... | null | product.py | product.py | py | 381 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "boto3.resource",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "boto3.dynamodb.conditions.Key",
"line_number": 9,
"usage_type": "call"
}
] |
252945031 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import logging.config
from cloghandler import ConcurrentRotatingFileHandler
from configs import config
# formatter
formatter_runtime = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(pathname)s:%(lineno)d,%(message)s')
formatter_blank = logging.Formatter('%(message... | null | commons/log.py | log.py | py | 1,299 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.config.Formatter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.config",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "logging.config.Formatter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "loggin... |
623201577 | ##
from collections import namedtuple
Student = namedtuple(typename='Student', field_names=['name', 'age', 'specialization'])
students = [
Student('Mike', 21, 'physics'),
Student('Mark', 22, 'biology'),
Student('Kate', 20, 'mathematics'),
Student('Bob', 21, 'information technology')
]
students.sort(... | null | built-in_modules/collections/ex_18.py | ex_18.py | py | 370 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
}
] |
417241580 | # -*- coding: utf-8 -*-
# Copyright (C) Canux CHENG <canuxcheng@gmail.com>
#
# 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 rights to ... | null | plugin/plugins/sharepoint_2013/src/plugin/regex.py | regex.py | py | 3,635 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "base.PluginBase",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 44,
"usage_type": "call"
}
] |
425941048 | import requests
from queue import Queue
from threading import Thread,Lock
import time
from lxml import etree
import json
crawl_exit=False
parse_exit=False
class CrawlThread(Thread):
def __init__(self,thread_name,page_queue,data_queue):
Thread.__init__(self)
self.thread_name=thread_name
se... | null | 爬虫/day05_0512/多线程.py | 多线程.py | py | 3,746 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "threading.Thread",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "requests.... |
432834979 | """Movie Ratings."""
from jinja2 import StrictUndefined
from flask import (Flask, render_template, redirect, request, flash,
session)
from flask_debugtoolbar import DebugToolbarExtension
from model import User, Rating, Movie, connect_to_db, db
app = Flask(__name__)
# Required to use Flask sessi... | null | server.py | server.py | py | 4,239 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "jinja2.StrictUndefined",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "model.User.q... |
4884183 | from __future__ import print_function
import numpy as np
import sys
from time import time
from kernelregression_new import KernelRegression
from fingerprint_kernel4 import FingerprintsComparator
from ase.calculators.calculator import Calculator, all_changes
class Kreg(Calculator):
""" Kerenel rigide regression cal... | null | krrThomas/fromThomas/kreg_new.py | kreg_new.py | py | 10,037 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "ase.calculators.calculator.Calculator",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "ase.calculators.calculator.Calculator.__init__",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "ase.calculators.calculator.Calculator",
"line_number": 42... |
288610697 | from django.test import TestCase
from signal_connectors import _perm_model as perm_model
def _create_mock_model(**opts):
class MockOpts(object):
abstract = False
app_label = 'mock'
auto_created = False
model_name = 'fake'
permissions = []
proxy = None
verb... | null | hairdresser/tests.py | tests.py | py | 4,607 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.test.TestCase",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "signal_connectors._perm_model",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "signal_connectors._perm_model",
"line_number": 76,
"usage_type": "call"
},
{
"... |
414105481 | import nibabel
import numpy as np
import matplotlib.pyplot as plt
import random
import colorsys
import matplotlib.patches as patches
import matplotlib.lines as lines
from matplotlib.patches import Polygon
def load_nifty_volume_as_array(filename, with_header = False):
"""
load nifty image into numpy array, and ... | null | image_intro.py | image_intro.py | py | 4,697 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "nibabel.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.transpose",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.zeros_like",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.zeros_like",
... |
229346460 | from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLabel, QFileDialog, QLineEdit
from difflib import SequenceMatcher as match
from wordList import *
import subprocess
import random
import os
from listGuesser import *
def getWindowApp(launcher):
window=QWidget()
def switchBack():
window... | null | source/listGuesserGUI.py | listGuesserGUI.py | py | 1,613 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QPushButton",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QPushButton",
"line_number": 42,
"usage_type": "call"
},
{
"a... |
382204443 | import re
import tornado.web
from datetime import datetime, timedelta
from common import BaseHandler
from sign import SN_CK_NAME
from database import User
from tables import UserTable as UT
SESSION_INDEX = 0
ID_INDEX = 1
DATA_INDEX = 1
def _str_to_date(str_):
rgx = re.compile(r"^(20[0-9]{2})-([0-1][0-9])-([0-3][... | null | hightower/service/dashboard.py | dashboard.py | py | 2,985 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.compile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.dateti... |
122517606 | # Your imports go here
import logging
import os
import json
import re
logger = logging.getLogger(__name__)
'''
Given a directory with receipt file and OCR output, this function should extract the amount
Parameters:
dirpath (str): directory path containing receipt and ocr output
Returns:
float: retu... | null | extract.py | extract.py | py | 1,103 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_numb... |
350352778 | from typing import List
class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
cy = len(board)
cx = len(board[0])
seen = [[0 for x in range(cx)] for i in range(cy)]
# print(board, seen, word)
def dfs(x: int, y: int, cur: int) -> bool:
... | null | Python/79.word-search.py | 79.word-search.py | py | 1,649 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
}
] |
289911051 | from django import forms
from livre_d_or.models import Message
class MessageForm(forms.ModelForm):
class Meta:
model = Message
fields = ['nom', 'email', 'contenu']
labels = {
'nom' : 'Votre nom',
'email' : 'Votre adresse email',
'contenu' : 'Votre... | null | livre_d_or/forms.py | forms.py | py | 593 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "livre_d_or.models.Message",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "djang... |
102987440 | from pathlib import Path
from typing import Generator
import json
import numpy as np
from collections import defaultdict
from hedgedog.tf.estimator.ingredients import dataset_ingredient
from hedgedog.tf.io.dataset import FeatureDataset, T
from hedgedog.tf.io.Feature import *
from hedgedog.nlp.wordpiece_tokenization imp... | null | el/data/dataset.py | dataset.py | py | 16,905 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "hedgedog.logging.get_logger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "hedgedog.tf.io.dataset.FeatureDataset",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 22,
"usage_type": "call"
},
{
"ap... |
409615638 | # Copyright (c) 2020 PaddlePaddle Authors. 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 by appli... | null | paddlex_restful/restful/demo.py | demo.py | py | 7,787 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "utils.ProjectType",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "utils.ProjectType",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
4450082 | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | null | venv/Lib/site-packages/cobra/modelimpl/macsec/ifstats.py | ifstats.py | py | 9,104 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cobra.mit.mo.Mo",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "cobra.mit.meta.ClassMeta",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cobra.model.category.MoCategory.REGULAR",
"line_number": 32,
"usage_type": "attribute"
},
{
... |
159532472 | """
Modules for saving plate maps to Excel
"""
from pathlib import Path
from openpyxl import Workbook, load_workbook
from openpyxl.styles import Border, Side, Font, Alignment
from openpyxl.styles.fills import PatternFill
from openpyxl.styles.colors import Color
from openpyxl.utils.cell import coordinate_to_tuple
import... | null | src/main/python/PyBiodesy/Plate2Excel.py | Plate2Excel.py | py | 22,661 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "matplotlib.pyplot.cm.viridis",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.cm",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 32,
"usage_type": "name"
},
{
"api_name... |
328044378 | # coding: UTF-8
import os
import sae
import web
from weixinInterface import WeixinInterface
from menu import *
urls = (
'/weixin','WeixinInterface',
'/','Hello',
'/create','CreateMenu',
'/get','GetMenu',
'/del','DelMenu',
)
app_root = os.path.dirname(__file__)
templates_root = os.path.join(app_root, 'templates'... | null | index.wsgi | index.wsgi | wsgi | 519 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.dirname",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
371763898 | from flask import render_template, jsonify, request, Blueprint
from models import UserDB, RoomDB, BlacklistToken, UserSchema, RoomSchema
from flask_restful import Resource, reqparse
from db import db
from pymongo.errors import DuplicateKeyError
from flask_jwt_extended import (create_access_token, create_refresh_token,
... | null | app/resources.py | resources.py | py | 12,347 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.UserSchema",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_restful.reqparse.RequestParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name":... |
439888877 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import logging
import random
import warnings
from collections import OrderedDict
from collections import defaultdict
from datetime import datetime
from datetime import t... | null | fusion/trained.py | trained.py | py | 24,737 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 89,
"usage_type": "name"
},
{
"api_name": "warnings... |
258547640 | import logging
import json
import pdb
import datetime
# create logger
s_logger = logging.getLogger(__name__)
s_logger.setLevel(logging.INFO)
class ser_data_obj(object):
"""
Class to deal with candle serialized data
Constructor
Class variables
---------------
ifile: str, Required
F... | null | apis/ser_data_obj.py | ser_data_obj.py | py | 2,095 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
153056862 | import time
import cv2
#明るさのthresholdを決定する関数
#####################################################################
def findThreshold(img, rhole):
startTh = time.time()
print("\n#call findThreshold")
print('image size:{}'.format(img.shape))
try:
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
... | null | QCpackage2/package_cube/findThres.py | findThres.py | py | 996 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "time.time",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_n... |
191065097 | # Copyright 2015 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 by applicable law or a... | null | managed_vms/storage/main_test.py | main_test.py | py | 1,558 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "testing.CloudTest",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "six.BytesIO",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 48,
"usage_type": "call"
}
] |
180770211 | from datetime import datetime
from dctlib.request.authorization import authorization
import os
import json
import sys
import urllib3
import requests
import time
class REST:
infinity = -1
def __init__(self, url, user, password):
self.url = url
self.request = authorization(url).login(user, passw... | null | RobotTests/dctlib/rest.py | rest.py | py | 19,192 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "dctlib.request.authorization.authorization",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "json... |
628145307 | from .base import LasBase
from .. import evlrs
from ..headers.rawheader import RawHeader1_4
from ..utils import ctypes_max_limit
from ..vlrs import vlrlist
class LasData(LasBase):
def __init__(self, *, header=None, vlrs=None, points=None, evlrs=None):
super().__init__(header=header, vlrs=vlrs, points=poin... | null | pylas/lasdatas/las14.py | las14.py | py | 2,939 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "base.LasBase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "utils.ctypes_max_limit",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "vlrs.vlrlist.RawVLRList.from_list",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "... |
207923726 | """This module contains various examples on how to implement an endpoint"""
import http.client as httplib
from url_shortener.logic import Logic
from url_shortener.dto import User
from pyramid.request import Request
from pyramid.response import Response
from pyramid.httpexceptions import HTTPFound
import logging
impor... | null | url_shortener/views/handlers.py | handlers.py | py | 11,355 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pyramid.request.Request",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pyramid.request.Request",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "url... |
34221666 | """
dbmisvc-stack
Usage:
dbmisvc-stack init [<app>] [-v | --verbose]
dbmisvc-stack check [<app>] [-v | --verbose]
dbmisvc-stack build [<app>] [--clean] [-v | --verbose]
dbmisvc-stack test [-v | --verbose]
dbmisvc-stack up [-d] [--clean] [--flags=<flags>] [-v | --verbose]
dbmisvc-stack down [--clean] [--fla... | null | dbmisvc_stack/cli.py | cli.py | py | 4,187 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "colorlog.ColoredFormatter",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "log... |
550191147 | from django.shortcuts import render,redirect
from django.http import HttpResponse
from .models import item,system,contact
from django.db.models import Q
from django.contrib import messages
def index(request):
return render(request,'index.html')
def contact_us(request):
if request.method == "POST":
nam... | null | designApp/views.py | views.py | py | 2,002 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.shortcuts.render",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.contact",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": ... |
517675974 | """
For direct execution, ensure script is run as a library module:
python -m app.tasks.manager
@author agossett@cisco.com
"""
from . import utils as ept_utils
from . import node_manager, ep_subscriber
import re, time, traceback, os
# setup logger for this package
import logging
logger = logging.g... | null | app/tasks/ept/manager.py | manager.py | py | 10,525 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
148570354 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="randomnames",
version="0.0.1",
author=["Alessandro Bregoli"],
author_email=["alessandroxciv@gmail.com"],
description="Generator of random numbers",
long_description=long_description,
... | null | setup.py | setup.py | py | 832 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
8128926 | import codecs
import json
rawfile = 'seasons.txt'
inputfile = 'final.json'
outputfile = 'finalfinal.json'
dicc = {}
with open(rawfile) as rawf:
raw_data = [row.strip().split('\t') for row in rawf]
for row in raw_data:
dicc[row[0]] = [int(row[1]), int(row[2])]
data = json.load(open(inputfile))
data2 = []
i = 0
f... | null | w2watch/Database/seasons.py | seasons.py | py | 1,072 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 32,
"usage_type": "call"
}
] |
156442853 | import logging
from logging.handlers import TimedRotatingFileHandler
import os
import sys
import string
from uuid import uuid4
from random import choice
def gen_unique_id():
return str(uuid4())
SUBDEBUG = 5
def load_settings(settings_module = None):
if settings_module:
os.environ['UNUK_SETTINGS_MO... | null | src/unuk/utils/logger.py | logger.py | py | 2,354 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "uuid.uuid4",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "unuk.conf.settings.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "unuk.conf.settings... |
487572302 | from __future__ import division
import math
from collections import Counter
from vectors.Vectors import vectors as vct
class statistics:
@staticmethod
def median(v):
"""Returns the median value from a vector"""
n = len(v)
sorted_v = sorted(v)
midpoint = n // 2
if n % 2... | null | statistics/Statistics.py | Statistics.py | py | 2,069 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.Counter",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "vectors.Vectors.vectors.sum_of_squares",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "vectors.Vectors.vectors",
"line_number": 55,
"usage_type": "name"
},
{
... |
550638177 | import math
import torch
import torch.nn as nn
from STN.modules.gridgen import AffineGridGen
from STN.modules.stn import STN
class Transformer(nn.Module):
def __init__(self, w, h):
super(Transformer, self).__init__()
self.s = STN()
self.g = AffineGridGen(w, h, lr=0.01)
def forward(... | null | STN/STNet.py | STNet.py | py | 4,242 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.nn.Module",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "STN.modules.stn.STN",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "STN.modules.gridgen... |
393753313 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | null | networking_l2gw/services/l2gateway/service_drivers/rpc_l2gw.py | rpc_l2gw.py | py | 43,934 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "oslo_log.log.getLogger",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "oslo_log.log",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "networking_l2gw.services.l2gateway.service_drivers.L2gwDriver",
"line_number": 52,
"usage_type": "att... |
537236064 | """ Example script to create spectrum objects from ntuple file and store
in hdf5 format.
This script:
* Reads in ntuple file of background / signal isotope
* Creates and fills spectra objects with mc and reconstructed information
* Plots Energy, radius and time dimensions of spectra object
* Saves spectra ... | null | echidna/scripts/dump_spectra_ntuple.py | dump_spectra_ntuple.py | py | 4,043 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "echidna.core.fill_spectrum.fill_mc_ntuple_spectrum",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "echidna.core.fill_spectrum",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "echidna.core.fill_spectrum.fill_reco_ntuple_spectrum",
"line_nu... |
83772358 | #Author: Alper Karayaman
import easygui
def findAll(arr,dp,i,j,cost,answer,temp=[],nr=5):
if len(answer) == nr:
return
if j != 0:
temp.append((i,j))
try:
if not dp[i][j][cost]:
answer.append(tuple(temp))
else:
itself=round(arr[i]*j,1)
... | null | shoppingRecommendationForGiftCards.py | shoppingRecommendationForGiftCards.py | py | 3,774 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "easygui.textbox",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "easygui.multenterbox",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "easygui.msgbox",
"line_number": 113,
"usage_type": "call"
}
] |
67781513 | from GDR.basicFunctions import add_category, add_product, add_hasProduct, add_PointPayment
from first.models import Bakery, Order, Logging, Product, Account, AdyenPayment
from django.core.exceptions import ObjectDoesNotExist
import datetime
def get_all_bakeries():
try:
output = Bakery.objects.all()
e... | null | dist/GDR/baert_to_split.py | baert_to_split.py | py | 5,753 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "first.models.Bakery.objects.all",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "first.models.Bakery.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "first.models.Bakery",
"line_number": 9,
"usage_type": "name"
},
{
... |
70831014 | #!/usr/bin/env python3
import re
from io import StringIO
import xml.etree.ElementTree as ET
def parse_journal_name(journal):
return journal.split(',')[0]
def is_proceedings(journal):
if (re.search('Proceedings', journal) is not None):
return True
if (re.search('AAS Meeting', journal) is not None):... | null | cv_latex/parse_papers.py | parse_papers.py | py | 1,586 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.search",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.XMLParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "xml.etree.Element... |
243682277 | """
GraphQL `Get` command.
"""
from dataclasses import dataclass
from json import dumps
from typing import List, Union, Optional, Dict, Tuple
from weaviate.gql.filter import (
Where,
NearText,
NearVector,
GraphQL,
NearObject,
Filter,
Ask,
NearImage,
Sort,
)
from weaviate.connect impo... | null | weaviate/gql/get.py | get.py | py | 36,498 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "typing.Optional",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "typing.List",
"... |
91562836 | # Copyright (c) 2019. Sophos Limited
#
# 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 t... | null | projectq_project/event/utils.py | utils.py | py | 2,066 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.utils.datetime_safe.datetime.now",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.utils.datetime_safe.datetime",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "datetime.timedelta",
"line_number": 26,
"usage_type": "call"
... |
194834446 | '''
There is placed BasePeer class. It provides base functionality
of every peer-to-peer network.
Vars:
INTERFACES (list) List of Unix network interfaces
BUFFER_SIZE (int) Size of receiving socket buffer
'''
import os
import socket
import select
import logging
import time
import threading
import netifaces as ... | null | base_peer.py | base_peer.py | py | 7,744 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
... |
599678999 | r"""
A brief overview of VQE
=======================
.. meta::
:property="og:description": Find the ground state of a Hamiltonian using the
variational quantum eigensolver algorithm in PennyLane.
:property="og:image": https://pennylane.ai/qml/_images/pes_h2.png
The Variational Quantum Eigensolver (VQE... | null | demonstrations/tutorial_vqe.py | tutorial_vqe.py | py | 10,602 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pennylane.qchem.generate_hamiltonian",
"line_number": 95,
"usage_type": "call"
},
{
"api_name": "pennylane.qchem",
"line_number": 95,
"usage_type": "attribute"
},
{
"api_name": "pennylane.device",
"line_number": 120,
"usage_type": "call"
},
{
"api_n... |
450901677 | import pandas as pd
from sqlalchemy import and_
from sqlalchemy.orm import sessionmaker
from utils.database import io, config as cfg
from utils.algorithm import etl
from utils.database.models.crawl_public import DFundPortfolioIndustry
from utils.database.models.base_public import IdMatch, FundInfo, FundAssetScale, Fund... | null | SCRIPT/MUTUAL/etl/fund_portfolio_industry.py | fund_portfolio_industry.py | py | 4,740 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "utils.database.config.load_engine",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "utils.database.config",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.sessionmaker",
"line_number": 10,
"usage_type": "call"
},
{
... |
343396168 | from django.db import models
from .vs_element import VoiceServiceElement
class MessagePresentation(VoiceServiceElement):
"""
An element that presents a Voice Label to the user.
"""
_urls_name = 'service-development:message-presentation'
play_user_recording = models.BooleanField('This element will... | null | Assignment 2/vsdk/service_development/models/vse_message.py | vse_message.py | py | 1,834 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "vs_element.VoiceServiceElement",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.BooleanField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_... |
436701089 | import pandas as pd
from sklearn.naive_bayes import BernoulliNB
from core.dataset import Dataset
from core.model import SciPyModel, ALSRecommender
from core.recommender import ClassificationRecommender, FactorizationRecommender
from core.transformer import Pipeline
# INPUT_PATH = '/Users/g.sarapulov/MLProjects/playg... | null | examples/nb_recommender.py | nb_recommender.py | py | 1,358 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "core.dataset.Dataset",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "core.recommender.ClassificationRecommender",
"line_number": 19,
"usage_type": "call"
},
{
"a... |
317012151 | #!/home/andriis/miniconda3/envs/py36/bin/python
import argparse
import os
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torchvision.utils import save_image
from torchvision import datasets
import torch.nn.functional as F
device = torch.device('cuda' if torch.cuda.is_available() ... | null | assignment_3/code/a3_gan_template.py | a3_gan_template.py | py | 7,504 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.device",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module"... |
447857564 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from setuptools import setup
requirements = [
"pyyaml>=3.10",
"docker-py>=0.5.3",
]
setup(
name = 'dockerator',
version = '1.0.5-4',
description = 'Waycom Dockerator',
author = 'Waycom',
author_e... | null | setup.py | setup.py | py | 553 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "setuptools.setup",
"line_number": 11,
"usage_type": "call"
}
] |
607003733 | from collections import deque
class Solution(object):
def spiralOrder(self, matrix):
matrix = deque([deque(row) for row in matrix])
result = []
while matrix:
# top
result.extend(matrix.popleft())
# right
for i in xrange(len(matrix)... | null | leetcode/054.py | 054.py | py | 693 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.