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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64288216 | # -*- coding: utf-8 -*-
"""
AdeccoDE spider created on the top of ATSSpider
scrapy crawl adecco_de -a mining_job_id=9999 -a iteration=1 -a extract=1 -a url="https://jobs.adecco.de/JobsucheAdecco.aspx?stichwort=&ort=&plz=&DESuche=1"
Sample URL:
http://www.adecco.de/de-DE/fuer-bewerber/jobsuche/Pages/jobsuche.aspx?... | null | brightcorp/brightcorp/spiders/adecco_de.py | adecco_de.py | py | 6,090 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.compile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 25,
... |
639828070 | # -*- coding: UTF-8 -*-
import math
import pylab
import random
from matplotlib import mlab
# согласованная фильтрация сигнала сдвинутого во времени относительно начала
L=9 # длительность сигнала и сигнала в начале
N=75 # длительность входного процесса
s=[3,6,1,5,-8,2,-5,-3,5] # массив отсчетов сигнала
h=[]# массив для ... | null | Sublim/lab1/2.3.py | 2.3.py | py | 1,503 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.mlab.frange",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "matplotlib.mlab",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "pylab.plot",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pylab.show",
"l... |
397313324 | import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import os
import cv2
import albumentations
from torch.utils.data import DataLoader, Dataset
# from config import Config
class Config:
CFG = {
'img_size': 512,
'tta': 3,
'wd': 1e-6
}
class LDCData(Dataset):
... | null | src/dataloader.py | dataloader.py | py | 1,349 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"... |
248430975 | import requests
def build_request(data):
'''
:param data:
:return:
'''
operation = {}
request = {}
doc = {}
movie_dict = data[1]
doc['id'] = data[0]
doc['title'] = movie_dict['title']
if movie_dict['tagline']:
doc['tagline'] = movie_dict['tagline']
if movie_di... | null | search/relevance/solr_utils.py | solr_utils.py | py | 2,682 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 85,
"usage_type": "call"
}
] |
226927696 | from django.conf.urls import url
from delta import views
urlpatterns = [
url(r'^$', views.HomePageView.as_view()),
url(r'^about/$', views.AboutPageView.as_view()),
url(r'^seats$', views.surveyProcess),
url(r'^submit', views.seatFinish),
# url(r'^seats$', views.seatSelection)
] | null | HackGt2017/delta/urls.py | urls.py | py | 298 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.url",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "delta.views.HomePageView.as_view",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "delta.views.HomePageView",
"line_number": 5,
"usage_type": "attribute"
},
{
"... |
646254151 | from django.contrib.auth import views as auth_views
from django.urls import path, include
from user import views as core_views
urlpatterns = [
path('student/signup/', core_views.studentregister, name='student-signup'),
path('signup/startup/', core_views.startupregister, name='startup... | null | user/urls.py | urls.py | py | 997 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "user.views.studentregister",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "user.views",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.... |
529944340 | # 흐림효과(blur)
# 컬러 -> 그레이스케일 -> 블러 -> 이진화
import cv2
img_src = cv2.imread('img/image.jpg', cv2.IMREAD_COLOR)
img_src = cv2.pyrDown(img_src)
img_gray = cv2.cvtColor(img_src, cv2.COLOR_BGR2GRAY)
img_grays = cv2.cvtColor(img_gray, cv2.COLOR_GRAY2BGR)
img_hsv = cv2.cvtColor(img_src, cv2.COLOR_BGR2HSV)
filter = (7, 7)
# 흐... | null | OpenCV 03일차/실습/opencv_37.py | opencv_37.py | py | 1,146 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_COLOR",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "cv2.pyrDown",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_nu... |
378067625 | import pygal
import openpyxl
filename = 'data2.xlsx'
wb = openpyxl.load_workbook(filename)
sheets = wb.get_sheet_names()
sh_number = 1
for sh in sheets:
sheet = wb.get_sheet_by_name(sh)
x_labels = [sheet.cell(row=i, column=1).value for i in range(2, sheet.max_row - 2 + 1)]
# x_labels = [r'$\mathregular{... | null | 3rd_week/works_with_pygal/build_graphs2.py | build_graphs2.py | py | 847 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygal.HorizontalBar",
"line_number": 17,
"usage_type": "call"
}
] |
174837616 | import pandas as pd # Data Set Import...
import matplotlib.pyplot as plt #Graph PLot
import numpy as np #...
from sklearn import linear_model #Models
from sklearn.model_selection import train_test_split #Data Spliting
Std_Data=pd.read_csv("student-por.csv", usecols=['G1','G2','G3'])
# print(Std_Dat... | null | Student Performance/Student_Performance.py | Student_Performance.py | py | 1,413 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "skle... |
66765755 | #!/usr/bin/env python
#coding=utf-8
from __future__ import absolute_import, division, print_function, with_statement
# import functools
# import datetime
#
# import util
from tornado.log import access_log
# 0b 01111111 11111111 11111111 11111111
__MASK__ = 2147483647
# cache = CacheManager(cache_regions= {'short_te... | null | db/msg.py | msg.py | py | 13,003 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "db.mysql.MySQL",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "db.mysql.Cursor",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "db.mysql.Connect",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "db.mysql.DICT_CUR",
... |
102901786 | ####Importing the libraries####
import os
import numpy as np
from sklearn.preprocessing import OneHotEncoder, LabelEncoder
class Encoder:
def getSeqList(self, filePath, seqSt, seqEd, labSt):
'''
filePath: path to the sequence file
seqSt: the common starting posistion of the seque... | null | Encoder.py | Encoder.py | py | 5,346 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.OneHotEncoder",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 89,
"usage_typ... |
32884442 | from elftools.elf.elffile import ELFFile
def elf_parser(f):
elffile = ELFFile(f)
f_out = open("elf_after_parse", 'a')
for segment in elffile.iter_segments():
f_out.write(segment.data())
f_out.close()
f_in = open("ucore-kernel-initrd", 'rb')
elf_parser(f_in)
f_in.close() | null | CPU32/thinpad_top/thinpad_top.srcs/sources_1/new/tools/elf_parser.py | elf_parser.py | py | 279 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "elftools.elf.elffile.ELFFile",
"line_number": 4,
"usage_type": "call"
}
] |
380245633 | import sys
import socket
from PyQt5.QtWidgets import QWidget
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication
from mail_client import Client
class Registration(QWidget):
def __init__(self):
super().__init__()
self.setMinimumSize(550, 550)
# Подключение дизайна
uic.l... | null | register.py | register.py | py | 2,758 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PyQt5.uic.loadUi",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "socket.socket",
... |
175361773 |
import time
from io import BytesIO
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def open_url(url):
options = Options()
options.headless = True
driver = webdriver.Chrome(chrome_options=options)
driver.maximize_window()
driver.get(url)
save_screenshot(... | null | Autotest/test.py | test.py | py | 2,012 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{
... |
221256025 | """
#######################################################################################################################
### Example DataFrame Processing ###
### ###
### Code developed by Negar Shams (negar.shams@PSCconsulting.com, +44 7436 544893) as part of PSC ... | null | PSC SSE_NG Tool (1.0.0)/SSE_NG/GSP_assigner_function.py | GSP_assigner_function.py | py | 11,594 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.OrderedDict",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "common_functions.get_local_file_path_withfolder",
"line_number": 78,
"usage_type": "call"... |
653203651 | import tensorflow as tf
import segmentation_models as sm
import glob
import cv2
import os
import numpy as np
import random
from matplotlib import pyplot as plt
from sklearn.model_selection import train_test_split
from keras.utils import to_categorical
from sklearn.preprocessing import LabelEncoder
from keras.callbacks ... | null | models/model.py | model.py | py | 8,611 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "segmentation_models.get_preprocessing",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path.joi... |
586566770 | # -*- coding: utf-8 -*-
# description:
_author_ = 'Kai,Chen'
_time_ = '2018/4/26'
from sqlalchemy import Column, String, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# 创建对象的基类:
Base = declarative_base()
class User(Base):
__tablename__ = 'user'
... | null | db/sqlalchemy_p/sqlalchemy_01.py | sqlalchemy_01.py | py | 967 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.String",
"line_number": 18,
"usage_type": "call"
},
{
"a... |
413996196 | import numpy as np
from atom import Atom
class LennartJonesModel:
"""Modelling interactions"""
def __init__(self,element,epsilon,sigma):
"""Create the model
the parameters are model dependant"""
self.epsilon = epsilon
self.sigma = sigma
self.element = element
def ... | null | molecular-dynamics/model.py | model.py | py | 1,387 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.zeros",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.norm",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "atom.Atom",
"line... |
258246622 | from django.shortcuts import render, get_object_or_404, redirect, render_to_response
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.db import models
from django.core.urlresolvers ... | null | academy/cursos/views.py | views.py | py | 7,203 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Curso.objects.all",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "models.Curso.objects",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "models.Curso",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "djang... |
581670046 | #-*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
import unittest, time
class BaseTestCase(unittest.TestCase):
def... | null | qa-automation/polarush.py | polarush.py | py | 2,530 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "... |
505850038 | #
# Copyright (c) 2021, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#
###
#Checks maven files for potential and active dependency confusion attacks
###
import dac_consta... | null | modules/maven.py | maven.py | py | 4,009 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.sub",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lxml.etree.XMLParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 26... |
401226949 | import argparse
import matplotlib.pyplot as plt
from .utils import LABEL_NAMES, SuperTuxDataset
def visualize_data(args):
dataset = SuperTuxDataset(args.dataset)
f, axes = plt.subplots(args.n, len(LABEL_NAMES))
counts = [0]*len(LABEL_NAMES)
for img, label in dataset:
c = counts[label]
... | null | hw2/hw1_solution/visualize_data.py | visualize_data.py | py | 823 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "utils.SuperTuxDataset",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "utils... |
2912801 | import sys
from website_analyse import WebData, WebAnalyse
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QPushButton, QMessageBox
from PyQt5 import QtWidgets, QtGui
import validators
class Window(QMainWindow):
"""
GUI window representation
width: width of the window
height: height of the w... | null | app.py | app.py | py | 3,771 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtGui.QIcon",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtGui",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidg... |
115622489 | # -*- coding: utf-8 -*-
"""
@author: Adam Kaliszan
"""
#import IoTShieldAsync as AS
from pymata_aio.pymata_core import PymataCore
from pymata_aio.constants import Constants
import asyncio
board = PymataCore()
board.start()
async def mainLoop():
await board.set_pin_mode(9, Constants.PWM)
while True:
f... | null | demoAsync.py | demoAsync.py | py | 615 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pymata_aio.pymata_core.PymataCore",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pymata_aio.constants.Constants.PWM",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pymata_aio.constants.Constants",
"line_number": 15,
"usage_type... |
648078884 | # -*- encoding: utf-8 -*-
import os
import csv
from django.db import models
from django.db.models import Sum
from django.conf import settings
from email import contentmanager
# Create your models here.
class Section(models.Model):
""" Filières """
name = models.CharField(max_length=20, verbose_name='Nom')
... | null | fdc/models.py | models.py | py | 3,160 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 13,
"usage_type": "call"
},
{
"api_name"... |
279533558 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import urllib
from urllib import request
from urllib.request import urlretrieve
from urllib.request import urlopen
from bs4 import BeautifulSoup
# downloadDictionary = 'downloaded'
# baseUrl = 'http://guoweish.github.io'
downloadDictionary = 'downloaded_3'
baseUr... | null | old-python/mitchell/c5_store_image_multi.py | c5_store_image_multi.py | py | 2,344 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.dirname",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
318600272 |
#50+ pages for parsig, from bash.im
#dependence of the number of pluses to the ratio of the number of characters in the quote
#frequency of the word "joke"
#graph of the number of "likes"
#table with the distribution of the number of posts by date
import requests
import threading
import os
import numpy as np
import p... | null | bashorg_parser.py | bashorg_parser.py | py | 7,383 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.DataFrame",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
234269452 | # -*- coding: utf-8 -*-
# filename: basic.py
import requests
from redis import Redis
redis = Redis(host='localhost', port=6379)
class Basic:
def __init__(self):
# 测试号的公众号信息
self.APPID = "wxb568fb522e3f2c08"
self.APPSECRET = "b8a5c9838594005923c4dd7ae36ca8fa"
self.TOKEN = "d6fa8fa8... | null | wechat-background/src/test/app/test/basic.py | basic.py | py | 1,000 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "redis.Redis",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "redis.set",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "redis.expire",
"line_number": 2... |
645829086 | import celery
import urlparse
from django.contrib.auth.models import User
from django.core.urlresolvers import resolve
from rest_framework import generics
from rest_framework import permissions
from rest_framework import status
from rest_framework.response import Response
from rodan.models.page import Page
from rodan... | null | rodan/views/page.py | page.py | py | 3,568 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.generics.ListCreateAPIView",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.generics",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "rodan.models.page.Page",
"line_number": 21,
"usage_type": "name"
... |
579675653 | from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
from functions import updateCurrentMember
from vkRequests import get_members_that_liked_post
from prettytable import PrettyTable
import json
import vk_api
import time
vk = vk_api.VkApi(token="b46013bc0945e81e73c84c6cceb1896dfb39dc53b2ad280ce7be624d364d2ec... | null | main.py | main.py | py | 3,914 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "vk_api.VkApi",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "vk_api.bot_longpoll.VkBotLongPoll",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "functions.up... |
473883178 | # coding: utf-8
import copy
import logging
import tools
from define import TOKEN_HOUSE_CORE
from zbase.web.validator import T_INT, T_STR
from zbase.base.dbpool import get_connection_exception
log = logging.getLogger()
class Profile:
TABLE = 'profile'
TABLE_ID = 'id'
MUST_KEY = {
'user_state': T_... | null | profile.py | profile.py | py | 2,038 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "zbase.web.validator.T_INT",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "zbase.web.validator.T_INT",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": ... |
281308384 | '''Basic QuBit Characterizations'''
from colorama import init, Fore, Back
init(autoreset=True) #to convert termcolor to wins color
from os.path import basename as bs
mdlname = bs(__file__).split('.')[0] # instrument-module's name e.g. ENA, PSG, YOKO
from flask import request, session
from numpy import linspace, sin,... | null | TEST/FACE/pyqum/directive/characterize.py | characterize.py | py | 5,004 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "colorama.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pyqum.instrument.toolbox.waveform",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pyqum.... |
373947654 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
m... | null | src/apps/confirmemail/migrations/0001_initial.py | 0001_initial.py | py | 1,095 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.swappable_dependency",
"line_number": 12,
"usage_type": "call... |
15442228 | import torch
from torch import nn
m = nn.ConvTranspose2d(16, 33, 3, stride=2)
input = torch.randn(20, 16, 50, 100)
output = m(input)
print(output.shape)
# exact output size can be also specified as an argument
input = torch.randn(1, 16, 12, 12)
downsample = nn.Conv2d(16, 16, 3, stride=2, padding=1... | null | ConvTranspose2dTest.py | ConvTranspose2dTest.py | py | 502 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.ConvTranspose2d",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "torch.randn",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torch.randn",
"line_nu... |
140923006 | import random
from collections import OrderedDict
import numpy as np
import tensorflow as tf
import tree_qa as tree
import json
import util
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
class Config(object):
embed_size = 300
label_size = 2
max_epochs = 20
alpha = 0.2 # loss weight between ae and ... | null | RNNTrees_autoencoder.py | RNNTrees_autoencoder.py | py | 16,304 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tree_qa.loadTrees",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_n... |
624821863 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ###... | null | mvpa/tests/test_ridge.py | test_ridge.py | py | 1,638 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "mvpa.clfs.ridge.RidgeReg",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "scipy.stats.pearsonr",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "mvpa.clfs.ridge.RidgeReg",
"line_number": 45,
"usage_type": "call"
}
] |
226817747 | """Различные графики для анализа ML-модели."""
import copy
from typing import Tuple
import catboost
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from poptimizer import config
from poptimizer.ml import examples, cv
from poptimizer.ml.feature import YEAR_IN_TRADING_DAYS
__all__ = ["partial_de... | null | poptimizer/ml/plots.py | plots.py | py | 3,163 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.linspace",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "poptimizer.ml.cv.valid_model",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "poptimizer.ml.cv",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "catboost... |
318123643 | from keras.models import load_model
import pandas as pd
from src.uci.entity.datasetConfig import DatasetConfig
import os
os.chdir('..')
os.chdir('..')
TARGET_DIR = 'target/'
TIME_FILE = 'runtime_measure.csv'
RESOURCE_DIR = 'res/'
BASE_DIR = RESOURCE_DIR + 'dataset/'
MODEL_DIR = 'compiledModels/'
RESULT_DIR = 'results... | null | hyperparameterOptimization/src/uci/util/util.py | util.py | py | 3,735 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.chdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "src.uci.entity.datasetConfig.... |
112409133 | """Implementation of GraphSageDGL."""
import importlib
from .torch_modules import GraphSageDGLModel
from ..bases import ModelMeta, SageBase
from ..graph import (
NeighborWalkerDGL,
build_i2i_homo_graph,
build_u2i_hetero_graph,
check_dgl,
)
from ..torchops import set_torch_seed
@check_dgl
class GraphS... | null | libreco/algorithms/graphsage_dgl.py | graphsage_dgl.py | py | 7,829 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bases.SageBase",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "bases.ModelMeta",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "importlib.import_module",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "torchops.set_... |
407335267 | import os
import numpy as np
import scipy.io as sio
fps=list(open('./list/test_fra.list','r'))
fps=[[i.split()[0],float(i.split()[2])] for i in fps]
dicts={key:value for (key,value) in fps}
gt=list(open('predict_ret.txt','r'))
gt=[i.split() for i in gt]
gt=[[i[0].split('/')[-1],i[1],i[2],i[3],i[4]] for i in gt]
gt=[[i[... | null | localization/fra_to_sec.py | fra_to_sec.py | py | 621 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scipy.io.savemat",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "scipy.io",
"line_number": 13,
"usage_type": "name"
}
] |
235360606 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 12 14:56:09 2018
by Shubham
"""
import matplotlib.pyplot as plt
x=[1,2,3]
y=[2,4,1]
plt.plot(x,y)
plt.xlabel("x axis")
plt.ylabel("y axis")
x1=[1,2,3]
y1=[2,4,6]
x2=[5,8,9]
y2=[4,6,0]
plt.plot(x1,y1,label="line 1")
plt.plot(x2,y2,label="line 2")
plt.show()
plt.bar(x1,y... | null | matplot.py | matplot.py | py | 607 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.xlabel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mat... |
165800453 | import tempfile
from dataclasses import dataclass
import aioredis
import fastapi
import pytest
from api import exceptions, settings, utils
def test_verify_password():
p_hash = utils.get_password_hash("12345")
assert isinstance(p_hash, str)
assert utils.verify_password("12345", p_hash)
async def reader... | null | tests/test_utils.py | test_utils.py | py | 5,667 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "api.utils.get_password_hash",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "api.utils",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "api.utils.verify_password",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "api.u... |
595801051 | # -*- coding:utf-8 -*-
import configparser
import os
import sys
import openpyxl
from openpyxl.cell.cell import Cell
from openpyxl.styles import Font
from openpyxl.styles import colors, PatternFill
from openpyxl.worksheet import Worksheet
class Compare:
def __init__(self, work_dir=None):
"""
初始化,... | null | boc/dist/compare.py | compare.py | py | 7,903 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.dirname",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_nu... |
152825207 | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 25 14:59:18 2020
@author: Auto1-PCP294
"""
import ast
import math as m
import numpy as np
import gspread
from oauth2client.service_account import ServiceAccountCredentials
#from gspread_formatting import *
from DataExtraction import *
from geopy import distance
from geopy... | null | Utils.py | Utils.py | py | 8,638 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ast.literal_eval",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 4... |
181066298 | #!/usr/bin/python3
from typing import List, Tuple, Dict, Optional, Callable, TypeVar, Union, Any
import os
import sys
import time
import datetime
import boto3
from botocore.exceptions import ClientError
from botocore.config import Config
import json
T = TypeVar('T')
MAX_NAMESPACE_COUNT = 99
MAX_RETRY_COUNT = 5
SERV... | null | nightjar-src/generate_template_input_data.py | generate_template_input_data.py | py | 27,410 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.TypeVar",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_number": 54,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",... |
55929132 | import torch
import torch.nn as nn
# from .blocks import Basic, Bottleneck
from blocks import Basic, Bottleneck
urls = {'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',
'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth',
'resnet50': 'https://download.pytorc... | null | nn/resnet.py | resnet.py | py | 2,803 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "blocks.Basic",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "blocks.Basic",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "blocks.Bottleneck",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "blocks.Bottleneck",
"... |
403953986 | #!/usr/bin/env python
import inspect
from public import public
@public
def islambdamethod(obj):
if not obj:
return False
if not inspect.ismethod(obj):
return False
# <unbound method CLS.<lambda>> # python 2
# <function CLS.<lambda> at > # python 3
if obj.__name__.find('<lambda>') >... | null | islambdamethod/__init__.py | __init__.py | py | 373 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "inspect.ismethod",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "public.public",
"line_number": 6,
"usage_type": "name"
}
] |
568578758 | from unittest import TestCase
from unittest.mock import patch, Mock
import settings
from vk_api.bot_longpoll import VkBotMessageEvent
from copy import deepcopy
import ya_rasp
import requests_answers
import datetime
from pony.orm import db_session, rollback
from bot import Bot
from generate_ticket import generate_tick... | null | tests.py | tests.py | py | 6,756 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pony.orm.db_session",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pony.orm.rollback",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "requests_answ... |
120778270 | from django.shortcuts import render
from .models import Trial
from django.utils import timezone
from django.shortcuts import render, get_object_or_404
from .forms import GuestForm
from django.http import *
from .models import Guest
def post_list(request):
posts = Trial.objects.filter(published_date__lte=timezone.n... | null | main/views.py | views.py | py | 2,271 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Trial.objects.filter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Trial.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "models.Trial",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "dj... |
87539204 | import bernard.config as config
import bernard.common as common
import bernard.discord as discord
import bernard.database as database
import bernard.journal as journal
import bernard.scheduler as scheduler
import datetime
import logging
import re
import time
import asyncio
logger = logging.getLogger(__name__)
logger.i... | null | bernard/automod_gamerwords.py | automod_gamerwords.py | py | 10,778 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bernard.common.isDiscordRegulator",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "bernard.common",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "be... |
225658278 | """
A simple TemplateTag to provide
in-template on-the-fly string underscoring
Usage: {{ some%20string | underscore }} becomes some_string
"""
from django import template
register = template.Library()
@register.filter
def underscore(string):
if string is not None:
return string.replace(' ','_')
else:... | null | backstage/templatetags/underscore.py | underscore.py | py | 339 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.template.Library",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 8,
"usage_type": "name"
}
] |
405735750 | # -*- coding: utf-8 -*-
import os
import sys
import requests
page = 1
# 输入个人账号密码
user = '*****@163.com'
passwd = '*******'
# 验证用户名密码,返回access_token
def Check():
data_info = {'username': user, 'password': passwd}
try:
respond = requests.post(url='https://api.zoomeye.org/user/login', json=data_info)
... | null | zoomeye/login.py | login.py | py | 3,161 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.post",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.RequestException",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "requests.Re... |
88994637 | import sys
import os
import matlab.engine
import sklearn.metrics
import numpy
import joblib
import pandas
import pymrmr
from os import listdir
from os.path import isfile, join
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.metrics import classification_report, confusion_m... | null | ml_tests/testsWithFeatureExtraction/mRMR_SVMtest.py | mRMR_SVMtest.py | py | 2,337 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.listdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number"... |
194735247 | import tensorflow as tf
from tensorflow.contrib import layers
import timeline_hook
import set_decoder
import project_helper as p_helper
from nltk.translate.bleu_score import corpus_bleu
GO_TOKEN = 0
END_TOKEN = 1
UNK_TOKEN = 2
def seq2seq(features, labels, mode, params):
vocab_size = params['vocab_size']
... | null | Seq2Seq.py | Seq2Seq.py | py | 8,860 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.shape",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "tensorflow.zeros",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "tensorflow.int64",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.re... |
544229637 | from django.shortcuts import render, HttpResponse, HttpResponseRedirect
from .models import Boletim, TabelaMpog, PisoSalarial, EncargosSociais
import calendar
import json
import locale
locale.setlocale(locale.LC_ALL, 'pt_BR')
# Create your views here.
def centro_estudos(request):
boletins = Boletim.objects.all... | null | fenavist/numero/views.py | views.py | py | 1,728 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "locale.setlocale",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "locale.LC_ALL",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.Boletim.objects.all",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.B... |
213180130 | import json
import os
from sentry_sdk import capture_message, init, configure_scope
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
init(os.environ['SENTRY_URL'], environment='aws-error-logger', integrations=[AwsLambdaIntegration()])
def handler(event, context):
print('event', event)
sou... | null | src/index.py | index.py | py | 803 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sentry_sdk.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sentry_sdk.integrations.aws_lambda.AwsLambdaIntegration",
"line_number": 7,
"usage_type": "call"
},
{
... |
569881757 | import urllib, json
from urllib.request import urlopen
from tkinter import *
import os
root=Tk()
root.title("yuvi teck")
global pincode
class wea:
def __init__(self):
self.pin=StringVar()
name=Label(root,text=" pin:")
entry=Entry(root,textvariable=self.pin)
name.grid(row=0,column=0... | null | GUI_weather.py | GUI_weather.py | py | 1,153 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 25,
"usage_type": "call"
}
] |
587980257 | """Setup script"""
import tarfile
import zipfile
import shutil
import argparse
import os
from setuptools import setup, find_packages
from setuptools.command.sdist import sdist
from subprocess import call
PULL_OBJECT_DETECTION = """
svn export -r 8436 https://github.com/tensorflow/models/trunk/research/object_dete... | null | setup.py | setup.py | py | 3,877 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "setuptools.command.sdist.sdist",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "setuptools.command.sdist.sdist.initialize_options",
"line_number": 35,
"usage_type... |
122429928 | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='prependnewline',
version='1.2',
py_modules=['prependnewline'],
author="Ayobami Adewale",
author_email="ayblaq@gmail.com",
keywords="markdown prepend list with newline",
long_descri... | null | pypi_install_script/prependnewline-1.2.tar/setup.py | setup.py | py | 765 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
351551750 | import json, requests
def registerSensor(name, uuid, pin):
url = 'http://futuwear.tunk.org/register/'
payload = {"name": name, "uuid": uuid, "pin": pin}
resp = requests.get(url, data=payload)
data = json.loads(resp.text)
status = data['error']
if not status:
status = "Registration successful"
return status
... | null | server/dev/register-sensor.py | register-sensor.py | py | 405 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 7,
"usage_type": "call"
}
] |
523198255 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0010_auto_20160720_1125'),
]
operations = [
migrations.AlterField(
model_name='account',
na... | null | users/migrations/0011_auto_20160721_1149.py | 0011_auto_20160721_1149.py | py | 604 | python | en | code | null | code-starcoder2 | 76 | [
{
"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.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
70003304 | import json
from pathlib import Path
from claseManejadorProvincias import ManejadorProvincia
from claseProvincia import Provincia
class ObjectEncoder(object):
__pathArchivo=None
def __init__(self,pathArchivo):
self.__pathArchivo=pathArchivo
def decodificarDiccionario(self,d):
... | null | ObjectEncoder.py | ObjectEncoder.py | py | 1,414 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pathlib.Path",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 37... |
325077302 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from logging import getLogger
from psd_tools.constants import TaggedBlock
from psd2svg.converter.constants import BLEND_MODE2
logger = getLogger(__name__)
class ShapeConverter(object):
def _get_vector_stroke(self, layer, target):
... | null | src/psd2svg/converter/shape.py | shape.py | py | 4,839 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "psd_tools.constants.TaggedBlock.VECTOR_STROKE_DATA",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "psd_tools.constants.TaggedBlock",
"line_number": 15,
"usage_type... |
547178598 | from neopixel import Color
from colorsys import rgb_to_hsv
from time import sleep
import config
from random import random, randint
import palette
import effect
from math import fmod
class SparkleEffect(effect.Effect):
NAME = "sparkle"
def __init__(self, led_art):
effect.Effect.__init__(self, led_art... | null | light/RPi/effect/sparkle_effect.py | sparkle_effect.py | py | 1,867 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "effect.Effect",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "effect.Effect.__init__",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "effect.Effect",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "random.r... |
320328433 | import torch
import numpy as np
import torch.nn as nn
class BaseCNN(nn.Module):
def __init__(self):
super(BaseCNN, self).__init__()
# [batch_size, channel_size, time_stamp] = [1, 1, 16000]
# Input Layer
self.conv1 = nn.Conv1d(1, 10, kernel_size=(512), stride=10)
self.bnorm... | null | model.py | model.py | py | 2,435 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv1d",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
501158227 | import win32gui
import os
import webbrowser
import subprocess
import progressbar
import hotpy
import uploader
import namer
VERSION = '1.1'
PID = None
name = None
def feed_file_to_handle_with_progress(filename, handle):
chunk_size = 1024
position = 0
total = os.path.getsize(filename)
... | null | maker.py | maker.py | py | 3,295 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.getsize",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "progressbar.Percentage",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "progressbar.Bar",... |
570543975 | import logging
from decimal import Decimal
from bs4 import BeautifulSoup
from storescraper.categories import REFRIGERATOR, AIR_CONDITIONER, \
VACUUM_CLEANER, OVEN, WASHING_MACHINE, HEADPHONES, \
SOLID_STATE_DRIVE, MOUSE, KEYBOARD, MONITOR, TELEVISION, STEREO_SYSTEM, \
CELL, WEARABLE, TABLET, PRINTER, NOTE... | null | storescraper/stores/send_tech.py | send_tech.py | py | 5,509 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "storescraper.store.Store",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "storescraper.categories.AIR_CONDITIONER",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "storescraper.categories.REFRIGERATOR",
"line_number": 21,
"usage_type": ... |
285633237 |
import datetime
import json
import os
import shutil
from urllib import quote
from traits.api import HasTraits, Directory, List, Str
from .media import Media
def get_file_saved_time(path):
dt = datetime.datetime.fromtimestamp(os.stat(path).st_ctime)
return dt.ctime()
class MediaManager(HasTraits):
root... | null | vixen/media_manager.py | media_manager.py | py | 3,071 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.stat",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "traits... |
482602515 | """Apply transformations that work on (almost) all entities."""
import itertools
from collections import defaultdict
from typing import Dict, Tuple, List
from srctools.bsp_transform import trans, Context
from srctools.logger import get_logger
from srctools import Output
from srctools.packlist import FileType
LOGGER ... | null | srctools/bsp_transform/globals.py | globals.py | py | 4,040 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "srctools.logger.get_logger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "srctools.bsp_transform.Context",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "srctools.bsp_transform.trans",
"line_number": 15,
"usage_type": "call"
},
{... |
462528390 | import requests
from datetime import datetime, timedelta
class VideoStore:
def __init__(self, url="http://127.0.0.1:5000", selected_rental = None, selected_video=None, selected_customer=None):
self.url = url
self.selected_video = selected_video
self.selected_customer = selected_customer
... | null | video_store.py | video_store.py | py | 5,358 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.post",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_numb... |
316722285 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import twitter
import kaskuser
actor = 'fiewh'
key = 'qj0V35O8PdFktEHEi5EpPqUuq'
secret = 'AzugElRYcM3xmx2aPeW0ch4DaTSogU8TN9OU1RVnreLobMa8tV'
token = '716095351-Kt4CUYoh4ZmUZnKzWFiIYDyBiAc0uGUy1hq67Ef4'
token_secret = 'Gus2aTVV2818RVisH28Dqs5ggkkQ6gGoSMtzE9h2... | null | fiewh_app/tweety.py | tweety.py | py | 2,302 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "twitter.OAuth",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "twitter.Twitter",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "kaskuser.get_response",
"line_number": 69,
"usage_type": "call"
}
] |
188263021 | # -*- coding: utf-8 -*-
import re
import json
import scrapy
from cctv_OpinionMonitor5 import helper
from cctv_OpinionMonitor5.items import CctvOpinionmonitor5Item
from scrapy.http import Request
from scrapy.conf import settings
class AppRainewsSpider(scrapy.Spider):
name = 'app.rainews'
limittime = settings.ge... | null | cctv_OpinionMonitor5/cctv_OpinionMonitor5/spiders/app_rainews.py | app_rainews.py | py | 4,122 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "scrapy.Spider",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "scrapy.conf.settings.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scrapy.conf.settings",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "scra... |
215527848 | # 信号量(信号灯集)
from multiprocessing import Semaphore, Process
from time import sleep
import os
# 创建信号量
# 表示服务程序最多允许3个进程同时执行事件
sem = Semaphore(3)
def handle():
print("%d 想执行事件" % os.getpid())
# 想执行事件必须获取信号量
sem.acquire()
print("%d 开始执行操作" % os.getpid())
sleep(3)
print("%d 完成操作" % os.getpid())
... | null | Mr.左/mothon02/代码/Concurrent_并发编程/day02/sem_信号量(信号灯集).py | sem_信号量(信号灯集).py | py | 999 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "multiprocessing.Semaphore",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_n... |
389306095 | from django.conf.urls.defaults import patterns, url, include
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
YEAR = settings.YEAR
urlpatterns = patterns(
'',
url(r'^api/admin/', include(admin.site.urls)),
# API
url(r'^... | null | api/urls.py | urls.py | py | 705 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.YEAR",
"line_number": 8,
"usage_type": "attribute"
},
{
... |
86638700 | __author__ = 'mahdi'
from django.views.generic import ListView
from blog.models import Post, PostStatus
from datetime import datetime
import time
class ListOfPosts(ListView):
template_name = 'blog_index.html'
model = Post
paginate_by = 5
def get_queryset(self):
q = super(ListOfPosts, self).g... | null | blog/cbvs/postListing/postlistview.py | postlistview.py | py | 1,376 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "blog.models.Post",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datet... |
151782875 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 30 10:49:59 2020
@author: mbeiran
"""
#%%
import numpy as np
import matplotlib.pyplot as plt
import lib_rnns as lr
from matplotlib.gridspec import GridSpec
aa = lr.set_plot()
gaussian_norm = (1/np.sqrt(np.pi))
gauss_points, gauss_weights = np... | null | C_Fig3_IJKL.py | C_Fig3_IJKL.py | py | 13,021 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "lib_rnns.set_plot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.polynomial.hermite.h... |
341626017 | from typing import Optional, List, Union
from math import sqrt
from collections import namedtuple
import textwrap
import torch
from e3nn import o3
from e3nn.util import CodeGenMixin
from e3nn.util.jit import compile_mode
def _prod(x):
out = 1
for a in x:
out *= a
return out
@compile_mode('scrip... | null | e3nn/o3/tensor_product.py | tensor_product.py | py | 40,413 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "e3nn.util.CodeGenMixin",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "torch.nn",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "e3nn.o3.Irreps",
"line_number": 189,
"usage_type": "call"
},
{
"api_name": "e3nn.o3",
"l... |
550435630 | from scipy.spatial import distance as dist
from imutils import face_utils
import os
import cv2
data_path = "./"
img_path = os.path.join(data_path, "Test", "new_crop")
landmark_path = os.path.join(data_path, "Test", "new_landmark")
img_paths = os.listdir(img_path)
for idx in range(len(img_paths)):
i = img_paths[... | null | show_landmark.py | show_landmark.py | py | 1,405 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.join",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
... |
419489255 | # -*- coding: utf-8 -*-
from django.shortcuts import get_object_or_404, render, redirect,render_to_response
from django.http import HttpResponse,HttpResponseRedirect
from django.template import RequestContext,loader,Context
from RenLi.models import BaoMing,PingLun
from RenLi.forms import BaoMingForm,PingLunForm
def re... | null | GuanLiSeven/RenLi/views.py | views.py | py | 3,098 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.template.loader.get_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template.loader",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.template.Context",
"line_number": 10,
"usage_type": "call"
},
{
"... |
642153330 | from itertools import combinations_with_replacement, product
import numpy as np
import pandas as pd
import matplotlib
# matplotlib.use('Agg')
import scipy
from mpl_toolkits.mplot3d import Axes3D
from scipy import spatial
from matplotlib import pyplot as plt
class Model:
def __init__(self, pos, v, m):
sel... | null | space mechanic/space.py | space.py | py | 3,193 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
388227601 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support import expected_conditions as e... | null | fetcher/fetcher_melhores_filmes.py | fetcher_melhores_filmes.py | py | 6,089 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 19,
"usage_type": "call"
},
{
"a... |
225002918 | # -*- coding: utf-8 -*-
"""
Shinseok recommend req.
@Hikai
"""
import json
import requests
class Parser_goods():
"""Recommend goods parser."""
def __init__(self):
"""Initialize method."""
self.url = "http://a.bns.plaync.com/bnsapi/main/shop/displaygoods"
self.data = self.parse_data()
print(json.loads(self.... | null | shinseok_recommend_list_parse.py | shinseok_recommend_list_parse.py | py | 482 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
}
] |
74343820 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
class Subnet(models.Model):
"""Subnet Model"""
class Meta(object):
verbose_name = _(u"Subnet")
verbose_name_plural = _(u"Subnets")
name = models.CharField(
verbose_name=_... | null | equipments/models/subnet.py | subnet.py | py | 2,019 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.models.Model",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 11,
"usage_type": "call"
},
{
... |
307335280 | import logging,sys,os,time
from logging import handlers
# def get_log(filename):
# filename = 'all.log'
# level = 'info'
# when = 'D' backCount = 3, fmt = '%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + r'./') # 返回脚本... | null | UI_Auoto_test/log/test.py | test.py | py | 2,747 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
9051693 | from rest_framework import serializers
from django.contrib.auth.models import User
from .models import *
class UserSerializer(serializers.HyperlinkedModelSerializer):
ideas = serializers.HyperlinkedRelatedField(many=True, view_name='idea-detail', read_only=True, allow_null=True)
ideacomments = serializers.Hyp... | null | myapiapp/serializers.py | serializers.py | py | 1,297 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.HyperlinkedRelatedField",
"lin... |
36666184 | from flask import Flask,render_template,request
app = Flask(__name__)
# @app.route('/')
# def index():
# return 'Hello My App'
# @app.route('/hello/<name>')
# def hello_world(name):
# return 'Hello this is %s page'% name
# @app.route('/hello')
# def hello():
# return 'Under Hello'
# @app.route('/python')
# def ... | null | NewProj/env/app/app.py | app.py | py | 1,921 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 53,
"usage_type": "call"
}
] |
57525998 | from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import LabelEncoder
import pickle
def extract_corpus(filename):
corpus = list()
with open('fr-ud-v1.3/fr-ud-'+filename+'.conllu', 'r', encoding='utf-8') as flow:
for line in flow:
if len(line)>1:
if line[0]!='#':... | null | prepare_data.py | prepare_data.py | py | 1,848 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.feature_extraction.DictVectorizer",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 64,
"usage_type": "call"
},
... |
579814474 | import sys
import os
import imghdr
from PIL import Image
def resize_file(size, filename, outpath):
img = Image.open(filename, 'r')
img.thumbnail((size, size))
img.save(outpath)
def read_dir(size, src, out):
for root, dirs, files in os.walk(src):
for filename in files:
fullname = os... | null | python/pil/resize_dir.py | resize_dir.py | py | 1,082 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PIL.Image.open",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "os.walk",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 14,
... |
154655410 | import sys
import datetime
import csv
import docx
from random import randint
from PyQt5.QtWidgets import QCheckBox
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import QLabel
from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.Qt... | null | итоговый проект на PyQt/Task Manager.py | Task Manager.py | py | 30,177 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtGui.QFont",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QTableWidget",
"line_number": 33,
"usage_type": "call"
},
{
"api_name":... |
395921374 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
import logging as l
import os
from sqlalchemy import create_engine
from sqlalchemy import Table, ForeignKey, Column, Integer, String, DateTime, Boolean
from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy.exc import OperationalError
from s... | null | base/db.py | db.py | py | 3,516 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 18,
"usage_type": "call"
},
{
"ap... |
635965135 | import subprocess
import datetime
date_item = str(datetime.date.today())
list_1 = date_item.split("-")
today = list_1[0]+list_1[1]+list_1[2]
class Preparation(object):
def __init__(self, filename, year=""):
self.cmd_pre = "soffice -n " + filename +\
" macro:///Standard.Module1.Main(" + filename[:l... | null | MethodCollection.py | MethodCollection.py | py | 731 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.date.today",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "subprocess.Popen",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "subprocess.Pope... |
588675691 | import json
import argparse
def load_data(file_path):
try:
with open(file_path, encoding='UTF8') as data_file:
decoded_data = json.load(data_file)
return decoded_data
except ValueError:
return None
def create_parser():
parser = argparse.ArgumentParser()
parser... | null | pprint_json.py | pprint_json.py | py | 1,058 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 22,
"usage_type": "call"
}
] |
58855657 | import json
import time
import os
import logging
from typing import Any, Dict, List, Optional
from datetime import datetime
import quicksight_migration.quicksight_utils as qs_utils
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
def migrate(
region,
sourcesession,
targetsession,
tar... | null | Migration-scripts/cdk/lambda/quicksight_migration/quicksight_migration/batch_migration_lambda.py | batch_migration_lambda.py | py | 27,195 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.dat... |
476156399 | from src.utilities.class_2 import children_functions
from anuvaad_auditor.loghandler import log_info
from anuvaad_auditor.loghandler import log_exception
from anuvaad_auditor.loghandler import log_debug
import src.utilities.app_context as app_context
from src.services.preprocess import prepocess_pdf_regions
from src.u... | null | anuvaad-etl/anuvaad-extractor/block-merger/src/services/main.py | main.py | py | 4,929 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "src.utilities.class_2.children_functions.doc_pre_processing",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "src.utilities.class_2.children_functions",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "src.utilities.craft_pytorch.detect.detect_te... |
59970058 | import json
from typing import Optional
from PySide2.QtCore import Qt
from PySide2.QtGui import QColor
from PySide2.QtWidgets import QApplication, QFileDialog, QInputDialog, QLineEdit
from angrmanagement.plugins.trace_viewer.qtrace_viewer import QTraceViewer
from ..base_plugin import BasePlugin
from .trace_statistics... | null | angrmanagement/plugins/trace_viewer/trace_plugin.py | trace_plugin.py | py | 6,855 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "base_plugin.BasePlugin",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "trace_statistics.TraceStatistics",
"line_number": 18,
"usage_type": "name"
},
{
"api_name"... |
96747305 | import matplotlib.pyplot as plt
from random import randint
from math import log2
if __name__=="__main__":
size=[]
hs_time=[]
hs_cost=[]
with open("hopfield_sequential.txt") as f:
for line in f:
line=line.split(" ")
if line[0]=="Size:":
size.append(i... | null | scripts/visualize_results.py | visualize_results.py | py | 4,080 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 73,
"usage_type": "call"
},
{
"api_name"... |
609070240 | #!/usr/bin/env python3
import re
import os
import yaml
from jinja2 import Environment, FileSystemLoader, Undefined
from datetime import date
from pandas import read_csv
class Icon:
fmt = ''
def __init__(self, name, **kw):
self.name = name
self.__dict__.update(kw)
def __str__(self):
... | null | src/generate.py | generate.py | py | 3,771 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "jinja2.Undefined",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_nu... |
32120651 | from clang import cindex
import os
import neovim
# Common fonctions.
def get_methods(cursor):
name = cursor.spelling
functions = []
for c in cursor.get_children():
if (c.kind == cindex.CursorKind.CXX_METHOD):
functions.append(c)
return functions
def create_tree(cursor, filename):
... | null | rplugin/python/easy-cpp/__init__.py | __init__.py | py | 4,263 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "clang.cindex.CursorKind",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "clang.cindex",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "clang.cindex.CursorKind",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name":... |
507001265 | from torch.utils.tensorboard import SummaryWriter
from typing import List, Union
import numpy as np
from .metric import Metric
from ..tools import BBox
class MeanAveragePrecision(Metric):
def __init__(self,
name: str,
iou_threshold=np.arange(50, 100, 5),
iou_in... | null | torchtoolbox/metric/map.py | map.py | py | 5,973 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "metric.Metric",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "torch.utils.tensorboard.SummaryWriter",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "nump... |
574188725 | import argparse
import random
import os
#hard coded name of directories to save results
GTP = 'ground_truth/' #path to store groundtruth files
TP = 'tracking/' #path to store tracking files
class Detection:
def __init__(self, cls, box):
self.cls = cls
self.box = box
def __init__(self, st):... | null | simulator/tracking_simulator.py | tracking_simulator.py | py | 3,488 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.listdir",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.