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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
537217881 | import logging
from ina219 import INA219
import time
import argparse
import sys
from mqtt import mqttlib
from datetime import datetime as dt
from volmem import client
from dbio import txn
SHUNT_OHMS = 0.1
MAX_EXPECTED_AMPS = 0.5
ADDRESS = client.get().get("gateway_config")["ina219"]["address"]
def read(print_val=Fals... | null | sensors/power.py | power.py | py | 1,970 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "volmem.client.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "volmem.client",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "ina219.INA219",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser... |
519547488 | from django.shortcuts import render
from django.contrib import messages
from django.views.generic import TemplateView
from .forms import ContactForm
def home(request):
form = ContactForm(request.POST)
if request.method == 'POST':
if form.is_valid():
form.save()
name = ... | null | challenges/views-info.py | views-info.py | py | 621 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "forms.ContactForm",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 13,
"usage_type": "name"
},
{
"api_name... |
164820584 | def TSInputCreation(Path,totTurbs):
import os,sys
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import sys
sys.path.append(os.getcwd())
from TurbSimCaseCreation import TSCaseCreation, WriteTSFile
plt.rc("font",family="serif")
plt.rc("font",size=14)
zbo... | null | pyFAST/fastfarm/InputSetup.py | InputSetup.py | py | 6,861 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rc",
"line... |
191728909 | grid = [[' '] * 10 for i in range(10)]
import time
from msvcrt import getch
import threading
import multiprocessing
# x, y = 0, 0
# grid[x][y] = 'X'
# while True:
# key = ord(getch())
# if key == 80: # down arrow
# grid[x][y] = ' '
# grid[x + 1][y] = 'X'
# x += 1
# if key == 72: # ... | null | train.py | train.py | py | 1,170 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "multiprocessing.Process",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "msvcrt.getch",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 52,
"usage_type": "call"
}
] |
59690773 | import math
import matplotlib.pylab as graf
class calc():
def __init__(self, dB, BitDepth, FrecMuestro, Tone, Duration):
self.dB_fs = dB
self.bitdepth = BitDepth
self.Samples = 1/float(FrecMuestro)
self.FrecOnda = Tone
self.tiempo = int(Duration*FrecMuestro)
def Amp(sel... | null | dB.py | dB.py | py | 715 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "math.sin",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pylab.plot",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab",
"l... |
525617803 | # vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# The lightwave color library
# Copyright (c) 2016 Dave Jones <dave@waveform.org.uk>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source cod... | null | lightwave/color.py | color.py | py | 20,585 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "types.RGB",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "types.RGB",
"line_number": 256,
"usage_type": "argument"
},
{
"api_name": "types.HLS",
"line_number": 261,
"usage_type": "argument"
},
{
"api_name": "types.HSV",
"line_number"... |
122531010 | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, IMode, ModuleData, Mode
from txircd.utils import ModeType, now
from zope.interface import implementer
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
irc.R... | null | txircd/modules/rfc/mech_invite.py | mech_invite.py | py | 7,785 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "twisted.words.protocols.irc.RPL_INVITED",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "twisted.words.protocols.irc",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "txircd.module_interface.ModuleData",
"line_number": 11,
"usage_typ... |
11296626 | import bluetooth
import time
serverMACAddress = 'C8:21:58:74:F8:14' # PC's Bluetooth Address
port = 3
sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
sock.connect((serverMACAddress, port))
while True:
# one is just for testing
text = "one"
sock.send(text)
response = sock.recv(1024)
print(respons... | null | GSDP-Team3/server/RobotUTU/PyBluezLego.py | PyBluezLego.py | py | 353 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "bluetooth.BluetoothSocket",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bluetooth.RFCOMM",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 14,
"usage_type": "call"
}
] |
7541486 | '''
Copyright 2021 Guilherme Oliveira
SPDX-License-Identifier: Apache-2.0
========================================================================================================================
Author: Guilherme Oliveira
Date: july 06, 2020
Contact: gmmoliveira1@gmail.com
License: Apache-2.0 (https://www.apache.org/li... | null | src/xgboost_gpu.py | xgboost_gpu.py | py | 9,397 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "dask_cuda.LocalCUDACluster",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "dask.distributed.Client",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name... |
543793879 | from django.shortcuts import render
from django.http import HttpResponse
from .forms import RevenueForm
from datetime import datetime
from BSFC.processing.item_calculations import item_profit
from BSFC.processing.all_calculations import all_profit
# Create your views here.
def index(request):
return HttpResponse(... | null | BSFC/BSFC/apps/revenue/views.py | views.py | py | 2,385 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "forms.RevenueForm",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime... |
40065437 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import random
from IPython.display import clear_output
class Dealer():
def __init__(self):
self.hand = []
self.points = {'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9,'10':10,'Jack':10 ,'Queen':10,'King':10,'Ace':11}
def ask(self):
dec... | null | Blackjack.py | Blackjack.py | py | 3,942 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "random.choice",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "IPython.display.clear_output",
"line_number": 71,
"usage_type": "call"
}
] |
227066074 | # coding: utf-8
"""
建议47:使用logging记录日志信息
logging lib包含以下4个主要对象:
1 logger
2 Handler
3 Formatter
4 Filter
logging.basicConfig([**kwargs])提供对日志系统的基本配置,默认使用StreamHandler和Formatter
并添加到root logger
尽量为logging取一个名字而不是采用默认,这样当在不同的模块使用的时候,其他模块只需要使用以下代码就可以
方便地使用同一个logger,因为它本质上符合单例模式
import logging
logging.basicConfig(level=log... | null | suggestion47.py | suggestion47.py | py | 2,355 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.basicConfig",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "logging.... |
537985813 | """
在Python中获取系统信息的另一个好办法是使用psutil这个第三方模块。顾名思义,psutil = process and system utilities,
它不仅可以通过一两行代码实现系统监控,还可以跨平台使用,支持Linux/UNIX/OSX/Windows等
"""
import psutil
print(psutil.cpu_count()) # CPU逻辑数量
print(psutil.cpu_count(logical=False)) # CPU物理核心
print(psutil.virtual_memory()) # 系统内存
print(psutil.disk_partitions()) #... | null | src/day0124/exercise020_psutil.py | exercise020_psutil.py | py | 1,873 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "psutil.cpu_count",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "psutil.cpu_count",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "psutil.virtual_memory",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "psutil.disk_par... |
26928525 | #Fashion_Mnist CNN
import numpy as np
import matplotlib.pyplot as plt
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Conv2D, MaxPooling2D, Flatten
# from tensorflow.keras.datasets import fashion_mnist #dataset인 fashion_mnist 추가
from tensorflow.keras.utils import to_categoric... | null | keras/keras57_3_load_npy_fashion_mnist.py | keras57_3_load_npy_fashion_mnist.py | py | 3,904 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 29,
... |
401813806 | import numpy as np
import matplotlib.pyplot as plt
from numba import jit
import time
start = time.time()
nx = 1800 #x resolution
ny = 1200 #y resolution
iters = 200 #number of iterations
colormap = 'twilight_shifted' #chosen colormap
ext = [-2.1,1.5,0.7,-2] #x and y limits of the main figure
... | null | burning_ship.py | burning_ship.py | py | 2,034 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "time.time",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numba.jit",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 39,
... |
585328303 | from __future__ import print_function
import os
import sys
from pathlib import Path
import h5py
import matplotlib.pyplot as plt
import numpy as np
def h5delete(filename, datasets=None, dry_run=True, verbose=False):
'''delete file if it is not a valid HDF5 file.
'''
try:
with h5py.File(filename, ... | null | dautil/IO/h5.py | h5.py | py | 6,208 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "h5py.File",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.remove",
"line_numbe... |
170217187 | import hashlib
from django.core.cache import cache
from django.core import signing
from rest_framework.response import Response
from django.conf import settings
def setValueToCache(strKey, strValue):
"""
缓存信息--设置
:return:
"""
try:
cache.set(strKey, strValue, settings.TOKEN_TIME_OUT)
... | null | hyjk/api/public.py | public.py | py | 2,400 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.core.cache.cache.set",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.core.cache.cache",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.TOKEN_TIME_OUT",
"line_number": 17,
"usage_type": "attribute"
... |
144626898 | #!/usr/bin/env python3
# encoding: utf-8
"""
untitled.py
Created by Jongmin Moon on 2011-06-11.
Copyright (c) 2011 __MyCompanyName__. All rights reserved.
"""
import sys
import os
import json
import code
def walkdir(_path):
'''
Since the grabdir function is recursive putting the JSON serializer inside it created... | null | list_directory.py | list_directory.py | py | 2,310 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.split",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.path.splitext",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
443312619 | from django.db import models
from ad_posts.models import Ad
class Hobbies(Ad):
TYPE_BILET=(
('Кино','Кино'),
('Концерты, выставки','Концерты, выставки'),
('Путешествия','Путешествия'),
('Спорт','Спорт'),
('Театр, опера, балет','Театр, опера, балет'),
('Цирк','Цирк')... | null | ad_model/hobbies.py | hobbies.py | py | 12,279 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "ad_posts.models.Ad",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 195,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 195,
"usage_type": "name"
},
{
"api_name": "djang... |
163797584 | from datetime import datetime
import pandas as pd
from _quandl.constants import *
from av.constants import *
from _quandl.data import (gold_time_series, silver_time_series,
us_bonds_time_series, emea_bonds_time_series, emrg_bonds_time_series,
dax_futures_time_series, re... | null | main.py | main.py | py | 5,706 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "av.data.dow_time_series",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "av.data.dow_time_series.sort_values",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "av.data.spx_time_series",
"line_number": 32,
"usage_type": "name"
},
{
... |
15885171 | import math
import cv2
import numpy as np
def grayscale(img):
"""Applies the Grayscale transform
This will return an image with only one color channel
but NOTE: to see the returned image as grayscale
you should call plt.imshow(gray, cmap='gray')"""
return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
#... | null | helpers.py | helpers.py | py | 5,744 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_RGB2GRAY",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.Canny",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
... |
237064711 | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ec
import os
import time
import unittest
from chromedriver_win32.crawler1 import crawler1
import openpyxl
from openpyxl import ... | null | YJ_renewal.py | YJ_renewal.py | py | 7,303 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support.expected_conditions.presence_of_element_located",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support... |
292276555 | import requests
from bs4 import BeautifulSoup
import re
from queue import Queue
import threading
import time
def get_news(url, queue):
global time
post_list = []
while True:
soup = BeautifulSoup(requests.get(url).text, "html.parser")
soup_find = soup.find_all('div', ['headline-list__item'... | null | lab2_Parse_news.py | lab2_Parse_news.py | py | 1,219 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "queue.put",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_numbe... |
603908782 | #!/usr/bin/env python
#-*- coding:utf-8 _*-
"""
@author: HJK
@file: main.py
@time: 2019-01-08
"""
import sys
import re
from core.extractors import kugou
from core.extractors import qq
from core.extractors import netease
from utils import echo
from utils.customlog import CustomLog
addons = {
'qq': qq,
'... | null | main.py | main.py | py | 1,980 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "core.extractors.qq",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "core.extractors.kugou",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "core.extractors.netease",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "util... |
112506556 | import util
import forex_model as forex_model
import config
import numpy as np
import copy
import warnings
warnings.filterwarnings('ignore')
if __name__ == "__main__":
forex_config = config.ForexModelConfig()
target_data, target_len = util.read_target_data("data_target.json")
price_data = util.read_price_... | null | main.py | main.py | py | 1,220 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "config.ForexModelConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "util.read_target_data",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "... |
426258402 | import unittest
from utils.web import get_soup_from_url
from utils.logger import prj_logger
from utils.db import read_existing_data_in_db, write_unique_to_db
from site.channel import Channel
from configs import database_name, host_url, channel_blacklist
class Index:
def __init__(self, url, sub_collection_name='c... | null | site/index.py | index.py | py | 2,931 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "configs.database_name",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "configs.database_name",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "utils.web.get_soup_from_url",
"line_number": 21,
"usage_type": "call"
},
{
"api_name"... |
92494783 | # Das ist Hangman von Florian
import string
from colorama import Fore
from colorama import init as colorama_init
import random
# Das ist ein String der mögleiche Wörter enthält
wörter = 'Käse, Pluto, Videospiel, Computer, Mund, Klassenraum, Kek, Fensterscheibe, Dachschaden, Bonuspunkt, Kamera, Gabel, Heizung, Rau... | null | Abgaben/Hangman_Florian.py | Hangman_Florian.py | py | 2,049 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "random.randint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "string.ascii_lowercase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore.MAGENTA",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": ... |
109785991 | from collections import deque
from functools import reduce
class Node:
def __init__(self, name, pName):
self.name = name
self.pName = pName
def bfs_search(graph, start, end):
search_queue = deque()
search_queue.append(Node(start, None))
visited = []
while search_queue:
# ... | null | 算法/search/bfs.py | bfs.py | py | 1,609 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.deque",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": 53,
"usage_type": "call"
}
] |
187139649 | import tkinter
from PIL import ImageTk, Image
from google_trans_new import google_translator
translator = google_translator()
class TRAN:
def __init__(self):
self.root = tkinter.Tk()
self.root.title("Translation")
self.root.geometry("400x400")
self.root.resizable(False, ... | null | Include/translate.py | translate.py | py | 1,469 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "google_trans_new.google_translator",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.ImageTk.PhotoImage",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PI... |
270957216 | import time
import json
import string
#user type 0:normal-public 1:normal-vip 2:banned 3:admin
#file type 0:normal-public 1:normal-private 2:banned
currentfileid=0
jsonstr="database.json"
def fetch_db():
global jsonstr
try:
database = json.loads(open(jsonstr).read())
except:
database = {"s... | null | model.py | model.py | py | 7,035 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "string.atoi",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 9... |
83236452 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def minDepth(self, root):
if not root:
return 0
if root.left and root.right:
retu... | null | LC/111_Minimum_Depth_Binary_Tree.py | 111_Minimum_Depth_Binary_Tree.py | py | 1,069 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.deque",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 29,
"usage_type": "call"
}
] |
415004994 | def unikati(s):
nov = []
for x in s:
if x not in nov:
nov.append(x)
return nov
def avtor(tvit):
for beseda in tvit.split():
if ":" in beseda:
return beseda[:-1]
def vsi_avtorji(tviti):
sez = []
for tvit in tviti:
ime = avtor(tvit)
if ime ... | null | code/batch-1/dn6/Z-14.py | Z-14.py | py | 12,372 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "collections.defaultdict",
"line_number": 164,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 191,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 327,
"usage_type": "attribute"
},
{
"api_name... |
261802254 | import requests
import json
class DoubanSpider:
def __init__(self):
self.url_list = ["https://m.douban.com/rexxar/api/v2/subject_collection/t"
"v_korean/items?start={}&count=18&loc_id=108288",
"https://m.douban.com/rexxar/api/v2/subject_collection/... | null | Spider/DoubanSpider/DoubanSpider.py | DoubanSpider.py | py | 2,296 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 34,
"usage_type": "call"
}
] |
133701579 | import openpyxl
# 엑셀읽기
workbook = openpyxl.load_workbook(r'C:\Users\스타트코딩\Desktop\웹크롤링\4주차\result.xlsx')
# 시트 이름으로 불러오기
sheet = workbook['새로운시트']
# 셀 주소로 값 가져오기
title_a = sheet['A1'].value
title_b = sheet['B1'].value
print(title_a, title_b) | null | 4주차/openpyxl_ex2.py | openpyxl_ex2.py | py | 322 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 4,
"usage_type": "call"
}
] |
395506440 | from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
def cur_range(page_num,total):
if total == 0:
r = str(0)
else:
if page_num == 0:
page_num = 1
r = str(((int(page_num)-1)*10)+1)
return r | null | geography/templatetags/cur_range.py | cur_range.py | py | 281 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.template.Library",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 4,
"usage_type": "name"
}
] |
573300764 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example: Amazon VPC
Scenario 1: VPC with a Single Public Subnet
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario1.html
@author Jeremy McCormick
"""
import boto3
from botocore.exceptions import ClientError
# https://boto3.amazonaws.com/v1/documentation/ap... | null | AWS/vpc_scenario_1.py | vpc_scenario_1.py | py | 4,279 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "boto3.client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "boto3.resource",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "botocore.exceptions.ClientError",
"line_number": 128,
"usage_type": "name"
}
] |
236535322 | from django.db import models
class Employee_Training(models.Model):
"""
Employee Training model that represents and stores the training program id, employee who attended the training, and whether the program was completed.
Author: Jacob Smith
"""
Session_ID = models.ForeignKey(
'Training_... | null | bangazonapi/models/Employee_Training.py | Employee_Training.py | py | 490 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 10,
"usage_type": "call"
},
{
"api_name":... |
529703648 | __author__ = 'David'
import pandas as pd
import string
import re
from sklearn.feature_extraction.text import CountVectorizer
import time
data_path = "../Data/"
train = pd.read_json(data_path+"train.json")
test = pd.read_json(data_path+"test.json")
train_test = pd.concat([train, test])
print("Generate co... | null | genFeat_features_count.py | genFeat_features_count.py | py | 1,084 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pandas.read_json",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_json",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.clock",
"lin... |
493172436 | from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import tryUrlencode, toUnicode
from couchpotato.core.helpers.variable import tryInt, getIdentifier
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
from couchpotato.core.media.mo... | null | main.py | main.py | py | 8,447 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "couchpotato.core.logger.CPLog",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "couchpotato.core.media._base.providers.torrent.base.TorrentProvider",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "couchpotato.core.media.movie.providers.base.Mov... |
477753284 | from flask import *
import sqlite3
from flask_login import UserMixin
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class User(UserMixin, db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
password = db.Column(db.String, nul... | null | model/admin.py | admin.py | py | 2,606 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_login.UserMixin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "sqlite3.connect",
"line_number": 25,
"usage_type": "call"
}
] |
1814767 | import json
import time
import random
import pandas as pd
import numpy as np
import requests as rq
from essential_generators import DocumentGenerator
# YOUR INPUT SENTENCE
testSentence = "Manjunatha is a very smart boy"
getEmbeddingsURL = "http://127.0.0.1:5000/computeEmbedding"
getFakeFactorURL = "http://127.0.0.1:5... | null | NLP/tester.py | tester.py | py | 1,842 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.dot",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.norm",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "requests.post",
"li... |
470954434 | import argparse
import sys
import random
import os
import numpy as np
import matplotlib.pyplot as plt
import cv2
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
import kornia
from models import Net, Net2, Net3
from pipeline import HomographyDataset
from models... | null | deep_homography_net/eval.py | eval.py | py | 4,095 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "m... |
363493754 | #!/usr/bin/env python2
from __future__ import division, print_function
import pandas as pd
import os
from pprint import pprint
from dataset import read_labels, iterate_train_data_names
from hierarchy import heated_targetings
from np_dataset import load_npys
import theano
# theano.config.compute_test_value = 'warn'
from... | null | amazon_5x5resizelarger.py | amazon_5x5resizelarger.py | py | 6,077 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "theano.config",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "theano.config",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "theano.config",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join... |
218623119 | import time
import datetime
from datetime import date, datetime, timedelta
from dateutil import relativedelta
from openerp.osv import fields, osv
from dateutil.relativedelta import relativedelta
from openerp.tools.translate import _
import datetime
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT,DEFAULT_SERVER_DAT... | null | farmasi/vit_expired_date/stock.py | stock.py | py | 4,180 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "openerp.osv.osv.osv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "openerp.osv.osv",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "openerp.osv.fields.date.today",
"line_number": 23,
"usage_type": "call"
},
{
"api_name":... |
360519097 | # -*- coding: utf-8 -*-
# Copyright 2013 django-htmlmin authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import re
import bs4
from HTMLParser import HTMLParser
from .util import force_decode, between_two_tags
EXCLUDE_TAGS = ("pre... | null | htmlmin/minify.py | minify.py | py | 2,157 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.compile",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "util.force_decode",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
... |
404014301 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('blog', '0005_auto_20150511_2353'),
]
operations = [
migrations.CreateM... | null | blog/migrations/0006_auto_20150513_1636.py | 0006_auto_20150513_1636.py | py | 839 | python | en | code | null | code-starcoder2 | 83 | [
{
"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.CreateModel",
"line_number": 16,
"usage_type": "call"
},
... |
148326308 | # import sys; sys.path.append("../modules/"); sys.path.append("../modules/fv/"); sys.path.append("../../../CPlantBox/"); sys.path.append("../../../CPlantBox/src");
# sys.path.append("../../build-cmake/cpp/python_binding/")
import plantbox as pb
import functional.xylem_flux as xylem_flux
from rosi_richards_cyl import ... | null | python/modules/rhizo_models.py | rhizo_models.py | py | 29,628 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "mpi4py.MPI.COMM_WORLD",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "mpi4py.MPI",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "plantbox.MappedSegments",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "fu... |
236241426 | #################################################################################
# FILTER.PY
#
# This file contains a variety of functions and constants related to filtering.
# These items will commonly be used in Electrical Engineering Applications.
#
# February 22, 2019
#
# Written by Joe Stanley
# Speci... | null | eesignal/filter.py | filter.py | py | 61,662 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.log10",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "numpy.radians",
"line_number": 110,
"usage_type": "call"
},
{
"api_name": "sympy.abc.s",
"line_numbe... |
24047417 | from __future__ import print_function
from math import log10
import torch
import torch.backends.cudnn as cudnn
#from FilterCNN.model import Net
from progress_bar import progress_bar
from Unet.Umodel import UNet8
from Unet.Umodel import UNet4
from Unet.Umodel import UNet2
from Unet.GraLoss import GradientLoss
import... | null | Unet/solver.py | solver.py | py | 4,742 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "Unet.Umodel.UNet... |
221711315 | # Copyright (c) 2015-2016 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | null | molecule/driver/openstackdriver.py | openstackdriver.py | py | 14,918 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "sys.exit",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "molecule.driver.basedriver.BaseDriver",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "molecule.driver.basedriver",
"line_number": 39,
"usage_type": "name"
},
{
"ap... |
296834995 | """
Versatile functions for plotting time-series data
"""
# TODO:
# alternatively make `class timeseriesPlot(Axes):` then ax.plot_ts()
# NOTE: you can probs use the std plt.subplots machinery if you register your
# axes classes
import itertools as itt
import numpy as np
import matplotlib as mpl
from .utils impor... | null | graphing/ts.py | ts.py | py | 26,696 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "matplotlib.use",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "recipes.introspection.utils.get_module_name",
"line_number": 38,
"usage_type": "call"
},
{
"api_... |
77442236 | import os
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
DATA_DIRS = [
('~/linuxcnc/configs/mill_touch_sim_v4', 'configs/mill_touch_v4'),
]
def data_files_from_dirs(data_dirs):
data_files = []
for dest_dir, source_dir in data_dirs:
... | null | setup.py | setup.py | py | 1,368 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.expanduser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_numb... |
510819546 | import json, pprint
import pdb
cars = []
carsDB = {}
site = 'http://vancouver.en.craigslist.ca'
siteOwner = 'http://vancouver.en.craigslist.ca/cto/'
class Car():
def __init__(self, link, title):
# meta data
self.link = link
self.posting = ''
self.title = title
# vehicle data
self.price = 0
self.y... | null | datastore.py | datastore.py | py | 955 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line_number": 56,
"usage_type": "call"
}
] |
296773797 | # encoding: utf-8
import os, sys, math
from django.db import connection, models
# don't use this model directly
# table difinition only for testing
class CategoryCount(models.Model):
category = models.CharField(max_length=64, null=False, unique=True)
count = models.IntegerField(default=1)
class M... | null | machine-learning/kiki/docclass/models.py | models.py | py | 6,593 | python | en | code | null | code-starcoder2 | 83 | [
{
"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.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
372543131 | #!/usr/bin/env python
import logging
import sys
from datetime import datetime
from string import Template
from google.cloud import datastore
def update_source_schema(config_entity):
old_schema = config_entity[u'sourceSchema']
logging.info("Current source schema for config #" + str(config_entity.key.id_or_nam... | null | scripts/config-migration/config-migration.py | config-migration.py | py | 2,194 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.info",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "string.Template",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
... |
587206913 | '''
This script finds deer files in the missouri camera traps dataset
by parsing the JSon
'''
import json
deerints = [4, 12, 14, 15]
f = open("missouri_camtraps/missouri_camera_traps_set1.json", "r")
newf = open("missouri_camtraps/miss_camtraps.txt", "w")
js = json.loads(f.read())
for a in js["annotations"]:
if a[... | null | automl_training/missouri_camtraps/finddeer.py | finddeer.py | py | 567 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 17,
"usage_type": "call"
}
] |
304407445 | #!/usr/bin/python
# USAGE:
# ./uuidconverter <file-in> <file-out>
# file-in: a file with 1 username per line
# file-out: a file where name<tab>uuid are written to (appended)
from __future__ import print_function
import sys
import urllib2
import json
import re
from time import sleep
def convert(file_in, file_out)... | null | all-gists/74944770e7647855ac9d/snippet.py | snippet.py | py | 1,799 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "re.compile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "urllib2.Request",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_num... |
148984612 | from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
from models import Flyer, Job
import logging
import urllib
from google.appengine.dist import use_library
use_library('django', '0.96')
... | null | flyer.py | flyer.py | py | 2,963 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "google.appengine.dist.use_library",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "google.appengine.ext.webapp.RequestHandler",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.webapp",
"line_number": 13,
"usage... |
436495334 | #
#
#
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from logging import getLogger
logger = getLogger('DigitalOcean')
try:
logger.warning(
'octodns_digitalocean shimmed. Update your provider class '
'to octodns_digitalocean.DigitalOceanProv... | null | octodns/provider/digitalocean.py | digitalocean.py | py | 881 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "octodns_digitalocean.DigitalOceanProvider",
"line_number": 23,
"usage_type": "name"
}
] |
506420288 | from selenium import webdriver
from bs4 import BeautifulSoup as bs
from urllib.request import urlopen
import time
import os
import re
class NaverCrawling:
def naver_cafe(page, downloadPath):
driver = webdriver.Chrome()
driver.get('https://nid.naver.com/nidlogin.login')
user_id = ''
... | null | crawl/naver.py | naver.py | py | 3,979 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "bs4.Beautiful... |
358713644 | from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic import View
from forecast_server.models import StockToForecast, Forecast
from forecast_server.engine.ForecastModels import SVRModel
from forecast_server.engine.Forecaster import Forecaster
import logging
import pandas as... | null | forecast_server/views.py | views.py | py | 2,159 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "django.views.generic.View",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.FileHandler",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "loggi... |
502694318 | from mongoengine import Document
from mongoengine import StringField,IntField,ListField,DateTimeField,FloatField
class ListedSecurity(Document):
symbol = StringField(max_length=5,required=True)
security_name = StringField(max_length=128,required=True)
class Quote(Document):
symbol = StringField(max_l... | null | models.py | models.py | py | 841 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "mongoengine.Document",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "mongoengine.StringField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "mongoengine.StringField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "mon... |
550756110 | # -*- coding:utf-8 -*-
'''
Created on 2019年2月19日
@author: user
'''
import os, sys, json
import base64
import logging
import requests
from com.scott.dev.util.mysqlpool import MySQLConnPool
import argparse
from importlib import reload
reload(sys)
# sys.setdefaultencoding('utf8')
PY_GEN_PATH = "D:/download/pygen/bit... | null | src/com/scott/dev/demo/customer/yc/recvleads2.py | recvleads2.py | py | 14,706 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "importlib.reload",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.sep",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"l... |
436541157 | import pickle
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as st
from matplotlib import cm
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from mpl_toolkits.mplot3d import Axes3D
import sys, os, time
from matplotlib.offsetbox import AnchoredText
import random
import scipy.... | null | abo-analysis/scripts/avanalysisold.py | avanalysisold.py | py | 141,357 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "os.path.isfile",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_numbe... |
29071365 | from copy import deepcopy
import math
import niconinput
import pygame
from pygame.locals import *
import sys
import threading
SIZE = WIDTH, HEIGHT = 1920, 1080
COLOR_BLACK = (0, 0, 0)
EDGE_COLOR = (0, 255, 0, 0)
EDGE_WIDTH = 3
EDGE_LABEL_OFFSET = 50
CMD_LINE_RENDER_POS = (4, HEIGHT - 24)
gNodes = []
gEdges = []
... | null | nodicon/nodicon.py | nodicon.py | py | 13,346 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "threading.Lock",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 135,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 171,
"usage_type": "call"
},
{
"api_name": "pygame.draw.line",
"line_num... |
641650272 | import subprocess
import tempfile
import uuid
from pathlib import Path
from ascii_telnet.ascii_movie import Movie
from hashlib import md5
current_directory = Path(__file__).parent
node_modules_dir = current_directory.parent / 'node_modules'
package_json = current_directory.parent / 'package.json'
ascii_video_package_... | null | ascii_telnet/movie_maker.py | movie_maker.py | py | 3,065 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tempfile.gettempdir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"li... |
343512834 | import pytest
from sovtokenfees.test.conftest import MintStrategy
from sovtokenfees.test.constants import XFER_PUBLIC_FEES_ALIAS
from sovtokenfees.test.view_change.helper import scenario_txns_during_view_change
@pytest.fixture(
scope='module',
params=[
{XFER_PUBLIC_FEES_ALIAS: 4}, # with fees
... | null | sovtokenfees/sovtokenfees/test/view_change/test_xfer_fees_during_view_change.py | test_xfer_fees_during_view_change.py | py | 866 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pytest.fixture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sovtokenfees.test.constants.XFER_PUBLIC_FEES_ALIAS",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sovtokenfees.test.constants.XFER_PUBLIC_FEES_ALIAS",
"line_number": 13,
... |
21494124 | import datetime, logging, re
from google.appengine.ext import ndb, blobstore
from google.appengine.api import images, files
class UserImage(ndb.Model):
original_size_key = ndb.StringProperty()
serving_size_key = ndb.StringProperty()
original_filename = ndb.StringProperty()
filename = ndb.StringProperty()
date = ... | null | models/userimage.py | userimage.py | py | 2,650 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "google.appengine.ext.ndb.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.ndb",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "google.appengine.ext.ndb.StringProperty",
"line_number": 7,
"usage_type": "cal... |
483803012 | import pytesseract
from PIL import Image
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
count=0
image=Image.open('Googleimage.png')
#image.show()
text=pytesseract.image_to_string(image)
print(text)
for x in text:
count=count+1
print(count)
| null | work.py | work.py | py | 284 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pytesseract.pytesseract",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image.open",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pytesseract.image_... |
232381945 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging.handlers
import math
import time
import self
from PycharmProjects.crawling_modules_v1804.crawlerBot_package_JUST_TEST.NotUsingJSONDATAType import \
facebookCrawlerBot as snsScrapBot
from PycharmProjects.crawling_modules_v1804.crawlerBot_packa... | null | aster_dev_201808/aster879/crawling_modules_v1804/crawlerBot_package_JUST_TEST/call_allFuctions.py | call_allFuctions.py | py | 19,925 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "time.localtime",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "logging.handlers.getLogger",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "logging.hand... |
254046916 | import board
import pandas as pd
import numpy as np
import time
import argparse
from lib.relay import Pump as Fan
from lib.meas_lib_new import parse_args, DHTTemp, Decorators
# from lib.influx.influx_lib import InfluxClient
import adafruit_dht as dht_lib
import board
import RPi.GPIO as GPIO
from lib.cpu_lib import Cool... | null | sol_cpu.py | sol_cpu.py | py | 5,475 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "lib.cpu_lib.CoolingSystem",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "lib.relay.Pump",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
236587109 | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2002-2020 "Neo Technology,"
# Network Engine for Objects in Lund AB [http://neotechnology.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Y... | null | boltstub/__init__.py | __init__.py | py | 5,647 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "socketserver.TCPServer",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "sys.stdout.flush",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "sys.stdout"... |
281236944 | from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, TimeoutException
from itertools... | null | lol_progame_mvp_prediction/match_crawling.py | match_crawling.py | py | 2,239 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "itertools.product",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "seleniu... |
72440518 | from django.shortcuts import render
from phones.models import Phone
def show_catalog(request):
sort = request.GET.get('sort', 'id')
sort_sources = {
'name': 'name',
'lowprice': 'price',
'maxprice': '-price',
'id': 'id',
}
if sort not in sort_sources.keys():
sort... | null | phones/views.py | views.py | py | 783 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "phones.models",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "phones.models.Phone.objects.order_by",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "phones.models.Phone.objects",
"line_number": 17,
"usage_type": "attribute"
},
{
... |
576494769 | from django.shortcuts import render, redirect
import requests
from django.contrib.auth.forms import UserCreationForm
from .forms import TriviaAnswerForm
def home(request):
if 'trivia-obj' in request.session:
tridata = request.session['trivia-obj']
else:
response = requests.get("http://jservice... | null | trivia/views.py | views.py | py | 1,492 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "forms.TriviaAnswerForm",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "forms.TriviaAnswerForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.g... |
432754151 | from flask_login import current_user
from flask import Blueprint, render_template, flash, redirect, url_for, request
from datetime import datetime
from calendar import monthrange
import calendar
from itertools import cycle, chain
from schedule.calendar.models import Dutytype, Dutyevent, Timeinterval, Role
from schedu... | null | schedule/calendar/views.py | views.py | py | 5,979 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.today",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "datetime.da... |
425526168 | from machine import Pin, I2C
import utime
import json
from clock import *
import ustruct as struct
from mqtt import *
class i2c(): #12c class with functions to interface with the sensor
def __init__(self, Pin1, Pin2, frequency):
self.__ic = I2C(scl = Pin(Pin1), sda = Pin(Pin2), freq = frequency)
self.__slave... | null | IoT Sensor/main.py | main.py | py | 2,550 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "machine.I2C",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "machine.Pin",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "utime.sleep_ms",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ustruct.unpack",
"line_num... |
610556548 | # ../gungame/plugins/included/gg_disable_objectives/gg_disable_objectives.py
"""Plugin that disables the map objectives."""
# =============================================================================
# >> IMPORTS
# =============================================================================
# Python
from enum im... | null | addons/source-python/plugins/gungame/plugins/included/gg_disable_objectives/gg_disable_objectives.py | gg_disable_objectives.py | py | 2,886 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "enum.IntEnum",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "filters.entities.EntityIter",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "filters.entities.EntityIter",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "... |
521182115 | from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404,redirect
from .models import Course
from .forms import PostCourse
# Create your views here. FBvs (Crud for Courses)
#this implements CRUD functionality on the courses
... | null | Courses/views.py | views.py | py | 2,064 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "forms.PostCourse",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 16,
"usage_type": "name"
},
{
"api_name... |
6767245 | import abc
import logging
from connexion.operations.secure import SecureOperation
from ..decorators.metrics import UWSGIMetricsCollector
from ..decorators.parameter import parameter_to_arg
from ..decorators.produces import BaseSerializer, Produces
from ..decorators.response import ResponseValidator
from ..decorators.... | null | connexion/operations/abstract.py | abstract.py | py | 15,505 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "decorators.validation.ParameterValidator",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "decorators.validation.RequestBodyValidator",
"line_number": 19,
"usage_type": ... |
123670016 | import datetime
import json
import logging
import re
import StringIO
import cwt
import django
import requests
from django import http
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.contrib.auth import logout
from django.core import serializers
from django.core.mail impor... | null | compute/wps/views.py | views.py | py | 23,648 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "logging.getLogger",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "django.http.JsonResponse",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "django.http",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "django.http.Js... |
481809786 | from BTrees.IIBTree import IITreeSet
from BTrees.IOBTree import IOBTree
from BTrees.OIBTree import OIBTree
from BTrees.OOBTree import OOBTree
from datetime import datetime
from opengever.api.validation import validate_no_unknown_fields
from opengever.api.validation import validate_schema
from opengever.webactions.excep... | null | opengever/webactions/storage.py | storage.py | py | 9,429 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "zope.component.getMultiAdapter",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "opengever.webactions.interfaces.IWebActionsStorage",
"line_number": 46,
"usage_type": "argument"
},
{
"api_name": "zope.component.hooks.getSite",
"line_number": 46,
"... |
28913513 | import json
import logging
import os
import sys
from collections import Counter, defaultdict
import numpy as np
import openpyxl
from sklearn.metrics import cohen_kappa_score
from tuw_nlp.common.eval import print_cat_stats
from tuw_nlp.common.vocabulary import Vocabulary
IGNORE_EMPTY = True
REPLACEMENT_PAIRS = {('BB... | null | brise_plandok/annotation/agreement.py | agreement.py | py | 11,182 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "tu... |
294181533 | import sys
import os
import time
import numpy as np
import theano
import theano.tensor as T
# import lasagne
def load_dataset(n_train=50):
mean_target = [0, 0]
cov_target = [[1, 0], [0, 100]]
X_target = np.random.multivariate_normal(mean_target, cov_target, n_train)
mean_predict = [0, 0]
cov_p... | null | test.py | test.py | py | 2,603 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "numpy.random.multivariate_normal",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.multivariate_normal",
"line_number": 20,
"usage_type": "call"
},
{
... |
320872988 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import sys
from pan... | null | src/python/pants/help/help_printer.py | help_printer.py | py | 6,253 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "pants.option.arg_splitter.VersionHelp",
"line_number": 42,
"usage_type": "argument"
},
{
"api_name": "pants.base.build_environment.pants_version",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pants.option.arg_splitter.OptionsHelp",
"line_number": 4... |
186911660 | import os
from os.path import join as pjoin
import uuid
from io import BytesIO
import pytest
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import TimeoutException
from PIL import Image, ImageChops
from baselayer.app.conf... | null | skyportal/tests/frontend/test_sources.py | test_sources.py | py | 17,694 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "baselayer.app.config.load_config",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytest.mark.flaky",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "s... |
97900605 | #!/usr/bin/python3
""" states list flask """
from flask import Flask, render_template
from models import storage
app = Flask(__name__)
@app.teardown_appcontext
def tear_down(arg):
""" tear down current session"""
storage.close()
@app.route('/hbnb', strict_slashes=False)
def hbnb_filter():
""" for hbnb_p... | null | web_flask/100-hbnb.py | 100-hbnb.py | py | 820 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "models.storage.close",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.storage",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "models.storage.all",
... |
149823346 | import sys
from abc import ABCMeta, abstractmethod
from loguru import logger
logger.remove()
logger.add(
sys.stdout,
format="{message}"
)
class BaseNormalizer(metaclass=ABCMeta):
@abstractmethod
def transform(self, text:str) -> str:
raise NotImplementedError
def __call__(self, text:str, ... | null | nlp_cooking/_normalize/base.py | base.py | py | 645 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "loguru.logger.remove",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "loguru.logger.add",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
... |
267610933 | import poplib,email,hashlib,time
from email.header import decode_header
from email.utils import parsedate,parsedate_tz
from setting import MAIL_SENDER,MAIL_SERVER_ID,MAIL_SERVER_PASSWD
import pic_exif
def connect_mail_server():
mail_con = poplib.POP3_SSL('localhost')
mail_con.user(MAIL_SERVER_ID)
mail_con.pass_(MAI... | null | photo blog with gps info/mail.py | mail.py | py | 2,110 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "poplib.POP3_SSL",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "setting.MAIL_SERVER_ID",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "setting.MAIL_SERVER_PASSWD",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name"... |
628273399 | # -*- coding: UTF-8 -*-
import os
from flask import Blueprint, redirect, url_for
from lite_mms.basemain import data_browser
from lite_mms.permissions.deduction import addDeduction, editDeduction, deleteDeduction
from datetime import datetime
deduction_page = Blueprint("deduction", __name__, static_folder="static",
... | null | lite_mms/portal/deduction/__init__.py | __init__.py | py | 3,812 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "flask.url_for",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "flask.ext.databrowser.Mod... |
288914778 | import json
import pickle
import pandas as pd
import numpy as np
from sklearn.metrics import f1_score, confusion_matrix
from pathlib import Path
import tensorflow as tf
from tensorflow.keras import backend as K
import matplotlib.pyplot as plt
#################### about ####################
# in this file we use cu... | null | medicine/chexnet/_old_chexnet_utils_mass.py | _old_chexnet_utils_mass.py | py | 19,742 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "json.load",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 62,
... |
607210769 | import os
import sys
from flask import Flask, Response
from flask.ext.cors import CORS
from google.protobuf.descriptor_pb2 import FileDescriptorSet
from google.protobuf.json_format import MessageToJson
base_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
path = os.path.join(base_path, 'pb')
sys.... | null | pilgrim3/app.py | app.py | py | 1,402 | python | en | code | null | code-starcoder2 | 83 | [
{
"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.dirname",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_n... |
601535221 | """
Created on 14 Jul 2023
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
import spidev
from scs_core.sys.command import Command
from scs_core.sys.logging import Logging
# --------------------------------------------------------------------------------------------------------------------
class Pro... | null | src/scs_mfr/provision/provision_scs.py | provision_scs.py | py | 4,776 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "scs_core.sys.command.Command",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "scs_core.sys.logging.Logging.getLogger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "scs_core.sys.logging.Logging",
"line_number": 32,
"usage_type": "name... |
597468731 | from agents.UserData.agent import UserData
from config import ETH_ACCOUNT_0 as account
class TestAgentUserDataClass:
def test_naming_agent_class(self):
name = "user1"
user1 = UserData("user1", account, 8001)
assert (name == user1.name)
def test_naming_of_action(self):
name = ... | null | tests/test_agent_userdata_unit.py | test_agent_userdata_unit.py | py | 4,151 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "agents.UserData.agent.UserData",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.ETH_ACCOUNT_0",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "agents.UserData.agent.UserData",
"line_number": 14,
"usage_type": "call"
},
{
... |
534244116 | from datetime import datetime
from google.appengine.api import mail
from google.appengine.ext import db
import cgi
import logging
import webapp2
class CrashReport(db.Model):
created_at = db.DateTimeProperty(auto_now_add = True)
stacktrace = db.TextProperty(required = True)
version = db.StringProperty(required ... | null | choosie-server/collect_crash_handler.py | collect_crash_handler.py | py | 1,830 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "google.appengine.ext.db.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.db",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "google.appengine.ext.db.DateTimeProperty",
"line_number": 11,
"usage_type": "c... |
317912191 | """Wrapper for Open Model Zoo for Anomaly tasks."""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from typing import Union
import numpy as np
from openvino.model_api.models import SegmentationModel
from openvino.model_api.models.types import DictValue, NumericalValue
class Ano... | null | src/otx/algorithms/anomaly/adapters/anomalib/exportable_code/base.py | base.py | py | 1,617 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "openvino.model_api.models.SegmentationModel",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "openvino.model_api.models.types.DictValue",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "openvino.model_api.models.types.NumericalValue",
"line_... |
16695595 | # coding: utf-8
from __future__ import absolute_import
import unittest
from flask import json
from six import BytesIO
from paymentprovider.models.error import Error # noqa: E501
from paymentprovider.models.payment_data import PaymentData # noqa: E501
from paymentprovider.models.payment_request import PaymentReques... | null | paymentprovider/test/test_default_controller.py | test_default_controller.py | py | 2,033 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "paymentprovider.test.BaseTestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "flask.json.dumps",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "flask.json",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "flask.j... |
39986801 | import civis
from collections import OrderedDict
import re
import requests
import warnings
from jsonref import JsonRef
import six
from civis.base import Endpoint, CivisAPIError, tostr_urljoin
from civis.resources._resources import parse_method
from civis._utils import to_camelcase
def auth_service_session(session, ... | null | civis/service_client.py | service_client.py | py | 5,090 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "civis.APIClient",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "civis.base.CivisAPIError",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "six.raise_from",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "civis.base.En... |
189638400 | #!/usr/bin/env python
__author__ = 'pezzotto'
import tf
from tf import transformations
import geometry_msgs.msg
import rospy
import std_msgs.msg
import numpy
parent_frame = "base_link"
child_frame = "torso_"
if __name__ == "__main__":
rospy.init_node("fixed_rotation")
arm_number = rospy.get_param("~tracking... | null | src/arm_mirror/scripts/fixed_rotation.py | fixed_rotation.py | py | 1,508 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "rospy.init_node",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "rospy.get_param",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "rospy.Rate",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tf.TransformListener",
... |
210822138 | # -*- coding: utf-8 -*-
# pylint: skip-file
"""
TestConnection is a fake backend to return some fake value for testing. It will return value in the
same format that OpenstackConnection must do.
TestConnection inherits from OpenstackConnection and overwrite the private methods
- _instances()
- _flavors()
-... | null | openstack_lease_it/lease_it/backend/TestConnection.py | TestConnection.py | py | 5,960 | python | en | code | null | code-starcoder2 | 83 | [
{
"api_name": "lease_it.backend.OpenstackConnection.OpenstackConnection",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "django.core.cache.cache.get",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "django.core.cache.cache",
"line_number": 39,
"usage_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.