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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
66357907 | import json
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
learning_rate = 0.003
training_epochs = 100000
batch_size = 10
n_size = 3
last_index = 0
dismiss_value = 0.4
dismiss_percent = 0.05
n_hidden_units = 128
train_data = []
with open("../proval/train_aliyun.txt", "r") as file:
all... | null | Tagx00.MachineLearning/data/train/train_rnn_with_updated.py | train_rnn_with_updated.py | py | 9,714 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.math.floor",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "numpy.math",
"line_number"... |
308289346 | import torch
import torch.nn as nn
import argparse
import os
import json
import shutil
import numpy as np
from model import *
from dataset import ASVspoof2019, LibriGenuine
from torch.utils.data import DataLoader
from evaluate_tDCF_asvspoof19 import compute_eer_and_tdcf
from loss import *
from collections import defaul... | null | train.py | train.py | py | 25,212 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.set_default_tensor_type",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.FloatTensor",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_... |
91099610 | import pandas as pandu
import numpy as numpu
import matplotlib.pyplot as plt
def sigmoid(x):
res = 1/(1+numpu.exp(-1*x))
return res
def plot_decision_boundary(x_matrix, y_matrix, theta):
plt.xlabel('x1')
plt.ylabel('x2')
plt.scatter(x_matrix[:, 1], x_matrix[:, 2], c=y_matrix, marker='o', cmap='v... | null | logisticMain.py | logisticMain.py | py | 2,327 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.exp",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.xlabel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
277048772 | """OSMesa-specific features
To request an OSMesa context, you need to run your script with:
PYOPENGL_PLATFORM=osmesa
defined in your shell/execution environment.
"""
import ctypes, ctypes.util
from OpenGL.platform import baseplatform, ctypesloader
from OpenGL.constant import Constant
class OSMesaPla... | null | particles/OpenGL/platform/osmesa.py | osmesa.py | py | 6,855 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "OpenGL.platform.baseplatform.BasePlatform",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "OpenGL.platform.baseplatform",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "OpenGL.platform",
"line_number": 16,
"usage_type": "name"
}... |
300526286 | #!/usr/bin/env python3.7
"""005_Dictionaries_kv_pairs.py.
Fifth Program of the Corey Schafer Python Series.
"""
import logging
import os
from platform import python_version
from sys import hexversion
from datetime import datetime as dt
import random
EMAIL_ADDRESS = os.environ.get('EMAIL_ADDRESS')
EMAIL_PASSWORD = o... | null | 005_Dictionaries_kv_pairs.py | 005_Dictionaries_kv_pairs.py | py | 2,843 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
85033758 | from __future__ import absolute_import
from collections import namedtuple, defaultdict
from raw_tiles.index.util import deassoc
Route = namedtuple('Route', 'id tags')
class RouteIndex(object):
"""
Indexes the way members of type=route relations, allowing very fast lookup
of the routes for a given way ID... | null | raw_tiles/index/routes.py | routes.py | py | 1,609 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.namedtuple",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "raw_tiles.index.util.deassoc",
"line_number": 35,
"usage_type": "call"
}
] |
136381708 |
from sklearn.metrics import accuracy_score
import pickle
from sklearn.metrics import f1_score, make_scorer
from sklearn.model_selection import KFold, GridSearchCV
from BlackModels.common import *
from sklearn.neural_network import MLPClassifier
def f1_score_revised(y_true, y_pred):
'''
set the average parame... | null | BlackModels/NN.py | NN.py | py | 1,768 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.metrics.f1_score",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.make_scorer",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.KFold",
"line_number": 41,
"usage_type": "call"
},
{
... |
307866066 | #!/usr/bin/env python
#!encoding=utf8
"""
================================
Recognizing hand-written digits
================================
An example showing how the scikit-learn can be used to recognize images of
hand-written digits.
This example is commented in the
:ref:`tutorial section of the user manual <intro... | null | python/practice/scikit-learn/Classification/plot_digits_classification.py | plot_digits_classification.py | py | 1,837 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.datasets.load_digits",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplot",
"line_number": 27,
"usage_type": "call"
},
{
"api_name"... |
37548415 | import click
from hsds_tools import Load
@click.command()
@click.argument('h5_file', type=click.Path(exists=True))
@click.argument('config_file', type=click.Path(exists=True))
@click.argument('dset_name', type=str)
@click.option('--log_file', '-log', default=None, type=click.Path(),
help='Path to file t... | null | load_nsrdb/peregrine_load_nsrdb.py | peregrine_load_nsrdb.py | py | 543 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "hsds_tools.Load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "click.command",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "click.argument",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "click.Path",
"line_num... |
7603950 | # Copyright 2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | null | f5/bigip/sys/folder.py | folder.py | py | 3,550 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "f5.bigip.resource.Collection",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "f5.bigip.resource.Resource",
"line_number": 28,
"usage_type": "name"
}
] |
245698499 |
import traceback
from bson.objectid import ObjectId
from project.infrastructure.constants.mongo_collections import Collections
from project.infrastructure.data_layer.data_access_adapter import MongoDataLayer
from project.domain.person.repository.billing_data import BillingData
from project.domain.person.valitations... | null | demo/person/project/domain/person/business_rules/manage_billing_data.py | manage_billing_data.py | py | 4,570 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "project.infrastructure.monitoring_layer.aplication_general_log.Log",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "project.infrastructure.data_layer.data_access_adapter.MongoDataLayer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "project.i... |
580137212 | import bpy
from bpy.props import *
from ... base_types.node import AnimationNode
class IntersectLineLineNode(bpy.types.Node, AnimationNode):
bl_idname = "an_IntersectLineLineNode"
bl_label = "Intersect Line Line"
def create(self):
self.width = 160
self.inputs.new("an_VectorSocket",... | null | nodes/geometry/intersect_line_line.py | intersect_line_line.py | py | 1,160 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bpy.types",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "base_types.node.AnimationNode",
"line_number": 5,
"usage_type": "name"
}
] |
585864709 | import BookEnv
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import csv
import Hyperparameters as param
#references
#https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0
#https://medium.freecodecamp.... | null | DQN_LinearModel.py | DQN_LinearModel.py | py | 3,447 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Hyperparameters.EPS",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "Hyperparameters.DAYS",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_nam... |
642651043 | # 加上时间特征之后数据的格式发生变化 Appliances不是第一列了 ???可能会产生问题 已解决
import numpy as np
import pandas as pd
from csv import reader
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import RandomForestClassifier
import... | null | 1、预答辩/RECS/特征重要性/recs-predict.py | recs-predict.py | py | 3,630 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "csv.reader",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble.RandomForestRegressor",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "nu... |
123887799 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | null | project_sale/sale.py | sale.py | py | 7,144 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "osv.osv.osv",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "osv.osv",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "osv.fields.many2one",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "osv.fields",
"line_n... |
538692370 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 28 15:58:32 2018
@author: torbensell
"""
"""
This is an Image Denoising Example as found in [Morzfeld, Tong, Marzouk 2019].
"""
import copy
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import seabo... | null | fully_localised/ID_scenario.py | ID_scenario.py | py | 9,135 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random.normal",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line... |
441167512 | import torch.nn as nn
import torch.nn.functional as F
import math
class MultiHeadAttention(nn.Module):
def __init__(self, num_heads, dim, dropout=0.0):
super(MultiHeadAttention, self).__init__()
self.num_heads = num_heads
self.dim = dim
assert dim % num_heads == 0
self.att... | null | modules/transformer/multi_head_attention.py | multi_head_attention.py | py | 3,251 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Dropout",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_num... |
37826786 | from experimentation.hmm import hmm
from pathlib import Path
import json
RESULT_PATH = 'result/'
EXP_PATH = RESULT_PATH + 'experimentation/hmm_175/'
MODEL_PATH = EXP_PATH + 'model_hmm.pkl'
DATASET_PATH = RESULT_PATH + 'trap_gate.csv'
MODE = ''
#MAX_TEST_LENGTH = 350228
#MAX_TEST_LENGTH = 10000
MAX_TEST_LENGTH = 175114... | null | experimentation/trap/experimentation_hmm.py | experimentation_hmm.py | py | 1,706 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "experimentation.hmm.hmm.prepare_dataset_rapresentation",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "experimentation.hmm.hmm",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
}... |
519012054 | import numpy as np
import math as m
import random as rnd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import animation
def zerolistmaker(n):
return [0]*n
def randlistmaker(n,upper,lower):
a = rnd.uniform(upper,lower)
return [a]*n
def noise(length, ... | null | RK4/integration_functions.py | integration_functions.py | py | 2,299 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "random.uniform",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
20643151 | # -*- coding: utf-8 -*-
import os
import sys
import struct
import py_compile
import imp # TODO #1: exchange imp to importlib
import marshal
from datetime import datetime
from ctypes import *
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad
from Crypt... | null | core/aimmake.py | aimmake.py | py | 8,978 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Crypto.Cipher.AES.block_size",
"line_number": 58,
"usage_type": "attribute"
},
{
"api_name": "Crypto.Cipher.AES",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "Crypto.Random.get_random_bytes",
"line_number": 73,
"usage_type": "call"
},
{
... |
52961955 | import sys
from PyQt5 import QtCore, QtGui, QtWidgets,QMainWindow
import webbrowser
from PyQt5.QtWidgets import QAction
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(Ma... | null | MainWin.py | MainWin.py | py | 5,761 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QMenuBar",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PyQt... |
199797710 | from django.conf import settings
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from annoying.decorators import render_to
from account.decorators import login_required
from random import choice, shuffle
import logging
log = logging.getLogger('gallery.' + __name__)
@render_t... | null | app/views.py | views.py | py | 1,261 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "account.decorators",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "account.decorators",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "account.decora... |
49507816 | # -*- coding: utf-8 -*-
"""Examples with subparsers"""
import argparse
import pprint
def subcommand1(args):
print('Subcommand 1 executed.')
def subcommand2(args):
print('Subcommand 2 executed.')
def parse_args():
parser = argparse.ArgumentParser(usage=
"""py argparse-example-1.py -z hello -f meh -b H... | null | argparse/argparse-subparsers.py | argparse-subparsers.py | py | 1,264 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
}
] |
506380212 | from django.db import models
from taggit.managers import TaggableManager
from service_catalog.models import Instance
class Resource(models.Model):
name = models.CharField(max_length=100,
blank=False,
unique=True)
resource_group = models.ForeignKey('Reso... | null | resource_tracker/models/resource.py | resource.py | py | 1,603 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.models.Model",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
544670211 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""":Mod: test_file_hash
:Synopsis:
:Author:
servilla
:Created:
8/14/15
"""
__author__ = 'servilla'
from tests import config
import logging
logger = logging.getLogger('tests.test_file_hash')
logger.setLevel(logging.DEBUG)
import unittest
from d1_actions.fi... | null | src/tests/test_file_hash.py | test_file_hash.py | py | 1,133 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "tests.con... |
287062620 | import syntax
import utils
import logic
from logic import Trace, Diagram, Solver
from syntax import Expr
from utils import Set
from updr import RelaxedTrace
from trace import bmc_trace
import itertools
import networkx # type: ignore
from typing import List, Callable, Union, Dict, TypeVar, Tuple, Optional, cast, Mappi... | null | src/relaxed_traces.py | relaxed_traces.py | py | 19,899 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.TypeVar",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "syntax.Program",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "syntax.Decl",
"lin... |
149474275 | from flask import Blueprint, request, current_app
from flask_jwt_extended import create_access_token, create_refresh_token, jwt_required, get_jwt_identity
from datetime import timedelta
from http import HTTPStatus
from sqlalchemy import delete
from quiz.models.user_model import UserModel
from quiz.serializers.user_ser... | null | quiz/views/usuario_view.py | usuario_view.py | py | 3,804 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_jwt_extended.get_jwt_identity",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "quiz.serializers.user_serializer.usario_serializer",
"line_number": 20,
"usage_type":... |
15514078 | import os
import sys
import argparse
import logging
import collections
import json
import re
import ftrack_api
from pype.ftrack import BaseAction
from avalon import io, inventory, schema
class TestAction(BaseAction):
'''Edit meta data action.'''
ignore_me = True
#: Action identifier.
identifier = 't... | null | pype/ftrack/actions/action_test.py | action_test.py | py | 2,060 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pype.ftrack.BaseAction",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "os.environ.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "argparse.Argume... |
362957406 | import argparse
import json
import os
import shutil
import tarfile
from collections import Counter
from concurrent import futures
from copy import copy
from functools import partial
from glob import glob
from time import time
import numpy as np
import pandas as pd
from Bio import SeqIO
from sklearn.cluster import Mean... | null | ctdg_finder.py | ctdg_finder.py | py | 38,119 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.options",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
... |
288752021 | import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.optim as optim
import numpy as np
import time
torch.manual_seed(111)
class semiCRF(nn.Module):
def __init__(self, tagset_size=2, max_seq_len=4):
'''
Note in this model, suppose a beginning node
'''
supe... | null | semiCRF.py | semiCRF.py | py | 17,170 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.manual_seed",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Parameter",
... |
485011506 | import json
with open('states.json') as f:
data = json.load(f)
for state in data['states']:
if state["Location"] == "North":
del state["Name"]
del state["Abbreviation"]
del state["Location"]
with open('noNorth.json','w') as f:
json.dump(data, f, indent= 2)
| null | states.py | states.py | py | 296 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 13,
"usage_type": "call"
}
] |
649807503 | # -*- coding: UTF-8 -*-
# Copyright 2015 by Luc Saffre.
# License: BSD, see LICENSE for more details.
"""Defines the :manage:`checkdata` management command.
.. management_command:: checkdata
.. py2rst::
from lino.modlib.plausibility.management.commands.checkdata \
import Command
print(Command.help)
"""
f... | null | lino/modlib/plausibility/management/commands/checkdata.py | checkdata.py | py | 2,792 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "lino.api.rt.modules",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "lino.api.rt",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "lino.modlib.plausibility.models.get_checkable_models",
"line_number": 33,
"usage_type": "call"
},
... |
216468065 | import urllib.request as urllib2
import bs4
from bs4 import BeautifulSoup
import csv
import validators
#source_page = "https://forum.openrov.com/t/issue-connecting-openrov-2-8-to-laptop/6567"
def page_content(file, url):
page = urllib2.urlopen(url)
soup = BeautifulSoup(page, 'html.parser')
title = soup.f... | null | bs_2.py | bs_2.py | py | 1,356 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "urllib.request",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "csv.writer",
... |
371382765 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#!/usr/bin/env python
# encoding: utf-8
import json
import os
from pathlib import Path
from flask import Flask, request, jsonify, make_response, session
import datetime
def memoryCRC():
memCRC=0
for val in diskData:
... | null | LittleFs_RemoteDisk/src/PyDiskHost/PyDiskHost.py | PyDiskHost.py | py | 3,995 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "flask.requ... |
482950546 | from PIL import Image
import argparse
# 首先,构建命令行输入参数处理 ArgumentParser 实例
parser=argparse.ArgumentParser()
parser.add_argument('file')
parser.add_argument('-o','--output') #输出文件
parser.add_argument('--width',type=int,default=80)#输出字符画宽度
parser.add_argument('--height',type=int,default=80)#输出字符画高度
# 解析并获取参数
args=parser.... | null | Python图片转字符画/ascii.py | ascii.py | py | 2,804 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "PIL.Image.NEAREST",
... |
503049803 | from odoo import models, api, fields, _
from io import BytesIO
import xlsxwriter
import base64
from datetime import datetime
from odoo.exceptions import UserError
class KGAccountReportGeneralLedger(models.TransientModel):
_inherit = 'account.report.general.ledger'
data = fields.Binary('File', readonly=True)... | null | local/kg_account/wizards/account_report_general_ledger.py | account_report_general_ledger.py | py | 20,601 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "odoo.models.TransientModel",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Binary",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "odoo.f... |
231761559 | from Bio import SeqIO
import os.path
def two_string_overlap(s1, s2):
"""Given two read sequences (strings of A/C/T/G), find maximal overlap
by incrementally offsetting the second sequence to the right.
INPUT:
s1 - string, the left sequence
s2 - string, the right sequence
RETURNS:
... | null | greedy_assembly.py | greedy_assembly.py | py | 5,292 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Bio.SeqIO.index",
"line_number": 132,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_number": 132,
"usage_type": "name"
},
{
"api_name": "os.path.path.join",
"line_number": 132,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"li... |
568344793 | import cv2 as cv
import numpy as np
cap = cv.VideoCapture(0)
cap.set(3, 640)
cap.set(4, 480)
cap.set(10, 150)
widthImg = 480
heightImg = 640
def stackImages(scale, imgArray):
rows = len(imgArray)
cols = len(imgArray[0])
rowsAvailable = isinstance(imgArray[0], list)
width = imgArray[0][0].shape[1]
... | null | project2.py | project2.py | py | 4,071 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number... |
219110837 | from django.db import models
from django.conf import settings
class Card(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL)
date_created = models.DateTimeField('date created', auto_now_add=True)
uses = models.IntegerField(default=0)
score = models.IntegerField(default=0)
def __st... | null | teapots/models.py | models.py | py | 769 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": ... |
506441111 | from hdfs import Client
import urllib3
import json
import time
class JobManager(object):
def __init__(self, config, expiration=30000):
def get_token(username, password, expiration):
###
# input_type: str, str, int
# input: the username of PAI, the password of PAI and th... | null | examples/auto-test/job_manage.py | job_manage.py | py | 5,601 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "time.sleep",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "urllib3.PoolManager",
"line_numb... |
616214395 | import pyttsx3
import PyPDF2
# Book path input
path = input("Please Enter the Path of the book: \n")
book = open(path,'rb')
# Initialize the book
PDF_Reader = PyPDF2.PdfFileReader(book)
pages = PDF_Reader.numPages
# Initialize the speaker
speaker = pyttsx3.init()
rate = speaker.getProperty('rate')
# ... | null | main.py | main.py | py | 1,308 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyPDF2.PdfFileReader",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyttsx3.init",
"line_number": 13,
"usage_type": "call"
}
] |
255095646 | from flask import Blueprint, render_template, request, current_app
from flask_login import login_required
from webapp.models import Problem, Device, ProblemTag
from .forms import SearchForm
search_blueprint = Blueprint("search", __name__, url_prefix='/search')
@search_blueprint.route('', methods=['GET', 'POST'])
@lo... | null | webapp/views/search/views.py | views.py | py | 2,345 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
279705469 | #!/usr/bin/python3.6
#coding: utf-8
import json
from neverland.utils import ObjectifiedDict as OD
from neverland.utils import VerifiTools
from neverland.exceptions import ConfigError
from neverland.node import Roles
class ConfigLoader():
@classmethod
def load_json_file(cls, path):
try:
... | null | Neverland/neverland/config.py | config.py | py | 7,117 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "neverland.exceptions.ConfigError",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "neverland.utils.VerifiTools.type_matched",
"line_number": 30,
"usage_type": "call"
},
{
... |
557636472 | import xmltodict,os,requests,datetime
from .models import Clothe,CategoryPrice,CategoryClothe,ClothePartner,ClotheMale,ClotheCountry
categoryAW={
"4676": ("Кроссовки", "Женский"),
"6526": ("Шорты", "Женский"),
"2454": ("Платья, сарафаны и туники", "Женский"),
"262": ("Джинсы", "Женский"),
"2452": ... | null | djtbot/tgbot/parser.py | parser.py | py | 7,575 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.ClothePartner.objects.get",
"line_number": 122,
"usage_type": "call"
},
{
"api_name": "models.ClothePartner.objects",
"line_number": 122,
"usage_type": "attribute"
},
{
"api_name": "models.ClothePartner",
"line_number": 122,
"usage_type": "name"
},... |
270977108 | import pandas as pd
# pip install WordCloud
from wordcloud import WordCloud
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import seaborn as sns
import matplotlib.font_manager as fm
fm.get_fontconfig_fonts()
font_location = 'C:/Windows/Fonts/malgun.ttf'
font_name = fm.FontProperti... | null | crawling/clean/covid_wc.py | covid_wc.py | py | 3,449 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.font_manager.get_fontconfig_fonts",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 12,
"usage_t... |
200229466 | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy import signals
from scrapy.contrib.exporter import XmlItemExporter
class IngredientfinderPipeline(object):
def __init__(self):
self.f... | null | webScraping/ingredientfinder/ingredientfinder/pipelines.py | pipelines.py | py | 1,053 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "scrapy.signals.spider_opened",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "scrapy.signals",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "scrapy.signals.spider_closed",
"line_number": 17,
"usage_type": "attribute"
},
{
... |
70533878 | import json
import requests
class Quality_Check:
def check_broken_link(self,data):
try:
url = requests.head(data)
if url.status_code in (200,302,301):
return True
except requests.exceptions.SSLError as e:
return False
def get_location_info(ip_add... | null | do_get_eosratings.py | do_get_eosratings.py | py | 4,927 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.head",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.loads",
"... |
414712934 | from trac.core import *
from trac.resource import ResourceNotFound
from trac.config import Option, IntOption, ListOption, BoolOption
from trac.web.api import IRequestFilter, IRequestHandler, Href
from trac.env import IEnvironmentSetupParticipant
from trac.util.translation import _
from trac.util.text import shorten_lin... | null | github/github.py | github.py | py | 12,137 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "trac.web.api.IRequestHandler",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "trac.web.api.IRequestFilter",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "trac.env.IEnvironmentSetupParticipant",
"line_number": 19,
"usage_type":... |
574072884 | import time
import os
from flask import Flask, Response, render_template
from kafka import KafkaConsumer
import socket
# Connect to Kafka, asking for the topic we want to consume
KAFKA_IP = os.environ['KAFKA_CLIENT_ADDRESS']
checkKafka = True
print('Consumer checking: ' + KAFKA_IP)
while checkKafka:
try:
c... | null | res/consumer.py | consumer.py | py | 1,141 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "kafka.KafkaConsumer",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line... |
576482575 | from locast.api import *
from locast.api import qstranslate
from django.contrib.gis.geos import Polygon
from django.db.models import Q
from traveler import models
from traveler.api.cast import CastAPI
def get_geofeatures(request):
bounds_param = get_param(request.GET, 'within')
query = request.GET.copy()
... | null | traveler/api/geofeatures.py | geofeatures.py | py | 1,602 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.gis.geos.Polygon.from_bbox",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.contrib.gis.geos.Polygon",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "django.db.models.Q",
"line_number": 25,
"usage_type": "call"
... |
617079615 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | null | vsts/vsts/git/v4_0/models/change.py | change.py | py | 1,591 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "msrest.serialization.Model",
"line_number": 12,
"usage_type": "name"
}
] |
9408634 | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_classifier import TLCla... | null | ros/src/tl_detector/tl_detector.py | tl_detector.py | py | 18,258 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "keras.backend.flatten",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "keras.backend.flatten",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "keras.backe... |
616921340 | #
# 2013-02-02T14:40:24.000Z
#
import datetime
fmt = "%Y-%m-%dT%H:%M:%S.000Z"
NS = {"a": "http://www.w3.org/2005/Atom", "yt": "http://gdata.youtube.com/schemas/2007", "media": "http://search.yahoo.com/mrss/"}
class VideoEntry:
"""Data holder for the video."""
def __init__(self, node):
self.entry_id = ... | null | video_entry.py | video_entry.py | py | 1,587 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
}
] |
420903271 | import io
import re
import xml.etree.ElementTree as ET
from xml.dom import minidom
''' Program read text from the file and append it to xml file.
Writes all words that have same ending, their column,row and tuple '''
def prettify(elem):
"""Return a pretty-printed XML string for the Element.
"""
... | null | Python/Lab2/Lab2_4.py | Lab2_4.py | py | 1,729 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "xml.etree.ElementTree.tostring",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "xml.dom.minidom.parseString",
"line_number": 13,
"usage_type": "call"
},
{
"... |
422966488 | import os
os.system("pip install SpeechRecognition")
os.system("pip install PyAudio")
import speech_recognition as sr
import winsound
import random as rand
r = sr.Recognizer()
with sr.Microphone() as mic:
try:
print("Are you ready for the game?")
winsound.Beep(1500,600)
gotsound =... | null | main.py | main.py | py | 4,832 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.system",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Mic... |
174145445 | import cv2, time, pydot, sys
import networkx as nx
from networkx.drawing.nx_pydot import write_dot
import matplotlib.pyplot as plt
from itertools import permutations
from src.Dijkstra import dijkstra
from src.Board import Board
graph = {}
pos = {}
board = Board()
G = nx.Graph()
def saveImage():
# get color
... | null | ShortestTTR.py | ShortestTTR.py | py | 4,812 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "src.Board.Board",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "networkx.draw",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.savefi... |
97548638 | __version__ = '1.0'
__author__ = 'Wang Xian'
import logging
import os
import re
import sys
import time
import gzip
import itertools
from difflib import SequenceMatcher
import argparse
#sys.path.append(os.path.split(os.path.realpath(__file__))[0])
#import the logging functions
from pipelines.log.log import store_p... | null | run1.py | run1.py | py | 17,827 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 76,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 79,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"l... |
550800827 | from .common import touchmsg, findproject, thisbranch
from lagoon import git
import os, time
def main_touchb():
'Give the current branch its own identity.'
path = os.path.join(findproject(), 'TOUCHME')
with open(path, 'w') as f:
print("%s %s" % (time.strftime('%c %Z'), thisbranch()), file = f)
... | null | dev_bin/touchb.py | touchb.py | py | 376 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "common.findproject",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_n... |
455302510 | #-*- coding:utf-8 -*-
import requests
import json
#proxies = {'https': 'socks5://user:pass@domen:port',
# 'https': 'https://54.37.131.15:8080',
# 'https': 'https://54.37.131.15:3128' }
url = [ 'https://yobitex.net/api/3/',
'https://yobitex.net/tapi/' ]
session = requests.session()
... | null | yobit.py | yobit.py | py | 6,160 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.session",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "requests.exceptions",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "js... |
426787412 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditio... | null | CUDA-Optimized/FastSpeech/fastspeech/perf_infer.py | perf_infer.py | py | 8,231 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pprint.PrettyPrinter",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "fastspeech.DEFAULT_DEVICE",
"line_number": 61,
"usage_type": "name"
},
{
"api_name": "fastspeech.hparam.set_hparam",
"line_number": 85,
"usage_type": "call"
},
{
"api_n... |
356695871 | # =========================================================================================================================================================================
# Toy hybrid mode-locked laser model using a traveling-wave model (v2) and an extension of the nonlinear shrodinger equation
# - In this toy model... | null | Toy_HybridModelv2_MLL.py | Toy_HybridModelv2_MLL.py | py | 64,732 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.atleast_1d",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"line_numb... |
442537637 | # SVm Classifier
from sklearn import svm
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
iris = datasets.load_iris()
iris.data
iris.feature_names
iris.target
iris.target_names
X = iris.data[:,2]
y= iris.target
X_train, X_test, y_train... | null | Scikit_learn.py | Scikit_learn.py | py | 691 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 22,
"usage_type": "call"
},
{
... |
102105138 | from django.conf.urls import patterns, url, include
from tastypie.api import Api
from .api import SongResource, PackResource, ResultResource
from .views import AddSongView, ListResultsView
v1_api = Api(api_name='v1')
v1_api.register(PackResource())
v1_api.register(SongResource())
v1_api.register(ResultResource())
u... | null | comparator/urls.py | urls.py | py | 497 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tastypie.api.Api",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "api.PackResource",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "api.SongResource",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "api.ResultResource",... |
608019983 | from typing import Optional
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
from graphysio.legend import LegendItem
from graphysio.plotwidgets import curves
from graphysio.utils import Colors
class TimeAxisItem(pg.AxisItem):
def tickStrings(self, values, scale, spacing):
ret = []
f... | null | graphysio/plotwidgets/plotwidget.py | plotwidget.py | py | 4,169 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pyqtgraph.AxisItem",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pyqtgraph.Qt.QtCore.QDateTime.fromMSecsSinceEpoch",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pyqtgraph.Qt.QtCore.QDateTime",
"line_number": 16,
"usage_type"... |
550415060 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
from pandas.compat import u
import numpy as np
import os.path
import pandas as pd
import re
import requests
import time
"""
ahv http://docs.python-guide.org/en/latest/scenarios/scrape/
# deze gasten gebruikt worldfootball.net ecm BeautifulS... | null | tools/scraper/cup_scraper_orig.py | cup_scraper_orig.py | py | 15,786 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.DataFrame",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"lin... |
403475425 | #!/user/bdisoft/operational/bin/Python/PRO/bin/python
' #!/usr/bin/python '
'''
Description:
1. read the buffers from the fesa class
2. if error
- dump into a file (*.npy)
- save a pic
- send an sms
Notes:
- pyjapc returns numpy.ndarray in python3 version
'''
import argparse
import os
import subproce... | null | python3/exec_getRFMeasError/exec_getRFMeasError_v_1_0_1.py | exec_getRFMeasError_v_1_0_1.py | py | 4,280 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "smtplib.SMTP",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "pyjapc.... |
587256814 | '''
Created on Oct 20, 2015
@author: HCH
This file contains code for analyzing sessions-related users
'''
import pandas as pd
import numpy as np
import datetime
from collections import Counter
def users_log_allweek():
# Print usrs loged in corresponding weeks
st = pd.read_csv('student_ss_dur.csv... | null | EdTech/session_analysis/session_analysis.py | session_analysis.py | py | 1,171 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "col... |
534375773 | # Django core imports
from django.conf.urls import patterns, include, url
from django.contrib import admin
# Project based imports
from test_app import views
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'test_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^adm... | null | test_project/test_project/urls.py | urls.py | py | 552 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 13,
"usage_type": "call"
},
{
"api_name":... |
568511051 | # -*- coding: utf-8 -*-
# @Time : 2018/9/25 15:21
# @Author : Yvan
# @Project : Frame Glimpses
# @FileName: video2img.py
# @Software: PyCharm
import os
import cv2
videos_src_path = "E:/video_5fps"
video_files = os.listdir(videos_src_path)
videos_save_path = "E:/data"
for each_video in video_files:
each_video_... | null | prepare/video2img.py | video2img.py | py | 1,192 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.listdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": ... |
410694955 | import os
from datetime import timedelta
SERVICEAREAS_API_URL = os.getenv('SERVICEAREAS_API_URL', 'http://localhost:8000/api/v2/serviceareas')
RR_API_TOKEN = os.getenv('RR_API_TOKEN', 'asdfasdf')
DATAFILE_TEMPLATE = os.getenv('DATAFILE_TEMPLATE', 'data/{pk}.osm')
MAX_DOWNLOAD_AGE = timedelta(days=7).total_seconds(... | null | builder/settings.py | settings.py | py | 470 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 11... |
6933819 |
from pathlib import Path
import click
from src.common import LOGGER
from src.load_events import process as load_events_process
from src.calculate_metric import process as calculate_metric_process
from pyspark.sql.types import *
jobs_process = ["load_events", "calculate_metric"]
events = {
"registered" : ["time", ... | null | main.py | main.py | py | 2,238 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "src.common.LOGGER.info",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "src.common.LOGGER",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "pathlib.Path.home",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "pathlib.Pa... |
338488736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:et
import hashlib
import os
import glob
import yum.comps
import logging
import shutil
import difflib
import tempfile
import time
import re
import sys
import StringIO
from distutils.version import LooseVersion
import koji
import kobo.log
import kobo.shortcuts
i... | null | koji/collection-mash-split.py | collection-mash-split.py | py | 17,957 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "kobo.log.tback.set_except_hook",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "kobo.log.tback",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "kobo.log",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "logging.g... |
287324795 | import os
import imageio
path = 'C:/Users/Ryley/Documents/Ryleys Documents/Games/Dustforce/Skins/pixelSprites/area'
def make_gif(directory, count = 0):
list = os.listdir(directory)
file_groups = {}
for file in list:
if file.endswith('_src.png'):
file_groups[file[:-12]] = 1 + file_group... | null | spriteWork/gifmaker.py | gifmaker.py | py | 934 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "imageio.imread",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "imageio.mimsave",
"line_number": 24,
"usage_type": "call"
}
] |
235540856 | """
Asynchronous tasks that update data in Open Humans.
These tasks:
1. delete any current files in OH if they match the planned upload filename
2. adds a data file
"""
import os
import logging
import requests
from celery import chain, group
from subprocess import run, PIPE
from ohapi import api
from os import envi... | null | imputer/tasks.py | tasks.py | py | 14,344 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "os.environ.get",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_numbe... |
509975880 | # ===== Import Modules =====
import argparse
import requests
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# ===== /Import Modules/ =====
# ===== Define Functions =====
def doXticks( x ):
myList = [ '' for i in range(len(x)) ]
for i in np.arange(len(x)-1,0,-1):
if i % 5 == ... | null | py/covid.py | covid.py | py | 3,901 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.arange",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
369110047 | from statistics import mean
import math
from MovementCalculator import fit_parabola, passes_boundary
# GJH_team #
##########Intercept Calc Class#############
# Class processes past points of ball to #
# find optimal place for the interception #
# of the ball. #... | null | intercepts.py | intercepts.py | py | 8,814 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "statistics.mean",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 142,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 163,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": ... |
541842635 | #coding=utf-8
import json
import io
import codecs
data=json.load(codecs.open('yelp_academic_dataset_business.json', 'r', 'utf-8-sig'))
#file_object = io.open('busid3.txt', 'w', encoding='utf8')
#file_object2 = open('busid_loc.txt', 'w')
file_object3 = open('price_range.txt', 'w')
c=0;
for i in data['business'... | null | zwang/py_business.py | py_business.py | py | 1,748 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 5,
"usage_type": "call"
}
] |
507110405 | from django.contrib import admin
from django.urls import path, include, re_path
from . import views
from . import do_views
from . import TAC_views,RD_views,CE_view
urlpatterns = [
path('',views.dashboard, name="home"),
re_path(r'^new_user/$', views.new_user, name="new_user"),
re_path(r'^new_cemilac_user/$'... | null | defence/dashboard/urls.py | urls.py | py | 5,678 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.re... |
56566966 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
####
# Copyright (C) 2018 Kim Gerdes
# kim AT gerdes. fr
# http://arborator.ilpga.fr/
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 3 of the GNU Affero General Public License (the "License")
# as published by the Free... | null | tools/lib/transconll.py | transconll.py | py | 12,522 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "itertools.chain.from_iterable",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "itertools.combinations",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "... |
295257984 | from openerp.osv import fields,osv
import openerp.addons.decimal_precision as dp
from tools.translate import _
from lxml import etree
from openerp.osv.orm import setup_modifiers
from datetime import datetime
import time
class wizard_product_work_in_process(osv.osv_memory):
_inherit = "wizard.product.work.in.process"
... | null | stock_custom/wizard_product_work_in_process.py | wizard_product_work_in_process.py | py | 3,038 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "openerp.osv.osv.osv_memory",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "openerp.osv.osv",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 50,
"usage_type": "call"
},
{
"api_name... |
186223623 | """ RHEAS nowcast testing suite.
:synopsis: Unit tests for RHEAS nowcast module
.. moduleauthor:: Kostas Andreadis <kandread@jpl.nasa.gov>
"""
import unittest
import nowcast
import forecast
import config
import rpath
import tempfile
import subprocess
from datetime import datetime
import datasets
import dbio
impo... | null | src/tests/test.py | test.py | py | 8,087 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rpath.data",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "dssat.addCultivar",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "rpath.bins",
"l... |
638346176 | import warnings
from functools import reduce
from typing import List
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..utils.general import simplex
class CrossEntropyLoss2d(nn.Module):
"""
specific CE 2D interface
"""
def __init__(self, weight=None, reduce=True, size_average... | null | deepclustering/loss/loss.py | loss.py | py | 6,793 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.Tensor",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"l... |
188976993 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Created by Allen Luo
import pymysql
from config.settings import MYSQL_INFO
"""
sql调用方法处理
"""
def mysql_exe(sql):
"""
获取sql查询数据
:param sql:
:return:
"""
db = pymysql.connect(**MYSQL_INFO)
l = []
try:
# 使用cursor()方法获取操作游标
... | null | api/lib/tool.py | tool.py | py | 643 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pymysql.connect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "config.settings.MYSQL_INFO",
"line_number": 18,
"usage_type": "name"
}
] |
91250248 | from nltk.sentiment.vader import SentimentIntensityAnalyzer
import json
import codecs
import re
import numpy
# For classification
class Positivity():
positive = 1
negative = -1
file_name = "../data/CompiledTweets.txt"
def do_matrix(THRESHOLD = 0):
hand_coded_tweets = []
hand_coded_json = None
#... | null | scripts/vader-confusion-matrix.py | vader-confusion-matrix.py | py | 2,517 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "codecs.open",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "nltk.sentiment.vader.SentimentIntensityAnalyzer",
"line_number": 46,
"usage_type": "call"
},
{
"api_name":... |
495262272 | from flask import flash
from flask_login import current_user, login_user
from flask_dance.contrib.github import make_github_blueprint
from flask_dance.consumer import oauth_authorized, oauth_error
from flask_dance.consumer.storage.sqla import SQLAlchemyStorage
from sqlalchemy.orm.exc import NoResultFound
from app.model... | null | app/oauth/github.py | github.py | py | 3,513 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask_dance.contrib.github.make_github_blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_dance.consumer.storage.sqla.SQLAlchemyStorage",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "app.models.OAuth",
"line_number": 11,
... |
297959821 | # Copyright 2017 Catalyst IT Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | null | qinlingclient/osc/v1/runtime.py | runtime.py | py | 3,685 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "qinlingclient.osc.v1.base.QinlingLister",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "qinlingclient.osc.v1.base",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "qinlingclient.osc.v1.base.RUNTIME_COLUMNS",
"line_number": 22,
"us... |
228018029 | """
Downloads all historical truth data from the Reich Lab:
https://github.com/reichlab/covid19-forecast-hub/blob/master/data-truth/truth-Cumulative%20Deaths.csv
This script is a reformatted version of the one originally developed by the Reich Lab:
https://github.com/reichlab/covidData/blob/master/code/data-processin... | null | truth/download_historical_truth.py | download_historical_truth.py | py | 4,241 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "... |
233563700 | import json, os
from collections import namedtuple
stats = ['FG', 'FGA', 'FG%', '3P', '3PA', '3P%', 'FT', 'FTA', 'FT%', 'ORB', 'DRB', 'TRB', 'AST', 'STL', 'BLK', 'TOV', 'PF']
def getDirTeam():
curDir = os.getcwd()
return curDir[-7:-4]
def getTeamIndex(json, target):
for x, obj in enumerate(json):
if obj['TEAM']... | null | nba/BOS1986/aggregateData.py | aggregateData.py | py | 4,175 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getcwd",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 51,
"... |
373478914 | import rhino3dm
import numpy as np
import pickle
import joblib
from tensorflow import keras
def runml(a,b,c):
model = keras.models.load_model(r'C:\Users\kimky\Desktop\tmp\S4_STUDIO\ML-GEOMETRY\ML\regression_model_V5.h5')
model.summary()
#Load Standardscaler
from sklearn.preprocessing import Stand... | null | 02_FILES/02_CODE/01_HOPS/machinelearning.py | machinelearning.py | py | 1,234 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras",
"line_number": 10,
"usage_type": "name"
},
{
"... |
487704274 | from maltedmlk import db
import datetime
class Entry(db.Model):
id = db.Column(db.Integer, primary_key = True)
remote_location = db.Column(db.String(255), nullable = False)
#userid integer not null default 0,
title = db.Column(db.String(255), nullable = False, default = u'\u2603')
text = db.Column... | null | maltedmlk/models.py | models.py | py | 487 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "maltedmlk.db.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "maltedmlk.db",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "maltedmlk.db.Column",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "maltedmlk.db",
... |
34861982 | import json
import os
from pprint import pprint
import datetime
from order_details import OrderDetails, place_order_details
__db_location__ = "db"
__order_folder__ = f"{__db_location__}/order"
__order__last_id__ = f"{__db_location__}/order_id.db"
__user_id__ = f"{__db_location__}/user.db"
__order_detail_folder__ = f... | null | order.py | order.py | py | 6,289 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "json.dump",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": ... |
400409170 | import dbus
import decimal
import subprocess
from dbus import DBusException
BUS_NAME = 'org.mpris.MediaPlayer2'
VLC_BUS = BUS_NAME + '.vlc'
PLAYER_BUS = BUS_NAME + '.Player'
OBJECT_PATH = '/org/mpris/MediaPlayer2'
REWIND_VALUE = 1500000 # time is in microseconds
FORWARD_VALUE = 3000000
class Player:
def __ini... | null | src/python/pythonpath/audio_controls.py | audio_controls.py | py | 3,033 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "dbus.SessionBus",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "dbus.SessionBus",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "dbus.Interface",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "dbus.Interface",
"... |
273539133 | import logging
from logging.handlers import RotatingFileHandler
from flask import Flask
from flask_admin import Admin
from webarchive.extensions import db, storage, downloader, jwt, login_manager
from webarchive.api.resources import blueprint
from webarchive.authentication import (identity, authenticate, payload_hand... | null | webarchive/application.py | application.py | py | 2,984 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.DEBUG",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "logging.handlers.RotatingFileHandler",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 31,
"usage_type": "call"
},
{
"api_nam... |
208767759 | # -*- coding: utf-8 -*-
# ########## 测试结果后处理所用到的函数 #############
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import SimpleITK as sitk
import torch
import torchvision
import torchvision.transforms as transforms
# 二分类:
def get_proc_df_binary(results_raw,metric... | null | code/post_utils.py | post_utils.py | py | 5,697 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.DataFrame",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.to_numeric",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figu... |
71491229 | # -*- coding: utf-8 -*-
# @Time : 2019/11/12 13:55
# @Author : lxfei1220@163.com
from collections import Iterable
import logging
import warnings
from pprint import pprint
import numpy as np
from WindPy import w
import pandas as pd
import matplotlib.pyplot as plt
warnings.filterwarnings("ignore")
class Hur... | null | quant_models/applications/timing_strategies/hurst.py | hurst.py | py | 4,393 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "numpy.cumsum",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"l... |
596062462 | import os
import sys
import random
import pickle
import msgpack
import logging
import argparse
import itertools
from datetime import datetime
import scipy
import scipy.stats
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from drqa.model import DocReaderModel
from util import BatchGen... | null | squad_drqa/train_entropy_other.py | train_entropy_other.py | py | 8,492 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "args.args.load_model_dir",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "args.args",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "args.args.ent_train_dir",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "... |
643813800 | """Padstow, a library for booking events in Django.
"""
import setuptools
with open("README.rst", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="padstow",
version="0.0.1",
author="Tim Martin",
author_email="tim@asymptotic.co.uk",
description="Book events in a calendar in Dja... | null | setup.py | setup.py | py | 757 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 18,
"usage_type": "call"
}
] |
250187097 | # Set your secret key: remember to change this to your live secret key in production
# See your keys here: https://dashboard.stripe.com/account/apikeys
import stripe
stripe.api_key = "sk_test_hMWLSdT5grfKEieoHTdj7z99"
# Token is created using Checkout or Elements!
# Get the payment token ID submitted by the form:
toke... | null | pre-order/db.py | db.py | py | 491 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "stripe.api_key",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "stripe.Charge.create",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "stripe.Charge",
"line_number": 10,
"usage_type": "attribute"
}
] |
299727582 | #!/usr/bin/env python3
# This file contains the python3 tests for the Kubernetes Juju bundle.
import amulet
import os
import unittest
import yaml
seconds = 1800
class BundleIntegrationTest(unittest.TestCase):
""" This class creates an integration test for deploying a bundle. """
bundle = None
@classme... | null | tests/10-integration-test.py | 10-integration-test.py | py | 3,157 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
314821349 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('fungus', '0005_auto_20150423_1453'),
]
operations = [
migrations.CreateModel(
name='FunctionaryShiftTypeDiscount... | null | fungus/migrations/0006_functionaryshifttypediscount.py | 0006_functionaryshifttypediscount.py | py | 1,227 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.