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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
335566976 | from django import forms
class DocumentTypeForm(forms.Form):
id = forms.CharField(max_length=2, required=True, label="Id",
widget=forms.TextInput(
attrs={
'placeholder': "Id",
'class': 'form-control',
}
))
name = forms.CharField(max_length... | null | fixed_assets/forms.py | forms.py | py | 2,450 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.Form",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.forms"... |
388499985 | import json
import urllib.request
import time
from datetime import datetime
from string import Template
from threading import Thread
import cherrypy
import feedparser
def form_trainstation_string(trainnumber, destination, departure, delay, isCancelled):
if isCancelled != 0:
delay = 'A'
trainnumber = ... | null | page.py | page.py | py | 5,511 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "feedparser.parse",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "urllib.request.request.urlopen",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_n... |
478959923 | """ Librairie personnelle effectuer des graphiques sur Analyse en
composantes principales
"""
#! /usr/bin/env python3
# coding: utf-8
# ====================================================================
# Outil visualisation - projet 3 Openclassrooms
# Version : 0.0.0 - CRE LR 13/03/2021
# Version : 0.0.1 - CR... | null | P6_04_01-outils_acp.py | P6_04_01-outils_acp.py | py | 24,781 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "numpy.cumsum",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "matplotl... |
87327359 | from django.shortcuts import render
from django.shortcuts import redirect
from django.shortcuts import get_object_or_404
from django.http import JsonResponse
from django.http import HttpResponse
from django.http import Http404
from django.views.generic import View
from .models import ProductInBasket
from .models import... | null | orders/views.py | views.py | py | 8,424 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "properties.models.Size.objects.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "properties.models.Size.objects",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "properties.models.Size",
"line_number": 27,
"usage_type": "name"
... |
113914347 | from django.shortcuts import render
#coding:utf-8
from django.http import HttpResponseRedirect
from . import models
def index(request):
articles=models.Article.objects.all()
return render(request,'index.html',{'articles':articles})
def page_article(request,article_id):
article=models.Article.obj... | null | myblog/blog/views.py | views.py | py | 1,231 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.render",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 16,
"usage_type": "call"
},
{
"api_name":... |
473023899 | # All Rights Reserved 2020
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | null | neutron_taas/tests/unit/taas_client/osc/test_osc_tap_flow.py | test_osc_tap_flow.py | py | 10,149 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "neutron_taas.taas_client.osc.tap_flow._attr_map",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "neutron_taas.taas_client.osc.tap_flow",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "osc_lib.utils.columns.LIST_BOTH",
"line_number": 3... |
357250367 | import requests
from bs4 import BeautifulSoup
import os, io
from lxml import html
import colorama
colorama.init()
def outer_func(color):
def inner_func(msg):
print(f"{color}{msg}")
return inner_func
GREEN = outer_func('\x1b[92m')
YELLOW = outer_func('\x1b[93m')
RED = outer_func('\x1b[91m')
savedir ... | null | Crawlers/TMCB - Themarker cafe backupper/TMCBv0.4 Requests/TMCPv0.4.py | TMCPv0.4.py | py | 4,683 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "colorama.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 35,... |
95520456 | import pickle, random, pathlib, sys, os
from sklearn import model_selection
from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer
project_path = str(pathlib.Path(os.path.abspath(__file__)).parent.parent)
sys.path.append(project_path)
path_model = project_path + '/data/model/single_wd_lr.pkl'
... | null | ML/machine learning.py | machine learning.py | py | 6,427 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_nu... |
565339582 | from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index, name="index"),
path('newProfile/', views.newProfile, name="newProfile"),
path('profile/', views.profile, name="profile"),
path('editProfile/<int:id>/', views.editProfile, name="editProfile"),
path('delet... | null | miniProj/miniApp/urls.py | urls.py | py | 721 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
551063859 | from configuration import DatasetName, DatasetType, \
AffectnetConf, IbugConf, W300Conf, InputDataSize, LearningConfig, CofwConf, WflwConf
from tf_record_utility import TFRecordUtility
from clr_callback import CyclicLR
from cnn_model import CNNModel
from custom_Losses import Custom_losses
from Data_custom_generator... | null | old_student_train.py | old_student_train.py | py | 8,694 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "configuration.DatasetName.ibug",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "configuration.DatasetName",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "configuration.IbugConf.number_of_all_sample",
"line_number": 38,
"usage_typ... |
413896425 | from collections import deque
N, M = map(int, input().split())
G = [[] for _ in range(N + 1)]
for _ in range(M):
l, r, d = map(int, input().split())
G[l].append((r, -d))
G[r].append((l, d))
MIN = -10 ** 18
lst = [MIN] * (N + 1)
que = deque()
for i in range(1, N + 1):
if lst[i] == MIN:
qu... | null | Python_codes/p03450/s604625696.py | s604625696.py | py | 728 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.deque",
"line_number": 17,
"usage_type": "call"
}
] |
360700307 | import pymeshlab
import sys
def load_and_recon(input_path, output_path):
# lines needed to run this specific example
# create a new MeshSet
ms = pymeshlab.MeshSet()
# load a new mesh in the MeshSet, and sets it as current mesh
# the path of the mesh can be absolute or relative
ms.load_new_mesh(... | null | app/scripts/ballpivoting_recon.py | ballpivoting_recon.py | py | 704 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pymeshlab.MeshSet",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
}
] |
138800725 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | null | nascell alterations/Cifar10read.py | Cifar10read.py | py | 7,512 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.arange",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "tensorflow.python.framework.dtypes.float32",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name... |
117482396 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.db.models import Q
from django.http import HttpResponse, HttpResponseNotFound
from django.shortcuts import render
from django.urls import reverse
from django.views import View
from django.views.generic import ListView, CreateView
from datetime import... | null | entries/views.py | views.py | py | 3,327 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "entries.models.Entry.objects.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "entries.models.Entry.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "entries.models.Entry",
"line_number": 15,
"usage_type": "name"
},
... |
256050083 | from knowledge_model import Base, Knowledge, Website
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///knowledge.db')
Base.metadata.create_all(engine)
DBSession = sessionmaker(bind=engine)
session = DBSession()
def add_article(topic, title, rating, host_si... | null | knowledge_databases.py | knowledge_databases.py | py | 1,366 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "knowledge_model.Base.metadata.create_all",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "knowledge_model.Base.metadata",
"line_number": 7,
"usage_type": "attribut... |
234574670 | import torch.optim as optim
import torch.nn as nn
from encoder_decoder import Conv_Autoencoder
outputs = []
num_epochs = 3
weight_decay = 1e-5
model = Conv_Autoencoder()
criterion = nn.MSELoss()
lr = 3e-4
optimizer = optim.Adam(model.parameters(), lr, weight_decay=1e-5)
| null | config.py | config.py | py | 274 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "encoder_decoder.Conv_Autoencoder",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.nn.MSELoss",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.opti... |
181381281 | import osutools
import datetime
from datetime import timezone, timedelta
osu = osutools.OsuClientV1("token")
# Set osu directory, and automatically read the databases.
osu.set_osu_folder("C:\\Users\\harry\\AppData\\Local\\osu!")
# Load the pp values for all local plays (enables faster processing of functions that us... | null | examples/db.py | db.py | py | 971 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "osutools.OsuClientV1",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.tim... |
177854176 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#from django.contrib import admin
from django.conf.urls import patterns, include, url
from gbook.views import main_page, list_users
from gbook.feeds import GuestbookRecords
#admin.autodiscover()
#url(/r'^admin/', include(admin.site.urls)),
urlpatterns = patterns('gbook.... | null | apps/gbook/urls.py | urls.py | py | 635 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "d... |
19280778 | from django.urls import path
from apps.solicitud.views import SolicitudCrear, SolicitudListar,\
SolicitudEliminar,SolicitudDetalle,SolicitudIncidencia,\
SolicitudEditar, SolicitudDecidir, equipo_disponible, SolicitudMiLista,\
SolicitudEvaluar, generarPdf, PracticaCrear, PracticaListar, PracticaEditar,\
PracticaElimina... | null | apps/solicitud/urls.py | urls.py | py | 1,632 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "apps.solicitud.views.SolicitudCrear",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_nam... |
87773402 | __author__ = 'sarangis'
import pandas as pd
from pymongo import MongoClient
class QueryBase:
_query_dict = {}
def __init__(self):
self._query_dict = {}
def _is_op(self, param):
ops = ["lt"
"gt",
"lte",
"gte",
"ne",
... | null | mongodb.py | mongodb.py | py | 5,036 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.DataFrame",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 159,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 161,
"usage_type": "call"
}
] |
96437101 | import sys
import random
from PyQt5.QtWidgets import QApplication, QMainWindow
import 小窗口
class my_Ui(小窗口.Ui_MainWindow):
def __init__(self, MainWindow):
super().setupUi(MainWindow)
self.initUI()
def initUI(self):
self.random_Button.clicked.connect(self.random_number)
self.s... | null | 小窗口/窗口.py | 窗口.py | py | 1,164 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "小窗口.Ui_MainWindow",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "random.sample",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "sys.... |
435207078 | '''
date_vs_accummulated_codec_plot.py
Reads in the file videos_export.csv,
and parses the data,
and plots three histograms of vp8, h264, and hvec by accumlated by date.
Craig Cahillane
May 26, 2020
'''
##### Imports #####
import sys
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
i... | null | date_vs_accumlated_codec_plot.py | date_vs_accumlated_codec_plot.py | py | 5,165 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.rcParams.update",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "numpy.loadtxt",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "sys... |
40636369 | from flask import Flask,request, url_for, redirect, render_template
import pickle
import numpy as np
app = Flask(__name__)
model=pickle.load(open('model.pkl','rb'))
@app.route('/')
def blank():
return render_template('index.html')
@app.route('/index.html')
def index():
return render_template... | null | app.py | app.py | py | 1,107 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
... |
415172927 | """The code to translate Argoverse dataset to KITTI dataset format"""
# Argoverse-to-KITTI Adapter
# Author: Yiyang Zhou
# Email: yiyang.zhou@berkeley.edu
import os
import json
import math
import numpy as np
from typing import Union
from shutil import copyfile
import matplotlib.pyplot as plt
import imageio
import cv... | null | adapter_noground_mf.py | adapter_noground_mf.py | py | 25,269 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 63,
"usage_type": "call"
},
{
"... |
5491902 | #Task 1 read csv file
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.formula.api as sm
import threading
import scipy
df = pd.read_csv('C://Users/JohntheGreat/Documents/MSCA/Python3forStreamingAnalytics/Week3/streaming.csv')
#Task 2 calculate R-squareds
# Using MovingOLS fu... | null | Python3forStreamingAnalytics/Week3/Navarro_Assignment_3/NavarroAssignment3.py | NavarroAssignment3.py | py | 8,708 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.stats.ols.MovingOLS",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.stats",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pandas.s... |
490050658 | # -*- coding: utf-8 -*-
from cx_Freeze import setup, Executable
import os
os.environ['TCL_LIBRARY'] = "C:\\Python36\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Python36\\tcl\\tk8.6"
base = None
executables = [Executable("pages_toolbox.py", base=base)]
packages = ["idna"]
options = {
'build_ex... | null | python26/my pys/tkinter_pages/cx_freeze_setup.py | cx_freeze_setup.py | py | 581 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.environ",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cx_Freeze.Executable",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cx_Freeze.setup",
... |
2254928 | from tkinter import *
import tkinter.messagebox
from tkinter import filedialog
import os
import pygame
from pygame import mixer
root = Tk()
#menu bar
menubar = Menu(root)
root.config(menu = menubar)
#submenu
submenu = Menu(menubar , tearoff=0)
menubar.add_cascade(label = "File",menu = submenu)
submenu.add_comm... | null | music_player/Source_code.py | Source_code.py | py | 5,586 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tkinter.messagebox.showinfo",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.init",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": ... |
487250229 | # pylint: disable=missing-docstring
from unittest.mock import patch
import pytest
from tests.fixtures.factories import TeamFactory
from tipping.models.base_model import ValidationError
from tipping.models import Team
@pytest.mark.parametrize(
["team_name", "error_message"],
[
("", "empty values not... | null | tipping/src/tests/unit/models/test_team.py | test_team.py | py | 1,121 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tests.fixtures.factories.TeamFactory.build",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tests.fixtures.factories.TeamFactory",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "pytest.raises",
"line_number": 25,
"usage_type": "call"
... |
84038873 | import re
import os
import jieba
from collections import Counter
class DataTools:
def __init__(self):
self.one_gram_counts="0"
self.two_gram_counts = "0"
self.three_gram_counts = "0"
self.raw_data_path = './database/data/AA/wiki_chs_little'
self.chinese_clean_data='./datab... | null | tools.py | tools.py | py | 7,290 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.findall",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "jieba.cut",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"l... |
94680827 | #!/usr/bin/env python
import re
import pandas as pd
from google.cloud import bigquery
import os
import urllib.request
def get_df_from_bigquery():
url = 'https://storage.googleapis.com/angostura-public/hult-hackathon-key.json'
urllib.request.urlretrieve(url, './hult-hackathon-key.json')
# Second, we add th... | null | clean_survey_data.py | clean_survey_data.py | py | 4,497 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "urllib.request.request.urlretrieve",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 11,
"usage_type": "name"
},
{
"api... |
416068542 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django_jinja import library
from jinja2 import contextfunction
@contextfunction
@library.global_function
... | null | breadcrumbs/templatetags/breadcrumbs_tags.py | breadcrumbs_tags.py | py | 904 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.core.urlresolvers.reverse",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "jinja2.contextfunction",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django_jinja.library.global_function",
"line_number": 12,
"usage_type": "attribut... |
490681982 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import jinja2
import ftplib
import inspect
import logging
import datetime
import configparser
import dataclasses
from pathlib import Path
from collections import namedtuple
from types import SimpleNamespace
__author__ = 'Damian Pala'
__version__ = '0.1.0'
CLOUD_CREDENT... | null | repoassist/sicloudman.py | sicloudman.py | py | 16,496 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "ftplib.all_errors",
"line_number": 80,
"usage_type": "attribute"
},
{
"api_name": "inspect.signature",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "dataclasses.fields",
"line_number": 114,
"usage_type": "call"
},
{
"api_name": "dataclas... |
462883249 | # Based on Pytorch Torchvision Github
# https://github.com/pytorch/vision/blob/master/torchvision/datasets/coco.py
from torchvision.datasets.vision import VisionDataset
from torchvision import transforms
from PIL import Image
import os
import os.path
import torch
import numpy as np
class CocoKeypoints(VisionDataset... | null | resnet-posture/datasets.py | datasets.py | py | 6,498 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torchvision.datasets.vision.VisionDataset",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms",
"line_number": 34,
"usage_type": "argument"
},
{
"api_name": "pycocotools.coco.COCO",
"line_number": 38,
"usage_type": "call"
},... |
485895830 | from server_arrdelstest.models import *
from server_arrdelstest.api.serializers import *
from rest_framework import generics, response, status
import pandas as pd
from server_arrdelstest.models import *
import string
import random
from django.http import HttpResponse, JsonResponse
import requests
from django.views.deco... | null | backendtest_arrdel/server_arrdelstest/api/views.py | views.py | py | 9,795 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.http.JsonResponse",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "django.views.decorators.csrf.csrf_exempt",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rest_framework.generics.ListAPIView",
"line_number": 32,
"usage_type": ... |
152053962 | import os, sys, shutil
import torch
import torch.nn as nn
import torch.utils.data as data
import numpy as np
from time import time, strftime
from copy import deepcopy
from gensim.models import Word2Vec
import DataModule_cf_gcn as data_utils
import config_cf_gcn as conf
from evaluate import evaluate
from Logging im... | null | drive/My Drive/task/aspect_based_rs/src/amazon_videos_test/cf_gcn/train_cf_gcn.py | train_cf_gcn.py | py | 7,154 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "time.strftime",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"lin... |
493154246 | import json,requests,random
def get_random_category():
cats=[k for k,v in requests.get("http://quotes.rest/qod/categories.json").json(
)['contents']['categories'].items()]
return cats[random.randint(0,len(cats))]
def get_qod(category):
return requests.get("http://quotes.rest/qod.json?category={}".format(
categ... | null | backend/daily_haircuts/daily_quote.py | daily_quote.py | py | 835 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
}
] |
628653597 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 04 14:48:43 2017
@author: benjaminchiche
"""
import base64
def im2str(file_name):
""" Convert an image file into a string buffer.
Parameters
----------
file_name : String
File name of the image that will be converted into a ... | null | weed-detector/image_to_buffer.py | image_to_buffer.py | py | 545 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "base64.b64encode",
"line_number": 23,
"usage_type": "call"
}
] |
355786105 | from datetime import datetime, timezone
from back.schemas.base import BaseSchema
from back.models.base import Base
class MySchema(BaseSchema):
__model__ = Base
def test_load_return_model_object():
data = {
"created_at": datetime.now(tz=timezone.utc).isoformat(),
"updated_at": datetime.now(t... | null | back/test/schemas/test_base_schema.py | test_base_schema.py | py | 836 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "back.schemas.base.BaseSchema",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "back.models.base.Base",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 13,
"usage_type": "call"
},
{
"api_name":... |
243968675 | from ftw.testbrowser import browsing
from opengever.testing import IntegrationTestCase
import json
class TestGeverErrorHandling(IntegrationTestCase):
@browsing
def test_validation_errors_are_extendend_with_translated_field_errors(self, browser):
self.login(self.administrator, browser=browser)
... | null | opengever/api/tests/test_errors.py | test_errors.py | py | 1,867 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "opengever.testing.IntegrationTestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ftw.testbrowser.browsing",
"line_number": 8,
"usage_type": "name"
},
{
"api_name"... |
5967388 | import copy
import json
import tempfile
import os
from utils.update_file_info import get_meta_file_dict_and_index, update_meta_file_dict, get_file_update_dict, \
replace_metadata_file_dict, update_metadata_json
METADATA_DICT = {
'acquisition': {
'files': [
{
'name': 'test.... | null | tests/unit_tests/test_update_file_info.py | test_update_file_info.py | py | 4,615 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "utils.update_file_info.get_file_update_dict",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "utils.update_file_info.get_meta_file_dict_and_index",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "utils.update_file_info.get_meta_file_dict_and_ind... |
104715805 | """
Pour generer l'exe:
copier ce fichier dans search_in_docs_release
lancer C:\Python39\Scripts\autopytoexe.exe
ouvrir les settings et importer to_exe_config.json
lancer le truc
le resultat arrive dans output.
le deplacer depuis output.
copy output\search*.exe .
"""
import docx
import odf
import odf.opendocument
im... | null | scripts/search_in_doc.py | search_in_doc.py | py | 6,907 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.dirname",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "sys.modules",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"... |
153102457 | from django.shortcuts import render
import pickle
from ranking_list.models import Ranking
# Create your views here.
def welcome_main(request):
return render(request,'aa.html')
def welcome_list(request):
k = request.COOKIES # 获取所有cookie
client=k.get('client')
grade=k.get('grade')
#return HttpR... | null | untitled11/ranking_list/views.py | views.py | py | 1,160 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.render",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "ranking_list.models.Ranking.objects.all",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ranking_list.models.Ranking.objects",
"line_number": 16,
"usage_type": "at... |
314236083 | import datetime
from stdnet import test
from stdnet.utils import populate, zip
from .models import Instrument, Fund, Position
CCYS_TYPES = ['EUR','GBP','AUD','USD','CHF','JPY']
INSTS_TYPES = ['equity','bond','future','cash','option','bond option']
class finance_data(object):
sizes = {'tiny': (20,... | null | examples/data.py | data.py | py | 3,964 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "stdnet.utils.populate",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "stdnet.utils.populate",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "stdnet.utils.populate",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "std... |
236186386 | import sys
sys.path.append('/home/leeqh/tianshou')
import os
import torch
import pprint
import argparse
import numpy as np
from torch.utils.tensorboard import SummaryWriter
from tianshou.policy import DQNPolicy
from tianshou.env import SubprocVectorEnv
from tianshou.utils.net.discrete import DQN
from tianshou.trainer ... | null | examples/atari/atari_dqn.py | atari_dqn.py | py | 11,553 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_ava... |
288167212 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from flask_uploads import UploadSet, configure_uploads, IMAGES
from flask_login import LoginManager, UserMixin, login_user, login_required, current_user, logout_user
app = ... | null | app.py | app.py | py | 1,517 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_uploads.UploadSet",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_uploads.IMAGES",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "flask_log... |
282200970 | from django.shortcuts import render, redirect
from django.views.generic import TemplateView
from django.contrib.auth.models import User, auth
import pyrebase
config = {
'apiKey': "AIzaSyDBqgNKO2Z9P3jU1JZjKSCRFPk8wlHpibQ",
'authDomain': "sorting-visualizer-efc1c.firebaseapp.com",
'databaseURL': "https://sor... | null | personal/views.py | views.py | py | 762 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pyrebase.initialize_app",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.auth",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "django.views.generic.TemplateView",
"line_number": 23,
"usage_type": "name"
}
] |
256366906 | from airflow import DAG
from datetime import datetime, timedelta
from diva_operator import DivaOperator
default_args = {
'owner': 'airflow',
'description': 'Text analysis workflow',
'depend_on_past': False,
'start_date': datetime(2018, 1, 3),
'email_on_failure': False,
'email_on_retry': False,
... | null | core/airflow/dags/text.py | text.py | py | 6,783 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "airflow.DAG",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "diva_operator.DivaOpe... |
602486962 | from flask import Blueprint, jsonify, request, current_app
from common.models import session, Client, ClientGroup, GroupAssignment, Plugin, PluginAssignment, ScheduleInterval, ScheduleTimeSlot, ScheduleTimeSlotDay
from common.exceptions import InvalidUnitError
import datetime
import itertools
import tarfile
import json... | null | web/api.py | api.py | py | 16,635 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "common.models.Client.query.all",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "common.models.Client.query",
"line_number": 14,
"usage_type": "attribute"
},
{
"ap... |
437428413 | from bs4 import BeautifulSoup
document = open("C:/Users/sanghuncho/Documents/GKoo_Web_Prog/laveraTest.txt", "r")
# document = """ <div class="price"><span>3,99 €</span></div> <div class="price"><span>3,99 €</span></div>"""
## <span class="product__content">250 ml </span>
soup = BeautifulSoup(docume... | null | SoapCrawler.py | SoapCrawler.py | py | 940 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 8,
"usage_type": "call"
}
] |
576449526 | # see documentation:
# https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets
# https://developer.twitter.com/en/docs/tweets/tweet-updates
# search operators: https://developer.twitter.com/en/docs/tweets/rules-and-filtering/overview/standard-operators
# pagination (cursoring): https://d... | null | service/tweet_scraper.py | tweet_scraper.py | py | 4,343 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "functools.lru_cache",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "urllib.parse.quote",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame"... |
69946712 | '''
currently python3 should be used to run this script
theoretically python2 should also work but it's not recommended
'''
from __future__ import division
import numpy as np
import nltk
from nltk.probability import FreqDist
import re
import os
import csv
import smooth
import word_cluster
import multiprocessing
topic... | null | P4/main.py | main.py | py | 10,931 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.sub",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 36,
"usage_type"... |
381035082 | from flask import Flask, render_template, json, request
import joblib
import numpy as np
app = Flask(__name__)
@app.route('/')
def index():
# return 'Hello, World!'
return render_template("home.html") #retornar ao template HTML
@app.route('/hello', methods=['GET'])
def hello():
if request.method == 'GET... | null | flask/app.py | app.py | py | 1,376 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "flask.requ... |
96812982 | # -*- coding: utf-8 -*-
import logging
import os
import re
import shutil
from pyramid.i18n import TranslationStringFactory
try:
from PIL.Image import open as pil_image
from PIL.Image import ANTIALIAS
from PIL.ImageOps import fit
except ImportError:
from Image import open as pil_image
from Image im... | null | Utility/image_manipulation.py | image_manipulation.py | py | 8,586 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pyramid.i18n.TranslationStringFactory",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "Ut... |
648645061 | import torch
import torch.nn as nn
import torch.nn.functional as F
from models.utils import gaussian_kld, repackage_hidden
class LReLU(nn.Module):
def __init__(self, c=1./3):
super(LReLU, self).__init__()
self.c = c
def forward(self, x):
return torch.clamp(F.leaky_relu(x, self.c), -3.... | null | speech/models/base.py | base.py | py | 4,460 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.clamp",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional.leaky_rel... |
371089520 | import requests
import pygal
from pygal.style import LightenStyle, NeonStyle
import configuration
url = 'https://api.github.com/search/repositories?q=language:java&sort=star'
r = requests.get(url)
response = r.json()
repos = response['items']
names, stars = [], []
for repo in repos:
names.append(repo['name'])
... | null | popular_repos.py | popular_repos.py | py | 663 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "configuration.config",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pygal.style.LightenStyle",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygal.... |
462050285 | from main import models
from main import serializers
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated, IsAdminUser, BasePermission
from rest_framework.response import Response
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
f... | null | salon_kz/main/views.py | views.py | py | 24,400 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "rest_framework.permissions.BasePermission",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "main.models.Partner.objects.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "main.models.Partner",
"line_number": 17,
"usage_type": "attribu... |
378965508 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.utils.translation import ugettext_lazy as _
class Patterns(object):
def __init__(self):
self.app_name = 'accounts'
self.name = 'accounts'
@property
def urls(self):
pat = patterns(... | null | accounts/urls.py | urls.py | py | 676 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "d... |
37778629 | from django.http import HttpResponse
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .models import AccessPoint
@login_required
def index(request):
accessPoints = AccessPoint.objects.all()
contex... | null | central/access_points/views.py | views.py | py | 1,007 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "models.AccessPoint.objects.all",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.AccessPoint.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "models.AccessPoint",
"line_number": 9,
"usage_type": "name"
},
{
"ap... |
69971952 | # -*- coding:utf-8 -*-
from datetime import datetime, timedelta
from django import forms
from django.contrib.admin.models import LogEntry
from django.contrib.auth.models import User
from django.utils.timezone import utc
from admin_tools.dashboard import modules, Dashboard
from qsstats import QuerySetStats
from eleme... | null | grakon/dashboard.py | dashboard.py | py | 4,770 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.Form",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "django.forms.DateTimeField",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django... |
271158902 | """
=====================================================
Use this simple tool to toggle Maya outliner and wireframe color on the fly!
* Works in Maya 2018
* Only toggle override on transform node, not shape node
* Only using index color
Copyright 2019 Yinglei Yang www.ying-lei.com
================================... | null | _BAK/colorTaggingTool_v004.py | colorTaggingTool_v004.py | py | 10,856 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "logging.ERROR",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "maya.OpenMayaUI.MQtUtil.mainWindow",
"line_number": 88,
"usage_type": "call"
},
{
"api_name"... |
552679795 | import bradata.utils
import bradata.connection
import os
import io
from zipfile import ZipFile
import pandas as pd
import glob
import yaml
import shutil
import luigi
import luigi.contrib.postgres
def _find_header(data_type, year, path):
with open(path, 'r') as f:
data = yaml.load(f)
a = data[data_ty... | null | bradata/tse/pipeline.py | pipeline.py | py | 6,105 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "yaml.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "luigi.Task",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "luigi.LocalTarget",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_... |
502629580 | from datetime import datetime
from io import BytesIO
from django.http import HttpResponse
from django.template.loader import get_template
from xhtml2pdf import pisa
from django.conf import settings
from django.contrib.staticfiles import finders
import os
def Calculate(Sceheme,Amount,Last):
today = datetime.now(... | null | INSURANCE/User/utils.py | utils.py | py | 2,525 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "datetime.datetime.now",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.template.loader.get_template",
"line_number": 45,
"usage_type": "call"
},
{
"api_n... |
102433809 | import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
import pandas as pd
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
import pickle
import numpy as np
import json
import re
from col... | null | appdev/appdev.py | appdev.py | py | 7,653 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.DataFrame",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "json.du... |
598231170 | import boto3
ec2= boto3.client('ec2',region_name= 'us-east-1')
response = ec2.describe_instances()
for x in response['Reservations']:
a = x['Instances'][0]['ImageId']
b = x['Instances'][0]['InstanceId']
c = x['Instances'][0]['InstanceType']
for y in x['Instances']:
d = y['Tags'][1]['Value']
... | null | describe_instance.py | describe_instance.py | py | 483 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "boto3.client",
"line_number": 2,
"usage_type": "call"
}
] |
324262121 | """
Test fixtures used by all applications.
"""
import io
import os
import factory
import pytest
from PIL import Image
from django.conf import settings
from django.core.files.base import ContentFile
from cms.blog.test.factories import PostFactory
from cms.test.factories import (
AlbumFactory,
InfoPanelFactory... | null | darksite/conftest.py | conftest.py | py | 3,586 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "factory.DjangoModelFactory",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "factory.Sequence",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.AUTH_USER_MODEL",
"line_number": 33,
"usage_type": "attribute"
},... |
320161600 | #!/usr/bin/env python
import sys
import cv2
import roslib
import rospy
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image
class image_subscriber:
def __init__(self):
self.image_pub = rospy.Publisher("out_image", Image, queue_size=1)
self.bridge = CvBridge()
sel... | null | burger_sakuteki/src/camera_subscriber.py | camera_subscriber.py | py | 1,074 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "rospy.Publisher",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sensor_msgs.msg.Image",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "cv_bridge.CvBridge",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rospy.Su... |
626909388 | from django.core.management.base import BaseCommand, CommandError
from .file_handler import get_file_dictionaries
from data_source.models import GroceryStore
from decimal import *
FILE_NAME = 'grocery_2013_data.csv'
class Command(BaseCommand):
# Get static file data, iterate and create model instace for database... | null | backend_api/api/data_source/management/commands/populate_grocery_store.py | populate_grocery_store.py | py | 926 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "file_handler.get_file_dictionaries",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "data_source.models.GroceryStore.objects.all",
"line_number": 13,
... |
406209159 | from otree.api import (
models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer
)
import os, paramiko
author = 'Wang Liao'
doc = """
Breath Practice to Calm Down
"""
logger = paramiko.util.get_logger('paramiko.transport')
class Constants(BaseConstants):
name_in_url = 'breath... | null | breath/models.py | models.py | py | 3,556 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "paramiko.util.get_logger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "paramiko.util",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "otree.api.BaseConstants",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "o... |
67440975 |
import requests
from urllib.parse import urlparse
defaultURL = 'https://openapi.naver.com/v1/search/blog.json?' #요청변수 가지고 오고 뒤에 ? 추가해야됨
keyword = input("검색어 입력:")
search_n = input("검색 개수 입력(쵀대100):")
# '요청변수 = 값' 형식으로 구성
sort = '&sort=sim'
start = '&start=1'
display = '&display=' + search_n
query='&query=' + keyw... | null | 0809/01_naver_blog 추출.py | 01_naver_blog 추출.py | py | 834 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "urllib.parse.urlparse",
"line_number": 20,
"usage_type": "call"
}
] |
140207944 | from django.shortcuts import render, get_object_or_404, HttpResponseRedirect
from django.urls import reverse
from django.views.generic import UpdateView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from .models import Expense, ExpenseCategory
from .form... | null | expenses/views.py | views.py | py | 1,284 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.views.generic.UpdateView",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "forms.ExpensesForm",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "models.Expense.objects.filter",
"line_number": 23,
"usage_type": "call"
},
{
"... |
607516168 | from torch._C import device
import argparse
from enum import Enum
import time
import os.path as osp
from os import getpid
import json
from typing import Any, Dict, Optional, Tuple, List, Iterable
import torch
import torch.nn.functional as F
from torch_geometric.data import DataLoader
#from dataProcessing import CGraphD... | null | code_completion.py | code_completion.py | py | 21,673 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "enum.Enum",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 138,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"lin... |
475033178 | import requests
from io import BytesIO
from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.db import models
from django.dispatch import receiver
from django_images.models import Image as BaseImage, Thumbnail
from taggit.managers import TaggableManager
from django... | null | core/models.py | models.py | py | 4,341 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Manager",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "io.BytesIO",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "django.core... |
130177253 | from typing import List
class Solution:
def fourSum2(self, nums: List[int], target: int) -> List[List[int]]:
res = []
if len(nums) < 4:
return res
nums.sort()
for i in range(len(nums) - 3):
if i > 0 and nums[i] == nums[i - 1]: # skip duplicates
... | null | Array/18-4Sum.py | 18-4Sum.py | py | 2,812 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 5... |
639505929 | #!/usr/bin/python3
# _*_coding: utf-8 -*-
# @Time : 2019/5/22 21:01
# @Author : Shark
# @File : wallpaper_spider.py
import os
import threading
import time
from queue import Queue
import requests
from lxml import etree
img_q = Queue()
headers = {
"user-agent": ("Mozilla/5.0 (Windows NT 10.0; Win6... | null | program/wallpaper_wechat/wallpaper_spider.py | wallpaper_spider.py | py | 1,874 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "queue.Queue",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_numbe... |
518596708 | """
Program: alien.py
Author: Peggy Walsh
CIS 1415
Description: The alien player properties and attributes.
"""
import pygame
class Alien(object):
"""Class to manage alien player."""
def __init__(self, cc_game):
"""Initialize alien player and set its staring point."""
... | null | alien.py | alien.py | py | 1,415 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.image.load",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 22,
"usage_type": "attribute"
}
] |
375188214 | # File to contain general classes (eg. "Room", "Enemy", "Weapon" etc.)
import pygame, current_rendered
from Functions import functions # All functions for major use.
import Classes
class Room(object): # Default Room class. Actual rooms will be located in a seperate file
def __init__(self): # Init
self.wal... | null | Classes/classes.py | classes.py | py | 3,420 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "Functions.functions.create_wall",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "Functions.functions",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "Functions.functions.create_exit",
"line_number": 23,
"usage_type": "call"
},
{
... |
358114826 | from __future__ import absolute_import, division, print_function
# I didn't import unicode_literals. They break setuptools or Cython in python
# 2.7, but python 3 seems to be happy with them.
import glob
import os
from os import path
from setuptools import setup, Extension
from setuptools.command.build_ext import buil... | null | setup.py | setup.py | py | 9,001 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.platform",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "sys.platform",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "cpufeature.CPUFeature",
"line_number": 61,
"usage_type": "name"
},
{
"api_name": "cpufeature.... |
251624560 | import argparse
import os
import torch
import torch.nn.parallel
import torch.utils.data
import torch.nn.functional as F
from data_utils.ModelNetDataLoader import ModelNetDataLoader, load_data
# from data_utils.S3DISDataLoader import S3DISDataLoader, recognize_all_data
import datetime
import logging
from pathlib import ... | null | test_clf.py | test_clf.py | py | 6,111 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "model.pointnet2.eval",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "model.pointnet2",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "os.envir... |
281616525 | import datetime
import logging
import numpy as np
import pandas as pd
from pathlib import Path
import re
import random
def find_indices_around_0(array: np.ndarray):
i = np.where(array >= 0, array, np.inf).argmin()
j = np.where(array <= 0, array, -np.inf).argmax()
return min(i, j), max(i, j)
def line_i... | null | big_roc/utils.py | utils.py | py | 3,722 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.ndarray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.where",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.inf",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "numpy.where",
"line... |
18416956 | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# In[ ]:
# In[ ]:
from flask import Flask,render_template,request
app=Flask(__name__)
@app.route("/")
def dhjdfhjfe():
return render_template("water.html")
@app.route("/inputdata",methods=['GET','POST'])
def hjdshjdsjhsd():
if(request.method=='POST'):
... | null | app.py | app.py | py | 645 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "flask.req... |
350672234 | # This file contains physical parameters for the cart and the system state space equations
import numpy as np
import sys
sys.path.append('..') # add parent directory
import scipy.linalg
from scipy import signal
import control
#Physical parameters of the inverted pendulum known to the controller
m1 = 0.03 # Mas... | null | labs/Lab11/pendulumParam.py | pendulumParam.py | py | 2,584 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "numpy.pi",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "numpy.matrix",
"line_nu... |
207214877 | import glob
import sys, os
import operator
from tree_sitter import Language, Parser
sys.path.append(os.path.abspath(os.path.join('..')))
sys.path.append(os.path.abspath(os.path.join('../../')))
from UtilFunctions import createDirIfNotExist
from sklearn.metrics import classification_report
from sklearn.metrics import c... | null | devItems/fall-2021/TR_StorryPointReg.py | TR_StorryPointReg.py | py | 4,545 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
406864244 | # Copyright (c) 2013, System Engineering Software Society
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | null | Library/Common/sylib/fx_selector.py | fx_selector.py | py | 9,300 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sympathy.platform.qt_compat.import_module",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "sympathy.platform.qt_compat",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "sympathy.platform.qt_compat.QtCore",
"line_number": 40,
"usage_type... |
430124063 | from bs4 import BeautifulSoup
import requests
#로그인 유저정보
LOGIN_INFO = {
'user_id':'',
'user_pw':''
}
#Sessoin 생성, with 구문안에서 유지
with requests.Session() as s:
login_req = s.post('https://user.ruliweb.com/member/login_proc',data=LOGIN_INFO)
# #HTML 소스 확인
# print('login_req',login_req.text)
# #... | null | download3-4-1.py | download3-4-1.py | py | 1,105 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.Session",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 21,
"usage_type": "call"
}
] |
383665215 | '''
Created on Mar 16, 2017
@author: riaps
This modbus device interface will read input registers and reads/writes holding registers of slave devices.
At this time, it does not read/write coils.
'''
import minimalmodbus
import serial
from collections import namedtuple
import spdlog
from spdlog import ConsoleLogger, ... | null | apps-ncsu/modbus_10192020/serialModbusLib/serialModbusComm.py | serialModbusComm.py | py | 13,995 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.namedtuple",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "enum.unique",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "spdlog.ConsoleLogger",
... |
109324788 | from django.db import models
from django.db.models import Q
from home.service import *
class Description(models.Model):
name = models.CharField('Nome', max_length=100)
slug = models.SlugField('Atalho')
text = models.TextField('Descrição', blank = False)
prepopulated_fields = {'slug': ['name']}
de... | null | home/models.py | models.py | py | 3,722 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "... |
425353406 | import datetime
from django.core.exceptions import ValidationError
from django.test import TestCase
from . import factories
from .. import models
class StrMethodTest(TestCase):
def test_str_methods_succeed(self):
"Make sure __str__ methods succeed."
for model_name in [
'Location... | null | programs/tests/test_models.py | test_models.py | py | 5,972 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.test.TestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.test.TestCase",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 41,
"usage_type": "argument"
},
{
... |
409457623 | #!/usr/bin/env python3
"""Test Generator for Search_tree
Requirements: python3
Description:
This python file will run randomly combine the instructions
in the test driver to create test files. It will run these generated
test files on your code and check if they pass. If they don't pass,
you can revie... | null | ECE 250/avltree/tester.py | tester.py | py | 17,534 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.compile",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "re.M",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "re.I",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "random.randrange",
"line_number": ... |
270136585 | # -*- coding: utf-8 -*-
import datetime
from django.core.checks import messages
from django.forms import formset_factory
from django.http import HttpResponseRedirect
from django.shortcuts import render
from plan.forms import LoginForm, ProductSingleForm, AddProductForm, ProductForm, subdict, RecipeSingleForm, \
A... | null | plan/views.py | views.py | py | 10,621 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "plan.forms.LoginForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "plan.models.InfoText.objects.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "plan.models.InfoText.objects",
"line_number": 19,
"usage_type": "attribute"
},
... |
89069286 | import asyncio
import time
async def count():
print("One")
await asyncio.sleep(1)
print("Two")
async def slow_count():
""" block while sleeping to test debug mode """
print("Slow counting")
time.sleep(0.5)
async def main():
await asyncio.gather(count(), count(), count(), slow_count())... | null | count.py | count.py | py | 579 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "asyncio.sleep",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "asyncio.gather",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.perf_counter",
"line_... |
157019037 | #--------------------------------------------------------------------
# Author: Ahad Beykaei
# Written: 23/02/2018
# Last updated: 24/02/2018
#
# Language: Python 3.6
# Execution: Python Spark 2.0
#--------------------------------------------------------------------
from pyspark.sql import ... | null | assignment_class.py | assignment_class.py | py | 6,217 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pyspark.sql.SparkSession.builder.appName",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.SparkSession",
"line_number": 16,
"usage_type"... |
418673125 | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module... | null | env/lib/python3.9/site-packages/ansible/modules/cloud/amazon/cloudfront_invalidation.py | cloudfront_invalidation.py | py | 10,351 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "ansible.module_utils.ec2.get_aws_connection_info",
"line_number": 156,
"usage_type": "call"
},
{
"api_name": "ansible.module_utils.ec2.boto3_conn",
"line_number": 157,
"usage_type": "call"
},
{
"api_name": "botocore.exceptions.BotoCoreError",
"line_number": 168... |
281654450 | # -*- coding:utf-8 -*-
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
import math
from sklearn.decomposition import FactorAnalysis
from factor_analyzer import Rotator
import copy
# select:基于特征根贡献率Eigenvalue/因子数量n_components, subselect:特征根大于/提取因子个数
NAME = 'Factor_Analysis'
CLASS ... | null | gbicc/code_cyt/flask_online/online/FA.py | FA.py | py | 9,730 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_excel",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.FactorAnalysis",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 41,
"usage_type": "call"
},
{
"api_name"... |
315553843 | import numpy as np
import scipy
from scipy import io
from PIL import Image
import os
import re
def my_savemat(img, filename, var):
(w, h) = img.size
d = len(img.getbands())
npa = np.array(img.getdata()).reshape(h, w, d)
scipy.io.savemat(filename, {var:npa})
in_data_dir = "./test_data/Set14/"
out_data... | null | data/aug_test.py | aug_test.py | py | 1,389 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.io.savemat",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scipy.io",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line... |
627326686 | import pytest
from thefuck.rules.rvm_use import match, get_new_command
from thefuck.types import Command
output = pattern = """RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/ba... | null | tests/rules/test_rvm_use.py | test_rvm_use.py | py | 1,037 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "thefuck.rules.rvm_use.match",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "... |
617744457 | from django.shortcuts import render, redirect
from django.views.decorators.csrf import csrf_exempt
# 세션
from django.contrib.auth.decorators import login_required
# DB
from django.db import connection
from django.db.models import Sum,Min,Max,Count,Avg
# 크롤링
from bs4 import BeautifulSoup
from selenium import webdriver
# ... | null | GDP_projectOriginal/service/views.py | views.py | py | 15,732 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.connection.cursor",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.db.connection",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "models.GDPTable.object.all",
"line_number": 36,
"usage_type": "call"
},
{
"api_n... |
129550043 | import argparse
import yaml
from spg_experiments.wrappers.train_eval import train_and_eval
def main(args):
# eval params
fname = (args.environment + "_" + args.sensors + "_" + str(args.entropy) + "_" +
str(args.multistep) + "_" + str(args.index_exp))
agent_type = "base"
results = tra... | null | spg_exp.py | spg_exp.py | py | 1,036 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "spg_experiments.wrappers.train_eval.train_and_eval",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "yaml.dump",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 34,
"usage_type": "call"
}
] |
154725648 | import json
import time
from scrapy.http import HtmlResponse
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import ElementClickIntercepted... | null | comments_spider/comments_spider.py | comments_spider.py | py | 2,012 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "selenium.common.exceptions.ElementClickInterceptedException",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support.expected_condi... |
383385308 | from collections import OrderedDict
def serialize_object(o):
if hasattr(o, "to_dict"):
# This will do all the sub layers for us
return o.to_dict()
elif isinstance(o, (dict, OrderedDict)):
# Need to recurse down
d = OrderedDict()
for k, v in o.items():
d[k] =... | null | malcolm/core/serializable.py | serializable.py | py | 3,176 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.OrderedDict",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "collections.OrderedDict",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 39,
"usage_type": "call"
}
] |
640310967 | import speech_recognition as sr # import the library
import pyttsx3
import os
r = sr.Recognizer() # initialize recognizer
with sr.Microphone() as source: # mention source it will be either Microphone or audio files.
print("Speak Anything :")
audio = r.listen(source) # listen to the source
try:
... | null | sp_recog.py | sp_recog.py | py | 902 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "speech_recognition.Recognizer",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Microphone",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyttsx3.init",
"line_number": 17,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.