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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
135253730 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import telebot
from keras.models import load_model
import cv2
import numpy as np
model = load_model('model.h5') # https://www.kaggle.com/vitaliymalcev/my-pet-project
breeds = { "1": "Abyssinian", "2":"Bengal", "3":"Birman", "4":"Bombay","5":"British Shortha... | null | main.py | main.py | py | 3,652 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "keras.models.load_model",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"li... |
76107967 | import sqlite3
CREATE_BEANS_TABLE = 'CREATE TABLE IF NOT EXISTS beans (id INTEGER PRIMARY KEY, name TEXT, method TEXT, Rating Integer);'
INSERT_BEAN = 'INSERT INTO beans (name,method,rating) VALUES (?, ?, ?);'
GET_ALL_BEANS = 'SELECT * FROM beans'
GET_BEANS_BY_NAME = 'SELECT * FROM beans WHERE name = ?'
GET_BEST_PREP... | null | database.py | database.py | py | 3,171 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sqlite3.connect",
"line_number": 16,
"usage_type": "call"
}
] |
83391762 | import dashboard.app as dashboard
import logging
import logging.handlers
server = dashboard.server
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
# create console handler and set level to debug
ch1 = logging.StreamHandler()
ch1.setLevel(logging.DEBUG)
#File logging
ch2 = logging.handlers.TimedRotatingFil... | null | dashboard_wsgi.py | dashboard_wsgi.py | py | 706 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dashboard.app.server",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "dashboard.app",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG"... |
328014714 | # pylint: disable=I0011,W0613,W0201,W0212,E1101,E1103
from ....core import Data, DataCollection
from ..histogram_widget import HistogramWidget
from ..scatter_widget import ScatterWidget
from ..image_widget import ImageWidget
from ...glue_application import GlueApplication
from . import simple_session
import pytest
f... | null | glue/qt/widgets/tests/test_data_viewer.py | test_data_viewer.py | py | 1,364 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "histogram_widget.HistogramWidget",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "scatter_widget.ScatterWidget",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "image_widget.ImageWidget",
"line_number": 14,
"usage_type": "name"
},
{... |
367396555 | '''
Created on 2016/03/21
@author: kot
'''
import numpy as np
import lib.kabuka_funcs as kf
import lib.common_funcs as f
class Trader(object):
'''
classdocs
'''
losscut_rate = 0.005
stoporder_rate = 0.01
minstd_rate = 0.05
std_span = 5
max_span = 20
code = ""
kabuka ... | null | trade_advisor/testing/trader.py | trader.py | py | 2,900 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "lib.common_funcs.log",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "lib.common_funcs",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "numpy.std",
"li... |
580529287 | import matplotlib.pyplot as plt
import numpy as np
class Plot:
def __init__(self):
self.axes = plt.gca()
self.axes.set_xlim(0, 100)
self.axes.set_ylim(0, 100)
self.nextIdx = 0
self.xdata = []
self.ydata = []
self.medianYdata = []
self.samplesLine, = self.axe... | null | QLearning/view/plot.py | plot.py | py | 1,556 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pyplot.gca",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotli... |
22800609 | from django.shortcuts import render, get_object_or_404,Http404,redirect
from django.http import HttpResponse, JsonResponse
from django.utils.http import is_safe_url
from django.conf import settings
from .models import Tweet
import random
from .forms import Tweetform
from .serializer import TweetSerializer, TweetActionS... | null | tweets/views.py | views.py | py | 5,029 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.settings.ALLOWED_HOSTS",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
... |
360159412 | from telethon.sync import TelegramClient
from django.core.exceptions import ValidationError
from telethon.tl.functions.messages import AddChatUserRequest
import asyncio
from telethon.tl.functions.messages import GetDialogsRequest
from telethon.tl.types import InputPeerEmpty
import os
from main.models import Customer, ... | null | main/telegram.py | telegram.py | py | 3,740 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "asyncio.new_event_loop",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "asyncio.set_event_loop",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 27,
"usage_type": "call"
},
{
"api_name":... |
597625940 | """
Replicates the original experiments done in
https://github.com/rtqichen/torchdiffeq/blob/master/examples/odenet_mnist.py
Adapted from https://github.com/titu1994/tfdiffeq/blob/master/examples/odenet_mnist.py
and https://github.com/rtqichen/torchdiffeq/blob/master/examples/odenet_mnist.py
Logs all metrics to logs/... | null | experiments/mnist/mnist_neuralode.py | mnist_neuralode.py | py | 29,308 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tensorflow.config.experimental.list_physical_devices",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tensorflow.config",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.config.experimental.set_virtual_device_configuration",
... |
625349480 | # Copyright 2014-2016 F5 Networks 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 ... | null | f5_openstack_agent/lbaasv2/drivers/bigip/cluster_manager.py | cluster_manager.py | py | 8,574 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "oslo_log.log.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "oslo_log.log",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "requests.exceptions.HTTPError",
"line_number": 71,
"usage_type": "name"
},
{
"api_name": "tim... |
613525260 | from django.forms import ModelForm,Textarea,TextInput
from utils.models import Solicitacao
class SolicitacaoModelForm(ModelForm):
class Meta:
model = Solicitacao
fields = ['assunto','descricao']
exclude = ['data_criacao','data_resolucao','status','empresa']
widgets = {
'... | null | clientes/forms.py | forms.py | py | 456 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "utils.models.Solicitacao",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.forms.TextInput",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "... |
295824825 | import csv
import random
import time
import os
import matplotlib.patches as patches
import matplotlib.pyplot as plt
from PIL import Image
from matplotlib.ticker import NullLocator
from torch.utils.data import DataLoader
from config.args_detect import *
from datasets.data_loader import ImageFolder, ListDataset
from mo... | null | detect_annotation.py | detect_annotation.py | py | 8,769 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.utils.data.manual_seed",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.utils.data",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.backends",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_... |
385217786 | import pytest
from parsl.tests.utils import get_rundir
from parsl.tests.user_opts import user_opts
if 'midway' in user_opts:
info = user_opts['midway']
else:
pytest.skip('midway user_opts not configured', allow_module_level=True)
config = {
"sites": [
{
"site": "midway_ipp_multinode",
... | null | parsl/tests/configs/midway_ipp_multinode.py | midway_ipp_multinode.py | py | 1,084 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "parsl.tests.user_opts.user_opts",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "parsl.tests.user_opts.user_opts",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pytest.skip",
"line_number": 8,
"usage_type": "call"
},
{
"api_name... |
2787113 | import pytest
try:
import pyrosetta
from pyrosetta import rosetta as ros
from worms.filters.db_filters import BakerFilter
HAVE_PYROSETTA_AND_DBSTUFF = True
try:
import pyrosetta.distributed
HAVE_PYROSETTA_DISTRIBUTED = True
except ImportError:
HAVE_PYROSETTA_DISTRIBUTED ... | null | worms/tests/filters/test_dbfilters.py | test_dbfilters.py | py | 1,468 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pytest.mark.skipif",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "worms.filters.db_filters.BakerFilter",
"line_number": 22,
"usage_type": "call"
},
{
"api_name... |
579647607 | # (C) Copyright 2005-2020 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | null | env/lib/python3.8/site-packages/traits/tests/test_property_notifications.py | test_property_notifications.py | py | 1,365 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "traits.api.HasTraits",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "traits.api.Any",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "traits.api.Property",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "unittest.Test... |
280092131 | #!/usr/bin/env python3
"""Script for managing magic card spreadsheets."""
import argparse
import datetime
import os
import shutil
import tempfile
import mtg_ssm
from mtg_ssm import mtgjson
from mtg_ssm.mtg import card_db
from mtg_ssm.mtg import counts
import mtg_ssm.serialization.interface as ser_interface
DEFAULT_D... | null | mtg_ssm/ssm.py | ssm.py | py | 7,620 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.expanduser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "mtg_ssm.serialization.in... |
179173272 | """
Download image via sdk instead of directly using a tool or downloading the
image from the host itself.
https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/wiki/
Storage_4_0/4_1_Storage_Upload_Disk_Image_Through_REST_AP
"""
import config
import pytest
from art.test_handler.tools import polarion, bz
im... | null | art/tests/rhevmtests/storage/storage_streaming_api/test_uploaded_image.py | test_uploaded_image.py | py | 3,179 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "art.unittest_lib.StorageTest",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "rhevmtests.helpers.get_test_parametrize_ids",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "rhevmtests.helpers",
"line_number": 67,
"usage_type": "name"
}... |
344309782 | import nltk
import nltk.tokenize.api
import re
from nltk.corpus import stopwords
from nltk.corpus import wordnet
from nltk.stem.wordnet import WordNetLemmatizer
import sys
import datetime
from nltk.tag.perceptron import PerceptronTagger
from sets import Set
import perceptron_word_net_tag_mapper as tag_mapper
blobber... | null | python/document_parsing_classes.py | document_parsing_classes.py | py | 3,072 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.compile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "nltk.tag.perceptron.PerceptronTagger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "nltk.sent_tokenize",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "nl... |
629972597 | import pygame
from random import randint
import numpy as np
class Snake():
'''Initialises the Snake and keeps track of its body, movement etc.'''
def __init__(self, game):
self.vel=game.window_x/game.grid_x #how far the Snake moves each step
self.direction=None
#Initial Sna... | null | snake.py | snake.py | py | 12,802 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.randint",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "pygame.init",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
... |
422175147 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 DevIntelle Consulting Service Pvt.Ltd (<http://www.devintellecs.com>).
#
# For Module Support : devintelle@gmail.com or Skype : devinte... | null | sci_goexcel_payment_receipt/report/print_account_voucher.py | print_account_voucher.py | py | 4,284 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "odoo.models.AbstractModel",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "odoo.api... |
616004425 | import numpy as np
import skimage.feature
def get_elbp_vector(image):
elbp_vector = []
image_dimensions = [int(len(image) / 8), int(len(image[0]) / 8)]
for i in range(image_dimensions[0]):
block_vector = []
for j in range(image_dimensions[1]):
curr_block = image[i * 8:(i + 1) ... | null | elbp.py | elbp.py | py | 755 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "skimage.feature.feature.local_binary_pattern",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "skimage.feature.feature",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "skimage.feature",
"line_number": 13,
"usage_type": "name"
},
... |
54227830 | import sys,time,json,requests,copy
from ApiHelp import http,config,unit
from ApiMaps import api
conf = config.conf()
import MyLog
'''
发送请求 apikey: api,data的key值
payload post参数
urlParam:get参数
precondition:是否前置接口
file method file 上传文件
header:json or xml...使用不同header
'''
def action(apikey,payload=N... | null | TEST/API/ApiHelp/request.py | request.py | py | 3,317 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "ApiHelp.config.conf",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "ApiHelp.config",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_... |
370112665 | """
Model, training, test code for molecular dynamic structure prediction for t + tao
Modification: number of layers, number of neuron, data1 preprocessing, single model, plot
hyperparameters will adjust for best training loss
code citation:
@article{time-lagged-autoencoder,
Author = {Christoph Wehmeyer and Fr... | null | MolecularDynamicMachineLearning.py | MolecularDynamicMachineLearning.py | py | 19,979 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.listdir",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 51,... |
436247256 | import hashlib
import requests
from django.conf import settings
from requests.auth import HTTPBasicAuth
from urllib.parse import urljoin
from users.models import User
class AppMailchimpWrongResponseException(Exception):
pass
class AppMailchimpNotFoundException(AppMailchimpWrongResponseException):
pass
cl... | null | src/app/integrations/mailchimp.py | mailchimp.py | py | 2,421 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.settings.MAILCHIMP_API_KEY.split",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.MAILCHIMP_API_KEY",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 20,
"usage... |
239717874 | """Tests for `mbed_targets`."""
import unittest
import mock
# Import from top level as this is the expected interface for users
from mbed_targets import MbedTargets, MbedTarget
class TestMbedTarget(unittest.TestCase):
"""Tests for the class `MbedTarget`."""
def test_nominal_database_entry(self):
""... | null | tests/test_mbed_targets.py | test_mbed_targets.py | py | 3,032 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "mbed_targets.MbedTarget",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "mbed_targets.MbedTarget",
"line_number": 39,
"usage_type": "call"
},
{
"api_name":... |
207936309 | #import sys
#import scipy
import argparse
from argparse import ArgumentParser
import pandas
import sklearn
from sklearn import model_selection
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.linear_model import Logist... | null | WebContent/resources/python/flower_classification.py | flower_classification.py | py | 2,870 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 39,
"usage_type": "call"
},
{
"... |
31779341 | import kivy
from kivy.graphics import Color
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.dropdown import DropDown
from kivy.uix.button import Button
from kivy.uix.checkbox import CheckBox
from kivy.uix.boxlayo... | null | kivy_sport_search.py | kivy_sport_search.py | py | 5,614 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "kivy.uix.boxlayout.BoxLayout",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "time.strftime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "tim... |
320935379 | import matplotlib.pyplot as plt
from scipy.stats import norm
from random import uniform
num_rows, num_cols = 3, 2
fig, axes = plt.subplots(num_rows, num_cols, figsize=(10, 12))
for i in range(num_rows):
for j in range(num_cols):
m, s = uniform(-1, 1), uniform(1, 2)
x = norm.rvs(loc=m, scale=s, size=... | null | matplotlib/six_hists.py | six_hists.py | py | 559 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "random.uniform",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "scipy.stats.... |
93157596 | import os
import pytest
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
def test_gecko_manager_with_correct_version():
driver_path = GeckoDriverManager("v0.11.0").install()
assert os.path.exists(driver_path)
def test_gecko_manager_with_selenium():
driver_path = ... | null | tests/test_firefox_manager.py | test_firefox_manager.py | py | 1,080 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "webdriver_manager.firefox.GeckoDriverManager",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name... |
226269111 | from tkinter import *
import tkinter
from PIL import ImageTk, Image
# def foo():
# image = ImageTk.PhotoImage(Image.open("ball.png"))
image = Image.open("screenshot_from_Chrome.png")
def mic():
global image
modal = Tk()
modal.geometry('1000x1000')
canvas = Canvas(modal, width=999, height=999)
... | null | Comparium/test.py | test.py | py | 759 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "PIL.Image.open",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number"... |
35486407 | """
Find two lines, which, together with the x-axis forms a container, such that the container contains the most water.
Input: height = [1,8,6,2,5,4,8,3,7]
Output: 49
"""
from typing import List
def maxArea(height: List[int]) -> int:
L, R = 0, len(height) - 1
ans = 0
while L < R:
if height[L] < he... | null | others/container_most_water.py | container_most_water.py | py | 492 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
}
] |
84845883 | from flask import Flask
from flask_jwt_extended import JWTManager
from flask_restplus import Api
from flask_sqlalchemy_session import flask_scoped_session
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from app.views.auth import api as auth_namespace
from app.views.districts import api as... | null | app/app.py | app.py | py | 1,187 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "app.views.auth",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "app.views.auth.config.from_pyfile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "app.view... |
2307102 | """
сформировать presence-сообщение;
отправить сообщение серверу;
получить ответ сервера;
разобрать сообщение сервера;
параметры командной строки скрипта client.py <addr> [<port>]:
addr — ip-адрес сервера;
port — tcp-порт на сервере, по умолчанию 7777."""
import argparse
import logging
from socket import socket, AF_I... | null | lesson_7_koyang-kuleshov/client.py | client.py | py | 5,734 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "common.variables.DEFAULT_PORT",
"line_number": 47,
"usage_type": "name"
},
{
"api_name"... |
171909761 | """Chicago taxi example using TFX DSL."""
# Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | null | examples/chicago_taxi_pipeline/taxi_pipeline_gcp.py | taxi_pipeline_gcp.py | py | 6,844 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_nu... |
607788708 |
from flask import Flask, jsonify, request
from Storage import liked, notLiked, articles
from Demographic import output
from Content import recommendArticle
app = Flask(__name__)
@app.route('/articles')
def getArticles():
aData = {
'title': articles[0][13],
'eventType' : articles[0][4],
... | null | Article Recommendation/Main.py | Main.py | py | 1,125 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "Storage.articles",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "Storage.articles",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "Storage.articles",
"... |
285419270 | ''' Analyza dat, data su z datasetu
Datasety dostupne na:
FIFA 17: https://www.kaggle.com/artimous/complete-fifa-2017-player-dataset-global/
FIFA 18: https://www.kaggle.com/kevinmh/fifa-18-more-complete-player-dataset
Datasety sa nachadzaju v data/dataset
'''
import pandas as pd
from ma... | null | src/analysis/analysis.py | analysis.py | py | 4,148 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib... |
386225712 | #!/usr/bin/env python
###############################################################################
###############################################################################
__author__ = 'hsk81'
###############################################################################
##################################... | null | quotestream/sim.py | sim.py | py | 2,979 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dateutil.parser",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "dateutil.parser.add_argument",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "... |
60897616 | import numpy as np
import pandas as pd
import os
import matplotlib as mpl
import matplotlib.pyplot as plt
from sklearn.metrics import mean_squared_error
from sklearn.linear_model import SGDClassifier
detect_num = 5
def save_fig(fig_id, tight_layout=True):
path = os.path.join(PROJECT_ROOT_DIR, "images", IMAGE_DIR... | null | lab3/lab3A.py | lab3A.py | py | 3,174 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.tight_layout",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.p... |
140002192 | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: create_datelist
# Description:
# Author: Kuan-Hui Lin
# Date: 2020/4/27
# -------------------------------------------------------------------------------
import datetime
def creat... | null | create_datelist.py | create_datelist.py | py | 878 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 19,
"usage_type": "call"
},
{
"api_name"... |
341626605 | """data_converter URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | null | data_converter/urls.py | urls.py | py | 9,647 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "business_register.views.fop_views.FopViewSet",
"line_number": 60,
"usage_type... |
641055169 | import collections
import jcli_tokenizer
from jcli_datatypes import linked_list, sym, quote
syntax = collections.namedtuple(
'syntax', ['value', 'line_no', 'char_no'])
def parse(string):
return parse_tokens(jcli_tokenizer.tokenize(string))
def parse_tokens(tokens):
match = match_exprs(tokens)
if mat... | null | jcli_parser.py | jcli_parser.py | py | 2,730 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.namedtuple",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "jcli_tokenizer.tokenize",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jcli_datatypes.linked_list",
"line_number": 50,
"usage_type": "call"
},
{
"api_name... |
369812459 | import pygame
pygame.init()
win = pygame.display.set_mode((600,480))
walkRight = [pygame.image.load('pg5.xcf'), pygame.image.load('pg6.xcf'),pygame.image.load('pg7.xcf'),pygame.image.load('pg8.xcf')]
walkLeft = [pygame.image.load('pg1.xcf'), pygame.image.load('pg2.xcf'),pygame.image.load('pg3.xcf'),pygame.ima... | null | esrtesgame.py | esrtesgame.py | py | 2,534 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.init",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.loa... |
152860488 | # coding: utf-8
import os
import datetime
import logging
import hashlib
from flask import request, g
from flask.ext.login import LoginManager
from werkzeug.routing import BaseConverter
import conf
from dash._flask import Flask
from dash.core import db, mongo, cache
def create_app(config=None):
app = Flask(
__name... | null | kread/read/image/dash/__init__.py | __init__.py | py | 3,081 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dash._flask.Flask",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.utcn... |
638420305 | # Copyright 2021 The SODA Authors.
#
# 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 writin... | null | delfin/drivers/dell_emc/unity/unity.py | unity.py | py | 24,998 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "oslo_log.log.getLogger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "oslo_log.log",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "delfin.drivers.driver.StorageDriver",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_... |
468571596 | import numpy as np
from tensorflow.keras.models import clone_model, load_model, Model
from tensorflow.keras.callbacks import EarlyStopping
# from keras.layers import Input
from tensorflow.keras.layers import Input
from tensorflow.keras.optimizers import Adam
import tensorflow as tf
import matplotlib.pyplot as plt
from... | null | FedMD_gan.py | FedMD_gan.py | py | 10,745 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "Neural_Networks.build_generator",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.layers.Input",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models.clone_model",
"line_number": 53,
"usage_type": "cal... |
447824216 | # Program steps
# 1. Input of what Month
# 2. Input of what day
# 3. Load JSON file data.JSON
# 4. Find the keypairs for the month and date
import json
# json_string = '{"Month": "Sunsebb",, "Day": 22}'
# parsed_json = json.loads(json_string)
# print (parsed_json["Month"])
path = "data.json"
def read_json(path):
... | null | greyhawk.py | greyhawk.py | py | 1,675 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 20,
"usage_type": "call"
}
] |
265337161 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import json
import logging
import shutil
import time
import os
import pytest
from gcdt_bundler.bundler import get_zipped_file
from nose.tools import assert_equal, assert_in, assert_not_in
from gcdt import utils
from gcdt.ramuda_core impor... | null | tests/test_ramuda_aws.py | test_ramuda_aws.py | py | 26,189 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 3... |
547655315 | #!/usr/bin/python
import telebot #importing telegram bot lib
import time
import pdfkit
import urllib
import glob
import random
import json
#variable declararion section
#maybe i must put it in a external file
TOKEN = ''
tb = telebot.TeleBot(TOKEN)
PAGE = 'https://google.com'
IMG_PATH = "C:\\Users\\gdldzerm\\Dropbo... | null | secunditobot.py | secunditobot.py | py | 3,684 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "telebot.TeleBot",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number"... |
228303820 | import os
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit
from django import forms
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.http import HttpRequest
from django.test import SimpleTestCase
from django.test import Tes... | null | devday/talk/tests/test_forms.py | test_forms.py | py | 13,260 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.test.TestCase",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "talk.forms.TalkForm",
"line_number": 32,
"usage_type": "call"
},
{
"api_n... |
454201202 | # Memory v3.1
import pygame, sys, time, random
from pygame.locals import *
# User-defined classes
class Tile:
shows = False
def __init__(self, position, image, coverImage = None):
self.position = position
self.image = image
self.coverImage = coverImage
if self.coverI... | null | Lab4/v3.1.py | v3.1.py | py | 5,217 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.image.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.image",
... |
307366565 | import collections
import math
import pygame
import numpy as np
Point3D = collections.namedtuple('Point3D', ['x', 'y', 'z'])
Point3D.__str__ = lambda self: '(' + str(self.x) + ',' + str(self.y) + ',' + str(self.z) + ')'
Point3D.__add__ = lambda self, other: Point3D(self.x + other.x, self.y + other.y, self.z + other.z... | null | cubes.py | cubes.py | py | 6,356 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.namedtuple",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "math.pi",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "numpy.matrix",
"l... |
325519459 | #! /usr/bin/python
from copy import deepcopy
from collections import deque
from itertools import combinations
from utils import *
INPUT = split_as_int(read_input_single('25'), ',')
def get_next_moves(pos):
yield (pos[0] + 1, pos[1]), 'east'
yield (pos[0] - 1, pos[1]), 'west'
yield (pos[0], pos[1] + 1), 'south... | null | aoc25.py | aoc25.py | py | 3,406 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "itertools.combinations",
"line_number": 145,
"usage_type": "call"
}
] |
110758438 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import re
import requests
import json
from config import LINE_API_REPLY
from typing import List
def quickreplymsg(reply_token: str = None, text_msg: str = None,
line_aceess_token: str = None) -> int:
authoriza... | null | libs/share_location.py | share_location.py | py | 1,335 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.Session",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "config.LINE_API_REPLY",
"line_number": 45,
"usage_type": "argument"
},
{
"api_name": "json.dumps",
"line_number": 45,
"usage_type": "call"
}
] |
159844869 | from typing import Optional
import pulumi_aws as aws
from infra.config import configurable_envvars
from infra.dgraph_cluster import DgraphCluster
from infra.ec2 import Ec2Port
from infra.lambda_ import Lambda, LambdaExecutionRole, LambdaResolver, PythonLambdaArgs
from infra.network import Network
import pulumi
clas... | null | pulumi/infra/dgraph_ttl.py | dgraph_ttl.py | py | 2,112 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pulumi.ComponentResource",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "infra.network.Network",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "infra.dgraph_cluster.DgraphCluster",
"line_number": 17,
"usage_type": "name"
},
{... |
460761902 | import pandas as pd
import credentials
from sqlalchemy import create_engine
from subprocess import call
import requests
from datetime import date,timedelta
import re
from parsel import Selector
### definicoes de variaveis
DATABASE, HOST, USER, PASSWORD = credentials.setDatabaseLogin()
engine = create_engine("postgresq... | null | load_dados_worldmeters.py | load_dados_worldmeters.py | py | 2,443 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "credentials.setDatabaseLogin",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 17,
"usage_type": "call"
},
{
"api_nam... |
203961491 | import cv2 as cv
img = cv.imread('data/pic2.jpg')
cv.imshow('pic2', img)
canny = cv.Canny(img, 125, 175)
cv.imshow('Edges', canny)
blur = cv.GaussianBlur(img, (11, 11), cv.BORDER_DEFAULT)
canny = cv.Canny(blur, 125, 175)
cv.imshow('Edges_blured', canny)
cv.waitKey(0)
| null | homeworks/02/problem3.py | problem3.py | py | 276 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.imread",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 9,
"... |
258985320 | import unittest
import sqlite3
import json
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def daylengthVSmaxtemp(cur, conn): #include join
cur.execute('SELECT day_length FROM Daylight')
daylength1 = cur.fetchall()
daylight2 = []
for x in daylength1:
daylight2.a... | null | Visualizations - Copy.py | Visualizations - Copy.py | py | 6,593 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.pi",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
616476583 | import torch.nn as nn
import torch
import math
def l2_norm(input, axis=1):
norm = torch.norm(input, 2, axis, True)
output = torch.div(input, norm)
return output
class Arcface(nn.Module):
def __init__(self, embedding_size=512, classnum=2, s=64., m=0.5):
super(Arcface, self).__init__()
... | null | model/loss_function/arc_loss.py | arc_loss.py | py | 1,457 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.norm",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.div",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number":... |
26737870 | from django import forms
from .models import CourseTaken
from .models import CourseGiven
class CourseGivenForm(forms.ModelForm):
class Meta:
model = CourseGiven
fields = ['request_title', 'limit_min', 'limit_max', 'request_content']
labels = {
'request_title': 'Course title:',
... | null | course_requests/forms.py | forms.py | py | 1,654 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.CourseGiven",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms... |
340807806 | import collections.abc
import declare
__all__ = ["GlobalSecondaryIndex", "LocalSecondaryIndex"]
def validate_projection(projection):
invalid = ValueError("Index projections must be either 'keys_only', 'all',"
" or an iterable of model attributes to include.")
# String check first sin... | null | bloop/index.py | index.py | py | 4,153 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.abc.abc",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "collections.abc",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "declare.Field",
"line_number": 30,
"usage_type": "attribute"
}
] |
203843711 | import matplotlib
from flask import Flask, render_template,send_file
import io
import os
import base64
import pandas as pd
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import seaborn as sns
fig,ax = plt.subplots(figsize... | null | baek.py | baek.py | py | 2,725 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "seaborn.set_style",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.... |
254782582 | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from hsreplaynet.comments.urls import api_urlpatterns as comments_urlpatterns
from hsreplaynet.packs.api import PackViewSet
from . import views
router = DefaultRouter()
router.register(r"agents", views.APIKeyViewSet)
router.reg... | null | hsreplaynet/api/urls.py | urls.py | py | 823 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "hsreplaynet.packs.api.PackViewSet",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "django.conf.urls.url",
"line_number": 15,
"usage_type": "call"
... |
552052307 | from operator import sub
from itertools import combinations
def checkio(cakes):
distance = lambda v: sum(v[i]**2 for i in range(2))**.5
normalize = lambda v: ['{:.3f}'.format(v[i]/distance(v)) for i in range(2)]
vectors = {}
for a, b in combinations(sorted(cakes), 2):
vect = list(map(sub, b,a)... | null | CiO/cakes-rows.py | cakes-rows.py | py | 958 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "itertools.combinations",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "operator.sub",
"line_number": 10,
"usage_type": "argument"
}
] |
195122997 | import plotly.plotly as py
from plotly.graph_objs import *
py.sign_in('username', 'api_key')
data = Data([
Scatter(
mode='markers',
stream=Stream(
maxpoints=50,
token='your_stream_token_here'
)
)
])
plot_url = py.plot(data) | null | plotly_test.py | plotly_test.py | py | 279 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "plotly.plotly.sign_in",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "plotly.plotly",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "plotly.plotly.plot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "plotly.plotly",
... |
146078928 | #!/usr/bin python3
# -*- coding: utf-8 -*-
import smtplib
import os
from email.utils import formatdate
# for Japanese content
from email.mime.text import MIMEText
f = open('CAMIP.txt')
camip = f.read()
# print(camip)
f.close()
myip = os.popen('ip addr show eth0').read().split("inet ")[1].split("/")[0]
if __name__ ==... | null | sendTodamailPi.py | sendTodamailPi.py | py | 1,384 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.popen",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "email.utils.formatdate",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "smtplib.SMTP... |
449366087 | import os
import io
import numpy
from pandas import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
def readFiles (path):
for root, dirnames, filenames in os.walk(path):
for filename in filenames:
path = os.path.join(root, file... | null | documentation/SourceCode.py | SourceCode.py | py | 1,633 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.walk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "io.open",
"line_number": 15,
... |
225334222 | import dbf
import read_in_tree_structure
import read_write_project_structure
import friendly_name_lookup
def read_in_dbf(dbf_file_name):
dbf_list = list()
table = dbf.Table(dbf_file_name)
header_list = table.field_names
table.open()
for record in table:
record_dict = dict()
if no... | null | read_write_dbf.py | read_write_dbf.py | py | 2,756 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dbf.Table",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "read_in_tree_structure.get_file_list",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "read_write_project_structure.get_field_value",
"line_number": 35,
"usage_type": "call"
}... |
52578833 | from collections import deque
from threading import Thread
import time
import random
import RPi.GPIO as GPIO
import sys
from hx711 import HX711
from tkinter import *
from tkinter import font
import PIL
from PIL import Image
import os.path
GPIO.setwarnings(False)
def cleanAndExit():
print("Cleaning...")
GPIO... | null | Code_Accent.py | Code_Accent.py | py | 14,819 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "RPi.GPIO.setwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "RPi.GPIO.cleanup",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_n... |
353373004 | import datetime
import json
import os
import uuid
from configparser import ConfigParser
import pandas as pd
from dotenv import load_dotenv
from sqlalchemy.orm import Session
from sqlalchemy.orm import sessionmaker
from mop.azure.comprehension.operations.subscriptions import Subscriptions
from mop.azure.utils.create_c... | null | src/mop/azure/analysis/baseline/aggregate_sql_subscriptions.py | aggregate_sql_subscriptions.py | py | 9,024 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "mop.db.basedb.BaseDb",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "mop.azure.utils.create_configuration.change_dir",
"line_number": 21,
"usage_type": "call"
},
... |
214761682 | from Bio import Entrez
import time
Entrez.email = "maysam.hafezparast@gmail.com"
search_results = Entrez.read(Entrez.esearch(db="pubmed",
term="breast cancer",
reldate=365, datetype="pdat",
... | null | BioPythonFolder/searchingForPapaers.py | searchingForPapaers.py | py | 1,130 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "Bio.Entrez.email",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "Bio.Entrez",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "Bio.Entrez.read",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "Bio.Entrez",
"line_... |
600869796 | import numpy as np
from numba import jit, types, float64
#@jit([types.Tuple((float64[:], float64[:]))(float64[:], float64[:])], cache=True, nopython=True)
def convert_to_angle_function(x, y):
i = 1
h_i = 0
h_i_1 = 0
com_x = 0
com_y = 0
curve_length = 0
s = np.zeros(x.size-1, dtype=np.float6... | null | image_comparison/curve_processing.py | curve_processing.py | py | 1,825 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.zeros",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.float64",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.float64",
"line_... |
517301150 | import discord
from discord.ext import commands
from discord.ext.commands import group
from cogs.base_cog import BaseCog
class Vchannels(BaseCog):
def __init__(self, bot):
super().__init__(bot)
@group()
async def vch(self, ctx):
"""Voice Channel edition commands."""
if ctx.invoked... | null | cogs/vchannels.py | vchannels.py | py | 1,522 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cogs.base_cog.BaseCog",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.group",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "discord.PermissionOverwrite",
"line_number": 36,
"usage_type": "call"
},
{
"api_n... |
484443049 | import pandas as pd
import numpy as np
import geopandas
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
top_4 = ('Eric L. Adams', 'Maya D. Wiley', 'Kathryn A. Garcia', 'Andrew Yang')
color_map = {
'Adams': 'Blues',
'Garcia': 'Greens',
'Wiley': 'Oranges',
'Yang':... | null | nyc_ed_rcv.py | nyc_ed_rcv.py | py | 4,894 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.DataFrame",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "pandas.read_html",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "geopandas.read_file",... |
17686103 | from dataclasses import dataclass
import pytest
from wired_injector.pipeline import Pipeline, Container
from wired_injector.pipeline.default_pipeline import DefaultPipeline
from wired_injector.pipeline.operators import Get
from .conftest import (
DummyTarget,
DummyTargetNamedTuple,
dummy_target_function,
... | null | tests/pipeline/test_default_pipeline.py | test_default_pipeline.py | py | 2,734 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "wired_injector.pipeline.Container",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "wired_injector.pipeline.Pipeline",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "wired_injector.pipeline.default_pipeline.DefaultPipeline",
"line_number": ... |
327466691 | from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
import time
import re
from pages import base_page
from pages.base_page import BasePage
... | null | tests/pages/hotel_reservation.py | hotel_reservation.py | py | 2,699 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pages.base_page.BasePage",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "re.search",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.commo... |
196884021 | import os
import re
from logging import getLogger
from src.reversi_zero.config import Config
from src.reversi_zero.lib.model_helpler import ask_model_dir
from src.reversi_zero.lib.proc_helper import build_child_cmd
from src.reversi_zero.worker.elo_p1 import EloWorkerBase
logger = getLogger(__name__)
def start(confi... | null | src/reversi_zero/worker/elo_p1_ntest.py | elo_p1_ntest.py | py | 2,689 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "src.reversi_zero.lib.model_helpler.ask_model_dir",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"a... |
155500829 | from auth0.v3.authentication.users import Users
import json
def hello(event, context):
domain = 'fuzeday-ultron.auth0.com'
u = Users(domain=domain)
user_info = json.loads(u.userinfo('n66HltzIlr9ekRZSSZupiv-G7TdnikSA'))
body = {
"message": "Go Serverless v1.0! Your function executed successful... | null | handler.py | handler.py | py | 722 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "auth0.v3.authentication.users.Users",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 18,
"usage_type": "call"
}
] |
63139438 |
### Import Libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
import pickle
warnings.filterwarnings('ignore')
### Import Datset
df = pd.read_csv("dataset.csv")
### Splitting Data
X = df[['age', 'trestbps', 'chol', 'thalach', 'oldpeak']]
y = df[... | null | Heart Disease/model.py | model.py | py | 1,713 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 25,
"usage_type": "call"
},
{
"... |
143861842 | import inspect
from typing import Set, List, Tuple, Optional
from .schema import Schema
import grblas
import numpy as np
import pandas as pd
class Flat:
"""
Coded data in a flat structure, represented by a GraphBLAS Vector
"""
def __init__(self, vector, schema: Schema, dims: Set[str]):
self.ve... | null | dimsum/container.py | container.py | py | 7,114 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "schema.Schema",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 4... |
259900826 | import pandas
import numpy as np
import sklearn.feature_extraction
from sklearn.naive_bayes import MultinomialNB
from sklearn import metrics
def targets2num (targets):
dict = {}
i=0
numbers = []
for target in targets:
if target not in dict.keys():
dict[target] = i
i=i+1
... | null | sberbank_test_case/emotional_sentences/sentences.py | sentences.py | py | 4,821 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
327535322 | #
# Copyright 2019, Institute for Systems Biology
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | null | api/v2/cohorts_views.py | cohorts_views.py | py | 5,056 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "python_settings.settings.LOGGER_NAME",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "python_settings.settings",
"line_number": 26,
"usage_type": "name"
},
{
... |
631996421 | import matplotlib.pyplot as plt
from numpy.core.fromnumeric import shape
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score
from collections import defaultdict
import numpy as np
import pandas as pd
def train_logistic_param(norm, solver_name, rati... | null | ueda/chapter06/knock59.py | knock59.py | py | 3,247 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LogisticRegression",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name"... |
137477306 | import os
import json
totalNumberOfPushEventInAScaryGlobalVariable = 0
def getJsonFiles(dataDir):
return [jsonFile for jsonFile in os.listdir(dataDir) if os.path.isfile(os.path.join(dataDir, jsonFile))]
def printPerFileAnalysis(fileName, numUniqueRepos, numRepos):
firstBar = ' ' * (18-len(fileName)) + '|'
... | null | analysis/RepeatedRepo.py | RepeatedRepo.py | py | 2,024 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number":... |
609147806 | import os
import jieba
import pickle
import seaborn
import numpy as np
import pandas as pd
from scipy.misc import imread
from pyecharts import Map
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
font = FontProperties(fname=r"simkai.ttf", size... | null | Pythonproject/taobao/test3.py | test3.py | py | 3,581 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "seaborn.set",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.... |
221248647 | """
Author: Dheeraj Alimchandani
file: TSP_R00182505
Running on : 16/10/2019
"""
import random
from Individual import *
import sys
import time
import itertools
myStudentNum = 182505
random.seed(myStudentNum)
class BasicTSP:
def __init__(self, _fName, _popSize, _mutationRate, _maxIterations,
_in... | null | Assignment 1/safe_place.py | safe_place.py | py | 20,371 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 102,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"lin... |
94197119 | from random import random
import math
import json
titles = ["Natural Language Processing", "Machine Learning", "Analyst",
"Project Manager", "Subject Matter Expert",
"Knowledge representation"]
activity = ["Pole dancing", "Ice skating", "Hamstering", "Quacking",
"Ping-ponging", "Day-d... | null | random/skillmap/data/random_data_generator.py | random_data_generator.py | py | 4,621 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "math.floor",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number"... |
325477557 | # -*- coding: UTF-8 -*-
# !/root/.virtualenvs/test/bin/python3.7
"""
Author: Sunck
note: 用于爬取京东商品爬取的主函数
Created time: 2021/06/28
"""
import re
import json
import time
import queue
import random
import requests
import threading
import numpy as np
import configparser
from lxml import html
etree = html.... | null | crawler_jd/crawler_main.py | crawler_main.py | py | 13,369 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "lxml.html.etree",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "lxml.html",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "settings_package.crawler_... |
260042569 | '''爬取游记信息的地方有些繁琐 都是用循环爬取到每个字保存在列表中 最后转换为字符串
游记的重复检查是通过数据库的 ID列唯一检查 '''
import requests
from bs4 import BeautifulSoup
import os
import re
import pymysql
from selenium import webdriver
import time
from multiprocessing.dummy import Pool
from tkinter import *
import shutil
# 连接数据库
db = pymysql.connect("127.0.0.1", "ro... | null | travel/city/dao/onlymfw.py | onlymfw.py | py | 9,727 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pymysql.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.PhantomJS",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "selenium.webd... |
433426770 | from imagezmq import imagezmq
import argparse
import numpy as np
import tensorflow as tf
import cv2
import time
from utils import label_map_util
from utils import visualization_utils_color as vis_util
# Path to frozen detection graph. This is the actual model that is used for the object detection.
PATH_TO_CKPT = './m... | null | server.py | server.py | py | 4,191 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "utils.label_map_util.load_labelmap",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "utils.label_map_util",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "utils.label_map_util.convert_label_map_to_categories",
"line_number": 20,
"usage_... |
400585780 | # -*- coding: utf-8 -*-
import os
import subprocess
import paths
import os.path
import io
class CRFClassifier:
def __init__(self, name, model_type, model_path, model_file, verbose):
self.verbose = verbose
self.name = name
self.type = model_type
self.model_fname = model_file
... | null | src/classifiers/crf_classifier.py | crf_classifier.py | py | 4,339 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_num... |
42632298 | import matplotlib.pyplot as plt
import pickle
import numpy as np
base = "out.log_2019-08-17_17:39:34_"
for i in range(10):
filename = base + str(i) +".pickle"
with open(filename, "rb") as f:
result = pickle.load(f)
result = np.array(result)
data = result[0]
means = [d[0] for d in data]
x = range(len(means)... | null | plotter.py | plotter.py | py | 403 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pickle.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
273049927 | #!/usr/bin/env python3
from flask import Flask, render_template
import sys
import csv
import os
import collections
ARGUMENTS = sys.argv[1:]
FILENAME = 'word_lists.csv'
LIST_ALL = False
PREFIX = ''
CONTAINS = ''
MEANING = ''
POS = ''
POS_DIR = {'wr' : 'Word Root',
'suf' : 'Suffix',
'pre' : 'Pref... | null | server.py | server.py | py | 6,170 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "flask.Flask",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
... |
17469509 | import logging
from typing import Optional
import numpy as np
import pandas as pd
import tifffile
import zarr
from numcodecs import Blosc
from skimage.measure import regionprops_table
class Image:
def __init__(self, path: str):
self.image = tifffile.TiffFile(path)
self.base_series = self.image.se... | null | cellcutter/cut.py | cut.py | py | 3,714 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tifffile.TiffFile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",... |
548872071 | #!/usr/bin/env python3
from asyncio import sleep, gather, run, set_event_loop, new_event_loop
import json
from sys import exit, argv
from time import time
async def heartbeat():
"""Periodically print a heartbeat."""
while True:
await sleep(1)
print( f"{time()} heartbeat", flush=True )
async def main( lis... | null | examples/test_pynput.py | test_pynput.py | py | 2,991 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "asyncio.sleep",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "asyncio.gather",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": ... |
274168327 | '''
This code recieves a json file which contains names paired with their ages, and the bucket ranges.
The output is a yaml file that parses the people to buckets according to their age range.
To run this code for the sake of the test, kindly replace the json file path in the main function.
'''
import json
# Load th... | null | age_to_bucket.py | age_to_bucket.py | py | 1,450 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
}
] |
426837445 | # *****************************************************************************
# © Copyright IBM Corp. 2021. All Rights Reserved.
#
# This program and the accompanying materials
# are made available under the terms of the Apache V2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/l... | null | scripts/TestOSIPIAPI.py | TestOSIPIAPI.py | py | 5,112 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "script_utils.loadJSON",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "phg_iotfuncs.osipiutils.ATTR_FIELD_VAL",
"line_number": 31,
"usage_type": "attribute"
},
{
... |
146602529 | import pygame
from scripts.settings import maze, block_size, play_x, player_images
# sprite class of our player(Pac-Man)
class Player(pygame.sprite.Sprite):
def __init__(self, x, y):
pygame.sprite.Sprite.__init__(self)
# the x and y based on the grid
self.x = x
self.y... | null | PacMan/Pac-Man Hotová verze pro hraní/scripts/player.py | player.py | py | 5,520 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.sprite",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite.Sprite.__init__",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sc... |
347644172 | import PyQt5.QtWidgets as qtw
import PyQt5.QtCore as qtc
import matplotlib
matplotlib.use('Qt5Agg')
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.figure import Figure
from matplotlib import style
style.use('seaborn-darkgrid')
global canvas
global fig
fig = Figure()
canv... | null | GUI_v1.py | GUI_v1.py | py | 20,958 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.use",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.style.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.style",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "matplotlib.figure.F... |
589777224 | from celery.task import task
from BanHammer.blacklist import models
from BanHammer.blacklist.management import zeus
from BanHammer.blacklist.management import notifications
from BanHammer import settings
from django.core.mail import send_mail
import subprocess
import shlex
import datetime
import logging
import hashl... | null | BanHammer/blacklist/tasks.py | tasks.py | py | 20,426 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "BanHammer.blacklist.models.ZLB.objects.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "BanHammer.blacklist.models.ZLB",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "BanHammer.blacklist.models",
"line_number": 18,
"usage_typ... |
325483246 | from django.conf.urls import url
from .views import featuredetail, FeatureList, FeatureUpdate, FeatureCreate, PressPage
app_name = 'press'
urlpatterns = [
url(r'^$', PressPage.as_view(), name='press-page'),
url(r'^features/list$', FeatureList.as_view(), name='feature-list'),
url(r'^features/create$', Feat... | null | press/urls.py | urls.py | py | 551 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.PressPage.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.PressPage",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.conf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.