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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
452792658 | #!/usr/bin/env python3
import requests
import json
import pickle
import nltk.tokenize.punkt as pkt
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from .actionRequired.train import features
API_URL = "https://westcentralus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment"
API_KEY = "73d51cf24e4d46... | null | app/helper/textAnalyze.py | textAnalyze.py | py | 3,091 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "nltk.tokenize.punkt.PunktLanguageVars",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "nltk.tokenize.punkt",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "nltk.tokenize.punkt.PunktSentenceTokenizer",
"line_number": 26,
"usage_typ... |
588160785 | from typing import List, Tuple
import os
import torch
import random
import preprocessing.token
def toks(dirname: str,
songs: List[Tuple[str, float, List[Tuple[int, int]]]]):
"""
Saves all songs in json format in directory dirname.
"""
if not os.path.exists(dirname):
os.mkdir(dirname)
... | null | util/save.py | save.py | py | 3,274 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13... |
534949292 | import gspread
from oauth2client.service_account import ServiceAccountCredentials
import json
import csv
class GoogleSheetsClient:
def __init__(self, credentials_dict, scopes, spreadsheet_name, tab_name):
self.creds = ServiceAccountCredentials.from_json_keyfile_dict(
credentials_dic... | null | kml_generator/google_sheet_operations.py | google_sheet_operations.py | py | 967 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_dict",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "gspread.Clie... |
213157222 | from fastapi import Depends, Request
from .models import BaseCart, LineItem, SessionId
from .cart_exceptions import CartAlreadyExist, CartNotExist, NotValidUUID
import uuid
from config import get_settings
from .jwt_session import create_session_token, decode_token
from pydantic import UUID4
settings = get_settings()... | null | main_app/apps/cart/cart.py | cart.py | py | 1,512 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "config.get_settings",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "uuid.UUID",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "cart_exceptions.CartNot... |
627672748 | #! /usr/bin/env python
###################################################################################
# Copyright 2015, Pittsburgh Supercomputing Center (PSC). All Rights Reserved. #
# =============================================================================== #
# ... | null | src/tools/map_transfer_matrix.py | map_transfer_matrix.py | py | 20,196 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.path.dirname",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "sys.path.append",
... |
19718568 | '''
Created on Jun 21, 2014
@author: v0idnull
'''
from psistats import stats
from psistats import queue
from sched import QueueInterval
from psistats.sensors import sensors as libsensors
import time
import logging
import logging.config as loggingconfig
import sys
import simplejson as json
from psistats.exceptions impo... | null | psistats/app.py | app.py | py | 4,175 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "psistats.stats.ipaddr",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "psistats.stats",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "psistats.stats.mem",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "psistats.stat... |
407258906 | import numpy as np
from matplotlib import pyplot as plt
import math
from gillespie import gillespie
from gillespieSSA import gillespieSSA
from DSM import deterministic_simulation
from ODE import dimerisation_kinetics_odefun_deterministic
from CLE import CLE
from poisson_approx import poisson_approx
from utils import b... | null | dimeritisation.py | dimeritisation.py | py | 3,487 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "DSM.deterministic_simulation",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "ODE.dimerisation... |
26736779 | import numpy
import time
import logging
from .perm import perm
from .leastsq import leastsq
from .lprint import lprint
# import scipy.stats
# PARTICLES = 100
# LSQ = False
INCREASE = 0.5
ZERO = False
DOTS = 3
MIN_SIZE = 0.0001
STEPS = 8
STOP_STEP = 2
MIN_VAL = -15
MAX_VAL = 15
ERROR_REPR = "{error:.3g}"
R2_REPR = "{r2... | null | mconvert/newtools/fit.py | fit.py | py | 3,436 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "perm.perm",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.all",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.logical_and",
"line_numb... |
124351909 | import requests, random
#API_TOKEN = "api_key=blablabla"
def get_popular_movies():
endpoint = f"https://api.themoviedb.org/3/movie/popular?{API_TOKEN}"
headers = {
"Authorization": f"Bearer {API_TOKEN}"
}
response = requests.get(endpoint, headers=headers)
return response.json()
def get... | null | tmdb_client.py | tmdb_client.py | py | 2,560 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_numb... |
369366963 | #This program will print ununsed EBS volumes and create snapshots for them
import boto3
from connect import aws_access_key_id,aws_secret_access_key,region_name
import json
from botocore.exceptions import ClientError
from pprint import pprint
import datetime
def myconverter(o):
if isinstance(o, datetime.datetime):... | null | Python-Boto3/get_detatched_ebs_volumes-latest.py | get_detatched_ebs_volumes-latest.py | py | 1,870 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "boto3.client",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "connect.aws_access_key_id",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "connect... |
252143238 | import json
import os
import shutil
import unittest
import urllib.parse
from tornado.testing import AsyncHTTPTestCase
from cate.util.misc import encode_url_path
from cate.webapi.main import create_application
NETCDF_TEST_FILE = os.path.join(os.path.dirname(__file__), '..', 'data', 'precip_and_temp.nc')
# For usage... | null | test/webapi/test_main.py | test_main.py | py | 3,661 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tornado.testing.AsyncHTTPTe... |
547711406 | import sqlite3
import requests
import json
dealAPI = '44587204c43f4187a3b2b01f590949494717aa14'
conn = sqlite3.connect('Steam Games.db')
c = conn.cursor()
c.execute("SELECT * FROM Steam_games")
temp = c.fetchall()
tempList1 = []
tempList2 = []
site = "https://api.isthereanydeal.com/v01/game/prices/?key="+dealAPI+"&... | null | Console/Store.py | Store.py | py | 1,670 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
}
] |
190117818 | import xlrd
import sys
import json
CUTTING_DIR = '/h/wcrichto/multcorrs'
CLASSES = [
'master',
'SRS',
'SRS',
'OTS',
'ph',
'SRS',
'moving',
'char',
'moving',
'veh',
'POV',
'reaction',
'action',
'insert',
'cutaway',
'env',
'est',
'montage',
'so... | null | scripts/cutting.py | cutting.py | py | 1,337 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "xlrd.open_workbook",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "json.dumps",
"line_number": 54,
"usage_type": "call"
}
] |
233319123 | # -*- code: utf-8 -*-
'''
连接mysql操作数据库
'''
import pymysql
import traceback
import warnings
warnings.filterwarnings("ignore")
# mysql数据库操作类
class MysqlOperate(object):
def __init__(self, **db_info):
self.host = db_info.get('host')
self.port = db_info.get('port')
self.db = db_info.get('d... | null | lib/utility/mysql_operate.py | mysql_operate.py | py | 4,845 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pymysql.connect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "traceback.print_exc",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "traceback... |
75360029 | # -*- coding: utf-8 -*-
#######################################################################
# Copyright © 2007-2009 Yuri Malheiros.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# the Free Software Foundation; version 2 ... | null | tf/languages/html/triggers/strong.py | strong.py | py | 1,599 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tf.app.app",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "tf.app",
"line_number": 33,
"usage_type": "name"
}
] |
123609242 |
import json
from nbdime import diff
from nbdime.diff_format import to_clean_dicts
def test_diff_to_json():
a = { "foo": [1,2,3], "bar": {"ting": 7, "tang": 123 } }
b = { "foo": [1,3,4], "bar": {"tang": 126, "hello": "world" } }
d1 = diff(a, b)
d2 = to_clean_dicts(d1)
assert len(d2) == len(d1)
... | null | nbdime/tests/test_diff_json_conversion.py | test_diff_json_conversion.py | py | 536 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "nbdime.diff",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "nbdime.diff_format.to_clean_dicts",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.loads",
... |
631556268 | import hashlib
import json
import os
import tempfile
import zipfile
from xml.etree import ElementTree
PLATFORMS = {
'Darwin_x86-gcc3': {
'alias': 'default',
},
'Darwin_x86_64-gcc3': {
'alias': 'default'
},
'Darwin_x86-gcc3-u-i386-x86_64': {
'alias': 'default'
},
'Darwin_... | null | morgoth/xpi.py | xpi.py | py | 3,659 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "zipfile.BadZipfile",
"line_number": 53,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "tempfile.mkdtemp"... |
64322720 | from os import urandom
from slip import keygen
from Crypto.Util import number
import hashlib
def negdh_client(s):
sk, n, M = keygen(512)
P0 = s.recv(8192)
nB = long(P0)
s.send(str(n))
P1Y = s.recv(8192)
yB = long(P1Y.split('X')[0])
p1B = long(P1Y.split('X')[1])
U = n * nB
S = M * U
... | null | slipnet.py | slipnet.py | py | 1,327 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "slip.keygen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "Crypto.Util.number.getRandomRange",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "Crypto.Util.number",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "Crypt... |
107559200 | import yaml
from dotmap import DotMap
from models.singleton import Singleton
class Config(metaclass=Singleton):
instance = None
def __init__(self, config_file_path, loaded=False):
global instance
if loaded:
data = loaded
else:
stream = open(config_file_path, '... | null | app/settings/data_config.py | data_config.py | py | 606 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.singleton.Singleton",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "yaml.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "yaml.FullLoader",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "dotmap.DotMa... |
300336285 | from keras.applications import vgg16
from keras.models import Model, Sequential
from keras.layers import Conv2D, Conv2DTranspose, Input, Cropping2D, add, Dropout, Reshape, Activation
def FCN8_helper(input_shape, classes):
assert input_shape[1] % 32 == 0
assert input_shape[0] % 32 == 0
img_input = Input(... | null | models/FCN_8.py | FCN_8.py | py | 2,394 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "keras.layers.Input",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "keras.applications.vgg16.VGG16",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "keras.applications.vgg16",
"line_number": 13,
"usage_type": "name"
},
{
"api_na... |
307775658 | """ Build index from directory listing
make_index.py </path/to/directory> [--header <header text>]
"""
INDEX_TEMPLATE = r"""
<html>
<body>
<h2>${header}</h2>
<p>
% for name in names:
<li><a href="${name}">${name}</a></li>
% endfor
</p>
</body>
</html>
"""
EXCLUDED = ['index.html']
import os
import argparse
# M... | null | makelisting.py | makelisting.py | py | 813 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
127547208 | import discord
import asyncio # USED TO CATCH TIMEOUT ERRROR RAISED BY discord.Client.wait_for()
import requests
from discord.ext import commands
from collections import defaultdict
# Setup Function
def setup(bot):
bot.add_cog(WordFrequency(bot))
# Cog Class
class WordFrequency(commands.Cog):
# Initalizer
... | null | cogs/word_frequency.py | word_frequency.py | py | 9,203 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 24,
"usage_type": "call"
},
{
"api_na... |
602645822 | import cv2
#read image (1)
gray = cv2.imread('baby1.jpg', 0)
#load Haar cascade file (2)
faceCascade = cv2.CascadeClassifier('haarcascade_frontalface_alt2.xml')
#convert image to grayscale (3)
#gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
#display image in grayscale
cv2.imshow('gray', gray)
#detecting faces in ima... | null | FaceDetections_alt.py | FaceDetections_alt.py | py | 936 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.CASCADE_SCALE_IMAGE",
... |
62276429 | from rest_framework.views import APIView
from rest_framework.response import Response
from posts.models import Post, Comment
from django.contrib.auth import authenticate
from .serialiers import PostSerializer
from PIL import Image
import os
from django.contrib.auth.models import User
import datetime
import json
# Cre... | null | CubeHubRestAPI/posts/views.py | views.py | py | 6,036 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects.get",
"line_number": 22,
"usage_type": "call"
},
{
... |
515326733 | from haystack import indexes
from haystack import site
import gobotany.dkey.models as dkey_models
from gobotany.core.models import Taxon, Family, Genus, GlossaryTerm
from gobotany.search.models import (PlainPage,
GroupsListPage, SubgroupResultsPage,
... | null | gobotany/search/search_indexes.py | search_indexes.py | py | 7,891 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "haystack.indexes.CharField",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "haystack.indexes",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "haystack.indexes.NOT_PROVIDED",
"line_number": 19,
"usage_type": "attribute"
},
{
... |
451595606 | from sklearn.model_selection import learning_curve #加载学习曲线
from sklearn.model_selection import validation_curve #加载验证曲线
from sklearn.model_selection import ShuffleSplit #加载数据处理
from sklearn import datasets #加载数据包
from sklearn.naive_bayes import GaussianNB#加载高斯贝叶斯
from sklearn.svm import LinearSVC #加载支持向量机
... | null | 320180941361-liujingxian/homework11/learning_curve&validation_curve.py | learning_curve&validation_curve.py | py | 2,577 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sklearn.model_selection.ShuffleSplit",
"line_number": 16,
"usage_type": "call"
},
{
"... |
372580036 | from collections import OrderedDict
from datetime import datetime
from tabulate import tabulate
from .._compat import pickle
class ansi:
BLUE = '\033[94m'
GREEN = '\033[32m'
ENDC = '\033[0m'
class PrintLog:
def __init__(self):
self.first_iteration = True
def __call__(self, nn, train_h... | null | nolearn/lasagne/handlers.py | handlers.py | py | 2,793 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.OrderedDict",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tabulate.tabulate",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "_compat.pickle",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "datetime.dat... |
477605623 | #!/usr/bin/env python
import os
import mailbox
import email.utils
from datetime import datetime
from pprint import pprint
import logging as log
#log.basicConfig(level=log.INFO)
def datetimeToQuarter(dt):
m = [
'',
'1', '1', '1',
'2', '2', '2',
'3', '3', '3',
'4', '4', '4',
... | null | eeqjtools/filemail.py | filemail.py | py | 1,745 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "email.utils.utils.parsedate_tz",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "email.utils.utils",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "email.utils",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "ema... |
131023785 | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
# Copyright 2015 and onwards Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/license... | null | nemo_text_processing/text_normalization/en/taggers/date.py | date.py | py | 10,530 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pynini.invert",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pynini.string_file",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "nemo_text_processing.text_normalization.en.utils.get_abs_path",
"line_number": 32,
"usage_type": "call"
... |
125919425 | from CNN_Controller import Controller
from itertools import product
from pathos.pools import ParallelPool
import numpy as np
import copy
def Just_Train(dataset,output_dim,params,discrete_levels,instruction,lr,epoch_limit,random_seed):
max_accuracy = 0
output_params = 0
print ("running the following instr... | null | CNN_archSearch/CNN_CFAS.py | CNN_CFAS.py | py | 5,808 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "CNN_Controller.Controller.Controller",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "CNN_Controller.Controller",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "copy.deepcopy",
"line_number": 79,
"usage_type": "call"
},
{
"api_... |
199123199 | from GameMap import *
from enum import IntEnum
import time
'''
Because we already evaluate the remain space
After sorting, we could decrease the total
number of tree nodes based on evaluation scores
'''
AI_LIMITED_MOVE_NUM = 20
'''Initialize different score with different chess types'''
class CHESS_TY... | null | ChessAI.py | ChessAI.py | py | 23,158 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "enum.IntEnum",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 276,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 281,
"usage_type": "call"
}
] |
175278486 | # load libs
import requests
from wasabi import Printer
import time
# main class to manage the bride
class bridge:
# method to init bridge
def __init__(self, ip):
# add ip to internal slot
self.ip = ip
# method to generate API key
def generate_key(self):
# init the Printer to... | null | protector/bridge_manager.py | bridge_manager.py | py | 1,131 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "wasabi.Printer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 34,
"usage_type": "call"
}
] |
171955187 | import numpy as np
import os
import matplotlib.pyplot as plt
import cv2
from sklearn.decomposition import PCA
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d import proj3d
from imageio import imread
from skimage.transform import resize
from scipy.spatial import distance
from keras.models import load_m... | null | facenet/test.py | test.py | py | 3,331 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "keras.models.load_model",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.std",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.maximum",
"lin... |
335893943 | from typing import Optional, Union
from collections import defaultdict
from necrobot.league import leaguedb
from necrobot.gsheet.makerequest import make_request
from necrobot.gsheet.sheetrange import SheetRange
from necrobot.gsheet.spreadsheets import Spreadsheets
class StandingsSheet(object):
"""
Represents ... | null | necrobot/gsheet/standingssheet.py | standingssheet.py | py | 4,461 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "necrobot.gsheet.spreadsheets.Spreadsheets",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "necrobot.gsheet.makerequest.make_request",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "necrobot.league.leaguedb.get_standings_data_raw",
"line_nu... |
434090289 | """empty message
Revision ID: 7c96393a9a7c
Revises: 3783f0752916
Create Date: 2018-04-16 15:15:24.601401
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7c96393a9a7c'
down_revision = '3783f0752916'
branch_labels = None
depends_on = None
def upgrade():
# ... | null | migrations/versions/7c96393a9a7c_.py | 7c96393a9a7c_.py | py | 1,245 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "alembic.op.create_unique_constraint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.create_unique_constraint",
"line_number": 23,
"usage_type": "call"
},
{
... |
475232753 |
# coding: utf-8
# In[62]:
# Project2(Compuational_Method_in_Finance) Li-Iang Haung
import matplotlib.pyplot as plt
import numpy as np
import random as random
from math import *
from scipy.stats import norm
import time
import scipy.stats as ss #calculate binomial probability
#1.
def bi_var_rho(seed):
np.random.... | null | Project2/Huang_Li-Iang_Project 2.py | Huang_Li-Iang_Project 2.py | py | 10,138 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.random.seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.multivariate_normal",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "... |
376495908 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import xlrd,xlwt,os
def write_config(a):
os.system("> %s.cfg" %a[0])
os.system("echo hostname=%s >> %s.cfg" %(a[2],a[0]))
os.system("echo gateway=%s >> %s.cfg" % (a[3],a[0]))
os.system("echo 'forceifipconfig=%s' >> %s.cfg" %(a[4].replace('\n',';'),a[0]))
... | null | autoconfigmaster/xlswriteconfig.py | xlswriteconfig.py | py | 8,181 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.system",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 9,
"usa... |
41218931 | import cv2
import numpy as np
import dlib
from sklearn.neighbors import KNeighborsClassifier
data = np.load("mood_data.npy")
X = data[:, 1:].astype(int)
y = data[:, 0]
model = KNeighborsClassifier()
model.fit(X, y)
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)
detector = dlib.get_frontal_face_detector()
predictor = dli... | null | ML Bootcamp/mood_detection/.ipynb_checkpoints/face_mood-checkpoint.py | face_mood-checkpoint.py | py | 1,174 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2... |
183212305 | """ Advent Of Code 2015 : 13 """
from itertools import permutations
f = open('input.txt', 'r')
_input = f.read().strip()
f.close()
def main():
def getHappiness(permutation):
happiness = 0
permutation = list(permutation)
permutation.append(permutation[0])
for i in range(len(permut... | null | aoc15/13/solution.py | solution.py | py | 1,753 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "itertools.permutations",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 54,
"usage_type": "call"
}
] |
306165722 | from selenium import webdriver
import requests
from bs4 import BeautifulSoup
import json
import os
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import exp... | null | csdnbot.py | csdnbot.py | py | 5,795 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 83,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_n... |
286074665 | import re
from bs4 import BeautifulSoup
# Map from single-to-three character residue name
resnmap = {
'A': 'ALA', 'C': 'CYS', 'D': 'ASP', 'E': 'GLU', 'F': 'PHE', 'G': 'GLY', 'H': 'HIS',
'I': 'ILE', 'K': 'LYS', 'L': 'LEU', 'M': 'MET', 'N': 'ASN', 'P': 'PRO', 'Q': 'GLN',
'R': 'ARG', 'S': 'SER', ... | null | residuelabels/cgn/convertTable.py | convertTable.py | py | 1,822 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 14,
"usage_type": "call"
}
] |
176214657 | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from bson import ObjectId,DBRef
from framework.data import db
from settings import settings
from core.logic.object import get_package_object_propertys,get_object_info,get_parent_relations_data
from core.platform.rulelogics.where_analysis import get_default_where
from core... | null | platform/script/55e488b4f3aa2f1fac10b7ee.py | 55e488b4f3aa2f1fac10b7ee.py | py | 3,079 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "core.platform.rulelogics.where_analysis.get_default_where",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "core.platform.rulelogics.public_function.replace_current_user",
"l... |
31067430 | import sys
from collections import defaultdict
from itertools import count
import numpy as np
import json
import argparse
import pandas as pd
import time
from numba import jit
from scipy.stats import entropy
from sklearn.cluster import AgglomerativeClustering
from scipy import sparse, io
from sklearn.preprocessing impo... | null | eutweet/src/compare_regions_REDUCE.py | compare_regions_REDUCE.py | py | 9,914 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.log2",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scipy.stats.entropy",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "scipy.stats.entropy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numba.jit",
"l... |
285209254 | from django.shortcuts import render
# Create your views here.
from talent.models import Talent
from authentication.models import User
from talent.serializers import TalentSerializer
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework... | null | backend/talent/views.py | views.py | py | 5,159 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "authentication.models.User.objects.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "authentication.models.User.objects",
"line_number": 23,
"usage_type":... |
383133041 | import os
import re
import math
import json
from nltk.stem.porter import PorterStemmer
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
def load_priming(priming_path):
"""
preprocess priming words and save to file
:param priming_path: path to fox news primes
:return: None
... | null | step1/priming_fox_news.py | priming_fox_news.py | py | 3,995 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.sub",
... |
86412824 | from time import sleep
from selenium import webdriver
class GetLink(object):
def __init__(self, url):
self.url = url
self.driver = webdriver.PhantomJS()
def access_site(self):
self.driver.get(self.url)
def get_link(self):
self.access_site()
result_url = []
... | null | GetLlink/GetLink.py | GetLink.py | py | 1,032 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "selenium.webdriver.PhantomJS",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
}
] |
284366048 | import unittest
import socket
import subprocess
from mock import Mock
import server_python_udp as s
class TestServerUDP(unittest.TestCase):
def test_receiveCommand(self):
print("---Test Receive Command---")
mock_socket = Mock()
mock_address = ('127.1', 3000)
# Valid length matching... | null | test_server_udp.py | test_server_udp.py | py | 1,512 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "mock.Mock",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "server_python_udp.receiveCommand",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sock... |
507622067 | '''
Created on 7 Jun 2016
@author: jjfs85
@note: This script uses the Facebook API to retreive and format all events in a
calendar. The events are then turned into a series of web pages which have
automatic redirections to form a slideshow.
'''
import glob
import os
import time
from facebook import Gra... | null | src/scraper.py | scraper.py | py | 3,767 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "facebook.GraphAPI",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "time.struct_time",
... |
313498398 | from __future__ import division
import time
import setproctitle
import random
import os
import torch
from torch.autograd import Variable
def train(rank, args, create_shared_model, shared_model,
initialize_agent, optimizer, res_queue, end_flag):
""" Training loop for each agent. """
random.seed(ar... | null | train.py | train.py | py | 6,162 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "random.seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "setproctitle.setproctitle",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.cuda.set_device",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.cud... |
358831965 | #!/usr/bin/env python
#--coding:utf-8 --
"""
anoPeaks.py
cLoops2 anoPeaks.py annotate peaks genomic locations as promoters or enhancers.
"""
__date__ = "2023-08-10"
__modified__ = ""
__email__ = "caoyaqiang0410@gmail.com"
#general library
import os
import argparse
from argparse import RawTextHelpFormatter
#3rd libra... | null | scripts/anoPeaks.py | anoPeaks.py | py | 5,173 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "argparse.RawTextHelpFormatter",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "cLoops2.ds.Peak",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": ... |
79603792 | import requests
import re
def montage_event(room, start_time, end_time, date, event_name, email):
json = {
"start_time": start_time,
"end_time": end_time,
"date": reverse_date(date),
"event_name": event_name,
"user_email": email
}
print(room)
print(json)
res... | null | record.py | record.py | py | 2,788 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.post",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 3... |
483822296 | from flask import Flask
from flask import app
from flask import render_template,url_for,flash, redirect,request
from flask_sqlalchemy import SQLAlchemy
from forms import registrationForm, loginForm
import pyrebase
items=["Elton","Jeff","Wacky","Elinah"]
app = Flask(__name__)
app.config['SECRET_KEY']='723110... | null | Main app.py | Main app.py | py | 1,647 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.app",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.app.config",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.app",
"line_numbe... |
612484651 | from selenium import webdriver
from time import *
import unittest
class TestYoudao(unittest.TestCase):
def setUp(self):
driver = self.driver
driver = webdriver.Firefox()
driver.maximize_window()
driver.implicitly_wait(5)
def test_youdao(self):
driver = self.driver
... | null | Test/testproject/test_case/test_youdao.py | test_youdao.py | py | 780 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "uni... |
530222212 | """
--------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2014 Datalanche, 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 with... | null | aiopg8000/mogrify.py | mogrify.py | py | 14,680 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "datetime.time",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "re.compi... |
576573135 | from websocket_server import WebsocketServer
from model import ClassificationModel
import os
import gc
import datetime
import json
import logging
from end2end_process import EndToEndProcessor
# Set Logging
now = datetime.datetime.now().strftime('%Y%m%d_%H%M')
logger = logging.getLogger('server')
hdlr = logging.FileHan... | null | server.py | server.py | py | 3,088 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "loggin... |
255788953 | # coding: utf-8
import json
from chiki.admin import ModelView, formatter_len, formatter_icon
from chiki.admin import formatter_text, formatter_link
from chiki.forms.fields import WangEditorField, KCheckboxField, DragSelectField
from chiki.utils import json_success
from datetime import datetime
from wtforms.fields impor... | null | chiki/contrib/common/admin.py | admin.py | py | 12,160 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "chiki.admin.ModelView",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "chiki.admin.formatter_len",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "wtforms.fields.TextAreaField",
"line_number": 24,
"usage_type": "name"
},
{
"api_... |
414571666 | #!/usr/bin/env python3
"""A python script to perform watermark embedding/detection
on the basis of singular value decomposition (SVD) and cepstrum method."""
# Copyright (C) 2020 by Akira TAMAMORI
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public... | null | AudioWatermark/svd_cepstrum_method.py | svd_cepstrum_method.py | py | 9,722 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.unwrap",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.round",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 58... |
651409171 | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import argparse
import torch
import poptorch
from train import train, convert_to_ipu_model
from validate import validate_checkpoints
import os
import logging
from train import create_model_opts, get_optimizer, get_lr_scheduler
import sys
sys.path.append('..')
imp... | null | applications/pytorch/cnns/train/restore.py | restore.py | py | 2,326 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.load",
... |
29259364 | from torch.utils.data import DataLoader, Dataset
import torch
import os
import numpy as np
import cv2
import pickle
from torch.optim.lr_scheduler import _LRScheduler
class WarmUp(_LRScheduler):
def __init__(self, optimizer, warmup_step, last_epoch=-1):
self.warmup_step = warmup_step
super(WarmUp, s... | null | hw3/src/util.py | util.py | py | 3,130 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.optim.lr_scheduler._LRScheduler",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.Dataset",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "torch.LongTensor",
"line_number": 24,
"usage_type": "call"
},
{
"ap... |
276369490 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 11:09:24 2020
@author: wardat
"""
import numpy as np
import pandas as pd
import tensorflow as tf
from sklearn.preprocessing import OneHotEncoder
from keras import Sequential
from keras.layers import Dense, Activation
from sklearn.model_selection... | null | Benchmark/StackOverflow/58609115/Correct Code/untitled27.py | untitled27.py | py | 2,205 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.OneHotEncoder",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "... |
201335967 | # -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2020 limkokhole@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation ... | null | pinterest-downloader.py | pinterest-downloader.py | py | 61,176 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "platform.system",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "colorama.init",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "colorama.Fore.LIGHTGREEN_EX",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "colora... |
495466992 | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
import re
import logging
import socket
import smtplib
import DNS
import threading
class myThread (threading.Thread):
def __init__(self, email, hosts, valid_emails):
threading.Thread.__init__(self)
... | null | Corporate_Email/me/Optimized_Alternative_For_Email_Fetching.py | Optimized_Alternative_For_Email_Fetching.py | py | 7,216 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": ... |
570162544 | #!/usr/bin/env python
import boto3
if __name__ == '__main__':
iam = boto3.resource('iam')
group = iam.Group('Administrators')
for user in group.users.all():
for access_key in user.access_keys.all():
access_key.delete()
print('Access keys cleared')
| null | images/ci-key-clear/delete_aws_admin_access_keys.py | delete_aws_admin_access_keys.py | py | 287 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "boto3.resource",
"line_number": 7,
"usage_type": "call"
}
] |
580275753 | #!/usr/bin/python
CONF_FILE = 'occ.yaml'
MAX_CONN = 30
ENCODING = 'ISO-8859-1'
AURL = 'http://forum.oneclickchicks.com/attachment.php?attachmentid='
cj = None
def initialize():
global USERNAME, PASSWORD, IMAGES_DIR, TURL, TPURL
import os
home_conf_file = os.path.expanduser('~/' + CONF_FILE);
conf_file... | null | occ.py | occ.py | py | 3,216 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.expanduser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
90952988 | # coding=utf-8
from annoying.decorators import ajax_request
from django.views.decorators.csrf import csrf_exempt
from apps.adjuster.models import Adjuster
__author__ = 'alexy'
@ajax_request
@csrf_exempt
def adjuster_map(request):
user = request.user
adjuster_list = []
if user.type == 1:
qs = Adju... | null | apps/adjuster/ajax.py | ajax.py | py | 1,198 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "apps.adjuster.models.Adjuster.objects.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "apps.adjuster.models.Adjuster.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "apps.adjuster.models.Adjuster",
"line_number": 15,
"... |
377210659 | import sys, tweepy, time, json, time
from pymongo.errors import DuplicateKeyError
from pymongo import MongoClient
import threading
from queue import Queue
from collections import OrderedDict
import logging
logging.basicConfig(filename = 'crawler.log', filemode='w',level = logging.INFO, format = "%(levelname)s [%(threa... | null | tweets_crawler.py | tweets_crawler.py | py | 4,002 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.OrderedD... |
242732121 | #!/usr/bin/env python
############################################################################
#Author: Anthony Schluchin
#Date:9/21/18
# Main ETHERNET Module to Send and Recieve UDP DATAGRAMS to MICROZED
#
#This module uses a fixed IP address and port number that must match the
#IP address of the MICROZED. This mo... | null | Python/Python_3.5/GUI/gui_graphics.py | gui_graphics.py | py | 17,343 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "threading.Lock",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "tkinter.FALSE",
"l... |
485805952 | import datetime
import socket
import threading
from tkinter import *
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import messagebox
class Win(threading.Thread):
def __init__(self, name, ip):
super().__init__()
self.name = name # 昵称
self.ip = ip
self.port ... | null | sys_client/lib/personal.py | personal.py | py | 4,353 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "threading.Thread",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tkinter.scrolledtext.ScrolledText",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "tkinter.scrolledtext",
"line_number": 41,
"usage_type": "name"
},
{
"api_... |
142499420 | # uncompyle6 version 3.7.4
# Python bytecode 3.2 (3180)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: C:\Python32\lib\site-packages\Ferra\__init__.py
# Compiled at: 2012-10-03 11:22:38
import pyglet
from pyglet import media
from pyglet import image
from .errors im... | null | pycfiles/Ferra-0.1.0.tar/__init__.cpython-32.py | __init__.cpython-32.py | py | 1,799 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pyglet.window",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "pyglet.gl.glClearColor",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pyglet.gl",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "pyglet.windo... |
617527024 | # Need to install exif module "pip install exif"
from exif import Image
folder_path = 'sample_images'
img_filename = 'image_1.jpg'
img_path = f'{folder_path}/{img_filename}'
with open(img_path, 'rb') as img_file:
img = Image(img_file)
print(img.has_exif) | null | ExportPhotoMeta - 2022-12-29T154730.104871Z.py | ExportPhotoMeta - 2022-12-29T154730.104871Z.py | py | 265 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "exif.Image",
"line_number": 9,
"usage_type": "call"
}
] |
126904962 | """
Module stock_util manipulates Stock DynamoDB table.
"""
import json
import decimal
import boto3
import arrow
from botocore.exceptions import ClientError
# from yahoo_finance import bs4_scrapper # Local Testing
from lib.yahoo_finance import bs4_scrapper # AWS Lambda
DYNAMODB = boto3.resource("dynamodb")
c... | null | src/lib/stock_util.py | stock_util.py | py | 2,917 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "boto3.resource",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.JSONEncoder",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "decimal.Decimal",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "lib.yahoo_f... |
260127354 | import unittest
import json
from unittest.mock import patch, MagicMock
from lmctl.client.api import BehaviourScenariosAPI
from lmctl.client.client_request import TNCOClientRequest
class TestBehaviourScenariosAPI(unittest.TestCase):
def setUp(self):
self.mock_client = MagicMock()
self.behaviour_sce... | null | tests/unit/client/api/test_behaviour_scenarios.py | test_behaviour_scenarios.py | py | 2,498 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "unittest.mock.MagicMock",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "lmctl.client.api.BehaviourScenariosAPI",
"line_number": 11,
"usage_type": "call"
},
{
... |
452806988 | import pandas as pd
import requests
import json
from pandas.io.json import json_normalize
from uri_to_url import uri_to_url
def most_used_bar(uri, instance, display_id, title, role, count):
"""
Uses a sparql query to obtain information about the most used parts and format the data in such a way
that a grap... | null | most_used_bar.py | most_used_bar.py | py | 6,371 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "uri_to_url.uri_to_url",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "pandas.io.json.json_no... |
30139783 | # -*- coding: utf-8 -*-
import numpy as np
from scipy.stats import f
from p2ast import *
def ftest(x, y) : # F検定を行って,等分散かどうかを判定する(p>.05なら等分散)
dfx = len(x) - 1
dfy = len(y) - 1
varx = np.var(x) # 2つのデータの分散
vary = np.var(y)
if varx > vary : # F値=分散比を計算(大きい方を小さい方で必ず割る)
f_value = varx / vary
els... | null | ftest/ftest.py | ftest.py | py | 1,992 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.var",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.var",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scipy.stats.f.cdf",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "scipy.stats.f",
"line_numbe... |
537559626 | # -*- coding: utf-8 -*-
from baseaction import BaseAction
import datetime
import pprint
import re
class Debug(BaseAction):
""" debug アクション
"""
def do_rawprint(self, global_env, scenario, **params):
self._write(global_env, scenario, params)
def do_debug(self, global_env, scenario, **params):
self.do_... | null | zaffy/actions/debug.py | debug.py | py | 1,609 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "baseaction.BaseAction",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "ppr... |
483666949 | import argparse
import logging
import shutil
import sys
from pathlib import Path
from .assets import AssetStore
from .constants import DEFAULT_COMPRESSION_LEVEL, EXTRACTED_DIR, OVERRIDES_DIR
from .exc import MissingAsset
from .patcher import Patcher
DEFAULT_MODS_DIR = "Mods"
def main():
parser = argparse.Argume... | null | src/modlunky2/assets/packer.py | packer.py | py | 2,720 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "constants.DEFAULT_COMPRESSION_LEVEL",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "argparse.FileType",
"line_number": 41,
"usage_type": "call"
},
{
"api... |
271322669 | # encoding: utf-8
from __future__ import unicode_literals
import mock
import json
from django.test import TestCase, Client
from django.core.urlresolvers import reverse_lazy
from django.utils import timezone
from cmdb.models import PrePackage
from cmdb.tests import KylinTestCase
class RecievePkgTest(TestCase):
... | null | autopkg/tests.py | tests.py | py | 3,821 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.test.TestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.utils.timezone.now",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.utils.timezone",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "... |
553755691 | import os
import csv
import logging
from utils import run, which, write_json
fido = which("fido.py")
def identify(fondz_dir):
"""
Will run identification over the source bags, and write out the
format report to the js/formats.json file in the fondz directory.
"""
results = []
src_dir = os.pa... | null | fondz/identify.py | identify.py | py | 1,542 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "utils.which",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": ... |
408784729 | """Endpoint to redirect the user to Auth0 flow"""
from bottle import request, response, redirect
from .app import app, auth0, AUTH0_DOMAIN, APP_URL
@app.get("/api/auth")
def login():
"""Redirects user to Auth0 login/signup"""
params = dict(request.query.decode()) # pylint: disable=no-member
mode = para... | null | api/auth.py | auth.py | py | 618 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bottle.request.query.decode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bottle.request.query",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "bottle.request",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "... |
37048933 | from flask import Flask, request, render_template
import datetime
app = Flask(__name__)
@app.route('/')
def index():
date = datetime.datetime.now()
time = str(date.hour) + ":" + str(date.minute) + ":" + str(date.second)
latin = 'Lorem ipsum dolor sit amet'
data = {'paragraph': latin,
'midterm_project': 'M... | null | Final Practice/FlaskApps/Flask1_Midterm/views.py | views.py | py | 516 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "flask.render_te... |
281875571 | from attr import attrs, attrib, Factory
from .adm import ADM
from .elements import AudioProgramme, AudioContent, AudioObject
from .elements import TypeDefinition, FormatDefinition
from .elements import AudioChannelFormat, AudioPackFormat, AudioTrackFormat, AudioTrackUID, AudioStreamFormat
DEFAULT = object()
@attrs
c... | null | ear/fileio/adm/builder.py | builder.py | py | 9,940 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "attr.attrib",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "attr.Factory",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "adm.ADM",
"line_number": 27,
"usage_type": "argument"
},
{
"api_name": "attr.attrib",
"line_number":... |
352889614 | from utilities.dirs import DataDirs,get_nc_files_in_dir
from imos_hfradar.qc import HfradarQc
from urllib.request import urlopen,urlretrieve
from html.parser import HTMLParser
import netCDF4
import numpy as np
import numpy.ma as ma
import datetime
import os
import shutil
import json
class OpendapDownloader:
def __... | null | imos_hfradar/dl.py | dl.py | py | 8,710 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.strftime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "imos_hfradar.qc.HfradarQc.read_from_netcdf",
"line_number": 33,
"usage_type": "call"
... |
532435756 | import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import os
from ecgPeakFinder import detect_peaks
from decimal import Decimal
from FeatureTools.TemporalDomain.smooth import smooth
from FeatureTools.StatisticalTools.ClusteringTools import find_centers
fs = 100
ecg1 = np.loadtxt("ECG_SIGNALS2/ecg... | null | TestClustering.py | TestClustering.py | py | 2,233 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.loadtxt",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot... |
360859681 | import datetime
from django.test import tag
from bio_diversity.test import BioFactoryFloor
from bio_diversity import models, utils
from shared_models.test.common_tests import CommonTest
from random import randint
@tag("Grp", "Move", "Utils")
class TestGrpMove(CommonTest):
fixtures = ["initial_data.json"]
de... | null | bio_diversity/test/test_utils.py | test_utils.py | py | 8,120 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "shared_models.test.common_tests.CommonTest",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "bio_diversity.test.BioFactoryFloor.GrpFactory",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "bio_diversity.test.BioFactoryFloor",
"line_number": ... |
322374604 | from django.conf.urls import patterns, include, url
from django.contrib import admin
from board.views import *
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'simpleboard.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'... | null | simpleboard/urls.py | urls.py | py | 937 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 11,
"usage_type": "call"
},
{
"api_name":... |
640764909 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 30 10:02:48 2019
@author: Wenyang Lyu and Shibabrat Naik
Script to compute unstable periodic orbits at specified energies for the saddlenode quartic
Hamiltonian using differential correction
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate im... | null | depth_flatness/data_diffcorr_mu0.1_omega1_deltaE0.2/run_diffcorr_POfam_saddlenode.py | run_diffcorr_POfam_saddlenode.py | py | 15,362 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "numpy.sqrt",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.sq... |
494107160 | # Import libraries
import netCDF4 as nc4
import datetime as dt
import numpy as np
from netCDF4 import Dataset
execfile('date_str.py')
# gpcc monitoring (1983 to 2019)
# inputdir = '/gws/nopw/j04/ncas_climate_vol2/users/myoung02/datasets/GPCC/monitoring_v6/'
def grab_gpcc_monitoring_region_month(lonlim,latlim,month,ye... | null | grab_gpcc.py | grab_gpcc.py | py | 2,271 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "netCDF4.Dataset",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_numbe... |
498260188 | import os
import pickle
import numpy as np
import librosa
# from ezdtw import dtw
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import soundfile as sf
import librosa.display
from pyvad import vad,trim
import os
from glob import glob
import shutil
from utils import *
from scipy.spatial.distanc... | null | dtw_one_pair_preprocessing.py | dtw_one_pair_preprocessing.py | py | 11,740 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.path.split",
"line_nu... |
625707084 | import collections
N = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
d = c.most_common()
print(c)
print(d)
sum_l = [0] * len(d)
counter = [0] * len(d)
for i in reversed(range(len(d))):
if i == len(d)-1:
counter[i] = d[i][1]
else:
counter[i] = d[i][1] + counter[i+1]... | null | 206/206_C.py | 206_C.py | py | 495 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.Counter",
"line_number": 4,
"usage_type": "call"
}
] |
559394556 | import streamlit as st
from datetime import datetime
from style import change_background
#Print date and time
date_now = datetime.now()
dt_string = date_now.strftime("%d/%m/%Y %H:%M:%S")
st.markdown(dt_string)
#Title
st.title('Hal İçin Checklist')
#Create counter and checkbox counter if not already created.
if "cou... | null | HalProject.py | HalProject.py | py | 3,718 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "streamlit.markdown",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "streamlit.tit... |
446246237 | #!/usr/bin/env python3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | null | Modbus2mqtt/modbus2mqtt.py | modbus2mqtt.py | py | 3,826 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "library.configfile.configfile",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "configobj.ConfigObj",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "library.loghandler.loghandler",
"line_number": 60,
"usage_type": "call"
},
{
"a... |
3854908 | # -*- coding: utf-8 -*-
from settings import schema_catalog, workdir
import re, os.path, sys, traceback
from .catalog import Catalog
from lxml import etree
from functools import partial
import hashlib
def get_short_description(doc):
result = re.search("^[\ \t]*([^\n]+)", doc, re.MULTILINE)
return result.group(... | null | lib/python2.7/validator/__init__.py | __init__.py | py | 12,374 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.search",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.MULTILINE",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "catalog.Catalog",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "traceback.format_exc",
... |
17486592 | #!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
# @Time : 2017/11/14 15:45
# @Author : HoxHou
# @File : mysql_engine.py
# @Software: PyCharm Community Edition
import re
import pymysql
from config.config_handler import conf
class MySQLEngine(object):
def __init__(self, db_table):
"""
... | null | common_utils/db_handler/mysql_engine.py | mysql_engine.py | py | 10,537 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "config.config_handler.conf.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "config.config_handler.conf",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "config.config_handler.conf.get",
"line_number": 27,
"usage_type": "call"
},
... |
113135446 | from mechanize import Browser
from gourmet.agents import get_agents
from cookielib import LWPCookieJar
from random import choice as toggle
import re
class AnonBrowser(Browser):
"""Anonymous Browser Wrapper."""
def __init__(self, proxies=None):
Browser.__init__(self)
self.set_handle_robots(... | null | gourmet/browser.py | browser.py | py | 1,055 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "mechanize.Browser",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "mechanize.Browser.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "mechanize.Browser",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "gourme... |
431481378 | import pytest
from grandchallenge.algorithms.models import (
Algorithm,
AlgorithmPermissionRequest,
)
from grandchallenge.components.models import ComponentInterface
from tests.algorithms_tests.factories import (
AlgorithmFactory,
AlgorithmPermissionRequestFactory,
)
from tests.algorithms_tests.utils i... | null | app/tests/algorithms_tests/test_forms.py | test_forms.py | py | 9,473 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tests.algorithms_tests.factories.AlgorithmFactory",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tests.factories.UserFactory",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "tests.factories.UserFactory",
"line_number": 26,
"usage_typ... |
360057676 | # -*- coding: utf-8 -*-
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
def authorization_form(request):
authform = AuthenticationForm()
next_url = reverse('show_cabinet')
# if '/cabinet/' in next_url:
# next_url = '/'
return {
'auth... | null | apps/utils/context_processors.py | context_processors.py | py | 371 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.auth.forms.AuthenticationForm",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.core.urlresolvers.reverse",
"line_number": 8,
"usage_type": "call"
}
] |
171525415 | import os
import numpy as np
from sklearn.preprocessing import normalize
from sklearn.model_selection import GridSearchCV
from sklearn.linear_model import LassoCV
from sklearn.linear_model import ElasticNetCV
from sklearn.model_selection import cross_val_score
from sklearn.ensemble import RandomForestClassifier
from ... | null | all_linear_models_katherine.py | all_linear_models_katherine.py | py | 11,631 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sklearn.exceptions.ConvergenceWarning",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "numpy.logspace",
"line_number": 78,
"usage_type": "call"
},
{
"api_... |
528215594 | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from . import models
class QuestaoForm(forms.ModelForm):
resposta_correta = forms.CharField(
max_length=100,
label='Resposta correta',
)
resposta_f1 = forms.CharField(
max_le... | null | enadum/apps/enadum_prof/forms.py | forms.py | py | 1,473 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.f... |
111028118 |
from mrjob.job import MRJob
from mrjob.compat import jobconf_from_env
from mrjob.step import MRStep
import re
import heapq
import codecs
import lxml.html as LH
import bz2
import magic
import mwparserfromhell
import math
import random
from collections import defaultdict
import time
class MRMostUsedWord(MRJob):
# L... | null | datacourse/mapreduce/miniprojects/mr_solution_q6.py | mr_solution_q6.py | py | 3,640 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "mrjob.job.MRJob",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "mrjob.step.MRStep",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "mrjob.step.MRStep",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "mrjob.step.MRStep... |
230840327 |
from logging import basicConfig, getLogger, INFO
from connect_to_ledger import create_qldb_driver
from amazon.ion.simpleion import dumps, loads
logger = getLogger(__name__)
basicConfig(level=INFO)
import datetime
from constants import Constants
from sampledata.sample_data import convert_object_to_ion, get_value_from_... | null | lambda/qldb/import_customs_approval.py | import_customs_approval.py | py | 4,625 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "sampledata.sample_dat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.